From c96b458756520c2e312dbe90f1b7823e01cf840c Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Thu, 21 Nov 2024 17:02:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/detail.js | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/src/common/detail.js b/src/common/detail.js index 35ef4ba1..5c6570a0 100644 --- a/src/common/detail.js +++ b/src/common/detail.js @@ -45,43 +45,26 @@ export function getTreeDataSource(dataList) { } export function getThreeDataSource(data) { let items = [] - // let obj ={ - // ...data.subList[0] - // } - // console.log(12) - // data.subList.forEach((item)=>{ - // item.threeList = [{ - // fromLocationCode:item.fromLocationCode, - // batch:item.batch, - // handleQty:0, - // qty:item.qty, - // inventoryStatus:item.inventoryStatus, - // toLocationCode:item.toLocationCode, - // }] - // item.packList=[{ - // scaned : false, - // scanDate: new Date() - // }] - // }) - // obj.subList = data.subList - // items.push(obj) - // return items; + let obj ={ + ...data.subList[0] + } + console.log(12) data.subList.forEach((item)=>{ - item.subList = [{ + item.threeList = [{ fromLocationCode:item.fromLocationCode, batch:item.batch, handleQty:0, qty:item.qty, inventoryStatus:item.inventoryStatus, toLocationCode:item.toLocationCode, - // packList:[{ - // scaned : false, - // scanDate: new Date() - // }] }] - + item.packList=[{ + scaned : false, + scanDate: new Date() + }] }) - items = data.subList + obj.subList = data.subList + items.push(obj) return items; }