Browse Source

修改支付次数

master
wbc 1 week ago
parent
commit
f710e1fc97
  1. 58
      src/views/projectLib/projectContract/ContractPay.vue
  2. 37
      src/views/projectLib/projectContract/projectContract.data.ts

58
src/views/projectLib/projectContract/ContractPay.vue

@ -3,19 +3,18 @@
<!-- <BasicModal v-bind="$attrs" @register="registerModal" title="项目合同信息详情" width="1500px" :showOkBtn="false"
:showCancelBtn="false"> -->
<el-divider content-position="left">合同信息</el-divider>
<BasicForm @register="registerContractForm"/>
<div >
<el-button type="primary" @click="addFrom">
<BasicForm @register="registerContractForm" />
<div>
<el-button type="primary" @click="addFrom" v-if="!data.isJiHua">
<template #icon>
<PlusCircleOutlined />
</template>
</el-button>
<el-button type="primary" @click="minusFrom">
<el-button type="primary" @click="minusFrom" v-if="!data.isJiHua">
<template #icon>
<MinusCircleOutlined />
</template>
</el-button>
</div>
<!-- </BasicModal> -->
@ -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<Array<any>>([]);
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() {

37
src/views/projectLib/projectContract/projectContract.data.ts

@ -17,7 +17,7 @@ export const contractTablecolumns: BasicColumn[] = [
dataIndex: 'projectName',
width: 300,
resizable: true,
align:'left',
align: 'left',
slots: { customRender: 'projectName' },
},
{
@ -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 },
},
];

Loading…
Cancel
Save