From 51b5c0a3df28243e7296ccb2eb799a3e80ad819d Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Tue, 15 Jul 2025 18:36:23 +0800 Subject: [PATCH] =?UTF-8?q?ht=E4=BA=8B=E5=89=8D=E6=B5=81=E7=A8=8B=E5=85=B3?= =?UTF-8?q?=E8=81=94=E7=BB=B4=E4=BF=AE=E9=80=89=E6=8B=A9=E8=B5=84=E9=87=91?= =?UTF-8?q?=20=E8=87=AA=E5=8A=A8=E5=A1=AB=E5=85=85=E8=B5=84=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/contract/contract.js | 19 + src/components/PlanPicker/otherPlan.vue | 378 ++++++++++++++++++ src/components/XyTable/index.vue | 8 +- src/views/contract/components/oaLink.vue | 167 ++++++++ src/views/contract/contractEdit.vue | 78 +++- src/views/contract/contractList.vue | 77 +++- .../components/examineRegistration.vue | 5 +- 7 files changed, 719 insertions(+), 13 deletions(-) create mode 100644 src/components/PlanPicker/otherPlan.vue create mode 100644 src/views/contract/components/oaLink.vue diff --git a/src/api/contract/contract.js b/src/api/contract/contract.js index 92c9c44..b072edb 100644 --- a/src/api/contract/contract.js +++ b/src/api/contract/contract.js @@ -81,3 +81,22 @@ export function updateStatus(params,noloading = true){ noloading }) } + +export function oaSelect(params,noloading = true){ + return request({ + method:'get', + url:'api/oa/flow/no-link-list', + params, + noloading + }) +} + +export function oaSave(data){ + return request({ + method:'post', + url:'api/oa/flow/save-foreign', + data + }) +} + + diff --git a/src/components/PlanPicker/otherPlan.vue b/src/components/PlanPicker/otherPlan.vue new file mode 100644 index 0000000..e9d46ce --- /dev/null +++ b/src/components/PlanPicker/otherPlan.vue @@ -0,0 +1,378 @@ + + + + + diff --git a/src/components/XyTable/index.vue b/src/components/XyTable/index.vue index 5b57cfa..6d8ed8c 100644 --- a/src/components/XyTable/index.vue +++ b/src/components/XyTable/index.vue @@ -48,6 +48,11 @@ export default { type:Function, default:()=>{} }, + headerCellClassName:{ + type:Function, + default:()=>{} + }, + defaultExpandAll:{ type:Boolean, default:true @@ -154,7 +159,7 @@ export default { mounted() { }, render(h) { - let {highlightCurrentRow,rowKey,expandRowKeys,selectChange,selectAllClick,summaryMethod,cellClick,btnWidth,selectClick,height,createIndexRow,tableStyle,treeProps,showSummary,showHeader,$scopedSlots,showIndex,defaultExpandAll,headerCellStyle,headerRowStyle,rowStyle,cellStyle,indent,tableHeight,tableItem,list,deleteClick,editorClick,rowClick,objectSpanMethod} = this + let {highlightCurrentRow,rowKey,expandRowKeys,selectChange,selectAllClick,summaryMethod,cellClick,btnWidth,selectClick,height,createIndexRow,tableStyle,treeProps,showSummary,showHeader,$scopedSlots,showIndex,defaultExpandAll,headerCellStyle,headerCellClassName,headerRowStyle,rowStyle,cellStyle,indent,tableHeight,tableItem,list,deleteClick,editorClick,rowClick,objectSpanMethod} = this return (
{tableItem && tableItem.length > 0 ? @@ -167,6 +172,7 @@ export default { summary-method={summaryMethod} header-row-style={headerRowStyle} header-cell-style={headerCellStyle} + header-cell-class-name={headerCellClassName} row-style={rowStyle} cell-style={cellStyle} indent={indent} diff --git a/src/views/contract/components/oaLink.vue b/src/views/contract/components/oaLink.vue new file mode 100644 index 0000000..2868689 --- /dev/null +++ b/src/views/contract/components/oaLink.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/contract/contractEdit.vue b/src/views/contract/contractEdit.vue index bbbaf5e..784714b 100644 --- a/src/views/contract/contractEdit.vue +++ b/src/views/contract/contractEdit.vue @@ -199,6 +199,57 @@ /> (无需采购流程,如水电邮寄费等) + + +
+ + + + + {{weixiuSelection?weixiuSelection:'选择预算计划'}} + + 选择预算计划 +
+ +
+ + i.custom_model_id === row.flow_mod_id) + url += other[0]?.flow_id break; default: url = `${process.env.VUE_APP_OUT_URL}/flow/list/todo` @@ -1854,8 +1864,33 @@ export default { } }, - //采购流程 - async buyProcess(row,type=1) { + // 发起流程 + createOa(row,flow){ + console.log("oa",row,flow) + if(flow==='buyProcess'){ + + this.buyProcess(row,flow) + }else if(flow==='signProcess'){ + this.signProcess(row,flow) + }else if(flow==='paying'){ + this.paying(row,flow) + } + }, + async buyProcess(row,flow) { + // flow 关联后的回调,打开哪种流程创建 + // 获取可以 oa自动发起的流程 + const hasMatch = this.flowConfig.some(item => + item.custom_model_id === row.flow_model_id + ); + console.log("row,flow",row,flow) + if(!flow){ + if(true){ + this.$refs.oaLink.row = row + this.$refs.oaLink.flow = 'buyProcess' + this.$refs.oaLink.isShowOaLinkModal = true + return + } + } let baseInfo = {} if (row.is_common_purchase) { baseInfo = { @@ -1888,14 +1923,25 @@ export default { } break; } - let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=${row.is_common_purchase ? 99 : row.flow_mod_id}&out_contract_id=${row.id}&default_json=${window.encodeURIComponent(JSON.stringify(baseInfo))}`; + let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&form_canal=contract&module_name=oa&isSinglePage=1&module_id=${row.is_common_purchase ? 99 : row.flow_mod_id}&out_contract_id=${row.id}&default_json=${window.encodeURIComponent(JSON.stringify(baseInfo))}`; console.log('url',url) this.oaUrl = url this.isShowOaModal = true }, //会签流程 - async signProcess(row) { + async signProcess(row,flow) { // 72 + const hasMatch = this.flowConfig.some(item => + item.custom_model_id === row.flow_model_id + ); + if(!flow){ + if(hasMatch){ + this.$refs.oaLink.row = row + this.$refs.oaLink.flow = 'signProcess' + this.$refs.oaLink.isShowOaLinkModal = true + return + } + } this.setNowContract(row, "hetong"); let baseInfo = { "hetongmingcheng": row?.name, @@ -1905,14 +1951,25 @@ export default { "jiafang": row.supply, "xiangguanliucheng": [row.contract_flow_links?.find(i => i.custom_model_id === (row.is_common_purchase ? 99 : row.flow_mod_id))?.flow_id] }; - let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=72&out_contract_id=${row.id}&default_json=${window.encodeURIComponent(JSON.stringify(baseInfo))}`; + let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&form_canal=contract&module_name=oa&isSinglePage=1&module_id=72&out_contract_id=${row.id}&default_json=${window.encodeURIComponent(JSON.stringify(baseInfo))}`; this.oaUrl = url; this.isShowOaModal = true; }, //付款流程 - async paying(row) { + async paying(row,flow) { // 75 + const hasMatch = this.flowConfig.some(item => + item.custom_model_id === row.flow_model_id + ); + if(!flow){ + if(hasMatch){ + this.$refs.oaLink.row = row + this.$refs.oaLink.flow = 'paying' + this.$refs.oaLink.isShowOaLinkModal = true + return + } + } let payments = []; const actNumsTotal = () => { return payments.reduce((pre,cur) => { @@ -1946,16 +2003,16 @@ export default { "contractno": contract?.number, "guanlianliucheng": contract?.contract_flow_links?.map(i => i.flow_id) }; - let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=75&out_away_id=${row.id}&default_json=${window.encodeURIComponent(JSON.stringify(baseInfo))}`; + let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&form_canal=contract&module_name=oa&isSinglePage=1&module_id=75&out_away_id=${row.id}&default_json=${window.encodeURIComponent(JSON.stringify(baseInfo))}`; this.oaUrl = url; this.isShowOaModal = true; this.$router.push('/contract/paymentRegistrationList_1') }, //请示流程 - async askProcess(row) { + async askProcess(row,flow) { let res = await getOatoken(); - let url = `${process.env.VUE_APP_OUT_URL}/admin/flow/create/17?auth_token=${this.$store.getters.oa_token}&out_contract_id=${row.id}`; + let url = `${process.env.VUE_APP_OUT_URL}/admin/flow/create/17?auth_token=${this.$store.getters.oa_token}&form_canal=contract&out_contract_id=${row.id}`; let askProcess = window.open( url, "askProcess", diff --git a/src/views/finance/components/examineRegistration.vue b/src/views/finance/components/examineRegistration.vue index 2058fbf..dfb0ad5 100644 --- a/src/views/finance/components/examineRegistration.vue +++ b/src/views/finance/components/examineRegistration.vue @@ -806,7 +806,7 @@ import {listdeptNoAuth} from "@/api/system/department"; if (res.list.data) { this.plans = res.list.data.map(i => ({ use_money:0, - // use_money: this.paymentRegistrationForm.applyMoney, + // use_money: this.paymentRegistrationForm.applyMoney?this.paymentRegistrationForm.actMoney:0, ...i })).reduce((accumulator, current) => { const duplicate = accumulator.find(item => item.id === current.id); @@ -870,6 +870,7 @@ import {listdeptNoAuth} from "@/api/system/department"; toggleSelection(plans) { if (plans) { this.plans.filter(plan => { + console.log("this.plans",plans,this.plans,this.paymentRegistrationForm) // if (plans.includes(plan.pid.toString())) { // // plan.use_money = this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money // plan.use_money = this.paymentRegistrationForm.applyMoney @@ -881,6 +882,8 @@ import {listdeptNoAuth} from "@/api/system/department"; if (plans.includes(plan.pid)) { plan.use_money = this.paymentRegistrationForm.plan[plans.indexOf(plan.pid)].use_money return true + }else{ + plan.use_money = this.paymentRegistrationForm.actMoney } // plan.use_money = this.paymentRegistrationForm.applyMoney