ChildGoodEditModal.656d8a.js 3.5 KB

1
  1. import{a1 as s,aP as v,aJ as E,J as y,aQ as r,_ as B,d as F,aR as D,w as g,z as x,r as V,o as m,G as f,C as c,l as o,a as h,h as p,j as C,aG as w,M,a6 as N,aS as k}from"./index.js";import{c as G}from"./status.21dece30.js";import{t as O,s as j,a as z}from"./shared.6241f91b.js";import{B as A}from"./basic-descriptions.4115ebf1.js";function S(a,u,e=200){return s("div",{style:{display:"flex",justifyContent:"space-between"}},{default:()=>[s("span",null,a),s(v,{placement:"top",content:u,width:e},{reference:()=>s(E,{link:!0,icon:y("information-line")})})]})}const T=[{span:12,field:"seller_name",label:"\u9500\u552E\u65B9\u516C\u53F8"},{span:12,field:"buyer_name",label:"\u8D2D\u4E70\u65B9\u516C\u53F8"},{span:12,field:"goodName",label:"\u8BA2\u5355\u5546\u54C1\u540D\u79F0"},{span:12,field:"inv_good_name",label:"\u53D1\u7968\u5546\u54C1\u540D\u79F0"},{span:6,label:"\u5546\u54C1\u7C7B\u578B",render(a,{good_type:u}){return s(r,{size:"small"},{default:()=>{var e;return((e=G.find(l=>l.value==u))==null?void 0:e.label)||"--"}})}},{span:6,field:"good_code",label:"\u5546\u54C1\u4EE3\u7801"},{span:6,field:"spec",label:"\u89C4\u683C"},{span:6,field:"unit",label:"\u5355\u4F4D"},{span:6,field:"unit_price",label:"\u7A0E\u524D\u5355\u4EF7"},{span:6,field:"subunit_price",label:"\u7A0E\u540E\u5355\u4EF7"},{span:6,field:"unit_weight",label:"\u91CD\u91CF"},{span:6,field:"spectral",label:"\u5206\u5149"},{field:"cat_name",label:"\u8FDB\u9879\u7C7B\u76EE",span:24}],K=[{field:"invoiceCode",label:"\u4E1A\u52A1\u7F16\u53F7",span:12},{label:"\u7C7B\u578B",span:6,render(a,u){return s(r,{type:"primary",size:"small"},{default:()=>{var e;return(e=O.find(l=>l.value==u.type))==null?void 0:e.label}})}},{label:"\u6570\u636E\u6765\u6E90",span:6,render(a,u){return s(r,{type:"primary",size:"small"},{default:()=>{var e;return(e=j.find(l=>l.value==u.source))==null?void 0:e.label}})}},{label:"\u72B6\u6001",span:6,render(a,u){return s(r,{type:"primary",size:"small"},{default:()=>{var e;return(e=z.find(l=>l.value==u.status))==null?void 0:e.label}})}},{label:"\u5F02\u5E38\u539F\u56E0",span:18},{label:"\u9500\u552E\u65B9\u516C\u53F8",span:12,render(a,u){return S(u.seller_name,"\u9500\u552E\u65B9\u516C\u53F8\u7EB3\u7A0E\u8BC6\u522B\u53F7 : "+u.seller_code,300)}}],q={class:"flex justify-between mt-[10px]"},I={class:"flex items-center"},P=F({__name:"ChildGoodEditModal",props:{visible:{type:Boolean,required:!0},index:{type:null,required:!0},data:{type:null,required:!0}},emits:["submit"],setup(a,{emit:u}){const e=a,l=u,n=D(e,"visible"),i=g(0);x(()=>n.value,()=>{!n.value||(i.value=e.data.goodNum)});function b(){l("submit",e.index,{...e.data,goodNum:i.value}),n.value=!1}return(U,t)=>{const _=V("ElButton");return m(),f(o(k),{modelValue:o(n),"onUpdate:modelValue":t[1]||(t[1]=d=>N(n)?n.value=d:null),title:"\u7F16\u8F91\u5546\u54C1",center:""},{default:c(()=>[e.data?(m(),f(o(A),{key:0,style:{overflow:"hidden"},data:e.data,columns:o(T)},null,8,["data","columns"])):h("v-if",!0),p("div",q,[p("div",I,[t[2]||(t[2]=p("p",{style:{width:"110px"}},"\u64CD\u4F5C\u6570\u91CF:",-1)),C(o(w),{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=d=>i.value=d),placeholder:"\u64CD\u4F5C\u6570\u91CF"},null,8,["modelValue"])]),C(_,{type:"primary",onClick:b},{default:c(()=>t[3]||(t[3]=[M("\u4FDD\u5B58")])),_:1})])]),_:1},8,["modelValue"])}}});var R=B(P,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/inOutManager/components/ChildGoodEditModal.vue"]]),L=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));export{R as C,L as a,K as o};