From 8be13768ab198fd92ecccb5344bc52757b7de5fb Mon Sep 17 00:00:00 2001 From: aihe <961836564@qq.com> Date: Tue, 16 Jul 2024 21:25:55 +0800 Subject: [PATCH] uu --- common/api/order.js | 5 +- common/api/url.js | 6 +- common/api/user.js | 10 + common/util.js | 12 ++ components/tpx-scan-input/tpx-scan-input.vue | 36 +++- .../tpx-scroll-view/tpx-scroll-view.vue | 9 +- pages/post/post.vue | 6 +- pages/tabBar/search/search.vue | 45 ++-- pages/user/exclusiveCourier.vue | 202 ++++++++---------- 9 files changed, 181 insertions(+), 150 deletions(-) diff --git a/common/api/order.js b/common/api/order.js index d698a5d..c8d03b6 100644 --- a/common/api/order.js +++ b/common/api/order.js @@ -69,10 +69,11 @@ export const getCaculteSendSite = (data = {})=> { } // 仓库列表 -export const getListBindSalesmen = (data = {})=> { - return coreRequest(url.getListBindSalesmen, data, {}, "GET") +export const getLisWarehouse = (data = {})=> { + return coreRequest(url.getLisWarehouse, data, {}, "GET") } + // 计算运费 export const calcWaybillFee = (data = {})=> { return coreRequest(url.calcWaybillFee, data, {}) diff --git a/common/api/url.js b/common/api/url.js index 9bf2ebc..a70ba27 100644 --- a/common/api/url.js +++ b/common/api/url.js @@ -30,11 +30,13 @@ export default { getMonthpayAccountList: `/oms2c/emisMonthpayAccount/listSimple`, // 月结账号列表 -- DONE getCaculteDestSite: `/oms2c/emisDestination/getDestSite`, // 自动计算目的地 -- DONE getCaculteSendSite: `/oms2c/emisDestination/getSendSite`, // 自动计算寄件网点 -- DONE - getListBindSalesmen: `/oms2c/emisWaybill/listBindSalesmen`, // 仓库列表 -- DONE + getLisWarehouse: `/oms2c/emisWaybill/listWmsWarehouse`, // 仓库列表 -- DONE + getListBindSalesmen: `/oms2c/emisWaybill/listBindSalesmen`, // 绑定业务员列表 -- DONE + bindSalesmen: `/oms2c/emisWaybill/bindSalesmen`, // 绑定业务员 -- DONE getSendSiteList: `/oms2c/emisSite/listSimple`, // 出发地-网点列表 calcWaybillFee: `/oms2c/emisWaybill/calcWaybillFee`, // 计算运费 warehouseInList: `/oms2c/emisWarehouseIn/listSimple`, // 下单-进仓单列表 - getOrderList: `/oms2c/emisWaybill/listSimple`, // 订单列表 + getOrderList: `/oms2c/emisWaybill/listSimple`, // 订单列表 -- DONE getOrderDetail: `/oms2c/emisWaybill/getWaybillDetail`, // 订单详情 scanRecord: `/oms2c/emisTmsScanRecord/scan`, // 扫描- 揽收 getRealGetWaybillPrintData: `/oms2c/emisWaybill/realGetPrintList`, // 运单 打印数据 diff --git a/common/api/user.js b/common/api/user.js index 4007c50..ee927e1 100644 --- a/common/api/user.js +++ b/common/api/user.js @@ -17,3 +17,13 @@ export const getInfoByApp = (data = {}, option = {})=> { return coreRequest(url.getInfoByApp, data, option, 'GET') } + +// 绑定业务员列表 +export const getListBindSalesmen = (data = {})=> { + return coreRequest(url.getListBindSalesmen, data, {}, "GET") +} + +// 绑定业务员 +export const bindSalesmen = (data = {})=> { + return coreRequest(url.bindSalesmen, data, {}) +} \ No newline at end of file diff --git a/common/util.js b/common/util.js index 3397256..9c014e1 100644 --- a/common/util.js +++ b/common/util.js @@ -179,6 +179,17 @@ const textDecoder = (input)=> { return decodeURIComponent(escape(String.fromCharCode(...[input]))); } +const getQueryObject = (url)=> { + var query = url.split('?')[1]; + var obj = {}; + + query = query.split('&'); + query.forEach(query => { + var item = query.split('='); + obj[item[0]] = item[1]; // 当然如果有中文/Unicode字符可以在这里用URIencode方法转码一下 + }); + return obj; +} export { getAddressDetail, @@ -192,4 +203,5 @@ export { throttle, textEncoder, textDecoder, + getQueryObject, } diff --git a/components/tpx-scan-input/tpx-scan-input.vue b/components/tpx-scan-input/tpx-scan-input.vue index e737f1a..f3ba111 100644 --- a/components/tpx-scan-input/tpx-scan-input.vue +++ b/components/tpx-scan-input/tpx-scan-input.vue @@ -1,16 +1,22 @@ @@ -50,6 +56,11 @@ return '' } }, + showConfirm:{ + default () { + return false + } + }, }, data() { }, @@ -77,6 +88,9 @@ handleScanChange(val){ this.$emit('scanChange', val) this.handleChange(val) + }, + handleConfirm(){ + this.$emit('confirmClick') } } } diff --git a/components/tpx-scroll-view/tpx-scroll-view.vue b/components/tpx-scroll-view/tpx-scroll-view.vue index 2fb2b18..d4dc5ee 100644 --- a/components/tpx-scroll-view/tpx-scroll-view.vue +++ b/components/tpx-scroll-view/tpx-scroll-view.vue @@ -26,7 +26,9 @@ watch: { searchParam: { handler: function(cval, oval) { - this.getDataList(true) + if(this.autoReload) { + this.getDataList(true) + } }, deep: true } @@ -41,6 +43,11 @@ } }, props: { + autoReload: { + default () { + return true + } + }, searchParam: { default () { return {} diff --git a/pages/post/post.vue b/pages/post/post.vue index 4bc539d..715aeef 100644 --- a/pages/post/post.vue +++ b/pages/post/post.vue @@ -45,12 +45,12 @@ - + @@ -229,7 +229,7 @@ }, methods: { getTransLineList: apiService.getTransLineList, - getListBindSalesmen: apiService.getListBindSalesmen, + getLisWarehouse: apiService.getLisWarehouse, getMonthpayAccountList: apiService.getMonthpayAccountList, getDefaultData() { // data的默认数据 return { diff --git a/pages/tabBar/search/search.vue b/pages/tabBar/search/search.vue index c85cc5b..dfc9e88 100644 --- a/pages/tabBar/search/search.vue +++ b/pages/tabBar/search/search.vue @@ -5,15 +5,15 @@ - + - ({{curOrdTab.item.val}}) @@ -22,7 +22,7 @@ - + {{hasExtSchParam?'已':''}}筛选 @@ -147,28 +147,42 @@ }, searchParam: { keyword: '', - ordStatus: dicData.emis_order_status?.[0]?.val + _date: [], + params: { + waybillStatType: dicData.emis_order_status?.[0]?.val, + } }, queryOption: { }, - resData: { - list: [] - } + resData: { list: [] } } }, onShareAppMessage() { return { } }, + onShow(){ + this.triggerListReload() + this.initData() + }, onLoad(option) { this.queryOption = option - this.initData(); }, onUnload() { }, methods: { - getListFun: apiService.getOrderList, + transSearchPm(param){ + let cpParam = JSON.parse(JSON.stringify(param)) + cpParam.params.beginDate = cpParam?._date?.[0] + cpParam.params.endDate = cpParam?._date?.[1] + return cpParam + }, + async getListFun(param){ + let cpParam = this.transSearchPm(param) + let res = await apiService.getOrderList(cpParam) + return res + }, initData(){ }, @@ -191,9 +205,14 @@ break; } }, - handleSearchParamChange() { - - } + handleSearch(){ + setTimeout(()=> { + this.triggerListReload() + }, 300) + }, + triggerListReload(){ + this?.$refs?.listRef?.getDataList?.(true) // 重置到第一页数据 + }, } } diff --git a/pages/user/exclusiveCourier.vue b/pages/user/exclusiveCourier.vue index 22a8801..432fb56 100644 --- a/pages/user/exclusiveCourier.vue +++ b/pages/user/exclusiveCourier.vue @@ -1,92 +1,85 @@