From 01b53033db11aa30ed6d408f6b5c8f27cd851b17 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期五, 09 一月 2026 11:42:03 +0800
Subject: [PATCH] 1.基础数据-供应商黑名单,添加资质管理字段,可上传资质文件 2.采购管理-收货管理-添加入库数量输入和合格状态选择功能,实现采购异常记录的添加和更新接口 3.客户档案-分类功能,零售客户和进销商客户 4.添加采购审批页面,显示台账审批状态 5.固定资产核算界面,库存核算统计页面-移至军泰伟业
---
src/views/procurementManagement/procurementLedger/index.vue | 97 ++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 84 insertions(+), 13 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 7b81814..80e0cc7 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -21,6 +21,10 @@
<el-input v-model="searchForm.salesContractNo" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
@change="handleQuery" />
</el-form-item>
+ <el-form-item label="椤圭洰鍚嶇О锛�">
+ <el-input v-model="searchForm.projectName" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
+ @change="handleQuery" />
+ </el-form-item>
<el-form-item label="褰曞叆鏃ユ湡锛�">
<el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
placeholder="璇烽�夋嫨" clearable @change="changeDaterange" />
@@ -50,6 +54,7 @@
:summary-method="summarizeMainTable"
@expand-change="expandChange"
height="calc(100vh - 19em)"
+ :row-class-name="tableRowClassName"
>
<el-table-column align="center" type="selection" width="55" />
<el-table-column type="expand">
@@ -106,6 +111,32 @@
prop="supplierName"
show-overflow-tooltip
/>
+ <el-table-column label="璁㈠崟鐘舵��" width="100" align="center">
+ <template #default="scope">
+ <el-tag v-if="scope.row.isInvalid" type="danger" size="small">澶辨晥</el-tag>
+ <el-tag v-else type="success" size="small">姝e父</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="椤圭洰鍚嶇О"
+ prop="projectName"
+ width="420"
+ show-overflow-tooltip
+ />
+ <el-table-column
+ label="瀹℃壒鐘舵��"
+ prop="approvalStatus"
+ width="200"
+ show-overflow-tooltip
+ >
+ <template #default="scope">
+ <el-tag
+ size="small"
+ >
+ {{ approvalStatusText[scope.row.approvalStatus] || '鏈煡鐘舵��' }}
+ </el-tag>
+ </template>
+ </el-table-column>
<el-table-column
label="绛捐鏃ユ湡"
prop="executionDate"
@@ -208,6 +239,7 @@
placeholder="璇烽�夋嫨"
filterable
clearable
+ @change="salesLedgerChange"
>
<el-option
v-for="item in salesContractList"
@@ -683,6 +715,15 @@
</el-row>
<el-row :gutter="20">
<el-col :span="12">
+ <el-form-item label="椤圭洰鍚嶇О锛�" prop="projectName">
+ <el-input
+ v-model="scanAddForm.projectName"
+ placeholder="璇疯緭鍏�"
+ clearable
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
<el-form-item label="鍚堝悓閲戦(鍏�)锛�" prop="contractAmount">
<el-input-number
v-model="scanAddForm.contractAmount"
@@ -761,6 +802,11 @@
</el-row>
<el-row :gutter="20">
<el-col :span="12">
+ <el-form-item label="椤圭洰鍚嶇О锛�">
+ <el-input v-model="scanForm.projectName" disabled />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
<el-form-item label="鎵爜鏃堕棿锛�">
<el-input v-model="scanForm.scanTime" disabled />
</el-form-item>
@@ -824,7 +870,7 @@
</template>
<script setup>
-import { getToken } from "@/utils/auth";
+import {getToken} from "@/utils/auth";
import pagination from "@/components/PIMTable/Pagination.vue";
import { ref, onMounted, reactive, toRefs, getCurrentInstance, nextTick } from "vue";
import { Search } from "@element-plus/icons-vue";
@@ -840,18 +886,20 @@
} from "@/api/salesManagement/salesLedger.js";
import {
addOrEditPurchase,
+ addPurchaseTemplate,
+ createPurchaseNo,
delPurchase,
getSalesNo,
purchaseListPage,
productList,
getPurchaseById,
getOptions,
- createPurchaseNo,
- getPurchaseTemplateList,
- addPurchaseTemplate,
+ getPurchaseTemplateList
} from "@/api/procurementManagement/procurementLedger.js";
import useFormData from "@/hooks/useFormData.js";
import QRCode from "qrcode";
+
+
const { proxy } = getCurrentInstance();
const tableData = ref([]);
const productData = ref([]);
@@ -984,6 +1032,7 @@
supplierName: "", // 渚涘簲鍟嗗悕绉�
purchaseContractNumber: "", // 閲囪喘鍚堝悓缂栧彿
salesContractNo: "", // 閿�鍞悎鍚岀紪鍙�
+ projectName: "", // 椤圭洰鍚嶇О
entryDate: null, // 褰曞叆鏃ユ湡
entryDateStart: undefined,
entryDateEnd: undefined,
@@ -991,6 +1040,7 @@
form: {
purchaseContractNumber: "",
salesLedgerId: "",
+ projectName: "",
recorderId: "",
entryDate: "",
productData: [],
@@ -1005,6 +1055,7 @@
],
approverId:[{ required: true, message: "璇烽�夋嫨瀹℃壒浜�", trigger: "change" }],
projectName:[{ required:true, message:"璇疯緭鍏ラ」鐩悕绉�", trigger:"blur"}],
+ supplierId: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
entryDate: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
executionDate: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
},
@@ -1192,8 +1243,13 @@
purchaseListPage({ ...rest, ...page })
.then((res) => {
tableLoading.value = false;
- tableData.value = res.data.records;
- tableData.value.map((item) => {
+ // tableData.value = res.data.records;
+ tableData.value = res.data.records.map(record => ({
+ ...record,
+ isInvalid: record.isWhite === 1
+ }));
+ // 鍒濆鍖栧瓙鏁版嵁鏁扮粍
+ tableData.value.forEach((item) => {
item.children = [];
});
total.value = res.data.total;
@@ -1333,18 +1389,24 @@
}
}
// 绉婚櫎鏂囦欢
-function handleRemove(file) {
+async function handleRemove(file) {
+ if (!file?.id) {
+ return;
+ }
console.log("handleRemove", file.id);
if (file.size > 1024 * 1024 * 10) {
// 浠呭墠绔竻鐞嗭紝涓嶈皟鐢ㄥ垹闄ゆ帴鍙e拰鎻愮ず
- return;
+ return;
}
- if (operationType.value === "edit") {
- let ids = [];
- ids.push(file.id);
- delLedgerFile(ids).then((res) => {
+
+ if (operationType.value === "edit" && file.id) {
+ try {
+ await delLedgerFile([file.id]);
proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- });
+ } catch (error) {
+ console.error('鍒犻櫎鏂囦欢澶辫触:', error);
+ proxy.$modal.msgError("鍒犻櫎鏂囦欢澶辫触");
+ }
}
}
// 鎻愪氦琛ㄥ崟
@@ -1711,6 +1773,7 @@
scanContent: "",
purchaseContractNumber: "",
supplierName: "",
+ projectName: "",
contractAmount: "",
paymentMethod: "",
recorderName: "",
@@ -1719,6 +1782,7 @@
const scanAddRules = {
purchaseContractNumber: [{ required: true, message: "璇疯緭鍏ラ噰璐悎鍚屽彿", trigger: "blur" }],
supplierName: [{ required: true, message: "璇疯緭鍏ヤ緵搴斿晢鍚嶇О", trigger: "blur" }],
+ projectName: [{ required: true, message: "璇疯緭鍏ラ」鐩悕绉�", trigger: "blur" }],
};
// 鎵爜鐧昏瀵硅瘽妗嗙浉鍏冲彉閲�
@@ -1726,6 +1790,7 @@
const scanForm = reactive({
purchaseContractNumber: "",
supplierName: "",
+ projectName: "",
scanTime: "",
scannerName: "",
scanStatus: "鏈壂鐮�",
@@ -1741,6 +1806,7 @@
scanAddForm.scanContent = "";
scanAddForm.purchaseContractNumber = "";
scanAddForm.supplierName = "";
+ scanAddForm.projectName = "";
scanAddForm.contractAmount = "";
scanAddForm.paymentMethod = "";
scanAddForm.recorderName = userStore.nickName;
@@ -1760,6 +1826,9 @@
scanAddForm.supplierName = parts[1] || "";
scanAddForm.contractAmount = parts[2] || "";
scanAddForm.paymentMethod = parts[3] || "";
+ scanAddForm.projectName = parts[4] || "";
+ // scanAddForm.contractAmount = parts[3] || "";
+ // scanAddForm.paymentMethod = parts[4] || "";
}
};
@@ -1777,6 +1846,7 @@
const newData = {
purchaseContractNumber: scanAddForm.purchaseContractNumber,
supplierName: scanAddForm.supplierName,
+ projectName: scanAddForm.projectName,
contractAmount: scanAddForm.contractAmount,
paymentMethod: scanAddForm.paymentMethod,
recorderName: scanAddForm.recorderName,
@@ -1799,6 +1869,7 @@
const openScanDialog = (row) => {
scanForm.purchaseContractNumber = row.purchaseContractNumber;
scanForm.supplierName = row.supplierName;
+ scanForm.projectName = row.projectName;
scanForm.scanTime = getCurrentDateTime();
scanForm.scannerName = userStore.nickName;
scanForm.scanStatus = "鏈壂鐮�";
--
Gitblit v1.9.3