diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue index a9cdb9b..e117036 100644 --- a/src/views/contract/contractList.vue +++ b/src/views/contract/contractList.vue @@ -1752,7 +1752,7 @@ export default { url += contract?.flow_id break; case "other": - let other = row.contract_flow_links.find(i => i.custom_model_id === row.flow_mod_id) + let other = row.contract_flow_links.find(i => i.custom_model_id == row.flow_mod_id) url += other[0]?.flow_id break; default: @@ -1879,12 +1879,14 @@ export default { async buyProcess(row,flow) { // flow 关联后的回调,打开哪种流程创建 // 获取可以 oa自动发起的流程 + const hasMatch = this.flowConfig.some(item => - item.custom_model_id === row.flow_model_id + + item.custom_model_id == row.flow_mod_id ); - console.log("row,flow",row,flow) + console.log("row,flow",row,flow,hasMatch) if(!flow){ - if(true){ + if(hasMatch){ this.$refs.oaLink.row = row this.$refs.oaLink.flow = 'buyProcess' this.$refs.oaLink.isShowOaLinkModal = true @@ -1932,7 +1934,7 @@ export default { async signProcess(row,flow) { // 72 const hasMatch = this.flowConfig.some(item => - item.custom_model_id === row.flow_model_id + item.custom_model_id == row.flow_mod_id ); if(!flow){ if(hasMatch){ @@ -1960,7 +1962,7 @@ export default { async paying(row,flow) { // 75 const hasMatch = this.flowConfig.some(item => - item.custom_model_id === row.flow_model_id + item.custom_model_id == row.flow_mod_id ); if(!flow){ if(hasMatch){ diff --git a/src/views/finance/components/examineRegistration.vue b/src/views/finance/components/examineRegistration.vue index dfb0ad5..83a6705 100644 --- a/src/views/finance/components/examineRegistration.vue +++ b/src/views/finance/components/examineRegistration.vue @@ -869,8 +869,9 @@ import {listdeptNoAuth} from "@/api/system/department"; //默认选择计划 toggleSelection(plans) { if (plans) { - this.plans.filter(plan => { - console.log("this.plans",plans,this.plans,this.paymentRegistrationForm) + console.log("this.plans",plans,this.plans,this.paymentRegistrationForm) + let arr = this.plans.filter(plan => { + // if (plans.includes(plan.pid.toString())) { // // plan.use_money = this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money // plan.use_money = this.paymentRegistrationForm.applyMoney @@ -879,16 +880,23 @@ import {listdeptNoAuth} from "@/api/system/department"; // else{ // plan.use_money = this.paymentRegistrationForm.applyMoney // } - if (plans.includes(plan.pid)) { - plan.use_money = this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money + if (plans.includes(plan.id)) { + plan.use_money = parseFloat(this.paymentRegistrationForm.plan[plans.indexOf(plan.id)].use_money) ==0 ? + this.paymentRegistrationForm.actMoney : this.paymentRegistrationForm.plan[plans.indexOf(plan.id)].use_money + return true + }else if(plans.includes(plan.pid)) { + plan.use_money = parseFloat(this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money) ==0 ? + this.paymentRegistrationForm.actMoney : this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money return true }else{ plan.use_money = this.paymentRegistrationForm.actMoney } // plan.use_money = this.paymentRegistrationForm.applyMoney - }).forEach(row => { - + }) + console.log("arr",arr) + arr.forEach(row => { + console.log("row",row) this.$refs.planTable.toggleRowSelection(row) this.paymentRegistrationForm.plan.push({