From 5c3154277d1f6d94d511cb7fd70e7b88ab318a99 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期三, 07 一月 2026 17:00:39 +0800
Subject: [PATCH] 新增开票接口
---
ui/admin-ui3/src/views/tms/tmsContract/index.vue | 404 ++++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 294 insertions(+), 110 deletions(-)
diff --git a/ui/admin-ui3/src/views/tms/tmsContract/index.vue b/ui/admin-ui3/src/views/tms/tmsContract/index.vue
index 9573a4d..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>
@@ -65,7 +85,10 @@
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();
@@ -108,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"
}
],
},
@@ -154,12 +200,6 @@
addDisplay: true,
editDisplay: true,
viewDisplay: true,
- rules: [
- {
- required: true,
- message: "绛剧害鏃ユ湡涓嶈兘涓虹┖", trigger: "blur"
- }
- ],
},
contractDate: {
label: '鍚堝悓鏈熼檺',
@@ -176,9 +216,15 @@
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
change: ({value}:{value:any}) => {
- if (Array.isArray(value)){
+ 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)
+ ];
}
}
},
@@ -209,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,
@@ -234,7 +280,7 @@
message: "鐢叉柟鍚嶇О涓嶈兘涓虹┖", trigger: "change"
}
],
- type: 'table',suffixIcon:'search',
+ type: 'table',suffixIcon:'search',dataType: 'string',
children:{
border: true,
searchMenuSpan: 5,
@@ -255,7 +301,7 @@
contactName: {
label: '鑱旂郴浜哄鍚�',minWidth: 120,
},
- signCompany: {
+ signCompanyName: {
label: '绛剧害鍏徃', minWidth: 150,
},
},
@@ -283,7 +329,21 @@
})
}
- }
+ },
+ 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: '鐢叉柟鑱旂郴浜�',
@@ -303,7 +363,7 @@
label: '涔欐柟淇℃伅',
prop: 'yfxx',
column: {
- partyBName: {
+ partyBId: {
label: '涔欐柟鍚嶇О',
addDisplay: true,
editDisplay: true,
@@ -311,10 +371,83 @@
rules: [
{
required: true,
- message: "涔欐柟鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+ message: "涔欐柟鍚嶇О涓嶈兘涓虹┖", trigger: "change"
}
],
+ type: 'table',suffixIcon:'search',dataType: 'string',
+ 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,
@@ -329,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"
- }
- ],
+ billingCycle:{
+ label: '璐︽湡鍛ㄦ湡',labelWidth: 80,
+ // 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"
- }
- ],
- },
+ reconciliation:{
+ label: '瀵硅处璐︽湡', span:24,
+ // rules: [
+ // {
+ // required: true,
+ // message: "瀵硅处璐︽湡涓嶈兘涓虹┖", trigger: "change"
+ // }
+ // ],
+ }
}
},
{
@@ -427,24 +597,37 @@
label: '闄勪欢淇℃伅',
prop: 'fjxx',
column: {
- attachmentName: {
- label: '闄勪欢鍚嶇О',
- addDisplay: false,
- editDisplay: false,
- viewDisplay: true,
- },
+ // attachmentName: {
+ // label: '闄勪欢鍚嶇О',
+ // addDisplay: false,
+ // editDisplay: false,
+ // viewDisplay: true,
+ // },
attachmentPath: {
- label: '闄勪欢璺緞',
+ label: '闄勪欢',
addDisplay: true,
editDisplay: true,
- viewDisplay: 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,
- },
+ // uploadedBy: {
+ // label: '涓婁紶浜�',
+ // addDisplay: false,
+ // editDisplay: false,
+ // viewDisplay: true,
+ // },
}
},
{
@@ -521,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',
@@ -577,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: '鍙戠エ鐘舵��',
@@ -671,39 +861,33 @@
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;
},
- handleEndOpenFunc:()=>{
- if (form.value.contractStartDate && form.value.contractEndDate){
- form.value.contractDate = [form.value.contractStartDate, form.value.contractEndDate]
- }
- }
})
-
-onMounted(() => {
- watch(() => form.value.partyAId, () => {
-
- if (!form.value.partyAId){
- return;
- }
- 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,
- });
- }
- });
-});
-
+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