From 5da830cb0b2fc7fbaba9e7836098bc21a3281b51 Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Tue, 7 May 2024 15:09:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E5=B9=B2?= =?UTF-8?q?=E7=BA=BFbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/option/waybill/ChangeOrder.js | 118 +++++++----- .../waybill/WarehousingByTrainNumber.js | 175 +++++++----------- src/utils/util.js | 34 ++++ .../distribution/inventory/CreateOrder.vue | 57 +++--- .../addArteryDistrilbutionBillLadingList.vue | 4 +- src/views/waybill/ChangeOrder.vue | 33 +++- src/views/waybill/CreateZeroOrder.vue | 29 +-- 7 files changed, 234 insertions(+), 216 deletions(-) diff --git a/src/option/waybill/ChangeOrder.js b/src/option/waybill/ChangeOrder.js index 5468eafa..500c147c 100644 --- a/src/option/waybill/ChangeOrder.js +++ b/src/option/waybill/ChangeOrder.js @@ -15,9 +15,9 @@ export const columnList = [ fixed: true, }, { - prop: 'billladingCode', + prop: 'waybillNo', label: '运单号', - type: 6, + type: 13, values: '', width: '150', checkarr: [], @@ -26,7 +26,7 @@ export const columnList = [ head: false, }, { - prop: 'carNumber', + prop: 'openWarehouseName', label: '开单网点', type: 1, values: '', @@ -36,27 +36,49 @@ export const columnList = [ sortable: true, }, { - prop: 'driverName', + prop: 'checkStatusName', label: '状态', - type: 1, + type: 3, values: '', width: '130', - checkarr: [], + checkarr: [ + { + label: '待审核', + value: '0', + }, + { + label: '已通过', + value: '1', + }, + { + label: '未通过', + value: '2', + }, + ], fixed: false, sortable: true, }, { - prop: 'driverPhone', + prop: 'waybillTypeName', label: '开单类型', - type: 1, + type: 3, values: '', width: '130', - checkarr: [], + checkarr: [ + { + label: '有数据', + value: '1', + }, + { + label: '无数据', + value: '2', + }, + ], fixed: false, sortable: true, }, { - prop: 'warehouseName', + prop: 'agent', label: '制单员', type: 1, values: '', @@ -66,7 +88,7 @@ export const columnList = [ sortable: true, }, { - prop: 'lineNameTitle', + prop: 'openTime', label: '开单时间', type: 1, values: '', @@ -76,7 +98,7 @@ export const columnList = [ sortable: true, }, { - prop: 'nodeNub', + prop: 'applyTime', label: '申请时间', type: 1, values: '', @@ -86,7 +108,7 @@ export const columnList = [ sortable: true, }, { - prop: 'startTime', + prop: 'applyWarehouseName', label: '申请网点', type: 1, values: '', @@ -96,7 +118,7 @@ export const columnList = [ sortable: true, }, { - prop: 'endTime', + prop: 'createUserName', label: '申请人', type: 1, values: '', @@ -106,7 +128,7 @@ export const columnList = [ sortable: true, }, { - prop: 'planVolume', + prop: 'refer', label: '修改原因', type: 1, values: '', @@ -116,7 +138,7 @@ export const columnList = [ sortable: true, }, { - prop: 'billladingStatus', + prop: 'operationRemark', label: '修改内容', type: 1, values: '', @@ -125,18 +147,18 @@ export const columnList = [ fixed: false, sortable: true, }, + // { + // prop: 'chargeType', + // 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', + prop: 'checkTime', label: '审核时间', type: 1, values: '', @@ -145,28 +167,28 @@ export const columnList = [ fixed: false, sortable: true, }, + // { + // prop: 'remark', + // label: '审核人', + // type: 1, + // values: '', + // width: '130', + // checkarr: [], + // fixed: false, + // sortable: true, + // }, + // { + // prop: 'carrierName', + // label: '审核意见', + // type: 1, + // values: '', + // width: '130', + // checkarr: [], + // fixed: false, + // sortable: true, + // }, { - prop: 'remark', - label: '审核人', - type: 1, - values: '', - width: '130', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'carrierName', - label: '审核意见', - type: 1, - values: '', - width: '130', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'createUserName', + prop: '', label: '操作', type: 6, values: '', diff --git a/src/option/waybill/WarehousingByTrainNumber.js b/src/option/waybill/WarehousingByTrainNumber.js index 9b0fd507..835d06d6 100644 --- a/src/option/waybill/WarehousingByTrainNumber.js +++ b/src/option/waybill/WarehousingByTrainNumber.js @@ -18,7 +18,7 @@ export const columnList = [ { prop: 'orderCode', label: '订单自编号', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -27,9 +27,9 @@ export const columnList = [ head: false, }, { - prop: 'carNumber', + prop: 'serviceNum', label: '服务号', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -37,19 +37,22 @@ export const columnList = [ sortable: true, }, { - prop: 'driverName', + prop: 'isGcpName', label: '是否干仓配', - type: 1, + type: 3, values: '', width: '130', - checkarr: [], + checkarr: [ + { label: '是', value: '1' }, + { label: '否', value: '0' }, + ], fixed: false, sortable: true, }, { - prop: 'driverPhone', + prop: 'totalNum', label: '数量', - type: 1, + type: 2, values: '', width: '130', checkarr: [], @@ -59,7 +62,7 @@ export const columnList = [ { prop: 'warehouseName', label: '导入仓库', - type: 1, + type: 2, values: '', width: '130', checkarr: [], @@ -67,9 +70,9 @@ export const columnList = [ sortable: true, }, { - prop: 'lineNameTitle', + prop: 'orderType', label: '订单类型', - type: 1, + type: 2, values: '', width: '180', checkarr: [], @@ -77,19 +80,9 @@ export const columnList = [ sortable: true, }, { - prop: 'startTime', + prop: 'siteName', label: '订单来源', - type: 1, - values: '', - width: '130', - checkarr: [], - fixed: false, - sortable: true, - }, - { - prop: 'nodeNub', - label: '订单类型名称', - type: 1, + type: 2, values: '', width: '130', checkarr: [], @@ -97,19 +90,22 @@ export const columnList = [ sortable: true, }, { - prop: 'endTime', - label: '遗留', - type: 1, + prop: 'legacyStatus', + label: '是否遗留', + type: 3, values: '', width: '130', - checkarr: [], + checkarr: [ + { label: '是', value: '1' }, + { label: '否', value: '0' }, + ], fixed: false, sortable: true, }, { - prop: 'planVolume', + prop: 'dealerName', label: '商场名称', - type: 1, + type: 2, values: '', width: '130', checkarr: [], @@ -117,9 +113,9 @@ export const columnList = [ sortable: true, }, { - prop: 'planVolume', + prop: 'customerName', label: '顾客名称', - type: 1, + type: 2, values: '', width: '130', checkarr: [], @@ -127,9 +123,9 @@ export const columnList = [ sortable: true, }, { - prop: 'billladingStatus', + prop: 'customerPhone', label: '顾客电话', - type: 1, + type: 2, values: '', width: '130', checkarr: [], @@ -137,9 +133,9 @@ export const columnList = [ sortable: true, }, { - prop: 'chargeType', + prop: 'customerAddress', label: '顾客地址', - type: 1, + type: 2, values: '', width: '180', checkarr: [], @@ -147,29 +143,9 @@ export const columnList = [ sortable: true, }, { - prop: 'planVolume', + prop: 'storeName', 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: 'planVolume', - label: 'MSCS订单号', - type: 1, + type: 2, values: '', width: '130', checkarr: [], @@ -177,39 +153,22 @@ export const columnList = [ sortable: true, }, { - prop: 'planVolume', - 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: 'planVolume', - label: 'MTDS单号', - type: 1, + prop: 'matingType', + label: '是否齐套', + type: 3, values: '', width: '130', - checkarr: [], + checkarr: [ + { label: '是', value: '1' }, + { label: '否', value: '0' }, + ], fixed: false, sortable: true, }, { - prop: 'remark', + prop: 'dealerCode', label: '商场编码', - type: 1, + type: 2, values: '', width: '130', checkarr: [], @@ -217,9 +176,9 @@ export const columnList = [ sortable: true, }, { - prop: 'planVolume', + prop: 'carrierName', label: '承运商', - type: 1, + type: 2, values: '', width: '130', checkarr: [], @@ -227,37 +186,37 @@ export const columnList = [ sortable: true, }, { - prop: 'carrierName', + prop: 'storeCode', 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: 'planVolume', - label: '合同号', - type: 1, + type: 2, values: '', width: '130', checkarr: [], fixed: false, sortable: true, }, + // { + // prop: 'planVolume', + // 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: 'totalVolume', + prop: 'createTime', label: '创建时间', type: 1, values: '', diff --git a/src/utils/util.js b/src/utils/util.js index 334b1865..07b4a9f3 100644 --- a/src/utils/util.js +++ b/src/utils/util.js @@ -715,3 +715,37 @@ export function hanleTextLineFeed(className, num) { value.innerHTML = addText; } } + +/** + * 转译数据中下拉框的值 + * @param {Array} data + * @param {Array} columnList + * @param {Function} fn 执行的函数 + */ +export function handleTranslationDataSeclect(data, columnList, fn = (value, item) => {}) { + if (getObjType(columnList) !== 'array') + return console.log('columnList 参数类型错误 >>>', columnList); + if (getObjType(data) !== 'array') return console.log('data 参数类型错误 >>>', data); + + const filterArr = columnList.filter(val => val.type === 3); + + for (let i = 0; i < data.length; i++) { + const value = data[i]; + + for (let index = 0; index < filterArr.length; index++) { + const item = filterArr[index]; + + const _key = item.prop.replace('Name', ''); + + for (let j = 0; j < item.checkarr.length; j++) { + const val = item.checkarr[j]; + + if (value[_key] + '' !== val.value + '') continue; + value[item.prop] = val.label; + + fn(value, item); + break; + } + } + } +} diff --git a/src/views/distribution/inventory/CreateOrder.vue b/src/views/distribution/inventory/CreateOrder.vue index 5fa6a308..5a49156a 100644 --- a/src/views/distribution/inventory/CreateOrder.vue +++ b/src/views/distribution/inventory/CreateOrder.vue @@ -29,7 +29,12 @@
- +
@@ -2002,7 +2007,7 @@ const onLoad = async (idsArr = []) => { } details.query.transportType = details.query.transportType || '1'; - handleFindPrice() + handleFindPrice(); } catch (error) { console.log('error :>> ', error); } finally { @@ -2109,6 +2114,7 @@ const initPageInfo = async (idsArr = []) => { val.subtotalFreight = Number(val.subtotalFreight); val.goodsName = val.productName; + val.goodsId = val.productId; val.goodsListOptions = []; @@ -2122,32 +2128,18 @@ const initPageInfo = async (idsArr = []) => { }); } - handleFindPrice(false); + handleFindPrice(true); } const { shipper, shipperName, shipperMobile, consignee, consigneeName, consigneeMobile } = details.query; + console.log('details.goodsList :>> ', details.goodsList); + for (let index = 0; index < details.goodsList.length; index++) { const element = details.goodsList[index]; - const { arrPirce } = element; - if (arrPirce && arrPirce.length > 0) { - // 价格赋值 - for (let i = 0; i < details.priceArr.length; i++) { - const value = details.priceArr[i]; - element[value.key] = 0; - - for (let index = 0; index < arrPirce.length; index++) { - const item = arrPirce[index]; - - if (item.itemName === value.name) - element[value.key] = isNumber(item.cost) ? Number(item.cost) : 0; - } - } - } - - handleComputed(element); + // handleComputed(element); handleFindGoods(element.goodsName, element); } @@ -2686,7 +2678,7 @@ const handleDispatchPrice = (dispatch, template) => { if (!dispatch || !template) return; }; -/** 处理模板费用 */ +/** 处理模板费用 -- 计算 */ const handlePrice = () => { const { dispatch, pickup, template, trunkLine } = details.priceTemplate; @@ -2795,14 +2787,14 @@ const handleSubmit = (formEl: FormInstance | undefined) => { .children.find(val => val.value === departure[1]); let _itemDeparture: any = {}; - if (_findeDeparture.length === 2) { + if (departure.length === 2) { _itemDeparture = _findeDeparture; } else { - _itemDeparture = _findeDeparture.children.find(val => val.value === destination[2]); + _itemDeparture = _findeDeparture.children.find(val => val.value === departure[2]); } - submitData.departure = _findeDeparture.label; - submitData.departureCode = _findeDeparture.value; + submitData.departure = _itemDeparture.label; + submitData.departureCode = _itemDeparture.value; console.log('submitData :>> ', submitData); @@ -3120,12 +3112,15 @@ const handleAssignmentItemPrice = (value, isOnload = false) => { const { pickup, template, trunkLine } = details.priceTemplate; // 干线 - if (trunkLine && template && !isOnload) { - // 如果品牌为金牌, 切模板选择为特殊计费则特殊处理 - if (isDisabled.value) handleSpecialBrandPrice(value, trunkLine, template); - else handleAssignmentItemPriceTrunkline(value, trunkLine, template); - // 是否为区分品类 - } else value.price = 0; + if (!isOnload) { + if (trunkLine && template) { + // 如果品牌为金牌, 切模板选择为特殊计费则特殊处理 + if (isDisabled.value) handleSpecialBrandPrice(value, trunkLine, template); + else handleAssignmentItemPriceTrunkline(value, trunkLine, template); + // 是否为区分品类 + } else value.price = 0; + console.log('123123 :>> ', 123123); + } // 提货 if (pickup && template) { diff --git a/src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue b/src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue index 54177db1..9c5368cf 100644 --- a/src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue +++ b/src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue @@ -1077,7 +1077,7 @@ const addSubmit = async nodeArr => { for (let item of details.addInfo.newData) { _submitData.billladingWaybillList.push({ - waybillId: item.id, + waybillId: item.waybillId, waybillNo: item.waybillNo, }); } @@ -1132,7 +1132,7 @@ const editSubmit = async nodeArr => { for (let item of details.addInfo.newData) { _submitData.billladingWaybillList.push({ - waybillId: item.id, + waybillId: item.waybillId, waybillNo: item.waybillNo, }); } diff --git a/src/views/waybill/ChangeOrder.vue b/src/views/waybill/ChangeOrder.vue index 55013497..d0dfc707 100644 --- a/src/views/waybill/ChangeOrder.vue +++ b/src/views/waybill/ChangeOrder.vue @@ -78,9 +78,9 @@ >