From 7b7accc4ce1c1ccfc7a006980e1d3e4d0fbc56e8 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 06 一月 2026 16:57:33 +0800
Subject: [PATCH] 双奇点 1.编辑采购台账时,删除产品时,弹出两个提示需修改下 2.采购台账添加附件操作按钮和页面
---
src/views/procurementManagement/procurementLedger/index.vue | 35 +++++++++++++++++++++++++----------
1 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index ae01c9c..36ff34b 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -39,7 +39,7 @@
<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 type="success" @click="openScanAddDialog">鎵爜鏂板</el-button> -->
<el-button @click="handleOut">瀵煎嚭</el-button>
<el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button>
</div>
@@ -53,7 +53,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">
@@ -103,12 +103,10 @@
<el-table-column
label="閿�鍞悎鍚屽彿"
prop="salesContractNo"
- width="200"
show-overflow-tooltip
/>
<el-table-column
label="渚涘簲鍟嗗悕绉�"
- width="240"
prop="supplierName"
show-overflow-tooltip
/>
@@ -146,7 +144,7 @@
<el-table-column
fixed="right"
label="鎿嶄綔"
- min-width="150"
+ min-width="100"
align="center"
>
<template #default="scope">
@@ -155,15 +153,14 @@
type="primary"
size="small"
@click="openForm('edit', scope.row)"
- :disabled="scope.row.receiptPaymentAmount>0 || scope.row.recorderName !== userStore.nickName"
>缂栬緫</el-button
>
<el-button
link
- type="success"
+ type="primary"
size="small"
- @click="showQRCode(scope.row)"
- >鐢熸垚浜岀淮鐮�</el-button
+ @click="downLoadFile(scope.row)"
+ >闄勪欢</el-button
>
</template>
@@ -206,6 +203,7 @@
<el-select
v-model="form.salesLedgerId"
placeholder="璇烽�夋嫨"
+ filterable
clearable
@change="salesLedgerChange"
>
@@ -225,6 +223,7 @@
<el-select
v-model="form.supplierId"
placeholder="璇烽�夋嫨"
+ filterable
clearable
>
<el-option
@@ -278,6 +277,7 @@
placeholder="璇烽�夋嫨"
clearable
disabled
+ filterable
>
<el-option
v-for="item in userList"
@@ -787,6 +787,7 @@
</div>
</template>
</el-dialog>
+ <FileList ref="fileListRef" />
</div>
</template>
@@ -797,6 +798,7 @@
import { Search } from "@element-plus/icons-vue";
import { ElMessageBox } from "element-plus";
import { userListNoPage } from "@/api/system/user.js";
+import FileList from "./fileList.vue";
import {
getSalesLedgerWithProducts,
addOrUpdateSalesLedgerProduct,
@@ -1154,6 +1156,7 @@
const getModels = (value) => {
if (value) {
productForm.value.productCategory = findNodeById(productOptions.value, value) || "";
+ productForm.value.productId = value;
modelList({ id: value }).then((res) => {
modelOptions.value = res;
});
@@ -1237,6 +1240,13 @@
proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
return;
}
+ // 淇濊瘉鑷冲皯淇濈暀涓�鏉′骇鍝佷俊鎭�
+ const remainingCount =
+ productData.value.length - productSelectedRows.value.length;
+ if (remainingCount < 1) {
+ proxy.$modal.msgWarning("鑷冲皯淇濈暀涓�鏉′骇鍝佷俊鎭紝鏃犳硶鍏ㄩ儴鍒犻櫎");
+ return;
+ }
if (operationType.value === "add") {
productSelectedRows.value.forEach((selectedRow) => {
const index = productData.value.findIndex(
@@ -1260,7 +1270,7 @@
delProduct(ids).then((res) => {
proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
closeProductDia();
- getSalesLedgerWithProducts({ id: currentId.value, type: 2 }).then(
+ getPurchaseById({ id: currentId.value, type: 2 }).then(
(res) => {
productData.value = res.productData;
}
@@ -1412,6 +1422,11 @@
}
};
+const fileListRef = ref(null)
+const downLoadFile = (row) => {
+ fileListRef.value.open(row.salesLedgerFiles)
+}
+
// 鏄剧ず浜岀淮鐮�
const showQRCode = async (row) => {
try {
--
Gitblit v1.9.3