From 4feb321e6fa88e86991da3610b2bdfcf5a2d87a7 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期三, 14 一月 2026 16:50:44 +0800
Subject: [PATCH] 新增字段

---
 ui/admin-ui3/src/views/tms/tmsContract/index.vue |  231 ++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 169 insertions(+), 62 deletions(-)

diff --git a/ui/admin-ui3/src/views/tms/tmsContract/index.vue b/ui/admin-ui3/src/views/tms/tmsContract/index.vue
index 70cd12e..9dbef4e 100644
--- a/ui/admin-ui3/src/views/tms/tmsContract/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsContract/index.vue
@@ -45,6 +45,26 @@
         >瀵煎嚭
         </el-button>
       </template>
+      <template #billingCycle-form="scope">
+       <div style="display: flex;">
+         <div style="width: 40px;flex: 0 0 35px;">涓婃湀</div>
+         <avue-input-number  style="width: 100px;flex: 0 0 100px;" max="31" min="0" v-model="form.billingCycleLastMonthDay"></avue-input-number>
+         <div style="width: 90px;flex: 0 0 88px;">鏃ヨ捣锛岃嚦褰撴湀</div>
+         <avue-input-number style="width: 100px;flex: 0 0 100px;" max="31" min="0"  v-model="form.billingCycleCurrentMonthDay"></avue-input-number>
+       </div>
+      </template>
+      <template #reconciliation-form="scope">
+       <div style="display: flex;">
+         <avue-input-number  style="width: 100px;flex: 0 0 100px;" @change="reconciliationDayChange"  min="0" v-model="form.reconciliationDay"></avue-input-number>
+         <div style="width: 40px;flex: 0 0 88px;">鏃�+寮�绁ㄨ处鏈�</div>
+         <avue-input-number style="width: 100px;flex: 0 0 100px;"  min="0" @change="invoiceDayChange" v-model="form.invoiceDay"></avue-input-number>
+         <div style="width: 40px;flex: 0 0 88px;">鏃�+浠樻璐︽湡</div>
+         <avue-input-number style="width: 100px;flex: 0 0 100px;" min="0" @change="paymentDayChange" v-model="form.paymentDay"></avue-input-number>
+         <div style="width: 40px;flex: 0 0 88px;">鏃�=鎬昏处鏈�</div>
+         <avue-input-number style="width: 100px;flex: 0 0 100px;" min="0" v-model="form.totalAccountDay"></avue-input-number>
+
+       </div>
+      </template>
     </avue-crud>
   </basicContainer>
 </template>
@@ -68,6 +88,7 @@
 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();
 
@@ -110,6 +131,29 @@
             {
               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,
+          change: ({value}: any) => {
+            option.value.group.forEach((item: any) => {
+              if (item.prop == 'fjxx') {
+                item.column.attachmentPath.rules.forEach((item:any)=>{
+                  item.required = value == 1;
+                })
+              }
+            })
+            console.log(value)
+          },
+          rules: [
+            {
+              required: true,
+              message: "鏄惁涓存椂鍚堝悓涓嶈兘涓虹┖", trigger: "change"
             }
           ],
         },
@@ -156,12 +200,6 @@
           addDisplay: true,
           editDisplay: true,
           viewDisplay: true,
-          rules: [
-            {
-              required: true,
-              message: "绛剧害鏃ユ湡涓嶈兘涓虹┖", trigger: "blur"
-            }
-          ],
         },
         contractDate: {
           label: '鍚堝悓鏈熼檺',
@@ -217,7 +255,7 @@
           type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/contract_status',
           addDisplay: true,
           editDisplay: true,
-          viewDisplay: true,
+          viewDisplay: true,value: '0',
           rules: [
             {
               required: true,
@@ -242,7 +280,7 @@
               message: "鐢叉柟鍚嶇О涓嶈兘涓虹┖", trigger: "change"
             }
           ],
-          type: 'table',suffixIcon:'search',
+          type: 'table',suffixIcon:'search',dataType: 'string',
           children:{
             border: true,
             searchMenuSpan: 5,
@@ -336,7 +374,7 @@
               message: "涔欐柟鍚嶇О涓嶈兘涓虹┖", trigger: "change"
             }
           ],
-          type: 'table',suffixIcon:'search',
+          type: 'table',suffixIcon:'search',dataType: 'string',
           children:{
             border: true,
             searchMenuSpan: 5,
@@ -424,66 +462,103 @@
         },
       }
     },
+    // {
+    //   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: 'kfxx',
+      label: '缁撶畻淇℃伅',
+      prop: 'jsxx',
       column: {
-        contractAmount: {
-          label: '鍚堝悓閲戦',
+        cycleType: {
+          label: '鍛ㄦ湡绫诲瀷',
+          type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/cycle_type',
           addDisplay: true,
           editDisplay: true,
           viewDisplay: true,
           rules: [
             {
               required: true,
-              message: "鍚堝悓閲戦涓嶈兘涓虹┖", trigger: "blur"
+              message: "鍛ㄦ湡绫诲瀷涓嶈兘涓虹┖", trigger: "change"
             }
           ],
         },
-        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,
+        billingCycle:{
+          label: '璐︽湡鍛ㄦ湡',labelWidth: 80,
           // rules: [
           //   {
           //     required: true,
-          //     message: "鍙戠エ鐘舵�佷笉鑳戒负绌�", trigger: "change"
+          //     message: "鍛ㄦ湡绫诲瀷涓嶈兘涓虹┖", trigger: "change"
           //   }
           // ],
         },
+        reconciliation:{
+          label: '瀵硅处璐︽湡', span:24,
+          // rules: [
+          //   {
+          //     required: true,
+          //     message: "瀵硅处璐︽湡涓嶈兘涓虹┖", trigger: "change"
+          //   }
+          // ],
+        }
       }
     },
     {
@@ -529,7 +604,7 @@
         //   viewDisplay: true,
         // },
         attachmentPath: {
-          label: '闄勪欢璺緞',
+          label: '闄勪欢',
           addDisplay: true,
           editDisplay: true,
           viewDisplay: true,span: 24,
@@ -540,6 +615,12 @@
             home:'url',
             name:'newFileName',
           },
+          rules: [
+            {
+              required: true,
+              message: "璇蜂笂浼犻檮浠�", trigger: "change"
+            }
+          ],
         },
         // uploadedBy: {
         //   label: '涓婁紶浜�',
@@ -623,6 +704,13 @@
       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',
@@ -679,13 +767,13 @@
       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,
-    },
+    // paymentMethod: {
+    //   label: '浠樻鏂瑰紡',
+    //   type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/payment_method',
+    //   display: false,
+    //   hide: false,minWidth:150,
+    //   search: true,
+    // },
 
     invoiceStatus: {
       label: '鍙戠エ鐘舵��',
@@ -773,6 +861,9 @@
   deleteApi: delTmsContract,
   addApi: addTmsContract,
   updateApi: updateTmsContract,
+  getBeginListFunc:()=>{
+    queryParams.value.contractStatus = <any>router.currentRoute.value.query.contactStatus || undefined;
+  },
   handleUpdateFunc: () => {
     crudRef.value.rowEdit(selectionList.value[0]);
   },
@@ -780,7 +871,23 @@
     selectionList.value = selection;
   },
 })
-
-
+const reconciliationDayChange = ({value}:any)=>{
+  const reconciliationDay = Number(value) || 0;
+  const paymentDay = Number(form.value.paymentDay) || 0;
+  const previousTotal = Number(form.value.paymentDay) || 0;
+  form.value.totalAccountDay = reconciliationDay + paymentDay + previousTotal;
+}
+const invoiceDayChange = ({value}:any)=>{
+  const reconciliationDay = Number(form.value.reconciliationDay) || 0;
+  const paymentDay =  Number(value) || 0;
+  const previousTotal = Number(form.value.paymentDay) || 0;
+  form.value.totalAccountDay = reconciliationDay + paymentDay + previousTotal;
+}
+const paymentDayChange = ({value}:any)=>{
+  const reconciliationDay = Number(form.value.reconciliationDay) || 0;
+  const paymentDay = Number(form.value.invoiceDay) || 0;
+  const previousTotal =  Number(value) || 0;
+  form.value.totalAccountDay = reconciliationDay + paymentDay + previousTotal;
+}
 
 </script>

--
Gitblit v1.8.0