import{_ as U,d as R,w as f,aY as k,W as S,r as u,at as j,H as F,l as e,o as m,c as B,j as l,C as s,G as _,J as M,a as x,ah as $}from"./index.js";import{o as z,C as H}from"./ChildGoodEditModal.8fb53d.js";import{u as J}from"./useDetail.6440d60b.js";import{B as L}from"./basic-descriptions.1a629879.js";import O from"./index.563420.js";import{h as W}from"./index.b0107100.js";import Y from"./index.44ffc8.js";import{h as q}from"./index.df9c5952.js";import{P as K}from"./index.859f1703.js";import"./status.0f771e9a.js";import"./shared.e62a6d9e.js";import"./tootip.51743c5b.js";import"./use-page-search.09da52b8.js";import"./index.6a0f4b7c.js";import"./index.656b8f.js";import"./index.7cda3ff0.js";import"./columnRenderHelper.ece2dbdf.js";import"./index.32267a48.js";import"./columns.e82121ef.js";const Q={class:"padding__container"},X=R({__name:"detail",setup(Z){const{title:V,collapses:C,id:w,isDetail:N}=J({baseName:"C\u7AEF\u65E0\u53D1\u7968\u8BA2\u5355\u51FA\u5E93",collapseLen:2}),h=f(!1),i=k(),b=f(!1),D=f(0),p=k(),c=S({editVisible:!1,index:-1,data:{}}),n=f({goods:[],month:""});function y(d){const t=n.value.goods.map(({id:o})=>o),r=d.filter(o=>!t.includes(o.id));n.value.goods=[...r,...n.value.goods]}function T(d,t){const{id:r}=n.value.goods[d];n.value.goods=n.value.goods.map(o=>{if(o.id===r){const v=t.goodNum,E=o.childNum?Number(o.childNum)*Number(v):void 0;return{...o,goodNum:v,childActionNum:E}}return o})}function G(d,t){b.value=!0,D.value=t,p.run(q({id:d}))}return w.value&&i.run(W({id:w.value})),(d,t)=>{const r=u("ElCollapseItem"),o=u("ElTableColumn"),v=u("ElButton"),E=u("ElTooltip"),I=u("ElTable"),A=u("ElCollapse"),P=u("ElDialog"),g=j("loading");return F((m(),B("div",Q,[l(A,{modelValue:e(C),"onUpdate:modelValue":t[0]||(t[0]=a=>$(C)?C.value=a:null)},{default:s(()=>[l(r,{title:e(V),name:"1"},{default:s(()=>[e(N)&&e(i).data?(m(),_(e(L),{key:0,columns:e(z),data:e(i).data},null,8,["columns","data"])):(m(),_(Y,{key:1}))]),_:1},8,["title"]),e(i).data&&e(i).data.status!="1"?(m(),_(r,{key:0,title:"\u5546\u54C1\u4FE1\u606F",name:"2"},{default:s(()=>[l(I,{size:"small",border:"",data:e(i).data.ProductRela},{default:s(()=>[l(o,{label:"\u5546\u54C1ID",prop:"product_id",width:"60px","show-overflow-tooltip":""}),l(o,{label:"\u5546\u54C1\u7F16\u53F7",prop:"skuCode","show-overflow-tooltip":""}),l(o,{label:"\u5546\u54C1\u540D\u79F0",prop:"goodName","show-overflow-tooltip":""}),l(o,{label:"\u64CD\u4F5C\u6570\u91CF",prop:"num","show-overflow-tooltip":""}),l(o,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),l(o,{label:"\u64CD\u4F5C",width:"100px"},{default:s(a=>[l(E,{content:"\u67E5\u770B\u8BE6\u60C5"},{default:s(()=>[l(v,{type:"primary",link:"",icon:e(M)("eye-view"),onClick:oo=>G(a.row.product_id,a.$index)},null,8,["icon","onClick"])]),_:2},1024)]),_:1})]),_:1},8,["data"])]),_:1})):x("v-if",!0)]),_:1},8,["modelValue"]),l(O,{visible:h.value,"onUpdate:visible":t[1]||(t[1]=a=>h.value=a),onSubmit:y},null,8,["visible"]),l(H,{visible:c.editVisible,"onUpdate:visible":t[2]||(t[2]=a=>c.editVisible=a),data:c.data,index:c.index,onSubmit:T},null,8,["visible","data","index"]),l(P,{center:"",title:"\u5546\u54C1\u8BE6\u60C5",modelValue:b.value,"onUpdate:modelValue":t[3]||(t[3]=a=>b.value=a),style:{overflow:"hidden"}},{default:s(()=>[F((m(),B("div",null,[e(p).data?(m(),_(K,{key:0,data:e(p).data,num:e(i).data.ProductRela[D.value].num},null,8,["data","num"])):x("v-if",!0)])),[[g,e(p).loading]])]),_:1},8,["modelValue"])])),[[g,e(i).loading]])}}});var ho=U(X,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/clientC/detail.vue"]]);export{ho as default};
