uun
This commit is contained in:
parent
4f74e16c2b
commit
aba270864f
@ -81,7 +81,7 @@
|
||||
<u-line margin="20rpx 0 20rpx"></u-line>
|
||||
<view class="blcok-grey-sm">
|
||||
<view class="dt-item">
|
||||
<view>
|
||||
<view v-if="modelInfo.reciever">
|
||||
<text class="clr-sub pr-10">目的国家:</text>
|
||||
<text class="">{{ modelInfo.reciever.countryName }}</text>
|
||||
</view>
|
||||
|
||||
@ -119,12 +119,19 @@
|
||||
},
|
||||
chooseAddressEventBack({ data, queryOption }){
|
||||
const { tab } = queryOption
|
||||
let isChange = false
|
||||
let oldData = {}
|
||||
if(tab == 1) {
|
||||
oldData = JSON.parse(JSON.stringify(this.modelInfo.sender))
|
||||
this.modelInfo.sender = data
|
||||
}
|
||||
if(tab == 2) {
|
||||
oldData = JSON.parse(JSON.stringify(this.modelInfo.sender))
|
||||
this.modelInfo.reciever = data
|
||||
}
|
||||
if(oldData.id != data.id) {
|
||||
this.$emit("onChange", this.modelInfo)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
<view class="blcok-white">
|
||||
<!-- 地址选择 -->
|
||||
<bpe-addressinfo-tmp v-model:value="submitParam"></bpe-addressinfo-tmp>
|
||||
<bpe-addressinfo-tmp v-model:value="submitParam" @onChange="handleAddressChange"></bpe-addressinfo-tmp>
|
||||
</view>
|
||||
|
||||
<view class="com-section mt-30">路线信息</view>
|
||||
@ -82,13 +82,13 @@
|
||||
</tpx-select>
|
||||
</view>
|
||||
|
||||
<view class="yunf-input-item">
|
||||
<view v-show="submitParam.pickupMethod == 1" class="yunf-input-item">
|
||||
<tpx-select v-model:value="submitParam.operateEmployeeCode" v-model:resObject="caozuoRes" :getListFun="getOpStaffList" :transKeyVal="{valKey: 'empCode',titleKey: 'empName'}" placeholder="请选择操作员">
|
||||
<tpx-text-item label="操作员" :checkedList="caozuoRes.checkedList" ></tpx-text-item>
|
||||
</tpx-select>
|
||||
</view>
|
||||
|
||||
<view class="yunf-input-item">
|
||||
<view v-show="submitParam.pickupMethod == 2" class="yunf-input-item">
|
||||
<tpx-select v-model:value="submitParam.takePieceEmployeeCode" v-model:resObject="shoupaiRes" :getListFun="getRSDStaffList" :transKeyVal="{valKey: 'empCode',titleKey: 'empName'}" placeholder="请选择收派员">
|
||||
<tpx-text-item label="收派员" :checkedList="shoupaiRes.checkedList"></tpx-text-item>
|
||||
</tpx-select>
|
||||
@ -288,29 +288,7 @@
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageLoading: true,
|
||||
isEdit: false,
|
||||
queryOption: {
|
||||
billCode: '', // 运单id
|
||||
orderSn: '', // 订单id
|
||||
},
|
||||
kehuRes: { list: [], checkedList: [] },
|
||||
wayRes: { list: [], checkedList: [] },
|
||||
productRes: { list: [], checkedList: [] },
|
||||
caozuoRes: { list: [], checkedList: [] },
|
||||
shoupaiRes: { list: [], checkedList: [] },
|
||||
yuejieRes: { list: [], checkedList: [] },
|
||||
destPostRes: { list: [], checkedList: [] },
|
||||
wareRes: { list: [], checkedList: [] },
|
||||
goodChooseModal: {
|
||||
show: false,
|
||||
},
|
||||
submitParam: {
|
||||
...getOrderModels(),
|
||||
sendSiteCode: this.$store.getters.userInfo.ownerSiteCode,
|
||||
}
|
||||
}
|
||||
return this.getDefaultData()
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
@ -327,6 +305,31 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
getDefaultData() { // data的默认数据
|
||||
return {
|
||||
pageLoading: true,
|
||||
isEdit: false,
|
||||
queryOption: {
|
||||
billCode: '', // 运单id
|
||||
orderSn: '', // 订单id
|
||||
},
|
||||
kehuRes: { list: [], checkedList: [] },
|
||||
wayRes: { list: [], checkedList: [] },
|
||||
productRes: { list: [], checkedList: [] },
|
||||
caozuoRes: { list: [], checkedList: [] },
|
||||
shoupaiRes: { list: [], checkedList: [] },
|
||||
yuejieRes: { list: [], checkedList: [] },
|
||||
destPostRes: { list: [], checkedList: [] },
|
||||
wareRes: { list: [], checkedList: [] },
|
||||
goodChooseModal: {
|
||||
show: false,
|
||||
},
|
||||
submitParam: {
|
||||
...getOrderModels(),
|
||||
sendSiteCode: this.$store.getters.userInfo.ownerSiteCode,
|
||||
}
|
||||
}
|
||||
},
|
||||
getCustomerUserList: apiService.getCustomerUserList,
|
||||
getTransLineList: apiService.getTransLineList,
|
||||
getTransProductList: apiService.getTransProductList,
|
||||
@ -335,7 +338,7 @@
|
||||
getMonthpayAccountList: apiService.getMonthpayAccountList,
|
||||
getDestPositionList: apiService.getDestPositionList,
|
||||
getWarehouseInList: apiService.warehouseInList,
|
||||
async initData() {
|
||||
async initData() { // 初始化
|
||||
this.isEdit = Boolean(this.queryOption.billCode || this.queryOption.orderSn)
|
||||
if(this.isEdit) {
|
||||
let res = await apiService.getOrderDetail({...this.queryOption, _loading: true})
|
||||
@ -360,6 +363,14 @@
|
||||
const res = await apiService.createOrderNo()
|
||||
this.submitParam.billCode = res.data
|
||||
},
|
||||
handleAddressChange() { // 地址切换
|
||||
let { wayRes, submitParam } = this.getDefaultData()
|
||||
if(this.submitParam.reciever.country && this.submitParam.sender.country) {
|
||||
this.submitParam.transLine = submitParam.transLine
|
||||
this.wayRes.checkedList = wayRes.checkedList
|
||||
this.handleWayChange() // 调用线路切换,清空后续数据
|
||||
}
|
||||
},
|
||||
handleYueJieSelect(val) {
|
||||
const item = this.yuejieRes.list.filter(t=> t.val == val)[0]
|
||||
this.submitParam.payee = item.payee
|
||||
@ -367,7 +378,11 @@
|
||||
this.submitParam.salesmenName = item.salesmenName
|
||||
this.submitParam.payee = item.payeeName
|
||||
},
|
||||
handleWayChange(val) {
|
||||
handleWayChange(val) { // 线路切换
|
||||
let { productRes, submitParam } = this.getDefaultData()
|
||||
// 清空产品类型数据
|
||||
this.submitParam.productType = submitParam.productType
|
||||
this.productRes.checkedList = productRes.checkedList
|
||||
const item = this.wayRes.list.filter(t=> t.val == val)[0]
|
||||
this.updateDltDestSite({ lineCode: val })
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user