2 lines
16 KiB
JavaScript
2 lines
16 KiB
JavaScript
|
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.4a7d92a3.js";import{_ as Ee}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.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.a0f95660.js";import{a as te,b as Se}from"./store_product.287da381.js";import{a as Pe}from"./vue-router.101084e3.js";import{a as Ie}from"./beforehand_order.fe6ada9b.js";import{a as Le}from"./system_store.388b00e0.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.c7609165.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 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-
|