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('请添加路线节点');