From c05b81c7f50df80ab247a05f9f92af2d799e77cd Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 10 四月 2026 15:59:04 +0800
Subject: [PATCH] feat:1.销售添加是否生产 2.生产订单添加备注
---
src/views/inventoryManagement/stockManagement/Qualified.vue | 51 ++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 42 insertions(+), 9 deletions(-)
diff --git a/src/views/inventoryManagement/stockManagement/Qualified.vue b/src/views/inventoryManagement/stockManagement/Qualified.vue
index 0e78990..6ea8d21 100644
--- a/src/views/inventoryManagement/stockManagement/Qualified.vue
+++ b/src/views/inventoryManagement/stockManagement/Qualified.vue
@@ -2,8 +2,13 @@
<div class="app-container">
<div class="search_form">
<div>
- <span class="search_title ml10">浜у搧澶х被锛�</span>
+ <span class="search_title ml10">浜у搧鍚嶇О锛�</span>
<el-input v-model="searchForm.productName"
+ style="width: 240px"
+ placeholder="璇疯緭鍏�"
+ clearable/>
+ <span class="search_title ml10">瑙勬牸鍨嬪彿锛�</span>
+ <el-input v-model="searchForm.model"
style="width: 240px"
placeholder="璇疯緭鍏�"
clearable/>
@@ -11,7 +16,6 @@
</div>
<div>
<el-button type="primary" @click="isShowNewModal = true">鏂板搴撳瓨</el-button>
- <el-button @click="importTemplate">涓嬭浇瀵煎叆妯℃澘</el-button>
<el-button type="info" plain icon="Upload" @click="isShowImportModal = true">
瀵煎叆搴撳瓨
</el-button>
@@ -26,14 +30,19 @@
<el-table-column align="center" label="搴忓彿" type="index" width="60" />
<el-table-column label="浜у搧澶х被" prop="productName" show-overflow-tooltip />
<el-table-column label="瑙勬牸鍨嬪彿" prop="model" show-overflow-tooltip />
+ <el-table-column label="鎵瑰彿" prop="batchNo" show-overflow-tooltip />
+ <el-table-column label="鏂欏彿" prop="materialCode" show-overflow-tooltip />
<el-table-column label="鍗曚綅" prop="unit" show-overflow-tooltip />
<el-table-column label="搴撳瓨鏁伴噺" prop="qualitity" show-overflow-tooltip />
+ <el-table-column label="鍐荤粨鏁伴噺" prop="lockedQuantity" show-overflow-tooltip />
<el-table-column label="搴撳瓨棰勮鏁伴噺" prop="warnNum" show-overflow-tooltip />
<el-table-column label="澶囨敞" prop="remark" show-overflow-tooltip />
<el-table-column label="鏈�杩戞洿鏂版椂闂�" prop="updateTime" show-overflow-tooltip />
<el-table-column fixed="right" label="鎿嶄綔" min-width="60" align="center">
<template #default="scope">
- <el-button link type="primary" size="small" @click="showSubtractModal(scope.row)" :disabled="scope.row.qualitity === 0">棰嗙敤</el-button>
+ <el-button link type="primary" size="small" @click="showSubtractModal(scope.row)" :disabled="scope.row.unLockedQuantity === 0">棰嗙敤</el-button>
+ <el-button link type="primary" size="small" v-if="scope.row.unLockedQuantity > 0" @click="showFrozenModal(scope.row)">鍐荤粨</el-button>
+ <el-button link type="primary" size="small" v-if="scope.row.lockedQuantity > 0" @click="showThawModal(scope.row)">瑙e喕</el-button>
</template>
</el-table-column>
</el-table>
@@ -48,23 +57,32 @@
<subtract-stock-inventory v-if="isShowSubtractModal"
v-model:visible="isShowSubtractModal"
:record="record"
+ type="qualified"
@completed="handleQuery" />
<!-- 瀵煎叆搴撳瓨-->
<import-stock-inventory v-if="isShowImportModal"
v-model:visible="isShowImportModal"
type="qualified"
@uploadSuccess="handleQuery" />
+ <!-- 鍐荤粨/瑙e喕搴撳瓨-->
+ <frozen-and-thaw-stock-inventory v-if="isShowFrozenAndThawModal"
+ v-model:visible="isShowFrozenAndThawModal"
+ :record="record"
+ :operation-type="operationType"
+ type="qualified"
+ @completed="handleQuery" />
</div>
</template>
<script setup>
import pagination from '@/components/PIMTable/Pagination.vue'
-import { ref, reactive, toRefs, onMounted, getCurrentInstance } from 'vue'
+import { ref, reactive, toRefs, onMounted, getCurrentInstance, defineAsyncComponent } from 'vue'
import {ElMessage, ElMessageBox} from "element-plus";
import { getStockInventoryListPage } from "@/api/inventoryManagement/stockInventory.js";
const NewStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/New.vue"));
const SubtractStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/Subtract.vue"));
const ImportStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/Import.vue"));
+const FrozenAndThawStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/FrozenAndThaw.vue"));
const { proxy } = getCurrentInstance()
const tableData = ref([])
const selectedRows = ref([])
@@ -79,11 +97,16 @@
const isShowNewModal = ref(false)
// 鏄惁鏄剧ず棰嗙敤寮规
const isShowSubtractModal = ref(false)
+// 鏄惁鏄剧ず鍐荤粨/瑙e喕寮规
+const isShowFrozenAndThawModal = ref(false)
+// 鎿嶄綔绫诲瀷
+const operationType = ref('frozen')
// 鏄惁鏄剧ず瀵煎叆寮规
const isShowImportModal = ref(false)
const data = reactive({
searchForm: {
productName: '',
+ model: '',
}
})
const { searchForm } = toRefs(data)
@@ -129,6 +152,20 @@
isShowSubtractModal.value = true
}
+// 鐐瑰嚮鍐荤粨
+const showFrozenModal = (row) => {
+ record.value = row
+ isShowFrozenAndThawModal.value = true
+ operationType.value = 'frozen'
+}
+
+// 鐐瑰嚮瑙e喕
+const showThawModal = (row) => {
+ record.value = row
+ isShowFrozenAndThawModal.value = true
+ operationType.value = 'thaw'
+}
+
// 琛ㄦ牸閫夋嫨鏁版嵁
const handleSelectionChange = (selection) => {
// 杩囨护鎺夊瓙鏁版嵁
@@ -139,7 +176,7 @@
// 琛ㄦ牸琛岀被鍚�
const tableRowClassName = ({ row }) => {
- const stock = Number(row?.inboundNum0 ?? 0);
+ const stock = Number(row?.unLockedQuantity ?? 0);
const warn = Number(row?.warnNum ?? 0);
if (!Number.isFinite(stock) || !Number.isFinite(warn)) {
return '';
@@ -161,10 +198,6 @@
}).catch(() => {
proxy.$modal.msg("宸插彇娑�")
})
-}
-
-const importTemplate =() =>{
- proxy.download("/stockInventory/downloadStockInventory", {}, "搴撳瓨瀵煎叆妯℃澘.xlsx");
}
onMounted(() => {
--
Gitblit v1.9.3