This commit is contained in:
aihe 2024-04-28 15:17:46 +08:00
parent 53d16166e0
commit f6c146396f
2 changed files with 23 additions and 16 deletions

View File

@ -73,11 +73,12 @@ export const getOrderModels = () => {
"dispFdDate": undefined, "dispFdDate": undefined,
"takePieceEmployeeCode": undefined, // 收派员 "takePieceEmployeeCode": undefined, // 收派员
"sendSiteCode": undefined, "sendSiteCode": undefined,
"destinationCode": undefined, "destinationCode": undefined, // 目的地 code
"destinationProvince": undefined, "destinationProvince": undefined,
"destinationCity": undefined, "destinationCity": undefined,
"destinationCounty": undefined, "destinationCounty": undefined,
"dispatchUnderlingSiteCode": undefined, "dispatchUnderlingSiteCode": undefined, // 目的网点 - code
"dispatchUnderlingSite": undefined, // 目的网点 - 名称
"destinationCenterCode": undefined, "destinationCenterCode": undefined,
"marketManCode": undefined, "marketManCode": undefined,
"payee": undefined, // 回款联系人 "payee": undefined, // 回款联系人

View File

@ -128,15 +128,15 @@
</template> </template>
<view v-if="submitParam.transLine" class="yunf-input-item"> <view v-if="submitParam.transLine" class="yunf-input-item">
<tpx-select v-model:value="submitParam.destinationCode" v-model:resObject="destPostRes" :getListFun="getDestPositionList" :transKeyVal="{valKey: 'prodCode',titleKey: 'prodName'}" :isWhite="true" :customInput="true" <tpx-select v-model:value="submitParam.destinationCode" v-model:resObject="destPostRes" :getListFun="getDestPositionList" :transKeyVal="{valKey: 'destCode',titleKey: 'destName'}" :isWhite="true" :customInput="true"
:searchParam="destPostParam" :searchParam="destPostParam" @onChange="handleDestPostChange"
> >
<tpx-text-item label="目的地" :value="submitParam.destinationCode" :list="destPostRes.list"></tpx-text-item> <tpx-text-item label="目的地" :value="submitParam.destinationCode" :list="destPostRes.list"></tpx-text-item>
</tpx-select> </tpx-select>
</view> </view>
<view v-if="submitParam.destinationCode" class="yunf-input-item"> <view v-if="submitParam.destinationCode" class="yunf-input-item">
<tpx-text-item label="目的网点" :value="submitParam.payeeName"></tpx-text-item> <tpx-text-item label="目的网点" :value="submitParam.dispatchUnderlingSite"></tpx-text-item>
</view> </view>
<view class="yunf-input-item"> <view class="yunf-input-item">
@ -263,8 +263,9 @@
productSearchParam() { productSearchParam() {
return { transLineCode: this.submitParam.transLine } return { transLineCode: this.submitParam.transLine }
}, },
destPostParam(){ destPostParam(){
return { lineCode: this.submitParam.transLine, ...this.submitParam.reciever } const { country } = this.submitParam.reciever
return { lineCode: this.submitParam.transLine, countryCode: country }
}, },
dicData() { dicData() {
return this.$store.getters.dicData return this.$store.getters.dicData
@ -309,17 +310,9 @@
getRSDStaffList: apiService.getRSDStaffList, getRSDStaffList: apiService.getRSDStaffList,
getMonthpayAccountList: apiService.getMonthpayAccountList, getMonthpayAccountList: apiService.getMonthpayAccountList,
getDestPositionList: apiService.getDestPositionList, getDestPositionList: apiService.getDestPositionList,
getCaculteDestSite: apiService.getCaculteDestSite,
getWarehouseInList: apiService.warehouseInList, getWarehouseInList: apiService.warehouseInList,
async initData() { async initData() {
// uni.showLoading({
// title: '加载中'
// });
this.showLoading()
this.hideLoading()
}, },
initEvent() { initEvent() {
@ -334,14 +327,27 @@
this.submitParam.payee = item.payee this.submitParam.payee = item.payee
this.submitParam.salesmen = item.salesmen this.submitParam.salesmen = item.salesmen
this.submitParam.salesmenName = item.salesmenName this.submitParam.salesmenName = item.salesmenName
this.submitParam.payeeName = item.payeeName this.submitParam.payee = item.payeeName
}, },
handleWayChange(val) { handleWayChange(val) {
const item = this.wayRes.list.filter(t=> t.val == val)[0] const item = this.wayRes.list.filter(t=> t.val == val)[0]
this.submitParam.meterRate = item.meterRate this.submitParam.meterRate = item.meterRate
this.updateDltDestSite({ lineCode: val })
},
handleDestPostChange(val) {
const item = this.destPostRes.list.filter(t=> t.val == val)[0]
this.submitParam.dispatchUnderlingSiteCode = item.siteCode;
this.submitParam.dispatchUnderlingSite = item.siteName;
}, },
handleDialogClick(curModal){ handleDialogClick(curModal){
curModal.show = true curModal.show = true
},
async updateDltDestSite({ lineCode }) {
const { country, province, city, county, address } = this.submitParam.reciever
let res = await apiService.getCaculteDestSite({ lineCode, country, province, city, county, address })
// 更新路线推荐的默认目的地
this.submitParam.destinationCode = res.data.destCode
this.handleDestPostChange(this.submitParam.destinationCode)
} }
} }
} }