From 3f3d35d6d6445f9cc90a8cf7bb496bee7f465542 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 06 一月 2026 17:12:09 +0800
Subject: [PATCH] fix: 会议管理页面合并

---
 src/views/salesManagement/salesLedger/index.vue |   53 +++++++++++++++++++++++++----------------------------
 1 files changed, 25 insertions(+), 28 deletions(-)

diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index f1fb9a2..5b5268e 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -72,7 +72,7 @@
         <el-table-column label="绛捐鏃ユ湡" prop="executionDate" width="120" show-overflow-tooltip />
         <el-table-column fixed="right" label="鎿嶄綔" min-width="200" align="center">
           <template #default="scope">
-            <el-button link type="primary" size="small" :disabled="scope.row.invoiceTotal>0 || scope.row.entryPersonName !== userStore.nickName" @click="openForm('edit', scope.row)">缂栬緫</el-button>
+            <el-button link type="primary" size="small" @click="openForm('edit', scope.row)">缂栬緫</el-button>
 <!--            <el-button link type="primary" size="small" @click="openForm('view', scope.row)">璇︽儏</el-button>-->
             <el-button link type="primary" size="small" @click="downLoadFile(scope.row)">闄勪欢</el-button>
             <el-button link type="primary" size="small" @click="openDeliveryForm(scope.row)">鍙戣揣</el-button>
@@ -142,7 +142,7 @@
           <el-col :span="12">
             <el-form-item label="褰曞叆鏃ユ湡锛�" prop="entryDate">
               <el-date-picker style="width: 100%" v-model="form.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD"
-                type="date" placeholder="璇烽�夋嫨" clearable disabled />
+                type="date" placeholder="璇烽�夋嫨" clearable />
             </el-form-item>
           </el-col>
         </el-row>
@@ -450,7 +450,7 @@
 				</div>
 			</template>
 		</el-dialog>
-    <FileList ref="fileListRef" />
+    <FileListDialog ref="fileListRef" v-model="fileListDialogVisible" />
   </div>
 </template>
 
@@ -459,10 +459,10 @@
 import pagination from "@/components/PIMTable/Pagination.vue";
 import {onMounted, ref} from "vue";
 import { addShippingInfo } from "@/api/salesManagement/deliveryLedger.js";
-import { ElMessageBox } from "element-plus";
+import {ElMessage, ElMessageBox} from "element-plus";
 import useUserStore from "@/store/modules/user";
 import { userListNoPage } from "@/api/system/user.js";
-import FileList from "./fileList.vue";
+import FileListDialog from '@/components/Dialog/FileListDialog.vue';
 import {
   ledgerListPage,
   productList,
@@ -472,11 +472,12 @@
   delLedger,
   addOrUpdateSalesLedgerProduct,
   delProduct,
-  delLedgerFile,
+  delLedgerFile, getProductInventory,
 } from "@/api/salesManagement/salesLedger.js";
 import { modelList, productTreeList } from "@/api/basicData/product.js";
 import useFormData from "@/hooks/useFormData.js";
 import dayjs from "dayjs";
+import { getCurrentDate } from "@/utils/index.js";
 
 const userStore = useUserStore();
 const { proxy } = getCurrentInstance();
@@ -505,12 +506,9 @@
     customerContractNo: "", // 瀹㈡埛鍚堝悓缂栧彿
     salesContractNo: "", // 閿�鍞悎鍚岀紪鍙�
     projectName: "", // 椤圭洰鍚嶇О
-    entryDate: [
-      dayjs().format("YYYY-MM-DD"),
-      dayjs().add(1, "day").format("YYYY-MM-DD"),
-    ], // 褰曞叆鏃ユ湡
-    entryDateStart: dayjs().format("YYYY-MM-DD"),
-    entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"),
+    entryDate: null, // 褰曞叆鏃ユ湡
+    entryDateStart: undefined,
+    entryDateEnd: undefined,
   },
   form: {
     salesContractNo: "",
@@ -1298,15 +1296,6 @@
 	const seconds = String(date.getSeconds()).padStart(2, "0");
 	return `${year}/${month}/${day} ${hours}:${minutes}:${seconds}`;
 };
-// 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� 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 getTotalQuantity = (products) => {
   if (!products || products.length === 0) return '0';
@@ -1519,20 +1508,28 @@
  * @param row 涓嬭浇鏂囦欢鐨勭浉鍏充俊鎭璞�
  */
 const fileListRef = ref(null)
+const fileListDialogVisible = ref(false)
 const downLoadFile = (row) => {
   getSalesLedgerWithProducts({ id: row.id, type: 1 }).then((res) => {
-    fileListRef.value.open(res.salesLedgerFiles)
+    if (fileListRef.value) {
+      fileListRef.value.open(res.salesLedgerFiles)
+      fileListDialogVisible.value = true
+    }
   });
 }
 
 // 鎵撳紑鍙戣揣寮规
 const openDeliveryForm = (row) => {
-  currentDeliveryRow.value = row;
-  deliveryForm.value = {
-    shippingDate: getCurrentDate(),
-    shippingCarNumber: "",
-  };
-  deliveryFormVisible.value = true;
+  getProductInventory({ salesLedgerId: row.id, type:1 }).then((res) => {
+    currentDeliveryRow.value = row;
+    deliveryForm.value = {
+      shippingDate: getCurrentDate(),
+      shippingCarNumber: "",
+    };
+    deliveryFormVisible.value = true;
+  }).catch(err => {
+    ElMessage.error(err.msg);
+  });
 };
 
 // 鎻愪氦鍙戣揣琛ㄥ崟

--
Gitblit v1.9.3