| 1 |
- import{Y as e,g as a,ac as t,n as i,$ as o,I as l,k as d,X as s,m as n,w as r,o as p,p as u,q as m,z as c,B as h,C as f,F as g,t as b,v as y,G as V}from"./index-C9TJPork.js";import{_ as C}from"./index.CdyKhOVe.js";import{r as L}from"./uni-app.es.CUt9gedF.js";import{_ as k,a as F}from"./u-form.D7hQ6Wil.js";import{_ as v,a as j}from"./u-radio-group.BjzEj90s.js";import{_ as I}from"./index.CBTp4-Gm.js";import{_,a as T}from"./index.wn1wOnr0.js";import{_ as U}from"./u-input.cq_N7lcW.js";import{_ as N,a as S}from"./index.DgFntJr-.js";import{_ as x}from"./index.DnzbI5dt.js";import{_ as R}from"./index.Dsioj_0m.js";import{_ as q}from"./u-button.C_4h_wUh.js";import{C as A}from"./index.EdP8UdTp.js";import{H as O}from"./HandleOpinion.D2NwQqoG.js";import{g as w,C as W}from"./commonWords.C3AuDPlG.js";import{_ as J}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./index.ChsH6p4P.js";import"./u-search.DOsDiA_z.js";import"./u-icon.BNGPST4x.js";import"./u-checkbox.DJ2PERbW.js";import"./u-checkbox-group.DHs1JB4s.js";import"./emitter.DrjJCwnj.js";import"./u-popup.7vl_vYde.js";import"./resources.DEPsJg7u.js";import"./index.CGKbu-GF.js";import"./u-avatar.B8J43dhc.js";import"./u-tabs-swiper.7mAQsu3f.js";import"./u-badge.BHkDpFBd.js";import"./ly-tree.D703-q15.js";import"./u-action-sheet.BBR1EfIr.js";import"./lsj-upload.BbvSShYb.js";import"./uni-icons.RLS1HIfd.js";import"./index.BeMkBjFo.js";const $=J({components:{HandleOpinion:O,CustomButton:A},data:()=>({copyIds:[],selectList:[],candidateList:[],commonList:[],title:"",label:"",name:{reject:"拒绝",launchRecall:"撤回",auditRecall:"撤回",audit:"同意",back:"退回",freeApprover:"加签",transfer:"转审"},ratioList:[{fullName:"10%",id:10},{fullName:"20%",id:20},{fullName:"30%",id:30},{fullName:"40%",id:40},{fullName:"50%",id:50},{fullName:"60%",id:60},{fullName:"70%",id:70},{fullName:"80%",id:80},{fullName:"90%",id:90},{fullName:"100%",id:100}],typeList:[{fullName:"审批前",id:1},{fullName:"审批后",id:2}],options:[{fullName:"或签",id:0},{fullName:"会签",id:1},{fullName:"依次审批",id:2}],list:[{fullName:"重新审批",disabled:!1,name:1},{fullName:"直接提交给我",disabled:!1,name:2}],props:{label:"nodeName",value:"nodeCode"},showCommonWords:!1,dataForm:{auditRatio:100,counterSign:0,addSignType:1,handleIds:"",handleVal:[],addSignUserIdList:"",fileList:[],handleOpinion:"",signImg:"",copyIds:"",branchList:[],candidateList:{},backNodeCode:"",backType:1},config:{},show:!1,selectVal:{},isCandidates:!1,rules:{branchList:[{required:!0,message:"请选择分支",type:"array",trigger:"blur,change"}],backNodeCode:[{required:!0,message:"请选择退回节点",trigger:"blur,change"}],signImg:[{required:!0,message:"请签名",trigger:"blur,change"}],addSignUserIdList:[{required:!0,message:"请选择加签人员",type:"array",trigger:"blur,change"}],handleIds:[{required:!0,message:"请选择人员",trigger:"blur,change"}],handleVal:[{required:!0,message:"请选择协办人员",trigger:"blur,change",type:"array"}],handleOpinion:[{required:!0,message:"请输入意见",trigger:"blur,change"}]},isCandidate:!1,propertiesType:""}),computed:{isBranch(){let e=!1;return 3!==this.candidateType&&(e=!0),this.branchList=this.config.branchList||[],this.branchList.length||(e=!1),"freeApprover"===this.config.type&&1===this.dataForm.addSignType&&(e=!1),e},showApproval(){return["audit","reject","approvalButton"].includes(this.config.type)},showCustomCopy(){return this.config.isCustomCopy&&["audit","reject"].includes(this.config.type)},showCandidate(){return!["transfer","revoke","recall","back","assist"].includes(this.config.type)&&this.isCandidate},showOpinion(){return["transfer","assist","revoke","auditRecall","launchRecall","back","freeApprover"].includes(this.config.type)},opinionTitle(){const e={transfer:{label:"转办原因"},audit:{label:"办理意见"}},a=this.config.type;let t={transfer:"转审原因",revoke:"撤销原因",assist:"协办原因",back:"退回意见",freeApprover:"加签意见",launchRecall:"撤回原因",auditRecall:"撤回原因",audit:"审批意见",reject:"审批意见"}[a]||"";return e[a]&&"processing"===this.propertiesType&&(t=e[a].label),t},fileLabel(){const e=this.config.type;if("transfer"===e&&"processing"===this.propertiesType)return"转办附件";if("audit"===e&&"processing"===this.propertiesType)return"办理附件";return{auditRecall:"撤回附件",freeApprover:"加签附件",back:"退回附件",transfer:"转审附件",audit:"审批附件",reject:"审批附件"}[e]||""},signRule(){return this.config.hasSign&&["audit","reject"].includes(this.config.type)}},onLoad(a){try{this.config=JSON.parse(decodeURIComponent(a.config))}catch{this.config=JSON.parse(a.config)}e("confirm",((e,a)=>{this.selectConfirm(e,a)})),this.init()},onReady(){this.$refs.dataForm.setRules(this.rules)},methods:{init(){var e,t,i,o;if(this.candidateType=this.config.candidateType,this.candidateList=this.config.candidateList||[],this.propertiesType=null==(e=this.config)?void 0:e.propertiesType,this.getSelector(),this.handleLabel(),this.config.candidateList.map((e=>{this.isCandidates=e.isCandidates})),this.copyIds=(null==(t=this.config)?void 0:t.circulateUser)||"",this.dataForm.backNodeCode=(null==(o=null==(i=this.config)?void 0:i.backNodeList)?void 0:o.length)?this.config.backNodeList[0].nodeCode:"",3!=this.candidateType&&(this.isCandidate=!0),this.branchList=this.config.branchList||[],1==this.candidateType){let e=[];this.isCandidate=!1;const a=this.candidateList;for(let t=0;t<this.dataForm.branchList.length;t++){e:for(let a=0;a<this.branchList.length;a++){let i=this.branchList[a];if(this.dataForm.branchList[t]===i.nodeCode&&i.isCandidates){this.isCandidate=!0,e.push({...i,label:i.nodeName+"审批人"});break e}}this.candidateList=[...a,...e]}}this.userInfo=a("userInfo")||{},this.dataForm.signImg=this.userInfo.signImg,"freeApprover"===this.config.type&&"1"==this.dataForm.addSignType&&(this.isCandidates=!1)},handleLabel(){const e=this.config,{type:a,propertiesType:i}=e,o={transfer:{title:"processing"===i?"转办":"转审",label:"转审"},assist:{title:"协办",label:"协办"},revoke:{title:"撤销流程",label:"撤销"},launchRecall:{title:"撤回流程",label:"撤回"},reject:{title:"审批拒绝",label:"拒绝"},audit:e=>({title:"processing"===e?"办理":"审批",label:"审批"}),auditRecall:{title:"撤回审核",label:"撤回"},freeApprover:{title:"加签",label:"加签"},back:{title:"退回",label:"退回"},submit:{title:"提交审核",label:"提交审核"}},{title:l,label:d}=((e,a)=>{const t=o[e];return"function"==typeof t?t(a):t||{title:"",label:""}})(a,i);this.title=l,this.label=d,t({title:this.title})},changeUserSelect(e){this.dataForm.handleIds=e.join()},branchChange(e,a){this.dataForm.branchList=e,this.candidateList=[],this.init()},openSelect(e){e.formData=this.config.formData,e.taskId=this.config.operatorId,e.selectList=e.selectList||[],e.candidateList=JSON.stringify(this.candidateList),e.delegateUser=this.config.delegateUser,i({url:"/pages/workFlow/candiDateUserSelect/index?data="+encodeURIComponent(JSON.stringify(e))})},selectConfirm(e,a){let t=[];const i=this.candidateList.filter((e=>e.nodeCode==a))[0]||{};i.value=e.map((e=>e.id))||[],i.fullName=(e.map((e=>e.fullName))||[]).join(",")||"",i.selectList=e||[];for(let o=0;o<this.candidateList.length;o++)for(let a=0;a<e.length;a++)e[a].nodeCode===this.candidateList[o].nodeCode&&t.push(e[a].id);this.$set(this.dataForm.candidateList,a,t)},getSelector(){w().then((e=>{this.commonList=e.data.list||[]}))},confirmCommonWord(e){this.dataForm.handleOpinion=e.commonWordsText},handlePress(e){this.$emit("handlePress")},addCommonWords(){let e={commonWordsText:this.dataForm.handleOpinion,commonWordsType:1};W(e).then((e=>{this.$u.toast(e.msg)}))},freeApproverChange(e){this.isCandidates=!1,this.config.hasFreeApprover&&2==e&&this.candidateList.length&&(this.isCandidates=!0)},confirm(){var e;"freeApprover"===this.config.type&&(this.dataForm.addSignParameter={addSignUserIdList:this.dataForm.addSignUserIdList,auditRatio:this.dataForm.auditRatio,counterSign:this.dataForm.counterSign,addSignType:this.dataForm.addSignType}),this.config.hasSign||delete this.dataForm.signImg,this.dataForm.copyIds=Array.isArray(this.copyIds)&&this.copyIds.length&&this.copyIds.join(),3!==this.config.backType&&(this.dataForm.backType=this.config.backType);let a={...this.dataForm,eventType:["auditRecall","launchRecall"].includes(this.config.type)?"recall":this.config.type,approvalField:this.config.approvalField};if(this.isCandidates||this.isCandidate){let t={};for(let a=0;a<this.candidateList.length;a++){let i=this.candidateList[a];if(!i.selected&&!(null==(e=i.value)?void 0:e.length))return this.$u.toast("候选人不能为空");t[i.nodeCode]=i.value||[]}a.candidateList=t}this.$refs.dataForm.validate((e=>{e&&(o("operate",a),setTimeout((()=>{l()}),500))}))}}},[["render",function(e,a,t,i,o,l){const A=L(d("JnpfSelect"),C),O=L(d("u-form-item"),k),w=L(d("u-radio"),v),W=L(d("u-radio-group"),j),J=p,$=L(d("JnpfUserSelect"),I),B=L(d("JnpfRadio"),_),H=V,K=L(d("u-input"),U),P=s("HandleOpinion"),D=L(d("JnpfInput"),N),Y=L(d("JnpfTextarea"),T),z=L(d("JnpfInputNumber"),S),G=L(d("JnpfSign"),x),X=L(d("JnpfUploadFile"),R),Z=L(d("u-form"),F),E=s("CustomButton"),M=L(d("u-button"),q);return u(),n(J,{class:"flow-popup-content"},{default:r((()=>[m(Z,{ref:"dataForm",model:o.dataForm,"label-width":250,errorType:["toast"]},{default:r((()=>[m(J,{class:"content"},{default:r((()=>[l.isBranch?(u(),n(O,{key:0,label:"分支选择",prop:"branchList",required:""},{default:r((()=>[m(A,{modelValue:o.dataForm.branchList,"onUpdate:modelValue":a[0]||(a[0]=e=>o.dataForm.branchList=e),onChange:l.branchChange,placeholder:"请选择审批分支",options:e.branchList,multiple:"",props:o.props},null,8,["modelValue","onChange","options","props"])])),_:1})):c("",!0),"back"===o.config.type&&o.config.backType?(u(),n(O,{key:1,class:"back-item",label:"退回节点",prop:"backNodeCode",required:""},{default:r((()=>[m(J,{class:"u-flex-col back-item-inner"},{default:r((()=>[m(A,{modelValue:o.dataForm.backNodeCode,"onUpdate:modelValue":a[1]||(a[1]=e=>o.dataForm.backNodeCode=e),options:o.config.backNodeList,props:o.props,disabled:2!=o.config.backNodeCode},null,8,["modelValue","options","props","disabled"]),3==o.config.backType?(u(),n(J,{key:0,class:"u-m-t-20 selectNode u-flex"},{default:r((()=>[m(W,{modelValue:o.dataForm.backType,"onUpdate:modelValue":a[2]||(a[2]=e=>o.dataForm.backType=e)},{default:r((()=>[(u(!0),h(g,null,f(o.list,((a,t)=>(u(),n(w,{onChange:t=>e.radioChange(a),key:t,name:a.name,disabled:a.disabled},{default:r((()=>[b(y(a.fullName),1)])),_:2},1032,["onChange","name","disabled"])))),128))])),_:1},8,["modelValue"])])),_:1})):c("",!0)])),_:1})])),_:1})):c("",!0),["transfer"].includes(o.config.type)&&"processing"!==o.propertiesType?(u(),n(O,{key:2,label:"转审给谁",prop:"handleIds",required:""},{default:r((()=>[m($,{modelValue:o.dataForm.handleIds,"onUpdate:modelValue":a[3]||(a[3]=e=>o.dataForm.handleIds=e)},null,8,["modelValue"])])),_:1})):c("",!0),["transfer"].includes(o.config.type)&&"processing"===o.propertiesType?(u(),n(O,{key:3,label:"转办给谁",prop:"handleIds",required:""},{default:r((()=>[m($,{modelValue:o.dataForm.handleIds,"onUpdate:modelValue":a[4]||(a[4]=e=>o.dataForm.handleIds=e)},null,8,["modelValue"])])),_:1})):c("",!0),["assist"].includes(o.config.type)?(u(),n(O,{key:4,label:"协办给谁",prop:"handleVal",required:""},{default:r((()=>[m($,{modelValue:o.dataForm.handleVal,"onUpdate:modelValue":a[5]||(a[5]=e=>o.dataForm.handleVal=e),multiple:"",onChange:l.changeUserSelect},null,8,["modelValue","onChange"])])),_:1})):c("",!0),"freeApprover"===o.config.type?(u(),n(J,{key:5},{default:r((()=>[m(O,{label:"加签人员",prop:"addSignUserIdList",required:""},{default:r((()=>[m($,{modelValue:o.dataForm.addSignUserIdList,"onUpdate:modelValue":a[6]||(a[6]=e=>o.dataForm.addSignUserIdList=e),multiple:""},null,8,["modelValue"])])),_:1}),m(O,{label:"加签类型"},{default:r((()=>[m(A,{options:o.typeList,modelValue:o.dataForm.addSignType,"onUpdate:modelValue":a[7]||(a[7]=e=>o.dataForm.addSignType=e),onChange:l.freeApproverChange},null,8,["options","modelValue","onChange"])])),_:1}),m(O,{label:"审批方式"},{default:r((()=>[m(B,{modelValue:o.dataForm.counterSign,"onUpdate:modelValue":a[8]||(a[8]=e=>o.dataForm.counterSign=e),options:o.options},null,8,["modelValue","options"])])),_:1}),1==o.dataForm.counterSign?(u(),n(O,{key:0,label:"会签比例"},{default:r((()=>[m(J,{class:"u-flex-col free-box"},{default:r((()=>[m(A,{options:o.ratioList,modelValue:o.dataForm.auditRatio,"onUpdate:modelValue":a[9]||(a[9]=e=>o.dataForm.auditRatio=e)},null,8,["options","modelValue"]),m(H,{class:"u-m-l-10 free-box-txt"},{default:r((()=>[b("达到会签比例则通过")])),_:1})])),_:1})])),_:1})):c("",!0)])),_:1})):c("",!0),l.showCandidate?(u(!0),h(g,{key:6},f(o.candidateList,((e,a)=>(u(),h(g,{key:a},[m(O,{label:e.nodeName+"审批人",required:!e.selected,"border-bottom":!1},{default:r((()=>[e.hasCandidates?(u(),n(K,{key:0,type:"select",modelValue:e.fullName,"onUpdate:modelValue":a=>e.fullName=a,placeholder:"请选择审批候选人","input-align":"right",onClick:a=>l.openSelect(e)},null,8,["modelValue","onUpdate:modelValue","onClick"])):(u(),n($,{key:1,modelValue:e.value,"onUpdate:modelValue":a=>e.value=a,multiple:"",placeholder:"请选择审批候选人"},null,8,["modelValue","onUpdate:modelValue"]))])),_:2},1032,["label","required"]),e.selected?(u(),n(O,{key:0,label:"已选审批人"},{default:r((()=>[m(K,{type:"textarea",modelValue:e.selected,"onUpdate:modelValue":a=>e.selected=a,class:"textarea",border:"",disabled:"",placeholder:""},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024)):c("",!0)],64)))),128)):c("",!0),l.showOpinion?(u(),n(O,{key:7,label:l.opinionTitle},{default:r((()=>[m(P,{commonList:o.commonList,modelValue:o.dataForm.handleOpinion,"onUpdate:modelValue":a[10]||(a[10]=e=>o.dataForm.handleOpinion=e),onAddCommonWords:l.addCommonWords,showCommon:!1},null,8,["commonList","modelValue","onAddCommonWords"])])),_:1},8,["label"])):c("",!0),l.showApproval?(u(),n(O,{key:8,prop:"handleOpinion",required:"","label-position":"top",label:l.opinionTitle},{default:r((()=>[m(P,{commonList:o.commonList,modelValue:o.dataForm.handleOpinion,"onUpdate:modelValue":a[11]||(a[11]=e=>o.dataForm.handleOpinion=e),onAddCommonWords:l.addCommonWords},null,8,["commonList","modelValue","onAddCommonWords"])])),_:1},8,["label"])):c("",!0),o.config.approvalField.length?(u(!0),h(g,{key:9},f(o.config.approvalField,((e,a)=>(u(),n(O,{"label-position":"left",label:e.fieldName,key:a},{default:r((()=>["input"==e.jnpfKey?(u(),n(D,{key:0,modelValue:e.value,"onUpdate:modelValue":a=>e.value=a},null,8,["modelValue","onUpdate:modelValue"])):c("",!0),"textarea"==e.jnpfKey?(u(),n(Y,{key:1,modelValue:e.value,"onUpdate:modelValue":a=>e.value=a},null,8,["modelValue","onUpdate:modelValue"])):c("",!0),"inputNumber"==e.jnpfKey?(u(),n(z,{key:2,modelValue:e.value,"onUpdate:modelValue":a=>e.value=a},null,8,["modelValue","onUpdate:modelValue"])):c("",!0)])),_:2},1032,["label"])))),128)):c("",!0),o.config.hasSign?(u(),n(O,{key:10,prop:l.signRule?"signImg":"",required:l.signRule},{default:r((()=>[m(G,{modelValue:o.dataForm.signImg,"onUpdate:modelValue":a[12]||(a[12]=e=>o.dataForm.signImg=e),signType:"ApprovalSign"},null,8,["modelValue"])])),_:1},8,["prop","required"])):c("",!0),o.config.hasFile?(u(),n(O,{key:11},{default:r((()=>[m(J,{class:"uploadFile"},{default:r((()=>[m(X,{modelValue:o.dataForm.fileList,"onUpdate:modelValue":a[13]||(a[13]=e=>o.dataForm.fileList=e),limit:3,align:"left"},null,8,["modelValue"])])),_:1})])),_:1})):c("",!0),l.showCustomCopy?(u(),n(O,{key:12,label:"抄送人员"},{default:r((()=>[m($,{modelValue:o.copyIds,"onUpdate:modelValue":a[14]||(a[14]=e=>o.copyIds=e),multiple:""},null,8,["modelValue"])])),_:1})):c("",!0)])),_:1})])),_:1},8,["model"]),m(J,{class:"flowBefore-actions"},{default:r((()=>[m(E,{class:"u-flex buttom-btn-left-inner",btnText:e.$t("common.cancelText"),btnIcon:"icon-ym icon-ym-add-cancel",customIcon:""},null,8,["btnText"]),m(M,{class:"buttom-btn",type:"primary",onClick:a[15]||(a[15]=e=>l.confirm("confirm"))},{default:r((()=>[b(y(e.$t("common.okText")),1)])),_:1})])),_:1})])),_:1})}],["__scopeId","data-v-033a950a"]]);export{$ as default};
|