From e3f7ae14a6b98e4fbfba04a0c1bbe26802dfc1c5 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期五, 06 三月 2026 17:39:15 +0800
Subject: [PATCH] Merge branch 'dev_KTHG' of http://114.132.189.42:9002/r/product-inventory-management into dev_KTHG
---
src/views/inventoryManagement/stockManagement/Subtract.vue | 54 +++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 43 insertions(+), 11 deletions(-)
diff --git a/src/views/inventoryManagement/stockManagement/Subtract.vue b/src/views/inventoryManagement/stockManagement/Subtract.vue
index 10fd763..6294513 100644
--- a/src/views/inventoryManagement/stockManagement/Subtract.vue
+++ b/src/views/inventoryManagement/stockManagement/Subtract.vue
@@ -44,6 +44,14 @@
<el-input-number v-model="formState.qualitity" :step="1" :min="1" :max="maxQuality" style="width: 100%" />
</el-form-item>
+ <el-form-item
+ v-if="isRawMaterial"
+ label="鍑�閲�"
+ prop="netWeight"
+ >
+ <el-input-number v-model="formState.netWeight" :precision="2" :step="0.01" :min="0" style="width: 100%" />
+ </el-form-item>
+
<el-form-item label="澶囨敞" prop="remark">
<el-input v-model="formState.remark" type="textarea" />
</el-form-item>
@@ -69,6 +77,7 @@
import {ref, computed, getCurrentInstance} from "vue";
import ProductSelectDialog from "@/views/basicData/product/ProductSelectDialog.vue";
import {subtractStockInventory} from "@/api/inventoryManagement/stockInventory.js";
+import {subtractStockUnInventory} from "@/api/inventoryManagement/stockUninventory.js";
const props = defineProps({
visible: {
@@ -78,7 +87,12 @@
record: {
type: Object,
default: () => {},
- }
+ },
+ type: {
+ type: String,
+ required: true,
+ default: 'qualified',
+ },
});
const emit = defineEmits(['update:visible', 'completed']);
@@ -88,7 +102,11 @@
})
const maxQuality = computed(() => {
- return props.record.qualitity ? props.record.qualitity : 0;
+ return props.record.unLockedQuantity ? props.record.unLockedQuantity : 0;
+})
+
+const isRawMaterial = computed(() => {
+ return props.record.parentName === '鍘熸潗鏂�';
})
const initFormData = () => {
@@ -107,6 +125,7 @@
model: "",
unit: "",
qualitity: 0,
+ netWeight: undefined,
remark: '',
});
@@ -129,8 +148,11 @@
productId: undefined,
productModelId: undefined,
productName: "",
- productModelName: "",
- description: '',
+ model: "",
+ unit: "",
+ qualitity: 0,
+ netWeight: undefined,
+ remark: '',
};
isShow.value = false;
};
@@ -163,13 +185,23 @@
proxy.$modal.msgError("璇烽�夋嫨瑙勬牸");
return;
}
- subtractStockInventory(formState.value).then(res => {
- // 鍏抽棴妯℃�佹
- isShow.value = false;
- // 鍛婄煡鐖剁粍浠跺凡瀹屾垚
- emit('completed');
- proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
- })
+ if (props.type === 'qualified') {
+ subtractStockInventory(formState.value).then(res => {
+ // 鍏抽棴妯℃�佹
+ isShow.value = false;
+ // 鍛婄煡鐖剁粍浠跺凡瀹屾垚
+ emit('completed');
+ proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+ })
+ } else {
+ subtractStockUnInventory(formState.value).then(res => {
+ // 鍏抽棴妯℃�佹
+ isShow.value = false;
+ // 鍛婄煡鐖剁粍浠跺凡瀹屾垚
+ emit('completed');
+ proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+ })
+ }
}
})
};
--
Gitblit v1.9.3