From 90b6240233ef9a896a4075758eabb7342e2c49a0 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 21 四月 2026 09:00:56 +0800
Subject: [PATCH] 湟水峡 1.销售、采购模块不要客户合同号、项目名称 2.销售报价和销售台账价格导入按照客户类型赋值 3.人力资源字段增减 4.仓储物流四根模块tab标签页和查询条件修改 5.销售、采购模块字段增减
---
src/views/procurementManagement/procurementLedger/index.vue | 570 ++++++++++++++++++++++++--------------------------------
1 files changed, 242 insertions(+), 328 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 571e7ab..25f218b 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -21,10 +21,6 @@
<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" />
@@ -39,7 +35,6 @@
<div class="table_list">
<div style="display: flex;justify-content: flex-end;margin-bottom: 20px;">
<el-button type="primary" @click="openForm('add')">鏂板鍙拌处</el-button>
- <el-button type="success" @click="openScanAddDialog">鎵爜鏂板</el-button>
<el-button @click="handleOut">瀵煎嚭</el-button>
<el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
</div>
@@ -53,7 +48,7 @@
show-summary
:summary-method="summarizeMainTable"
@expand-change="expandChange"
- height="calc(100vh - 18.5em)"
+ height="calc(100vh - 19em)"
>
<el-table-column align="center" type="selection" width="55" />
<el-table-column type="expand">
@@ -108,16 +103,21 @@
/>
<el-table-column
label="渚涘簲鍟嗗悕绉�"
- width="240"
prop="supplierName"
show-overflow-tooltip
/>
- <el-table-column
- label="椤圭洰鍚嶇О"
- prop="projectName"
- width="420"
- show-overflow-tooltip
- />
+ <el-table-column label="瀹℃壒鐘舵��"
+ prop="approvalStatus"
+ width="100"
+ show-overflow-tooltip>
+ <template #default="scope">
+ <el-tag
+ :type="getApprovalStatusType(scope.row.approvalStatus)"
+ size="small">
+ {{ approvalStatusText[scope.row.approvalStatus] || '鏈煡鐘舵��' }}
+ </el-tag>
+ </template>
+ </el-table-column>
<el-table-column
label="浠樻鏂瑰紡"
width="100"
@@ -127,7 +127,6 @@
<el-table-column
label="鍚堝悓閲戦(鍏�)"
prop="contractAmount"
- width="200"
show-overflow-tooltip
:formatter="formattedNumber"
/>
@@ -146,7 +145,7 @@
<el-table-column
fixed="right"
label="鎿嶄綔"
- min-width="150"
+ width="100"
align="center"
>
<template #default="scope">
@@ -155,14 +154,8 @@
type="primary"
size="small"
@click="openForm('edit', scope.row)"
+ :disabled="scope.row.approvalStatus !== 1 && scope.row.approvalStatus !== 4"
>缂栬緫</el-button
- >
- <el-button
- link
- type="success"
- size="small"
- @click="showQRCode(scope.row)"
- >鐢熸垚浜岀淮鐮�</el-button
>
</template>
@@ -224,9 +217,8 @@
<el-select
v-model="form.supplierId"
placeholder="璇烽�夋嫨"
+ filterable
clearable
- filterable
- allow-create
>
<el-option
v-for="item in supplierList"
@@ -235,15 +227,6 @@
:value="item.id"
/>
</el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="椤圭洰鍚嶇О锛�" prop="projectName">
- <el-input
- v-model="form.projectName"
- placeholder="璇疯緭鍏�"
- clearable
- />
</el-form-item>
</el-col>
</el-row>
@@ -303,6 +286,50 @@
</el-form-item>
</el-col>
</el-row>
+ <el-row :gutter="30">
+ <el-col :span="24">
+ <el-form-item>
+ <template #label>
+ <div style="display: flex; align-items: center; justify-content: space-between; width: 100%;">
+ <span>瀹℃壒浜洪�夋嫨锛�</span>
+ <el-button type="primary" size="small" @click="addApproverNode" icon="Plus">鏂板鑺傜偣</el-button>
+ </div>
+ </template>
+ <div class="approver-nodes-container">
+ <div
+ v-for="(node, index) in approverNodes"
+ :key="node.id"
+ class="approver-node-item"
+ >
+ <div class="approver-node-header">
+ <span class="approver-node-label">瀹℃壒鑺傜偣 {{ index + 1 }}</span>
+ <el-button
+ v-if="approverNodes.length > 1"
+ type="danger"
+ size="small"
+ text
+ @click="removeApproverNode(index)"
+ icon="Delete"
+ >鍒犻櫎</el-button>
+ </div>
+ <el-select
+ v-model="node.userId"
+ placeholder="璇烽�夋嫨瀹℃壒浜�"
+ filterable
+ style="width: 100%;"
+ >
+ <el-option
+ v-for="user in userList"
+ :key="user.userId"
+ :label="user.nickName"
+ :value="user.userId"
+ />
+ </el-select>
+ </div>
+ </div>
+ </el-form-item>
+ </el-col>
+ </el-row>
<el-row>
<el-form-item label="浜у搧淇℃伅锛�" prop="entryDate">
<el-button type="primary" @click="openProductForm('add')"
@@ -475,22 +502,24 @@
</el-col>
<el-col :span="12">
<el-form-item label="绋庣巼(%)锛�" prop="taxRate">
- <el-select
- v-model="productForm.taxRate"
- placeholder="璇烽�夋嫨"
- clearable
- @change="mathNum"
- >
- <el-option label="1" value="1" />
- <el-option label="6" value="6" />
- <el-option label="13" value="13" />
- </el-select>
+<!-- <el-select-->
+<!-- v-model="productForm.taxRate"-->
+<!-- placeholder="璇烽�夋嫨"-->
+<!-- clearable-->
+<!-- @change="mathNum"-->
+<!-- >-->
+<!-- <el-option label="1" value="1" />-->
+<!-- <el-option label="6" value="6" />-->
+<!-- <el-option label="13" value="13" />-->
+<!-- </el-select>-->
+ <el-input-number :step="1" :min="0" v-model="productForm.taxRate" style="width: 100%"
+ placeholder="璇疯緭鍏�" clearable @change="calculateFromTaxRate" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="12">
- <el-form-item label="鍚◣鍗曚环(鍏�)锛�" prop="taxInclusiveUnitPrice">
+ <el-form-item label="鍚◣/涓嶅惈绋庡崟浠�(鍏�)锛�" prop="taxInclusiveUnitPrice">
<el-input-number
v-model="productForm.taxInclusiveUnitPrice"
:precision="2"
@@ -533,7 +562,7 @@
label="涓嶅惈绋庢�讳环(鍏�)锛�"
prop="taxExclusiveTotalPrice"
>
- <el-input
+ <el-input
v-model="productForm.taxExclusiveTotalPrice"
@change="reverseMathNum('taxExclusiveTotalPrice')"
/>
@@ -573,129 +602,6 @@
</div>
</template>
</el-dialog>
-
- <!-- 浜岀淮鐮佹樉绀哄璇濇 -->
- <el-dialog
- v-model="qrCodeDialogVisible"
- title="閲囪喘鍚堝悓鍙蜂簩缁寸爜"
- width="400px"
- center
- >
- <div style="text-align: center;">
- <img :src="qrCodeUrl" alt="浜岀淮鐮�" style="width:200px;height:200px;" />
- <div style="margin: 20px;">
- <el-button type="primary" @click="downloadQRCode">涓嬭浇浜岀淮鐮佸浘鐗�</el-button>
- </div>
- </div>
- </el-dialog>
-
- <!-- 鎵爜鏂板瀵硅瘽妗� -->
- <el-dialog
- v-model="scanAddDialogVisible"
- title="鎵爜鏂板閲囪喘鍙拌处"
- width="70%"
- @close="closeScanAddDialog"
- >
- <el-form
- :model="scanAddForm"
- label-width="140px"
- label-position="top"
- :rules="scanAddRules"
- ref="scanAddFormRef"
- >
- <el-row :gutter="20">
- <el-col :span="24">
- <el-form-item label="鎵爜鍐呭锛�">
- <el-input
- v-model="scanAddForm.scanContent"
- type="textarea"
- :rows="3"
- placeholder="璇锋壂鎻忎簩缁寸爜鎴栨墜鍔ㄨ緭鍏ラ噰璐悎鍚屼俊鎭�"
- @input="parseScanContent"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="閲囪喘鍚堝悓鍙凤細" prop="purchaseContractNumber">
- <el-input
- v-model="scanAddForm.purchaseContractNumber"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="渚涘簲鍟嗗悕绉帮細" prop="supplierName">
- <el-input
- v-model="scanAddForm.supplierName"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- </el-col>
- </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"
- :precision="2"
- :step="0.1"
- clearable
- style="width: 100%"
- placeholder="璇疯緭鍏�"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="浠樻鏂瑰紡锛�">
- <el-input
- v-model="scanAddForm.paymentMethod"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="褰曞叆浜猴細">
- <el-input v-model="scanAddForm.recorderName" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="24">
- <el-form-item label="澶囨敞锛�">
- <el-input
- v-model="scanAddForm.remark"
- type="textarea"
- :rows="2"
- placeholder="璇疯緭鍏ュ娉ㄤ俊鎭�"
- clearable
- />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <template #footer>
- <div class="dialog-footer">
- <el-button type="primary" @click="submitScanAdd">纭鏂板</el-button>
- <el-button @click="closeScanAddDialog">鍙栨秷</el-button>
- </div>
- </template>
- </el-dialog>
<!-- 鎵爜鐧昏瀵硅瘽妗� -->
<el-dialog
@@ -724,11 +630,6 @@
</el-col>
</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 />
@@ -840,10 +741,6 @@
const userStore = useUserStore();
-// 浜岀淮鐮佺浉鍏冲彉閲�
-const qrCodeDialogVisible = ref(false);
-const qrCodeUrl = ref("");
-
// 鐢ㄦ埛淇℃伅琛ㄥ崟寮规鏁版嵁
const operationType = ref("");
const dialogFormVisible = ref(false);
@@ -852,7 +749,6 @@
supplierName: "", // 渚涘簲鍟嗗悕绉�
purchaseContractNumber: "", // 閲囪喘鍚堝悓缂栧彿
salesContractNo: "", // 閿�鍞悎鍚岀紪鍙�
- projectName: "", // 椤圭洰鍚嶇О
entryDate: null, // 褰曞叆鏃ユ湡
entryDateStart: undefined,
entryDateEnd: undefined,
@@ -910,15 +806,15 @@
taxInclusiveUnitPrice: [
{ required: true, message: "璇疯緭鍏�", trigger: "blur" },
],
- taxRate: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
- warnNum: [{ required: false, message: "璇烽�夋嫨", trigger: "change" }],
+ // taxRate: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
+ warnNum: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
taxInclusiveTotalPrice: [
{ required: true, message: "璇疯緭鍏�", trigger: "blur" },
],
taxExclusiveTotalPrice: [
{ required: true, message: "璇疯緭鍏�", trigger: "blur" },
],
- invoiceType: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
+ // invoiceType: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
},
});
const { productForm, productRules } = toRefs(productFormData);
@@ -928,6 +824,34 @@
// 璁剧疆涓婁紶鐨勮姹傚ご閮�
headers: { Authorization: "Bearer " + getToken() },
});
+// 瀹℃壒浜鸿妭鐐癸紙浠块攢鍞彴璐﹀彂璐у鎵逛汉锛�
+const approverNodes = ref([{ id: 1, userId: null }]);
+let nextApproverId = 2;
+const addApproverNode = () => {
+ approverNodes.value.push({ id: nextApproverId++, userId: null });
+};
+const removeApproverNode = (index) => {
+ approverNodes.value.splice(index, 1);
+};
+
+// 璁㈠崟瀹℃壒鐘舵�佹樉绀烘枃鏈�
+const approvalStatusText = {
+ 1: "寰呭鏍�",
+ 2: "瀹℃壒涓�",
+ 3: "瀹℃壒閫氳繃",
+ 4: "瀹℃壒澶辫触",
+};
+
+// 鑾峰彇瀹℃壒鐘舵�佹爣绛剧被鍨�
+const getApprovalStatusType = (status) => {
+ const typeMap = {
+ 1: "info", // 寰呭鏍� - 鐏拌壊
+ 2: "warning", // 瀹℃壒涓� - 姗欒壊
+ 3: "success", // 瀹℃壒閫氳繃 - 缁胯壊
+ 4: "danger", // 瀹℃壒澶辫触 - 绾㈣壊
+ };
+ return typeMap[status] || "info";
+};
const changeDaterange = (value) => {
if (value) {
@@ -1094,9 +1018,9 @@
// 绉婚櫎鏂囦欢
function handleRemove(file) {
console.log("handleRemove", file.id);
- if (file.size > 1024 * 1024 * 10) {
+ if (file.size > 1024 * 1024 * 10) {
// 浠呭墠绔竻鐞嗭紝涓嶈皟鐢ㄥ垹闄ゆ帴鍙e拰鎻愮ず
- return;
+ return;
}
if (operationType.value === "edit") {
let ids = [];
@@ -1110,6 +1034,13 @@
const submitForm = () => {
proxy.$refs["formRef"].validate((valid) => {
if (valid) {
+ // 瀹℃壒浜哄繀濉牎楠岋紙鎵�鏈夎妭鐐归兘瑕侀�変汉锛�
+ const hasEmptyApprover = approverNodes.value.some(node => !node.userId);
+ if (hasEmptyApprover) {
+ proxy.$modal.msgError("璇蜂负鎵�鏈夊鎵硅妭鐐归�夋嫨瀹℃壒浜猴紒");
+ return;
+ }
+ const approveUserIds = approverNodes.value.map(node => node.userId).join(",");
if (productData.value.length > 0) {
form.value.productData = proxy.HaveJson(productData.value);
} else {
@@ -1122,6 +1053,7 @@
}
form.value.tempFileIds = tempFileIds;
form.value.type = 2;
+ form.value.approveUserIds = approveUserIds;
addOrEditPurchase(form.value).then((res) => {
proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
closeDia();
@@ -1330,11 +1262,18 @@
const day = String(today.getDate()).padStart(2, "0");
return `${year}-${month}-${day}`;
}
+// 绋庣巼鍙兘涓虹┖锛氳繑鍥� number 鎴� null
+const getTaxRateNumberOrNull = () => {
+ const raw = productForm.value?.taxRate;
+ if (raw === null || raw === undefined || raw === "") return null;
+ const n = Number(raw);
+ return Number.isFinite(n) ? n : null;
+};
const mathNum = () => {
- if (!productForm.value.taxRate) {
- proxy.$modal.msgWarning("璇峰厛閫夋嫨绋庣巼");
- return;
- }
+ // if (!productForm.value.taxRate) {
+ // proxy.$modal.msgWarning("璇峰厛閫夋嫨绋庣巼");
+ // return;
+ // }
if (!productForm.value.taxInclusiveUnitPrice) {
return;
}
@@ -1347,48 +1286,68 @@
productForm.value.taxInclusiveUnitPrice,
productForm.value.quantity
);
- if (productForm.value.taxRate) {
- // 涓嶅惈绋庢�讳环璁$畻
+
+ // 涓嶅惈绋庢�讳环璁$畻锛堢◣鐜囧彲鑳戒负绌猴級
+ const taxRate = getTaxRateNumberOrNull();
+ if (taxRate === null) {
+ // 鏈~鍐欑◣鐜囨椂锛氭寜鈥滃惈绋�/涓嶅惈绋庝竴鑷粹�濆鐞嗭紝閬垮厤鍑虹幇 NaN
+ productForm.value.taxExclusiveTotalPrice = productForm.value.taxInclusiveTotalPrice;
+ } else {
productForm.value.taxExclusiveTotalPrice =
proxy.calculateTaxExclusiveTotalPrice(
productForm.value.taxInclusiveTotalPrice,
- productForm.value.taxRate
+ taxRate
);
}
+ // if (productForm.value.taxRate) {
+ // // 涓嶅惈绋庢�讳环璁$畻
+ // productForm.value.taxExclusiveTotalPrice =
+ // proxy.calculateTaxExclusiveTotalPrice(
+ // productForm.value.taxInclusiveTotalPrice,
+ // productForm.value.taxRate
+ // );
+ // }
};
const reverseMathNum = (field) => {
- if (!productForm.value.taxRate) {
- proxy.$modal.msgWarning("璇峰厛閫夋嫨绋庣巼");
- return;
- }
- const taxRate = Number(productForm.value.taxRate);
- if (!taxRate) return;
+ // if (!productForm.value.taxRate) {
+ // proxy.$modal.msgWarning("璇峰厛閫夋嫨绋庣巼");
+ // return;
+ // }
+ const taxRate = getTaxRateNumberOrNull();
if (field === 'taxInclusiveTotalPrice') {
// 宸茬煡鍚◣鎬讳环鍜屾暟閲忥紝鍙嶇畻鍚◣鍗曚环
if (productForm.value.quantity) {
- productForm.value.taxInclusiveUnitPrice =
+ productForm.value.taxInclusiveUnitPrice =
(Number(productForm.value.taxInclusiveTotalPrice) / Number(productForm.value.quantity)).toFixed(2);
}
// 宸茬煡鍚◣鎬讳环鍜屽惈绋庡崟浠凤紝鍙嶇畻鏁伴噺
else if (productForm.value.taxInclusiveUnitPrice) {
- productForm.value.quantity =
+ productForm.value.quantity =
(Number(productForm.value.taxInclusiveTotalPrice) / Number(productForm.value.taxInclusiveUnitPrice)).toFixed(2);
}
- // 鍙嶇畻涓嶅惈绋庢�讳环
- productForm.value.taxExclusiveTotalPrice =
- (Number(productForm.value.taxInclusiveTotalPrice) / (1 + taxRate / 100)).toFixed(2);
+ // 鍙嶇畻涓嶅惈绋庢�讳环锛堢◣鐜囧彲鑳戒负绌猴級
+ if (taxRate === null) {
+ productForm.value.taxExclusiveTotalPrice = productForm.value.taxInclusiveTotalPrice;
+ } else {
+ productForm.value.taxExclusiveTotalPrice =
+ (Number(productForm.value.taxInclusiveTotalPrice) / (1 + taxRate / 100)).toFixed(2);
+ }
} else if (field === 'taxExclusiveTotalPrice') {
- // 鍙嶇畻鍚◣鎬讳环
- productForm.value.taxInclusiveTotalPrice =
- (Number(productForm.value.taxExclusiveTotalPrice) * (1 + taxRate / 100)).toFixed(2);
+ // 鍙嶇畻鍚◣鎬讳环锛堢◣鐜囧彲鑳戒负绌猴級
+ if (taxRate === null) {
+ productForm.value.taxInclusiveTotalPrice = productForm.value.taxExclusiveTotalPrice;
+ } else {
+ productForm.value.taxInclusiveTotalPrice =
+ (Number(productForm.value.taxExclusiveTotalPrice) * (1 + taxRate / 100)).toFixed(2);
+ }
// 宸茬煡鏁伴噺锛屽弽绠楀惈绋庡崟浠�
if (productForm.value.quantity) {
- productForm.value.taxInclusiveUnitPrice =
+ productForm.value.taxInclusiveUnitPrice =
(Number(productForm.value.taxInclusiveTotalPrice) / Number(productForm.value.quantity)).toFixed(2);
}
// 宸茬煡鍚◣鍗曚环锛屽弽绠楁暟閲�
else if (productForm.value.taxInclusiveUnitPrice) {
- productForm.value.quantity =
+ productForm.value.quantity =
(Number(productForm.value.taxInclusiveTotalPrice) / Number(productForm.value.taxInclusiveUnitPrice)).toFixed(2);
}
}
@@ -1413,65 +1372,6 @@
}
};
-// 鏄剧ず浜岀淮鐮�
-const showQRCode = async (row) => {
- try {
- // 鏋勫缓浜岀淮鐮佸唴瀹癸紝鍙寘鍚噰璐悎鍚屽彿锛堢函鏂囨湰锛�
- const qrContent = row.purchaseContractNumber || '';
- // 妫�鏌ュ唴瀹规槸鍚︿负绌�
- if (!qrContent || qrContent.trim() === '') {
- proxy.$modal.msgWarning("璇ヨ娌℃湁閲囪喘鍚堝悓鍙凤紝鏃犳硶鐢熸垚浜岀淮鐮�");
- return;
- }
- qrCodeUrl.value = await QRCode.toDataURL(qrContent, {
- width: 200,
- margin: 2,
- color: {
- dark: '#000000',
- light: '#FFFFFF'
- }
- });
- qrCodeDialogVisible.value = true;
- } catch (error) {
- console.error('鐢熸垚浜岀淮鐮佸け璐�:', error);
- proxy.$modal.msgError("鐢熸垚浜岀淮鐮佸け璐ワ細" + error.message);
- }
-};
-
-// 涓嬭浇浜岀淮鐮�
-const downloadQRCode = () => {
- if (!qrCodeUrl.value) {
- proxy.$modal.msgWarning("浜岀淮鐮佹湭鐢熸垚");
- return;
- }
-
- const a = document.createElement('a');
- a.href = qrCodeUrl.value;
- a.download = `閲囪喘鍚堝悓鍙蜂簩缁寸爜_${new Date().getTime()}.png`;
- document.body.appendChild(a);
- a.click();
- document.body.removeChild(a);
- proxy.$modal.msgSuccess("涓嬭浇鎴愬姛");
-};
-
-// 鎵爜鏂板瀵硅瘽妗嗙浉鍏冲彉閲�
-const scanAddDialogVisible = ref(false);
-const scanAddForm = reactive({
- scanContent: "",
- purchaseContractNumber: "",
- supplierName: "",
- projectName: "",
- contractAmount: "",
- paymentMethod: "",
- recorderName: "",
- scanRemark: "",
-});
-const scanAddRules = {
- purchaseContractNumber: [{ required: true, message: "璇疯緭鍏ラ噰璐悎鍚屽彿", trigger: "blur" }],
- supplierName: [{ required: true, message: "璇疯緭鍏ヤ緵搴斿晢鍚嶇О", trigger: "blur" }],
- projectName: [{ required: true, message: "璇疯緭鍏ラ」鐩悕绉�", trigger: "blur" }],
-};
-
// 鎵爜鐧昏瀵硅瘽妗嗙浉鍏冲彉閲�
const scanDialogVisible = ref(false);
const scanForm = reactive({
@@ -1487,68 +1387,6 @@
scanRemark: [{ required: true, message: "璇疯緭鍏ユ壂鐮佸娉�", trigger: "blur" }],
};
const scanRecords = ref([]);
-
-// 鎵撳紑鎵爜鏂板瀵硅瘽妗�
-const openScanAddDialog = () => {
- scanAddForm.scanContent = "";
- scanAddForm.purchaseContractNumber = "";
- scanAddForm.supplierName = "";
- scanAddForm.projectName = "";
- scanAddForm.contractAmount = "";
- scanAddForm.paymentMethod = "";
- scanAddForm.recorderName = userStore.nickName;
- scanAddForm.scanRemark = "";
- scanAddDialogVisible.value = true;
-};
-
-// 瑙f瀽鎵爜鍐呭锛堟ā鎷熻В鏋愪簩缁寸爜鏁版嵁锛�
-const parseScanContent = (content) => {
- if (!content) return;
-
- // 妯℃嫙瑙f瀽浜岀淮鐮佸唴瀹癸紝杩欓噷鍙互鏍规嵁瀹為檯闇�姹傝皟鏁磋В鏋愰�昏緫
- // 鍋囪鎵爜鍐呭鏍煎紡涓猴細鍚堝悓鍙穦渚涘簲鍟唡椤圭洰|閲戦|浠樻鏂瑰紡
- const parts = content.split('|');
- if (parts.length >= 3) {
- scanAddForm.purchaseContractNumber = parts[0] || "";
- scanAddForm.supplierName = parts[1] || "";
- scanAddForm.projectName = parts[2] || "";
- scanAddForm.contractAmount = parts[3] || "";
- scanAddForm.paymentMethod = parts[4] || "";
- }
-};
-
-// 鍏抽棴鎵爜鏂板瀵硅瘽妗�
-const closeScanAddDialog = () => {
- scanAddDialogVisible.value = false;
- proxy.resetForm("scanAddFormRef");
-};
-
-// 鎻愪氦鎵爜鏂板
-const submitScanAdd = () => {
- proxy.$refs["scanAddFormRef"].validate((valid) => {
- if (valid) {
- // 鏋勫缓鏂板鏁版嵁
- const newData = {
- purchaseContractNumber: scanAddForm.purchaseContractNumber,
- supplierName: scanAddForm.supplierName,
- projectName: scanAddForm.projectName,
- contractAmount: scanAddForm.contractAmount,
- paymentMethod: scanAddForm.paymentMethod,
- recorderName: scanAddForm.recorderName,
- entryDate: getCurrentDate(),
- remark: scanAddForm.scanRemark,
- type: 2
- };
-
- // 妯℃嫙鏂板鎴愬姛
- proxy.$modal.msgSuccess("鎵爜鏂板鎴愬姛锛�");
- closeScanAddDialog();
-
- // 鍙互閫夋嫨鏄惁鍒锋柊鍒楄〃
- // getList();
- }
- });
-};
// 鎵撳紑鎵爜鐧昏瀵硅瘽妗�
const openScanDialog = (row) => {
@@ -1606,4 +1444,80 @@
});
</script>
-<style scoped lang="scss"></style>
+<style scoped lang="scss">
+ .invalid-row {
+ opacity: 0.6;
+ background-color: #f5f7fa;
+ }
+ .el-row {
+ justify-content: space-between;
+ align-items: center;
+ }
+ .no-arrow-select {
+ --el-select-suffix-icon-color: transparent; /* 闅愯棌榛樿涓嬫媺绠ご */
+ }
+ .select-button-group {
+ display: flex;
+ align-items: center;
+ }
+
+ // 瀹℃壒浜鸿妭鐐瑰鍣ㄦ牱寮�
+ .approver-nodes-container {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 16px;
+ padding: 16px;
+ background-color: #f8f9fa;
+ border-radius: 4px;
+ border: 1px solid #e4e7ed;
+ }
+
+ .approver-node-item {
+ flex: 0 0 calc(33.333% - 12px);
+ min-width: 200px;
+ padding: 12px;
+ background-color: #fff;
+ border-radius: 4px;
+ border: 1px solid #dcdfe6;
+ transition: all 0.3s;
+
+ &:hover {
+ border-color: #409eff;
+ box-shadow: 0 2px 8px rgba(64, 158, 255, 0.1);
+ }
+ }
+
+ .approver-node-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 8px;
+ }
+
+ .approver-node-label {
+ font-size: 13px;
+ font-weight: 500;
+ color: #606266;
+ }
+
+ @media (max-width: 1200px) {
+ .approver-node-item {
+ flex: 0 0 calc(50% - 8px);
+ }
+ }
+
+ @media (max-width: 768px) {
+ .approver-node-item {
+ flex: 0 0 100%;
+ }
+ }
+
+ // 鍒犻櫎鍥炬爣鏍峰紡
+ .delete-icon {
+ transition: all 0.3s;
+ &:hover {
+ color: #f56c6c !important;
+ transform: scale(1.2);
+ }
+ }
+</style>
--
Gitblit v1.9.3