1 |
- import{_ as Z,d as ee,w as _,aX as P,a4 as oe,W as ae,a7 as le,r as E,at as te,H as M,l as e,o as f,c as U,j as o,C as l,aI as ue,ah as se,aJ as h,G as b,a as v,aM as R,aN as r,a$ as D,aR as g,J as y,aK as ie,h as V,M as ne,az as z}from"./index.js";import{o as de,i as re,a as me,C as pe}from"./ChildGoodEditModal.4f2a2c.js";import{u as ce}from"./useDetail.6122bd7e.js";import{B as S}from"./basic-descriptions.fb5b2628.js";import fe from"./index.aeacb5.js";import{h as $,b as ve}from"./index.00d6e041.js";import{a as Ce}from"./index.01c9e0ad.js";import{P as _e}from"./index.342a478c.js";import{S as be}from"./index.2e8788c0.js";import"./status.4e0ebdbc.js";import"./shared.3ff0a9a1.js";import"./tootip.b8a37fe7.js";import"./shared.9d577e31.js";import"./use-page-search.0088a7fd.js";import"./columns.f01d8bd1.js";const he={class:"padding__container"},ge={class:"w-full flex justify-between"},we={class:"flex w-full justify-end"},Fe=ee({__name:"detail",setup(Ee){const{title:x,collapses:k,id:w}=ce({baseName:"\u51FA\u5E93",collapseLen:5}),B=_(!1),N=_(!1),A=_(0),F=P(),s=P(),{isSuperUser:j}=oe(),C=ae({editVisible:!1,index:-1,data:{}}),I=_(!1),T=_(null),q=le(()=>s.data?s.data.type=="2"?{basic_status:"1"}:{basic_status:"2"}:{}),u=_({goods:[],month:""}),J={goods:[{required:!0,message:"\u8BF7\u9009\u62E9\u64CD\u4F5C\u5546\u54C1"}],month:[{required:!0,message:"\u8BF7\u9009\u62E9\u5165\u8D26\u6708\u4EFD"}]};function O(t){const a=u.value.goods.map(({id:d})=>d),i=[];t.forEach(d=>{a.includes(d.id)||i.push(d)}),u.value.goods=[...i,...u.value.goods]}function H(t){C.index=t,C.editVisible=!0,C.data={...u.value.goods[t]}}function K(t,a){let i=Array.isArray(t)?t.length:0;if(i>0){let d=0,m=t[0][a],p=[1];for(let c=1;c<i;c++)t[c][a]==m?(p[d]+=1,p[c]=0):(d=c,p[c]=1,m=t[c][a]);return p}else return[0]}function L({row:t,column:a,rowIndex:i,columnIndex:d}){if([0,1,2,7].includes(Number(d)))return{rowspan:K(u.value.goods,"id")[i],colspan:1}}async function W(){try{await T.value.validate();const t=u.value.goods.map(({id:p,goodNum:c})=>({id:p,num:c})),a=[],i={};for(const p of t)i[p.id]||(a.push(p),i[p.id]=!0);I.value=!0;const{code:d,message:m}=await ve({relaArr:a,manager_id:w.value});I.value=!1,d==0?(z.success("\u64CD\u4F5C\u5B8C\u6210"),s.run($({id:w.value}))):z.warning(m)}catch{}}function X(t,a){const{id:i}=u.value.goods[t];u.value.goods.forEach((d,m)=>{d.id===i&&(u.value.goods[m].goodNum=a.goodNum,u.value.goods[m].childNum&&(u.value.goods[m].childActionNum=u.value.goods[m].childNum*a.goodNum))})}function Q(t,a){N.value=!0,A.value=a,F.run(Ce({id:t}))}function Y(t){const{id:a}=u.value.goods[t];u.value.goods=u.value.goods.filter(i=>i.id!==a)}return w.value&&s.run($({id:w.value})),(t,a)=>{const i=E("ElFormItem"),d=E("ElTabPane"),m=E("ElTabs"),p=E("ElDialog"),c=te("loading");return M((f(),U("div",he,[o(m,null,{default:l(()=>[o(d,{label:e(x)},{default:l(()=>[o(e(ue),{modelValue:e(k),"onUpdate:modelValue":a[2]||(a[2]=n=>se(k)?k.value=n:null)},{default:l(()=>[o(e(h),{title:e(x),name:"1"},{default:l(()=>[e(s).data?(f(),b(e(S),{key:0,columns:e(de),data:e(s).data},null,8,["columns","data"])):v("v-if",!0)]),_:1},8,["title"]),v(" importInvoiceGoodColumns "),o(e(h),{title:"\u8BA2\u5355\u8BE6\u60C5",name:"2"},{default:l(()=>[e(s).data?(f(),b(e(S),{key:0,columns:e(re),data:e(s).data},null,8,["columns","data"])):v("v-if",!0)]),_:1}),o(e(h),{title:"\u53D1\u7968\u8BE6\u60C5",name:"3"},{default:l(()=>[e(s).data?(f(),b(e(S),{key:0,columns:e(me),data:e(s).data},null,8,["columns","data"])):v("v-if",!0)]),_:1}),e(s).data?(f(),b(e(h),{key:0,title:"\u5546\u54C1\u4FE1\u606F",name:"4"},{default:l(()=>[o(e(R),{size:"small",border:"",data:e(s).data.ProductRela},{default:l(()=>[o(e(r),{label:"\u5546\u54C1ID",prop:"product_id","show-overflow-tooltip":""}),o(e(r),{label:"\u5546\u54C1\u7F16\u53F7",prop:"skuCode","show-overflow-tooltip":""}),o(e(r),{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName","show-overflow-tooltip":""}),o(e(r),{label:"\u64CD\u4F5C\u6570\u91CF",prop:"num","show-overflow-tooltip":""}),o(e(r),{label:"\u64CD\u4F5C",width:"100px"},{default:l(n=>[o(e(D),{content:"\u67E5\u770B\u8BE6\u60C5"},{default:l(()=>[o(e(g),{type:"primary",link:"",icon:e(y)("eye-view"),onClick:G=>Q(n.row.product_id,n.$index)},null,8,["icon","onClick"])]),_:2},1024)]),_:1})]),_:1},8,["data"])]),_:1})):v("v-if",!0),!e(j)&&e(s).data&&e(s).data.status=="1"?(f(),b(e(h),{key:1,title:"\u51FA\u5165\u5E93\u4FE1\u606F\u786E\u8BA4",name:"5"},{default:l(()=>[o(e(ie),{ref_key:"formRef",ref:T,rules:J,model:u.value},{default:l(()=>[o(i,{label:"\u64CD\u4F5C\u5546\u54C1",prop:"goods"},{default:l(()=>[o(e(R),{"span-method":L,border:"",size:"small",data:u.value.goods},{default:l(()=>[o(e(r),{label:"\u5546\u54C1\u7F16\u53F7",prop:"skuCode","show-overflow-tooltip":""}),o(e(r),{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName","show-overflow-tooltip":""}),o(e(r),{label:"\u64CD\u4F5C\u6570\u91CF",prop:"goodNum","show-overflow-tooltip":""}),o(e(r),{label:"\u5B50\u5546\u54C1\u7F16\u53F7",prop:"childCode","show-overflow-tooltip":""}),o(e(r),{label:"\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u8BC6\u522B\u53F7",width:"140px",prop:"seller_code","show-overflow-tooltip":""}),o(e(r),{label:"\u5B50\u5546\u54C1\u6BD4\u4F8B",prop:"childNum","show-overflow-tooltip":""}),o(e(r),{label:"\u5B50\u5546\u54C1\u64CD\u4F5C\u6570\u91CF",prop:"childActionNum","show-overflow-tooltip":""}),o(e(r),{width:"70px",label:"\u64CD\u4F5C"},{header:l(()=>[V("div",ge,[a[6]||(a[6]=V("span",null,"\u64CD\u4F5C",-1)),o(e(D),{content:"\u6DFB\u52A0",placement:"top"},{default:l(()=>[o(e(g),{link:"",size:"small",type:"primary",icon:e(y)("add"),onClick:a[0]||(a[0]=n=>B.value=!0)},null,8,["icon"])]),_:1})])]),default:l(({$index:n})=>[o(e(D),{content:"\u7F16\u8F91",placement:"top"},{default:l(()=>[o(e(g),{icon:e(y)("edits"),type:"primary",size:"small",link:"",onClick:G=>H(n)},null,8,["icon","onClick"])]),_:2},1024),o(e(D),{content:"\u5220\u9664",placement:"top"},{default:l(()=>[o(e(g),{icon:e(y)("delete"),type:"danger",size:"small",link:"",onClick:G=>Y(n)},null,8,["icon","onClick"])]),_:2},1024)]),_:1})]),_:1},8,["data"])]),_:1}),o(i,{label:"\u5165\u8D26\u6708\u4EFD",prop:"month"},{default:l(()=>[v(' :company_code="detailTask.data.buyer_code" '),o(be,{modelValue:u.value.month,"onUpdate:modelValue":a[1]||(a[1]=n=>u.value.month=n),placeholder:"\u5165\u8D26\u6708\u4EFD",company_code:e(s).data.buyer_code},null,8,["modelValue","company_code"])]),_:1})]),_:1},8,["model"]),V("div",we,[o(e(g),{type:"primary",onClick:W},{default:l(()=>a[7]||(a[7]=[ne("\u4FDD\u5B58")])),_:1})])]),_:1})):v("v-if",!0)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1}),o(fe,{visible:B.value,"onUpdate:visible":a[3]||(a[3]=n=>B.value=n),otherSearchParameter:q.value,onSubmit:O},null,8,["visible","otherSearchParameter"]),o(pe,{data:C.data,index:C.index,visible:C.editVisible,"onUpdate:visible":a[4]||(a[4]=n=>C.editVisible=n),onSubmit:X},null,8,["data","index","visible"]),o(p,{center:"",title:"\u5546\u54C1\u8BE6\u60C5",modelValue:N.value,"onUpdate:modelValue":a[5]||(a[5]=n=>N.value=n),style:{overflow:"hidden"}},{default:l(()=>[M((f(),U("div",null,[e(F).data?(f(),b(_e,{key:0,data:e(F).data,num:e(s).data.ProductRela[A.value].num},null,8,["data","num"])):v("v-if",!0)])),[[c,e(F).loading]])]),_:1},8,["modelValue"])])),[[c,e(s).loading]])}}});var Re=Z(Fe,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/outManager/detail.vue"]]);export{Re as default};
|