From 0a5df5ab2cc2f564ccebb54ec28e0a0b159797bf Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 09 一月 2026 17:35:45 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_tide' into dev_tide

---
 src/views/procurementManagement/procurementLedger/index.vue |  121 ++++------------------------------------
 1 files changed, 12 insertions(+), 109 deletions(-)

diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 82f31df..30dacdb 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -53,6 +53,7 @@
         :summary-method="summarizeMainTable"
         @expand-change="expandChange"
         height="calc(100vh - 18.5em)"
+        stripe
       >
         <el-table-column align="center" type="selection" width="55" />
         <el-table-column type="expand">
@@ -62,6 +63,7 @@
               border
               show-summary
               :summary-method="summarizeChildrenTable"
+              stripe
             >
               <el-table-column
                 align="center"
@@ -145,7 +147,7 @@
         <el-table-column
           fixed="right"
           label="鎿嶄綔"
-          min-width="150"
+          min-width="100"
           align="center"
         >
           <template #default="scope">
@@ -156,13 +158,6 @@
               @click="openForm('edit', scope.row)"
 							:disabled="scope.row.receiptPaymentAmount>0 || scope.row.recorderName !== userStore.nickName"
               >缂栬緫</el-button
-            >
-            <el-button
-              link
-              type="success"
-              size="small"
-              @click="showQRCode(scope.row)"
-              >鐢熸垚浜岀淮鐮�</el-button
             >
           </template>
         </el-table-column>
@@ -200,20 +195,12 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="閿�鍞悎鍚屽彿锛�" prop="salesLedgerId">
-              <el-select
-                v-model="form.salesLedgerId"
-                placeholder="璇烽�夋嫨"
+            <el-form-item label="閿�鍞悎鍚屽彿锛�" prop="salesContractNo">
+              <el-input
+                v-model="form.salesContractNo"
+                placeholder="璇疯緭鍏�"
                 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>
@@ -303,6 +290,7 @@
           border
           @selection-change="productSelected"
           show-summary
+          stripe
           :summary-method="summarizeProTable"
         >
           <el-table-column align="center" type="selection" width="55" />
@@ -546,21 +534,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>
   </div>
 </template>
 
@@ -576,12 +549,10 @@
   addOrUpdateSalesLedgerProduct,
   delProduct,
   delLedgerFile,
-  getProductInfoByContractNo,
 } from "@/api/salesManagement/salesLedger.js";
 import {
   addOrEditPurchase,
   delPurchase,
-  getSalesNo,
   purchaseListPage,
   productList,
   getPurchaseById,
@@ -589,7 +560,6 @@
   createPurchaseNo,
 } from "@/api/procurementManagement/procurementLedger.js";
 import useFormData from "@/hooks/useFormData.js";
-import QRCode from "qrcode";
 const { proxy } = getCurrentInstance();
 const tableData = ref([]);
 const productData = ref([]);
@@ -598,7 +568,6 @@
 const modelOptions = ref([]);
 const userList = ref([]);
 const productOptions = ref([]);
-const salesContractList = ref([]);
 const supplierList = ref([]);
 const tableLoading = ref(false);
 const page = reactive({
@@ -612,10 +581,6 @@
 import dayjs from "dayjs";
 
 const userStore = useUserStore();
-
-// 浜岀淮鐮佺浉鍏冲彉閲�
-const qrCodeDialogVisible = ref(false);
-const qrCodeUrl = ref("");
 
 // 鐢ㄦ埛淇℃伅琛ㄥ崟寮规鏁版嵁
 const operationType = ref("");
@@ -635,7 +600,7 @@
   },
   form: {
     purchaseContractNumber: "",
-    salesLedgerId: "",
+    salesContractNo: "",
     projectName: "",
     recorderId: "",
     entryDate: "",
@@ -814,9 +779,6 @@
   userListNoPage().then((res) => {
     userList.value = res.data;
   });
-  getSalesNo().then((res) => {
-    salesContractList.value = res;
-  });
   getOptions().then((res) => {
     supplierList.value = res.data;
   });
@@ -839,8 +801,8 @@
 // 涓婁紶鍓嶆牎妫�
 function handleBeforeUpload(file) {
   // 鏍℃鏂囦欢澶у皬
-  if (file.size > 1024 * 1024 * 10) {
-    proxy.$modal.msgError("涓婁紶鏂囦欢澶у皬涓嶈兘瓒呰繃10MB!");
+  if (file.size > 1024 * 1024 * 50) {
+    proxy.$modal.msgError("涓婁紶鏂囦欢澶у皬涓嶈兘瓒呰繃50MB!");
     return false;
   }
   proxy.$modal.loading("姝e湪涓婁紶鏂囦欢锛岃绋嶅��...");
@@ -1159,66 +1121,7 @@
     }
   }
 };
-// 閿�鍞悎鍚岄�夋嫨鏀瑰彉鏂规硶
-const salesLedgerChange = async (row) => {
-  console.log("row", row);
-  var index = salesContractList.value.findIndex((item) => item.id == row);
-  console.log("index", index);
-  if (index > -1) {
-    form.value.projectName = salesContractList.value[index].projectName;
-    await querygProductInfoByContractNo();
-  }
-};
 
-const querygProductInfoByContractNo = async () => {
-  const { code, data } = await getProductInfoByContractNo({
-    contractNo: form.value.salesLedgerId,
-  });
-  if (code == 200) {
-    productData.value = data;
-  }
-};
-
-// 鏄剧ず浜岀淮鐮�
-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("涓嬭浇鎴愬姛");
-};
 
 onMounted(() => {
   getList();

--
Gitblit v1.9.3