moreShopAdmin/build/admin/assets/details11.af98eda3.js

2 lines
4.6 KiB
JavaScript

import{m as x,s as I,r as i,aT as F,bt as U,bu as j,ag as O,ah as R,p as D,q as V,t as e,v as t,u as l,i as h,a2 as k,G as E,x as W,A as $,J as z,b6 as G,b7 as J,$ as H}from"./.pnpm.1b0299fb.js";import{_ as K}from"./index.vue_vue_type_script_setup_true_lang.b077f234.js";import{u as M}from"./usePaging.00aa976d.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.abac7546.js";import{r as Q}from"./index.689cfa31.js";import"./lodash.c3b66c05.js";import{d as X}from"./system_store.e6c50bcf.js";import{a as Y}from"./warehouse_product_storege.b9f73c92.js";import"./@vueuse.72d44d91.js";import"./@vue.9d708d7c.js";function Z(v){return Q.get({url:"/store_product_attr_value/storeproductattrvalue/lists",params:v})}const ee={class:"edit-popup"},oe={style:{"white-space":"pre"}},te={key:0,class:"flex mt-4 justify-end"},ae=x({name:"storeProductDETAILS"}),be=x({...ae,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(v,{expose:B,emit:le}){I(),i("add");const C=i([]),p=i(!1),c=i("first"),P=s=>{s.paneName=="second"&&_(),s.paneName=="warehouse"&&L()},r=F({id:"",image:"",store_name:"",bar_code:"",cate_id:"",cate_name:"",price:"",unit:"",unit_name:"",stock:"",cost:"",purchase:"",rose:"0",manufacturer_information:""}),y=async s=>{d.product_id=s.id,c.value=="second"&&_();for(const a in r)s[a]!=null&&s[a]!=null&&(r[a]=s[a]);Z({product_id:s.id}).then(a=>{C.value=a.lists})},T=()=>{p.value=!0},d=F({product_id:""}),{pager:n,getLists:_,resetParams:se,resetPage:ue}=M({fetchFun:X,params:d}),g=i([]),L=()=>{Y(d).then(s=>{g.value=s.lists})};return B({open:T,setFormData:y}),(s,a)=>{const m=U,f=z,N=j,o=G,w=J,b=O,S=K,A=R,q=H;return D(),V("div",ee,[e(q,{title:"\u5546\u54C1\u8BE6\u60C5",size:1200,modelValue:l(p),"onUpdate:modelValue":a[2]||(a[2]=u=>h(p)?p.value=u:null)},{default:t(()=>[e(A,{modelValue:l(c),"onUpdate:modelValue":a[1]||(a[1]=u=>h(c)?c.value=u:null),class:"demo-tabs",onTabClick:P},{default:t(()=>[e(b,{label:"\u57FA\u7840\u4FE1\u606F",name:"first"},{default:t(()=>[e(N,{class:"margin-top",column:2,border:""},{default:t(()=>[e(m,{label:"\u5546\u54C1\u540D\u79F0"},{default:t(()=>[k(E(l(r).store_name),1)]),_:1}),e(m,{label:"\u5546\u54C1\u5206\u7C7B"},{default:t(()=>[k(E(l(r).cate_name),1)]),_:1}),e(m,{label:"\u5546\u54C1\u56FE\u7247",span:2},{default:t(()=>[e(f,{src:l(r).image,class:"w-20 h-20","preview-teleported":!0},null,8,["src"])]),_:1}),e(m,{label:"\u5382\u5BB6\u5907\u6CE8",span:2},{default:t(()=>[W("div",oe,E(l(r).manufacturer_information),1)]),_:1})]),_:1}),e(w,{data:l(C),border:"",class:"mt-4"},{default:t(()=>[e(o,{label:"\u89C4\u683C\u540D\u79F0",prop:"sku_name","min-width":"150"}),e(o,{label:"\u5355\u4F4D",prop:"unit_name"}),e(o,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase","show-overflow-tooltip":""}),e(o,{label:"\u5546\u6237\u4EF7",prop:"cost","show-overflow-tooltip":""}),e(o,{label:"\u96F6\u552E\u4EF7",prop:"price","show-overflow-tooltip":""}),e(o,{label:"\u5546\u54C1\u9500\u91CF",prop:"sales","show-overflow-tooltip":""}),e(o,{label:"\u5546\u54C1\u5E93\u5B58",prop:"stock","show-overflow-tooltip":""}),e(o,{label:"\u6761\u7801",prop:"bar_code","show-overflow-tooltip":""})]),_:1},8,["data"])]),_:1}),e(b,{label:"\u9002\u7528\u95E8\u5E97",name:"second"},{default:t(()=>[e(w,{data:l(n).lists,border:""},{default:t(()=>[e(o,{label:"\u95E8\u5E97\u540D\u79F0",prop:"system_store_name","min-width":"200"}),e(o,{label:"\u5546\u54C1\u56FE",prop:"image",width:"80","show-overflow-tooltip":""},{default:t(({row:u})=>[e(f,{src:u.image,class:"w-[50px] h-[50px]","preview-teleported":!0},null,8,["src"])]),_:1}),e(o,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"150"}),e(o,{label:"\u5546\u54C1\u5E93\u5B58",prop:"stock","show-overflow-tooltip":""}),e(o,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","show-overflow-tooltip":""}),e(o,{label:"\u5546\u54C1\u9500\u91CF",prop:"sales","show-overflow-tooltip":""})]),_:1},8,["data"]),l(n).count>l(n).lists.length?(D(),V("div",te,[e(S,{modelValue:l(n),"onUpdate:modelValue":a[0]||(a[0]=u=>h(n)?n.value=u:null),onChange:l(_)},null,8,["modelValue","onChange"])])):$("",!0)]),_:1}),e(b,{label:"\u4ED3\u5E93",name:"warehouse"},{default:t(()=>[e(w,{data:l(g)},{default:t(()=>[e(o,{label:"\u4ED3\u5E93",prop:"warehouse_name","min-width":"150"}),e(o,{label:"\u5546\u54C1\u56FE",prop:"image",width:"80","show-overflow-tooltip":""},{default:t(({row:u})=>[e(f,{src:u.image,class:"w-[50px] h-[50px]","preview-teleported":!0},null,8,["src"])]),_:1}),e(o,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"150"}),e(o,{label:"\u5546\u54C1\u5E93\u5B58",prop:"nums","show-overflow-tooltip":""})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])])}}});export{be as default};