Browse Source

修改支付次数

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

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

@ -5,17 +5,16 @@
<el-divider content-position="left">合同信息</el-divider>
<BasicForm @register="registerContractForm" />
<div>
<el-button type="primary" @click="addFrom">
<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();
@ -197,12 +195,12 @@
projectId: data.projectid,
taskName: data.taskName,
};
let resdate = (await getContractinfoByTaskName(param)) ;
let res =[]
let resdate = await getContractinfoByTaskName(param);
let res = [];
if (data.isJiHua == true) {
res = resdate.planList
res = resdate.planList;
} else {
res = resdate.realList
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() {

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

@ -230,7 +230,7 @@ export const contractformSchemas: FormSchema[] = [
show: false,
},
{
label: '第1次支付',
label: '支付日期',
field: 'payDate',
component: 'DatePicker',
componentProps: {
@ -291,6 +291,21 @@ export const contractformSchemas: FormSchema[] = [
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',

Loading…
Cancel
Save