2024-07-10 17:12:02 +08:00
|
|
|
import{k as oe,C as te,D as M,w as O,F as j,M as G,b as q,N as H,O as le,G as ue,H as ae,v as se,I as ie,L as ne}from"./element-plus.3c0fdbfa.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_lang.851e89b1.js";import{d as F,Z,r as w,o as C,c as K,U as e,L as o,u as s,aa as pe,R as p,M as A,a as h,j as y,s as de,ap as me,K as U,S as _e}from"./@vue.18505fe0.js";import{u as ce}from"./usePaging.6a6670f9.js";import{u as fe}from"./useDictOptions.c9681ef9.js";import{d as we,e as he,_ as ve}from"./store_product.07620035.js";import"./lodash.60201f64.js";import{w as Ee}from"./index.534b9dcb.js";import{a as be}from"./vue-router.101084e3.js";import{a as Ce}from"./store_product_unit.5b892e8e.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.8ae0c638.js";import"./axios.2b8d80bd.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./system_store.b2417c65.js";import"./pinia.a969beab.js";import"./css-color-function.b82a2ce7.js";import"./color.b905eb26.js";import"./clone.e1fb2883.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.495afef3.js";import"./vue-clipboard3.cb649e18.js";import"./clipboard.4592e390.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const ge={class:"mt-4"},Be={class:"flex mt-4 justify-end"},De=F({name:"systemStoreLists"}),ye=F({...De,emits:["onBindStore"],setup(z,{emit:$}){const b=Z({store_name:""}),g=w([]),k=E=>{g.value=E.map(({id:d})=>d)};fe("");const{pager:r,getLists:m,resetParams:x,resetPage:B}=ce({fetchFun:we,params:b});m();const v=$,_=()=>{let E=r.lists.filter(d=>g.value.includes(d.id));if(!E.length)return oe.error("\u8BF7\u5148\u9009\u62E9\u95E8\u5E97");v("onBindStore",E)};return(E,d)=>{const V=te,S=M,c=O,L=j,n=G,i=q,t=H,u=re,a=le;return C(),K("div",null,[e(L,{class:"mb-[-16px]",model:s(b),inline:""},{default:o(()=>[e(S,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:o(()=>[e(V,{class:"w-[200px]",modelValue:s(b).store_name,"onUpdate:modelValue":d[0]||(d[0]=f=>s(b).store_name=f),onKeydown:pe(s(B),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue","onKeydown"])]),_:1}),e(S,null,{default:o(()=>[e(c,{type:"primary",onClick:s(B)},{default:o(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(c,{onClick:s(x)},{default:o(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),A((C(),K("div",ge,[e(t,{data:s(r).lists,onSelectionChange:k,height:300},{default:o(()=>[e(n,{type:"selection",width:"55"}),e(n,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(n,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({row:f})=>[e(i,{style:{width:"50px",height:"50px"},src:f.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(n,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(n,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(n,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(n,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),e(n,{label:"\u6210\u672C\u4EF7",prop:"cost","min-width":"100","show-overflow-tooltip":""}),e(n,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase","min-width":"100","show-overflow-tooltip":""}),e(n,{label:"\u552E\u5356\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""}),e(n,{label:"\u5151\u6362\u5E93\u5B58",prop:"swap","min-width":"100","show-overflow-tooltip":""}),e(n,{label:"\u9500\u91CF",prop:"sales","min-width":"100","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[a,s(r).loading]]),h("div",Be,[e(u,{modelValue:s(r),"onUpdate:modelValue":d[1]||(d[1]=f=>y(r)?r.value=f:null),onChang
|