From 830adfef9c17ff8915761ff218f9d8e8a04bc3ea Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 03 二月 2026 15:33:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_新_双奇点' into dev_新_双奇点
---
src/views/inventoryManagement/stockManagement/Qualified.vue | 79 +++++++++++++++++++++++++++++++++------
1 files changed, 66 insertions(+), 13 deletions(-)
diff --git a/src/views/inventoryManagement/stockManagement/Qualified.vue b/src/views/inventoryManagement/stockManagement/Qualified.vue
index 0e78990..f27df18 100644
--- a/src/views/inventoryManagement/stockManagement/Qualified.vue
+++ b/src/views/inventoryManagement/stockManagement/Qualified.vue
@@ -2,16 +2,22 @@
<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-select v-model="searchForm.parentId"
+ style="width: 240px"
+ placeholder="璇疯緭鍏�"
+ clearable>
+ <el-option v-for="item of selectList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+ </el-select>
<el-button type="primary" @click="handleQuery" style="margin-left: 10px">鎼滅储</el-button>
</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>
@@ -24,16 +30,19 @@
:row-class-name="tableRowClassName" height="calc(100vh - 18.5em)">
<el-table-column align="center" type="selection" width="55" />
<el-table-column align="center" label="搴忓彿" type="index" width="60" />
- <el-table-column label="浜у搧澶х被" prop="productName" show-overflow-tooltip />
+ <el-table-column label="浜у搧鍚嶇О" prop="productName" show-overflow-tooltip />
<el-table-column label="瑙勬牸鍨嬪彿" prop="model" 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,12 +57,20 @@
<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>
@@ -61,10 +78,11 @@
import pagination from '@/components/PIMTable/Pagination.vue'
import { ref, reactive, toRefs, onMounted, getCurrentInstance } from 'vue'
import {ElMessage, ElMessageBox} from "element-plus";
-import { getStockInventoryListPage } from "@/api/inventoryManagement/stockInventory.js";
+import { getStockInventoryListPage, getProductList } 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,14 +97,30 @@
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: '',
- }
+ },
+ selectList:[
+ {
+ id:1,
+ label:1
+ },{
+ id:2,
+ label:2
+ },{
+ id:3,
+ label:3
+ }
+ ]
})
-const { searchForm } = toRefs(data)
+const { searchForm, selectList } = toRefs(data)
// 鏌ヨ鍒楄〃
/** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -129,6 +163,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 +187,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 '';
@@ -162,13 +210,18 @@
proxy.$modal.msg("宸插彇娑�")
})
}
-
-const importTemplate =() =>{
- proxy.download("/stockInventory/downloadStockInventory", {}, "搴撳瓨瀵煎叆妯℃澘.xlsx");
+// 鑾峰彇浜у搧澶х被涓嬫媺
+const productCategorySelectList =async ()=>{
+ let res =await getProductList()
+ console.log(res)
+ if(res?.code === 200 && res?.data) {
+ selectList.value = res.data
+ }
}
-onMounted(() => {
- getList()
+onMounted(async() => {
+ await productCategorySelectList()
+ await getList()
})
</script>
--
Gitblit v1.9.3