From 9b87c849a0276e6351b168f71985e14e2100147e Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Fri, 10 May 2024 17:07:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B9=B2=E7=BA=BF=E8=87=AA?= =?UTF-8?q?=E6=8F=90=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../addArteryDistrilbutionBillLadingList.vue | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue b/src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue index dd1c208b..2ac141c1 100644 --- a/src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue +++ b/src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue @@ -47,7 +47,7 @@ @change="val => destinationWarehouseNameChange(val, index)" :remote-method="remoteMethod" :loading="details.loadingObj.nodeLoading" - :disabled="index === 0 || index === nodeInfoData.length - 1" + :disabled="index === nodeInfoData.length - 1" clearable > nodeInfoData.length); const initData = async () => { const res = await postloadFindLoadInitData(); const { code, data } = res.data; - nodeInfoData[0] = { - nodeName: data.startWarehouseInfo.warehouseName, - nodeId: data.startWarehouseInfo.warehouseId, - clientId: data.startWarehouseInfo.warehouseId, - clientName: data.startWarehouseInfo.warehouseName, - ...data.startWarehouseInfo, - }; + // nodeInfoData[0] = { + // nodeName: data.startWarehouseInfo.warehouseName, + // nodeId: data.startWarehouseInfo.warehouseId, + // clientId: data.startWarehouseInfo.warehouseId, + // clientName: data.startWarehouseInfo.warehouseName, + // ...data.startWarehouseInfo, + // }; nodeInfoData[nodeInfoData.length - 1] = { nodeName: data.startWarehouseInfo.warehouseName, @@ -676,7 +676,12 @@ const initPage = async () => { newInputsc('', { prop: 'aaa' }); // 节点 - data.lineList.forEach(val => { + data.lineList.forEach((val, index) => { + if (index === 0) { + nodeInfoData[0] = { ...val, nodeName: val.clientName }; + return; + } + nodeInfoData.splice(nodeInfoData.length - 1, 0, { ...val, nodeName: val.clientName, @@ -1168,7 +1173,7 @@ const handleSubmit = async (formEl: FormInstance | undefined) => { if (!formEl) return; await formEl.validate((valid, fields) => { if (valid) { - const _nodeArr = nodeInfoData.slice(1, nodeInfoData.length - 1); + const _nodeArr = nodeInfoData.slice(0, nodeInfoData.length - 1); if (_nodeArr.length === 0) return ElMessage.warning('请添加路线节点');