1 |
- import{_ as I,d as A,w as v,ab as G,r as n,o as U,c as j,j as e,C as l,l as s,a6 as z,aC as M,h as _,J as b,M as P}from"./index.js";import{o as R,C as S}from"./ChildGoodEditModal.14a346.js";import{u as q}from"./useDetail.42fb2b43.js";import{B as O}from"./basic-descriptions.2bd5636f.js";import $ from"./index.f86972.js";import"./status.915de772.js";import"./index.384d251b.js";const H={class:"padding__container"},J={class:"w-full flex justify-between"},L={class:"flex w-full justify-end"},K=A({__name:"detail",setup(Q){const{title:E,collapses:m}=q({baseName:"\u51FA\u5165\u5E93",collapseLen:2}),c=v(!1),d=G({editVisible:!1,index:-1,data:{}}),F=v(null),a=v({goods:[],month:""}),D={goods:[{required:!0,message:"\u8BF7\u9009\u62E9\u64CD\u4F5C\u5546\u54C1"}],month:[{required:!0,message:"\u8BF7\u9009\u62E9\u5165\u8D26\u6708\u4EFD"}]},B=i=>{const o=new Date;return i.getTime()>o.setHours(0,0,0,0)};function g(i){const o=a.value.goods.map(({id:t})=>t),r=[];i.forEach(t=>{o.includes(t.id)||r.push(t)}),a.value.goods=[...r,...a.value.goods]}function k(i){d.index=i,d.editVisible=!0,d.data={...a.value.goods[i]}}async function h(){try{await F.value.validate()}catch{}}return(i,o)=>{const r=n("ElCollapseItem"),t=n("ElTableColumn"),p=n("ElButton"),f=n("ElTooltip"),y=n("ElTable"),w=n("ElFormItem"),T=n("ElDatePicker"),V=n("ElCollapse"),x=n("ElTabPane"),N=n("ElTabs");return U(),j("div",H,[e(N,null,{default:l(()=>[e(x,{label:s(E)},{default:l(()=>[e(V,{modelValue:s(m),"onUpdate:modelValue":o[2]||(o[2]=u=>z(m)?m.value=u:null)},{default:l(()=>[e(r,{title:s(E),name:"1"},{default:l(()=>[e(s(O),{columns:s(R),data:{}},null,8,["columns"])]),_:1},8,["title"]),e(r,{title:"\u51FA\u5165\u5E93\u4FE1\u606F\u786E\u8BA4",name:"2"},{default:l(()=>[e(s(M),{ref_key:"formRef",ref:F,rules:D,model:a.value},{default:l(()=>[e(w,{label:"\u64CD\u4F5C\u5546\u54C1",prop:"goods"},{default:l(()=>[e(y,{border:"",size:"small",data:a.value.goods},{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:"\u64CD\u4F5C\u6570\u91CF",prop:"goodNum","show-overflow-tooltip":""}),e(t,{label:"\u5B50\u5546\u54C1\u7F16\u53F7",prop:"skuCode","show-overflow-tooltip":""}),e(t,{label:"\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u8BC6\u522B\u53F7",width:"140px",prop:"seller_code","show-overflow-tooltip":""}),e(t,{label:"\u5B50\u5546\u54C1\u6BD4\u4F8B",prop:"goodNum","show-overflow-tooltip":""}),e(t,{label:"\u5B50\u5546\u54C1\u64CD\u4F5C\u6570\u91CF",prop:"goodNum","show-overflow-tooltip":""}),e(t,{width:"70px",label:"\u64CD\u4F5C"},{header:l(()=>[_("div",J,[o[6]||(o[6]=_("span",null,"\u64CD\u4F5C",-1)),e(f,{content:"\u6DFB\u52A0",placement:"top"},{default:l(()=>[e(p,{link:"",size:"small",type:"primary",icon:s(b)("add"),onClick:o[0]||(o[0]=u=>c.value=!0)},null,8,["icon"])]),_:1})])]),default:l(({$index:u})=>[e(f,{content:"\u7F16\u8F91",placement:"top"},{default:l(()=>[e(p,{icon:s(b)("edits"),type:"primary",size:"small",link:"",onClick:C=>k(u)},null,8,["icon","onClick"])]),_:2},1024),e(f,{content:"\u5220\u9664",placement:"top"},{default:l(()=>[e(p,{icon:s(b)("delete"),type:"danger",size:"small",link:"",onClick:C=>a.value.goods.splice(u,1)},null,8,["icon","onClick"])]),_:2},1024)]),_:1})]),_:1},8,["data"])]),_:1}),e(w,{label:"\u5165\u8D26\u6708\u4EFD",prop:"month"},{default:l(()=>[e(T,{modelValue:a.value.month,"onUpdate:modelValue":o[1]||(o[1]=u=>a.value.month=u),type:"month",placeholder:"\u5165\u8D26\u6708\u4EFD",disabledDate:B},null,8,["modelValue"])]),_:1})]),_:1},8,["model"]),_("div",L,[e(p,{type:"primary",onClick:h},{default:l(()=>o[7]||(o[7]=[P("\u4FDD\u5B58")])),_:1})])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1}),e($,{visible:c.value,"onUpdate:visible":o[3]||(o[3]=u=>c.value=u),onSubmit:g},null,8,["visible"]),e(S,{data:d.data,index:d.index,visible:d.editVisible,"onUpdate:visible":o[4]||(o[4]=u=>d.editVisible=u),onSubmit:o[5]||(o[5]=(u,C)=>a.value.goods[u]={...C})},null,8,["data","index","visible"])])}}});var te=I(K,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/inOutManager/detail.vue"]]);export{te as default};
|