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/tmsContract/index.vue | 1147 +++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 747 insertions(+), 400 deletions(-)

diff --git a/ui/admin-ui3/src/views/tms/tmsContract/index.vue b/ui/admin-ui3/src/views/tms/tmsContract/index.vue
index 4a72575..cab7a94 100644
--- a/ui/admin-ui3/src/views/tms/tmsContract/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsContract/index.vue
@@ -1,5 +1,5 @@
 <template>
-  <basicContainer >
+  <basicContainer>
     <avue-crud
         :option="option"
         :table-loading="pageF.loading"
@@ -50,414 +50,761 @@
 </template>
 
 <script setup name="tmsContract" lang="ts">
-  import {TmsContractI,addTmsContract, delTmsContract, exportTmsContract, getTmsContract, listTmsContract, updateTmsContract} from "@/api/tms/tmsContract";
-  import useCurrentInstance from "@/utils/useCurrentInstance";
-  import {computed,reactive, ref, toRefs} from "vue";
-  import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
-  import {usePagePlus} from "@/hooks/usePagePlus";
-  import {hasPermission} from "@/utils/permissionUtils";
+import {
+  TmsContractI,
+  addTmsContract,
+  delTmsContract,
+  exportTmsContract,
+  getTmsContract,
+  listTmsContract,
+  updateTmsContract
+} from "@/api/tms/tmsContract";
+import useCurrentInstance from "@/utils/useCurrentInstance";
+import {computed, onMounted, reactive, ref, toRefs, watch} from "vue";
+import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
+import {usePagePlus} from "@/hooks/usePagePlus";
+import {hasPermission} from "@/utils/permissionUtils";
+import {getTmsCustomerInfo, listTmsCustomerInfo} from "@/api/tms/tmsCustomerInfo";
+import dayjs from 'dayjs';
+import {formatDate} from "@/utils/ruoyi";
+import {getTmsSettlementEntity, listTmsSettlementEntity} from "@/api/tms/tmsSettlementEntity";
+import router from "@/router";
+const {proxy} = useCurrentInstance();
+const crudRef = ref();
 
-  const { proxy } = useCurrentInstance();
-  const crudRef = ref();
+const permissionList = computed(() => {
+  return {
+    addBtn: hasPermission(["tms:tmsContract:add"]),
+    delBtn: hasPermission(["tms:tmsContract:remove"]),
+    editBtn: hasPermission(["tms:tmsContract:edit"]),
+    viewBtn: hasPermission(["tms:tmsContract:query"]),
+  }
+})
 
-  const permissionList = computed(()=>{
-    return {
-      addBtn: hasPermission(["tms:tmsContract:add"]),
-      delBtn: hasPermission(["tms:tmsContract:remove"]),
-      editBtn: hasPermission(["tms:tmsContract:edit"]),
-      viewBtn: hasPermission(["tms:tmsContract:query"]),
-    }
-  })
-
-  const data = reactive({
-    form:<TmsContractI>{},
-    queryParams:<TmsContractI&PageQueryInterface>{},
-    page: <PagesInterface>{
-      pageSize: 10,
-      total: 0,
-      currentPage: 1,
-    },
-    selectionList:[],
-  })
-  const {queryParams,form,page,selectionList} = toRefs(data);
-  const option = ref({
-    pageKey: 'TmsContract',
-    rowKey: 'id',
-    column: {
-                                id: {
-          label: '涓婚敭ID',
-                  addDisplay : false,
-        editDisplay : false,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                systemCode: {
+const data = reactive({
+  form: <TmsContractI>{},
+  queryParams: <TmsContractI & PageQueryInterface>{},
+  page: <PagesInterface>{
+    pageSize: 10,
+    total: 0,
+    currentPage: 1,
+  },
+  selectionList: [],
+})
+const {queryParams, form, page, selectionList} = toRefs(data);
+const option = ref({
+  pageKey: 'TmsContract',
+  rowKey: 'id',
+  labelWidth: 100,
+  searchLabelWidth: 100,
+  group:[
+    {
+      label: '鍩烘湰淇℃伅',
+      prop: 'jbxx',
+      column:{
+        systemCode: {
           label: '绯荤粺缂栧彿',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "绯荤粺缂栧彿涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                contractCode: {
+          addDisplay: false,disabled:true,
+          editDisplay: true,
+          viewDisplay: true,
+          rules: [
+            {
+              required: true,
+              message: "绯荤粺缂栧彿涓嶈兘涓虹┖", trigger: "blur"
+            }
+          ],
+        },
+        isTempContract: {
+          label: '涓存椂鍚堝悓',
+          type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_number_is',
+          addDisplay: true,value:'1',
+          editDisplay: true,
+          viewDisplay: true,
+          rules: [
+            {
+              required: true,
+              message: "鏄惁涓存椂鍚堝悓涓嶈兘涓虹┖", trigger: "change"
+            }
+          ],
+        },
+        contractCode: {
           label: '鍚堝悓缂栧彿',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "鍚堝悓缂栧彿涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                contractName: {
-          label: '鍚堝悓绠�绉�',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "鍚堝悓绠�绉颁笉鑳戒负绌�", trigger: "blur" }
-            ],                  },
-                                contractType: {
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+          rules: [
+            {
+              required: true,
+              message: "鍚堝悓缂栧彿涓嶈兘涓虹┖", trigger: "blur"
+            }
+          ],
+        },
+        contractName: {
+          label: '鍚堝悓鍚嶇О',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+          rules: [
+            {
+              required: true,
+              message: "鍚堝悓鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+            }
+          ],
+        },
+        contractType: {
           label: '鍚堝悓绫诲瀷',
-                      type: 'select', dataType:'string', dicUrl: '/system/dict/data/type/contract_type',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "鍚堝悓绫诲瀷涓嶈兘涓虹┖", trigger: "change"
-                 }
-            ],                  },
-                                signDate: {
+          type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/contract_type',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+          rules: [
+            {
+              required: true,
+              message: "鍚堝悓绫诲瀷涓嶈兘涓虹┖", trigger: "change"
+            }
+          ],
+        },
+        signDate: {
           label: '绛剧害鏃ユ湡',
-                      type: 'date', valueFormat: 'YYYY-MM-DD',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "绛剧害鏃ユ湡涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                contractStartDate: {
-          label: '鍚堝悓鏈熼檺寮�濮嬫椂闂�',
-                      type: 'date', valueFormat: 'YYYY-MM-DD',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "鍚堝悓鏈熼檺寮�濮嬫椂闂翠笉鑳戒负绌�", trigger: "blur" }
-            ],                  },
-                                contractEndDate: {
-          label: '鍚堝悓鏈熼檺缁撴潫鏃堕棿',
-                      type: 'date', valueFormat: 'YYYY-MM-DD',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "鍚堝悓鏈熼檺缁撴潫鏃堕棿涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                contractStatus: {
-          label: '鍚堝悓鐘舵��',
-                      type: 'select', dataType:'string', dicUrl: '/system/dict/data/type/contract_status',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "鍚堝悓鐘舵�佷笉鑳戒负绌�", trigger: "change"
-                 }
-            ],                  },
-                                partyAName: {
-          label: '鐢叉柟鍚嶇О',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "鐢叉柟鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                partyAContact: {
-          label: '鐢叉柟鑱旂郴浜�',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                partyAContactInfo: {
-          label: '鐢叉柟鑱旂郴鏂瑰紡',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                partyBName: {
-          label: '涔欐柟鍚嶇О',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "涔欐柟鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                partyBContact: {
-          label: '涔欐柟鑱旂郴浜�',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                partyBContactInfo: {
-          label: '涔欐柟鑱旂郴鏂瑰紡',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                contractAmount: {
-          label: '鍚堝悓閲戦',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "鍚堝悓閲戦涓嶈兘涓虹┖", trigger: "blur" }
-            ],                  },
-                                paymentMethod: {
-          label: '浠樻鏂瑰紡',
-                      type: 'select', dataType:'string', dicUrl: '/system/dict/data/type/payment_method',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "浠樻鏂瑰紡涓嶈兘涓虹┖", trigger: "change"
-                 }
-            ],                  },
-                                paymentCycle: {
-          label: '浠樻鍛ㄦ湡',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                paidAmount: {
-          label: '宸蹭粯娆鹃」',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                unpaidAmount: {
-          label: '鏈粯娆鹃」',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                invoiceStatus: {
-          label: '鍙戠エ鐘舵��',
-                      type: 'select', dataType:'string', dicUrl: '/system/dict/data/type/invoice_status',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "鍙戠エ鐘舵�佷笉鑳戒负绌�", trigger: "change"
-                 }
-            ],                  },
-                                fulfillmentStatus: {
-          label: '灞ヨ鐘舵��',
-                      type: 'select', dataType:'string', dicUrl: '/system/dict/data/type/fulfillment_status',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "灞ヨ鐘舵�佷笉鑳戒负绌�", trigger: "change"
-                 }
-            ],                  },
-                                fulfillmentProgress: {
-          label: '灞ヨ杩涘害',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                acceptanceStatus: {
-          label: '楠屾敹鐘舵��',
-                      type: 'select', dataType:'string', dicUrl: '/system/dict/data/type/acceptance_status',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                  },
-                                attachmentName: {
-          label: '闄勪欢鍚嶇О',
-                  addDisplay : false,
-        editDisplay : false,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                attachmentPath: {
-          label: '闄勪欢璺緞',
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                uploadedBy: {
-          label: '涓婁紶浜�',
-                  addDisplay : false,
-        editDisplay : false,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                uploadTime: {
-          label: '涓婁紶鏃堕棿',
-                      type: 'date', valueFormat: 'YYYY-MM-DD',
-                  addDisplay : false,
-        editDisplay : false,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                status: {
-          label: '鍚堝悓鏁版嵁鐘舵��',
-                      type: 'radio', dicUrl: '/system/dict/data/type/sys_normal_disable',
-                  addDisplay : false,
-        editDisplay : false,
-        viewDisplay :true,
-        hide :false,
-        search :true,
-                      rules: [
-              {
-                required: true,
-                message: "鍚堝悓鏁版嵁鐘舵�佷笉鑳戒负绌�", trigger: "blur" }
-            ],                  },
-                                createBy: {
-          label: '鍒涘缓浜�',
-                  addDisplay : false,
-        editDisplay : false,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                createTime: {
-          label: '鍒涘缓鏃堕棿',
-                      type: 'date', valueFormat: 'YYYY-MM-DD',
-                  addDisplay : false,
-        editDisplay : false,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
-                                updateBy: {
-          label: '鏇存柊浜�',
-                  addDisplay : false,
-        editDisplay : false,
-        viewDisplay : false,
-        hide :false,
-        search : false,
-                  },
-                                updateTime: {
-          label: '鏇存柊鏃堕棿',
-                      type: 'date', valueFormat: 'YYYY-MM-DD',
-                  addDisplay : false,
-        editDisplay : false,
-        viewDisplay : false,
-        hide :false,
-        search : false,
-                  },
-                                remark: {
-          label: '鍚堝悓琛ュ厖璇存槑',
-                      type: 'textarea', minRows: 3, maxRows: 5,
-                  addDisplay :true,
-        editDisplay :true,
-        viewDisplay : false,
-        hide : true,
-        search : false,
-                  },
+          type: 'date', valueFormat: 'YYYY-MM-DD',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+        },
+        contractDate: {
+          label: '鍚堝悓鏈熼檺',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+          rules: [
+            {
+              required: true,
+              message: "鍚堝悓鏈熼檺鏃堕棿涓嶈兘涓虹┖", trigger: "blur"
+            }
+          ],
+          type: "datetimerange",
+          format: 'YYYY-MM-DD HH:mm:ss',
+          valueFormat: 'YYYY-MM-DD HH:mm:ss',
+          change: ({value}:{value:any}) => {
+            if (Array.isArray(value) && value.length >1){
+              form.value.contractStartDate = value[0]
+              form.value.contractEndDate = value[1]
+            }
+            if (!(Array.isArray(value) && value.length >1)&& form.value.contractStartDate && form.value.contractEndDate){
+              form.value.contractDate = [
+                formatDate(form.value.contractStartDate),
+                formatDate(form.value.contractEndDate)
+              ];
+            }
           }
-  })
-
-  const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange,
-    searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({
-    form:form,
-    option:option,
-    queryParams:queryParams,
-    idKey:'id',
-    page:page.value,
-    getListApi:listTmsContract,
-    getDetailApi:getTmsContract,
-    exportApi:exportTmsContract,
-    deleteApi:delTmsContract,
-    addApi:addTmsContract,
-    updateApi:updateTmsContract,
-    handleUpdateFunc:()=>{
-      crudRef.value.rowEdit(selectionList.value[0]);
+        },
+        // contractStartDate: {
+        //   label: '鍚堝悓鏈熼檺寮�濮嬫椂闂�',
+        //   type: 'date', valueFormat: 'YYYY-MM-DD',
+        //   display: false,
+        //   rules: [
+        //     {
+        //       required: true,
+        //       message: "鍚堝悓鏈熼檺寮�濮嬫椂闂翠笉鑳戒负绌�", trigger: "blur"
+        //     }
+        //   ],
+        // },
+        // contractEndDate: {
+        //   label: '鍚堝悓鏈熼檺缁撴潫鏃堕棿',
+        //   type: 'date', valueFormat: 'YYYY-MM-DD',
+        //   display: false,
+        //   rules: [
+        //     {
+        //       required: true,
+        //       message: "鍚堝悓鏈熼檺缁撴潫鏃堕棿涓嶈兘涓虹┖", trigger: "blur"
+        //     }
+        //   ],
+        // },
+        contractStatus: {
+          label: '鍚堝悓鐘舵��',
+          type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/contract_status',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,value: '0',
+          rules: [
+            {
+              required: true,
+              message: "鍚堝悓鐘舵�佷笉鑳戒负绌�", trigger: "change"
+            }
+          ],
+        },
+      }
     },
-    handleSelectionChangeFunc:(selection:any)=>{
-      selectionList.value = selection;
+    {
+      label: '鐢叉柟淇℃伅',
+      prop: 'jfxx',
+      column:{
+        partyAId: {
+          label: '鐢叉柟鍚嶇О',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+          rules: [
+            {
+              required: true,
+              message: "鐢叉柟鍚嶇О涓嶈兘涓虹┖", trigger: "change"
+            }
+          ],
+          type: 'table',suffixIcon:'search',
+          children:{
+            border: true,
+            searchMenuSpan: 5,
+            column:{
+              customerType: {
+                label: '瀹㈡埛绫诲瀷', minWidth: 120,
+                type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/customer_type',
+                search: true,
+              },
+              customerShortName: {
+                label: '瀹㈡埛绠�绉�', minWidth: 130,
+                search: true,
+              },
+              customerCode: {
+                label: '瀹㈡埛缂栧彿',minWidth: 120,
+                search: true,
+              },
+              contactName: {
+                label: '鑱旂郴浜哄鍚�',minWidth: 120,
+              },
+              signCompanyName: {
+                label: '绛剧害鍏徃', minWidth: 150,
+              },
+            },
+
+          },
+          props:{
+            label: 'customerShortName',
+            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]
+              }
+              getTmsCustomerInfo(id).then(res=>{
+                return callback(res.data||{})
+              })
+            }else{
+              listTmsCustomerInfo({pageSize:page.pageSize,pageNum:page.currentPage,...data}).then(res=>{
+                return callback({
+                  total: res.total,
+                  data: res.rows||[],
+                })
+              })
+            }
+
+          },
+          change: (val: any) => {
+            const table = crudRef.value?.getPropRef?.('partyAId')?.$refs?.temp;
+            if (!table) return;
+            let active = table.active;
+            if (Array.isArray(active)) active = active[0];
+            if (active) {
+              Object.assign(form.value, {
+                partyAId: active.id,
+                partyAName: active.customerShortName,
+                partyAContact: active.contactName,
+                partyAContactInfo: active.contactPhone,
+              });
+            }
+          },
+        },
+        partyAContact: {
+          label: '鐢叉柟鑱旂郴浜�',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+        },
+        partyAContactInfo: {
+          label: '鐢叉柟鑱旂郴鏂瑰紡',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+        },
+      }
+    },
+    {
+      label: '涔欐柟淇℃伅',
+      prop: 'yfxx',
+      column: {
+        partyBId: {
+          label: '涔欐柟鍚嶇О',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+          rules: [
+            {
+              required: true,
+              message: "涔欐柟鍚嶇О涓嶈兘涓虹┖", trigger: "change"
+            }
+          ],
+          type: 'table',suffixIcon:'search',
+          children:{
+            border: true,
+            searchMenuSpan: 5,
+            column:{
+              customerType: {
+                label: '瀹㈡埛绫诲瀷', minWidth: 120,
+                type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/customer_type',
+                search: true,
+              },
+              customerShortName: {
+                label: '瀹㈡埛绠�绉�', minWidth: 130,
+                search: true,
+              },
+              customerCode: {
+                label: '瀹㈡埛缂栧彿',minWidth: 120,
+                search: true,
+              },
+              contactName: {
+                label: '鑱旂郴浜哄鍚�',minWidth: 120,
+              },
+            },
+
+          },
+          props:{
+            label: 'customerShortName',
+            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]
+              }
+              getTmsSettlementEntity(id).then(res=>{
+                return callback(res.data||{})
+              })
+            }else{
+              listTmsSettlementEntity({pageSize:page.pageSize,pageNum:page.currentPage,...data}).then(res=>{
+                return callback({
+                  total: res.total,
+                  data: res.rows||[],
+                })
+              })
+            }
+
+          },
+          change: (val: any) => {
+            const table = crudRef.value?.getPropRef?.('partyBId')?.$refs?.temp;
+            if (!table) return;
+            let active = table.active;
+            if (Array.isArray(active)) active = active[0];
+            if (active) {
+              Object.assign(form.value, {
+                partyBId: active.id,
+                partyBName: active.customerShortName,
+                partyBContact: active.contactName,
+                partyBContactInfo: active.contactPhone,
+              });
+            }
+          },
+        },
+        // partyBName: {
+        //   label: '涔欐柟鍚嶇О',
+        //   addDisplay: true,
+        //   editDisplay: true,
+        //   viewDisplay: true,
+        //   rules: [
+        //     {
+        //       required: true,
+        //       message: "涔欐柟鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+        //     }
+        //   ],
+        // },
+        partyBContact: {
+          label: '涔欐柟鑱旂郴浜�',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+        },
+        partyBContactInfo: {
+          label: '涔欐柟鑱旂郴鏂瑰紡',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+        },
+      }
+    },
+    {
+      label: '娆鹃」淇℃伅',
+      prop: 'kfxx',
+      column: {
+        contractAmount: {
+          label: '鍚堝悓閲戦',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+          rules: [
+            {
+              required: true,
+              message: "鍚堝悓閲戦涓嶈兘涓虹┖", trigger: "blur"
+            }
+          ],
+        },
+        // paymentMethod: {
+        //   label: '浠樻鏂瑰紡',
+        //   type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/payment_method',
+        //   addDisplay: true,
+        //   editDisplay: true,
+        //   viewDisplay: true,
+        //   rules: [
+        //     {
+        //       required: true,
+        //       message: "浠樻鏂瑰紡涓嶈兘涓虹┖", trigger: "change"
+        //     }
+        //   ],
+        // },
+        paymentCycle: {
+          label: '浠樻鍛ㄦ湡',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+        },
+        paidAmount: {
+          label: '宸蹭粯娆鹃」',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+        },
+        unpaidAmount: {
+          label: '鏈粯娆鹃」',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+        },
+        invoiceStatus: {
+          label: '鍙戠エ鐘舵��',
+          type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/invoice_status',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+          // rules: [
+          //   {
+          //     required: true,
+          //     message: "鍙戠エ鐘舵�佷笉鑳戒负绌�", trigger: "change"
+          //   }
+          // ],
+        },
+      }
+    },
+    {
+      label: '灞ヨ淇℃伅',
+      prop: 'xlyx',
+      column: {
+        fulfillmentStatus: {
+          label: '灞ヨ鐘舵��',
+          type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/fulfillment_status',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+          rules: [
+            {
+              required: true,
+              message: "灞ヨ鐘舵�佷笉鑳戒负绌�", trigger: "change"
+            }
+          ],
+        },
+        fulfillmentProgress: {
+          label: '灞ヨ杩涘害',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+        },
+        acceptanceStatus: {
+          label: '楠屾敹鐘舵��',
+          type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/acceptance_status',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,
+        },
+      }
+    },
+    {
+      label: '闄勪欢淇℃伅',
+      prop: 'fjxx',
+      column: {
+        // attachmentName: {
+        //   label: '闄勪欢鍚嶇О',
+        //   addDisplay: false,
+        //   editDisplay: false,
+        //   viewDisplay: true,
+        // },
+        attachmentPath: {
+          label: '闄勪欢',
+          addDisplay: true,
+          editDisplay: true,
+          viewDisplay: true,span: 24,
+          accept:'string',dataType: 'string',
+          type: 'upload',
+          action: '/common/upload2',
+          propsHttp:{
+            home:'url',
+            name:'newFileName',
+          },
+          rules: [
+            {
+              required: true,
+              message: "璇蜂笂浼犻檮浠�", trigger: "change"
+            }
+          ],
+        },
+        // uploadedBy: {
+        //   label: '涓婁紶浜�',
+        //   addDisplay: false,
+        //   editDisplay: false,
+        //   viewDisplay: true,
+        // },
+      }
+    },
+    {
+      label: '鍏朵粬淇℃伅',
+      prop: 'qtxx',
+      column: {
+        status: {
+          label: '鍚堝悓鏁版嵁鐘舵��',dataType: 'string',
+          type: 'radio', dicUrl: '/system/dict/data/type/sys_normal_disable',
+          addDisplay: false,
+          editDisplay: false,
+          viewDisplay: true,
+          rules: [
+            {
+              required: true,
+              message: "鍚堝悓鏁版嵁鐘舵�佷笉鑳戒负绌�", trigger: "blur"
+            }
+          ],
+        },
+        createBy: {
+          label: '鍒涘缓浜�',
+          addDisplay: false,
+          editDisplay: false,
+          viewDisplay: true,
+        },
+        createTime: {
+          label: '鍒涘缓鏃堕棿',
+          type: 'date', valueFormat: 'YYYY-MM-DD',
+          addDisplay: false,
+          editDisplay: false,
+          viewDisplay: true,
+          hide: true,
+          search: false,
+        },
+        updateBy: {
+          label: '鏇存柊浜�',
+          addDisplay: false,
+          editDisplay: false,
+          viewDisplay: true,
+        },
+        updateTime: {
+          label: '鏇存柊鏃堕棿',
+          addDisplay: false,
+          editDisplay: false,
+          viewDisplay: true,
+        },
+        remark: {
+          label: '鍚堝悓琛ュ厖璇存槑',
+          type: 'textarea', minRows: 3, maxRows: 5,
+          addDisplay: true,span:24,
+          editDisplay: true,
+          viewDisplay: true,
+        },
+      }
     }
-  })
+  ],
+  column: {
+    systemCode: {
+      label: '绯荤粺缂栧彿',
+      display: false,
+      hide: false, minWidth:150,
+      search: true,
+
+    },
+    contractCode: {
+      label: '鍚堝悓缂栧彿',
+      display: false,
+      hide: false,
+      search: true,minWidth:150,
+    },
+    contractName: {
+      label: '鍚堝悓鍚嶇О',
+      display: false,minWidth:150,
+      hide: false,
+      search: true,
+    },
+    isTempContract: {
+      label: '涓存椂鍚堝悓',
+      type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_number_is',
+      display: false,minWidth:150,
+      hide: false,
+      search: true,
+    },
+    contractType: {
+      label: '鍚堝悓绫诲瀷',
+      type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/contract_type',
+      display: false,minWidth:150,
+      hide: false,
+      search: true,
+    },
+    signDate: {
+      label: '绛剧害鏃ユ湡',
+      type: 'date', valueFormat: 'YYYY-MM-DD',
+      display: false,minWidth:150,
+      hide: false,
+      search: true,
+    },
+    contractDate: {
+      label: '鍚堝悓鏈熼檺',
+      display: false,
+      hide: false,
+      search: false,minWidth:300,
+      formatter: (row:any, column:any) => {
+        if (row.contractStartDate && row.contractEndDate) {
+          return row.contractStartDate + '~' + row.contractEndDate
+        }
+        return ''
+      },
+    },
+    contractStatus: {
+      label: '鍚堝悓鐘舵��',
+      type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/contract_status',
+      display: false,
+      hide: false,
+      search: true,minWidth:150,
+
+    },
+    partyAName: {
+      label: '鐢叉柟鍚嶇О',
+      display: false,
+      hide: false,
+      search: true,minWidth:150,
+
+    },
+
+    partyBName: {
+      label: '涔欐柟鍚嶇О',
+      display: false,
+      hide: false,minWidth:150,
+      search: true,
+
+    },
+
+    contractAmount: {
+      label: '鍚堝悓閲戦',
+      display: false,
+      hide: false,minWidth:150,
+      search: false,
+    },
+    // paymentMethod: {
+    //   label: '浠樻鏂瑰紡',
+    //   type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/payment_method',
+    //   display: false,
+    //   hide: false,minWidth:150,
+    //   search: true,
+    // },
+
+    invoiceStatus: {
+      label: '鍙戠エ鐘舵��',
+      type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/invoice_status',
+      display: false,
+      hide: false,
+      search: true,minWidth:150,
+      rules: [
+        {
+          required: true,
+          message: "鍙戠エ鐘舵�佷笉鑳戒负绌�", trigger: "change"
+        }
+      ],
+    },
+    fulfillmentStatus: {
+      label: '灞ヨ鐘舵��',
+      type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/fulfillment_status',
+      display: false,
+      hide: false,minWidth:150,
+      search: true,
+    },
+
+    acceptanceStatus: {
+      label: '楠屾敹鐘舵��',
+      type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/acceptance_status',
+      display: false,
+      hide: false,minWidth:150,
+      search: true,
+    },
+
+    status: {
+      label: '鍚堝悓鏁版嵁鐘舵��',dataType: 'string',
+      type: 'radio', dicUrl: '/system/dict/data/type/sys_normal_disable',
+      display: false,
+      hide: false,
+      search: true,minWidth:150,
+      rules: [
+        {
+          required: true,
+          message: "鍚堝悓鏁版嵁鐘舵�佷笉鑳戒负绌�", trigger: "blur"
+        }
+      ],
+    },
+    updateBy: {
+      label: '鏇存柊浜�',
+      display: false,
+      hide: false,minWidth:150,
+      search: false,
+    },
+    updateTime: {
+      label: '鏇存柊鏃堕棿',
+      display: false,
+      hide: false,minWidth:180,
+      search: false,
+    },
+  }
+})
+
+const {
+  tableData,
+  pageF,
+  rowSave,
+  rowUpdate,
+  rowDel,
+  beforeOpen,
+  searchChange,
+  searchReset,
+  selectionChange,
+  onLoad,
+  currentChange,
+  sizeChange,
+  handleDelete,
+  handleExport,
+  handleUpdate,
+  refreshChange
+} = usePagePlus({
+  form: form,
+  option: option,
+  queryParams: queryParams,
+  idKey: 'id',
+  page: page.value,
+  getListApi: listTmsContract,
+  getDetailApi: getTmsContract,
+  exportApi: exportTmsContract,
+  deleteApi: delTmsContract,
+  addApi: addTmsContract,
+  updateApi: updateTmsContract,
+  getBeginListFunc:()=>{
+    queryParams.value.contractStatus = <any>router.currentRoute.value.query.contactStatus || undefined;
+  },
+  handleUpdateFunc: () => {
+    crudRef.value.rowEdit(selectionList.value[0]);
+  },
+  handleSelectionChangeFunc: (selection: any) => {
+    selectionList.value = selection;
+  },
+})
+console.log(router.currentRoute.value.query.contactStatus)
 
 
 </script>

--
Gitblit v1.8.0