moreShopAdmin/build/admin/assets/index.a0e373f1.js

2 lines
5.8 KiB
JavaScript

import{a8 as J,k as L,C as Q,D as Z,J as G,K as H,w as W,F as X,L as Y,M as ee,b as te,N as oe,O as ae}from"./element-plus.91c68cc0.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{d as K,Z as re,r as E,i as se,ap as ne,o as i,c as F,U as t,L as l,u as o,aa as ue,T as z,a9 as P,K as f,Q as ie,R as D,M as T,a as U,j as pe}from"./@vue.76ce7aa3.js";import{u as me}from"./usePaging.f8c888e4.js";import{u as de}from"./useDictOptions.3b9f7ea9.js";import{u as _e,n as ce}from"./workbench.e2bba501.js";import{a as fe}from"./system_store.ce6419b9.js";import{a as Ce}from"./store_category.951e09af.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.e9c2eb26.js";import"./lodash.4e6d2a38.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";const ve={class:"mt-4"},ge={class:"flex mt-4 justify-end"},be=K({name:"storeProductLists"}),ut=K({...be,setup(he){const r=re({store_name:"",type:1,store_id:"",top_cate_id:""}),_=E(!1),V=E([]),M=(n="")=>{_.value=!0,fe({name:n,page_size:50}).then(e=>{V.value=e.lists,setTimeout(()=>{_.value=!1},300)}).catch(e=>{setTimeout(()=>{_.value=!1},300)})},N=async n=>{_e({type:r.type,id:n.id}).then(e=>{L.success("\u64CD\u4F5C\u6210\u529F"),C()}).catch(e=>{L.error("\u64CD\u4F5C\u5931\u8D25")})};de("");const{pager:p,getLists:C,resetParams:I,resetPage:m}=me({fetchFun:ce,params:r});let v,g;const b=E(!1);let h;const S=n=>(h=n,b.value=!0,k.lazyLoad(g,v),!1),k={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(n,e){v||(v=e),g||(g=n);const c=n.value||0;let s={};b.value?(s={name:h},h||(s={pid:c,page_size:1e4})):s={pid:c,page_size:1e4},Ce({...s}).then(y=>{e(y.lists.map(d=>(d.leaf=!0,b.value=!1,d)))})}};return se(()=>{C()}),(n,e)=>{const c=Q,s=Z,y=J,d=G,B=H,w=W,j=X,x=Y,u=ee,O=te,R=oe,$=le,q=ne("perms"),A=ae;return i(),F("div",null,[t(x,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[t(j,{class:"mb-[-16px]",model:o(r),inline:""},{default:l(()=>[t(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:l(()=>[t(c,{class:"w-[280px]",onKeydown:ue(o(m),["enter"]),modelValue:o(r).store_name,"onUpdate:modelValue":e[0]||(e[0]=a=>o(r).store_name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),t(s,{label:"\u5546\u54C1\u5206\u7C7B",prop:"store_name"},{default:l(()=>[t(y,{class:"w-[280px]",modelValue:o(r).top_cate_id,"onUpdate:modelValue":e[1]||(e[1]=a=>o(r).top_cate_id=a),filterable:"",clearable:"","before-filter":S,props:k,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",onChange:o(m)},null,8,["modelValue","onChange"])]),_:1}),t(s,{label:"\u7C7B\u578B",prop:"type"},{default:l(()=>[t(B,{modelValue:o(r).type,"onUpdate:modelValue":e[2]||(e[2]=a=>o(r).type=a),placeholder:"\u8BF7\u9009\u62E9\u7C7B\u578B",style:{width:"240px"},onChange:o(m)},{default:l(()=>[(i(),F(z,null,P([{id:1,name:"\u9ED8\u8BA4"},{id:2,name:"\u95E8\u5E97"},{id:3,name:"\u4ED3\u5E93"}],a=>t(d,{key:a.id,label:a.name,value:a.id},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"])]),_:1}),o(r).type==2?(i(),f(s,{key:0,label:"\u95E8\u5E97",prop:"store_id"},{default:l(()=>[t(B,{modelValue:o(r).store_id,"onUpdate:modelValue":e[3]||(e[3]=a=>o(r).store_id=a),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":M,loading:o(_),style:{width:"240px"},onChange:o(m)},{default:l(()=>[(i(!0),F(z,null,P(o(V),a=>(i(),f(d,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1})):ie("",!0),t(s,null,{default:l(()=>[t(w,{type:"primary",onClick:o(m)},{default:l(()=>e[5]||(e[5]=[D("\u67E5\u8BE2")])),_:1},8,["onClick"]),t(w,{onClick:o(I)},{default:l(()=>e[6]||(e[6]=[D("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),T((i(),f(x,{class:"!border-none",shadow:"never"},{default:l(()=>[U("div",ve,[t(R,{data:o(p).lists},{default:l(()=>[t(u,{type:"selection",width:"55"}),t(u,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),t(u,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:l(({row:a})=>[t(O,{style:{width:"50px",height:"50px"},src:a.image,"preview-teleported":!0},null,8,["src"])]),_:1}),t(u,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),t(u,{label:"\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""}),t(u,{label:"\u5907\u6CE8",prop:"remark","min-width":"200","show-overflow-tooltip":""}),t(u,{label:"\u64CD\u4F5C",width:"180",fixed:"right"},{default:l(({row:a})=>[T((i(),f(w,{type:"primary",link:"",onClick:ye=>N(a)},{default:l(()=>e[7]||(e[7]=[D(" \u5F52\u96F6 ")])),_:2},1032,["onClick"])),[[q,["statistics.negative/update_negative_zero"]]])]),_:1})]),_:1},8,["data"])]),U("div",ge,[t($,{modelValue:o(p),"onUpdate:modelValue":e[4]||(e[4]=a=>pe(p)?p.value=a:null),onChange:o(C)},null,8,["modelValue","onChange"])])]),_:1})),[[A,o(p).loading]])])}}});export{ut as default};