approval-pending.09d376.js 6.1 KB

1
  1. import{_ as q,d as h,Z as E,x as w,aP as N,ah as U,A as I,a0 as D,r as i,o as m,G as _,D as t,a as f,l as e,m as d,c as R,F as P,ar as M,h as O,M as T,aQ as Y}from"./index.js";const j={"w-400px":""},S=h({__name:"approval-pending",props:{isAllEx:{type:Boolean,required:!1},isNormal:{type:Boolean,required:!1},isJs:{type:Boolean,required:!1},isOutMonth:{type:String,required:!1},invType:{type:String,required:!1},isNormalOpen:{type:Boolean,required:!1},orginInvData:{type:null,required:!1},getOriginInvoice:{type:Function,required:!0}},emits:["approval"],setup(g,{emit:y}){const p=g,u=E({return_type:"2",return_reason:"",total_fee:"",remark:"",status:"2",invCode:"",invNum:"",open_date:"",checkCode:"",subtotal_fee:""}),F=E({return_type:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u9000\u7968\u65B9\u5F0F"}],return_reason:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u7EA2\u51B2\u539F\u56E0"}],status:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001"}],remark:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u5907\u6CE8"}],invCode:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u53D1\u7968\u7F16\u7801"}],invNum:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u53D1\u7968\u53F7\u7801"}],open_date:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u5F00\u7968\u65E5\u671F"}],subtotal_fee:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u7A0E\u524D\u91D1\u989D"}],checkCode:[{required:p.isNormal,trigger:"change",message:"\u8BF7\u8F93\u5165\u6821\u9A8C\u7801"}]}),A=E({status:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001"}],remark:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u5907\u6CE8"}]}),B=w(null),o=N("0"),k=()=>{B.value.validate(s=>s&&y("approval",u,b.value))},b=U(()=>!1);return I(()=>p.orginInvData,()=>{Object.keys(p.orginInvData).forEach(s=>{u[s]=o.value==="0"?p.orginInvData[s]:""})},{deep:!0}),D(()=>u.return_type=p.isJs?"1":"2"),D(()=>{const{invType:s}=p;F.remark[0].required=u.status==="3",F.checkCode[0].required=s==="special_electronic"||s==="electronic"}),(s,l)=>{const n=i("el-option"),v=i("el-select"),r=i("el-form-item"),c=i("el-input"),x=i("el-date-picker"),V=i("el-input-number"),C=i("el-button");return m(),_(d(Y),{ref_key:"formRef",ref:B,"label-width":"100px",size:"small",model:u,rules:u.status==="1"?F:A},{default:t(()=>[f(" {{ props.orginInvData }} "),e(r,{label:"\u5BA1\u6279\u72B6\u6001",prop:"status","w-400px":""},{default:t(()=>[e(v,{"w-400px":"",modelValue:u.status,"onUpdate:modelValue":l[0]||(l[0]=a=>u.status=a),placeholder:"\u8BF7\u9009\u62E9\u5BA1\u6279\u72B6\u6001"},{default:t(()=>[e(n,{label:"\u901A\u8FC7",value:"2"}),e(n,{label:"\u4E0D\u901A\u8FC7",value:"3"})]),_:1},8,["modelValue"])]),_:1}),u.status!=="3"&&!d(b)?(m(),R(P,{key:0},[e(r,{label:"\u9000\u7968\u65B9\u5F0F",prop:"return_type"},{default:t(()=>[e(v,{"w-300px":"",modelValue:u.return_type,"onUpdate:modelValue":l[1]||(l[1]=a=>u.return_type=a),placeholder:"\u8BF7\u9009\u62E9\u9000\u7968\u65B9\u5F0F"},{default:t(()=>[e(n,{disabled:"",value:"1",label:"\u91D1\u7A0E"}),e(n,{value:"2",label:"\u7EBF\u4E0B"})]),_:1},8,["modelValue"])]),_:1}),e(r,{label:"\u7EA2\u51B2\u539F\u56E0",prop:"return_reason",placeholder:"\u8BF7\u9009\u62E9\u7EA2\u51B2\u539F\u56E0"},{default:t(()=>[e(v,{"w-300px":"",modelValue:u.return_reason,"onUpdate:modelValue":l[2]||(l[2]=a=>u.return_reason=a)},{default:t(()=>[e(n,{label:"\u9500\u8D27\u9000\u56DE",value:"1"}),e(n,{label:"\u5F00\u7968\u6709\u8BEF",value:"2"}),e(n,{label:"\u670D\u52A1\u7EC8\u6B62",value:"3"}),e(n,{label:"\u9500\u552E\u6298\u8BA9",value:"4"})]),_:1},8,["modelValue"])]),_:1}),e(r,{label:"\u7EA2\u51B2/\u539F\u7968"},{default:t(()=>[e(v,{style:{width:"300px"},modelValue:d(o),"onUpdate:modelValue":l[3]||(l[3]=a=>M(o)?o.value=a:null)},{default:t(()=>[e(n,{label:"\u539F\u7968",value:"0"}),e(n,{label:"\u7EA2\u51B2",value:"1"})]),_:1},8,["modelValue"])]),_:1}),O("div",j,[g.isAllEx?f("v-if",!0):(m(),_(r,{key:0,label:"\u53D1\u7968\u4EE3\u7801",prop:"invCode"},{default:t(()=>[e(c,{modelValue:u.invCode,"onUpdate:modelValue":l[4]||(l[4]=a=>u.invCode=a),placeholder:"\u53D1\u7968\u4EE3\u7801",disabled:d(o)==="0"},null,8,["modelValue","disabled"])]),_:1})),e(r,{label:"\u53D1\u7968\u53F7\u7801",prop:"invNum"},{default:t(()=>[e(c,{modelValue:u.invNum,"onUpdate:modelValue":l[5]||(l[5]=a=>u.invNum=a),placeholder:"\u53D1\u7968\u53F7\u7801"},null,8,["modelValue"])]),_:1}),g.isAllEx?f("v-if",!0):(m(),_(r,{key:1,label:"\u6821\u9A8C\u7801",prop:"checkCode"},{default:t(()=>[e(c,{modelValue:u.checkCode,"onUpdate:modelValue":l[6]||(l[6]=a=>u.checkCode=a),placeholder:"\u6821\u9A8C\u7801",disabled:d(o)==="0"},null,8,["modelValue","disabled"])]),_:1})),e(r,{label:"\u5F00\u7968\u65E5\u671F",prop:"open_date"},{default:t(()=>[e(x,{"w-300px":"",modelValue:u.open_date,"onUpdate:modelValue":l[7]||(l[7]=a=>u.open_date=a),placeholder:"\u5F00\u7968\u65E5\u671F","value-format":"YYYY-MM-DD HH:mm:ss",disabled:d(o)==="0"},null,8,["modelValue","disabled"])]),_:1}),g.isAllEx?f("v-if",!0):(m(),_(r,{key:2,label:"\u7A0E\u524D\u91D1\u989D",prop:"subtotal_fee"},{default:t(()=>[e(V,{modelValue:u.subtotal_fee,"onUpdate:modelValue":l[8]||(l[8]=a=>u.subtotal_fee=a),max:d(o)==="0"?void 0:"0",placeholder:"\u7A0E\u524D\u91D1\u989D",disabled:d(o)==="0"},null,8,["modelValue","max","disabled"])]),_:1})),g.isAllEx?(m(),_(r,{key:3,label:"\u7A0E\u540E\u91D1\u989D",prop:"total_fee"},{default:t(()=>[e(V,{modelValue:u.total_fee,"onUpdate:modelValue":l[9]||(l[9]=a=>u.total_fee=a),max:d(o)==="0"?void 0:"0",placeholder:"\u7A0E\u540E\u91D1\u989D",disabled:d(o)==="0"},null,8,["modelValue","max","disabled"])]),_:1})):f("v-if",!0)])],64)):f("v-if",!0),e(r,{label:"\u5907\u6CE8",prop:"remark","w-400px":""},{default:t(()=>[e(c,{type:"textarea",modelValue:u.remark,"onUpdate:modelValue":l[10]||(l[10]=a=>u.remark=a)},null,8,["modelValue"])]),_:1}),e(r,{"w-full":"",flex:"","justify-end":""},{default:t(()=>[e(C,{type:"primary",onClick:k},{default:t(()=>[T("\u4FDD\u5B58")]),_:1})]),_:1})]),_:1},8,["model","rules"])}}});var J=q(S,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSales/returnTicket/components/approval-pending.vue"]]);export{J as default};