|  |  | 
 |  |  |             totalQty = totalQty + orderDetl.getAnfme(); | 
 |  |  |             wrkQty = wrkQty + orderDetl.getWorkQty(); | 
 |  |  |             endQty = endQty + orderDetl.getQty(); | 
 |  |  |             if (!Cools.isEmpty(order.getPakinPakoutStatus$()) && order.getPakinPakoutStatus$().equals("N")){ | 
 |  |  |             double issued = Optional.of(orderDetl.getAnfme() - orderDetl.getWorkQty()).orElse(0.0D); | 
 |  |  |             if (issued > 0.0) { | 
 |  |  |                 List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getOrigin(), null); | 
 |  |  | 
 |  |  |                 lackQty = lackQty + issued; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         } | 
 |  |  |         // 任务追溯 | 
 |  |  |         List<WrkTraceVo> wrkTraceVos = new ArrayList<>(); | 
 |  |  |         List<WrkDetl> wrkDetls = wrkDetlService.selectAndLogByOrderNoGroupByMatnrOfSum(order.getOrderNo()); | 
 
 |  |  | 
 |  |  |         cols: [[ | 
 |  |  |             {type: 'numbers'}, | 
 |  |  |             {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl'}, | 
 |  |  |             {field: 'po', title: '单据编号', templet: '#orderNoTpl'}, | 
 |  |  |             {field: 'docType$', align: 'center', title: '类型',  minWidth: 160, width: 160}, | 
 |  |  |             {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}, | 
 |  |  |             {field: 'createTime$', title: '创建时间', minWidth: 200, width: 200}, | 
 |  |  | 
 |  |  |                         cellMinWidth: 100, | 
 |  |  |                         cols: [[ | 
 |  |  |                             {type: 'numbers'}, | 
 |  |  |                             {field: 'matnr', title: '商品编码', width: 160}, | 
 |  |  |                             {field: 'maktx', title: '商品名称', width: 160}, | 
 |  |  |                             {field: 'specs', title: '规格'}, | 
 |  |  |                             {field: 'batch', title: '批号'}, | 
 |  |  |                             {field: 'anfme', title: '待完结数量'}, | 
 |  |  |                             {field: 'qty', title: '待上报数量', style: 'font-weight: bold'}, | 
 |  |  |                             {field: 'workQty', title: '已上报数量'}, | 
 |  |  |                             {field: 'matnr', title: 'sku', width: 160}, | 
 |  |  |                             {field: 'maktx', title: '名称', width: 80}, | 
 |  |  |                             {field: 'supp', title: 'po'}, | 
 |  |  |                             {field: 'sku', title: 'upc'}, | 
 |  |  |                             {field: 'anfme', title: '数量', width: 80}, | 
 |  |  |                             {field: 'qty', title: '上报数量', style: 'font-weight: bold'}, | 
 |  |  |                             {field: 'workQty', title: '历史上报数量'}, | 
 |  |  |                             // {field: 'unit', title: '单位'}, | 
 |  |  |                             // { | 
 |  |  |                             //     field: 'createTime$', title: '创建时间', sort: true, templet: function (d) { | 
 |  |  | 
 |  |  |                                 var traceCharts = echarts.init(document.getElementById('wrkTraceCharts')); | 
 |  |  |                                 var traceOptions = { | 
 |  |  |                                     title: { | 
 |  |  |                                         text: '作业/完结/上报', x: 'center', y: '38%', | 
 |  |  |                                         text: '总量/待上报/已上报', x: 'center', y: '38%', | 
 |  |  |                                         textStyle: {fontSize: 18, color: '#262626', fontWeight: 'normal'}, | 
 |  |  |                                         subtextStyle: {fontSize: 36, color: '#10B4E8'}, | 
 |  |  |                                         itemGap: 20 | 
 |  |  | 
 |  |  |                                 // 赋值 | 
 |  |  |                                 traceCharts.setOption({ | 
 |  |  |                                     title: { | 
 |  |  |                                         subtext: res.data.totalQty+"/"+res.data.wrkQty+"/"+res.data.endQty | 
 |  |  |                                         subtext: res.data.totalQty+"/"+res.data.endQty+"/"+res.data.wrkQty | 
 |  |  |                                     }, | 
 |  |  |                                     series: [ | 
 |  |  |                                         { | 
 |  |  |                                             data: [ | 
 |  |  |                                                 {name: '已作业', value: res.data.wrkQty}, | 
 |  |  |                                                 {name: '未作业', value: res.data.totalQty-res.data.wrkQty-res.data.lackQty}, | 
 |  |  |                                                 {name: '已作业', value: res.data.wrkQty+res.data.endQty}, | 
 |  |  |                                                 {name: '未作业', value: res.data.totalQty-res.data.wrkQty-res.data.endQty-res.data.lackQty}, | 
 |  |  |                                                 {name: '库存不足', value: res.data.lackQty}, | 
 |  |  |                                             ] | 
 |  |  |                                         } |