From d457a0f31290ba12273a51e75f6c2cc714659efc Mon Sep 17 00:00:00 2001
From: zhangback <zhangback@163.com>
Date: 星期四, 27 十一月 2025 13:26:07 +0800
Subject: [PATCH] 提交

---
 ui/admin-ui3/src/views/tms/paymentTmsQuotePlan/index.vue |  122 ++++++++++++++++++++++++++++++++++------
 1 files changed, 104 insertions(+), 18 deletions(-)

diff --git a/ui/admin-ui3/src/views/tms/paymentTmsQuotePlan/index.vue b/ui/admin-ui3/src/views/tms/paymentTmsQuotePlan/index.vue
index c574b92..d688bd4 100644
--- a/ui/admin-ui3/src/views/tms/paymentTmsQuotePlan/index.vue
+++ b/ui/admin-ui3/src/views/tms/paymentTmsQuotePlan/index.vue
@@ -46,8 +46,8 @@
         </el-button>
       </template>
 
-      <template #menu>
-        <el-link size="small" type="primary" :underline="false" icon="el-icon-d-arrow-right">鏇村</el-link>
+      <template #menu-before="{row}">
+        <el-link size="small" type="primary" @click="goToDetail(row)"  class="link-btn" :underline="false" icon="el-icon-d-arrow-right">鎶ヤ环鏄庣粏</el-link>
       </template>
     </avue-crud>
   </basicContainer>
@@ -68,7 +68,8 @@
 import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
 import {usePagePlus} from "@/hooks/usePagePlus";
 import {hasPermission} from "@/utils/permissionUtils";
-
+import router from "@/router";
+import {getTmsProject, listTmsProject} from "@/api/tms/tmsProject";
 const {proxy} = useCurrentInstance();
 const crudRef = ref();
 
@@ -110,33 +111,115 @@
             }
           ],
         },
-        customerId: {
-          label: '鎵�灞炲鎴�',
-          display: true,
-          rules: [
-            {
-              required: true,
-              message: "鎵�灞炲鎴蜂笉鑳戒负绌�", trigger: "blur"
-            }
-          ],
-        },
         projectId: {
           label: '鍏宠仈椤圭洰',
           display: true,
           rules: [
             {
               required: true,
-              message: "鍏宠仈椤圭洰涓嶈兘涓虹┖", trigger: "blur"
+              message: "鍏宠仈椤圭洰涓嶈兘涓虹┖", trigger: "change"
             }
           ],
+          change: (val: any) => {
+            const table = crudRef.value?.getPropRef?.('projectId')?.$refs?.temp;
+            if (!table) return;
+            let active = table.active;
+            if (Array.isArray(active)) active = active[0];
+            if (active) {
+              Object.assign(form.value, {
+                projectId: active.id,
+                projectName: active.projectName,
+                customerId: active.relatedCustomerId,
+                customerName: active.relatedCustomerName,
+                contractId: active.relatedContractId,
+                contractName: active.relatedContractName,
+              });
+            }
+          },
+          type: 'table',suffixIcon:'search',
+          children:{
+            border: true,
+            searchMenuSpan: 5,
+            column:{
+              projectName: {
+                label: '椤圭洰鍚嶇О', minWidth: 130,
+                search: true,
+              },
+              projectCode: {
+                label: '椤圭洰缂栧彿',minWidth: 120,
+                search: true,
+              },
+              relatedContractName: {
+                label: '鍏宠仈鍚堝悓',
+                display: false,minWidth: 150,
+                search: true,
+              },
+
+              relatedCustomerName: {
+                label: '鍏宠仈瀹㈡埛',
+                display: false,minWidth: 150,
+                search: true,
+              },
+              status: {
+                label: '鐘舵��',dataType: 'string',
+                type: 'radio', dicUrl: '/system/dict/data/type/data_status',
+                addDisplay: false,minWidth: 150,
+                editDisplay: false,
+                viewDisplay: true,
+                hide: false,
+                search: true,
+                rules: [
+                  {
+                    required: true,
+                    message: "鐘舵�佷笉鑳戒负绌�", trigger: "blur"
+                  }
+                ],
+              },
+            },
+
+          },
+          props:{
+            label: 'projectName',
+            value: 'id'
+          },
+          onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback:any) => {
+            if (value){
+              let id = value;
+              if (Array.isArray(value)){
+                id = value[0]
+              }
+              getTmsProject(id).then(res=>{
+                return callback(res.data||{})
+              })
+            }else{
+              listTmsProject({pageSize:page.pageSize,pageNum:page.currentPage,...data}).then(res=>{
+                return callback({
+                  total: res.total,
+                  data: res.rows||[],
+                })
+              })
+            }
+
+          }
+
         },
-        contractId: {
-          label: '鍏宠仈鍚堝悓',
-          display: true,
+        customerName: {
+          label: '鎵�灞炲鎴�',
+          display: true,disabled:true,
           rules: [
             {
               required: true,
-              message: "鍏宠仈鍚堝悓涓嶈兘涓虹┖", trigger: "blur"
+              message: "鎵�灞炲鎴蜂笉鑳戒负绌�", trigger: "change"
+            }
+          ],
+        },
+        contractName: {
+          label: '鍏宠仈鍚堝悓',
+          display: true,disabled:true,
+          rules: [
+            {
+              required: true,
+              message: "鍏宠仈鍚堝悓涓嶈兘涓虹┖", trigger: "change"
             }
           ],
         },
@@ -296,5 +379,8 @@
   }
 })
 
+const goToDetail = (row?:any) => {
+  router.push("/basic/tmsQuoteDetail?quotePlanType=1&quotePlanId=" + row.id);
+}
 
 </script>

--
Gitblit v1.8.0