diff --git a/common/api/order.js b/common/api/order.js index 9be5791..d698a5d 100644 --- a/common/api/order.js +++ b/common/api/order.js @@ -63,6 +63,16 @@ export const getCaculteDestSite = (data = {})=> { return coreRequest(url.getCaculteDestSite, data, {}, "GET") } +// 自动计算-寄件网点 +export const getCaculteSendSite = (data = {})=> { + return coreRequest(url.getCaculteSendSite, data, {}, "GET") +} + +// 仓库列表 +export const getListBindSalesmen = (data = {})=> { + return coreRequest(url.getListBindSalesmen, data, {}, "GET") +} + // 计算运费 export const calcWaybillFee = (data = {})=> { return coreRequest(url.calcWaybillFee, data, {}) diff --git a/common/api/url.js b/common/api/url.js index bac0edd..9bf2ebc 100644 --- a/common/api/url.js +++ b/common/api/url.js @@ -29,6 +29,8 @@ export default { getHotGoodsList: `/oms2c/emisGoods/listHotGoods`, // 获取热门--货物列表 -- DONE getMonthpayAccountList: `/oms2c/emisMonthpayAccount/listSimple`, // 月结账号列表 -- DONE getCaculteDestSite: `/oms2c/emisDestination/getDestSite`, // 自动计算目的地 -- DONE + getCaculteSendSite: `/oms2c/emisDestination/getSendSite`, // 自动计算寄件网点 -- DONE + getListBindSalesmen: `/oms2c/emisWaybill/listBindSalesmen`, // 仓库列表 -- DONE getSendSiteList: `/oms2c/emisSite/listSimple`, // 出发地-网点列表 calcWaybillFee: `/oms2c/emisWaybill/calcWaybillFee`, // 计算运费 warehouseInList: `/oms2c/emisWarehouseIn/listSimple`, // 下单-进仓单列表 diff --git a/components/buns-post-edit-templates/bpe-choosetypelist-tmp.vue b/components/buns-post-edit-templates/bpe-choosetypelist-tmp.vue index b574531..6227921 100644 --- a/components/buns-post-edit-templates/bpe-choosetypelist-tmp.vue +++ b/components/buns-post-edit-templates/bpe-choosetypelist-tmp.vue @@ -37,8 +37,7 @@ calcFeeType: 1, billWeight: info.billWeight, totalVolume: info.totalVolume, - // sendSiteCode: info.sendSiteCode, - sendSiteCode: 122,// TODO + sendSiteCode: info.sendSiteCode, dispatchUnderlingSiteCode: info.dispatchUnderlingSiteCode, } return param diff --git a/pages/post/post.vue b/pages/post/post.vue index dade560..8aa3159 100644 --- a/pages/post/post.vue +++ b/pages/post/post.vue @@ -44,13 +44,13 @@ - - + @@ -195,6 +195,9 @@ waySearchParam() { return { country: this.submitParam.reciever.country, fromCountry: this.submitParam.sender.country } }, + wareSearchParam(){ + return { } + }, dicData() { return this.$store.getters.dicData }, @@ -208,8 +211,6 @@ }, onShareAppMessage() { return { - // title: '', - // path: 'TODO' } }, onLoad() { @@ -220,6 +221,8 @@ }, methods: { getTransLineList: apiService.getTransLineList, + getListBindSalesmen: apiService.getListBindSalesmen, + getMonthpayAccountList: apiService.getMonthpayAccountList, getDefaultData() { // data的默认数据 return { pageLoading: true, @@ -232,8 +235,8 @@ copyBillCode: '', // 复制的运单id }, wayRes: { list: [] }, - productRes: { list: [] }, yuejieRes: { list: [] }, + wareRes: { list: [] }, revtimeModal: { show: false, }, @@ -284,6 +287,7 @@ this.submitParam.productTypeName = submitParam.productTypeName const item = this.wayRes.list.filter(t=> t.val == val)[0] this.updateDltDestSite({ lineCode: val }) + this.updateDltSendSite({ lineCode: val }) }, async updateDltDestSite({ lineCode }) { const { country, province, city, county, address } = this.submitParam.reciever @@ -294,6 +298,15 @@ this.submitParam.destinationName = data.destName this.submitParam.dispatchUnderlingSiteCode = data.siteCode; this.submitParam.dispatchUnderlingSiteName = data.siteName; + + + }, + async updateDltSendSite({ lineCode }) { + const { country, province, city, county, address } = this.submitParam.reciever + let sendRes = await apiService.getCaculteSendSite({ lineCode, country, province, city, county, address }) + let data = sendRes.data || {} + this.submitParam.sendSiteCode = data.siteCode + this.submitParam.sendSiteName = data.siteName }, handleDialogClick(curModal){