moreShopAdmin/dist/admin/assets/index.4b4c4036.js

2 lines
6.1 KiB
JavaScript

import{M as Q,k as z,C as Z,D as J,N as W,O as X,w as Y,F as ee,K as te,G as oe,b as ae,H as le,I as re}from"./element-plus.8e273e86.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import{_ as ne}from"./index.vue_vue_type_script_setup_true_lang.5656bcd9.js";import{d as K,Z as ue,r as E,i as ie,ap as pe,o as i,c as F,U as o,L as l,u as e,aa as me,T as L,a9 as P,K as f,Q as de,R as D,M as T,a as U,j as _e}from"./@vue.76ce7aa3.js";import{u as ce}from"./usePaging.f8c888e4.js";import{u as fe}from"./useDictOptions.1af67d53.js";import{n as I,u as Ce}from"./workbench.a70ad028.js";import{a as ge}from"./system_store.b7a9cff4.js";import{a as ve}from"./store_category.bc812f0f.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.0b8944a1.js";import"./lodash.41b9567d.js";import"./axios.b4cbdbc9.js";import"./jspdf.75308076.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.f23177ae.js";import"./color.a6ad6672.js";import"./clone.954ba32c.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";import"./index.62ab3b90.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";const he={class:"mt-4"},be={class:"flex mt-4 justify-end"},ye=K({name:"storeProductLists"}),_t=K({...ye,setup(we){const r=ue({store_name:"",type:1,store_id:"",top_cate_id:""}),_=E(!1),V=E([]),M=(n="")=>{_.value=!0,ge({name:n,page_size:50}).then(t=>{V.value=t.lists,setTimeout(()=>{_.value=!1},300)}).catch(t=>{setTimeout(()=>{_.value=!1},300)})},N=async n=>{Ce({type:r.type,id:n.id}).then(t=>{z.success("\u64CD\u4F5C\u6210\u529F"),C()}).catch(t=>{z.error("\u64CD\u4F5C\u5931\u8D25")})};fe("");const{pager:p,getLists:C,resetParams:S,resetPage:m}=ce({fetchFun:I,params:r});let g,v;const h=E(!1);let b;const $=n=>(b=n,h.value=!0,k.lazyLoad(v,g),!1),k={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(n,t){g||(g=t),v||(v=n);const c=n.value||0;let s={};h.value?(s={name:b},b||(s={pid:c,page_size:1e4})):s={pid:c,page_size:1e4},ve({...s}).then(y=>{t(y.lists.map(d=>(d.leaf=!0,h.value=!1,d)))})}};return ie(()=>{C()}),(n,t)=>{const c=Z,s=J,y=Q,d=W,B=X,w=Y,j=ne,O=ee,x=te,u=oe,R=ae,q=le,A=se,G=pe("perms"),H=re;return i(),F("div",null,[o(x,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[o(O,{class:"mb-[-16px]",model:e(r),inline:""},{default:l(()=>[o(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:l(()=>[o(c,{class:"w-[280px]",onKeydown:me(e(m),["enter"]),modelValue:e(r).store_name,"onUpdate:modelValue":t[0]||(t[0]=a=>e(r).store_name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),o(s,{label:"\u5546\u54C1\u5206\u7C7B",prop:"store_name"},{default:l(()=>[o(y,{class:"w-[280px]",modelValue:e(r).top_cate_id,"onUpdate:modelValue":t[1]||(t[1]=a=>e(r).top_cate_id=a),filterable:"",clearable:"","before-filter":$,props:k,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",onChange:e(m)},null,8,["modelValue","onChange"])]),_:1}),o(s,{label:"\u7C7B\u578B",prop:"type"},{default:l(()=>[o(B,{modelValue:e(r).type,"onUpdate:modelValue":t[2]||(t[2]=a=>e(r).type=a),placeholder:"\u8BF7\u9009\u62E9\u7C7B\u578B",style:{width:"240px"},onChange:e(m)},{default:l(()=>[(i(),F(L,null,P([{id:1,name:"\u9ED8\u8BA4"},{id:2,name:"\u95E8\u5E97"},{id:3,name:"\u4ED3\u5E93"}],a=>o(d,{key:a.id,label:a.name,value:a.id},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"])]),_:1}),e(r).type==2?(i(),f(s,{key:0,label:"\u95E8\u5E97",prop:"store_id"},{default:l(()=>[o(B,{modelValue:e(r).store_id,"onUpdate:modelValue":t[3]||(t[3]=a=>e(r).store_id=a),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":M,loading:e(_),style:{width:"240px"},onChange:e(m)},{default:l(()=>[(i(!0),F(L,null,P(e(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})):de("",!0),o(s,null,{default:l(()=>[o(w,{type:"primary",onClick:e(m)},{default:l(()=>t[5]||(t[5]=[D("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(w,{onClick:e(S)},{default:l(()=>t[6]||(t[6]=[D("\u91CD\u7F6E")])),_:1},8,["onClick"]),o(j,{class:"ml-2.5","fetch-fun":e(I),params:e(r),"page-size":e(p).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),T((i(),f(x,{class:"!border-none",shadow:"never"},{default:l(()=>[U("div",he,[o(q,{data:e(p).lists},{default:l(()=>[o(u,{type:"selection",width:"55"}),o(u,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),o(u,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:l(({row:a})=>[o(R,{style:{width:"50px",height:"50px"},src:a.image,"preview-teleported":!0},null,8,["src"])]),_:1}),o(u,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),o(u,{label:"\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""}),o(u,{label:"\u5907\u6CE8",prop:"remark","min-width":"200","show-overflow-tooltip":""}),o(u,{label:"\u64CD\u4F5C",width:"180",fixed:"right"},{default:l(({row:a})=>[T((i(),f(w,{type:"primary",link:"",onClick:Ee=>N(a)},{default:l(()=>t[7]||(t[7]=[D(" \u5F52\u96F6 ")])),_:2},1032,["onClick"])),[[G,["statistics.negative/update_negative_zero"]]])]),_:1})]),_:1},8,["data"])]),U("div",be,[o(A,{modelValue:e(p),"onUpdate:modelValue":t[4]||(t[4]=a=>_e(p)?p.value=a:null),onChange:e(C)},null,8,["modelValue","onChange"])])]),_:1})),[[H,e(p).loading]])])}}});export{_t as default};