-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 删除
-
-
-
-
-
- {{ submitLoading ? '提交中...' : '确认' }}
-
-
+
+
diff --git a/klp-ui/src/views/wms/purchasePlan/panels/detail.vue b/klp-ui/src/views/wms/purchasePlan/panels/detail.vue
index 7ef71357..aa898eb6 100644
--- a/klp-ui/src/views/wms/purchasePlan/panels/detail.vue
+++ b/klp-ui/src/views/wms/purchasePlan/panels/detail.vue
@@ -129,7 +129,7 @@
-
+
@@ -138,7 +138,7 @@
-
+
@@ -163,11 +163,13 @@
import { listPurchasePlanDetail, getPurchasePlanDetail, delPurchasePlanDetail, addPurchasePlanDetail, updatePurchasePlanDetail } from "@/api/wms/purchasePlanDetail";
import { EPurchaseDetailStatus } from "@/utils/enums";
import StockInDialog from "./stockin.vue";
+import RawMaterialSelect from '@/components/KLPService/RawMaterialSelect';
export default {
name: "PurchasePlanDetail",
components: {
- StockInDialog
+ StockInDialog,
+ RawMaterialSelect
},
props: {
planId: {
@@ -411,6 +413,11 @@ export default {
this.getList();
this.stockInVisible = false;
this.selectedArrivalItems = []; // 清空选中的明细
+ },
+ onRawMaterialChange(rawMaterial) {
+ if (rawMaterial && rawMaterial.unit) {
+ this.form.unit = rawMaterial.unit;
+ }
}
}
};
diff --git a/klp-ui/src/views/wms/stockIo/panels/detail.vue b/klp-ui/src/views/wms/stockIo/panels/detail.vue
index e2edb401..ab873457 100644
--- a/klp-ui/src/views/wms/stockIo/panels/detail.vue
+++ b/klp-ui/src/views/wms/stockIo/panels/detail.vue
@@ -70,7 +70,6 @@
-
-
+
+
+
+
+
@@ -155,9 +158,9 @@
-
-
-
+
+
@@ -165,11 +168,13 @@
v-if="form.itemType === ITEM_TYPE.RAW_MATERIAL"
v-model="form.itemId"
placeholder="请选择原材料"
+ @change="onItemChange"
/>
-
+
@@ -217,6 +222,7 @@ export default {
RawMaterialSelect,
ProductSelect
},
+ dicts: ['stock_item_type'],
props: {
stockIo: {
type: Object,
@@ -260,7 +266,8 @@ export default {
single: true,
multiple: true,
statusLoading: false, // 新增状态修改按钮加载状态
- cancelLoading: false // 撤回按钮加载状态
+ cancelLoading: false, // 撤回按钮加载状态
+ unitDisabled: false // 新增:单位输入框是否禁用
};
},
watch: {
@@ -405,6 +412,7 @@ export default {
batchNo: undefined,
remark: undefined
};
+ this.unitDisabled = false; // 新增:重置单位输入框为可编辑
this.resetForm("form");
},
cancel() {
@@ -526,6 +534,12 @@ export default {
if (type === 'return') return 'warning';
if (type === 'relocation') return 'info';
return 'default';
+ },
+ onItemChange(e) {
+ if (e && e.unit) {
+ this.form.unit = e.unit;
+ this.unitDisabled = true;
+ }
}
}
}