| | |
| | | otherMoney:{} |
| | | }) |
| | | onMounted(()=>{ |
| | | xGrid.value.reloadData(prop.otherMoney) |
| | | xGrid.value.reloadData(prop.otherMoney.filter(item => item.column.indexOf('M')>-1)) |
| | | }) |
| | | watch(prop,(newVal)=>{ |
| | | xGrid.value.reloadData(prop.otherMoney) |
| | | xGrid.value.reloadData(prop.otherMoney.filter(item => item.column.indexOf('M')>-1)) |
| | | }) |
| | | |
| | | const countAmount = (row) => { |
| | |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | | //其他金额 |
| | | otherMoney.value = titleSelectJson.value.orderOtherMoney[0].filter(item => item.column.indexOf('M')>-1) |
| | | otherMoney.value = titleSelectJson.value.orderOtherMoney[0] |
| | | //let columns = [] |
| | | titleSelectJson.value.orderOtherMoney[0].forEach(item => { |
| | | otherMoney.value.forEach(item => { |
| | | let column = { |
| | | field: `otherColumns.${item.column}`, |
| | | width:100, |
| | |
| | | Map<String,Object> otherColumns = JSON.parseObject(OrderDetails.get(i).getOtherColumns(), new TypeReference<Map<String, Object>>(){}); |
| | | int finalI = i; |
| | | |
| | | |
| | | if(otherColumns!=null){ |
| | | otherColumns.forEach((key, value) ->{ |
| | | if(value!=null && key.equals("M")) { |
| | | if(value!=null && key.contains("M")) { |
| | | orderOtherMoneyList.forEach(orderOtherMoney -> { |
| | | if (orderOtherMoney.getColumn().equals(key)) { |
| | | orderOtherMoney.setQuantity(orderOtherMoney.getQuantity()+((Double) value * OrderDetails.get(finalI).getQuantity())); |
| | | orderOtherMoney.setQuantity(orderOtherMoney.getQuantity()+(Double.parseDouble((String) value) * OrderDetails.get(finalI).getQuantity())); |
| | | } |
| | | }); |
| | | } |