import{af as B,ce as x,cg as m,cf as L,_ as M,d as j,n as v,cc as k,j as G,r as E,aw as I,B as b,o as _,c as Y,h as n,y as s,A as C,i as N,ca as z,a as H,H as D,G as g}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(l,{isZx:u,is_stock:e}){return B(x,null,{default:()=>{var p;return Number(u)==1?"\u53CD\u9988\u5546\u54C1":((p=P.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})=>m(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})=>m(e,"\u4F9B\u5E94\u5546\u7F16\u7801 : "+u,270),span:8},{label:"\u6E90\u5934\u4F9B\u5E94\u5546",render:(l,{cgd_supplierNo:u,cgd_supplierName:e})=>m(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(x,null,{default:()=>{var u;return(u=U.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"},"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=j({__name:"detail",setup(l){const u=v([]),e=v({}),p=v(["1","2"]),i=k(!1),F=k(!1),y=G();async function S(){F.value=!0;try{const t=await J({spuCode:y.query.spuCode});e.value=t.data}catch{}finally{F.value=!1}}async function V(){i.value=!0;try{const t=await K({spuCode:y.query.spuCode});u.value=t.data}catch{}finally{i.value=!1}}async function q(){S(),V()}const A={1:"\u662F",0:"\u5426"},h={1:"\u514D\u7A0E",2:"\u4E0D\u5F81\u7A0E",3:"\u96F6\u7A0E\u7387"};function w({field:t,before:d,after:r},a=!1){switch(t){case"\u662F\u5426\u6709\u4F18\u60E0\u653F\u7B56":return a?A[d]:A[r];case"\u7A0E\u7387\u6807\u8BC6":return a?h[d]:h[r];default:return a?d:r}}return q(),(t,d)=>{const r=E("el-collapse-item"),a=E("el-table-column"),R=E("el-table"),T=E("el-collapse"),f=I("loading");return b((_(),Y("div",W,[n(T,{modelValue:p.value,"onUpdate:modelValue":d[0]||(d[0]=o=>p.value=o)},{default:s(()=>[b((_(),C(r,{title:"\u5546\u54C1\u8BE6\u60C5",name:"1"},{default:s(()=>[JSON.stringify(e.value)!=="{}"?(_(),C(N(z),{key:0,data:e.value,columns:N(Q),"label-width":"130px","col-number":2},null,8,["data","columns"])):H("v-if",!0)]),_:1})),[[f,F.value]]),b((_(),C(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=>[D(g(o.row.field||"\u7C7B\u76EE\u7F16\u53F7"),1)]),_:1}),n(a,{label:"\u4FEE\u6539\u524D",prop:"before"},{default:s(o=>[D(g(w(o.row,!0)),1)]),_:1}),n(a,{label:"\u4FEE\u6539\u540E",prop:"after"},{default:s(o=>[D(g(w(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=M(X,[["__file","D:/work/jiesuan/settle-vue3/src/views/supplyInvoiceSaleSettings/supplyModifyRecord/detail.vue"]]);export{eu as default};
