2024-11-04 16:36:48 +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 Ve,H as ge,U as he,J as be,K as ye,v as we,I as Ce,L as Ee}from"./element-plus.2c2b06a1.js";import{_ as ve}from"./index.vue_vue_type_script_setup_true_lang.7141614b.js";import{d as I,Z as M,r as C,o as K,c as P,U as e,L as t,u as a,aa as O,R as h,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.ef6d9aac.js";import{a as te,b as Se}from"./store_product.3526ce4a.js";import{a as Pe}from"./vue-router.101084e3.js";import{a as Ie}from"./beforehand_order.0b30540b.js";import{a as Le}from"./system_store.2b5b8887.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.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.cf2bd585.js";import"./lodash.4e6d2a38.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.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.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.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}),d=C([]);C();const L=E=>{d.value=E.map(({id:V})=>V)};Ae("");const U=()=>{c()},{pager:g,getLists:c,resetParams:q,resetPage:R}=Ke({fetchFun:te,params:F});c();const A=j,T=()=>{const E=g.lists.filter(V=>d.value.includes(V.id));if(!E.length)return me.error("\u8BF7\u5148\u9009\u62E9\u5546\u54C1");A("onBindStore",E)};return(E,V)=>{const B=Q,w=W,v=X,N=$,b=ee,i=le,f=oe,s=ve,l=_e;return K(),P("div",null,[e(N,{class:"mb-[-16px]",model:a(F),inline:""},{default:t(()=>[e(w,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:t(()=>[e(B,{class:"w-[200px]",modelValue:a(F).store_name,"onUpdate:modelValue":V[0]||(V[0]=n=>a(F).store_name=n),onKeydown:V[1]||(V[1]=O(n=>U(),["enter"])),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(w,null,{default:t(()=>[e(v,{type:"primary",onClick:a(R)},{default:t(()=>[h("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(v,{onClick:a(q)},{default:t(()=>[h("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),De((K(),P("div",qe,[e(f,{data:a(g).lists,onSelectionChange:L,height:300},{default:t(()=>[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:t(({row:n})=>[e(i,{style:{width:"50px",height:"50px"},src:n.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(g).loading]]),D("div",Re,[e(s,{modelValue:a(g),"onUpdate:modelValue":V[2]||(V[2]=n=>Y(g)?g.value=n:null),onChange:a(c)},null,8,["modelValue","onChange"])]),e(v,{class:"w-full mt-4",type:"primary",onClick:T},{default:t(()=>[h("\u6DFB\u52A0\u5546\u54C1")]),_:1})])}}}),xe=D("div",{cla
|