From 4e591bd0b0042c4bc28f7a999ceea064f8ed5d43 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 02 六月 2026 17:28:06 +0800
Subject: [PATCH] 富边商务电子 1.发货审批点击详情的时候产品列表没有展示问题
---
src/views/collaborativeApproval/purchaseApproval/index.vue | 53 +++++++++++++++++++++++------------------------------
1 files changed, 23 insertions(+), 30 deletions(-)
diff --git a/src/views/collaborativeApproval/purchaseApproval/index.vue b/src/views/collaborativeApproval/purchaseApproval/index.vue
index aeb931e..6dd0969 100644
--- a/src/views/collaborativeApproval/purchaseApproval/index.vue
+++ b/src/views/collaborativeApproval/purchaseApproval/index.vue
@@ -7,7 +7,7 @@
<el-input v-model="searchForm.supplierName" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
@change="handleQuery" />
</el-form-item>
- <el-form-item label="閲囪喘鍚堝悓鍙凤細">
+ <el-form-item label="閲囪喘鍗曞彿锛�">
<el-input
v-model="searchForm.purchaseContractNumber"
style="width: 240px"
@@ -17,7 +17,7 @@
:prefix-icon="Search"
/>
</el-form-item>
- <el-form-item label="閿�鍞悎鍚屽彿锛�">
+ <el-form-item label="閿�鍞崟鍙凤細">
<el-input v-model="searchForm.salesContractNo" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
@change="handleQuery" />
</el-form-item>
@@ -90,13 +90,13 @@
</el-table-column>
<el-table-column align="center" label="搴忓彿" type="index" width="60" />
<el-table-column
- label="閲囪喘鍚堝悓鍙�"
+ label="閲囪喘鍗曞彿"
prop="purchaseContractNumber"
width="200"
show-overflow-tooltip
/>
<el-table-column
- label="閿�鍞悎鍚屽彿"
+ label="閿�鍞崟鍙�"
prop="salesContractNo"
width="200"
show-overflow-tooltip
@@ -244,6 +244,7 @@
import useUserStore from "@/store/modules/user";
import { modelList, productTreeList } from "@/api/basicData/product.js";
import dayjs from "dayjs";
+import { getCurrentDate } from "@/utils/index.js";
const userStore = useUserStore();
@@ -515,9 +516,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 = [];
@@ -702,7 +703,7 @@
};
// 瀹℃壒閫氳繃鏂规硶
const approvePurchase = (row) => {
- ElMessageBox.confirm(`纭閫氳繃閲囪喘鍚堝悓鍙蜂负 ${row.purchaseContractNumber} 鐨勫鎵癸紵`, '瀹℃壒纭', {
+ ElMessageBox.confirm(`纭閫氳繃閲囪喘鍗曞彿涓� ${row.purchaseContractNumber} 鐨勫鎵癸紵`, '瀹℃壒纭', {
confirmButtonText: '纭',
cancelButtonText: '鍙栨秷',
type: 'warning',
@@ -718,7 +719,7 @@
// 瀹℃壒鎷掔粷鏂规硶
const rejectPurchase = (row) => {
- ElMessageBox.confirm(`纭鎷掔粷閲囪喘鍚堝悓鍙蜂负 ${row.purchaseContractNumber} 鐨勫鎵癸紵`, '瀹℃壒纭', {
+ ElMessageBox.confirm(`纭鎷掔粷閲囪喘鍗曞彿涓� ${row.purchaseContractNumber} 鐨勫鎵癸紵`, '瀹℃壒纭', {
confirmButtonText: '纭',
cancelButtonText: '鍙栨秷',
type: 'warning',
@@ -776,14 +777,6 @@
proxy.$modal.msg("宸插彇娑�");
});
};
-// 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� YYYY-MM-DD
-function getCurrentDate() {
- const today = new Date();
- const year = today.getFullYear();
- const month = String(today.getMonth() + 1).padStart(2, "0"); // 鏈堜唤浠�0寮�濮�
- const day = String(today.getDate()).padStart(2, "0");
- return `${year}-${month}-${day}`;
-}
const mathNum = () => {
if (!productForm.value.taxRate) {
proxy.$modal.msgWarning("璇峰厛閫夋嫨绋庣巼");
@@ -820,29 +813,29 @@
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 =
+ productForm.value.taxExclusiveTotalPrice =
(Number(productForm.value.taxInclusiveTotalPrice) / (1 + taxRate / 100)).toFixed(2);
} else if (field === 'taxExclusiveTotalPrice') {
// 鍙嶇畻鍚◣鎬讳环
- productForm.value.taxInclusiveTotalPrice =
+ 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);
}
}
@@ -870,11 +863,11 @@
// 鏄剧ず浜岀淮鐮�
const showQRCode = async (row) => {
try {
- // 鏋勫缓浜岀淮鐮佸唴瀹癸紝鍙寘鍚噰璐悎鍚屽彿锛堢函鏂囨湰锛�
+ // 鏋勫缓浜岀淮鐮佸唴瀹癸紝鍙寘鍚噰璐崟鍙凤紙绾枃鏈級
const qrContent = row.purchaseContractNumber || '';
// 妫�鏌ュ唴瀹规槸鍚︿负绌�
if (!qrContent || qrContent.trim() === '') {
- proxy.$modal.msgWarning("璇ヨ娌℃湁閲囪喘鍚堝悓鍙凤紝鏃犳硶鐢熸垚浜岀淮鐮�");
+ proxy.$modal.msgWarning("璇ヨ娌℃湁閲囪喘鍗曞彿锛屾棤娉曠敓鎴愪簩缁寸爜");
return;
}
qrCodeUrl.value = await QRCode.toDataURL(qrContent, {
@@ -898,10 +891,10 @@
proxy.$modal.msgWarning("浜岀淮鐮佹湭鐢熸垚");
return;
}
-
+
const a = document.createElement('a');
a.href = qrCodeUrl.value;
- a.download = `閲囪喘鍚堝悓鍙蜂簩缁寸爜_${new Date().getTime()}.png`;
+ a.download = `閲囪喘鍗曞彿浜岀淮鐮乢${new Date().getTime()}.png`;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
@@ -921,7 +914,7 @@
scanRemark: "",
});
const scanAddRules = {
- purchaseContractNumber: [{ required: true, message: "璇疯緭鍏ラ噰璐悎鍚屽彿", trigger: "blur" }],
+ purchaseContractNumber: [{ required: true, message: "璇疯緭鍏ラ噰璐崟鍙�", trigger: "blur" }],
supplierName: [{ required: true, message: "璇疯緭鍏ヤ緵搴斿晢鍚嶇О", trigger: "blur" }],
projectName: [{ required: true, message: "璇疯緭鍏ラ」鐩悕绉�", trigger: "blur" }],
};
@@ -958,7 +951,7 @@
// 瑙f瀽鎵爜鍐呭锛堟ā鎷熻В鏋愪簩缁寸爜鏁版嵁锛�
const parseScanContent = (content) => {
if (!content) return;
-
+
// 妯℃嫙瑙f瀽浜岀淮鐮佸唴瀹癸紝杩欓噷鍙互鏍规嵁瀹為檯闇�姹傝皟鏁磋В鏋愰�昏緫
// 鍋囪鎵爜鍐呭鏍煎紡涓猴細鍚堝悓鍙穦渚涘簲鍟唡椤圭洰|閲戦|浠樻鏂瑰紡
const parts = content.split('|');
@@ -993,11 +986,11 @@
remark: scanAddForm.scanRemark,
type: 2
};
-
+
// 妯℃嫙鏂板鎴愬姛
proxy.$modal.msgSuccess("鎵爜鏂板鎴愬姛锛�");
closeScanAddDialog();
-
+
// 鍙互閫夋嫨鏄惁鍒锋柊鍒楄〃
// getList();
}
--
Gitblit v1.9.3