diff --git a/klp-ui/src/views/wms/coil/panels/base.vue b/klp-ui/src/views/wms/coil/panels/base.vue
index 40c8bbed..0390dfcc 100644
--- a/klp-ui/src/views/wms/coil/panels/base.vue
+++ b/klp-ui/src/views/wms/coil/panels/base.vue
@@ -62,12 +62,16 @@
重置
导出
+
+
+
+ {{ shippedCount }}
+ {{ unshippedCount }}
+
+
-
修正
@@ -134,11 +138,6 @@
-
@@ -301,6 +300,10 @@
修正
追溯
+
+ 移出发货单
+
@@ -521,6 +524,7 @@ import LogTable from "@/views/wms/warehouse/components/LogTable.vue";
import { getCoilTagPrintType } from '@/views/wms/coil/js/coilPrint';
import DragResizeBox from '@/components/DragResizeBox/index.vue';
import ProcessFlow from '../components/ProcessFlow.vue';
+import { listDeliveryWaybillDetail, delDeliveryWaybillDetail } from "@/api/wms/deliveryWaybillDetail";
export default {
name: "MaterialCoil",
@@ -825,6 +829,9 @@ export default {
],
},
productionTimeFormVisible: false,
+ // 统计数据:已发货的数量和未发货的数量
+ shippedCount: 0,
+ unshippedCount: 0,
};
},
computed: {
@@ -873,6 +880,35 @@ export default {
// 初始化时计算一次
this.calculateProductionDuration();
},
+ async handleRemoveFromWaybill(row) {
+ const coilId = row.coilId;
+ // 根据id查询所在的单据明细
+ const res = await listDeliveryWaybillDetail({ coilId });
+
+ if (res.rows.length != 1) {
+ this.$message({
+ message: '发货单查找失败',
+ type: 'error',
+ });
+ return;
+ }
+ console.log(res.rows)
+ const detailId = res.rows[0].detailId;
+ // 二次确认是否移除
+ this.$modal.confirm('确认要将该钢卷从发货单中移除吗?', {
+ title: '确认移除',
+ type: 'warning',
+ }).then(() => {
+ delDeliveryWaybillDetail(detailId).then(res => {
+ this.$message({
+ message: '移除成功',
+ type: 'success',
+ });
+ this.getList();
+ });
+ })
+ // 打开一个弹窗列出查询到的所有单据明细
+ },
// 格式化毫秒值为xx天xx小时xx分钟
formatDuration(milliseconds) {
if (!milliseconds || milliseconds < 0) return '';
@@ -1022,6 +1058,14 @@ export default {
this.total = res.total;
this.loading = false;
})
+ // 获取统计数据:已发货的数量和未发货的数量
+ listBoundCoil({ ...query, status: 0 }).then(res => {
+ this.unshippedCount = res.total;
+ })
+ // 获取统计数据:已发货的数量和未发货的数量
+ listBoundCoil({ ...query, status: 1 }).then(res => {
+ this.shippedCount = res.total;
+ })
return;
}
listMaterialCoil(query).then(response => {
@@ -1147,25 +1191,6 @@ export default {
this.single = selection.length !== 1
this.multiple = !selection.length
},
- /** 新增按钮操作 */
- handleAdd() {
- this.isCheck = false;
- this.reset();
-
- // 如果父组件传入了 materialType,使用它作为默认值
- if (this.querys.materialType) {
- this.form.materialType = this.querys.materialType;
- // 同时设置对应的 itemType
- if (this.querys.materialType === '成品') {
- this.form.itemType = 'product';
- } else if (this.querys.materialType === '原料') {
- this.form.itemType = 'raw_material';
- }
- }
-
- this.open = true;
- this.title = "添加钢卷物料";
- },
/** 修改按钮操作 */
handleUpdate(row) {
this.isCheck = false;