From a9600ae56b844289a04e1a7385cf0ccfc384cd08 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 10 七月 2025 14:42:32 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue |   55 ++++++-----------
 src/api/collaborativeApproval/approvalProcess.js                           |   13 +++-
 src/api/system/user.js                                                     |    8 ++
 src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue    |    5 +
 src/store/modules/user.js                                                  |    1 
 src/views/inventoryManagement/issueManagement/index.vue                    |    4 
 src/views/inventoryManagement/stockManagement/index.vue                    |    4 
 src/views/procurementManagement/invoiceEntry/index.vue                     |    6 +
 src/views/collaborativeApproval/approvalProcess/index.vue                  |    5 +
 src/views/salesManagement/salesLedger/index.vue                            |    3 
 src/views/collaborativeApproval/approvalProcess/components/infoFormDia.vue |   33 +++++-----
 11 files changed, 73 insertions(+), 64 deletions(-)

diff --git a/src/api/collaborativeApproval/approvalProcess.js b/src/api/collaborativeApproval/approvalProcess.js
index 2e8f7ca..415bed8 100644
--- a/src/api/collaborativeApproval/approvalProcess.js
+++ b/src/api/collaborativeApproval/approvalProcess.js
@@ -38,6 +38,14 @@
         data: query,
     })
 }
+// 鎻愪氦瀹℃壒
+export function updateApproveNode(query) {
+    return request({
+        url: '/approveNode/updateApproveNode',
+        method: 'post',
+        data: query,
+    })
+}
 // 鍒犻櫎瀹℃壒娴佺▼
 export function approveProcessDelete(query) {
     return request({
@@ -46,11 +54,10 @@
         data: query,
     })
 }
-// 鍒犻櫎瀹℃壒娴佺▼
+// 鏌ヨ瀹℃壒娴佺▼
 export function approveProcessDetails(query) {
     return request({
-        url: '/approveNode/details',
+        url: '/approveNode/details/' + query,
         method: 'get',
-        params: query,
     })
 }
\ No newline at end of file
diff --git a/src/api/system/user.js b/src/api/system/user.js
index 7192d9b..431f6b0 100644
--- a/src/api/system/user.js
+++ b/src/api/system/user.js
@@ -135,6 +135,14 @@
   })
 }
 // 鏌ヨ鐢ㄦ埛鍒楄〃
+export function userListNoPageByTenantId() {
+  return request({
+    url: '/system/user/userListNoPageByTenantId',
+    method: 'get'
+  })
+}
+
+// 鏌ヨ鐢ㄦ埛鍒楄〃
 export function userListNoPage() {
   return request({
     url: '/system/user/userListNoPage',
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 5623661..2dd2797 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -52,6 +52,7 @@
             this.avatar = avatar
             this.currentFactoryName = user.currentFactoryName
             this.nickName = user.nickName
+            this.currentDeptId = user.currentDeptId
             resolve(res)
           }).catch(error => {
             reject(error)
diff --git a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
index 5c1a34f..7e9488a 100644
--- a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
+++ b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
@@ -13,24 +13,24 @@
               :key="index"
               :type="activity.current ? 'primary' : ''"
               :hollow="activity.current"
-              :timestamp="activity.timestamp"
+              :timestamp="activity.approveNodeTime"
           >
             <el-card>
-              <span style="font-size: 18px;font-weight: 700">{{activity.content}}</span>
+              <span style="font-size: 18px;font-weight: 700">鑺傜偣{{activity.approveNodeOrder}}</span>
               <div style="margin: 10px 0">
-                <span style="font-size: 16px;font-weight: 600">瀹℃壒浜猴細{{activity.people}}</span>
+                <span style="font-size: 16px;font-weight: 600">瀹℃壒浜猴細{{activity.approveNodeUser}}</span>
               </div>
               <div>
                 <span style="margin-bottom: 8px;display: inline-block;font-size: 16px;font-weight: 600">瀹℃壒鎰忚锛�</span>
                 <el-form-item
-                  v-if="activity.current"
-                  :prop="'activities.' + index + '.value'"
+                  v-if="activity.approveNodeRemark == 1"
+                  :prop="'activities.' + index + '.approveNodeReason'"
                   :rules="[{ required: true, message: '瀹℃壒鎰忚涓嶈兘涓虹┖', trigger: 'blur' }]"
                 >
-                  <el-input v-model="activity.value" clearable type="textarea" :disabled="operationType === 'view'"></el-input>
+                  <el-input v-model="activity.approveNodeReason" clearable type="textarea" :disabled="operationType === 'view'"></el-input>
                 </el-form-item>
                 <el-form-item v-else>
-                  <el-input v-model="activity.value" clearable type="textarea" disabled></el-input>
+                  <el-input v-model="activity.approveNodeReason" clearable type="textarea" disabled></el-input>
                 </el-form-item>
               </div>
             </el-card>
@@ -39,7 +39,8 @@
       </el-form>
       <template #footer v-if="operationType === 'approval'">
         <div class="dialog-footer">
-          <el-button type="primary" @click="submitForm">纭</el-button>
+          <el-button type="primary" @click="submitForm(2)">涓嶉�氳繃</el-button>
+          <el-button type="primary" @click="submitForm(1)">閫氳繃</el-button>
           <el-button @click="closeDia">鍙栨秷</el-button>
         </div>
       </template>
@@ -49,48 +50,32 @@
 
 <script setup>
 import {getCurrentInstance, ref} from "vue";
-import {approveProcessDetails} from "../../../../api/collaborativeApproval/approvalProcess.js";
+import {approveProcessDetails, updateApproveNode} from "../../../../api/collaborativeApproval/approvalProcess.js";
 const emit = defineEmits(['close'])
 const { proxy } = getCurrentInstance()
 
 const dialogFormVisible = ref(false);
 const operationType = ref('')
-const activities = ref([
-  {
-    content: '鑺傜偣1',
-    timestamp: '',
-    type: 'primary',
-    hollow: true,
-    people: 'admin',
-    value: ''
-  },
-  {
-    content: '鑺傜偣2',
-    timestamp: '',
-    type: '',
-    hollow: false,
-    current: true,
-    people: 'admin',
-    value: ''
-  },
-])
+const activities = ref([])
 const formRef = ref(null);
 
 // 鎵撳紑寮规
 const openDialog = (type, row) => {
   operationType.value = type;
   dialogFormVisible.value = true;
-	approveProcessDetails({id: row.approveId}).then((res) => {
+	approveProcessDetails(row.approveId).then((res) => {
 		console.log(res)
+		activities.value = res.data
 	})
 }
 // 鎻愪氦瀹℃壒
-const submitForm = () => {
-  formRef.value.validate(valid => {
-    if (valid) {
-      // 鏍¢獙閫氳繃鍚庣殑閫昏緫
-    }
-  })
+const submitForm = (status) => {
+	const filteredActivities = activities.value.filter(activity => activity.approveNodeRemark == 1);
+	filteredActivities[0].approveNodeStatus = status
+	updateApproveNode(filteredActivities[0]).then(() => {
+		proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+		closeDia();
+	})
 }
 // 鍏抽棴寮规
 const closeDia = () => {
diff --git a/src/views/collaborativeApproval/approvalProcess/components/infoFormDia.vue b/src/views/collaborativeApproval/approvalProcess/components/infoFormDia.vue
index 291966f..e02d3ee 100644
--- a/src/views/collaborativeApproval/approvalProcess/components/infoFormDia.vue
+++ b/src/views/collaborativeApproval/approvalProcess/components/infoFormDia.vue
@@ -18,6 +18,7 @@
           <el-col :span="24">
             <el-form-item label="鐢宠閮ㄩ棬锛�" prop="approveDeptId">
 							<el-select
+								disabled
 								v-model="form.approveDeptId"
 								placeholder="閫夋嫨閮ㄩ棬"
 							>
@@ -126,7 +127,7 @@
   approveProcessUpdate,
   getDept
 } from "../../../../api/collaborativeApproval/approvalProcess.js";
-import {userListNoPage} from "../../../../api/system/user.js";
+import {userListNoPage, getUserProfile} from "../../../../api/system/user.js";
 const { proxy } = getCurrentInstance()
 const emit = defineEmits(['close'])
 import useUserStore from "@/store/modules/user";
@@ -184,24 +185,24 @@
 	console.log(userStore)
   form.value.approveUser = userStore.id;
   form.value.approveTime = getCurrentDate();
+  
+  // 鑾峰彇褰撳墠鐢ㄦ埛淇℃伅骞惰缃儴闂↖D
+  form.value.approveDeptId = userStore.currentDeptId
   if (operationType.value === 'edit') {
     approveProcessGetInfo({id: row.approveId,approveReason: '1'}).then(res => {
 			form.value = {...res.data}
       // 鍙嶆樉瀹℃壒浜�
-      // if (res.data && res.data.approverIds) {
-      //   const nameArr = res.data.approverIds.split('锛�')
-      //   approverNodes.value = nameArr.map((name, idx) => {
-      //     const user = userList.value.find(u => u.name === name)
-      //     return { id: idx + 1, userId: user ? user.id : null }
-      //   })
-      //   nextApproverId = nameArr.length + 1
-      // } else if (row.approverList && Array.isArray(row.approverList) && row.approverList.length > 0) {
-      //   approverNodes.value = row.approverList.map((userId, idx) => ({ id: idx + 1, userId }))
-      //   nextApproverId = row.approverList.length + 1
-      // } else {
-      //   approverNodes.value = [{ id: 1, userId: null }]
-      //   nextApproverId = 2
-      // }
+      if (res.data && res.data.approveUserIds) {
+        const userIds = res.data.approveUserIds.split(',')
+        approverNodes.value = userIds.map((userId, idx) => ({
+          id: idx + 1, 
+          userId: parseInt(userId.trim())
+        }))
+        nextApproverId = userIds.length + 1
+      } else {
+        approverNodes.value = [{ id: 1, userId: null }]
+        nextApproverId = 2
+      }
     })
   }
 }
@@ -227,7 +228,7 @@
 // 鎻愪氦浜у搧琛ㄥ崟
 const submitForm = () => {
   // 鏀堕泦鎵�鏈夎妭鐐圭殑瀹℃壒浜篿d
-  form.value.approverIds = approverNodes.value.map(node => node.userId).join(',')
+  form.value.approveUserIds = approverNodes.value.map(node => node.userId).join(',')
   // 瀹℃壒浜哄繀濉牎楠�
   const hasEmptyApprover = approverNodes.value.some(node => !node.userId)
   if (hasEmptyApprover) {
diff --git a/src/views/collaborativeApproval/approvalProcess/index.vue b/src/views/collaborativeApproval/approvalProcess/index.vue
index 7e51ea4..10fbf29 100644
--- a/src/views/collaborativeApproval/approvalProcess/index.vue
+++ b/src/views/collaborativeApproval/approvalProcess/index.vue
@@ -89,6 +89,7 @@
   {
     label: "鐢宠閮ㄩ棬",
     prop: "approveDeptName",
+		width: 220
   },
   {
     label: "瀹℃壒浜嬬敱",
@@ -97,7 +98,7 @@
   },
   {
     label: "鐢宠浜�",
-    prop: "approveUser",
+    prop: "approveUserName",
   },
   {
     label: "鐢宠鏃ユ湡",
@@ -110,7 +111,7 @@
   },
   {
     label: "褰撳墠瀹℃壒浜�",
-    prop: "checkCompany",
+    prop: "approveUserCurrentName",
     width: 120
   },
   {
diff --git a/src/views/inventoryManagement/issueManagement/index.vue b/src/views/inventoryManagement/issueManagement/index.vue
index f2c73cb..2ad9b5a 100644
--- a/src/views/inventoryManagement/issueManagement/index.vue
+++ b/src/views/inventoryManagement/issueManagement/index.vue
@@ -71,7 +71,7 @@
 import { ref } from 'vue'
 import { ElMessageBox } from "element-plus";
 import useUserStore from '@/store/modules/user'
-import { userListNoPage } from "@/api/system/user.js";
+import { userListNoPageByTenantId } from "@/api/system/user.js";
 import {
   getStockInPage
 } from "@/api/inventoryManagement/stockIn.js";
@@ -185,7 +185,7 @@
   console.log('form',form.value)
   // 鍔犺浇鐢ㄦ埛鍒楄〃
   try {
-    const userLists = await userListNoPage()
+    const userLists = await userListNoPageByTenantId()
     userList.value = userLists.data
   } catch (error) {
     console.error('鍔犺浇鐢ㄦ埛鍒楄〃澶辫触:', error)
diff --git a/src/views/inventoryManagement/stockManagement/index.vue b/src/views/inventoryManagement/stockManagement/index.vue
index d104fda..612dbc4 100644
--- a/src/views/inventoryManagement/stockManagement/index.vue
+++ b/src/views/inventoryManagement/stockManagement/index.vue
@@ -140,7 +140,7 @@
 import { ref } from 'vue'
 import { ElMessageBox } from "element-plus";
 import useUserStore from '@/store/modules/user'
-import { userListNoPage } from "@/api/system/user.js";
+import { userListNoPageByTenantId } from "@/api/system/user.js";
 import { productTreeList,modelList } from "@/api/basicData/product.js"
 import {
   getStockManagePage ,
@@ -257,7 +257,7 @@
   operationType.value = type
   form.value = {}
   productData.value = []
-  let userLists = await userListNoPage()
+  let userLists = await userListNoPageByTenantId()
   userList.value = userLists.data
   // customerList().then(res => {
   //   customerOption.value = res
diff --git a/src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue b/src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue
index 7596e6d..aa663eb 100644
--- a/src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue
+++ b/src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue
@@ -4,6 +4,7 @@
     :column="columns"
     :tableData="dataList"
     :tableLoading="loading"
+    height="auto"
   >
   </PIMTable>
 </template>
@@ -11,6 +12,7 @@
 <script setup>
 import { usePaginationApi } from "@/hooks/usePaginationApi";
 import { productList } from "@/api/procurementManagement/procurementLedger.js";
+import { nextTick } from "vue";
 
 defineOptions({
   name: "鏉ョエ鐧昏鎶樺彔琛�",
@@ -98,7 +100,8 @@
   }
 );
 
-const getList = (id) => {
+const getList = async (id) => {
+  await nextTick();
   filters.salesLedgerId = id;
   getTableData();
 };
diff --git a/src/views/procurementManagement/invoiceEntry/index.vue b/src/views/procurementManagement/invoiceEntry/index.vue
index e899511..a1e02e5 100644
--- a/src/views/procurementManagement/invoiceEntry/index.vue
+++ b/src/views/procurementManagement/invoiceEntry/index.vue
@@ -186,8 +186,10 @@
 const handleDelete = () => {};
 
 const expandChange = async (row, expandedRows) => {
-  await nextTick();
-  expandTableRef.value.getList(row.id);
+  if (expandedRows.length > 0) {
+    await nextTick();
+    expandTableRef.value.getList(row.id);
+  }
 };
 
 const changePage = ({ page }) => {
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 79baf86..22d1557 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -639,7 +639,7 @@
         return;
       }
       let tempFileIds = [];
-      if (fileList.value.length > 0) {
+      if (fileList.value !== null && fileList.value.length > 0) {
         tempFileIds = fileList.value.map((item) => item.tempId);
       }
       form.value.tempFileIds = tempFileIds;
@@ -683,6 +683,7 @@
 };
 const submitProductEdit = () => {
   productForm.value.salesLedgerId = currentId.value;
+  productForm.value.type = 1
   addOrUpdateSalesLedgerProduct(productForm.value).then((res) => {
     proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
     closeProductDia();

--
Gitblit v1.9.3