2 lines
6.8 KiB
JavaScript
2 lines
6.8 KiB
JavaScript
import{a4 as M,$ as O,C as Z,D as G,w as H,F as J,L as Q,M as W,b as X,N as Y,O as ee}from"./element-plus.573d45d4.js";import{_ as oe}from"./index.vue_vue_type_script_setup_true_lang.ffc076c1.js";import{d as z,r as D,Z as te,af as le,ap as ae,o as i,c as re,U as e,L as o,u as a,aa as ue,R as n,M as c,K as p,a as $,j as se}from"./@vue.18505fe0.js";import{u as ie}from"./usePaging.6a6670f9.js";import{u as ne}from"./useDictOptions.994c5c47.js";import{f as pe,d as de}from"./store_product.20e442b8.js";import"./lodash.60201f64.js";import{f as me}from"./index.e246281b.js";import{_ as ce}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.b08b9b1a.js";import{a as _e}from"./store_category.72573a62.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.8ae0c638.js";import"./axios.2b8d80bd.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./system_store.353cdab3.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.b82a2ce7.js";import"./color.b905eb26.js";import"./clone.e1fb2883.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.495afef3.js";import"./vue-clipboard3.cb649e18.js";import"./clipboard.4592e390.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const fe={class:"mt-4"},we={class:"flex mt-4 justify-end"},he=z({name:"storeProductLists"}),ao=z({...he,setup(Ce){const h=D(null),_=te({store_name:"",class_all:""}),C=D([]),S=u=>{console.log(u),C.value=u.map(({id:l})=>l)};ne("");const{pager:w,getLists:b,resetParams:A,resetPage:v}=ie({fetchFun:de,params:_}),I=async u=>{var l,m;(l=h.value)==null||l.open(),(m=h.value)==null||m.setFormData(u)};let E,F,y=D(!1),g;const K=u=>(g=u,y.value=!0,V.lazyLoad(F,E),!1),V={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(u,l){E||(E=l),F||(F=u);let m=u.value||0,d={};y.value?(d={name:g},g||(d={pid:m,page_size:1e4})):d={pid:m,page_size:1e4},_e({...d}).then(k=>{l(k.lists.map(s=>(s.leaf=!0,y.value=!1,s)))})}},x=async u=>{await me.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await pe({id:u}),b()};return b(),(u,l)=>{const m=Z,d=G,k=M,s=H,N=J,L=Q,B=le("router-link"),t=W,R=X,P=O,T=Y,U=oe,f=ae("perms"),q=ee;return i(),re("div",null,[e(L,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(N,{class:"mb-[-16px]",model:a(_),inline:""},{default:o(()=>[e(d,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:o(()=>[e(m,{class:"w-[280px]",onKeydown:ue(a(v),["enter"]),modelValue:a(_).store_name,"onUpdate:modelValue":l[0]||(l[0]=r=>a(_).store_name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),e(d,{label:"\u5546\u54C1\u5206\u7C7B",prop:"store_name"},{default:o(()=>[e(k,{class:"w-[280px]",modelValue:a(_).class_all,"onUpdate:modelValue":l[1]||(l[1]=r=>a(_).class_all=r),filterable:"",clearable:"","before-filter":K,props:V,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",onChange:a(v)},null,8,["modelValue","onChange"])]),_:1}),e(d,null,{default:o(()=>[e(s,{type:"primary",onClick:a(v)},{default:o(()=>[n("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(s,{onClick:a(A)},{default:o(()=>[n("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),c((i(),p(L,{class:"!border-none",shadow:"never"},{default:o(()=>[c((i(),p(B,{to:{path:"store_product_edit",query:{id:0,mode:"add"}},class:"mr-4"},{default:o(()=>[e(s,{type:"primary",icon:"Plus"},{default:o(()=>[n(" \u65B0\u589E ")]),_:1})]),_:1})),[[f,["store_product.store_product/add"]]]),c((i(),p(s,{disabled:!a(C).length,onClick:l[2]||(l[2]=r=>x(a(C)))},{default:o(()=>[n(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[f,["store_product.store_product/delete"]]]),c((i(),p(B,{to:{path:"product_import"},class:"ml-4"},{default:o(()=>[e(s,{type:"primary"},{default:o(()=>[n(" \u5BFC\u5165\u5546\u54C1\u5230\u95E8\u5E97 ")]),_:1})]),_:1})),[[f,["store_product.store_product/add"]]]),$("div",fe,[e(T,{data:a(w).lists,onSelectionChange:S},{default:o(()=>[e(t,{type:"selection",width:"55"}),e(t,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(t,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({row:r})=>[e(R,{style:{width:"50px",height:"50px"},src:r.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(t,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(t,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(t,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(t,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u5546\u6237\u4EF7",prop:"cost","min-width":"120","show-overflow-tooltip":""}),e(t,{label:"\u4F1A\u5458\u4EF7",prop:"vip_price","min-width":"120","show-overflow-tooltip":""}),e(t,{label:"\u7EC8\u7AEF\u96F6\u552E\u4EF7",prop:"price","min-width":"120","show-overflow-tooltip":""}),e(t,{label:"\u8D77\u6279\u91CF",prop:"batch","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u552E\u5356\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u5151\u6362\u5E93\u5B58",prop:"swap","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u9500\u91CF",prop:"sales","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u72B6\u6001",prop:"is_show"},{default:o(({row:r})=>[r.is_show?(i(),p(P,{key:0,type:"success"},{default:o(()=>[n(" \u4E0A\u67B6 ")]),_:1})):(i(),p(P,{key:1,type:"info"},{default:o(()=>[n(" \u4E0B\u67B6 ")]),_:1}))]),_:1}),e(t,{label:"\u6761\u7801",prop:"bar_code","min-width":"200","show-overflow-tooltip":""}),e(t,{label:"\u64CD\u4F5C",width:"180",fixed:"right"},{default:o(({row:r})=>[c((i(),p(B,{to:{path:"store_product_edit",query:{id:r.id,mode:"edit"}},class:"mr-4"},{default:o(()=>[e(s,{type:"primary",link:""},{default:o(()=>[n(" \u7F16\u8F91 ")]),_:1})]),_:2},1032,["to"])),[[f,["store_product.store_product/edit"]]]),c((i(),p(s,{type:"primary",link:"",onClick:j=>I(r)},{default:o(()=>[n(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[f,["store_product.store_product/edit"]]]),c((i(),p(s,{type:"danger",link:"",onClick:j=>x(r.id)},{default:o(()=>[n(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[f,["store_product.store_product/delete"]]])]),_:1})]),_:1},8,["data"])]),$("div",we,[e(U,{modelValue:a(w),"onUpdate:modelValue":l[3]||(l[3]=r=>se(w)?w.value=r:null),onChange:a(b)},null,8,["modelValue","onChange"])])]),_:1})),[[q,a(w).loading]]),e(ce,{ref_key:"detailsRef",ref:h},null,512)])}}});export{ao as default};
|