diff --git a/src/views/projectLib/projectContract/ContractPay.vue b/src/views/projectLib/projectContract/ContractPay.vue index 70bc69b..f4fd1bf 100644 --- a/src/views/projectLib/projectContract/ContractPay.vue +++ b/src/views/projectLib/projectContract/ContractPay.vue @@ -3,19 +3,18 @@ 合同信息 - -
- - - - - - - + +
+ + + + + +
@@ -129,7 +128,6 @@ }; const bbb = ({ schema, formModel, formActionType }) => { - return { //数值精度 precision: 2, @@ -149,7 +147,7 @@ }; // const [registerModal, { closeModal }] = useModalInner(init); - let data = defineProps(['projectid', 'taskName', 'isModify', 'isEdit',"isJiHua"]); + let data = defineProps(['projectid', 'taskName', 'isModify', 'isEdit', 'isJiHua']); let fileList = reactive>([]); let isModify = ref(); let projectid = ref(); @@ -182,7 +180,7 @@ } if (item.field == 'taskName') { item.componentProps.options = taskNameTypeDict.value; - console.log('item.componentProps.options', item.componentProps.options,data.taskName); + console.log('item.componentProps.options', item.componentProps.options, data.taskName); if (data.taskName != '合同签订') { item.dynamicDisabled = true; item.defaultValue = data.taskName; @@ -191,18 +189,18 @@ }); console.log('datadatadata', data, tempSchemas); fileList.pop(); - if (data.isModify == true||(data.isEdit!=null&&data.isEdit!=undefined)) { + if (data.isModify == true || (data.isEdit != null && data.isEdit != undefined)) { isModify.value = data.isModify; let param: any = { projectId: data.projectid, taskName: data.taskName, }; - let resdate = (await getContractinfoByTaskName(param)) ; - let res =[] - if(data.isJiHua == true){ - res = resdate.planList - }else{ - res = resdate.realList + let resdate = await getContractinfoByTaskName(param); + let res = []; + if (data.isJiHua == true) { + res = resdate.planList; + } else { + res = resdate.realList; } let obj = new Object(); //记录一共有几次支付 @@ -217,6 +215,10 @@ }); } } + + tempSchemas[1].label = '第' + res[0].sortFlag + '次支付'; + console.log(res); + console.log(contractformSchemas); if (num > 1) { payNum.value = num; for (let i = 2; i <= num; i++) { @@ -227,7 +229,7 @@ tempitem.componentProps = bbb; } if (tempitem.field == 'payDate') { - tempitem.label = '第' + i + '次支付'; + tempitem.label = '第' + res[i - 1].sortFlag + '次支付'; } if (tempitem.field == 'taskName') { tempitem.componentProps.options = taskNameTypeDict.value; @@ -243,19 +245,21 @@ tempSchemas.push(tempitem); }); } + tempSchemas[1].label = '第' + res[0].sortFlag + '次支付'; resetSchema(tempSchemas); updateSchema(tempSchemas); - } else { + tempSchemas[1].label = '第' + res[0].sortFlag + '次支付'; resetSchema(tempSchemas); updateSchema(tempSchemas); - } console.log('结果是', res, obj); obj['id'] = data.projectid; + console.log(obj); setFieldsValue(obj); } else { //需要项目id 组件需要这个id去查询属性名称是否正确 + tempSchemas[2].show = true resetSchema(tempSchemas); updateSchema(tempSchemas); setFieldsValue({ id: data.projectid }); @@ -308,9 +312,9 @@ // tempitem.dynamicRules = aaa; tempitem.componentProps = bbb; } - if (tempitem.field == 'payDate') { - tempitem.label = '第' + payNum.value + '次支付'; - } + // if (tempitem.field == 'payDate') { + // tempitem.label = '第' + payNum.value + '次支付'; + // } if (tempitem.field == 'taskName') { tempitem.componentProps.options = taskNameTypeDict.value; if (data.taskName != '合同签订') { @@ -318,16 +322,21 @@ tempitem.defaultValue = data.taskName; } } + if (tempitem.field == 'sortFlag') { + tempitem.show = true + } // if (tempitem.field == "totalMoney") { // tempitem.label = "第" + payNum.value + "支付总金额" // } tempitem.field = tempitem.field + payNum.value; tempSchemas.push(tempitem); + }); + // console.log("temp222222",tempSchemas,tempSchemas.length) resetSchema(tempSchemas); updateSchema(tempSchemas); - + console.log(tempSchemas) } } function minusFrom() { @@ -336,15 +345,14 @@ return; } let last = cloneDeep(tempSchemas); - last = last.slice(payNum.value * 9 - 9); + last = last.slice(payNum.value * 10 - 10); last.forEach((element) => { removeSchemaByField(element.field); }); - tempSchemas = tempSchemas.slice(0, payNum.value * 9 - 9); + tempSchemas = tempSchemas.slice(0, payNum.value * 10 - 10); payNum.value -= 1; resetSchema(tempSchemas); updateSchema(tempSchemas); - } //导入Excel病种信息数据 async function submitImportForm() { diff --git a/src/views/projectLib/projectContract/projectContract.data.ts b/src/views/projectLib/projectContract/projectContract.data.ts index a6a9a97..c8a3995 100644 --- a/src/views/projectLib/projectContract/projectContract.data.ts +++ b/src/views/projectLib/projectContract/projectContract.data.ts @@ -17,41 +17,41 @@ export const contractTablecolumns: BasicColumn[] = [ dataIndex: 'projectName', width: 300, resizable: true, - align:'left', + align: 'left', slots: { customRender: 'projectName' }, }, { title: '行政区划', dataIndex: 'adminDivision', - resizable: true + resizable: true }, { title: '责任单位', dataIndex: 'dutyWorkplace', - resizable: true + resizable: true }, { title: '单位属性', dataIndex: 'workplaceProperties', - resizable: true + resizable: true }, { title: '改革所属项目', dataIndex: 'reformName', format: 'dict|reformTasks', - resizable: true + resizable: true }, { title: '上级指导处室', dataIndex: 'superLeader', format: 'dict|superLeader', - resizable: true + resizable: true }, { title: '合同状态', dataIndex: 'contractStatus', format: 'dict|taskStatus', - resizable: true + resizable: true }, ]; @@ -230,7 +230,7 @@ export const contractformSchemas: FormSchema[] = [ show: false, }, { - label: '第1次支付', + label: '支付日期', field: 'payDate', component: 'DatePicker', componentProps: { @@ -288,15 +288,30 @@ export const contractformSchemas: FormSchema[] = [ // ]; // }, required: true, - colProps: { span: 6,}, + colProps: { span: 6, }, }, + { + label: '第几次支付', + field: 'sortFlag', + component: 'InputNumber', + componentProps: { + //数值精度 + precision: 0, + //步数 + step: 1, + style: { width: '80%' }, + }, + colProps: { span: 4 }, + required: true, + show:false + }, { label: '属性', field: 'taskName', component: 'Select', componentProps: { - options: [{label:"首付支付",value:"首付支付"}], + options: [{ label: "首付支付", value: "首付支付" }], }, // dynamicRules: ({ values }) => { // console.log('values:', values);//表单所有值 @@ -336,7 +351,7 @@ export const contractformSchemas: FormSchema[] = [ // ]; // }, required: true, - colProps: { span: 6,}, + colProps: { span: 6, }, helpMessage: '需与项目计划的阶段名称所匹配', }, { @@ -352,7 +367,7 @@ export const contractformSchemas: FormSchema[] = [ }, required: true, - colProps: { span: 6 ,}, + colProps: { span: 6, }, labelWidth: "130px", }, @@ -361,7 +376,7 @@ export const contractformSchemas: FormSchema[] = [ field: 'centralMoney', component: 'InputNumber', required: true, - colProps: { span: 4,offset: 3,pull:3 }, + colProps: { span: 4, offset: 3, pull: 3 }, }, { @@ -369,21 +384,21 @@ export const contractformSchemas: FormSchema[] = [ field: 'provincialMoney', component: 'InputNumber', required: true, - colProps: { span: 4,pull:3 }, + colProps: { span: 4, pull: 3 }, }, { label: '市级资金', field: 'cityMoney', component: 'InputNumber', required: true, - colProps: { span: 4 ,pull:3}, + colProps: { span: 4, pull: 3 }, }, { label: '区县级资金', field: 'countyMoney', component: 'InputNumber', required: true, - colProps: { span: 4,pull:3}, + colProps: { span: 4, pull: 3 }, }, { @@ -391,6 +406,6 @@ export const contractformSchemas: FormSchema[] = [ field: 'selfMoney', component: 'InputNumber', required: true, - colProps: { span: 4 ,pull:3}, + colProps: { span: 4, pull: 3 }, }, ];