From b7b8670c5d8e031826b76d5556f4d488602762f4 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期二, 31 三月 2026 10:25:46 +0800
Subject: [PATCH] 销售台账和采购台账加UID码
---
src/views/inventoryManagement/dispatchLog/Record.vue | 103 ++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 77 insertions(+), 26 deletions(-)
diff --git a/src/views/inventoryManagement/dispatchLog/Record.vue b/src/views/inventoryManagement/dispatchLog/Record.vue
index 4fb41f0..3860bb2 100644
--- a/src/views/inventoryManagement/dispatchLog/Record.vue
+++ b/src/views/inventoryManagement/dispatchLog/Record.vue
@@ -12,6 +12,16 @@
clearable
@change="handleQuery"
/>
+ <span class="search_title ml10">鏉ユ簮锛�</span>
+ <el-select v-model="searchForm.recordType"
+ style="width: 240px"
+ placeholder="璇烽�夋嫨"
+ clearable>
+ <el-option v-for="item in stockRecordTypeOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"/>
+ </el-select>
<el-button type="primary" @click="handleQuery" style="margin-left: 10px"
>鎼滅储</el-button
>
@@ -19,7 +29,7 @@
<div>
<el-button @click="handleOut">瀵煎嚭</el-button>
<el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
- <el-button type="primary" plain @click="handlePrint">鎵撳嵃</el-button>
+ <!-- <el-button type="primary" plain @click="handlePrint">鎵撳嵃</el-button> -->
</div>
</div>
<div class="table_list">
@@ -35,12 +45,30 @@
>
<el-table-column align="center" type="selection" width="55" />
<el-table-column align="center" label="搴忓彿" type="index" width="60" />
- <el-table-column
+ <!-- <el-table-column
label="鍑哄簱鎵规"
prop="outboundBatches"
min-width="100"
show-overflow-tooltip
- />
+ /> -->
+ <el-table-column
+ label="鎵瑰彿"
+ min-width="120"
+ show-overflow-tooltip
+ >
+ <template #default="scope">
+ {{ scope.row.batchNo || "" }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="渚涘簲鍟�"
+ min-width="160"
+ show-overflow-tooltip
+ >
+ <template #default="scope">
+ {{ scope.row.supplierName || scope.row.customer || "" }}
+ </template>
+ </el-table-column>
<el-table-column
label="鍑哄簱鏃ユ湡"
prop="createTime"
@@ -56,6 +84,9 @@
prop="model"
show-overflow-tooltip
/>
+ <el-table-column label="UID鐮�"
+ prop="uidNO"
+ show-overflow-tooltip/>
<el-table-column
label="鍗曚綅"
prop="unit"
@@ -71,6 +102,13 @@
prop="createBy"
show-overflow-tooltip
/>
+ <el-table-column label="鏉ユ簮"
+ prop="recordType"
+ show-overflow-tooltip>
+ <template #default="scope">
+ {{ getRecordType(scope.row.recordType) }}
+ </template>
+ </el-table-column>
</el-table>
<pagination
v-show="total > 0"
@@ -94,12 +132,17 @@
getStockOutPage,
delStockOut,
} from "@/api/inventoryManagement/stockOut.js";
+import {
+ findAllQualifiedStockOutRecordTypeOptions, findAllUnQualifiedStockOutRecordTypeOptions,
+} from "@/api/basicData/enum.js";
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
const tableData = ref([]);
const selectedRows = ref([]);
const tableLoading = ref(false);
+// 鏉ユ簮绫诲瀷閫夐」
+const stockRecordTypeOptions = ref([]);
const page = reactive({
current: 1,
size: 100,
@@ -123,26 +166,8 @@
searchForm: {
supplierName: "",
timeStr: "",
- },
- form: {
- supplierId: null,
- supplierName: '',
- productId: null,
- productName: '',
- userId: userStore.userId,
- nickName: '',
- model: '',
- productModelId: null,
- unit: '',
- productrecordId: null,
- taxInclusiveUnitPrice: '',
- taxInclusiveTotalPrice: '',
- taxRate: '',
- taxExclusiveTotalPrice: '',
- inboundTime: '',
- inboundBatch: '',
- inboundQuantity: ''
- },
+ recordType: "",
+ }
});
const { searchForm } = toRefs(data);
@@ -173,6 +198,25 @@
});
};
+const getRecordType = (recordType) => {
+ return stockRecordTypeOptions.value.find(item => item.value === recordType)?.label || ''
+}
+
+// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
+const fetchStockRecordTypeOptions = () => {
+ if (props.type === '0') {
+ findAllQualifiedStockOutRecordTypeOptions()
+ .then(res => {
+ stockRecordTypeOptions.value = res.data;
+ })
+ return
+ }
+ findAllUnQualifiedStockOutRecordTypeOptions()
+ .then(res => {
+ stockRecordTypeOptions.value = res.data;
+ })
+}
+
// 琛ㄦ牸閫夋嫨鏁版嵁
const handleSelectionChange = (selection) => {
// 杩囨护鎺夊瓙鏁版嵁
@@ -189,7 +233,7 @@
type: "warning",
})
.then(() => {
- proxy.download("/stockmanagement/export", {}, "鍑哄簱鍙拌处.xlsx");
+ proxy.download("/stockOutRecord/exportStockOutRecord", {type: props.type}, props.type === '0' ? "鍚堟牸鍑哄簱鍙拌处.xlsx" : "涓嶅悎鏍煎嚭搴撳彴璐�.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
@@ -398,8 +442,14 @@
</div>
</div>
<div class="info-row">
- <span class="label">鍗曞彿锛�</span>
- <span class="value">${item.code || ''}</span>
+ <div>
+ <span class="label">鎵瑰彿锛�</span>
+ <span class="value">${item.batchNo || item.outboundBatches || ''}</span>
+ </div>
+ <div>
+ <span class="label">鍗曞彿锛�</span>
+ <span class="value">${item.code || ''}</span>
+ </div>
</div>
</div>
@@ -512,6 +562,7 @@
};
onMounted(() => {
getList();
+ fetchStockRecordTypeOptions();
});
</script>
--
Gitblit v1.9.3