2 lines
13 KiB
JavaScript
2 lines
13 KiB
JavaScript
|
import{k as re,C as Z,D as Q,w as W,F as X,M as Y,b as $,N as ee,O as pe,G as ie,H as de,J as me,K as _e,I as ce,L as fe}from"./element-plus.4a7d92a3.js";import{_ as he}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{d as A,Z as O,r as b,o as k,c as P,U as o,L as a,u as r,aa as j,R as g,M as ge,a as B,j as M,s as Ve,T as J,a9 as we,K as be,n as S}from"./@vue.18505fe0.js";import{u as Ce}from"./usePaging.6a6670f9.js";import{u as ve}from"./useDictOptions.534b4fd1.js";import{a as oe,b as ye}from"./store_product.518b1c20.js";import{a as Ee}from"./vue-router.101084e3.js";import{a as Fe}from"./beforehand_order.0123a355.js";import{a as De}from"./system_store.971387b9.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.970ee901.js";import"./lodash.9dc701ad.js";import"./pinia.a969beab.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.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const Ke={class:"mt-4"},ke={class:"flex mt-4 justify-end"},Be=A({name:"systemStoreLists"}),Ue=A({...Be,emits:["onBindStore"],setup(le,{emit:x}){const E=O({store_name:"",product_type:0,is_warehouse:1}),m=b([]);b();const L=v=>{m.value=v.map(({id:f})=>f)};ve("");const F=()=>{c()},{pager:h,getLists:c,resetParams:I,resetPage:q}=Ce({fetchFun:oe,params:E});c();const U=x,R=()=>{const v=h.lists.filter(f=>m.value.includes(f.id));if(!v.length)return re.error("\u8BF7\u5148\u9009\u62E9\u5546\u54C1");U("onBindStore",v)};return(v,f)=>{const D=Z,C=Q,y=W,T=X,V=Y,p=$,_=ee,u=he,l=pe;return k(),P("div",null,[o(T,{class:"mb-[-16px]",model:r(E),inline:""},{default:a(()=>[o(C,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:a(()=>[o(D,{class:"w-[200px]",modelValue:r(E).store_name,"onUpdate:modelValue":f[0]||(f[0]=n=>r(E).store_name=n),onKeydown:f[1]||(f[1]=j(n=>F(),["enter"])),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(C,null,{default:a(()=>[o(y,{type:"primary",onClick:r(q)},{default:a(()=>[g("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(y,{onClick:r(I)},{default:a(()=>[g("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),ge((k(),P("div",Ke,[o(_,{data:r(h).lists,onSelectionChange:L,height:300},{default:a(()=>[o(V,{type:"selection",width:"55"}),o(V,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),o(V,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:a(({row:n})=>[o(p,{style:{width:"50px",height:"50px"},src:n.image,"preview-teleported":!0},null,8,["src"])]),_:1}),o(V,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),o(V,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),o(V,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),o(V,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),o(V,{label:"\u4ED3\u5E93\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[l,r(h).loading]]),B("div",ke,[o(u,{modelValue:r(h),"onUpdate:modelValue":f[2]||(f[2]=n=>M(h)?h.value=n:null),onChange:r(c)},null,8,["modelValue","onChange"])]),o(y,{class:"w-full mt-4",type:"primary",onClick:R},{default:a(()=>[g("\u6DFB\u52A0\u5546\u54C1")]),_:1})])}}}),Se=B("div",{class:"mb-4 text-lg font-bold"},"\u9884\u5B9A\u5355\u6DFB\u52A0",-1),Pe={class:"flex-1 w-full"},Ae={class:"mb-2"},Le=A({name:"storePr
|