Merge branch 'dev2' of http://61.184.202.72:3000/wsnet/PDA-App into dev2
commit
e0e2393fed
|
@ -5,35 +5,44 @@
|
|||
<view class="content">
|
||||
<view class="form">
|
||||
<view class="input">
|
||||
<uni-easyinput class="input" suffixIcon="search" v-model="value1" placeholder="船名/航次"
|
||||
@iconClick="iconClick">
|
||||
<superwei-combox class="input" :candidates="mnfBlList" :isJSON="true" keyName="mnfBl"
|
||||
placeholder="提单号" v-model="mnfBl" @input="mnfBlInput" @select="mnfBlSelect"></superwei-combox>
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
<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>
|
||||
</view>
|
||||
<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>
|
||||
</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">
|
||||
<uni-data-select v-model="value" :localdata="range" @change="change" placeholder="品牌">
|
||||
</uni-data-select>
|
||||
<superwei-combox class="input" :candidates="potList" :isJSON="true" keyName="potName"
|
||||
placeholder="港口" v-model="potName" @input="potInput" @select="potSelect"></superwei-combox>
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
<view class="select" v-show="current!=0">
|
||||
<uni-data-select v-model="value" :localdata="range" @change="change" placeholder="车型">
|
||||
</uni-data-select>
|
||||
</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 v-model="status" :localdata="statusRange" @change="change('status')"
|
||||
placeholder="计划状态">
|
||||
</uni-data-select>
|
||||
</view>
|
||||
<button class="btn" @click="screen" v-show='current==0'>筛选</button>
|
||||
<button class="btn" @click="onSearch">搜索</button>
|
||||
</view>
|
||||
<fjj-condition ref='condition' @touchmove.stop color="#4D7BFE" :list="menuList" :defaultValue="defaultValue"
|
||||
@result="resultConditon" />
|
||||
<view class="uni-list">
|
||||
<radio-group class="group" @change="radioChange">
|
||||
<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">
|
||||
型号:特斯拉plus
|
||||
</view>
|
||||
<view class="cell blue" @click="toDetails">
|
||||
<view class="cell blue" @click="toDetails(item.xq)">
|
||||
详情
|
||||
</view>
|
||||
</view>
|
||||
|
@ -126,8 +135,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<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==2?'active':''" type="default" @click="tabChange(2)">已发送</view>
|
||||
<view class="tab" :class="active==0?'active':''" type="default" @click="tabChange(0)">未发送</view>
|
||||
<view class="tab" :class="active==1?'active':''" type="default" @click="tabChange(1)">已发送</view>
|
||||
</view>
|
||||
<view class="itemList" v-show="current==1">
|
||||
<view class="exp" v-for="(item,index) in itemList" :key="item.index">
|
||||
|
@ -168,8 +177,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="fs blue">
|
||||
<text v-show="active==1" @click="onSend">发送</text>
|
||||
<text v-show="active==2" @click="onPause">{{item.status}}</text>
|
||||
<text v-show="active==0" @click="onSend">发送</text>
|
||||
<text v-show="active==1" @click="onPause(item.status)">{{item.status}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="details">
|
||||
|
@ -195,7 +204,7 @@
|
|||
<view class="cell">
|
||||
型号:特斯拉plus
|
||||
</view>
|
||||
<view class="cell blue" @click="toDetails">
|
||||
<view class="cell blue" @click="toDetails(item.xq)">
|
||||
详情
|
||||
</view>
|
||||
</view>
|
||||
|
@ -267,11 +276,69 @@
|
|||
} from 'vuex'
|
||||
import HeadView from '@/components/head-view/head-view.vue';
|
||||
import HeadInfo from '@/components/head-info/head-info';
|
||||
let timers = null;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
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: '',
|
||||
itemList: [],
|
||||
range: [1],
|
||||
|
@ -309,6 +376,56 @@
|
|||
onLoad() {
|
||||
this.id = this.$route.query.id;
|
||||
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: {
|
||||
HeadView,
|
||||
|
@ -319,6 +436,19 @@
|
|||
'majax',
|
||||
'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() {
|
||||
let data = {}
|
||||
data.bvmId = this.id
|
||||
|
@ -327,7 +457,7 @@
|
|||
params: data,
|
||||
method: 'GET'
|
||||
}).then(res => {
|
||||
this.itemList = res.data.records
|
||||
// this.itemList = res.data.records
|
||||
})
|
||||
// 模拟
|
||||
this.itemList = [{ //已发送
|
||||
|
@ -355,12 +485,13 @@
|
|||
loadOtherOrder() {
|
||||
let data = {}
|
||||
data.bvmId = this.id
|
||||
data.sendStatus = this.active // 未发生0已发送1
|
||||
this.majax({
|
||||
url: this.$local + "/api/shipInstructions/pageCommandForBranch",
|
||||
params: data,
|
||||
method: 'GET'
|
||||
}).then(res => {
|
||||
this.itemList = res.data.records
|
||||
// this.itemList = res.data.records
|
||||
})
|
||||
// 模拟分指令
|
||||
this.itemList = [{ //已发送
|
||||
|
@ -389,26 +520,32 @@
|
|||
status: '暂停'
|
||||
}
|
||||
]
|
||||
console.log(2);
|
||||
console.log(this.itemList);
|
||||
},
|
||||
tabChange(tag) {
|
||||
this.active = tag
|
||||
if (this.active == 1) {
|
||||
console.log(1);
|
||||
if (this.active == 0) {
|
||||
this.loadOtherOrder()
|
||||
console.log(0);
|
||||
} else {
|
||||
console.log(2);
|
||||
|
||||
this.loadOtherOrder()
|
||||
console.log(1);
|
||||
}
|
||||
},
|
||||
change() {},
|
||||
change(e) {
|
||||
console.log(e);
|
||||
console.log(this.harbour);
|
||||
},
|
||||
radioChange: function(evt) {
|
||||
for (let i = 0; i < this.items.length; i++) {
|
||||
if (this.items[i].value === evt.detail.value) {
|
||||
this.current = i;
|
||||
switch (this.current) {
|
||||
case 1:
|
||||
case 0:
|
||||
this.loadSumOrder()
|
||||
break;
|
||||
case 2:
|
||||
case 1:
|
||||
this.loadOtherOrder()
|
||||
break;
|
||||
default:
|
||||
|
@ -442,9 +579,11 @@
|
|||
}).then(res => {
|
||||
console.log(res);
|
||||
})
|
||||
console.log('重新发送');
|
||||
},
|
||||
// 暂停指令
|
||||
onPause() {
|
||||
onPause(tag) {
|
||||
if (tag == '暂停') {
|
||||
let data = {}
|
||||
data.lwpId = '111'
|
||||
this.majax({
|
||||
|
@ -454,10 +593,128 @@
|
|||
}).then(res => {
|
||||
console.log(res);
|
||||
})
|
||||
console.log('暂停');
|
||||
} else if (tag == '重新发送') {
|
||||
this.onReissued()
|
||||
}
|
||||
|
||||
},
|
||||
toDetails() {
|
||||
|
||||
// 提单号
|
||||
mnfBlInput(e) {
|
||||
clearTimeout(timers)
|
||||
timers = setTimeout(() => {
|
||||
this.getMnfBl(e)
|
||||
}, 500)
|
||||
},
|
||||
mnfBlSelect(e) {
|
||||
this.shipItem = e
|
||||
},
|
||||
// 获取提单号
|
||||
getMnfBl(keyWords) {
|
||||
let data = {}
|
||||
data.ieType = 'I' // I进口 E出口 暂无法区分
|
||||
data.key = keyWords
|
||||
data.pamId = this.id
|
||||
this.majax({
|
||||
url: this.$local + "/api/shipInstructions/queryByKey",
|
||||
params: data,
|
||||
method: 'GET'
|
||||
}).then(res => {
|
||||
this.mnfBlList = res.data
|
||||
})
|
||||
// 模拟
|
||||
this.mnfBlList = [{
|
||||
id: 1123,
|
||||
mnfBl: '测试提单号'
|
||||
}]
|
||||
},
|
||||
// 品牌
|
||||
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({
|
||||
url: '/pages/index/instructDetails'
|
||||
url: '/pages/index/instructDetails?id=' + id
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -477,14 +734,23 @@
|
|||
display: flex;
|
||||
|
||||
.select {
|
||||
width: 100px;
|
||||
margin-left: 15px;
|
||||
width: 150px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 200px;
|
||||
width: 150px;
|
||||
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>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapActions
|
||||
} from 'vuex'
|
||||
import HeadInfo from '@/components/head-info/head-info';
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
return {
|
||||
id:0
|
||||
}
|
||||
},
|
||||
components: {
|
||||
HeadInfo
|
||||
},
|
||||
onLoad() {
|
||||
this.id = this.$route.query.id;
|
||||
this.loadList() // 总指令:分页查询
|
||||
},
|
||||
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() {
|
||||
this.$refs.popup.open('center')
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue