import{g as e,B as t,v as a,o as l,d as i,w as d,x as o,i as r,bI as s,aa as n,e as u,I as p,K as m,J as c,f,t as g,h,z as y,l as b,Q as q,R as L,G as F}from"./index-cGedVnvr.js";import{_ as V,j as _}from"./index.pTvP_loI.js";import{r as j}from"./uni-app.es.B8yUl6Rz.js";import{_ as v}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{_ as w}from"./u-input.FDoGzBiO.js";import{_ as k,a as U}from"./u-form.gl2nbrYA.js";import{_ as I}from"./index.CiAcMCqq.js";import{_ as S}from"./index.ZXOMDAjr.js";import{_ as D}from"./index.B7DZp5fR.js";import{_ as N}from"./u-icon.Dxd-b4uz.js";import{_ as T}from"./index.DkYt_Pww.js";import{g as P,a as C}from"./order.BtnsZp5Q.js";const M=v({props:{config:{type:Object,default:()=>{}}},data:()=>({loading:!0,key:+new Date,setting:{},formConf:{},formData:{},eventType:"",flowUrgent:1,dataForm:{id:"",flowId:""},isAdd:!1,userInfo:{}}),mounted(){this.init(this.config)},methods:{init(a){this.userInfo=e("userInfo")||{},this.setting=a,this.formConf=a.formConf?JSON.parse(a.formConf):{},this.dataForm.id=a.id||null,this.dataForm.flowId=a.flowId,this.loading=!0,this.formData={},this.$nextTick((()=>{let e={};if(a.id){this.isAdd=!1,e={modelId:a.flowId,id:this.dataForm.id,type:a.type,flowId:a.flowId,processId:a.id,opType:a.opType,taskId:a.taskId},t("dynamicModelExtra",e);const l=a.draftData||a.formData||{};this.formData={...l,flowId:a.flowId}}else this.isAdd=!0;this.fillFormData(this.formConf,this.formData),this.$nextTick((()=>{this.loading=!1})),this.dataForm.flowId=a.flowId,this.key=+new Date}))},fillFormData(e,t){e.disabled=this.setting.readonly;const a=(e,l)=>{for(let i=0;ie.id)):i[0].id);const s=this.userInfo.roleIds;"roleSelect"===r.jnpfKey&&Array.isArray(s)&&s.length&&(r.defaultValue=d.multiple?s:s[0]);const n=this.userInfo.groupIds;"groupSelect"===r.jnpfKey&&Array.isArray(n)&&n.length&&(r.defaultValue=d.multiple?n:n[0]);const u=this.userInfo.userId;"userSelect"===r.jnpfKey&&u&&(r.defaultValue=d.multiple?[u]:u),"usersSelect"===r.jnpfKey&&u&&(r.defaultValue=d.multiple?[u+"--user"]:u+"--user"),"sign"===r.jnpfKey&&this.userInfo.signImg&&(r.defaultValue=this.userInfo.signImg)}let a=d.__config__.noShow||!1,i=d.disabled||!1,s=d.__config__.required||!1,n=!1;if((!d.__config__.visibility||Array.isArray(d.__config__.visibility)&&d.__config__.visibility.includes("app"))&&(n=!0),this.setting.formOperates&&this.setting.formOperates.length){let e=d.__config__.isSubTable?l.__vModel__+"-"+d.__vModel__:d.__vModel__,t=this.setting.formOperates.filter((t=>t.id===e))||[];if(t.length){let e=t[0];a=!e.read,i=!e.write,s=e.required?e.required:d.__config__.required}}i=d.readonly?d.readonly:i,this.setting.readonly&&(i=!0),"scan"===this.setting.origin&&(i=!0),this.$set(d,"disabled",i),this.$set(d.__config__,"noShow",a),this.$set(d.__config__,"required",s),this.$set(d.__config__,"isVisibility",n)}else{let e=!!d.__config__.noShow&&d.__config__.noShow,t=!1;(!d.__config__.visibility||Array.isArray(d.__config__.visibility)&&d.__config__.visibility.includes("app"))&&(t=!0),this.$set(d.__config__,"isVisibility",t),this.$set(d.__config__,"noShow",e)}d.__config__&&d.__config__.children&&Array.isArray(d.__config__.children)&&a(d.__config__.children,d)}};a(e.fields),e.formData=t},sumbitForm(e,t){if(!e)return;const a={...this.formData,...e};this.dataForm.formData=a,t&&"function"==typeof t&&t(),this.$emit("eventReceiver",this.dataForm,this.eventType)},submit(e,t){if("1"==this.setting.isPreview)return this.$u.toast("功能预览不支持数据保存");this.eventType=e,this.flowUrgent=t,this.$refs.dynamicForm&&this.$refs.dynamicForm.submitForm()}}},[["render",function(e,t,s,n,u,p){const m=j(a("JnpfParser"),V),c=r;return l(),i(c,{class:"jnpf-wrap jnpf-wrap-workflow"},{default:d((()=>[u.loading?o("",!0):(l(),i(m,{formConf:u.formConf,ref:"dynamicForm",onSubmit:p.sumbitForm,key:u.key},null,8,["formConf","onSubmit"]))])),_:1})}]]),W=["crmOrder","salesOrder","leaveApply"],O={props:{config:{type:Object,default:()=>{}}},data:()=>({flowUrgentOptions:[{id:1,fullName:"普通"},{id:2,fullName:"重要"},{id:3,fullName:"紧急"}],fileList:[],setting:{},userInfo:{},eventType:"",paymentMethodOptions:[],requiredList:{},requiredObj:[]}),mounted(){this.init(this.config),this.$refs.dataForm.setRules(this.rules),this.userInfo=e("userInfo")||{}},methods:{checkChildRule(){let e={};this.requiredObj.forEach((t=>{t.required&&(e[t.id]=t.name+"不能为空")}));let t=[];for(let l in e){let a=l.split("-"),i=a[0];a.forEach(((a,l)=>{if(1==l){this.dataForm[i].forEach(((l,d)=>{l[a]instanceof Array?0==l[a].length&&t.push(e[i+"-"+a]):l[a]||0===l[a]||t.push(e[i+"-"+a])}))}}))}let a=this.regList;for(let l in a){let e=this.dataForm[l];for(let i in a[l])for(let d=0;d{e[i]&&!o.pattern.test(e[i])&&t.push(o.message)}))}}if(t.length>0)return t[0]},init(e){this.dataForm.id=e.id||"",this.dataForm.flowId=e.flowId,this.setting=e,this.updateDataRule(),this.$nextTick((()=>{if(this.$refs.dataForm.resetFields(),this.beforeInit&&this.beforeInit(),e.id){let t=e.draftData||e.formData;return this.selfGetInfo&&"function"==typeof this.selfGetInfo?this.selfGetInfo(t):this.dataForm=t,void(W.includes(e.formEnCode)&&this.dataForm.fileJson&&(this.fileList=JSON.parse(this.dataForm.fileJson)))}this.selfInit&&this.selfInit(e),this.billEnCode&&s(this.billEnCode).then((t=>{"crmOrder"===e.formEnCode?this.dataForm.orderCode=t.data:this.dataForm.billNo=t.data}))}))},submit(e,t){this.eventType=e,this.$refs.dataForm.setRules(this.rules),this.$refs.dataForm.validate((a=>{if(a){if(W.includes(this.setting.formEnCode)&&(this.dataForm.fileJson=this.fileList.length?JSON.stringify(this.fileList):""),this.checkChildRule())return this.$u.toast(`${this.checkChildRule()}`);if(this.exist&&this.exist())return this.$u.toast(`${this.exist()}`);let a={};if(a=this.beforeSubmit&&"function"==typeof this.beforeSubmit?this.beforeSubmit():this.dataForm,W.includes(this.setting.formEnCode)&&(a.fileJson=JSON.stringify(this.fileList)),("save"===e||"submit"===e)&&this.selfSubmit&&"function"==typeof this.selfSubmit)return void this.selfSubmit(this.dataForm,t);this.$emit("eventReceiver",{formData:a,id:this.dataForm.id},e)}}))},updateDataRule(){let e={};for(let t=0;tt.id===e))||[];return!t.length||t[0].read},judgeWrite(e){if(this.setting.readonly)return!0;if(!this.setting.formOperates||!this.setting.formOperates.length)return!1;let t=this.setting.formOperates.filter((t=>t.id===e))||[];return!t.length||!t[0].write}}};const A=v({name:"SalesOrder",mixins:[O],data:()=>({billEnCode:"WF_SalesOrderNo",dataForm:{flowTitle:"",billNo:"",flowUrgent:1,customerAddres:"",contactPhone:"",description:"",fileJson:"",salesman:"",paymentMoney:"",paymentMethod:"",invoiceType:"",salesDate:"",contacts:"",customerName:"",entryList:[{goodsName:"",specifications:"",unit:"",qty:"",price:"",amount:"",description:""}]},invoiceTypeList:[{fullName:"普通发票",id:"普通发票",checked:!1},{fullName:"专业发票",id:"专业发票",checked:!1},{fullName:"其他",id:"其他",checked:!1}],rules:{flowTitle:[{required:!0,message:"流程标题不能为空",trigger:"blur"}],flowUrgent:[{required:!0,message:"紧急程度不能为空",trigger:"change",type:"number"}],billNo:[{required:!0,message:"流程编码不能为空",trigger:"blur"}],salesDate:[{required:!0,message:"开单日期不能为空",trigger:"change",type:"number"}]}}),methods:{selfInit(e){this.dataForm.flowTitle=this.userInfo.userName+"的销售订单"},addItem(){this.dataForm.entryList.push({goodsName:"",specifications:"",unit:"",qty:"",price:"",amount:"",description:""})},delItem(e){n({title:"提示",content:"确定删除销售明细("+(e+1)+")?",success:t=>{t.confirm&&this.dataForm.entryList.splice(e,1)}})},count(e){e.amount=this.jnpf.toDecimal(parseFloat(e.price)*parseFloat(e.qty));var t=e.price*(e.discount/100);e.actualPrice=this.jnpf.toDecimal(t*(1+e.cess/100)),e.actualAmount=this.jnpf.toDecimal(parseFloat(e.actualPrice)*parseFloat(e.qty)),this.$forceUpdate()}}},[["render",function(e,t,s,n,y,b){const q=j(a("u-input"),w),L=j(a("u-form-item"),k),F=r,V=j(a("JnpfDatePicker"),I),_=j(a("JnpfSelect"),S),v=j(a("JnpfUploadFile"),D),T=h,P=j(a("u-icon"),N),C=j(a("u-form"),U);return l(),i(F,{class:"jnpf-wrap jnpf-wrap-workflow"},{default:d((()=>[u(C,{model:y.dataForm,rules:y.rules,ref:"dataForm",errorType:["toast"],"label-position":"left","label-width":"150","label-align":"left"},{default:d((()=>[u(F,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:d((()=>[e.judgeShow("flowTitle")?(l(),i(L,{key:0,label:"流程标题",prop:"flowTitle",required:e.requiredList.flowTitle},{default:d((()=>[u(q,{modelValue:y.dataForm.flowTitle,"onUpdate:modelValue":t[0]||(t[0]=e=>y.dataForm.flowTitle=e),placeholder:"流程标题",disabled:e.judgeWrite("flowTitle"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("billNo")?(l(),i(L,{key:1,label:"流程编码",prop:"billNo",required:e.requiredList.billNo},{default:d((()=>[u(q,{modelValue:y.dataForm.billNo,"onUpdate:modelValue":t[1]||(t[1]=e=>y.dataForm.billNo=e),placeholder:"流程编码",disabled:"","input-align":"right"},null,8,["modelValue"])])),_:1},8,["required"])):o("",!0)])),_:1}),u(F,{class:"jnpf-card"},{default:d((()=>[u(F,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:d((()=>[e.judgeShow("customerName")?(l(),i(L,{key:0,label:"客户名称",prop:"customerName",required:e.requiredList.customerName},{default:d((()=>[u(q,{modelValue:y.dataForm.customerName,"onUpdate:modelValue":t[2]||(t[2]=e=>y.dataForm.customerName=e),placeholder:"请输入客户名称",disabled:e.judgeWrite("customerName"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("contacts")?(l(),i(L,{key:1,label:"联系人员",prop:"contacts",required:e.requiredList.contacts},{default:d((()=>[u(q,{modelValue:y.dataForm.contacts,"onUpdate:modelValue":t[3]||(t[3]=e=>y.dataForm.contacts=e),placeholder:"请输入联系人员",disabled:e.judgeWrite("contacts"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("salesDate")?(l(),i(L,{key:2,label:"开单日期",prop:"salesDate",required:e.requiredList.salesDate},{default:d((()=>[u(V,{type:"datetime",modelValue:y.dataForm.salesDate,"onUpdate:modelValue":t[4]||(t[4]=e=>y.dataForm.salesDate=e),placeholder:"请输入开单日期",disabled:e.judgeWrite("salesDate")},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("contactPhone")?(l(),i(L,{key:3,label:"联系电话",prop:"contactPhone",required:e.requiredList.contactPhone},{default:d((()=>[u(q,{modelValue:y.dataForm.contactPhone,"onUpdate:modelValue":t[5]||(t[5]=e=>y.dataForm.contactPhone=e),placeholder:"请输入联系电话",disabled:e.judgeWrite("contactPhone"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("customerAddres")?(l(),i(L,{key:4,label:"客户地址",prop:"customerAddres",required:e.requiredList.customerAddres},{default:d((()=>[u(q,{modelValue:y.dataForm.customerAddres,"onUpdate:modelValue":t[6]||(t[6]=e=>y.dataForm.customerAddres=e),placeholder:"输入送客户地址",disabled:e.judgeWrite("customerAddres"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("salesman")?(l(),i(L,{key:5,label:"业务人员",prop:"salesman",required:e.requiredList.salesman},{default:d((()=>[u(q,{modelValue:y.dataForm.salesman,"onUpdate:modelValue":t[7]||(t[7]=e=>y.dataForm.salesman=e),placeholder:"输入业务人员",disabled:e.judgeWrite("salesman"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("ticketNum")?(l(),i(L,{key:6,label:"发票编号",prop:"ticketNum",required:e.requiredList.ticketNum},{default:d((()=>[u(q,{modelValue:y.dataForm.ticketNum,"onUpdate:modelValue":t[8]||(t[8]=e=>y.dataForm.ticketNum=e),placeholder:"输入发票编号",disabled:e.judgeWrite("ticketNum"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("invoiceType")?(l(),i(L,{key:7,label:"发票类型",prop:"invoiceType",required:e.requiredList.invoiceType},{default:d((()=>[u(_,{modelValue:y.dataForm.invoiceType,"onUpdate:modelValue":t[9]||(t[9]=e=>y.dataForm.invoiceType=e),placeholder:"请选择发票类型",options:y.invoiceTypeList,disabled:e.judgeWrite("invoiceType")},null,8,["modelValue","options","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("paymentMethod")?(l(),i(L,{key:8,label:"付款方式",prop:"paymentMethod",required:e.requiredList.paymentMethod},{default:d((()=>[u(q,{modelValue:y.dataForm.paymentMethod,"onUpdate:modelValue":t[10]||(t[10]=e=>y.dataForm.paymentMethod=e),placeholder:"请输入付款方式","input-align":"right",disabled:e.judgeWrite("paymentMethod")},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("paymentMoney")?(l(),i(L,{key:9,label:"付款金额",prop:"paymentMoney",required:e.requiredList.paymentMoney},{default:d((()=>[u(q,{modelValue:y.dataForm.paymentMoney,"onUpdate:modelValue":t[11]||(t[11]=e=>y.dataForm.paymentMoney=e),placeholder:"输入付款金额",disabled:e.judgeWrite("paymentMoney"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("fileJson")?(l(),i(L,{key:10,label:"相关附件",prop:"fileJson",required:e.requiredList.fileJson},{default:d((()=>[u(v,{modelValue:e.fileList,"onUpdate:modelValue":t[12]||(t[12]=t=>e.fileList=t),disabled:e.judgeWrite("fileJson")},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("description")?(l(),i(L,{key:11,label:"开单备注",prop:"description",required:e.requiredList.description},{default:d((()=>[u(q,{modelValue:y.dataForm.description,"onUpdate:modelValue":t[13]||(t[13]=e=>y.dataForm.description=e),placeholder:"输入开单备注",type:"textarea",disabled:e.judgeWrite("description"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0)])),_:1})])),_:1}),e.judgeShow("entryList")?(l(),i(F,{key:0,class:"jnpf-table"},{default:d((()=>[(l(!0),p(m,null,c(y.dataForm.entryList,((t,a)=>(l(),i(F,{class:"jnpf-table-item",key:a},{default:d((()=>[u(F,{class:"jnpf-table-item-title u-flex u-row-between"},{default:d((()=>[u(T,{class:"jnpf-table-item-title-num"},{default:d((()=>[f("销售明细("+g(a+1)+")",1)])),_:2},1024),y.dataForm.entryList.length>1&&!e.judgeWrite("entryList")?(l(),i(F,{key:0,class:"jnpf-table-item-title-action",onClick:e=>b.delItem(a)},{default:d((()=>[f("删除 ")])),_:2},1032,["onClick"])):o("",!0)])),_:2},1024),u(F,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:d((()=>[e.judgeShow("entryList-goodsName")?(l(),i(L,{key:0,label:"商品名称",prop:"dataForm.entryList[i].goodsName",required:e.requiredList["entryList-goodsName"]},{default:d((()=>[u(q,{modelValue:y.dataForm.entryList[a].goodsName,"onUpdate:modelValue":e=>y.dataForm.entryList[a].goodsName=e,placeholder:"请输入商品名称",disabled:e.judgeWrite("entryList-goodsName"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","disabled"])])),_:2},1032,["required"])):o("",!0),e.judgeShow("entryList-specifications")?(l(),i(L,{key:1,label:"规格类型",prop:"dataForm.entryList[i].specifications",required:e.requiredList["entryList-specifications"]},{default:d((()=>[u(q,{modelValue:y.dataForm.entryList[a].specifications,"onUpdate:modelValue":e=>y.dataForm.entryList[a].specifications=e,placeholder:"请输入规格类型",disabled:e.judgeWrite("entryList-specifications"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","disabled"])])),_:2},1032,["required"])):o("",!0),e.judgeShow("entryList-unit")?(l(),i(L,{key:2,label:"单位",prop:"dataForm.entryList[i].unit",required:e.requiredList["entryList-unit"]},{default:d((()=>[u(q,{modelValue:y.dataForm.entryList[a].unit,"onUpdate:modelValue":e=>y.dataForm.entryList[a].unit=e,placeholder:"请输入单位",disabled:e.judgeWrite("entryList-unit"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","disabled"])])),_:2},1032,["required"])):o("",!0),e.judgeShow("entryList-qty")?(l(),i(L,{key:3,label:"数量",prop:"dataForm.entryList[i].qty",required:e.requiredList["entryList-qty"]},{default:d((()=>[u(q,{modelValue:y.dataForm.entryList[a].qty,"onUpdate:modelValue":e=>y.dataForm.entryList[a].qty=e,placeholder:"请输入数量",type:"number","input-align":"right",onInput:e=>b.count(y.dataForm.entryList[a]),disabled:e.judgeWrite("entryList-qty")},null,8,["modelValue","onUpdate:modelValue","onInput","disabled"])])),_:2},1032,["required"])):o("",!0),e.judgeShow("entryList-price")?(l(),i(L,{key:4,label:"单价",prop:"dataForm.entryList[i].price",required:e.requiredList["entryList-price"]},{default:d((()=>[u(q,{modelValue:y.dataForm.entryList[a].price,"onUpdate:modelValue":e=>y.dataForm.entryList[a].price=e,placeholder:"请输入单价",type:"number",onInput:e=>b.count(y.dataForm.entryList[a]),"input-align":"right",disabled:e.judgeWrite("entryList-price")},null,8,["modelValue","onUpdate:modelValue","onInput","disabled"])])),_:2},1032,["required"])):o("",!0),e.judgeShow("entryList-amount")?(l(),i(L,{key:5,label:"金额",prop:"dataForm.entryList[i].amount",required:e.requiredList["entryList-amount"]},{default:d((()=>[u(q,{modelValue:y.dataForm.entryList[a].amount,"onUpdate:modelValue":e=>y.dataForm.entryList[a].amount=e,placeholder:"请输入金额",disabled:"","input-align":"right"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1032,["required"])):o("",!0),e.judgeShow("entryList-description")?(l(),i(L,{key:6,label:"备注",prop:"dataForm.entryList[i].description",required:e.requiredList["entryList-description"]},{default:d((()=>[u(q,{modelValue:y.dataForm.entryList[a].description,"onUpdate:modelValue":e=>y.dataForm.entryList[a].description=e,placeholder:"请输入备注",type:"textarea",disabled:e.judgeWrite("entryList-description"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","disabled"])])),_:2},1032,["required"])):o("",!0)])),_:2},1024)])),_:2},1024)))),128)),e.judgeWrite("entryList")?o("",!0):(l(),i(F,{key:0,class:"jnpf-table-addBtn",onClick:b.addItem},{default:d((()=>[u(P,{name:"plus",color:"#2979ff"}),f("添加 ")])),_:1},8,["onClick"]))])),_:1})):o("",!0)])),_:1},8,["model","rules"])])),_:1})}]]);const R=v({name:"LeaveApply",mixins:[O],data:()=>({billEnCode:"WF_LeaveApplyNo",dataForm:{flowTitle:"",billNo:"",flowUrgent:1,applyUser:"",leaveHour:"",applyDept:"",leaveStartTime:"",leaveEndTime:"",leaveDayCount:"",leaveReason:"",applyDate:"",leaveType:"",fileJson:"",applyPost:"",description:""},rules:{flowTitle:[{required:!0,message:"流程标题不能为空",trigger:"blur"}],flowUrgent:[{required:!0,message:"紧急程度不能为空",trigger:"change",type:"number"}],billNo:[{required:!0,message:"流程编码不能为空",trigger:"blur"}],leaveHour:[{required:!0,message:"请假小时不能为空",trigger:"blur"}],leaveStartTime:[{required:!0,message:"起始时间不能为空",trigger:"blur",type:"number"}],leaveDayCount:[{required:!0,message:"请假天数不能为空",trigger:"blur"}],leaveEndTime:[{required:!0,message:"结束时间不能为空",trigger:"blur",type:"number"}],leaveReason:[{required:!0,message:"请假原因不能为空",trigger:"blur",type:"string"}]},leaveTypeList:[{fullName:"事假",id:"事假",checked:!1},{fullName:"病假",id:"病假",checked:!1},{fullName:"婚假",id:"婚假",checked:!1},{fullName:"产假",id:"产假",checked:!1},{fullName:"丧假",id:"丧假",checked:!1},{fullName:"年假",id:"年假",checked:!1},{fullName:"调休",id:"调休",checked:!1},{fullName:"其他",id:"其他",checked:!1}]}),methods:{selfInit(e){if(this.dataForm.applyDate=(new Date).getTime(),this.dataForm.flowTitle=this.userInfo.userName+"的请假申请表",this.dataForm.applyUser=this.userInfo.userName+"/"+this.userInfo.userAccount,this.dataForm.applyDept=this.userInfo.organizeName,this.userInfo.positionIds&&this.userInfo.positionIds.length){let e=this.userInfo.positionIds.map((e=>e.name));this.dataForm.applyPost=e.join(",")}}}},[["render",function(e,t,s,n,p,m){const c=j(a("u-input"),w),f=j(a("u-form-item"),k),g=r,h=j(a("JnpfDatePicker"),I),y=j(a("JnpfSelect"),S),b=j(a("JnpfUploadFile"),D),q=j(a("u-form"),U);return l(),i(g,{class:"jnpf-wrap jnpf-wrap-workflow"},{default:d((()=>[u(q,{model:p.dataForm,rules:p.rules,ref:"dataForm",errorType:["toast"],"label-position":"left","label-width":"150","label-align":"left"},{default:d((()=>[u(g,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:d((()=>[e.judgeShow("flowTitle")?(l(),i(f,{key:0,label:"流程标题",prop:"flowTitle",required:e.requiredList.flowTitle},{default:d((()=>[u(c,{modelValue:p.dataForm.flowTitle,"onUpdate:modelValue":t[0]||(t[0]=e=>p.dataForm.flowTitle=e),placeholder:"流程标题",disabled:e.judgeWrite("flowTitle"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("billNo")?(l(),i(f,{key:1,label:"流程编码",prop:"billNo",required:e.requiredList.billNo},{default:d((()=>[u(c,{modelValue:p.dataForm.billNo,"onUpdate:modelValue":t[1]||(t[1]=e=>p.dataForm.billNo=e),placeholder:"流程编码",disabled:"","input-align":"right"},null,8,["modelValue"])])),_:1},8,["required"])):o("",!0)])),_:1}),u(g,{class:"jnpf-card"},{default:d((()=>[u(g,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:d((()=>[e.judgeShow("applyUser")?(l(),i(f,{key:0,label:"申请人员",prop:"applyUser",required:e.requiredList.applyUser},{default:d((()=>[u(c,{modelValue:p.dataForm.applyUser,"onUpdate:modelValue":t[2]||(t[2]=e=>p.dataForm.applyUser=e),placeholder:"请输入申请人员",disabled:e.judgeWrite("applyUser"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("applyDept")?(l(),i(f,{key:1,label:"申请部门",prop:"applyDept",required:e.requiredList.applyDept},{default:d((()=>[u(c,{modelValue:p.dataForm.applyDept,"onUpdate:modelValue":t[3]||(t[3]=e=>p.dataForm.applyDept=e),placeholder:"请输入申请部门",disabled:e.judgeWrite("applyDept"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("applyPost")?(l(),i(f,{key:2,label:"申请职位",prop:"applyPost",required:e.requiredList.applyPost},{default:d((()=>[u(c,{modelValue:p.dataForm.applyPost,"onUpdate:modelValue":t[4]||(t[4]=e=>p.dataForm.applyPost=e),placeholder:"请输入申请职位",disabled:e.judgeWrite("applyPost"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("applyDate")?(l(),i(f,{key:3,label:"申请日期",prop:"applyDate",required:e.requiredList.applyDate},{default:d((()=>[u(h,{modelValue:p.dataForm.applyDate,"onUpdate:modelValue":t[5]||(t[5]=e=>p.dataForm.applyDate=e),placeholder:"请输入申请日期",disabled:e.judgeWrite("applyDate")},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("leaveType")?(l(),i(f,{key:4,label:"请假类别",prop:"leaveType",required:e.requiredList.leaveType},{default:d((()=>[u(y,{modelValue:p.dataForm.leaveType,"onUpdate:modelValue":t[6]||(t[6]=e=>p.dataForm.leaveType=e),placeholder:"请选择请假类别",options:p.leaveTypeList,disabled:e.judgeWrite("leaveType")},null,8,["modelValue","options","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("leaveReason")?(l(),i(f,{key:5,label:"请假原因",prop:"leaveReason",required:e.requiredList.leaveReason},{default:d((()=>[u(c,{modelValue:p.dataForm.leaveReason,"onUpdate:modelValue":t[7]||(t[7]=e=>p.dataForm.leaveReason=e),placeholder:"请输入请假原因",type:"textarea",disabled:e.judgeWrite("leaveReason"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("leaveStartTime")?(l(),i(f,{key:6,label:"起始时间",prop:"leaveStartTime",required:e.requiredList.leaveStartTime},{default:d((()=>[u(h,{format:"yyyy-MM-dd HH:mm:ss",modelValue:p.dataForm.leaveStartTime,"onUpdate:modelValue":t[8]||(t[8]=e=>p.dataForm.leaveStartTime=e),placeholder:"请选择起始时间",disabled:e.judgeWrite("leaveStartTime")},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("leaveEndTime")?(l(),i(f,{key:7,label:"结束时间",prop:"leaveEndTime",required:e.requiredList.leaveEndTime},{default:d((()=>[u(h,{format:"yyyy-MM-dd HH:mm:ss",modelValue:p.dataForm.leaveEndTime,"onUpdate:modelValue":t[9]||(t[9]=e=>p.dataForm.leaveEndTime=e),placeholder:"请选择结束时间",disabled:e.judgeWrite("leaveEndTime")},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("leaveDayCount")?(l(),i(f,{key:8,label:"请假天数",prop:"leaveDayCount",required:e.requiredList.leaveDayCount},{default:d((()=>[u(c,{modelValue:p.dataForm.leaveDayCount,"onUpdate:modelValue":t[10]||(t[10]=e=>p.dataForm.leaveDayCount=e),placeholder:"请输入请假天数",disabled:e.judgeWrite("leaveDayCount"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("leaveHour")?(l(),i(f,{key:9,label:"请假小时",prop:"leaveHour",required:e.requiredList.leaveHour},{default:d((()=>[u(c,{modelValue:p.dataForm.leaveHour,"onUpdate:modelValue":t[11]||(t[11]=e=>p.dataForm.leaveHour=e),placeholder:"请输入请假小时",type:"number",disabled:e.judgeWrite("leaveHour"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("fileJson")?(l(),i(f,{key:10,label:"相关附件",prop:"fileJson",required:e.requiredList.fileJson},{default:d((()=>[u(b,{modelValue:e.fileList,"onUpdate:modelValue":t[12]||(t[12]=t=>e.fileList=t),disabled:e.judgeWrite("fileJson")},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0)])),_:1})])),_:1})])),_:1},8,["model","rules"])])),_:1})}]]);const x=v({components:{crmOrder:v({name:"crmOrder",mixins:[O],data:()=>({hide:!1,billEnCode:"OrderNumber",dataForm:{id:"",customerName:"",salesmanId:"",orderDate:"",orderCode:"",paymentMode:"",receivableMoney:"",earnestRate:"",prepayEarnest:"",transportMode:"",deliveryDate:"",deliveryAddress:"",description:"",customerId:"",salesmanName:"",goodsList:[],collectionPlanList:[],fileJson:""},rules:{customerId:[{required:!0,message:"客户名称不能为空",trigger:"input"}],salesmanId:[{required:!0,message:"业务人员不能为空",trigger:"input"}],orderDate:[{required:!0,message:"订单日期不能为空",trigger:"change",type:"number"}],paymentMode:[{required:!0,message:"付款方式不能为空",trigger:"input"}]},options:[{id:"现金",fullName:"现金"},{id:"转帐",fullName:"转帐"},{id:"汇票",fullName:"汇票"}],transportOptions:[{id:"快递",fullName:"快递"},{id:"物流",fullName:"物流"},{id:"配送",fullName:"配送"},{id:"自提",fullName:"自提"}],props:{label:"text",value:"id",children:"children"},goodsOptions:[],customerOptions:[]}),created(){y({title:"正在加载.....",mask:!0}),setTimeout((()=>{this.hide=!0,this.initData(),b()}),800)},methods:{initData(){P().then((e=>{this.goodsOptions=e.data.list})),C().then((e=>{this.customerOptions=e.data.list}))},selfInit(){this.addGoods(),this.addPlan()},onChange(e,t){this.dataForm.salesmanName=t.fullName},addGoods(){this.dataForm.goodsList.push({goodsId:"",goodsCode:"",goodsName:"",specifications:"",unit:"",qty:"",price:"",amount:"",discount:null,cess:null,actualPrice:"",actualAmount:"",description:""})},delGoods(e){this.dataForm.goodsList.splice(e,1)},addPlan(){this.dataForm.collectionPlanList.push({receivableDate:"",receivableRate:"",receivableMoney:"",receivableMode:"",abstract:""})},delPlan(e){this.dataForm.collectionPlanList.splice(e,1)},onGoodsChange(e,t){const a=e[0];this.dataForm.goodsList[t]={goodsId:a.id,goodsCode:a.code,goodsName:a.text,specifications:a.specifications,unit:a.unit,qty:1,price:a.price,amount:a.price,discount:100,cess:0,actualPrice:a.price,actualAmount:a.price,description:""},this.$forceUpdate()},onCustomerChange(e,t){this.dataForm.customerName=t.text},count(e){e.amount=this.jnpf.toDecimal(parseFloat(e.price)*parseFloat(e.qty));var t=e.price*(e.discount/100);e.actualPrice=this.jnpf.toDecimal(t*(1+e.cess/100)),e.actualAmount=this.jnpf.toDecimal(parseFloat(e.actualPrice)*parseFloat(e.qty)),this.$forceUpdate()}}},[["render",function(e,t,s,n,y,b){const F=j(a("u-input"),w),V=j(a("u-form-item"),k),v=j(a("JnpfTreeSelect"),_),P=j(a("JnpfUserSelect"),T),C=j(a("JnpfDatePicker"),I),M=r,W=j(a("JnpfSelect"),S),O=j(a("JnpfUploadFile"),D),A=h,R=j(a("u-icon"),N),x=j(a("u-form"),U);return l(),i(M,{class:"jnpf-wrap jnpf-wrap-workflow"},{default:d((()=>[q(u(x,{model:y.dataForm,rules:y.rules,ref:"dataForm",errorType:["toast"],"label-position":"left","label-width":"150","label-align":"left"},{default:d((()=>[u(M,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:d((()=>[e.judgeShow("orderCode")?(l(),i(V,{key:0,label:"订单编码",prop:"orderCode",required:e.requiredList.orderCode},{default:d((()=>[u(F,{modelValue:y.dataForm.orderCode,"onUpdate:modelValue":t[0]||(t[0]=e=>y.dataForm.orderCode=e),placeholder:"订单编码",disabled:"","input-align":"right"},null,8,["modelValue"])])),_:1},8,["required"])):o("",!0),e.judgeShow("customerName")?(l(),i(V,{key:1,label:"客户名称",prop:"customerId",required:e.requiredList.customerName},{default:d((()=>[u(v,{modelValue:y.dataForm.customerId,"onUpdate:modelValue":t[1]||(t[1]=e=>y.dataForm.customerId=e),placeholder:"请选择客户名称",options:y.customerOptions,onChange:b.onCustomerChange,props:y.props,disabled:e.judgeWrite("customerName")},null,8,["modelValue","options","onChange","props","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("salesmanId")?(l(),i(V,{key:2,label:"业务人员",prop:"salesmanId",required:e.requiredList.salesmanId},{default:d((()=>[u(P,{modelValue:y.dataForm.salesmanId,"onUpdate:modelValue":t[2]||(t[2]=e=>y.dataForm.salesmanId=e),placeholder:"请选择业务人员",onChange:b.onChange,disabled:e.judgeWrite("salesmanId")},null,8,["modelValue","onChange","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("orderDate")?(l(),i(V,{key:3,label:"订单日期",prop:"orderDate",required:e.requiredList.orderDate},{default:d((()=>[u(C,{format:"yyyy-MM-dd",placeholder:"请选择订单日期",modelValue:y.dataForm.orderDate,"onUpdate:modelValue":t[3]||(t[3]=e=>y.dataForm.orderDate=e),disabled:e.judgeWrite("orderDate")},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0)])),_:1}),u(M,{class:"jnpf-card"},{default:d((()=>[u(M,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:d((()=>[e.judgeShow("paymentMode")?(l(),i(V,{key:0,label:"付款方式",prop:"paymentMode",required:e.requiredList.paymentMode},{default:d((()=>[u(W,{modelValue:y.dataForm.paymentMode,"onUpdate:modelValue":t[4]||(t[4]=e=>y.dataForm.paymentMode=e),placeholder:"请选择付款方式",options:y.options,disabled:e.judgeWrite("paymentMode")},null,8,["modelValue","options","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("receivableMoney")?(l(),i(V,{key:1,label:"付款金额",prop:"receivableMoney",required:e.requiredList.receivableMoney},{default:d((()=>[u(F,{modelValue:y.dataForm.receivableMoney,"onUpdate:modelValue":t[5]||(t[5]=e=>y.dataForm.receivableMoney=e),type:"number",placeholder:"付款金额",disabled:e.judgeWrite("receivableMoney"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("earnestRate")?(l(),i(V,{key:2,label:"定金比率",prop:"earnestRate",required:e.requiredList.earnestRate},{default:d((()=>[u(F,{modelValue:y.dataForm.earnestRate,"onUpdate:modelValue":t[6]||(t[6]=e=>y.dataForm.earnestRate=e),type:"number",placeholder:"请输入定金比率",disabled:e.judgeWrite("earnestRate"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("prepayEarnest")?(l(),i(V,{key:3,label:"预付定金",prop:"prepayEarnest",required:e.requiredList.prepayEarnest},{default:d((()=>[u(F,{modelValue:y.dataForm.prepayEarnest,"onUpdate:modelValue":t[7]||(t[7]=e=>y.dataForm.prepayEarnest=e),type:"number",placeholder:"请输入预付定金",disabled:e.judgeWrite("prepayEarnest"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("transportMode")?(l(),i(V,{key:4,label:"运输方式",prop:"transportMode",required:e.requiredList.transportMode},{default:d((()=>[u(W,{modelValue:y.dataForm.transportMode,"onUpdate:modelValue":t[8]||(t[8]=e=>y.dataForm.transportMode=e),placeholder:"请选择运输方式",options:y.transportOptions,disabled:e.judgeWrite("transportMode")},null,8,["modelValue","options","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("deliveryDate")?(l(),i(V,{key:5,label:"发货日期",prop:"deliveryDate",required:e.requiredList.deliveryDate},{default:d((()=>[u(C,{format:"yyyy-MM-dd",placeholder:"请选择发货日期",modelValue:y.dataForm.deliveryDate,"onUpdate:modelValue":t[9]||(t[9]=e=>y.dataForm.deliveryDate=e),disabled:e.judgeWrite("deliveryDate")},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("deliveryAddress")?(l(),i(V,{key:6,label:"发货地址",prop:"deliveryAddress",required:e.requiredList.deliveryAddress},{default:d((()=>[u(F,{modelValue:y.dataForm.deliveryAddress,"onUpdate:modelValue":t[10]||(t[10]=e=>y.dataForm.deliveryAddress=e),type:"textarea",placeholder:"请输入发货地址",disabled:e.judgeWrite("deliveryAddress"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),e.judgeShow("description")?(l(),i(V,{key:7,label:"订单备注",prop:"description",required:e.requiredList.description},{default:d((()=>[u(F,{modelValue:y.dataForm.description,"onUpdate:modelValue":t[11]||(t[11]=e=>y.dataForm.description=e),type:"textarea",placeholder:"请输入订单备注",disabled:e.judgeWrite("description"),"input-align":"right"},null,8,["modelValue","disabled"])])),_:1},8,["required"])):o("",!0),u(V,{label:"相关附件",prop:"fileJson",required:e.requiredList.fileJson},{default:d((()=>[u(O,{modelValue:e.fileList,"onUpdate:modelValue":t[12]||(t[12]=t=>e.fileList=t),disabled:e.judgeWrite("fileJson")},null,8,["modelValue","disabled"])])),_:1},8,["required"])])),_:1})])),_:1}),e.judgeShow("goodsList")?(l(),i(M,{key:0,class:"jnpf-table"},{default:d((()=>[(l(!0),p(m,null,c(y.dataForm.goodsList,((t,a)=>(l(),i(M,{class:"jnpf-table-item",key:a},{default:d((()=>[u(M,{class:"jnpf-table-item-title u-flex u-row-between"},{default:d((()=>[u(A,{class:"jnpf-table-item-title-num"},{default:d((()=>[f("商品添购("+g(a+1)+")",1)])),_:2},1024),y.dataForm.goodsList.length>1&&!e.judgeWrite("goodsList")?(l(),i(M,{key:0,class:"jnpf-table-item-title-action",onClick:e=>b.delGoods(a)},{default:d((()=>[f("删除 ")])),_:2},1032,["onClick"])):o("",!0)])),_:2},1024),u(M,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:d((()=>[u(V,{label:"商品名称",prop:"dataForm.goodsList[i].goodsId",required:e.requiredList["goodsList-goodsId"]},{default:d((()=>[u(v,{modelValue:y.dataForm.goodsList[a].goodsId,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].goodsId=e,placeholder:"请选择商品名称",options:y.goodsOptions,onChange:e=>b.onGoodsChange(e,a),props:y.props,disabled:e.judgeWrite("goodsList")},null,8,["modelValue","onUpdate:modelValue","options","onChange","props","disabled"])])),_:2},1032,["required"]),u(V,{label:"规格型号",prop:"dataForm.goodsList[i].specifications",required:e.requiredList["goodsList-specifications"]},{default:d((()=>[u(F,{modelValue:y.dataForm.goodsList[a].specifications,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].specifications=e,placeholder:"规格型号",disabled:e.judgeWrite("goodsList"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","disabled"])])),_:2},1032,["required"]),u(V,{label:"单位",prop:"dataForm.goodsList[i].unit",required:e.requiredList["goodsList-unit"]},{default:d((()=>[u(F,{modelValue:y.dataForm.goodsList[a].unit,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].unit=e,placeholder:"单位",disabled:e.judgeWrite("goodsList"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","disabled"])])),_:2},1032,["required"]),u(V,{label:"数量",prop:"dataForm.goodsList[i].qty",required:e.requiredList["goodsList-qty"]},{default:d((()=>[u(F,{modelValue:y.dataForm.goodsList[a].qty,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].qty=e,placeholder:"数量",type:"number",onInput:e=>b.count(y.dataForm.goodsList[a]),disabled:e.judgeWrite("goodsList"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","onInput","disabled"])])),_:2},1032,["required"]),u(V,{label:"单价",prop:"dataForm.goodsList[i].price",required:e.requiredList["goodsList-price"]},{default:d((()=>[u(F,{modelValue:y.dataForm.goodsList[a].price,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].price=e,placeholder:"单价",type:"number",onInput:e=>b.count(y.dataForm.goodsList[a]),disabled:e.judgeWrite("goodsList"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","onInput","disabled"])])),_:2},1032,["required"]),u(V,{label:"金额",prop:"dataForm.goodsList[i].amount",required:e.requiredList["goodsList-amount"]},{default:d((()=>[u(F,{modelValue:y.dataForm.goodsList[a].amount,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].amount=e,placeholder:"金额",disabled:"","input-align":"right"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1032,["required"]),u(V,{label:"折扣%",prop:"dataForm.goodsList[i].discount",required:e.requiredList["goodsList-discount"]},{default:d((()=>[u(F,{modelValue:y.dataForm.goodsList[a].discount,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].discount=e,placeholder:"折扣",type:"number",onInput:e=>b.count(y.dataForm.goodsList[a]),disabled:e.judgeWrite("goodsList"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","onInput","disabled"])])),_:2},1032,["required"]),u(V,{label:"税率%",prop:"dataForm.goodsList[i].cess",required:e.requiredList["goodsList-cess"]},{default:d((()=>[u(F,{modelValue:y.dataForm.goodsList[a].cess,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].cess=e,placeholder:"税率",type:"number",onInput:e=>b.count(y.dataForm.goodsList[a]),disabled:e.judgeWrite("goodsList"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","onInput","disabled"])])),_:2},1032,["required"]),u(V,{label:"实际单价",prop:"dataForm.goodsList[i].actualPrice",required:e.requiredList["goodsList-actualPrice"]},{default:d((()=>[u(F,{modelValue:y.dataForm.goodsList[a].actualPrice,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].actualPrice=e,placeholder:"实际单价",disabled:"","input-align":"right"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1032,["required"]),u(V,{label:"实际金额",prop:"dataForm.goodsList[i].actualAmount",required:e.requiredList["goodsList-actualAmount"]},{default:d((()=>[u(F,{modelValue:y.dataForm.goodsList[a].actualAmount,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].actualAmount=e,placeholder:"实际金额",disabled:"","input-align":"right"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1032,["required"]),u(V,{label:"备注",prop:"dataForm.goodsList[i].description",required:e.requiredList["goodsList-description"]},{default:d((()=>[u(F,{modelValue:y.dataForm.goodsList[a].description,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].description=e,placeholder:"备注",type:"textarea",disabled:e.judgeWrite("goodsList"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","disabled"])])),_:2},1032,["required"])])),_:2},1024)])),_:2},1024)))),128)),e.judgeWrite("goodsList")?o("",!0):(l(),i(M,{key:0,class:"jnpf-table-addBtn",onClick:b.addGoods},{default:d((()=>[u(R,{name:"plus",color:"#2979ff"}),f("商品添购 ")])),_:1},8,["onClick"]))])),_:1})):o("",!0),e.judgeShow("collectionPlanList")?(l(),i(M,{key:1,class:"jnpf-table"},{default:d((()=>[(l(!0),p(m,null,c(y.dataForm.collectionPlanList,((t,a)=>(l(),i(M,{class:"jnpf-table-item",key:a},{default:d((()=>[u(M,{class:"jnpf-table-item-title u-flex u-row-between"},{default:d((()=>[u(A,{class:"jnpf-table-item-title-num"},{default:d((()=>[f("收款计划("+g(a+1)+")",1)])),_:2},1024),y.dataForm.collectionPlanList.length>1?(l(),i(M,{key:0,class:"jnpf-table-item-title-action",onClick:e=>b.delPlan(a)},{default:d((()=>[f("删除 ")])),_:2},1032,["onClick"])):o("",!0)])),_:2},1024),u(M,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:d((()=>[u(V,{label:"收款日期",prop:"dataForm.collectionPlanList[i].receivableDate",required:e.requiredList["collectionPlanList-receivableDate"]},{default:d((()=>[u(C,{format:"yyyy-MM-dd HH:mm:ss",placeholder:"请选择收款日期",modelValue:y.dataForm.collectionPlanList[a].receivableDate,"onUpdate:modelValue":e=>y.dataForm.collectionPlanList[a].receivableDate=e,disabled:e.judgeWrite("collectionPlanList")},null,8,["modelValue","onUpdate:modelValue","disabled"])])),_:2},1032,["required"]),u(V,{label:"收款比率%",prop:"dataForm.collectionPlanList[i].receivableRate",required:e.requiredList["collectionPlanList-receivableRate"]},{default:d((()=>[u(F,{modelValue:y.dataForm.collectionPlanList[a].receivableRate,"onUpdate:modelValue":e=>y.dataForm.collectionPlanList[a].receivableRate=e,placeholder:"收款比率",type:"number",disabled:e.judgeWrite("collectionPlanList"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","disabled"])])),_:2},1032,["required"]),u(V,{label:"收款金额",prop:"dataForm.collectionPlanList[i].receivableMoney",required:e.requiredList["collectionPlanList-receivableMoney"]},{default:d((()=>[u(F,{modelValue:y.dataForm.collectionPlanList[a].receivableMoney,"onUpdate:modelValue":e=>y.dataForm.collectionPlanList[a].receivableMoney=e,placeholder:"收款金额",type:"number",disabled:e.judgeWrite("collectionPlanList"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","disabled"])])),_:2},1032,["required"]),u(V,{label:"收款方式",prop:"dataForm.collectionPlanList[i].receivableMode",required:e.requiredList["collectionPlanList-receivableMode"]},{default:d((()=>[u(W,{modelValue:y.dataForm.collectionPlanList[a].receivableMode,"onUpdate:modelValue":e=>y.dataForm.collectionPlanList[a].receivableMode=e,placeholder:"请选择收款方式",options:y.options,disabled:e.judgeWrite("collectionPlanList")},null,8,["modelValue","onUpdate:modelValue","options","disabled"])])),_:2},1032,["required"]),u(V,{label:"收款摘要",prop:"dataForm.collectionPlanList[i].abstract",required:e.requiredList["collectionPlanList-abstract"]},{default:d((()=>[u(F,{modelValue:y.dataForm.collectionPlanList[a].abstract,"onUpdate:modelValue":e=>y.dataForm.collectionPlanList[a].abstract=e,placeholder:"收款摘要",type:"textarea",disabled:e.judgeWrite("collectionPlanList"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","disabled"])])),_:2},1032,["required"])])),_:2},1024)])),_:2},1024)))),128)),e.judgeWrite("collectionPlanList")?o("",!0):(l(),i(M,{key:0,class:"jnpf-table-addBtn",onClick:b.addPlan},{default:d((()=>[u(R,{name:"plus",color:"#2979ff"}),f("收款计划 ")])),_:1},8,["onClick"]))])),_:1})):o("",!0)])),_:1},8,["model","rules"]),[[L,y.hide]])])),_:1})}]]),dynamicForm:M,leaveApply:R,salesOrder:A},props:{config:{type:Object,default:()=>{}}},methods:{eventReceiver(e,t){this.$emit("eventReceiver",e,t)},setBtnLoad(e){this.$emit("setBtnLoad",e)}}},[["render",function(e,t,a,s,n,u){const c=F("crmOrder"),f=F("leaveApply"),g=F("salesOrder"),h=F("dynamicForm"),y=r;return l(),i(y,null,{default:d((()=>[1==a.config.formType?(l(),p(m,{key:0},["crmOrder"===a.config.formEnCode?(l(),i(c,{key:0,config:a.config,ref:"form",onEventReceiver:u.eventReceiver},null,8,["config","onEventReceiver"])):o("",!0),"leaveApply"===a.config.formEnCode?(l(),i(f,{key:1,config:a.config,ref:"form",onEventReceiver:u.eventReceiver},null,8,["config","onEventReceiver"])):o("",!0),"salesOrder"===a.config.formEnCode?(l(),i(g,{key:2,config:a.config,ref:"form",onEventReceiver:u.eventReceiver},null,8,["config","onEventReceiver"])):o("",!0)],64)):o("",!0),2==a.config.formType?(l(),i(h,{key:1,config:a.config,ref:"form",onEventReceiver:u.eventReceiver,onSetBtnLoad:u.setBtnLoad},null,8,["config","onEventReceiver","onSetBtnLoad"])):o("",!0)])),_:1})}]]);export{x as c};