dev2
wangchen 2023-07-24 16:14:37 +08:00
parent 0feb180d6f
commit afe74abe23
2 changed files with 340 additions and 50 deletions

View File

@ -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: "",
id: "", // id
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 // 01
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,34 +520,40 @@
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:
this.loadSumOrder()
break;
case 2:
this.loadOtherOrder()
break;
default:
}
switch (this.current) {
case 0:
this.loadSumOrder()
break;
case 1:
this.loadOtherOrder()
break;
default:
}
break;
}
}
},
isActive(e) {
this.itemActive = e
@ -442,22 +579,142 @@
}).then(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 = {}
data.lwpId = '111'
data.ieType = 'I' // I E
data.key = keyWords
data.pamId = this.id
this.majax({
url: this.$local + "/api/shipInstructions/commandPause",
url: this.$local + "/api/shipInstructions/queryByKey",
params: data,
method: 'GET'
}).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({
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;
}
}

View File

@ -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')
},