import{_ as S,d as U,w as _,aW as F,W as j,a5 as L,r,ar as M,H as B,l as o,o as m,c as x,j as t,C as u,G as C,aL as p,J as W,a as V,af as $}from"./index.js";import{o as z}from"./columns.d86b21e1.js";import{u as H}from"./useDetail.9b72801b.js";import{B as J}from"./basic-descriptions.65a76ad2.js";import O from"./index.64c3fd.js";import q from"./ChildGoodEditModal.d0c9e8.js";import{h as K}from"./index.f05cfa47.js";import Q from"./index.31cbbd.js";import{h as X}from"./index.0bffb9a0.js";import{P as Y}from"./index.e2551c7f.js";import"./status.b7512d56.js";import"./shared.a743a5f7.js";import"./tootip.236f17fc.js";import"./use-page-search.15129a46.js";import"./index.d2fead55.js";import"./columns.6ae6573b.js";import"./columnRenderHelper.c38ed50d.js";import"./index.f63c5f.js";import"./index.9de4df99.js";import"./index.4da7e22a.js";import"./calc.850c7422.js";const Z={class:"padding__container"},oo=U({__name:"detail",setup(eo){const{title:N,collapses:b,id:D,isDetail:y}=H({baseName:"C\u7AEF\u65E0\u53D1\u7968\u8BA2\u5355\u51FA\u5E93",collapseLen:2}),g=_(!1),i=F(),E=_(!1),h=_(0),c=F(),v=j({editVisible:!1,index:-1,data:{}}),P=L(()=>({status:"1,4"})),s=_({goods:[],month:""});function T(n){const e=s.value.goods.map(({id:a})=>a),d=n.filter(a=>!e.includes(a.id));s.value.goods=[...d,...s.value.goods]}function G(n,e){const{id:d}=s.value.goods[n];s.value.goods=s.value.goods.map(a=>{if(a.id===d){const f=e.goodNum,w=a.childNum?Number(a.childNum)*Number(f):void 0;return{...a,goodNum:f,childActionNum:w}}return a})}function I(n,e){E.value=!0,h.value=e,c.run(X({id:n}))}return D.value&&i.run(K({id:D.value})),(n,e)=>{const d=r("ElCollapseItem"),a=r("ElButton"),f=r("ElTooltip"),w=r("ElTable"),A=r("ElCollapse"),R=r("ElDialog"),k=M("loading");return B((m(),x("div",Z,[t(A,{modelValue:o(b),"onUpdate:modelValue":e[0]||(e[0]=l=>$(b)?b.value=l:null)},{default:u(()=>[t(d,{title:o(N),name:"1"},{default:u(()=>[o(y)&&o(i).data?(m(),C(o(J),{key:0,columns:o(z)(()=>{}),data:o(i).data},null,8,["columns","data"])):(m(),C(Q,{key:1}))]),_:1},8,["title"]),o(i).data&&o(i).data.status!="1"?(m(),C(d,{key:0,title:"\u5546\u54C1\u4FE1\u606F",name:"2"},{default:u(()=>[t(w,{size:"small",border:"",data:o(i).data.ProductRela},{default:u(()=>[t(o(p),{label:"\u5546\u54C1ID",prop:"product_id",width:"60px","show-overflow-tooltip":""}),t(o(p),{label:"\u5546\u54C1\u7F16\u53F7",prop:"skuCode","show-overflow-tooltip":""}),t(o(p),{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName","show-overflow-tooltip":""}),t(o(p),{label:"\u64CD\u4F5C\u6570\u91CF",prop:"num","show-overflow-tooltip":""}),t(o(p),{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),t(o(p),{label:"\u64CD\u4F5C",width:"100px"},{default:u(l=>[t(f,{content:"\u67E5\u770B\u8BE6\u60C5"},{default:u(()=>[t(a,{type:"primary",link:"",icon:o(W)("eye-view"),onClick:to=>I(l.row.product_id,l.$index)},null,8,["icon","onClick"])]),_:2},1024)]),_:1})]),_:1},8,["data"])]),_:1})):V("v-if",!0)]),_:1},8,["modelValue"]),t(O,{otherSearchParameter:P.value,visible:g.value,"onUpdate:visible":e[1]||(e[1]=l=>g.value=l),onSubmit:T},null,8,["otherSearchParameter","visible"]),t(q,{visible:v.editVisible,"onUpdate:visible":e[2]||(e[2]=l=>v.editVisible=l),onSubmit:G,index:v.index,data:v.data},null,8,["visible","index","data"]),t(R,{center:"",title:"\u5546\u54C1\u8BE6\u60C5",modelValue:E.value,"onUpdate:modelValue":e[3]||(e[3]=l=>E.value=l),style:{overflow:"hidden"}},{default:u(()=>[B((m(),x("div",null,[o(c).data?(m(),C(Y,{key:0,data:o(c).data,num:o(i).data.ProductRela[h.value].num,name:o(i).data.ProductRela[h.value].apply_name},null,8,["data","num","name"])):V("v-if",!0)])),[[k,o(c).loading]])]),_:1},8,["modelValue"])])),[[k,o(i).loading]])}}});var Fo=S(oo,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/clientC/detail.vue"]]);export{Fo as default};
