7.24
parent
0feb180d6f
commit
afe74abe23
|
@ -5,35 +5,44 @@
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="form">
|
<view class="form">
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<uni-easyinput class="input" suffixIcon="search" v-model="value1" placeholder="船名/航次"
|
<superwei-combox class="input" :candidates="mnfBlList" :isJSON="true" keyName="mnfBl"
|
||||||
@iconClick="iconClick">
|
placeholder="提单号" v-model="mnfBl" @input="mnfBlInput" @select="mnfBlSelect"></superwei-combox>
|
||||||
</uni-easyinput>
|
</uni-easyinput>
|
||||||
</view>
|
</view>
|
||||||
<view class="select" v-show="current!=0">
|
<view class="select" v-show="current!=0">
|
||||||
<uni-data-select v-model="value" :localdata="range" @change="change" placeholder="港区">
|
<uni-data-select v-model="harbour" :localdata="harbourRange" @change="change('harbour')"
|
||||||
|
placeholder="港区">
|
||||||
</uni-data-select>
|
</uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
<view class="select" v-show="current!=0">
|
<view class="select" v-show="current!=0">
|
||||||
<uni-data-select v-model="value" :localdata="range" @change="change" placeholder="贸易类型">
|
<uni-data-select v-model="type" :localdata="typeRange" @change="change('type')" placeholder="贸易类型">
|
||||||
</uni-data-select>
|
</uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="input">
|
||||||
|
<superwei-combox class="input" :candidates="brandList" :isJSON="true" keyName="brdName"
|
||||||
|
placeholder="品牌" v-model="brdName" @input="brandInput" @select="brandSelect"></superwei-combox>
|
||||||
|
</uni-easyinput>
|
||||||
|
</view>
|
||||||
|
<view class="select" v-show="current!=0">
|
||||||
|
<superwei-combox class="input" :candidates="bvmList" :isJSON="true" keyName="bvmName"
|
||||||
|
placeholder="车型" v-model="bvmName" @input="bvmInput" @select="bvmSelect"></superwei-combox>
|
||||||
|
</uni-easyinput>
|
||||||
|
</view>
|
||||||
<view class="select">
|
<view class="select">
|
||||||
<uni-data-select v-model="value" :localdata="range" @change="change" placeholder="品牌">
|
<superwei-combox class="input" :candidates="potList" :isJSON="true" keyName="potName"
|
||||||
</uni-data-select>
|
placeholder="港口" v-model="potName" @input="potInput" @select="potSelect"></superwei-combox>
|
||||||
|
</uni-easyinput>
|
||||||
</view>
|
</view>
|
||||||
<view class="select" v-show="current!=0">
|
<view class="select" v-show="current!=0">
|
||||||
<uni-data-select v-model="value" :localdata="range" @change="change" placeholder="车型">
|
<uni-data-select v-model="status" :localdata="statusRange" @change="change('status')"
|
||||||
</uni-data-select>
|
placeholder="计划状态">
|
||||||
</view>
|
|
||||||
<view class="select">
|
|
||||||
<uni-data-select v-model="value" :localdata="range" @change="change" placeholder="港口">
|
|
||||||
</uni-data-select>
|
|
||||||
</view>
|
|
||||||
<view class="select" v-show="current!=0">
|
|
||||||
<uni-data-select v-model="value" :localdata="range" @change="change" placeholder="计划状态">
|
|
||||||
</uni-data-select>
|
</uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
|
<button class="btn" @click="screen" v-show='current==0'>筛选</button>
|
||||||
|
<button class="btn" @click="onSearch">搜索</button>
|
||||||
</view>
|
</view>
|
||||||
|
<fjj-condition ref='condition' @touchmove.stop color="#4D7BFE" :list="menuList" :defaultValue="defaultValue"
|
||||||
|
@result="resultConditon" />
|
||||||
<view class="uni-list">
|
<view class="uni-list">
|
||||||
<radio-group class="group" @change="radioChange">
|
<radio-group class="group" @change="radioChange">
|
||||||
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
|
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
|
||||||
|
@ -115,7 +124,7 @@
|
||||||
<view class="cell">
|
<view class="cell">
|
||||||
型号:特斯拉plus
|
型号:特斯拉plus
|
||||||
</view>
|
</view>
|
||||||
<view class="cell blue" @click="toDetails">
|
<view class="cell blue" @click="toDetails(item.xq)">
|
||||||
详情
|
详情
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -126,8 +135,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tablist" v-show="current==1">
|
<view class="tablist" v-show="current==1">
|
||||||
<view class="tab" :class="active==1?'active':''" type="default" @click="tabChange(1)">未发送</view>
|
<view class="tab" :class="active==0?'active':''" type="default" @click="tabChange(0)">未发送</view>
|
||||||
<view class="tab" :class="active==2?'active':''" type="default" @click="tabChange(2)">已发送</view>
|
<view class="tab" :class="active==1?'active':''" type="default" @click="tabChange(1)">已发送</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemList" v-show="current==1">
|
<view class="itemList" v-show="current==1">
|
||||||
<view class="exp" v-for="(item,index) in itemList" :key="item.index">
|
<view class="exp" v-for="(item,index) in itemList" :key="item.index">
|
||||||
|
@ -168,8 +177,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fs blue">
|
<view class="fs blue">
|
||||||
<text v-show="active==1" @click="onSend">发送</text>
|
<text v-show="active==0" @click="onSend">发送</text>
|
||||||
<text v-show="active==2" @click="onPause">{{item.status}}</text>
|
<text v-show="active==1" @click="onPause(item.status)">{{item.status}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="details">
|
<view class="details">
|
||||||
|
@ -195,7 +204,7 @@
|
||||||
<view class="cell">
|
<view class="cell">
|
||||||
型号:特斯拉plus
|
型号:特斯拉plus
|
||||||
</view>
|
</view>
|
||||||
<view class="cell blue" @click="toDetails">
|
<view class="cell blue" @click="toDetails(item.xq)">
|
||||||
详情
|
详情
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -267,11 +276,69 @@
|
||||||
} from 'vuex'
|
} from 'vuex'
|
||||||
import HeadView from '@/components/head-view/head-view.vue';
|
import HeadView from '@/components/head-view/head-view.vue';
|
||||||
import HeadInfo from '@/components/head-info/head-info';
|
import HeadInfo from '@/components/head-info/head-info';
|
||||||
|
let timers = null;
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: "",// 进入页面的初始id
|
id: "", // 进入页面的初始id
|
||||||
value1: "",
|
menuList: [], // 筛选框
|
||||||
|
defaultValue: {},
|
||||||
|
mnfBl: '', // 提单号
|
||||||
|
mnfBlItem: {},
|
||||||
|
mnfBlList: [],
|
||||||
|
brdId: '', // 品牌
|
||||||
|
brdName: '', // 品牌
|
||||||
|
brandItem: {},
|
||||||
|
brandList: [],
|
||||||
|
harbour: '', // 港区
|
||||||
|
harbourRange: [{
|
||||||
|
value: 1,
|
||||||
|
text: '全部'
|
||||||
|
}, {
|
||||||
|
value: 2,
|
||||||
|
text: '内贸'
|
||||||
|
}, {
|
||||||
|
value: 3,
|
||||||
|
text: '外贸'
|
||||||
|
}],
|
||||||
|
type: '', // 贸易类型
|
||||||
|
typeRange: [{
|
||||||
|
value: 1,
|
||||||
|
text: '全部'
|
||||||
|
}, {
|
||||||
|
value: 2,
|
||||||
|
text: '内贸'
|
||||||
|
}, {
|
||||||
|
value: 3,
|
||||||
|
text: '外贸'
|
||||||
|
}],
|
||||||
|
bvmName: '', // 车型
|
||||||
|
bvmItem: {},
|
||||||
|
bvmList: [],
|
||||||
|
potName: '', // 港口
|
||||||
|
potItem: {},
|
||||||
|
potList: [],
|
||||||
|
status: '', // 贸易类型
|
||||||
|
statusRange: [{
|
||||||
|
value: 1,
|
||||||
|
text: '待发送'
|
||||||
|
}, {
|
||||||
|
value: 2,
|
||||||
|
text: '已发送'
|
||||||
|
}, {
|
||||||
|
value: 3,
|
||||||
|
text: '待作业'
|
||||||
|
}, {
|
||||||
|
value: 4,
|
||||||
|
text: '作业中'
|
||||||
|
}, {
|
||||||
|
value: 5,
|
||||||
|
text: '暂停'
|
||||||
|
}, {
|
||||||
|
value: 6,
|
||||||
|
text: '已完成'
|
||||||
|
}],
|
||||||
|
|
||||||
value: '',
|
value: '',
|
||||||
itemList: [],
|
itemList: [],
|
||||||
range: [1],
|
range: [1],
|
||||||
|
@ -309,6 +376,56 @@
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.id = this.$route.query.id;
|
this.id = this.$route.query.id;
|
||||||
this.loadSumOrder() // 总指令:分页查询
|
this.loadSumOrder() // 总指令:分页查询
|
||||||
|
setTimeout(() => {
|
||||||
|
this.menuList = [{
|
||||||
|
'title': '计划状态',
|
||||||
|
'type': 'custom',
|
||||||
|
'key': 'custom1',
|
||||||
|
'isMutiple': false, //多选
|
||||||
|
'detailList': [{
|
||||||
|
title: '待发送',
|
||||||
|
value: "1",
|
||||||
|
isSelected: true
|
||||||
|
}, {
|
||||||
|
title: '已发送',
|
||||||
|
value: "2",
|
||||||
|
}, {
|
||||||
|
title: '待作业',
|
||||||
|
value: "3",
|
||||||
|
}, {
|
||||||
|
title: '作业中',
|
||||||
|
value: "4",
|
||||||
|
}, {
|
||||||
|
title: '暂停',
|
||||||
|
value: "5",
|
||||||
|
}, {
|
||||||
|
title: '已完成',
|
||||||
|
value: "6",
|
||||||
|
}],
|
||||||
|
}, {
|
||||||
|
'title': '按车型',
|
||||||
|
'type': 'custom',
|
||||||
|
'key': 'custom2',
|
||||||
|
'isMutiple': true, //多选
|
||||||
|
'detailList': [{
|
||||||
|
title: '车型1',
|
||||||
|
value: "1",
|
||||||
|
}, {
|
||||||
|
title: '车型2',
|
||||||
|
value: "2",
|
||||||
|
}, {
|
||||||
|
title: '车型3',
|
||||||
|
value: "3",
|
||||||
|
}, {
|
||||||
|
title: '车型4',
|
||||||
|
value: "4",
|
||||||
|
}],
|
||||||
|
}]
|
||||||
|
this.defaultValue = {
|
||||||
|
custom1: ['1'],
|
||||||
|
custom5: 1,
|
||||||
|
};
|
||||||
|
}, 2000)
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
HeadView,
|
HeadView,
|
||||||
|
@ -319,6 +436,19 @@
|
||||||
'majax',
|
'majax',
|
||||||
'najax'
|
'najax'
|
||||||
]),
|
]),
|
||||||
|
onSearch() {
|
||||||
|
console.log('搜索');
|
||||||
|
console.log(this.potName);
|
||||||
|
},
|
||||||
|
// 点击筛选
|
||||||
|
screen() {
|
||||||
|
this.$refs.condition.visibleDrawer = true;
|
||||||
|
},
|
||||||
|
resultConditon(obj) {
|
||||||
|
this.$refs.condition.visibleDrawer = false;
|
||||||
|
this.hasChoose = obj.hasChoose;
|
||||||
|
console.log(obj);
|
||||||
|
},
|
||||||
loadSumOrder() {
|
loadSumOrder() {
|
||||||
let data = {}
|
let data = {}
|
||||||
data.bvmId = this.id
|
data.bvmId = this.id
|
||||||
|
@ -327,7 +457,7 @@
|
||||||
params: data,
|
params: data,
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.itemList = res.data.records
|
// this.itemList = res.data.records
|
||||||
})
|
})
|
||||||
// 模拟
|
// 模拟
|
||||||
this.itemList = [{ //已发送
|
this.itemList = [{ //已发送
|
||||||
|
@ -355,12 +485,13 @@
|
||||||
loadOtherOrder() {
|
loadOtherOrder() {
|
||||||
let data = {}
|
let data = {}
|
||||||
data.bvmId = this.id
|
data.bvmId = this.id
|
||||||
|
data.sendStatus = this.active // 未发生0已发送1
|
||||||
this.majax({
|
this.majax({
|
||||||
url: this.$local + "/api/shipInstructions/pageCommandForBranch",
|
url: this.$local + "/api/shipInstructions/pageCommandForBranch",
|
||||||
params: data,
|
params: data,
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.itemList = res.data.records
|
// this.itemList = res.data.records
|
||||||
})
|
})
|
||||||
// 模拟分指令
|
// 模拟分指令
|
||||||
this.itemList = [{ //已发送
|
this.itemList = [{ //已发送
|
||||||
|
@ -389,29 +520,35 @@
|
||||||
status: '暂停'
|
status: '暂停'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
console.log(2);
|
||||||
|
console.log(this.itemList);
|
||||||
},
|
},
|
||||||
tabChange(tag) {
|
tabChange(tag) {
|
||||||
this.active = tag
|
this.active = tag
|
||||||
if (this.active == 1) {
|
if (this.active == 0) {
|
||||||
console.log(1);
|
this.loadOtherOrder()
|
||||||
|
console.log(0);
|
||||||
} else {
|
} else {
|
||||||
console.log(2);
|
this.loadOtherOrder()
|
||||||
|
console.log(1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
change() {},
|
change(e) {
|
||||||
|
console.log(e);
|
||||||
|
console.log(this.harbour);
|
||||||
|
},
|
||||||
radioChange: function(evt) {
|
radioChange: function(evt) {
|
||||||
for (let i = 0; i < this.items.length; i++) {
|
for (let i = 0; i < this.items.length; i++) {
|
||||||
if (this.items[i].value === evt.detail.value) {
|
if (this.items[i].value === evt.detail.value) {
|
||||||
this.current = i;
|
this.current = i;
|
||||||
switch(this.current) {
|
switch (this.current) {
|
||||||
case 1:
|
case 0:
|
||||||
this.loadSumOrder()
|
this.loadSumOrder()
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 1:
|
||||||
this.loadOtherOrder()
|
this.loadOtherOrder()
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -442,22 +579,142 @@
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
})
|
})
|
||||||
|
console.log('重新发送');
|
||||||
},
|
},
|
||||||
// 暂停指令
|
// 暂停指令
|
||||||
onPause() {
|
onPause(tag) {
|
||||||
|
if (tag == '暂停') {
|
||||||
|
let data = {}
|
||||||
|
data.lwpId = '111'
|
||||||
|
this.majax({
|
||||||
|
url: this.$local + "/api/shipInstructions/commandPause",
|
||||||
|
params: data,
|
||||||
|
method: 'GET'
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
})
|
||||||
|
console.log('暂停');
|
||||||
|
} else if (tag == '重新发送') {
|
||||||
|
this.onReissued()
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
// 提单号
|
||||||
|
mnfBlInput(e) {
|
||||||
|
clearTimeout(timers)
|
||||||
|
timers = setTimeout(() => {
|
||||||
|
this.getMnfBl(e)
|
||||||
|
}, 500)
|
||||||
|
},
|
||||||
|
mnfBlSelect(e) {
|
||||||
|
this.shipItem = e
|
||||||
|
},
|
||||||
|
// 获取提单号
|
||||||
|
getMnfBl(keyWords) {
|
||||||
let data = {}
|
let data = {}
|
||||||
data.lwpId = '111'
|
data.ieType = 'I' // I进口 E出口 暂无法区分
|
||||||
|
data.key = keyWords
|
||||||
|
data.pamId = this.id
|
||||||
this.majax({
|
this.majax({
|
||||||
url: this.$local + "/api/shipInstructions/commandPause",
|
url: this.$local + "/api/shipInstructions/queryByKey",
|
||||||
params: data,
|
params: data,
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res);
|
this.mnfBlList = res.data
|
||||||
})
|
})
|
||||||
|
// 模拟
|
||||||
|
this.mnfBlList = [{
|
||||||
|
id: 1123,
|
||||||
|
mnfBl: '测试提单号'
|
||||||
|
}]
|
||||||
},
|
},
|
||||||
toDetails() {
|
// 品牌
|
||||||
|
brandInput(e) {
|
||||||
|
clearTimeout(timers)
|
||||||
|
timers = setTimeout(() => {
|
||||||
|
this.getBrand(e)
|
||||||
|
}, 500)
|
||||||
|
},
|
||||||
|
brandSelect(e) {
|
||||||
|
this.brandItem = e
|
||||||
|
this.brdId = e.brdId
|
||||||
|
},
|
||||||
|
// 获取品牌
|
||||||
|
getBrand(keyWords) {
|
||||||
|
let data = {}
|
||||||
|
data.brdName = keyWords
|
||||||
|
this.majax({
|
||||||
|
url: this.$local + "/api/miniapp/queryBrand",
|
||||||
|
params: data,
|
||||||
|
method: 'GET'
|
||||||
|
}).then(res => {
|
||||||
|
this.brandList = res.data
|
||||||
|
})
|
||||||
|
// 模拟
|
||||||
|
this.brandList = [{
|
||||||
|
brdId: 1123,
|
||||||
|
brdName: '测试品牌'
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
// 港口
|
||||||
|
potInput(e) {
|
||||||
|
clearTimeout(timers)
|
||||||
|
timers = setTimeout(() => {
|
||||||
|
this.getPot(e)
|
||||||
|
}, 500)
|
||||||
|
},
|
||||||
|
potSelect(e) {
|
||||||
|
this.potItem = e
|
||||||
|
this.potId = e.potId
|
||||||
|
},
|
||||||
|
// 获取港口
|
||||||
|
getPot(keyWords) {
|
||||||
|
let data = {}
|
||||||
|
data.potCnname = keyWords
|
||||||
|
this.majax({
|
||||||
|
url: this.$local + "/api/miniapp/port",
|
||||||
|
params: data,
|
||||||
|
method: 'GET'
|
||||||
|
}).then(res => {
|
||||||
|
this.potList = res.data
|
||||||
|
})
|
||||||
|
// 模拟
|
||||||
|
this.potList = [{
|
||||||
|
potId: 1123,
|
||||||
|
potName: '测试港口'
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
// 车型
|
||||||
|
bvmInput(e) {
|
||||||
|
clearTimeout(timers)
|
||||||
|
timers = setTimeout(() => {
|
||||||
|
this.getBvm(e)
|
||||||
|
}, 500)
|
||||||
|
},
|
||||||
|
bvmSelect(e) {
|
||||||
|
this.bvmItem = e
|
||||||
|
},
|
||||||
|
// 获取车型
|
||||||
|
getBvm(keyWords) {
|
||||||
|
let data = {}
|
||||||
|
data.key = keyWords
|
||||||
|
this.majax({
|
||||||
|
url: this.$local + "/api/miniapp/port",
|
||||||
|
params: data,
|
||||||
|
method: 'GET'
|
||||||
|
}).then(res => {
|
||||||
|
this.bvmList = res.data
|
||||||
|
})
|
||||||
|
// 模拟
|
||||||
|
this.bvmList = [{
|
||||||
|
bvmId: 1123,
|
||||||
|
bvmName: '测试车型'
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
toDetails(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/index/instructDetails'
|
url: '/pages/index/instructDetails?id=' + id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -477,14 +734,23 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.select {
|
.select {
|
||||||
width: 100px;
|
width: 150px;
|
||||||
margin-left: 15px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
width: 200px;
|
width: 150px;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
line-height: 35px;
|
line-height: 35px;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
width: 60px;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin: 0 20px 0 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -360,15 +360,39 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
mapActions
|
||||||
|
} from 'vuex'
|
||||||
import HeadInfo from '@/components/head-info/head-info';
|
import HeadInfo from '@/components/head-info/head-info';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {
|
||||||
|
id:0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
HeadInfo
|
HeadInfo
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.id = this.$route.query.id;
|
||||||
|
this.loadList() // 总指令:分页查询
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions([
|
||||||
|
'majax',
|
||||||
|
'najax'
|
||||||
|
]),
|
||||||
|
loadList() {
|
||||||
|
let data = {}
|
||||||
|
data.spsId = this.id
|
||||||
|
this.majax({
|
||||||
|
url: this.$local + "/api/shipInstructions/listDetail",
|
||||||
|
params: data,
|
||||||
|
method: 'GET'
|
||||||
|
}).then(res => {
|
||||||
|
// this.itemList = res.data.records
|
||||||
|
})
|
||||||
|
},
|
||||||
open() {
|
open() {
|
||||||
this.$refs.popup.open('center')
|
this.$refs.popup.open('center')
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue