From 5aac8ab6ae563516d315dabdfd0dfa5bd719999e Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Wed, 20 Dec 2023 21:16:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AE=A2=E6=9C=8D=E5=8F=B8=E6=9C=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=87=AA=E5=8A=A8=E5=B8=A6=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/aftersales/aftersalesWorkOrder.js | 8 +- .../aftersales/aftersalesWorkOrderAdd.vue | 186 +++++++++--------- 2 files changed, 97 insertions(+), 97 deletions(-) diff --git a/src/api/aftersales/aftersalesWorkOrder.js b/src/api/aftersales/aftersalesWorkOrder.js index c51fe909..12fc2daa 100644 --- a/src/api/aftersales/aftersalesWorkOrder.js +++ b/src/api/aftersales/aftersalesWorkOrder.js @@ -334,11 +334,11 @@ export const $_modifyData = (data) => { } // 查询配送信息 -export const $_shippingInformation = (data) => { +export const $_shippingInformation = (params) => { return request({ - url: '/api/logpm-aftersales/aftersalesWorkOrder/deliveryList/shippingInformation', - method: 'post', - data + url: '/api/logpm-distribution/deliveryList/shippingInformation', + method: 'get', + params }) } diff --git a/src/views/aftersales/aftersalesWorkOrderAdd.vue b/src/views/aftersales/aftersalesWorkOrderAdd.vue index 416d291d..30f49d2a 100644 --- a/src/views/aftersales/aftersalesWorkOrderAdd.vue +++ b/src/views/aftersales/aftersalesWorkOrderAdd.vue @@ -152,24 +152,63 @@ v-model="Indexform.trainNumber" placeholder="请输入车次号(干线卸车环节)" clearable + @change="DeliveryTrainnumber" /> - - + + + + + - - - - - + + + + - - + + --> - - - - + + + + @@ -591,34 +591,21 @@ const FangAddList = ref([ ]); // 提货责任方 const responsible = ref([ - // { - // value: '1', - // label: '工厂', - // }, - // { - // value: '2', - // label: '外包搬运', - // }, - // { - // value: '3', - // label: '物流', - // }, -]); - -const DeliveryDriver = ref([ - { - value: '0', - label: '兰溪', - }, { value: '1', - label: '李华', + label: '工厂', }, { value: '2', - label: '唐飞', + label: '外包搬运', + }, + { + value: '3', + label: '物流', }, ]); + +const DeliveryDriver = ref([]); // 图片列表 const fileList = ref([]); // 字典公共函数 @@ -697,6 +684,7 @@ const ResponsiblePartychange = (val, index) => { }); }; const onLoad = () => { + DeliveryTrainnumber();//获取司机 console.log($route.query.id, '页面初始化'); routerState.value = $route.query.routerState; updateDictionary(IndexException.value, 'pc_work_order'); //异常类型 @@ -731,16 +719,28 @@ const DiscoveringNodesChange = val => { } else { groundlineSet.value = true; //展示所有搜索框 } +}; + +// 车次号自动带出时间司机 +function DeliveryTrainnumber () { + + let data = { + trainNumber: Indexform.value.trainNumber, + }; + $_shippingInformation(data).then(res => { + // DeliveryDriver; + // Indexform.deliveryDriver; + + console.log(res, '查询返回值'); + DeliveryDriver.value = res.data.data.records;//获取到的信息 + // 如果是精确搜索自动带入日期 + if(res.data.data.records.length ==1){ + Indexform.value.deliveryTime = res.data.data.records[0].taskTime; //配送时间 + Indexform.value.deliveryDriver = res.data.data.records[0].id; //配送人 + } + + }); - // if(val==1){ - // let data={ - - // } - // $_shippingInformation(data).then(res=>{ - // console.log(res,'获取运单信息'); - // }) - - // } }; // 照片 @@ -802,6 +802,7 @@ const CompanyProportionInput = () => { const ConfirmForm = () => { // 提货责任方 + console.log(Indexform.value.businessMame, '提货责任方'); let DataSubmit = { personResponsibleDTO: [], @@ -830,15 +831,14 @@ const ConfirmForm = () => { } console.log(DataSubmit['decreaseImageEntityList'], '处理好的图片'); - - //司机信息处理 + //司机信息处理 if (Indexform.value.deliveryDriver) { - Indexform.value.deliveryDriver = DeliveryDriver.value.find( - item => item.value == Indexform.value.deliveryDriver - ); + console.log(DeliveryDriver.value,'当前全部司机'); + console.log(Indexform.value.deliveryDriver,'选择的司机信息'); + Indexform.value.deliveryDriver = DeliveryDriver.value.find( item => item.id == Indexform.value.deliveryDriver).driverName; } - Indexform.value.deliveryDriver = Indexform.value.deliveryDriver.label; - console.log(Indexform.value.deliveryDriver); // 输出李华 + console.log(Indexform.value.deliveryDriver,'筛选出来的司机'); + let processorEntityList = []; //处理方信息处理 @@ -1100,7 +1100,7 @@ const Statistics = () => { }); }; -// 查询包件信息自动回显 +// 查询包件信息自动回显 const ChangePackageInfo = (val, index) => { PackageInfo.value[index].orderCode = ''; //订单自编码 PackageInfo.value[index].waybillNumber = ''; //运单号 From a089ff6785ec8675f3959c15cd5fa1bff9d746e7 Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Thu, 21 Dec 2023 09:17:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8B=BE=E9=80=89?= =?UTF-8?q?=E8=AE=A1=E6=95=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../distribution/zeroAdditionalRecording.js | 13 + src/components/tablecmt/tablecmt.vue | 2 +- .../distribution/zeroAdditionalRecording.js | 288 +++++------------- .../artery/zeroAdditionalRecording.vue | 75 ++++- vite.config.js | 4 +- 5 files changed, 153 insertions(+), 229 deletions(-) create mode 100644 src/api/distribution/zeroAdditionalRecording.js diff --git a/src/api/distribution/zeroAdditionalRecording.js b/src/api/distribution/zeroAdditionalRecording.js new file mode 100644 index 00000000..bb1e45fc --- /dev/null +++ b/src/api/distribution/zeroAdditionalRecording.js @@ -0,0 +1,13 @@ +import request from '@/axios'; + +/** + * 初始化获取配载信息 + */ +export const postloadZeroSuppleList = (data = {}) => { + return request({ + url: '/api/logpm-trunkline/carsLoad/zeroSuppleList', + method: 'post', + data, + }); +}; + diff --git a/src/components/tablecmt/tablecmt.vue b/src/components/tablecmt/tablecmt.vue index b0d0239f..39c59ef0 100644 --- a/src/components/tablecmt/tablecmt.vue +++ b/src/components/tablecmt/tablecmt.vue @@ -486,7 +486,7 @@ const handleSelectionChange = (param: TableDataType[]) => { selectarr.value = param; selectarr.value.forEach(val => { selectCount.value.forEach( - item => (item.value += computeNumber(item.value, '+', val[item.prop]).result) + item => (item.value = computeNumber(item.value, '+', Number(val[item.prop] || 0)).result) ); }); emit('selection', param); diff --git a/src/option/distribution/zeroAdditionalRecording.js b/src/option/distribution/zeroAdditionalRecording.js index 74204d0c..73c935f6 100644 --- a/src/option/distribution/zeroAdditionalRecording.js +++ b/src/option/distribution/zeroAdditionalRecording.js @@ -15,9 +15,19 @@ export const oldColumnList = [ fixed: true, }, { - prop: 'orderCode', + prop: 'createTime', + label: '开单日期', + type: 2, + values: '', + width: '200', + checkarr: [], + fixed: false, + sortable: true, + }, + { + prop: 'waybillNo', label: '运单号', - type: 6, + type: 2, values: '', width: '150', checkarr: [], @@ -28,7 +38,7 @@ export const oldColumnList = [ { prop: 'orderCode', label: '合同号', - type: 6, + type: 2, values: '', width: '150', checkarr: [], @@ -37,28 +47,8 @@ export const oldColumnList = [ head: false, }, { - prop: 'orderPackageCode', - label: '包条码', - type: 6, - values: '', - width: '200', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'driverName', - label: '计划目的地', - type: 1, - values: '', - width: '130', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'driverPhone', - label: '目的地', + prop: 'destination', + label: '到站', type: 1, values: '', width: '130', @@ -67,8 +57,8 @@ export const oldColumnList = [ sortable: true, }, { - prop: 'warehouseName', - label: '装卸状态', + prop: 'destinationWarehouseName', + label: '目的网点', type: 1, values: '', width: '130', @@ -77,8 +67,8 @@ export const oldColumnList = [ sortable: true, }, { - prop: 'lineNameTitle', - label: '订单来源', + prop: 'shipperName', + label: '发货单位', type: 1, values: '', width: '130', @@ -87,8 +77,8 @@ export const oldColumnList = [ sortable: true, }, { - prop: 'nodeNub', - label: '装车仓库', + prop: 'consignee', + label: '收货单位', type: 1, values: '', width: '130', @@ -97,8 +87,8 @@ export const oldColumnList = [ sortable: true, }, { - prop: 'startTime', - label: '扫码时间', + prop: 'goodsName', + label: '品类名称', type: 1, values: '', width: '130', @@ -107,68 +97,8 @@ export const oldColumnList = [ sortable: true, }, { - prop: 'endTime', - label: '装卸仓库', - type: 1, - values: '', - width: '130', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'planVolume', - label: '卸车时间', - type: 1, - values: '', - width: '130', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'billladingStatus', - label: '装车类型', - type: 1, - values: '', - width: '130', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'chargeType', - label: '是否补录', - type: 1, - values: '', - width: '130', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'totalFee', - label: '是否齐套', - type: 1, - values: '', - width: '150', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'remark', - label: '托盘码', - type: 1, - values: '', - width: '150', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'carrierName', - label: '一级品类', + prop: 'totalNum', + label: '件数', type: 1, values: '', width: '130', @@ -177,8 +107,8 @@ export const oldColumnList = [ sortable: true, }, { - prop: 'waybillCount', - label: '二级品类', + prop: 'stockNum', + label: '在库件数', type: 1, values: '', width: '130', @@ -187,8 +117,8 @@ export const oldColumnList = [ sortable: true, }, { - prop: 'totalNum', - label: '三级品类', + prop: 'price', + label: '单价', type: 1, values: '', width: '130', @@ -197,8 +127,8 @@ export const oldColumnList = [ sortable: true, }, { - prop: 'totalWeight', - label: '物料名称', + prop: 'weight', + label: '重量(KG)', type: 1, values: '', width: '130', @@ -207,8 +137,8 @@ export const oldColumnList = [ sortable: true, }, { - prop: 'totalVolume', - label: '装车扫描人', + prop: 'volume', + label: '体积', type: 1, values: '', width: '130', @@ -217,8 +147,8 @@ export const oldColumnList = [ sortable: true, }, { - prop: 'createUserName', - label: '卸车人', + prop: 'totalFreight', + label: '运费', type: 1, values: '', width: '130', @@ -227,8 +157,8 @@ export const oldColumnList = [ sortable: true, }, { - prop: 'totalWeight', - label: '同步状态', + prop: 'remark', + label: '运单备注', type: 1, values: '', width: '130', @@ -256,9 +186,19 @@ export const newColumnList = [ fixed: true, }, { - prop: 'orderCode', + prop: 'createTime', + label: '开单日期', + type: 2, + values: '', + width: '200', + checkarr: [], + fixed: false, + sortable: true, + }, + { + prop: 'waybillNo', label: '运单号', - type: 6, + type: 2, values: '', width: '150', checkarr: [], @@ -269,7 +209,7 @@ export const newColumnList = [ { prop: 'orderCode', label: '合同号', - type: 6, + type: 2, values: '', width: '150', checkarr: [], @@ -278,28 +218,8 @@ export const newColumnList = [ head: false, }, { - prop: 'orderPackageCode', - label: '包条码', - type: 6, - values: '', - width: '200', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'driverName', - label: '计划目的地', - type: 1, - values: '', - width: '130', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'driverPhone', - label: '目的地', + prop: 'destination', + label: '到站', type: 1, values: '', width: '130', @@ -308,8 +228,8 @@ export const newColumnList = [ sortable: true, }, { - prop: 'warehouseName', - label: '装卸状态', + prop: 'destinationWarehouseName', + label: '目的网点', type: 1, values: '', width: '130', @@ -318,8 +238,8 @@ export const newColumnList = [ sortable: true, }, { - prop: 'lineNameTitle', - label: '订单来源', + prop: 'shipperName', + label: '发货单位', type: 1, values: '', width: '130', @@ -328,8 +248,8 @@ export const newColumnList = [ sortable: true, }, { - prop: 'nodeNub', - label: '装车仓库', + prop: 'consignee', + label: '收货单位', type: 1, values: '', width: '130', @@ -338,8 +258,8 @@ export const newColumnList = [ sortable: true, }, { - prop: 'startTime', - label: '扫码时间', + prop: 'goodsName', + label: '品类名称', type: 1, values: '', width: '130', @@ -348,68 +268,8 @@ export const newColumnList = [ sortable: true, }, { - prop: 'endTime', - label: '装卸仓库', - type: 1, - values: '', - width: '130', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'planVolume', - label: '卸车时间', - type: 1, - values: '', - width: '130', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'billladingStatus', - label: '装车类型', - type: 1, - values: '', - width: '130', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'chargeType', - label: '是否补录', - type: 1, - values: '', - width: '130', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'totalFee', - label: '是否齐套', - type: 1, - values: '', - width: '150', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'remark', - label: '托盘码', - type: 1, - values: '', - width: '150', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'carrierName', - label: '一级品类', + prop: 'totalNum', + label: '件数', type: 1, values: '', width: '130', @@ -418,8 +278,8 @@ export const newColumnList = [ sortable: true, }, { - prop: 'waybillCount', - label: '二级品类', + prop: 'stockNum', + label: '在库件数', type: 1, values: '', width: '130', @@ -428,8 +288,8 @@ export const newColumnList = [ sortable: true, }, { - prop: 'totalNum', - label: '三级品类', + prop: 'price', + label: '单价', type: 1, values: '', width: '130', @@ -438,8 +298,8 @@ export const newColumnList = [ sortable: true, }, { - prop: 'totalWeight', - label: '物料名称', + prop: 'weight', + label: '重量(KG)', type: 1, values: '', width: '130', @@ -448,8 +308,8 @@ export const newColumnList = [ sortable: true, }, { - prop: 'totalVolume', - label: '装车扫描人', + prop: 'volume', + label: '体积', type: 1, values: '', width: '130', @@ -458,8 +318,8 @@ export const newColumnList = [ sortable: true, }, { - prop: 'createUserName', - label: '卸车人', + prop: 'totalFreight', + label: '运费', type: 1, values: '', width: '130', @@ -468,8 +328,8 @@ export const newColumnList = [ sortable: true, }, { - prop: 'totalWeight', - label: '同步状态', + prop: 'remark', + label: '运单备注', type: 1, values: '', width: '130', diff --git a/src/views/distribution/artery/zeroAdditionalRecording.vue b/src/views/distribution/artery/zeroAdditionalRecording.vue index e82a8e65..7a245f2b 100644 --- a/src/views/distribution/artery/zeroAdditionalRecording.vue +++ b/src/views/distribution/artery/zeroAdditionalRecording.vue @@ -5,7 +5,7 @@
-
+
运单池
@@ -91,7 +91,7 @@ background @size-change="sizeChange" @current-change="currentChange" - :current-page="zeroAdditionalRecordingInfo.oldPage.currentPage" + :current-page="zeroAdditionalRecordingInfo.oldPage.pageNum" :page-sizes="[30, 50, 80, 120]" :page-size="zeroAdditionalRecordingInfo.oldPage.pageSize" layout="total, sizes, prev, pager, next, jumper" @@ -102,7 +102,7 @@
-
+
调度池
@@ -208,8 +208,10 @@ import dayjs from 'dayjs'; import { mapGetters } from 'vuex'; /** 获取字典 */ import { getDictionaryBiz } from '@/api/system/dict'; +import { postloadZeroSuppleList } from '@/api/distribution/zeroAdditionalRecording'; import { downloadXls } from '@/utils/util'; import { oldColumnList, newColumnList } from '@/option/distribution/zeroAdditionalRecording'; +import { ElMessage } from 'element-plus'; const details = reactive({ /** 是否开启搜索 */ @@ -272,13 +274,13 @@ const details = reactive({ drawerShow: false, /** 分页参数 */ page: { - currentPage: 1, + pageNum: 1, pageSize: 30, total: 0, }, /** 装车明细分页参数 */ trickleLoadingPage: { - currentPage: 1, + pageNum: 1, pageSize: 30, total: 0, }, @@ -296,10 +298,12 @@ const details = reactive({ zeroAdditionalRecordingInfo: { oldPage: { pageSize: 30, - currentPage: 1, + pageNum: 1, total: 0, }, }, + /** 被选中的零担订单 */ + orderCodeList: [], }); const { @@ -331,7 +335,33 @@ onMounted(() => { }); /** 请求页面数据 */ -const onLoad = (page: any) => {}; +const onLoad = async (page: any, params = {}) => { + try { + details.loadingObj.oldListLoading = true; + const submitData = { + ...details.page, + ...details.query, + ...params, + }; + + const res = await postloadZeroSuppleList(submitData); + console.log('res :>> ', res); + const { code, data } = res.data; + if (code !== 200) return; + details.oldData = data.records; + + details.page.total = data.total; + } catch (error) { + console.log('error :>> ', error); + } finally { + // 等待列表渲染完成 + await nextTick(); + details.loadingObj.oldListLoading = false; + } + // postloadZeroSuppleList +}; + +onLoad(); /** 搜索 */ const searchChange = () => { @@ -342,7 +372,7 @@ const searchChange = () => { const searchReset = () => { details.query = {}; details.stockupDate = []; - details.page.currentPage = 1; + details.page.pageNum = 1; onLoad(details.page); }; @@ -418,7 +448,7 @@ const selectsc = (index, row) => { /** 表格表头复选框选择 */ const selectionChange = (list: any) => { - details.selectionList = list; + details.oldSelectionList = list; }; /** 表格表头输入框搜索 */ @@ -488,10 +518,31 @@ const setnewcolum = (newarr, headarr, type) => { /** 添加运单 */ const handleAddWaybill = () => { - // if (this.addInfo.oldSelectionList.length === 0) return this.$message.warning('最少选择一条运单'); - // this.addInfo.newData = [...this.addInfo.newData, ...this.addInfo.oldSelectionList]; - // this.addInfo.haveIds = this.addInfo.map(val => val.id); + if (details.oldSelectionList.length === 0) return ElMessage.error('最少选择一条数据'); + + // 新增 + // if (Number(details.pageType) === 1) { + for (let item of details.oldSelectionList) { + item.planNum = item.stockNum; + item.loadingNum = 0; + details.newData.push(item); + } + + details.orderCodeList = [ + ...new Set([ + ...details.orderCodeList, + ...details.oldSelectionList.map(val => val.orderCode + ',' + val.waybillNo), + ]), + ]; + console.log('details.orderCodeList :>> ', details.orderCodeList); + + const orderCodes = details.selectionList.map(val => val.orderCode); + // clearSelectionList(); + details.page.pageNum = 1; + // initOriginWarehouseOrder(); + // } }; + /** 移除运单 */ const handleRemoveWaybill = () => { // if (this.addInfo.newSelectionList.length === 0) return this.$message.warning('最少选择一条运单'); diff --git a/vite.config.js b/vite.config.js index 7512531c..6353e045 100644 --- a/vite.config.js +++ b/vite.config.js @@ -14,7 +14,7 @@ export default ({ mode, command }) => { '/api': { // target: 'http://192.168.10.126:8889', // hy - // target: 'http://192.168.10.48:13000', + target: 'http://192.168.10.48:13000', // lmy // target: 'http://192.168.10.123:8889', // target: 'http://192.168.10.101:8888', @@ -22,7 +22,7 @@ export default ({ mode, command }) => { // target: 'http://192.168.10.75:8777', // 新zyc // target: 'http://192.168.6.116:8777', - target: 'http://192.168.6.122:8777', + // target: 'http://192.168.6.122:8777', // target: 'http://192.168.10.25:13000', // target: 'http://192.168.10.57:13000', // target: 'http://192.168.6.122:8777',