From 4b0840a5a520071b3dbb9a0515918f216c739b6c Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Sat, 3 Feb 2024 17:03:59 +0800 Subject: [PATCH] add --- src/components/flowProcess/index.vue | 146 ++++++++++++------ src/views/InvoicingRequests/edit.vue | 20 ++- src/views/bid_document_examination/edit.vue | 15 +- src/views/bidbbond/edit.vue | 11 +- src/views/contract_negotiation/edit.vue | 7 + src/views/finance_payment_apply/edit.vue | 13 +- src/views/finance_payment_plan/edit.vue | 12 +- src/views/finance_receipt_record/edit.vue | 12 +- src/views/finance_refund_record/edit.vue | 11 +- src/views/material_purchase_request/edit.vue | 9 +- src/views/project_cost_adjustment/edit.vue | 12 +- src/views/project_cost_budget/edit.vue | 11 +- src/views/project_equipment_budget/edit.vue | 11 +- .../project_expense_reimbursement/edit.vue | 10 +- src/views/project_labor_budget/edit.vue | 12 +- src/views/project_loan_apply/edit.vue | 12 +- src/views/project_material_budget/edit.vue | 9 +- src/views/project_settlement/edit.vue | 8 + .../project_subcontract_settlement/edit.vue | 23 +-- src/views/project_subpackage_budget/edit.vue | 8 + src/views/project_total_budget/edit.vue | 9 +- .../project_travel_reimbursement/edit.vue | 11 +- src/views/project_trip_apply/edit.vue | 10 +- src/views/recordsPayment/edit.vue | 12 +- src/views/refund/edit.vue | 12 +- src/views/refundbidDeposit/edit.vue | 12 +- src/views/remittance/edit.vue | 12 +- .../edit.vue | 11 +- 28 files changed, 349 insertions(+), 112 deletions(-) diff --git a/src/components/flowProcess/index.vue b/src/components/flowProcess/index.vue index d91a125..57a4123 100644 --- a/src/components/flowProcess/index.vue +++ b/src/components/flowProcess/index.vue @@ -1,49 +1,109 @@ - - - - - - - - - - - - - - - - - - - - - - - - 究极张伟 - 究极张伟 - 究极张伟 - - - + + + + 审批流程 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ item.name + }} + + + + + + - \ No newline at end of file +const flowTyprList = ref([]) + +const getFlowtypeList = async () => { + let res = await apiFlowTypeLists() + flowTyprList.value = res.lists + console.log(res, "res") + +} + +// 获取对应审批类型 +const flowTypeList = ref([]) + +const getFlowTypeList = async () => { + if (!formData.flow_type) return + formData.flow_path = '' + flowTypeList.value = [] + let res = await apiFlowLists({ + flow_type: formData.flow_type, + status: 2 + }) + Object.assign(flowTypeList.value, res.lists) +} + +// 获取流程详情 +const flowDetail = ref({}) + +const getDetail = async () => { + let res = await apiFlowDetail({ id: formData.flow_path }) + flowDetail.value = res + emits("confirm", formData); + +} + +const getDescr = (item) => { + if (item.flow_step == 1) return "当前部门负责人" + else { + return (item.flow_user.map(val => ([val.name]))).join(',') + } +} + +const numberToChinese = (num) => { + let chineseNum = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"]; + return chineseNum[num]; +} +// 选中数据子父传递 +getFlowtypeList() + \ No newline at end of file diff --git a/src/views/InvoicingRequests/edit.vue b/src/views/InvoicingRequests/edit.vue index 6a2c82a..54f240e 100644 --- a/src/views/InvoicingRequests/edit.vue +++ b/src/views/InvoicingRequests/edit.vue @@ -209,15 +209,10 @@ - - - - - 审批流程 - - - - + + @@ -360,10 +355,13 @@ const formData = reactive({ phone: "", mailing_time: "", mailing_type: "", - mailing_no: "" + mailing_no: "", + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} // 表单验证 const formRules = reactive({ diff --git a/src/views/bid_document_examination/edit.vue b/src/views/bid_document_examination/edit.vue index 9358360..38d330d 100644 --- a/src/views/bid_document_examination/edit.vue +++ b/src/views/bid_document_examination/edit.vue @@ -232,6 +232,10 @@ + + @@ -390,9 +394,16 @@ const formData = reactive({ business_contract_deviation: '', business_contract_deviation_handling_plan: '', business_contract_deviation_annex: [], - quotation_detail: [] -}) + quotation_detail: [], + approve_detail: { + flow_type: "", + flow_path: "" + } +}) +const flowFn = (e: any) => { + formData.approve_detail = e +} watch(tableData.value, (newVal, oldVal) => { formData.business_review_total_amount = 0 tableData.value.forEach(item => { diff --git a/src/views/bidbbond/edit.vue b/src/views/bidbbond/edit.vue index fc9bd3a..694e784 100644 --- a/src/views/bidbbond/edit.vue +++ b/src/views/bidbbond/edit.vue @@ -121,6 +121,10 @@ + + @@ -231,9 +235,12 @@ const formData = reactive({ "annex": "", "deposit_bank": "", "account_name": "", - "account": "" + "account": "", + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} // 表单验证 const formRules = reactive({ diff --git a/src/views/contract_negotiation/edit.vue b/src/views/contract_negotiation/edit.vue index 3b573b5..4863efd 100644 --- a/src/views/contract_negotiation/edit.vue +++ b/src/views/contract_negotiation/edit.vue @@ -144,6 +144,10 @@ + + @@ -251,6 +255,9 @@ const formData = reactive({ negotiation_quotation: [], negotiation_basis: [], }) +const flowFn = (e: any) => { + formData.approve_detail = e +} if (props.project) { console.log(props.project) diff --git a/src/views/finance_payment_apply/edit.vue b/src/views/finance_payment_apply/edit.vue index e728a79..330658a 100644 --- a/src/views/finance_payment_apply/edit.vue +++ b/src/views/finance_payment_apply/edit.vue @@ -199,6 +199,12 @@ + + + + @@ -397,9 +403,12 @@ const formData = reactive({ "deposit_bank": "", "account_name": "", "account": "" - } + }, + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} // 表单验证 const formRules = reactive({ diff --git a/src/views/finance_payment_plan/edit.vue b/src/views/finance_payment_plan/edit.vue index be8e699..a360db8 100644 --- a/src/views/finance_payment_plan/edit.vue +++ b/src/views/finance_payment_plan/edit.vue @@ -117,7 +117,10 @@ - + + @@ -257,9 +260,12 @@ const formData = reactive({ status: '', remark: "", annex: [], - contract_cate: 1 + contract_cate: 1, + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} // 表单验证 const formRules = reactive({ diff --git a/src/views/finance_receipt_record/edit.vue b/src/views/finance_receipt_record/edit.vue index 1208edc..dc60712 100644 --- a/src/views/finance_receipt_record/edit.vue +++ b/src/views/finance_receipt_record/edit.vue @@ -152,6 +152,11 @@ + + + @@ -310,9 +315,12 @@ const formData = reactive({ receipt_date: "", remark: "", annex: "", - contract_cate: 1 + contract_cate: 1, + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} // 表单验证 const formRules = reactive({ diff --git a/src/views/finance_refund_record/edit.vue b/src/views/finance_refund_record/edit.vue index 50e76f5..189a03a 100644 --- a/src/views/finance_refund_record/edit.vue +++ b/src/views/finance_refund_record/edit.vue @@ -142,6 +142,10 @@ + + @@ -314,11 +318,14 @@ const formData = reactive({ "deposit_bank": "", "account_name": "", "account": "" - } + }, + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} // 表单验证 const formRules = reactive({ diff --git a/src/views/material_purchase_request/edit.vue b/src/views/material_purchase_request/edit.vue index c6d54cc..c9926b3 100644 --- a/src/views/material_purchase_request/edit.vue +++ b/src/views/material_purchase_request/edit.vue @@ -141,6 +141,10 @@ + + @@ -295,8 +299,11 @@ const formData = reactive({ remark: '', annex: [], purchase_request_detail: [], + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} // 表单验证 const formRules = reactive({ diff --git a/src/views/project_cost_adjustment/edit.vue b/src/views/project_cost_adjustment/edit.vue index 7fd8b11..52fa8dd 100644 --- a/src/views/project_cost_adjustment/edit.vue +++ b/src/views/project_cost_adjustment/edit.vue @@ -35,7 +35,10 @@ - + + @@ -91,9 +94,14 @@ const formData = reactive({ "adjust_amount": "", "remark": "", "annex": [], - project_name: "" + project_name: "", + approve_detail: {} }) +const flowFn = (e: any) => { + formData.approve_detail = e +} + const customEvent = (e: any) => { console.log(e) formData.project_id = e.id diff --git a/src/views/project_cost_budget/edit.vue b/src/views/project_cost_budget/edit.vue index 4c3d288..439a36f 100644 --- a/src/views/project_cost_budget/edit.vue +++ b/src/views/project_cost_budget/edit.vue @@ -90,7 +90,10 @@ - + + @@ -158,8 +161,12 @@ const formData = reactive({ "standard": "", "remark": "" } - ] + ], + approve_detail: {} }) +const flowFn = (e: any) => { + formData.approve_detail = e +} const customEvent = (e: any) => { formData.project_id = e.id formData.project_code = e.project_code diff --git a/src/views/project_equipment_budget/edit.vue b/src/views/project_equipment_budget/edit.vue index 1268039..30619a8 100644 --- a/src/views/project_equipment_budget/edit.vue +++ b/src/views/project_equipment_budget/edit.vue @@ -94,7 +94,10 @@ - + + @@ -168,8 +171,12 @@ const formData = reactive({ "price": 0, "remark": "" } - ] + ], + approve_detail: {} }) +const flowFn = (e: any) => { + formData.approve_detail = e +} const customEvent = (e) => { formData.project_id = e.id formData.project_code = e.project_code diff --git a/src/views/project_expense_reimbursement/edit.vue b/src/views/project_expense_reimbursement/edit.vue index b85aaea..ee0ed53 100644 --- a/src/views/project_expense_reimbursement/edit.vue +++ b/src/views/project_expense_reimbursement/edit.vue @@ -187,6 +187,10 @@ + + @@ -325,8 +329,12 @@ const formData = reactive({ "deposit_bank": "", "account_name": "", "account": "" - } + }, + approve_detail: {} }) +const flowFn = (e: any) => { + formData.approve_detail = e +} // 上传文件 const handleAvatarSuccess_four = (response: any) => { // @ts-ignore diff --git a/src/views/project_labor_budget/edit.vue b/src/views/project_labor_budget/edit.vue index 531629c..bd9d068 100644 --- a/src/views/project_labor_budget/edit.vue +++ b/src/views/project_labor_budget/edit.vue @@ -90,7 +90,10 @@ - + + @@ -163,10 +166,13 @@ const formData = reactive({ "remark": "" } - ] + ], + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} const customEvent = (e) => { formData.project_id = e.id diff --git a/src/views/project_loan_apply/edit.vue b/src/views/project_loan_apply/edit.vue index 13bd1da..8ee40f8 100644 --- a/src/views/project_loan_apply/edit.vue +++ b/src/views/project_loan_apply/edit.vue @@ -68,6 +68,12 @@ + + + + @@ -132,9 +138,13 @@ const formData = reactive({ "deposit_bank": "", "account_name": "", "account": "" - } + }, + approve_detail: {} }) +const flowFn = (e: any) => { + formData.approve_detail = e +} // 上传文件 const handleAvatarSuccess_four = (response: any) => { // @ts-ignore diff --git a/src/views/project_material_budget/edit.vue b/src/views/project_material_budget/edit.vue index c337879..6129da0 100644 --- a/src/views/project_material_budget/edit.vue +++ b/src/views/project_material_budget/edit.vue @@ -121,6 +121,10 @@ + + @@ -173,8 +177,11 @@ const formData = reactive({ material_budget_detail: [], remark: '', annex: [], + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} //获取值 const customEvent = (e) => { diff --git a/src/views/project_settlement/edit.vue b/src/views/project_settlement/edit.vue index 8bbe137..e5f8277 100644 --- a/src/views/project_settlement/edit.vue +++ b/src/views/project_settlement/edit.vue @@ -53,6 +53,10 @@ + + @@ -183,7 +187,11 @@ const formData = reactive({ settlement_date: '', remark: '', annex: [], + approve_detail: {} }) +const flowFn = (e: any) => { + formData.approve_detail = e +} const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => { const phoneReg = /^1[3|4|5|7|8][0-9]{9}$/ // if (!value) { diff --git a/src/views/project_subcontract_settlement/edit.vue b/src/views/project_subcontract_settlement/edit.vue index 60cc9b7..42a3e52 100644 --- a/src/views/project_subcontract_settlement/edit.vue +++ b/src/views/project_subcontract_settlement/edit.vue @@ -43,6 +43,10 @@ + + @@ -161,24 +165,13 @@ const formData = reactive({ settlement_date: '', remark: '', annex: [], + approve_detail: {} }) -const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => { - const phoneReg = /^1[3|4|5|7|8][0-9]{9}$/ - // if (!value) { - // return callback(new Error('电话号码不能为空')) - // } - if (value) { - setTimeout(() => { - if (phoneReg.test(value)) { - callback() - } else { - callback(new Error('电话号码格式不正确')) - } - - }, 100) - } +const flowFn = (e: any) => { + formData.approve_detail = e } + //监听输入 const amountinput = (e) => { // console.log(e) diff --git a/src/views/project_subpackage_budget/edit.vue b/src/views/project_subpackage_budget/edit.vue index 5e419e6..d717238 100644 --- a/src/views/project_subpackage_budget/edit.vue +++ b/src/views/project_subpackage_budget/edit.vue @@ -105,6 +105,10 @@ + + @@ -160,7 +164,11 @@ const formData = reactive({ subpackage_budget_detail: [], remark: '', annex: [], + approve_detail: {} }) +const flowFn = (e: any) => { + formData.approve_detail = e +} //获取值 const customEvent = (e) => { diff --git a/src/views/project_total_budget/edit.vue b/src/views/project_total_budget/edit.vue index 7671c4a..744eb85 100644 --- a/src/views/project_total_budget/edit.vue +++ b/src/views/project_total_budget/edit.vue @@ -136,6 +136,10 @@ + + @@ -439,9 +443,12 @@ const formData = reactive({ budget_list: [], budget_date: "", project_manager: "", + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} // 表单验证 const formRules = reactive({ diff --git a/src/views/project_travel_reimbursement/edit.vue b/src/views/project_travel_reimbursement/edit.vue index e94dff7..1e38448 100644 --- a/src/views/project_travel_reimbursement/edit.vue +++ b/src/views/project_travel_reimbursement/edit.vue @@ -194,6 +194,10 @@ + + @@ -347,9 +351,12 @@ const formData = reactive({ "deposit_bank": "", "account_name": "", "account": "" - } + }, + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} // 上传文件 const handleAvatarSuccess_four = (response: any) => { // @ts-ignore diff --git a/src/views/project_trip_apply/edit.vue b/src/views/project_trip_apply/edit.vue index 1418900..82379e1 100644 --- a/src/views/project_trip_apply/edit.vue +++ b/src/views/project_trip_apply/edit.vue @@ -60,6 +60,10 @@ + + @@ -117,8 +121,12 @@ const formData = reactive({ "reason": "", "remark": "", "annex": [], - days: "" + days: "", + approve_detail: {} }) +const flowFn = (e: any) => { + formData.approve_detail = e +} // 上传文件 const handleAvatarSuccess_four = (response: any) => { // @ts-ignore diff --git a/src/views/recordsPayment/edit.vue b/src/views/recordsPayment/edit.vue index 9c316b1..b354e44 100644 --- a/src/views/recordsPayment/edit.vue +++ b/src/views/recordsPayment/edit.vue @@ -156,7 +156,10 @@ - + + @@ -303,10 +306,13 @@ const formData = reactive({ bank_account_id: "", remark: "", - annex: [] + annex: [], + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} // 表单验证 const formRules = reactive({ diff --git a/src/views/refund/edit.vue b/src/views/refund/edit.vue index 33dfbd8..cb6c2ad 100644 --- a/src/views/refund/edit.vue +++ b/src/views/refund/edit.vue @@ -149,7 +149,10 @@ - + + @@ -280,11 +283,14 @@ const formData = reactive({ "deposit_bank": "", "account_name": "", "account": "" - } + }, + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} // 表单验证 const formRules = reactive({ diff --git a/src/views/refundbidDeposit/edit.vue b/src/views/refundbidDeposit/edit.vue index 555ad51..70e341d 100644 --- a/src/views/refundbidDeposit/edit.vue +++ b/src/views/refundbidDeposit/edit.vue @@ -118,7 +118,10 @@ - + + @@ -243,10 +246,13 @@ const formData = reactive({ "deposit_bank": "", "account_name": "", "account": "" - } + }, + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} // 表单验证 const formRules = reactive({ diff --git a/src/views/remittance/edit.vue b/src/views/remittance/edit.vue index 0fd16bc..86a5b1d 100644 --- a/src/views/remittance/edit.vue +++ b/src/views/remittance/edit.vue @@ -99,7 +99,10 @@ - + + @@ -203,10 +206,13 @@ const formData = reactive({ return_status: "", return_duty_id: '', remark: "", - annex: [] + annex: [], + approve_detail: {} }) - +const flowFn = (e: any) => { + formData.approve_detail = e +} // 表单验证 const formRules = reactive({ diff --git a/src/views/subcontracting_contract_negotiation/edit.vue b/src/views/subcontracting_contract_negotiation/edit.vue index 7dc9f03..f90f01e 100644 --- a/src/views/subcontracting_contract_negotiation/edit.vue +++ b/src/views/subcontracting_contract_negotiation/edit.vue @@ -143,6 +143,10 @@ + + @@ -274,11 +278,16 @@ const formData = reactive({ negotiation_content: '', negotiation_quotation: [], negotiation_basis: [], - negotiation_content: "", negotiation_detail: "", "sign_date": "string", + approve_detail: { + + } }) +const flowFn = (e: any) => { + formData.approve_detail = e +} const customEvent = (e: any) => { contract_no.value = e.contract_no; supplier_name.value = e.supplier_name;