import{am as B,aR as k,aT as v,aS as L,_ as M,d as G,x as b,aP as N,n as I,r as _,aD as U,H as C,m as E,o as F,c as j,l as s,D as n,G as D,aN as z,a as H,M as g,L as y}from"./index.js";import{c as J,e as O}from"./index.24943c38.js";import{v as P,r as c}from"./verification.611d3025.js";const K=[{value:"0",label:"\u5F85\u91C7\u8D2D\u8BBE\u7F6E"},{value:"1",label:"\u5F85\u8D22\u52A1\u8BBE\u7F6E"},{value:"2",label:"\u5DF2\u8BBE\u7F6E\u5B8C\u6210"}],Q=[{value:"0",label:"\u975E\u5E93\u5B58\u5546\u54C1"},{value:"1",label:"\u5E93\u5B58\u5546\u54C1"}];P(c("tax","\u8BF7\u9009\u62E9\u7A0E\u7387"),c("cat_code","\u8BF7\u9009\u62E9\u7C7B\u76EE"),c("inv_tag","\u8BF7\u9009\u62E9\u7A0E\u7387\u6807\u8BC6"),c("addTax","\u8BF7\u9009\u62E9\u589E\u503C\u7A0E\u7BA1\u7406\u5185\u5BB9"),c("inv_good_name","\u8BF7\u9009\u62E9\u5546\u54C1\u540D\u79F0"),c("is_discount","\u8BF7\u9009\u62E9\u662F\u5426\u5305\u542B\u4F18\u60E0\u653F\u7B56"));const W=[{field:"spuCode",span:6,label:"\u5546\u54C1\u7F16\u7801"},{field:"good_name",span:18,label:"\u5546\u54C1\u540D\u79F0"},{field:"is_stock",label:"\u5546\u54C1\u7C7B\u578B",span:6,render(l,{isZx:u,is_stock:e}){return B(k,null,{default:()=>{var p;return Number(u)==1?"\u53CD\u9988\u5546\u54C1":((p=Q.find(({value:i})=>i===String(e)))==null?void 0:p.label)||"--"}})}},{field:"inv_good_name",span:18,label:"\u5F00\u7968\u5546\u54C1\u540D\u79F0"},{field:"companyName",label:"\u4E1A\u52A1\u516C\u53F8\u540D\u79F0",render:(l,{companyNo:u,companyName:e})=>v(e,"\u4E1A\u52A1\u516C\u53F8\u7F16\u7801 : "+u,270),span:8},{field:"supplierName",label:"\u4F9B\u5E94\u5546\u540D\u79F0",render:(l,{supplierNo:u,supplierName:e})=>v(e,"\u4F9B\u5E94\u5546\u7F16\u7801 : "+u,270),span:8},{label:"\u6E90\u5934\u4F9B\u5E94\u5546",render:(l,{cgd_supplierNo:u,cgd_supplierName:e})=>v(e,"\u4F9B\u5E94\u5546\u7F16\u7801 : "+u,270),span:8},{field:"cat_name",span:12,label:"\u5206\u7C7B\u540D\u79F0"},{field:"unit_name",label:"\u5355\u4F4D\u540D\u79F0"},{field:"status",label:"\u662F\u5426\u8BBE\u7F6E\u5F00\u7968\u7C7B\u76EE",render(l){return B(k,null,{default:()=>{var u;return(u=K.find(e=>e.value===String(l)))==null?void 0:u.label}})}},{field:"inv_cat_name",label:"\u7C7B\u76EE\u540D\u79F0",span:12},{field:"inv_cat_code",label:"\u7C7B\u76EE\u7F16\u7801"},{field:"inv_tax",label:"\u7C7B\u76EE\u7A0E\u7387\u989D"},{field:"good_img",label:"\u5546\u54C1\u56FE",span:12,render(l){return l.split(",").map(u=>B(L,{src:u,previewSrcList:[u],style:{height:"20px",marginRight:"5px"}}))}},{field:"creater",label:"\u521B\u5EFA\u4EBA"},{field:"addtime",label:"\u7533\u8BF7\u65F6\u95F4"},{field:"after_sales",span:24,label:"\u552E\u540E\u8BF4\u660E"},{field:"craft_desc",span:24,label:"\u5DE5\u827A\u8BF4\u660E"}],X={style:{padding:"10px","background-color":"#fff"}},Y=G({__name:"detail",setup(l){const u=b([]),e=b({}),p=b(["1","2"]),i=N(!1),f=N(!1),A=I();async function S(){f.value=!0;try{const t=await J({spuCode:A.query.spuCode});e.value=t.data}catch{}finally{f.value=!1}}async function V(){i.value=!0;try{const t=await O({spuCode:A.query.spuCode});u.value=t.data}catch{}finally{i.value=!1}}async function R(){S(),V()}const h={1:"\u662F",0:"\u5426"},x={1:"\u514D\u7A0E",2:"\u4E0D\u5F81\u7A0E",3:"\u96F6\u7A0E\u7387"};function w({field:t,before:r,after:d},a=!1){switch(t){case"\u662F\u5426\u6709\u4F18\u60E0\u653F\u7B56":return a?h[r]:h[d];case"\u7A0E\u7387\u6807\u8BC6":return a?x[r]:x[d];default:return a?r:d}}return R(),(t,r)=>{const d=_("el-collapse-item"),a=_("el-table-column"),T=_("el-table"),q=_("el-collapse"),m=U("loading");return C((F(),j("div",X,[s(q,{modelValue:p.value,"onUpdate:modelValue":r[0]||(r[0]=o=>p.value=o)},{default:n(()=>[C((F(),D(d,{title:"\u5546\u54C1\u8BE6\u60C5",name:"1"},{default:n(()=>[JSON.stringify(e.value)!=="{}"?(F(),D(E(z),{key:0,data:e.value,columns:E(W),"label-width":"130px","col-number":2},null,8,["data","columns"])):H("v-if",!0)]),_:1})),[[m,E(f)]]),C((F(),D(d,{title:"\u5546\u54C1\u4FEE\u6539\u8BB0\u5F55",name:"2"},{default:n(()=>[s(T,{border:"",size:"small",data:u.value},{default:n(()=>[s(a,{label:"\u4FEE\u6539\u5B57\u6BB5",prop:"field"},{default:n(o=>[g(y(o.row.field||"\u7C7B\u76EE\u7F16\u53F7"),1)]),_:1}),s(a,{label:"\u4FEE\u6539\u524D",prop:"before"},{default:n(o=>[g(y(w(o.row,!0)),1)]),_:1}),s(a,{label:"\u4FEE\u6539\u540E",prop:"after"},{default:n(o=>[g(y(w(o.row,!1)),1)]),_:1}),s(a,{label:"\u4FEE\u6539\u4EBA",prop:"apply_name"}),s(a,{label:"\u4FEE\u6539\u65F6\u95F4",prop:"addtime"})]),_:1},8,["data"])]),_:1})),[[m,E(i)]])]),_:1},8,["modelValue"])])),[[m,E(i)]])}}});var eu=M(Y,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supplyInvoiceSaleSettings/supplyModifyRecord/detail.vue"]]);export{eu as default};