From 236566b02c46f11f684e942b38ec43c310421fa3 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 17 三月 2026 13:06:27 +0800
Subject: [PATCH] 军泰伟业 1.仓储物流需要加上库位,库位暂时分为外购、自制、委外三种类型 2.生产订单加上库存数量,方便实时查看 3.产品发货后,若部分产品退回,可修改订单发货数量(减去退回的产品数量),若订单产品全部退回,可对发货的订单进行取消撤回操作
---
src/views/inventoryManagement/receiptManagement/Record.vue | 78 +++++++++++++++++++++++++++++++-------
1 files changed, 63 insertions(+), 15 deletions(-)
diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index e36c787..0b67f42 100644
--- a/src/views/inventoryManagement/receiptManagement/Record.vue
+++ b/src/views/inventoryManagement/receiptManagement/Record.vue
@@ -25,10 +25,19 @@
:label="item.label"
:value="item.value"/>
</el-select>
+ <span class="search_title ml10">璐ㄦ鐘舵�侊細</span>
+ <el-select v-model="searchForm.type"
+ style="width: 240px"
+ placeholder="璇烽�夋嫨"
+ clearable>
+ <el-option label="鍚堟牸" :value="0" />
+ <el-option label="涓嶅悎鏍�" :value="1" />
+ </el-select>
<el-button type="primary"
@click="handleQuery"
style="margin-left: 10px">鎼滅储
</el-button>
+ <el-button @click="handleReset">閲嶇疆</el-button>
</div>
<div>
<el-button @click="handleOut">瀵煎嚭</el-button>
@@ -73,6 +82,19 @@
<el-table-column label="鍏ュ簱鏁伴噺"
prop="stockInNum"
show-overflow-tooltip/>
+ <el-table-column label="璐ㄦ鐘舵��"
+ prop="type"
+ show-overflow-tooltip
+ width="100">
+ <template #default="scope">
+ <el-tag :type="scope.row.type == 0 ? 'success' : 'danger'" size="small">
+ {{ scope.row.type == 0 ? '鍚堟牸' : '涓嶅悎鏍�' }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="搴撲綅"
+ prop="locationName"
+ show-overflow-tooltip/>
<el-table-column label="鍏ュ簱浜�"
prop="createBy"
show-overflow-tooltip/>
@@ -102,6 +124,7 @@
toRefs,
onMounted,
getCurrentInstance,
+ watch,
} from "vue";
import {ElMessageBox} from "element-plus";
import {
@@ -109,17 +132,16 @@
batchDeleteStockInRecords,
} from "@/api/inventoryManagement/stockInRecord.js";
import {
- findAllQualifiedStockRecordTypeOptions,
- findAllUnqualifiedStockRecordTypeOptions
+ findAllQualifiedStockInRecordTypeOptions, findAllUnQualifiedStockInRecordTypeOptions,
} from "@/api/basicData/enum.js";
const {proxy} = getCurrentInstance();
const props = defineProps({
type: {
- type: String,
+ type: Number,
required: true,
- default: '0'
+ default: 1
}
})
@@ -130,7 +152,7 @@
const stockRecordTypeOptions = ref([]);
const page = reactive({
current: 1,
- size: 100,
+ size: 10,
});
const total = ref(0);
@@ -139,14 +161,25 @@
productName: "",
timeStr: "",
recordType: "",
+ type: "",
},
});
const {searchForm} = toRefs(data);
+
// 鏌ヨ鍒楄〃
/** 鎼滅储鎸夐挳鎿嶄綔 */
const handleQuery = () => {
page.current = 1;
getList();
+};
+
+/** 閲嶇疆鎸夐挳鎿嶄綔 */
+const handleReset = () => {
+ searchForm.value.productName = "";
+ searchForm.value.timeStr = "";
+ searchForm.value.recordType = "";
+ searchForm.value.type = "";
+ handleQuery();
};
const getRecordType = (recordType) => {
@@ -161,12 +194,17 @@
const getList = () => {
tableLoading.value = true;
- const params = {...page, type: props.type};
+ const params = {...page, productType: props.type};
params.timeStr = searchForm.value.timeStr;
params.productName = searchForm.value.productName;
+ params.recordType = searchForm.value.recordType;
+ if (searchForm.value.type !== "") {
+ params.type = searchForm.value.type;
+ }
getStockInRecordListPage(params)
.then(res => {
tableData.value = res.data.records;
+ total.value = res.data.total || 0;
}).finally(() => {
tableLoading.value = false;
})
@@ -174,17 +212,17 @@
// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
const fetchStockRecordTypeOptions = () => {
- if (props.type === '0') {
- findAllQualifiedStockRecordTypeOptions()
+ if (props.type === 1 || props.type === 2) {
+ findAllQualifiedStockInRecordTypeOptions()
.then(res => {
stockRecordTypeOptions.value = res.data;
})
- return
+ } else {
+ findAllUnQualifiedStockInRecordTypeOptions()
+ .then(res => {
+ stockRecordTypeOptions.value = res.data;
+ })
}
- findAllUnqualifiedStockRecordTypeOptions()
- .then(res => {
- stockRecordTypeOptions.value = res.data;
- })
}
// 琛ㄦ牸閫夋嫨鏁版嵁
@@ -202,8 +240,12 @@
type: "warning",
})
.then(() => {
- // 鏍规嵁涓嶅悓鐨� tab 绫诲瀷璋冪敤涓嶅悓鐨勫鍑烘帴鍙�
- proxy.download("/stockInRecord/exportStockInRecord", {type: props.type}, props.type === '0' ? "鍚堟牸鍏ュ簱.xlsx" : "涓嶅悎鏍煎叆搴�.xlsx");
+ const fileNameMap = {
+ 1: '鑷埗鍏ュ簱.xlsx',
+ 2: '澶栬喘鍏ュ簱.xlsx',
+ 3: '濮斿鍏ュ簱.xlsx'
+ };
+ proxy.download("/stockInRecord/exportStockInRecord", {productType: props.type}, fileNameMap[props.type] || '鍏ュ簱.xlsx');
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
@@ -242,6 +284,12 @@
getList();
fetchStockRecordTypeOptions();
});
+
+watch(() => props.type, () => {
+ page.current = 1;
+ getList();
+ fetchStockRecordTypeOptions();
+});
</script>
<style scoped lang="scss"></style>
--
Gitblit v1.9.3