| | |
| | | editable: true, |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.qty', '已完成数量'), |
| | | dataIndex: 'qty', |
| | | width: 140, |
| | | ellipsis: true, |
| | | editable: true, |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.workQty', '作业中数量'), |
| | | dataIndex: 'workQty', |
| | | width: 140, |
| | | ellipsis: true, |
| | | editable: true, |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.memo', '备注'), |
| | | dataIndex: 'memo', |
| | | width: 140, |
| | |
| | | maktx: item.data.maktx, |
| | | batch: '', |
| | | anfme: 0, |
| | | qty: 0, |
| | | workQty: 0, |
| | | memo: '' |
| | | }; |
| | | fieldList.forEach((field) => { |
| | |
| | | maktx: item.mat$.maktx, |
| | | batch: item.batch, |
| | | anfme: item.anfme, |
| | | qty: item.qty, |
| | | workQty: item.workQty, |
| | | memo: item.memo |
| | | }; |
| | | fieldList.forEach((field) => { |
| | |
| | | editable: true, |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.qty', '已完成数量'), |
| | | dataIndex: 'qty', |
| | | width: 140, |
| | | ellipsis: true, |
| | | editable: true, |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.workQty', '作业中数量'), |
| | | dataIndex: 'workQty', |
| | | width: 140, |
| | | ellipsis: true, |
| | | editable: true, |
| | | }, |
| | | { |
| | | title: formatMessage('db.man_loc_detl.memo', '备注'), |
| | | dataIndex: 'memo', |
| | | width: 140, |
| | |
| | | openDetl.value = false; |
| | | } |
| | | |
| | | watch(orderId, (newVal, oldVal) => { |
| | | get("/api/orderDetl/orderId/" + newVal, {}).then((resp) => { |
| | | let result = resp.data; |
| | | let index = 1; |
| | | let tmp = []; |
| | | result.data.forEach((item) => { |
| | | let data = { |
| | | _id: index++, |
| | | detlId: item.id, |
| | | matnr: item.mat$.matnr, |
| | | maktx: item.mat$.maktx, |
| | | batch: item.batch, |
| | | anfme: item.anfme, |
| | | memo: item.memo |
| | | }; |
| | | fieldList.forEach((field) => { |
| | | data[field] = item[field]; |
| | | }) |
| | | tmp.push(data) |
| | | }) |
| | | tableData.value = tmp; |
| | | }) |
| | | const handleCancel = () => { |
| | | openDetl.value = false; |
| | | orderId.value = null; |
| | | } |
| | | |
| | | get("/api/order/" + newVal, {}).then((resp) => { |
| | | let result = resp.data; |
| | | orderInfo.value = result.data; |
| | | }) |
| | | watch(orderId, (newVal, oldVal) => { |
| | | if (newVal != null) { |
| | | get("/api/orderDetl/orderId/" + newVal, {}).then((resp) => { |
| | | let result = resp.data; |
| | | let index = 1; |
| | | let tmp = []; |
| | | result.data.forEach((item) => { |
| | | let data = { |
| | | _id: index++, |
| | | detlId: item.id, |
| | | matnr: item.mat$.matnr, |
| | | maktx: item.mat$.maktx, |
| | | batch: item.batch, |
| | | anfme: item.anfme, |
| | | qty: item.qty, |
| | | workQty: item.workQty, |
| | | memo: item.memo |
| | | }; |
| | | fieldList.forEach((field) => { |
| | | data[field] = item[field]; |
| | | }) |
| | | tmp.push(data) |
| | | }) |
| | | tableData.value = tmp; |
| | | }) |
| | | |
| | | get("/api/order/" + newVal, {}).then((resp) => { |
| | | let result = resp.data; |
| | | orderInfo.value = result.data; |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | defineExpose({ |
| | |
| | | |
| | | <template> |
| | | <div> |
| | | <a-modal v-model:open="openDetl" width="60%" @ok="handleOk"> |
| | | <a-modal v-model:open="openDetl" width="60%" @ok="handleOk" @cancel="handleCancel"> |
| | | <div class="component-header"> |
| | | <div> |
| | | <h3> |
| | |
| | | display: flex; |
| | | } |
| | | |
| | | .component-header > div { |
| | | .component-header>div { |
| | | flex: 1; |
| | | } |
| | | |
| | |
| | | double anfme = Double.parseDouble(map.get("anfme").toString()); |
| | | String batch = map.get("batch").toString(); |
| | | String matnr = map.get("matnr").toString(); |
| | | Double qty = Double.parseDouble(map.get("qty").toString()); |
| | | Double workQty = Double.parseDouble(map.get("workQty").toString()); |
| | | String memo = map.getOrDefault("memo", "").toString(); |
| | | Mat mat = matService.getOne(new LambdaQueryWrapper<Mat>().eq(Mat::getMatnr, matnr)); |
| | | if (mat == null) { |
| | |
| | | orderDetl.setOrderId(order.getId()); |
| | | orderDetl.setOrderNo(order.getOrderNo()); |
| | | orderDetl.setAnfme(anfme); |
| | | orderDetl.setQty(0D); |
| | | orderDetl.setWorkQty(0D); |
| | | orderDetl.setQty(qty); |
| | | orderDetl.setWorkQty(workQty); |
| | | orderDetl.setBatch(batch); |
| | | orderDetl.setMatId(mat.getId()); |
| | | orderDetl.setMemo(memo); |
| | |
| | | double anfme = Double.parseDouble(map.get("anfme").toString()); |
| | | String batch = map.get("batch").toString(); |
| | | String matnr = map.get("matnr").toString(); |
| | | Double qty = Double.parseDouble(map.get("qty").toString()); |
| | | Double workQty = Double.parseDouble(map.get("workQty").toString()); |
| | | String memo = map.getOrDefault("memo", "").toString(); |
| | | Mat mat = matService.getOne(new LambdaQueryWrapper<Mat>().eq(Mat::getMatnr, matnr)); |
| | | if (mat == null) { |
| | |
| | | }else { |
| | | orderDetl.setOrderNo(order.getOrderNo()); |
| | | orderDetl.setAnfme(anfme); |
| | | orderDetl.setQty(qty); |
| | | orderDetl.setWorkQty(workQty); |
| | | orderDetl.setBatch(batch); |
| | | orderDetl.setMemo(memo); |
| | | orderDetl.setUpdateTime(new Date()); |