From 018ac11ffce99df1efe62edcc726268b012c766c Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 29 九月 2026 14:30:12 +0800
Subject: [PATCH] 新疆-融邦 1.协同办公-协同审批:采购及销售审批进入销售流程后也可预览在台账上传的附件 2.销售合同号只有直销时显示,别的时候隐藏 3.付款方式设置选项-网银-现金-微信-支票-承兑汇票

---
 src/views/procurementManagement/procurementLedger/index.vue |  198 +------------------------------------------------
 1 files changed, 6 insertions(+), 192 deletions(-)

diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 087f716..25a190c 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -19,13 +19,6 @@
                       clearable
                       :prefix-icon="Search" />
           </el-form-item>
-          <el-form-item label="閿�鍞悎鍚屽彿锛�">
-            <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="璇疯緭鍏�"
@@ -66,9 +59,6 @@
     </div>
     <div class="table_list">
       <div style="display: flex;justify-content: flex-end;margin-bottom: 20px;">
-        <el-button type="success"
-                   plain
-                   @click="handleBatchGenerate">鎵归噺鐢熸垚鏁版嵁</el-button>
         <el-button type="primary"
                    @click="openForm('add')">鏂板鍙拌处</el-button>
         <el-button type="primary"
@@ -109,20 +99,8 @@
                                prop="specificationModel" />
               <el-table-column label="鍗曚綅"
                                prop="unit" />
-              <el-table-column label="鍏ュ簱瀹℃牳鐘舵��"
-                               prop="stockInApprovalStatus"
-                               width="120">
-                <template #default="scope">
-                  <el-tag :type="getStockInApprovalStatusType(scope.row.stockInApprovalStatus)"
-                          size="small">
-                    {{ scope.row.stockInApprovalStatus || '--' }}
-                  </el-tag>
-                </template>
-              </el-table-column>
               <el-table-column label="鏁伴噺"
                                prop="quantity" />
-              <el-table-column label="閿�鍞彂璐ф暟閲�"
-                               prop="shippedQuantity" />
               <el-table-column label="鍙敤鏁伴噺"
                                prop="availableQuality" />
               <el-table-column label="閫�璐ф暟閲�"
@@ -147,10 +125,6 @@
                          width="60" />
         <el-table-column label="閲囪喘鍚堝悓鍙�"
                          prop="purchaseContractNumber"
-                         width="160"
-                         show-overflow-tooltip />
-        <el-table-column label="閿�鍞悎鍚屽彿"
-                         prop="salesContractNo"
                          width="160"
                          show-overflow-tooltip />
         <el-table-column label="渚涘簲鍟嗗悕绉�"
@@ -205,17 +179,6 @@
             <el-tag :type="getApprovalStatusType(scope.row.approvalStatus)"
                     size="small">
               {{ approvalStatusText[scope.row.approvalStatus] || '鏈煡鐘舵��' }}
-            </el-tag>
-          </template>
-        </el-table-column>
-        <el-table-column label="鍏ュ簱鐘舵��"
-                         prop="stockInStatus"
-                         width="100"
-                         show-overflow-tooltip>
-          <template #default="scope">
-            <el-tag :type="getStockInStatusType(scope.row.stockInStatus)"
-                    size="small">
-              {{ scope.row.stockInStatus || '--' }}
             </el-tag>
           </template>
         </el-table-column>
@@ -291,21 +254,6 @@
               <el-input v-model="form.purchaseContractNumber"
                         placeholder="璇疯緭鍏�"
                         clearable />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="閿�鍞悎鍚屽彿锛�"
-                          prop="salesLedgerId">
-              <el-select v-model="form.salesLedgerId"
-                         placeholder="璇烽�夋嫨"
-                         filterable
-                         clearable
-                         @change="salesLedgerChange">
-                <el-option v-for="item in salesContractList"
-                           :key="item.id"
-                           :label="item.salesContractNo"
-                           :value="item.id" />
-              </el-select>
             </el-form-item>
           </el-col>
         </el-row>
@@ -424,24 +372,6 @@
         </el-row>
         <el-row :gutter="30">
           <el-col :span="12">
-            <el-form-item label="閲囪喘娌瑰搧锛�"
-                          prop="purchaseOilProduct">
-              <el-select v-model="form.purchaseOilProduct"
-                         placeholder="璇烽�夋嫨"
-                         clearable
-                         style="width: 100%">
-                <el-option label="姹�#92"
-                           value="姹�#92" />
-                <el-option label="姹�#95"
-                           value="姹�#95" />
-                <el-option label="鏌�#0"
-                           value="鏌�#0" />
-                <el-option label="鏌�#-35"
-                           value="鏌�#-35" />
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
             <el-form-item label="鐗╂祦鏂瑰紡锛�"
                           prop="logisticsMethod">
               <el-select v-model="form.logisticsMethod"
@@ -457,8 +387,6 @@
               </el-select>
             </el-form-item>
           </el-col>
-        </el-row>
-        <el-row :gutter="30">
           <el-col :span="12">
             <el-form-item label="鎻愯揣鏂瑰紡锛�"
                           prop="pickupMethod">
@@ -468,6 +396,8 @@
               </el-radio-group>
             </el-form-item>
           </el-col>
+        </el-row>
+        <el-row :gutter="30">
           <el-col :span="12">
             <el-form-item label="閲囪喘娌瑰簱锛�"
                           prop="oilDepotId">
@@ -491,8 +421,6 @@
               </el-select>
             </el-form-item>
           </el-col>
-        </el-row>
-        <el-row :gutter="30">
           <el-col :span="12">
             <el-form-item label="瀹㈡埛鍚嶇О锛�"
                           prop="customerName">
@@ -502,6 +430,8 @@
                         :disabled="!['浠e偍', '閲囪喘鐩撮攢'].includes(form.purchaseCategory)" />
             </el-form-item>
           </el-col>
+        </el-row>
+        <el-row :gutter="30">
           <el-col :span="12">
             <el-form-item label="閲囪喘鏁伴噺锛堝惃锛夛細"
                           prop="purchaseQuantity">
@@ -634,16 +564,6 @@
               </el-tag>
             </template>
           </el-table-column>
-          <el-table-column label="鍏ュ簱瀹℃牳鐘舵��"
-                           prop="stockInApprovalStatus"
-                           width="120">
-            <template #default="scope">
-              <el-tag :type="getStockInApprovalStatusType(scope.row.stockInApprovalStatus)"
-                      size="small">
-                {{ scope.row.stockInApprovalStatus || '--' }}
-              </el-tag>
-            </template>
-          </el-table-column>
           <el-table-column fixed="right"
                            label="鎿嶄綔"
                            min-width="60"
@@ -651,8 +571,7 @@
             <template #default="scope">
               <el-button link
                          type="primary"
-                         @click="openProductForm('edit', scope.row, scope.$index)"
-                         :disabled="scope.row.stockInApprovalStatus === '瀹屽叏鍏ュ簱'">缂栬緫
+                         @click="openProductForm('edit', scope.row, scope.$index)">缂栬緫
               </el-button>
             </template>
           </el-table-column>
@@ -902,7 +821,6 @@
     addOrUpdateSalesLedgerProduct,
     delProduct,
     delLedgerFile,
-    getProductInfoByContractNo,
   } from "@/api/salesManagement/salesLedger.js";
   import {
     addOrEditPurchase,
@@ -910,14 +828,12 @@
     updatePurchaseTemplate,
     createPurchaseNo,
     delPurchase,
-    getSalesNo,
     purchaseListPage,
     productList,
     getPurchaseById,
     getOptions,
     getPurchaseTemplateList,
     delPurchaseTemplate,
-    batchGeneratePurchaseInboundSteps,
   } from "@/api/procurementManagement/procurementLedger.js";
   import { allOilDepot } from "@/api/basicData/oilDepot.js";
   import useFormData from "@/hooks/useFormData.js";
@@ -934,7 +850,6 @@
   const modelOptions = ref([]);
   const userList = ref([]);
   const productOptions = ref([]);
-  const salesContractList = ref([]);
   const supplierList = ref([]);
   const oilDepotList = ref([]);
   const tableLoading = ref(false);
@@ -968,26 +883,6 @@
       2: "warning", // 瀹℃壒涓� - 姗欒壊
       3: "success", // 瀹℃壒閫氳繃 - 缁胯壊
       4: "danger", // 瀹℃壒澶辫触 - 绾㈣壊
-    };
-    return typeMap[status] || "";
-  };
-
-  // 鑾峰彇鍏ュ簱鐘舵�佹爣绛剧被鍨�
-  const getStockInStatusType = status => {
-    const typeMap = {
-      寰呭叆搴�: "info", // 寰呭叆搴� - 鐏拌壊
-      鍏ュ簱涓�: "warning", // 鍏ュ簱涓� - 姗欒壊
-      瀹屽叏鍏ュ簱: "success", // 瀹屽叏鍏ュ簱 - 缁胯壊
-    };
-    return typeMap[status] || "";
-  };
-
-  // 鑾峰彇鍏ュ簱瀹℃牳鐘舵�佹爣绛剧被鍨�
-  const getStockInApprovalStatusType = status => {
-    const typeMap = {
-      寰呭叆搴�: "info", // 寰呭叆搴� - 鐏拌壊
-      鍏ュ簱涓�: "warning", // 鍏ュ簱涓� - 姗欒壊
-      瀹屽叏鍏ュ簱: "success", // 瀹屽叏鍏ュ簱 - 缁胯壊
     };
     return typeMap[status] || "";
   };
@@ -1101,7 +996,6 @@
     searchForm: {
       supplierName: "", // 渚涘簲鍟嗗悕绉�
       purchaseContractNumber: "", // 閲囪喘鍚堝悓缂栧彿
-      salesContractNo: "", // 閿�鍞悎鍚岀紪鍙�
       projectName: "", // 椤圭洰鍚嶇О
       entryDate: null, // 褰曞叆鏃ユ湡
       entryDateStart: undefined,
@@ -1109,7 +1003,6 @@
     },
     form: {
       purchaseContractNumber: "",
-      salesLedgerId: "",
       projectName: "",
       recorderId: "",
       entryDate: "",
@@ -1500,14 +1393,6 @@
   };
   // 鎵撳紑寮规
   const openForm = async (type, row) => {
-    // 缂栬緫鏃舵鏌ュ叆搴撶姸鎬侊紝瀹屽叏鍏ュ簱鏃朵笉鑳界紪杈�
-    if (type === "edit" && row) {
-      if (row.stockInStatus === "瀹屽叏鍏ュ簱") {
-        proxy.$modal.msgWarning("瀹屽叏鍏ュ簱鐘舵�佺殑璁板綍涓嶈兘缂栬緫");
-        return;
-      }
-    }
-
     await getTemplateList();
     await userListNoPage().then(res => {
       userList.value = res.data;
@@ -1521,13 +1406,11 @@
     isTemplateNameDuplicate.value = false;
     try {
       // 骞惰鍔犺浇鍩虹鏁版嵁
-      const [salesRes, supplierRes, oilDepotRes] = await Promise.all([
-        getSalesNo(),
+      const [supplierRes, oilDepotRes] = await Promise.all([
         getOptions(),
         allOilDepot(),
       ]);
 
-      salesContractList.value = salesRes || [];
       // 渚涘簲鍟嗚繃婊ゅ嚭isWhite=0 鐨勬暟鎹�
       supplierList.value = (supplierRes.data || []).filter(
         item => item.isWhite === 0
@@ -1639,11 +1522,6 @@
         form.value.storageBlobDTOS = fileList.value;
         form.value.type = 2;
 
-        // 濡傛灉salesLedgerId涓虹┖锛屽垯涓嶄紶閫抯alesContractNo
-        if (!form.value.salesLedgerId) {
-          form.value.salesContractNo = "";
-        }
-
         // 鏂板鏃朵笉浼犻�抜d
         const submitData = { ...form.value };
         if (operationType.value === "add") {
@@ -1679,12 +1557,6 @@
   };
   // 鎵撳紑浜у搧寮规
   const openProductForm = async (type, row, index) => {
-    // 缂栬緫鏃舵鏌ヤ骇鍝佸叆搴撳鏍哥姸鎬侊紝瀹屽叏鍏ュ簱鏃朵笉鑳界紪杈�
-    if (type === "edit" && row && row.stockInApprovalStatus === "瀹屽叏鍏ュ簱") {
-      proxy.$modal.msgWarning("瀹屽叏鍏ュ簱鐘舵�佺殑浜у搧涓嶈兘缂栬緫");
-      return;
-    }
-
     productOperationType.value = type;
     productOperationIndex.value = index;
     productForm.value = {};
@@ -1871,14 +1743,6 @@
       proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
       return;
     }
-    // 妫�鏌ラ�変腑鐨勪骇鍝佷腑鏄惁鏈夊畬鍏ㄥ叆搴撶殑
-    const hasFullyStocked = productSelectedRows.value.some(
-      row => row.stockInApprovalStatus === "瀹屽叏鍏ュ簱"
-    );
-    if (hasFullyStocked) {
-      proxy.$modal.msgWarning("閫変腑鐨勪骇鍝佷腑鍖呭惈瀹屽叏鍏ュ簱鐨勪骇鍝侊紝鏃犳硶鍒犻櫎");
-      return;
-    }
     if (operationType.value === "add") {
       productData.value = productData.value.filter(
         item => !productSelectedRows.value.includes(item)
@@ -1949,37 +1813,6 @@
           proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
           getList();
         });
-      })
-      .catch(() => {
-        proxy.$modal.msg("宸插彇娑�");
-      });
-  };
-
-  const handleBatchGenerate = async () => {
-    if (selectedRows.value.length === 0) {
-      proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
-      return;
-    }
-    const ids = selectedRows.value.map((item) => item.id);
-
-    ElMessageBox.confirm("纭鎵归噺鐢熸垚鏁版嵁锛�", "鎵归噺鐢熸垚", {
-      confirmButtonText: "纭",
-      cancelButtonText: "鍙栨秷",
-      type: "info",
-    })
-      .then(() => {
-        proxy.$modal.loading("姝e湪鎵归噺鐢熸垚鏁版嵁锛岃绋嶅��...");
-        batchGeneratePurchaseInboundSteps({ ids })
-          .then((res) => {
-            proxy.$modal.msgSuccess("鎵归噺鐢熸垚鎴愬姛");
-            getList();
-          })
-          .catch(() => {
-            proxy.$modal.msgError("鎵归噺鐢熸垚澶辫触");
-          })
-          .finally(() => {
-            proxy.$modal.closeLoading();
-          });
       })
       .catch(() => {
         proxy.$modal.msg("宸插彇娑�");
@@ -2112,25 +1945,6 @@
   const purchaseCategoryChange = val => {
     if (!["浠e偍", "閲囪喘鐩撮攢"].includes(val)) {
       form.value.customerName = "";
-    }
-  };
-
-  // 閿�鍞悎鍚岄�夋嫨鏀瑰彉鏂规硶
-  const salesLedgerChange = async row => {
-    console.log("row", row);
-    var index = salesContractList.value.findIndex(item => item.id == row);
-    console.log("index", index);
-    if (index > -1) {
-      await querygProductInfoByContractNo();
-    }
-  };
-
-  const querygProductInfoByContractNo = async () => {
-    const { code, data } = await getProductInfoByContractNo({
-      contractNo: form.value.salesLedgerId,
-    });
-    if (code == 200) {
-      productData.value = data || [];
     }
   };
 

--
Gitblit v1.9.3