2 lines
6.1 KiB
JavaScript
2 lines
6.1 KiB
JavaScript
import{$ as R,C as S,D as T,w as q,F as U,L as j,M,b as O,N as Z,O as z}from"./element-plus.e226cbd2.js";import{_ as G}from"./index.vue_vue_type_script_setup_true_lang.11f62324.js";import{d as D,r as k,Z as H,af as J,ap as Q,o as i,c as W,U as o,L as e,u as a,aa as X,R as u,M as d,K as s,a as B,j as Y}from"./@vue.18505fe0.js";import{u as oo}from"./usePaging.6a6670f9.js";import{u as eo}from"./useDictOptions.327e6c47.js";import{f as to,d as lo}from"./store_product.b5655c31.js";import"./lodash.60201f64.js";import{f as ao}from"./index.bcc0f007.js";import{_ as ro}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.5f8a3752.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.b3607d4d.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 io={class:"mt-4"},uo={class:"flex mt-4 justify-end"},so=D({name:"storeProductLists"}),Jo=D({...so,setup(po){const w=k(null),_=H({store_name:"",cate_id:""}),h=k([]),x=n=>{console.log(n),h.value=n.map(({id:r})=>r)};eo("");const{pager:c,getLists:v,resetParams:V,resetPage:b}=oo({fetchFun:lo,params:_}),P=async n=>{var r,f;(r=w.value)==null||r.open(),(f=w.value)==null||f.setFormData(n)},E=async n=>{await ao.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await to({id:n}),v()};return v(),(n,r)=>{const f=S,F=T,p=q,L=U,y=j,C=J("router-link"),t=M,$=O,g=R,A=Z,I=G,m=Q("perms"),K=z;return i(),W("div",null,[o(y,{class:"!border-none mb-4",shadow:"never"},{default:e(()=>[o(L,{class:"mb-[-16px]",model:a(_),inline:""},{default:e(()=>[o(F,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:e(()=>[o(f,{class:"w-[280px]",onKeydown:X(a(b),["enter"]),modelValue:a(_).store_name,"onUpdate:modelValue":r[0]||(r[0]=l=>a(_).store_name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),o(F,null,{default:e(()=>[o(p,{type:"primary",onClick:a(b)},{default:e(()=>[u("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(p,{onClick:a(V)},{default:e(()=>[u("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),d((i(),s(y,{class:"!border-none",shadow:"never"},{default:e(()=>[d((i(),s(C,{to:{path:"store_product_edit",query:{id:0,mode:"add"}},class:"mr-4"},{default:e(()=>[o(p,{type:"primary",icon:"Plus"},{default:e(()=>[u(" \u65B0\u589E ")]),_:1})]),_:1})),[[m,["store_product.store_product/add"]]]),d((i(),s(p,{disabled:!a(h).length,onClick:r[1]||(r[1]=l=>E(a(h)))},{default:e(()=>[u(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[m,["store_product.store_product/delete"]]]),d((i(),s(C,{to:{path:"product_import"},class:"ml-4"},{default:e(()=>[o(p,{type:"primary"},{default:e(()=>[u(" \u5BFC\u5165\u5546\u54C1\u5230\u95E8\u5E97 ")]),_:1})]),_:1})),[[m,["store_product.store_product/add"]]]),B("div",io,[o(A,{data:a(c).lists,onSelectionChange:x},{default:e(()=>[o(t,{type:"selection",width:"55"}),o(t,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),o(t,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:e(({row:l})=>[o($,{style:{width:"50px",height:"50px"},src:l.image,"preview-teleported":!0},null,8,["src"])]),_:1}),o(t,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),o(t,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),o(t,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),o(t,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase","min-width":"100","show-overflow-tooltip":""}),o(t,{label:"\u5546\u6237\u4EF7",prop:"cost","min-width":"120","show-overflow-tooltip":""}),o(t,{label:"\u4F1A\u5458\u4EF7",prop:"vip_price","min-width":"120","show-overflow-tooltip":""}),o(t,{label:"\u7EC8\u7AEF\u96F6\u552E\u4EF7",prop:"price","min-width":"120","show-overflow-tooltip":""}),o(t,{label:"\u8D77\u6279\u91CF",prop:"batch","min-width":"100","show-overflow-tooltip":""}),o(t,{label:"\u552E\u5356\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""}),o(t,{label:"\u5151\u6362\u5E93\u5B58",prop:"swap","min-width":"100","show-overflow-tooltip":""}),o(t,{label:"\u9500\u91CF",prop:"sales","min-width":"100","show-overflow-tooltip":""}),o(t,{label:"\u72B6\u6001",prop:"is_show"},{default:e(({row:l})=>[l.is_show?(i(),s(g,{key:0,type:"success"},{default:e(()=>[u(" \u4E0A\u67B6 ")]),_:1})):(i(),s(g,{key:1,type:"info"},{default:e(()=>[u(" \u4E0B\u67B6 ")]),_:1}))]),_:1}),o(t,{label:"\u6761\u7801",prop:"bar_code","min-width":"200","show-overflow-tooltip":""}),o(t,{label:"\u64CD\u4F5C",width:"180",fixed:"right"},{default:e(({row:l})=>[d((i(),s(C,{to:{path:"store_product_edit",query:{id:l.id,mode:"edit"}},class:"mr-4"},{default:e(()=>[o(p,{type:"primary",link:""},{default:e(()=>[u(" \u7F16\u8F91 ")]),_:1})]),_:2},1032,["to"])),[[m,["store_product.store_product/edit"]]]),d((i(),s(p,{type:"primary",link:"",onClick:N=>P(l)},{default:e(()=>[u(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[m,["store_product.store_product/edit"]]]),d((i(),s(p,{type:"danger",link:"",onClick:N=>E(l.id)},{default:e(()=>[u(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[m,["store_product.store_product/delete"]]])]),_:1})]),_:1},8,["data"])]),B("div",uo,[o(I,{modelValue:a(c),"onUpdate:modelValue":r[2]||(r[2]=l=>Y(c)?c.value=l:null),onChange:a(v)},null,8,["modelValue","onChange"])])]),_:1})),[[K,a(c).loading]]),o(ro,{ref_key:"detailsRef",ref:w},null,512)])}}});export{Jo as default};
|