BaseForm.4fc96e.js 5.0 KB

1
  1. import{_ as N,d as R,n as S,w,ab as j,aV as z,r as a,aj as O,H as G,l as r,o as M,G as U,C as l,j as e,M as c,L as P,h as _,J as E,aG as H,aC as $}from"./index.js";import{b as J}from"./index.384d251b.js";import{c as L,r as q}from"./shared.456185fd.js";import K from"./index.bb93f8.js";import{C as Q}from"./ChildGoodEditModal.6d23b8.js";import{g as W}from"./status.915de772.js";import"./basic-descriptions.2bd5636f.js";const X={class:"w-full flex justify-between"},Y={class:"w-full flex justify-end"},Z=R({__name:"BaseForm",setup(ee){const F=n=>{const o=new Date;return n.getTime()>o.setHours(0,0,0,0)},D=S(),b=w(null),s=j({editVisible:!1,visible:!1,companies:[],index:-1,data:{}}),h=z({success(){D.push("/invoiceInOut/productManager")}}),i=w(L());async function B(){var n;try{await((n=b.value)==null?void 0:n.validate())}catch{}}function k(n){i.value.childArr=[...n]}return async function(){const o=await J({size:1e4});o.code==0&&(s.companies=[...o.data.list])}(),(n,o)=>{const t=a("ElTableColumn"),y=a("ElTag"),f=a("ElButton"),v=a("ElTooltip"),x=a("ElTable"),p=a("ElFormItem"),d=a("ElCol"),C=a("ElOption"),g=a("ElSelect"),T=a("ElDatePicker"),A=a("ElRow"),V=O("loading");return G((M(),U(r($),{ref_key:"formRef",ref:b,rules:r(q),model:i.value,"label-width":"140px"},{default:l(()=>[e(A,null,{default:l(()=>[e(d,{span:24},{default:l(()=>[e(p,{label:"\u5546\u54C1\u4FE1\u606F",prop:"childArr"},{default:l(()=>[e(x,{border:"",size:"small",data:i.value.childArr},{default:l(()=>[e(t,{label:"\u5546\u54C1\u7F16\u53F7",prop:"skuCode","show-overflow-tooltip":""}),e(t,{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName","show-overflow-tooltip":""}),e(t,{label:"\u4F9B\u5E94\u5546\u7EB3\u7A0E\u53F7",prop:"seller_code",width:"120px","show-overflow-tooltip":""}),e(t,{label:"\u4F9B\u5E94\u5546\u540D\u79F0",prop:"seller_name","show-overflow-tooltip":""}),e(t,{label:"\u5546\u54C1\u7C7B\u578B","show-overflow-tooltip":""},{default:l(({row:u})=>[e(y,{size:"small"},{default:l(()=>{var m;return[c(P(((m=r(W).find(I=>I.value===u.good_type))==null?void 0:m.label)||"--"),1)]}),_:2},1024)]),_:1}),e(t,{label:"\u89C4\u683C",prop:"spec","show-overflow-tooltip":""}),e(t,{label:"\u5355\u4F4D",prop:"unit","show-overflow-tooltip":""}),e(t,{label:"\u7A0E\u524D\u5355\u4EF7",prop:"unit_price","show-overflow-tooltip":""}),e(t,{label:"\u7A0E\u540E\u5355\u4EF7",prop:"subunit_price","show-overflow-tooltip":""}),e(t,{label:"\u7C7B\u76EE\u7F16\u53F7",prop:"cat_code","show-overflow-tooltip":""}),e(t,{label:"\u7C7B\u76EE\u540D\u79F0",prop:"cat_name","show-overflow-tooltip":""}),e(t,{label:"\u7A0E\u7387",prop:"cat_tax","show-overflow-tooltip":""}),e(t,{label:"\u91CD\u91CF",prop:"unit_weight","show-overflow-tooltip":""}),e(t,{label:"\u5206\u5149",prop:"spectral","show-overflow-tooltip":""}),e(t,{label:"\u8D26\u9762\u6570\u91CF",prop:"","show-overflow-tooltip":""}),e(t,{label:"\u64CD\u4F5C",width:"60px",fixed:"right"},{header:l(()=>[_("div",X,[o[5]||(o[5]=_("span",null,"\u64CD\u4F5C",-1)),e(v,{content:"\u6DFB\u52A0",placement:"top"},{default:l(()=>[e(f,{link:"",size:"small",type:"primary",icon:r(E)("add"),onClick:o[0]||(o[0]=u=>s.visible=!0)},null,8,["icon"])]),_:1})])]),default:l(({$index:u})=>[e(v,{content:"\u5220\u9664",placement:"top"},{default:l(()=>[e(f,{icon:r(E)("delete"),type:"danger",size:"small",link:"",onClick:m=>i.value.childArr.splice(u,1)},null,8,["icon","onClick"])]),_:2},1024)]),_:1})]),_:1},8,["data"])]),_:1})]),_:1}),e(d,{span:24},{default:l(()=>[e(p,{label:"\u76D8\u70B9\u6570\u91CF",prop:"num"},{default:l(()=>[e(r(H),{modelValue:i.value.num,"onUpdate:modelValue":o[1]||(o[1]=u=>i.value.num=u),placeholder:"\u76D8\u70B9\u6570\u91CF"},null,8,["modelValue"])]),_:1})]),_:1}),e(d,{span:24},{default:l(()=>[e(p,{label:"\u76C8\u4E8F\u6570\u91CF",prop:"ykNum"},{default:l(()=>o[6]||(o[6]=[c(" =\u8D26\u9762\u6570\u91CF-\u76D8\u70B9\u6570\u91CF ")])),_:1})]),_:1}),e(d,{span:24},{default:l(()=>[e(p,{label:"\u76C8\u4E8F\u91D1\u989D",prop:"ykPrice"},{default:l(()=>o[7]||(o[7]=[c(" =(\u8D26\u9762\u6570\u91CF-\u76D8\u70B9\u6570\u91CF) * \u7A0E\u524D\u5355\u4EF7 ")])),_:1})]),_:1}),e(d,{span:24},{default:l(()=>[e(p,{label:"\u7ED3\u679C\u7C7B\u578B",prop:"result"},{default:l(()=>[e(g,null,{default:l(()=>[e(C,{label:"\u8C03\u6574\u5355",value:"0"}),e(C,{label:"\u524D\u671F\u6570\u636E\u5BFC\u5165",value:"1"})]),_:1})]),_:1})]),_:1}),e(d,{span:24},{default:l(()=>[e(p,{label:"\u8C03\u6574\u5355\u5165\u8D26\u6708\u4EFD",prop:"month"},{default:l(()=>[e(T,{type:"month",placeholder:"\u5165\u8D26\u6708\u4EFD",disabledDate:F})]),_:1})]),_:1})]),_:1}),_("div",Y,[e(f,{type:"primary",onClick:B},{default:l(()=>o[8]||(o[8]=[c("\u4FDD\u5B58")])),_:1})]),e(K,{visible:s.visible,"onUpdate:visible":o[2]||(o[2]=u=>s.visible=u),onSubmit:k},null,8,["visible"]),e(Q,{visible:s.editVisible,"onUpdate:visible":o[3]||(o[3]=u=>s.editVisible=u),index:s.index,data:s.data,onSubmit:o[4]||(o[4]=(u,m)=>i.value.childArr[u]={...m})},null,8,["visible","index","data"])]),_:1},8,["rules","model"])),[[V,r(h).loading]])}}});var ie=N(Z,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/inventoryCheck/components/BaseForm.vue"]]);export{ie as default};