From 4ee8bafa6b4742b72628511e0b14fbfeec7737e6 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 22 六月 2026 17:25:04 +0800
Subject: [PATCH] 新疆马铃薯 1.采购台账和销售台账添加总合同号字段,编辑逻辑修改
---
src/views/procurementManagement/procurementLedger/index.vue | 48 +++++++++++++++++++++++++++++-------------------
1 files changed, 29 insertions(+), 19 deletions(-)
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index cb47101..a65df53 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -4,6 +4,14 @@
<div>
<el-form :model="searchForm"
:inline="true">
+ <el-form-item label="鎬诲悎鍚屽彿锛�">
+ <el-input v-model="searchForm.masterContractNo"
+ style="width: 240px"
+ placeholder="璇疯緭鍏�"
+ @change="handleQuery"
+ clearable
+ :prefix-icon="Search" />
+ </el-form-item>
<el-form-item label="渚涘簲鍟嗗悕绉帮細">
<el-input v-model="searchForm.supplierName"
placeholder="璇疯緭鍏�"
@@ -201,6 +209,10 @@
label="搴忓彿"
type="index"
width="60" />
+ <el-table-column label="鎬诲悎鍚屽彿"
+ prop="masterContractNo"
+ width="150"
+ show-overflow-tooltip />
<el-table-column label="閲囪喘鍚堝悓鍙�"
prop="purchaseContractNumber"
width="160"
@@ -298,6 +310,15 @@
label-position="top"
:rules="rules"
ref="formRef">
+ <el-row :gutter="30">
+ <el-col :span="12">
+ <el-form-item label="鎬诲悎鍚屽彿锛�">
+ <el-input v-model="form.masterContractNo"
+ placeholder="璇疯緭鍏�"
+ clearable />
+ </el-form-item>
+ </el-col>
+ </el-row>
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="閲囪喘鍚堝悓鍙凤細"
@@ -408,10 +429,12 @@
<el-form-item label="浜у搧淇℃伅锛�"
prop="entryDate">
<el-button type="primary"
+ v-if="form.approvalStatus !== 3"
@click="openProductForm('add')">娣诲姞
</el-button>
<el-button plain
type="danger"
+ v-if="form.approvalStatus !== 3"
@click="deleteProduct">鍒犻櫎
</el-button>
</el-form-item>
@@ -569,7 +592,7 @@
<el-button link
type="primary"
@click="openProductForm('edit', scope.row, scope.$index)"
- :disabled="scope.row.stockInApprovalStatus === '瀹屽叏鍏ュ簱'">缂栬緫
+ :disabled="form.approvalStatus === 3">缂栬緫
</el-button>
</template>
</el-table-column>
@@ -1057,6 +1080,7 @@
supplierName: "", // 渚涘簲鍟嗗悕绉�
purchaseContractNumber: "", // 閲囪喘鍚堝悓缂栧彿
salesContractNo: "", // 閿�鍞悎鍚岀紪鍙�
+ masterContractNo: "", // 鎬诲悎鍚屽彿
projectName: "", // 椤圭洰鍚嶇О
entryDate: null, // 褰曞叆鏃ユ湡
entryDateStart: undefined,
@@ -1066,6 +1090,7 @@
purchaseContractNumber: "",
salesLedgerId: "",
projectName: "",
+ masterContractNo: "",
recorderId: "",
entryDate: "",
productData: [],
@@ -1444,13 +1469,6 @@
};
// 鎵撳紑寮规
const openForm = async (type, row) => {
- // 缂栬緫鏃舵鏌ュ叆搴撶姸鎬侊紝瀹屽叏鍏ュ簱鏃朵笉鑳界紪杈�
- if (type === "edit" && row) {
- if (row.stockInStatus === "瀹屽叏鍏ュ簱") {
- proxy.$modal.msgWarning("瀹屽叏鍏ュ簱鐘舵�佺殑璁板綍涓嶈兘缂栬緫");
- return;
- }
- }
await getTemplateList();
await userListNoPage().then(res => {
@@ -1621,9 +1639,9 @@
};
// 鎵撳紑浜у搧寮规
const openProductForm = async (type, row, index) => {
- // 缂栬緫鏃舵鏌ヤ骇鍝佸叆搴撳鏍哥姸鎬侊紝瀹屽叏鍏ュ簱鏃朵笉鑳界紪杈�
- if (type === "edit" && row && row.stockInApprovalStatus === "瀹屽叏鍏ュ簱") {
- proxy.$modal.msgWarning("瀹屽叏鍏ュ簱鐘舵�佺殑浜у搧涓嶈兘缂栬緫");
+ // 瀹℃壒閫氳繃鏃朵笉鑳界紪杈戜骇鍝佷俊鎭�
+ if (type === "edit" && form.value.approvalStatus === 3) {
+ proxy.$modal.msgWarning("瀹℃壒閫氳繃鐨勮褰曚笉鑳界紪杈戜骇鍝佷俊鎭�");
return;
}
@@ -1870,14 +1888,6 @@
const deleteProduct = () => {
if (productSelectedRows.value.length === 0) {
proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
- return;
- }
- // 妫�鏌ラ�変腑鐨勪骇鍝佷腑鏄惁鏈夊畬鍏ㄥ叆搴撶殑
- const hasFullyStocked = productSelectedRows.value.some(
- row => row.stockInApprovalStatus === "瀹屽叏鍏ュ簱"
- );
- if (hasFullyStocked) {
- proxy.$modal.msgWarning("閫変腑鐨勪骇鍝佷腑鍖呭惈瀹屽叏鍏ュ簱鐨勪骇鍝侊紝鏃犳硶鍒犻櫎");
return;
}
if (operationType.value === "add") {
--
Gitblit v1.9.3