approval-pending.5648cb74.js 5.8 KB

1
  1. import{_ as N,d as U,af as M,a7 as c,E as B,a9 as E,x as s,o as m,N as P,K as t,y as e,c as g,L as b,M as R,u as V,a as A,aE as T,W as Y}from"./index.1417328f.js";const I={key:0,"w-400px":""},J=Y("\u4FDD\u5B58"),S=U({__name:"approval-pending",props:{isNormal:{type:Boolean,required:!1},isJs:{type:Boolean,required:!1},isOutMonth:{type:String,required:!1},invType:{type:String,required:!1}},emits:["approval"],setup(f,{emit:D}){const i=f,C=M(()=>u.return_type==="2"),u=c({return_type:"2",return_reason:"",remark:"",status:"1",invCode:"",invNum:"",open_date:"",checkCode:"",subtotal_fee:"",red_desc:"0000000100"}),y=[{label:"\u5DF2\u6298\u6263",value:"1100000000"},{label:"\u672A\u62B5\u6263",value:"1010000000"},{label:"\u5C1A\u672A\u5BC4\u51FA",value:"0000000100"}],_=c({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\u53F7"}],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:i.isNormal,trigger:"change",message:"\u8BF7\u8F93\u5165\u6821\u9A8C\u7801"}],red_desc:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u91D1\u7A0E\u7EA2\u51B2\u8BF4\u660E"}]}),k=c({status:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001"}],remark:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u5907\u6CE8"}]}),v=B(null),F=B(!1),x=()=>{v.value.validate(n=>n&&D("approval",u,F))};return E(()=>u.return_type=i.isJs?"1":"2"),E(()=>{const{invType:n,isOutMonth:a}=i;F.value=a&&(n==="normal"||n==="special"),_.remark[0].required=u.status==="3",_.checkCode[0].required=n==="special_electronic"||n==="electronic"}),(n,a)=>{const o=s("el-option"),d=s("el-select"),r=s("el-form-item"),p=s("el-input"),h=s("el-date-picker"),q=s("el-input-number"),w=s("el-button");return m(),P(V(T),{ref_key:"formRef",ref:v,"label-width":"100px",size:"small",model:u,rules:u.status==="1"?_:k},{default:t(()=>[e(r,{label:"\u5BA1\u6279\u72B6\u6001",prop:"status","w-400px":""},{default:t(()=>[e(d,{"w-400px":"",modelValue:u.status,"onUpdate:modelValue":a[0]||(a[0]=l=>u.status=l),placeholder:"\u8BF7\u9009\u62E9\u5BA1\u6279\u72B6\u6001"},{default:t(()=>[e(o,{label:"\u901A\u8FC7",value:"1"}),e(o,{label:"\u4E0D\u901A\u8FC7",value:"3"})]),_:1},8,["modelValue"])]),_:1}),u.status!=="3"&&!F.value?(m(),g(b,{key:0},[e(r,{label:"\u9000\u7968\u65B9\u5F0F",prop:"return_type"},{default:t(()=>[e(d,{"w-300px":"",modelValue:u.return_type,"onUpdate:modelValue":a[1]||(a[1]=l=>u.return_type=l),placeholder:"\u8BF7\u9009\u62E9\u9000\u7968\u65B9\u5F0F"},{default:t(()=>[e(o,{disabled:!f.isJs,value:"1",label:"\u91D1\u7A0E"},null,8,["disabled"]),e(o,{value:"2",label:"\u7EBF\u4E0B"})]),_:1},8,["modelValue"])]),_:1}),e(r,{label:"\u91D1\u7A0E\u7EA2\u51B2\u539F\u56E0",prop:"return_reason",placeholder:"\u91D1\u7A0E\u7EA2\u51B2\u539F\u56E0"},{default:t(()=>[e(d,{"w-300px":"",modelValue:u.return_reason,"onUpdate:modelValue":a[2]||(a[2]=l=>u.return_reason=l)},{default:t(()=>[e(o,{label:"\u9500\u8D27\u9000\u56DE",value:"1"}),e(o,{label:"\u5F00\u7968\u6709\u8BEF",value:"2"}),e(o,{label:"\u670D\u52A1\u7EC8\u6B62",value:"3"}),e(o,{label:"\u9500\u552E\u6298\u8BA9",value:"4"})]),_:1},8,["modelValue"])]),_:1}),e(r,{label:"\u91D1\u7A0E\u7EA2\u51B2\u8BF4\u660E",prop:"red_desc",placeholder:"\u91D1\u7A0E\u7EA2\u51B2\u8BF4\u660E"},{default:t(()=>[e(d,{"w-300px":"",modelValue:u.red_desc,"onUpdate:modelValue":a[3]||(a[3]=l=>u.red_desc=l)},{default:t(()=>[(m(),g(b,null,R(y,l=>e(o,{label:l.label,key:l.value,value:l.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),V(C)?(m(),g("div",I,[e(r,{label:"\u53D1\u7968\u7F16\u53F7",prop:"invCode",placeholder:"\u8BF7\u8F93\u5165\u53D1\u7968\u7F16\u53F7"},{default:t(()=>[e(p,{modelValue:u.invCode,"onUpdate:modelValue":a[4]||(a[4]=l=>u.invCode=l)},null,8,["modelValue"])]),_:1}),e(r,{label:"\u53D1\u7968\u53F7\u7801",prop:"invNum",placeholder:"\u8BF7\u8F93\u5165\u53D1\u7968\u53F7\u7801"},{default:t(()=>[e(p,{modelValue:u.invNum,"onUpdate:modelValue":a[5]||(a[5]=l=>u.invNum=l)},null,8,["modelValue"])]),_:1}),e(r,{label:"\u6821\u9A8C\u7801",prop:"checkCode",placeholder:"\u8BF7\u9009\u62E9\u8F93\u5165\u6821\u9A8C\u7801"},{default:t(()=>[e(p,{modelValue:u.checkCode,"onUpdate:modelValue":a[6]||(a[6]=l=>u.checkCode=l)},null,8,["modelValue"])]),_:1}),e(r,{label:"\u5F00\u7968\u65E5\u671F",prop:"open_date",placeholder:"\u8BF7\u9009\u62E9\u5F00\u7968\u65E5\u671F"},{default:t(()=>[e(h,{"w-300px":"",modelValue:u.open_date,"onUpdate:modelValue":a[7]||(a[7]=l=>u.open_date=l),"value-format":"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u7A0E\u524D\u91D1\u989D",prop:"subtotal_fee",placeholder:"\u8BF7\u8F93\u5165\u7A0E\u524D\u91D1\u989D"},{default:t(()=>[e(q,{modelValue:u.subtotal_fee,"onUpdate:modelValue":a[8]||(a[8]=l=>u.subtotal_fee=l),max:0},null,8,["modelValue"])]),_:1})])):A("v-if",!0)],64)):A("v-if",!0),e(r,{label:"\u5907\u6CE8",prop:"remark","w-400px":""},{default:t(()=>[e(p,{type:"textarea",modelValue:u.remark,"onUpdate:modelValue":a[9]||(a[9]=l=>u.remark=l)},null,8,["modelValue"])]),_:1}),e(r,{"w-full":"",flex:"","justify-end":""},{default:t(()=>[e(w,{type:"primary",onClick:x},{default:t(()=>[J]),_:1})]),_:1})]),_:1},8,["model","rules"])}}});var H=N(S,[["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/InvoiceSales/returnTicket/components/approval-pending.vue"]]);export{H as default};