2 lines
5.3 KiB
JavaScript
2 lines
5.3 KiB
JavaScript
import{C as R,D as T,w as U,F as j,L as q,M,b as K,N as O,O as Z}from"./element-plus.3a5be7a7.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.0cb80fdf.js";import{u as G}from"./usePaging.6a6670f9.js";import{u as H}from"./useDictOptions.fa7321f1.js";import{d as J,e as Q}from"./store_product.7f6dce7f.js";import{d as D,r as E,Z as W,af as X,ap as Y,o as i,c as oo,U as o,L as e,u as r,R as s,M as p,K as d,a as k,S as eo,j as to}from"./@vue.18505fe0.js";import"./lodash.60201f64.js";import{f as lo}from"./index.bbbcfbd6.js";import{_ as ao}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.2513f259.js";import"./lodash-es.bdeecbdb.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"./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.c84a3119.js";const ro={class:"mt-4"},so={class:"flex mt-4 justify-end"},uo=D({name:"storeProductLists"}),Go=D({...uo,setup(io){const w=E(null),_=W({store_name:"",cate_id:""}),C=E([]),y=n=>{C.value=n.map(({id:a})=>a)};H("");const{pager:m,getLists:h,resetParams:B,resetPage:x}=G({fetchFun:Q,params:_}),V=async n=>{var a,f;(a=w.value)==null||a.open(),(f=w.value)==null||f.setFormData()},P=async n=>{},v=async n=>{await lo.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await J({id:n}),h()};return h(),(n,a)=>{const f=R,b=T,u=U,A=j,F=q,L=X("router-link"),t=M,S=K,$=O,I=z,c=Y("perms"),N=Z;return i(),oo("div",null,[o(F,{class:"!border-none mb-4",shadow:"never"},{default:e(()=>[o(A,{class:"mb-[-16px]",model:r(_),inline:""},{default:e(()=>[o(b,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:e(()=>[o(f,{class:"w-[280px]",modelValue:r(_).store_name,"onUpdate:modelValue":a[0]||(a[0]=l=>r(_).store_name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(b,null,{default:e(()=>[o(u,{type:"primary",onClick:r(x)},{default:e(()=>[s("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(u,{onClick:r(B)},{default:e(()=>[s("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),p((i(),d(F,{class:"!border-none",shadow:"never"},{default:e(()=>[p((i(),d(u,{type:"primary",icon:"Plus"},{default:e(()=>[o(L,{to:{path:"store_product_edit",query:{id:0,mode:"add"}}},{default:e(()=>[s(" \u65B0\u589E ")]),_:1})]),_:1})),[[c,["store_product.store_product/add"]]]),p((i(),d(u,{disabled:!r(C).length,onClick:a[1]||(a[1]=l=>v(r(C)))},{default:e(()=>[s(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[c,["store_product.store_product/delete"]]]),k("div",ro,[o($,{data:r(m).lists,onSelectionChange:y},{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"},{default:e(({row:l})=>[o(S,{style:{width:"50px",height:"50px"},src:l.image},null,8,["src"])]),_:1}),o(t,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","show-overflow-tooltip":""}),o(t,{label:"\u5206\u7C7Bid",prop:"cate_id","show-overflow-tooltip":""}),o(t,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","show-overflow-tooltip":""}),o(t,{label:"\u5355\u4F4D\u540D",prop:"unit_name","show-overflow-tooltip":""}),o(t,{label:"\u9500\u91CF",prop:"sales","show-overflow-tooltip":""}),o(t,{label:"\u5E93\u5B58",prop:"stock","show-overflow-tooltip":""}),o(t,{label:"\u72B6\u6001",prop:"is_show","show-overflow-tooltip":""},{default:e(({row:l})=>[s(eo(l.is_show?"\u4E0A\u67B6":"\u672A\u4E0A\u67B6"),1)]),_:1}),o(t,{label:"\u662F\u5426\u65B0\u54C1",prop:"is_new","show-overflow-tooltip":""}),o(t,{label:"\u6DFB\u52A0\u65F6\u95F4",prop:"add_time","show-overflow-tooltip":""}),o(t,{label:"\u662F\u5426\u5305\u90AE",prop:"is_postage","show-overflow-tooltip":""}),o(t,{label:"\u662F\u5426\u5220\u9664",prop:"is_del","show-overflow-tooltip":""}),o(t,{label:"\u6210\u672C\u4EF7",prop:"cost","show-overflow-tooltip":""}),o(t,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:e(({row:l})=>[p((i(),d(u,{type:"primary",link:"",onClick:g=>P(l)},{default:e(()=>[s(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[c,["store_product.store_product/edit"]]]),p((i(),d(u,{type:"primary",link:"",onClick:g=>V(l)},{default:e(()=>[s(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[c,["store_product.store_product/edit"]]]),p((i(),d(u,{type:"danger",link:"",onClick:g=>v(l.id)},{default:e(()=>[s(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[c,["store_product.store_product/delete"]]])]),_:1})]),_:1},8,["data"])]),k("div",so,[o(I,{modelValue:r(m),"onUpdate:modelValue":a[2]||(a[2]=l=>to(m)?m.value=l:null),onChange:r(h)},null,8,["modelValue","onChange"])])]),_:1})),[[N,r(m).loading]]),o(ao,{ref_key:"detailsRef",ref:w},null,512)])}}});export{Go as default};
|