|
|
@ -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() { |
|
|
|