ChildGoodEditModal.6d23b8.js 4.0 KB

1
  1. import{a1 as t,aO as f,aF as i,aE as v,_ as F,d as D,aP as h,w,z as g,r as y,o as b,G as C,C as c,l as n,a as x,h as p,j as _,aG as V,M as k,a6 as N,aQ as T}from"./index.js";import{c as m}from"./status.915de772.js";import{B as M}from"./basic-descriptions.2bd5636f.js";const O=[{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(d,{good_type:o}){return t(f,{size:"small"},{default:()=>{var e;return((e=m.find(u=>u.value==o))==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}],P=[{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(d,{good_type:o}){return t(f,{size:"small"},{default:()=>{var e;return((e=m.find(u=>u.value==o))==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},{label:"\u5B50\u5546\u54C1",span:24,render(d,{ProductsCombind:o=[]}){return t(v,{size:"small",data:o,border:!0},{default:()=>[t(i,{label:"\u6BD4\u4F8B",prop:"child_num",width:100,showOverflowTooltip:!0}),t(i,{label:"\u5546\u54C1\u7F16\u53F7",showOverflowTooltip:!0},{default:e=>{var u;return(u=e.row.products)==null?void 0:u.skuCode}}),t(i,{label:"\u5546\u54C1\u7C7B\u578B",showOverflowTooltip:!0},{default:e=>t(f,{size:"small"},{default:()=>{var u;return((u=m.find(l=>{var s;return l.value==((s=e.row.products)==null?void 0:s.good_type)}))==null?void 0:u.label)||"--"}})}),t(i,{label:"\u5546\u54C1\u540D\u79F0"},{default:e=>{var u;return(u=e.row.products)==null?void 0:u.goodName}})]})}}],z={class:"flex justify-between mt-[10px]"},A={class:"flex items-center"},G=D({__name:"ChildGoodEditModal",props:{visible:{type:Boolean,required:!0},index:{type:null,required:!0},data:{type:null,required:!0}},emits:["submit"],setup(d,{emit:o}){const e=d,u=o,l=h(e,"visible"),s=w(0);g(()=>l.value,()=>{!l.value||(s.value=e.data.child_num)});function B(){u("submit",e.index,{...e.data,child_num:s.value}),l.value=!1}return(q,a)=>{const E=y("ElButton");return b(),C(n(T),{modelValue:n(l),"onUpdate:modelValue":a[1]||(a[1]=r=>N(l)?l.value=r:null),title:"\u7F16\u8F91\u5B50\u5546\u54C1",center:""},{default:c(()=>[e.data?(b(),C(n(M),{key:0,style:{overflow:"hidden"},data:e.data,columns:n(O)},null,8,["data","columns"])):x("v-if",!0),p("div",z,[p("div",A,[a[2]||(a[2]=p("p",{style:{width:"110px"}},"\u5B50\u5546\u54C1\u6BD4\u4F8B:",-1)),_(n(V),{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=r=>s.value=r),placeholder:"\u5B50\u5546\u54C1\u6BD4\u4F8B"},null,8,["modelValue"])]),_(E,{type:"primary",onClick:B},{default:c(()=>a[3]||(a[3]=[k("\u4FDD\u5B58")])),_:1})])]),_:1},8,["modelValue"])}}});var j=F(G,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/inventoryCheck/components/ChildGoodEditModal.vue"]]),H=Object.freeze(Object.defineProperty({__proto__:null,default:j},Symbol.toStringTag,{value:"Module"}));export{j as C,O as a,H as b,P as g};