2024-11-01 21:16:00 +08:00
|
|
|
import{k as me,C as Q,D as W,w as X,F as $,M as ee,b as le,N as oe,O as _e,S as fe,T as ce,G as he,H as Ve,U as ge,J as be,K as we,v as ye,I as Ce,L as ve}from"./element-plus.a63a26dd.js";import{_ as Ee}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import{d as I,Z as M,r as C,o as K,c as P,U as e,L as u,u as a,aa as O,R as g,M as De,a as D,j as Y,s as Fe,T as Z,a9 as Ue,K as Be,S as ke,n as S}from"./@vue.18505fe0.js";import{u as Ke}from"./usePaging.6a6670f9.js";import{u as Ae}from"./useDictOptions.f757f46e.js";import{a as te,b as Se}from"./store_product.22e2a1b2.js";import{a as Pe}from"./vue-router.101084e3.js";import{a as Ie}from"./beforehand_order.c8bd3ceb.js";import{a as Le}from"./system_store.0a321149.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.4884cfc2.js";import"./axios.932d3f8a.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.914e16f9.js";import"./lodash.2473fc51.js";import"./pinia.a969beab.js";import"./css-color-function.9f6a56f3.js";import"./color.d1bc3784.js";import"./clone.83700f2e.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.fcc9be76.js";import"./vue-clipboard3.9e751565.js";import"./clipboard.dda64e67.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const qe={class:"mt-4"},Re={class:"flex mt-4 justify-end"},Te=I({name:"systemStoreLists"}),Ne=I({...Te,emits:["onBindStore"],setup(ue,{emit:j}){const F=M({store_name:"",product_type:0,is_warehouse:1}),p=C([]);C();const L=v=>{p.value=v.map(({id:h})=>h)};Ae("");const U=()=>{c()},{pager:V,getLists:c,resetParams:q,resetPage:R}=Ke({fetchFun:te,params:F});c();const A=j,T=()=>{const v=V.lists.filter(h=>p.value.includes(h.id));if(!v.length)return me.error("\u8BF7\u5148\u9009\u62E9\u5546\u54C1");A("onBindStore",v)};return(v,h)=>{const B=Q,y=W,E=X,N=$,b=ee,i=le,f=oe,n=Ee,l=_e;return K(),P("div",null,[e(N,{class:"mb-[-16px]",model:a(F),inline:""},{default:u(()=>[e(y,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:u(()=>[e(B,{class:"w-[200px]",modelValue:a(F).store_name,"onUpdate:modelValue":h[0]||(h[0]=s=>a(F).store_name=s),onKeydown:h[1]||(h[1]=O(s=>U(),["enter"])),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(y,null,{default:u(()=>[e(E,{type:"primary",onClick:a(R)},{default:u(()=>[g("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(E,{onClick:a(q)},{default:u(()=>[g("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),De((K(),P("div",qe,[e(f,{data:a(V).lists,onSelectionChange:L,height:300},{default:u(()=>[e(b,{type:"selection",width:"55"}),e(b,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(b,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:u(({row:s})=>[e(i,{style:{width:"50px",height:"50px"},src:s.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(b,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(b,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(b,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(b,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),e(b,{label:"\u4ED3\u5E93\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[l,a(V).loading]]),D("div",Re,[e(n,{modelValue:a(V),"onUpdate:modelValue":h[2]||(h[2]=s=>Y(V)?V.value=s:null),onChange:a(c)},null,8,["modelValue","onChange"])]),e(E,{class:"w-full mt-4",type:"primary",onClick:T},{default:u(()=>[g("\u6DFB\u52A0\u5546\u54C1")]),_:1})])}}}),xe=D("div",{class:"mb-4 text-lg font-bold"},"\u9884\u5B9A\u5355\u6DFB\u52A0",-1),Me={class:"flex-1 w-
|