detail.b434d2.js 4.4 KB

1
  1. import{am as B,aR as w,aT as k,aS as L,_ as G,d as I,x as v,aP as N,n as M,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 b,aN as z,a as H,M as D,L as g}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(e,{isZx:u,is_stock:t}){return B(w,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})=>k(e,"\u4E1A\u52A1\u516C\u53F8\u7F16\u7801 : "+u,270),span:12},{field:"supplierName",label:"\u4F9B\u5E94\u5546\u540D\u79F0",render:(e,{supplierNo:u})=>k(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(w,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=v([]),t=v({}),p=v(["1","2"]),i=N(!1),F=N(!1),y=M();async function S(){F.value=!0;try{const l=await J({spuCode:y.query.spuCode});t.value=l.data}catch{}finally{F.value=!1}}async function V(){i.value=!0;try{const l=await O({spuCode:y.query.spuCode});u.value=l.data}catch{}finally{i.value=!1}}async function R(){S(),V()}const A={1:"\u662F",0:"\u5426"},h={1:"\u514D\u7A0E",2:"\u4E0D\u5F81\u7A0E",3:"\u96F6\u7A0E\u7387"};function x({field:l,before:d,after:r},a=!1){switch(l){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 R(),(l,d)=>{const r=_("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":d[0]||(d[0]=o=>p.value=o)},{default:n(()=>[C((f(),b(r,{title:"\u5546\u54C1\u8BE6\u60C5",name:"1"},{default:n(()=>[JSON.stringify(t.value)!=="{}"?(f(),b(E(z),{key:0,data:t.value,columns:E(W),"label-width":"130px","col-number":2},null,8,["data","columns"])):H("v-if",!0)]),_:1})),[[m,E(F)]]),C((f(),b(r,{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=>[D(g(o.row.field||"\u7C7B\u76EE\u7F16\u53F7"),1)]),_:1}),s(a,{label:"\u4FEE\u6539\u524D",prop:"before"},{default:n(o=>[D(g(x(o.row,!0)),1)]),_:1}),s(a,{label:"\u4FEE\u6539\u540E",prop:"after"},{default:n(o=>[D(g(x(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=G(Y,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSaleSettings/modifyRecord/detail.vue"]]);export{eu as default};