import{af as m,ce as w,cg as x,cf as L,_ as j,d as G,n as B,cc as k,j as I,r as p,aw as M,B as v,o as f,c as Y,h as n,y as s,A as b,i as N,ca as z,a as H,H as C,G as D}from"./index.js";import{c as J,e as K}from"./index.49bb9470.js";import{v as O,r as c}from"./verification.611d3025.js";const U=[{value:"0",label:"\u5F85\u91C7\u8D2D\u8BBE\u7F6E"},{value:"1",label:"\u5F85\u8D22\u52A1\u8BBE\u7F6E"},{value:"2",label:"\u5DF2\u8BBE\u7F6E\u5B8C\u6210"}],P=[{value:"0",label:"\u975E\u5E93\u5B58\u5546\u54C1"},{value:"1",label:"\u5E93\u5B58\u5546\u54C1"}];O(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 Q=[{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 m(w,null,{default:()=>{var E;return Number(u)==1?"\u53CD\u9988\u5546\u54C1":((E=P.find(({value:i})=>i===String(t)))==null?void 0:E.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})=>x(e,"\u4E1A\u52A1\u516C\u53F8\u7F16\u7801 : "+u,270),span:12},{field:"supplierName",label:"\u4F9B\u5E94\u5546\u540D\u79F0",render:(e,{supplierNo:u})=>x(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 m(w,null,{default:()=>{var u;return(u=U.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=>m(L,{src:u,previewSrcList:[u],style:{height:"20px",marginRight:"5px"},"text-key":"91110113MA028K5Y7Y"}))}},{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"}],W={style:{padding:"10px","background-color":"#fff"}},X=G({__name:"detail",setup(e){const u=B([]),t=B({}),E=B(["1","2"]),i=k(!1),_=k(!1),g=I();async function S(){_.value=!0;try{const l=await J({spuCode:g.query.spuCode});t.value=l.data}catch{}finally{_.value=!1}}async function V(){i.value=!0;try{const l=await K({spuCode:g.query.spuCode});u.value=l.data}catch{}finally{i.value=!1}}async function q(){S(),V()}const y={1:"\u662F",0:"\u5426"},A={1:"\u514D\u7A0E",2:"\u4E0D\u5F81\u7A0E",3:"\u96F6\u7A0E\u7387"};function h({field:l,before:d,after:r},a=!1){switch(l){case"\u662F\u5426\u6709\u4F18\u60E0\u653F\u7B56":return a?y[d]:y[r];case"\u7A0E\u7387\u6807\u8BC6":return a?A[d]:A[r];default:return a?d:r}}return q(),(l,d)=>{const r=p("el-collapse-item"),a=p("el-table-column"),R=p("el-table"),T=p("el-collapse"),F=M("loading");return v((f(),Y("div",W,[n(T,{modelValue:E.value,"onUpdate:modelValue":d[0]||(d[0]=o=>E.value=o)},{default:s(()=>[v((f(),b(r,{title:"\u5546\u54C1\u8BE6\u60C5",name:"1"},{default:s(()=>[JSON.stringify(t.value)!=="{}"?(f(),b(N(z),{key:0,data:t.value,columns:N(Q),"label-width":"130px","col-number":2},null,8,["data","columns"])):H("v-if",!0)]),_:1})),[[F,_.value]]),v((f(),b(r,{title:"\u5546\u54C1\u4FEE\u6539\u8BB0\u5F55",name:"2"},{default:s(()=>[n(R,{border:"",size:"small",data:u.value},{default:s(()=>[n(a,{label:"\u4FEE\u6539\u5B57\u6BB5",prop:"field"},{default:s(o=>[C(D(o.row.field||"\u7C7B\u76EE\u7F16\u53F7"),1)]),_:1}),n(a,{label:"\u4FEE\u6539\u524D",prop:"before"},{default:s(o=>[C(D(h(o.row,!0)),1)]),_:1}),n(a,{label:"\u4FEE\u6539\u540E",prop:"after"},{default:s(o=>[C(D(h(o.row,!1)),1)]),_:1}),n(a,{label:"\u4FEE\u6539\u4EBA",prop:"apply_name"}),n(a,{label:"\u4FEE\u6539\u65F6\u95F4",prop:"addtime"})]),_:1},8,["data"])]),_:1})),[[F,i.value]])]),_:1},8,["modelValue"])])),[[F,i.value]])}}});var eu=j(X,[["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSaleSettings/modifyRecord/detail.vue"]]);export{eu as default};
