form.D2PjL320.js 48 KB

1
  1. import{g as e,s as t,o as a,t as l,p as i,w as d,B as o,q as r,bL as s,ab as n,v as u,x as p,D as m,F as c,E as f,y as g,I as h,b as y,h as b,z as q,A as F,n as _,X as L}from"./index-P0fyQ2Em.js";import{_ as V,h as v}from"./index.BEyjEu29.js";import{r as j}from"./uni-app.es.DOtS5Ldl.js";import{_ as w}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{_ as k}from"./u-input.Cp2bygnN.js";import{_ as U,a as S}from"./u-form.B1LWETT2.js";import{_ as I}from"./index.vGVmWABQ.js";import{_ as D}from"./index.CIb_-r5F.js";import{_ as T}from"./index.BLChm46K.js";import{_ as N}from"./u-icon.wXcRZHbn.js";import{_ as P}from"./index.D2KRRdBj.js";import{g as C,a as M}from"./order.BZyuCWTy.js";const W=w({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;"initiationForm"==a.previewType&&(this.formData=a.formData||{}),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)=>{var i,d;for(let o=0;o<e.length;o++){let r=e[o],s=r.__vModel__,n=r.__config__;if(s){let e=t.hasOwnProperty(s)?t[s]:n.defaultValue;if(n.isSubTable||(n.defaultValue=e),(this.isAdd||n.isSubTable)&&n.defaultCurrent){if("datePicker"===n.jnpfKey&&!t.hasOwnProperty(s)){let t=this.jnpf.handelFormat(r.format),a=this.jnpf.toDate((new Date).getTime(),t);e=new Date(a+("yyyy"===t?"-01-01 00:00:00":"yyyy-MM"===t?"-01 00:00:00":"yyyy-MM-dd"===t?" 00:00:00":"")).getTime(),n.defaultValue=e}"timePicker"===n.jnpfKey&&(t.hasOwnProperty(s)||(n.defaultValue=this.jnpf.toDate(new Date,r.format))),"organizeSelect"===n.jnpfKey&&(null==(i=this.userInfo.organizeIds)?void 0:i.length)&&(n.defaultValue=r.multiple?this.userInfo.organizeIds:this.userInfo.organizeId),"posSelect"===n.jnpfKey&&(null==(d=this.userInfo.positionIds)?void 0:d.length)&&(n.defaultValue=r.multiple?this.userInfo.positionIds:this.userInfo.positionId);const a=this.userInfo.userId;"userSelect"===n.jnpfKey&&a&&(n.defaultValue=r.multiple?[a]:a),"usersSelect"===n.jnpfKey&&a&&(n.defaultValue=[a+"--user"]),"sign"===n.jnpfKey&&this.userInfo.signImg&&(n.defaultValue=this.userInfo.signImg)}let a=r.__config__.noShow||!1,o=r.disabled||!1,u=r.__config__.required||!1,p=!1;if((!r.__config__.visibility||Array.isArray(r.__config__.visibility)&&r.__config__.visibility.includes("app"))&&(p=!0),this.setting.formOperates&&this.setting.formOperates.length){let e=r.__config__.isSubTable?(null==l?void 0:l.__vModel__)+"-"+(null==r?void 0:r.__vModel__):r.__vModel__,t=this.setting.formOperates.filter((t=>t.id===e))||[];if(t.length){let e=t[0];a=!e.read,o=!e.write,u=e.required?e.required:r.__config__.required}}o=r.readonly?r.readonly:o,(this.setting.readonly||n.disabled)&&(o=!0),"scan"===this.setting.origin&&(o=!0),this.$set(r,"disabled",o),this.$set(r.__config__,"noShow",a),this.$set(r.__config__,"required",u),this.$set(r.__config__,"isVisibility",p)}else{let e=!!r.__config__.noShow&&r.__config__.noShow,t=!1;(!r.__config__.visibility||Array.isArray(r.__config__.visibility)&&r.__config__.visibility.includes("app"))&&(t=!0),this.$set(r.__config__,"isVisibility",t),this.$set(r.__config__,"noShow",e)}r.__config__&&r.__config__.children&&Array.isArray(r.__config__.children)&&a(r.__config__.children,r)}};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})}]]),O=["crmOrder","salesOrder","leaveApply"],R={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<a[l][i].length;d++){const o=a[l][i][d];if(o.pattern){o.pattern=o.pattern.toString();let e=o.pattern.indexOf("/"),t=o.pattern.lastIndexOf("/"),a=o.pattern.substring(e+1,t),l=new RegExp(a);o.pattern=l}e.forEach(((e,a)=>{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,"revoke"!==e.formEnCode&&this.updateDataRule(),this.$nextTick((()=>{if(this.$refs.dataForm.resetFields(),this.beforeInit&&this.beforeInit(),e.id){let t=JSON.parse(JSON.stringify(e.draftData))||JSON.parse(JSON.stringify(e.formData));return this.selfGetInfo&&"function"==typeof this.selfGetInfo?this.selfGetInfo(t):this.dataForm=JSON.parse(JSON.stringify(t)),void(O.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(O.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,O.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;t<this.setting.formOperates.length;t++){const a=this.setting.formOperates[t];a.required&&(this.$set(this.requiredList,a.id,a.required),"rate"!=a.jnpfKey&&"slider"!=a.jnpfKey&&this.requiredObj.push(a));const l={required:a.required||!1,message:a.name+"不能为空",trigger:a.trigger||["blur","change"],type:""},i=["inputNumber","datePicker","switch","rate","slider"];if("array"===a.dataType&&(l.type=a.dataType),i.includes(a.jnpfKey)&&(l.type="number"),["relationForm","popupSelect"].includes(a.jnpfKey)&&(l.type="any",l.validator=(e,t,l)=>{t||0===t?l():l(new Error(a.name+"不能为空"))}),this.rules.hasOwnProperty(a.id)){let e=!0;for(let t=0;t<this.rules[a.id].length;t++)this.rules[a.id][t].hasOwnProperty("required")&&(this.rules[a.id][t].required=a.required||!1,e=!1);e&&a.required&&this.rules[a.id].push(l)}else a.required&&this.$set(e,a.id,[l])}this.rules={...this.rules,...e},this.$refs.dataForm.setRules(this.rules)},judgeShow(e){if(4==this.setting.opType)return!0;if(!this.setting.formOperates||!this.setting.formOperates.length)return!0;let t=this.setting.formOperates.filter((t=>t.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 x=w({name:"SalesOrder",mixins:[R],data:()=>({billEnCode:"WF_SalesOrderNo",dataForm:{flowTitle:"",billNo:"",flowUrgent:1,customerAddres:"",contactPhone:"",description:"",fileJson:"",salesman:"",paymentMoney:void 0,paymentMethod:"",invoiceType:"",salesDate:void 0,contacts:"",customerName:"",entryList:[]},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:void 0,price:void 0,amount:void 0,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"),k),F=j(a("u-form-item"),U),_=r,L=j(a("JnpfDatePicker"),I),V=j(a("JnpfSelect"),D),v=j(a("JnpfUploadFile"),T),w=h,P=j(a("u-icon"),N),C=j(a("u-form"),S);return l(),i(_,{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(_,{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(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(F,{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(_,{class:"jnpf-card"},{default:d((()=>[u(_,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:d((()=>[e.judgeShow("customerName")?(l(),i(F,{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(F,{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(F,{key:2,label:"开单日期",prop:"salesDate",required:e.requiredList.salesDate},{default:d((()=>[u(L,{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(F,{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(F,{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(F,{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(F,{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(F,{key:7,label:"发票类型",prop:"invoiceType",required:e.requiredList.invoiceType},{default:d((()=>[u(V,{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(F,{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(F,{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(F,{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(F,{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(_,{key:0,class:"jnpf-table"},{default:d((()=>[u(_,{class:"jnpf-table-item-title u-flex u-row-between"},{default:d((()=>[u(w,{class:"jnpf-table-item-title-num"},{default:d((()=>[p("销售明细")])),_:1})])),_:1}),(l(!0),m(c,null,f(y.dataForm.entryList,((t,a)=>(l(),i(_,{class:"jnpf-table-item",key:a},{default:d((()=>[u(_,{class:"jnpf-table-item-title u-flex u-row-between"},{default:d((()=>[u(w,{class:"jnpf-table-item-title-num"},{default:d((()=>[p("("+g(a+1)+")",1)])),_:2},1024),e.judgeWrite("entryList")?o("",!0):(l(),i(_,{key:0,class:"jnpf-table-delete-btn",onClick:e=>b.delItem(a)},{default:d((()=>[p(" 删除 ")])),_:2},1032,["onClick"]))])),_:2},1024),u(_,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:d((()=>[e.judgeShow("entryList-goodsName")?(l(),i(F,{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(F,{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(F,{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(F,{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(F,{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(F,{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,type:"number",placeholder:"请输入金额",disabled:"","input-align":"right"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1032,["required"])):o("",!0),e.judgeShow("entryList-description")?(l(),i(F,{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(_,{key:0,class:"jnpf-table-addBtn",onClick:b.addItem},{default:d((()=>[u(P,{name:"plus",color:"#2979ff"}),p("添加 ")])),_:1},8,["onClick"]))])),_:1})):o("",!0)])),_:1},8,["model","rules"])])),_:1})}]]);const E=w({name:"LeaveApply",mixins:[R],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){var t,a;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,null==(a=null==(t=this.userInfo)?void 0:t.positionList)?void 0:a.length){const e=this.userInfo.positionList.map((e=>e.treeName));this.dataForm.applyPost=e.join(",")}}}},[["render",function(e,t,s,n,p,m){const c=j(a("u-input"),k),f=j(a("u-form-item"),U),g=r,h=j(a("JnpfDatePicker"),I),y=j(a("JnpfSelect"),D),b=j(a("JnpfUploadFile"),T),q=j(a("u-form"),S);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 A=w({components:{crmOrder:w({name:"crmOrder",mixins:[R],data:()=>({hide:!1,billEnCode:"OrderNumber",dataForm:{id:"",customerName:"",salesmanId:"",orderDate:void 0,orderCode:"",paymentMode:"",receivableMoney:void 0,earnestRate:void 0,prepayEarnest:void 0,transportMode:"",deliveryDate:void 0,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(){C().then((e=>{this.goodsOptions=e.data.list})),M().then((e=>{this.customerOptions=e.data.list}))},onChange(e,t){this.dataForm.salesmanName=t.fullName},addGoods(){this.dataForm.goodsList.push({goodsId:"",goodsCode:"",goodsName:"",specifications:"",unit:"",qty:void 0,price:void 0,amount:"",discount:void 0,cess:void 0,actualPrice:void 0,actualAmount:void 0,description:""})},delGoods(e){this.dataForm.goodsList.splice(e,1)},addPlan(){this.dataForm.collectionPlanList.push({receivableDate:void 0,receivableRate:void 0,receivableMoney:void 0,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){this.$nextTick((()=>{const t=this.dataForm.goodsList[e];t.amount=this.jnpf.toDecimal(parseFloat(t.price)*parseFloat(t.qty));var a=t.price*(t.discount/100);t.actualPrice=this.jnpf.toDecimal(a*(1+t.cess/100)),t.actualAmount=this.jnpf.toDecimal(parseFloat(t.actualPrice)*parseFloat(t.qty)),this.$forceUpdate()}))}}},[["render",function(e,t,s,n,y,b){const _=j(a("u-input"),k),L=j(a("u-form-item"),U),V=j(a("JnpfTreeSelect"),v),w=j(a("JnpfUserSelect"),P),C=j(a("JnpfDatePicker"),I),M=r,W=j(a("JnpfSelect"),D),O=j(a("JnpfUploadFile"),T),R=h,x=j(a("u-icon"),N),E=j(a("u-form"),S);return l(),i(M,{class:"jnpf-wrap jnpf-wrap-workflow"},{default:d((()=>[q(u(E,{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(L,{key:0,label:"订单编码",prop:"orderCode",required:e.requiredList.orderCode},{default:d((()=>[u(_,{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(L,{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(L,{key:2,label:"业务人员",prop:"salesmanId",required:e.requiredList.salesmanId},{default:d((()=>[u(w,{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(L,{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(L,{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(L,{key:1,label:"付款金额",prop:"receivableMoney",required:e.requiredList.receivableMoney},{default:d((()=>[u(_,{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(L,{key:2,label:"定金比率",prop:"earnestRate",required:e.requiredList.earnestRate},{default:d((()=>[u(_,{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(L,{key:3,label:"预付定金",prop:"prepayEarnest",required:e.requiredList.prepayEarnest},{default:d((()=>[u(_,{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(L,{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(L,{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(L,{key:6,label:"发货地址",prop:"deliveryAddress",required:e.requiredList.deliveryAddress},{default:d((()=>[u(_,{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(L,{key:7,label:"订单备注",prop:"description",required:e.requiredList.description},{default:d((()=>[u(_,{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(L,{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((()=>[u(M,{class:"jnpf-table-item-title u-flex u-row-between"},{default:d((()=>[u(R,{class:"jnpf-table-item-title-num"},{default:d((()=>[p("商品添购")])),_:1})])),_:1}),(l(!0),m(c,null,f(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(R,{class:"jnpf-table-item-title-num"},{default:d((()=>[p("("+g(a+1)+")",1)])),_:2},1024),e.judgeWrite("goodsList")?o("",!0):(l(),i(M,{key:0,class:"jnpf-table-delete-btn",onClick:e=>b.delGoods(a)},{default:d((()=>[p(" 删除 ")])),_:2},1032,["onClick"]))])),_:2},1024),u(M,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:d((()=>[u(L,{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(L,{label:"规格型号",prop:"dataForm.goodsList[i].specifications",required:e.requiredList["goodsList-specifications"]},{default:d((()=>[u(_,{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(L,{label:"单位",prop:"dataForm.goodsList[i].unit",required:e.requiredList["goodsList-unit"]},{default:d((()=>[u(_,{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(L,{label:"数量",prop:"dataForm.goodsList[i].qty",required:e.requiredList["goodsList-qty"]},{default:d((()=>[u(_,{modelValue:y.dataForm.goodsList[a].qty,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].qty=e,placeholder:"数量",type:"number",onInput:e=>b.count(a),disabled:e.judgeWrite("goodsList"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","onInput","disabled"])])),_:2},1032,["required"]),u(L,{label:"单价",prop:"dataForm.goodsList[i].price",required:e.requiredList["goodsList-price"]},{default:d((()=>[u(_,{modelValue:y.dataForm.goodsList[a].price,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].price=e,placeholder:"单价",type:"number",onInput:e=>b.count(a),disabled:e.judgeWrite("goodsList"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","onInput","disabled"])])),_:2},1032,["required"]),u(L,{label:"金额",prop:"dataForm.goodsList[i].amount",required:e.requiredList["goodsList-amount"]},{default:d((()=>[u(_,{modelValue:y.dataForm.goodsList[a].amount,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].amount=e,type:"number",placeholder:"金额",disabled:"","input-align":"right"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1032,["required"]),u(L,{label:"折扣%",prop:"dataForm.goodsList[i].discount",required:e.requiredList["goodsList-discount"]},{default:d((()=>[u(_,{modelValue:y.dataForm.goodsList[a].discount,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].discount=e,placeholder:"折扣",type:"number",onInput:e=>b.count(a),disabled:e.judgeWrite("goodsList"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","onInput","disabled"])])),_:2},1032,["required"]),u(L,{label:"税率%",prop:"dataForm.goodsList[i].cess",required:e.requiredList["goodsList-cess"]},{default:d((()=>[u(_,{modelValue:y.dataForm.goodsList[a].cess,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].cess=e,placeholder:"税率",type:"number",onInput:e=>b.count(a),disabled:e.judgeWrite("goodsList"),"input-align":"right"},null,8,["modelValue","onUpdate:modelValue","onInput","disabled"])])),_:2},1032,["required"]),u(L,{label:"实际单价",prop:"dataForm.goodsList[i].actualPrice",required:e.requiredList["goodsList-actualPrice"]},{default:d((()=>[u(_,{modelValue:y.dataForm.goodsList[a].actualPrice,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].actualPrice=e,placeholder:"实际单价",type:"number",disabled:"","input-align":"right"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1032,["required"]),u(L,{label:"实际金额",prop:"dataForm.goodsList[i].actualAmount",required:e.requiredList["goodsList-actualAmount"]},{default:d((()=>[u(_,{modelValue:y.dataForm.goodsList[a].actualAmount,"onUpdate:modelValue":e=>y.dataForm.goodsList[a].actualAmount=e,type:"number",placeholder:"实际金额",disabled:"","input-align":"right"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1032,["required"]),u(L,{label:"备注",prop:"dataForm.goodsList[i].description",required:e.requiredList["goodsList-description"]},{default:d((()=>[u(_,{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(x,{name:"plus",color:"#2979ff"}),p("商品添购 ")])),_:1},8,["onClick"]))])),_:1})):o("",!0),e.judgeShow("collectionPlanList")?(l(),i(M,{key:1,class:"jnpf-table"},{default:d((()=>[u(M,{class:"jnpf-table-item-title u-flex u-row-between"},{default:d((()=>[u(R,{class:"jnpf-table-item-title-num"},{default:d((()=>[p("收款计划")])),_:1})])),_:1}),(l(!0),m(c,null,f(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(R,{class:"jnpf-table-item-title-num"},{default:d((()=>[p("("+g(a+1)+")",1)])),_:2},1024),e.judgeWrite("collectionPlanList")?o("",!0):(l(),i(M,{key:0,class:"jnpf-table-delete-btn",onClick:e=>b.delPlan(a)},{default:d((()=>[p("删除 ")])),_:2},1032,["onClick"]))])),_:2},1024),u(M,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:d((()=>[u(L,{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(L,{label:"收款比率%",prop:"dataForm.collectionPlanList[i].receivableRate",required:e.requiredList["collectionPlanList-receivableRate"]},{default:d((()=>[u(_,{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(L,{label:"收款金额",prop:"dataForm.collectionPlanList[i].receivableMoney",required:e.requiredList["collectionPlanList-receivableMoney"]},{default:d((()=>[u(_,{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(L,{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(L,{label:"收款摘要",prop:"dataForm.collectionPlanList[i].abstract",required:e.requiredList["collectionPlanList-abstract"]},{default:d((()=>[u(_,{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(x,{name:"plus",color:"#2979ff"}),p("收款计划 ")])),_:1},8,["onClick"]))])),_:1})):o("",!0)])),_:1},8,["model","rules"]),[[F,y.hide]])])),_:1})}]]),dynamicForm:W,leaveApply:E,salesOrder:x,revokeApply:w({name:"revoke",mixins:[R],data:()=>({dataForm:{billRule:"",creatorTime:"",handleOpinion:"",revokeTaskId:"",revokeTaskName:""}}),methods:{openRevokeFlow(){const e={opType:5,id:this.dataForm.revokeTaskId};_({url:"/pages/workFlow/flowBefore/revokeForm?config="+this.jnpf.base64.encode(JSON.stringify(e))})},selfInit(e){this.dataForm.flowTitle=this.userInfo.userName+"的撤销申请表"}}},[["render",function(e,t,o,s,n,m){const c=j(a("u-input"),k),f=j(a("u-form-item"),U),y=j(a("JnpfDatePicker"),I),b=h,q=r,F=j(a("u-form"),S);return l(),i(q,{class:"jnpf-wrap jnpf-wrap-workflow"},{default:d((()=>[u(F,{model:n.dataForm,ref:"dataForm",errorType:["toast"],"label-position":"left","label-width":"150","label-align":"left"},{default:d((()=>[u(q,{class:"u-p-l-20 u-p-r-20 form-item-box"},{default:d((()=>[u(f,{label:"审批编号",prop:"billRule"},{default:d((()=>[u(c,{modelValue:n.dataForm.billRule,"onUpdate:modelValue":t[0]||(t[0]=e=>n.dataForm.billRule=e),placeholder:"审批编号",disabled:"","input-align":"right"},null,8,["modelValue"])])),_:1}),u(f,{label:"提交日期",prop:"creatorTime"},{default:d((()=>[u(y,{modelValue:n.dataForm.creatorTime,"onUpdate:modelValue":t[1]||(t[1]=e=>n.dataForm.creatorTime=e),placeholder:"请输入提交日期",disabled:""},null,8,["modelValue"])])),_:1}),u(f,{label:"撤销理由",prop:"handleOpinion"},{default:d((()=>[u(c,{modelValue:n.dataForm.handleOpinion,"onUpdate:modelValue":t[2]||(t[2]=e=>n.dataForm.handleOpinion=e),placeholder:"请输入撤销理由",type:"textarea",disabled:"","input-align":"right"},null,8,["modelValue"])])),_:1}),u(f,{label:"关联流程",prop:"revokeFlow"},{default:d((()=>[u(q,{class:"jnpf-link",onClick:t[3]||(t[3]=e=>m.openRevokeFlow())},{default:d((()=>[u(b,null,{default:d((()=>[p(g(n.dataForm.revokeTaskName),1)])),_:1})])),_:1})])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})}],["__scopeId","data-v-d7fa244f"]])},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 p=L("dynamicForm"),f=L("crmOrder"),g=L("leaveApply"),h=L("salesOrder"),y=L("revokeApply"),b=r;return l(),i(b,null,{default:d((()=>[1==a.config.formType?(l(),i(p,{key:0,ref:"form",onEventReceiver:u.eventReceiver,onSetBtnLoad:u.setBtnLoad,config:a.config},null,8,["onEventReceiver","onSetBtnLoad","config"])):o("",!0),2==a.config.formType?(l(),m(c,{key:1},["crmOrder"===a.config.formEnCode?(l(),i(f,{key:0,ref:"form",onEventReceiver:u.eventReceiver,config:a.config},null,8,["onEventReceiver","config"])):o("",!0),"leaveApply"===a.config.formEnCode?(l(),i(g,{key:1,ref:"form",onEventReceiver:u.eventReceiver,config:a.config},null,8,["onEventReceiver","config"])):o("",!0),"salesOrder"===a.config.formEnCode?(l(),i(h,{key:2,ref:"form",onEventReceiver:u.eventReceiver,config:a.config},null,8,["onEventReceiver","config"])):o("",!0),"revoke"===a.config.formEnCode?(l(),i(y,{key:3,ref:"form",onEventReceiver:u.eventReceiver,config:a.config},null,8,["onEventReceiver","config"])):o("",!0)],64)):o("",!0)])),_:1})}]]);export{A as c};