import{al as B,aS as x,aT as L,_ as G,d as I,w as C,aP as k,m as M,r as f,aC as U,H as v,u as E,o as _,c as j,l as s,C as n,G as b,a as z,M as D,L as g}from"./index.1d1a5ecb.js";import{d as H,f as J}from"./index.9d08ee5b.js";import{B as O}from"./basic-descriptions.1879b0f8.js";import{c as S}from"./tootip.76f6bcc3.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(e,{isZx:u,is_stock:t}){return B(x,null,{default:()=>{var p;return Number(u)==1?"\u53CD\u9988\u5546\u54C1":((p=Q.find(({value:i})=>i===String(t)))==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:(e,{companyNo:u})=>S(e,"\u4E1A\u52A1\u516C\u53F8\u7F16\u7801 : "+u,270),span:12},{field:"supplierName",label:"\u4F9B\u5E94\u5546\u540D\u79F0",render:(e,{supplierNo:u})=>S(e,"\u4F9B\u5E94\u5546\u7F16\u7801 : "+u,270),span:12},{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(e){return B(x,null,{default:()=>{var u;return(u=K.find(t=>t.value===String(e)))==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(e){return e.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=I({__name:"detail",setup(e){const u=C([]),t=C({}),p=C(["1","2"]),i=k(!1),F=k(!1),y=M();async function N(){F.value=!0;try{const l=await H({spuCode:y.query.spuCode});t.value=l.data}catch{}finally{F.value=!1}}async function V(){i.value=!0;try{const l=await J({spuCode:y.query.spuCode});u.value=l.data}catch{}finally{i.value=!1}}async function T(){N(),V()}const A={1:"\u662F",0:"\u5426"},h={1:"\u514D\u7A0E",2:"\u4E0D\u5F81\u7A0E",3:"\u96F6\u7A0E\u7387"};function w({field:l,before:r,after:d},a=!1){switch(l){case"\u662F\u5426\u6709\u4F18\u60E0\u653F\u7B56":return a?A[r]:A[d];case"\u7A0E\u7387\u6807\u8BC6":return a?h[r]:h[d];default:return a?r:d}}return T(),(l,r)=>{const d=f("el-collapse-item"),a=f("el-table-column"),q=f("el-table"),R=f("el-collapse"),m=U("loading");return v((_(),j("div",X,[s(R,{modelValue:p.value,"onUpdate:modelValue":r[0]||(r[0]=o=>p.value=o)},{default:n(()=>[v((_(),b(d,{title:"\u5546\u54C1\u8BE6\u60C5",name:"1"},{default:n(()=>[JSON.stringify(t.value)!=="{}"?(_(),b(E(O),{key:0,data:t.value,columns:E(W),"label-width":"130px","col-number":2},null,8,["data","columns"])):z("v-if",!0)]),_:1})),[[m,E(F)]]),v((_(),b(d,{title:"\u5546\u54C1\u4FEE\u6539\u8BB0\u5F55",name:"2"},{default:n(()=>[s(q,{border:"",size:"small",data:u.value},{default:n(()=>[s(a,{label:"\u4FEE\u6539\u5B57\u6BB5",prop:"field"},{default:n(o=>[D(g(o.row.field||"\u7C7B\u76EE\u7F16\u53F7"),1)]),_:1}),s(a,{label:"\u4FEE\u6539\u524D",prop:"before"},{default:n(o=>[D(g(w(o.row,!0)),1)]),_:1}),s(a,{label:"\u4FEE\u6539\u540E",prop:"after"},{default:n(o=>[D(g(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 lu=G(Y,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSaleSettings/modifyRecord/detail.vue"]]);export{lu as default};
