2 lines
19 KiB
JavaScript
2 lines
19 KiB
JavaScript
|
import{k as _e,C as W,D as X,w as $,F as ee,M as le,b as ue,N as oe,O as fe,S as ge,T as Ve,G as ce,H as be,U as Fe,J as ye,K as we,v as Ee,I as Ce,L as he}from"./element-plus.91c68cc0.js";import{_ as De}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{d as P,Z as q,r as E,o as K,c as S,U as e,L as o,u as a,aa as Y,R as b,M as ve,a as D,j,s as Be,T as Q,a9 as Ue,K as ke,S as Ke,n as A}from"./@vue.76ce7aa3.js";import{u as Ae}from"./usePaging.f8c888e4.js";import{u as qe}from"./useDictOptions.bbcac283.js";import{a as te,b as Se}from"./store_product.77fb3e55.js";import{a as Pe}from"./vue-router.10bd5b90.js";import{a as Ie}from"./beforehand_order.609f16aa.js";import{a as Le}from"./system_store.7c50d15d.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.892cd835.js";import"./lodash.4e6d2a38.js";import"./axios.659d5af3.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.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 Re={class:"mt-4"},xe={class:"flex mt-4 justify-end"},Te=P({name:"systemStoreLists"}),Ne=P({...Te,emits:["onBindStore"],setup(ae,{emit:H}){const v=q({store_name:"",product_type:0,is_warehouse:1}),s=E([]);E();const I=C=>{s.value=C.map(({id:f})=>f)};qe("");const B=()=>{g()},{pager:c,getLists:g,resetParams:L,resetPage:R}=Ae({fetchFun:te,params:v});g();const x=H,T=()=>{const C=c.lists.filter(f=>s.value.includes(f.id));if(!C.length)return _e.error("\u8BF7\u5148\u9009\u62E9\u5546\u54C1");x("onBindStore",C)};return(C,f)=>{const U=W,w=X,h=$,N=ee,F=le,i=ue,V=oe,M=De,n=fe;return K(),S("div",null,[e(N,{class:"mb-[-16px]",model:a(v),inline:""},{default:o(()=>[e(w,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:o(()=>[e(U,{class:"w-[200px]",modelValue:a(v).store_name,"onUpdate:modelValue":f[0]||(f[0]=l=>a(v).store_name=l),onKeydown:f[1]||(f[1]=Y(l=>B(),["enter"])),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(w,null,{default:o(()=>[e(h,{type:"primary",onClick:a(R)},{default:o(()=>f[3]||(f[3]=[b("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(h,{onClick:a(L)},{default:o(()=>f[4]||(f[4]=[b("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),ve((K(),S("div",Re,[e(V,{data:a(c).lists,onSelectionChange:I,height:300},{default:o(()=>[e(F,{type:"selection",width:"55"}),e(F,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(F,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({row:l})=>[e(i,{style:{width:"50px",height:"50px"},src:l.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(F,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(F,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(F,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(F,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),e(F,{label:"\u4ED3\u5E93\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[n,a(c).loading]]),D("div",xe,[e(M,{modelValue:a(c),"onUpdate:modelValue":f[2]||(f[2]=l=>j(c)?c.value=l:null),onChange:a(g)},null,8,["modelValue","onChange"])]),e(h,{class:"w-full mt-4",type:"primary",onClick:T},{default:o(()=>f[5]||(f[5]=[b("\u6DFB\u52A0\u5546\u5
|