From 2aaa32f860d4f3fbda01eded1b20a7cab9d3a393 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期三, 24 十二月 2025 10:58:20 +0800
Subject: [PATCH] 应付接口
---
ui/admin-ui3/src/views/tms/tmsProject/index.vue | 324 +++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 247 insertions(+), 77 deletions(-)
diff --git a/ui/admin-ui3/src/views/tms/tmsProject/index.vue b/ui/admin-ui3/src/views/tms/tmsProject/index.vue
index ea1dd22..e582100 100644
--- a/ui/admin-ui3/src/views/tms/tmsProject/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsProject/index.vue
@@ -60,10 +60,12 @@
updateTmsProject
} from "@/api/tms/tmsProject";
import useCurrentInstance from "@/utils/useCurrentInstance";
-import {computed, reactive, ref, toRefs} from "vue";
+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 {getTmsContract, listTmsContract} from "@/api/tms/tmsContract";
const {proxy} = useCurrentInstance();
const crudRef = ref();
@@ -91,104 +93,273 @@
const option = ref({
pageKey: 'TmsProject',
rowKey: 'id',
+ group:[
+ {
+ label: '鍩虹淇℃伅',
+ prop: 'jcxx',
+ column:{
+ projectName: {
+ label: '椤圭洰鍚嶇О',
+ display: true,
+ rules: [
+ {
+ required: true,
+ message: "椤圭洰鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ projectCode: {
+ label: '椤圭洰缂栧彿',
+ display: true,
+
+ },
+ relatedCustomerId: {
+ label: '鍏宠仈瀹㈡埛',
+ display: true,minWidth: 150,
+ type: 'table',suffixIcon:'search',dataType:'string',
+ rules: [
+ {
+ required: true,
+ message: "鍏宠仈瀹㈡埛涓嶈兘涓虹┖", trigger: "change"
+ }
+ ],
+ 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?.('relatedCustomerId')?.$refs?.temp;
+ if (!table) return;
+ let active = table.active;
+ if (Array.isArray(active)) active = active[0];
+ if (active) {
+ Object.assign(form.value, {
+ relatedCustomerId: active.id,
+ relatedCustomerName: active.customerShortName,
+ });
+ form.value.relatedContractId = undefined;
+ form.value.relatedContractName = undefined;
+ }
+ },
+ },
+ relatedContractId: {
+ label: '鍏宠仈鍚堝悓',
+ display: true,minWidth: 150,dataType:'string',
+ type: 'table',suffixIcon:'search',
+ rules: [
+ {
+ required: true,
+ message: "鍏宠仈鍚堝悓涓嶈兘涓虹┖", trigger: "change"
+ }
+ ],
+ children:{
+ border: true,
+ searchMenuSpan: 5,
+ column:{
+ contractCode: {
+ label: '鍚堝悓缂栧彿', minWidth: 130,
+ search: true,
+ },
+ contractName: {
+ label: '鍚堝悓鍚嶇О',minWidth: 120,
+ search: true,
+ },
+ contractType: {
+ label: '鍚堝悓绫诲瀷',minWidth: 120,
+ type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/contract_type',
+ search: true,
+ },
+ signDate: {
+ label: '绛剧害鏃ユ湡', minWidth: 150,
+ },
+ 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 ''
+ },
+ },
+ },
+
+ },
+ props:{
+ label: 'contractName',
+ 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]
+ }
+ getTmsContract(id).then(res=>{
+ return callback(res.data||{})
+ })
+ }else{
+ listTmsContract({partyAId:form.value.relatedCustomerId,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?.('relatedContractId')?.$refs?.temp;
+ if (!table) return;
+ let active = table.active;
+ if (Array.isArray(active)) active = active[0];
+ if (active) {
+ Object.assign(form.value, {
+ relatedContractId: active.id,
+ relatedContractName: active.contractName,
+ });
+ }
+ },
+ },
+
+
+ }
+ },
+ {
+ label: '鍏朵粬淇℃伅',
+ prop: 'qtxx',
+ column:{
+ status: {
+ label: '鐘舵��',dataType: 'string',
+ type: 'radio', dicUrl: '/system/dict/data/type/project_status',
+ addDisplay: false,minWidth: 150,
+ editDisplay: false,
+ viewDisplay: true,
+ hide: false,
+ search: true,
+ },
+ createTime: {
+ label: '鍒涘缓鏃堕棿',
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: true,
+ hide: true,
+ search: false,
+ },
+ createBy: {
+ label: '鍒涘缓浜�',
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: true,
+ },
+ 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,
+ hide: true,
+ search: false,
+ },
+ }
+ }
+ ],
+
column: {
- // id: {
- // label: '涓婚敭ID',
- // addDisplay: true,
- // editDisplay: false,
- // viewDisplay: true,
- // hide: true,
- // search: false,
- // },
projectName: {
label: '椤圭洰鍚嶇О',
- addDisplay: true,minWidth: 150,
- editDisplay: true,
- viewDisplay: true,
- hide: false,
+ display: false,minWidth: 150,
search: true,
- rules: [
- {
- required: true,
- message: "椤圭洰鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
- }
- ],
},
projectCode: {
label: '椤圭洰缂栧彿',
- addDisplay: true,minWidth: 150,
- editDisplay: true,
- viewDisplay: true,
- hide: false,
+ display: false,minWidth: 150,
search: true,
- rules: [
- {
- required: true,
- message: "椤圭洰缂栧彿涓嶈兘涓虹┖", trigger: "blur"
- }
- ],
+ },
+ relatedContractName: {
+ label: '鍏宠仈鍚堝悓',
+ display: false,minWidth: 150,
+ search: true,
},
- relatedContract: {
- label: '鍏宠仈鍚堝悓',
- display: true,minWidth: 150,
- hide: false,
- search: true,
- },
- relatedCustomer: {
+ relatedCustomerName: {
label: '鍏宠仈瀹㈡埛',
- addDisplay: true,minWidth: 150,
- editDisplay: true,
- viewDisplay: true,
- hide: false,
+ 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,
+ type: 'radio', dicUrl: '/system/dict/data/type/project_status',
+ display: false,minWidth: 150,
search: true,
- rules: [
- {
- required: true,
- message: "鐘舵�佷笉鑳戒负绌�", trigger: "blur"
- }
- ],
- },
- createTime: {
- label: '鍒涘缓鏃堕棿',
- addDisplay: false,
- editDisplay: false,
- viewDisplay: true,
- hide: true,
- search: false,
},
updateBy: {
label: '鏇存柊浜�',
- addDisplay: false,
- editDisplay: false,minWidth: 150,
- viewDisplay: true,
- hide: false,
+ display: false,minWidth: 150,
search: false,
},
updateTime: {
label: '鏇存柊鏃堕棿',
- addDisplay: false,
- editDisplay: false,minWidth: 180,
- viewDisplay: true,
- hide: false,
- search: false,
- },
- remark: {
- label: '澶囨敞',
- type: 'textarea', minRows: 3, maxRows: 5,
- addDisplay: true,span: 24,
- editDisplay: true,
- viewDisplay: true,
- hide: true,
+ display: false,minWidth: 180,
search: false,
},
}
@@ -230,6 +401,5 @@
selectionList.value = selection;
}
})
-
</script>
--
Gitblit v1.8.0