2024-06-14 14:27:16 +08:00
|
|
|
import{k as X,C as Y,D as T,w as M,F as O,M as j,b as q,N as K,O as ee,v as oe,I as te,L as le}from"./element-plus.78e68aed.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.3c4454b7.js";import{u as ae}from"./usePaging.6a6670f9.js";import{u as se}from"./useDictOptions.7b30efd5.js";import{d as ie,e as ne,_ as re}from"./store_product.b8597d80.js";import"./lodash.60201f64.js";import{v as pe}from"./index.2b30fcbd.js";import{d as B,Z,r as w,o as E,c as N,U as e,L as o,u as i,R as m,M as U,a as v,j as A,s as de,ap as me,K as P,S as ce}from"./@vue.18505fe0.js";import{a as _e}from"./vue-router.101084e3.js";import{a as fe}from"./store_product_unit.4dc9e6da.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.a820ae70.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 he={class:"mt-4"},we={class:"flex mt-4 justify-end"},ve=B({name:"systemStoreLists"}),be=B({...ve,emits:["onBindStore"],setup(z,{emit:$}){const c=Z({name:"",phone:""}),C=w([]),y=h=>{C.value=h.map(({id:r})=>r)};se("");const{pager:n,getLists:d,resetParams:k,resetPage:x}=ae({fetchFun:ie,params:c});d();const f=$,_=()=>{let h=n.lists.filter(r=>C.value.includes(r.id));if(!h.length)return X.error("\u8BF7\u5148\u9009\u62E9\u95E8\u5E97");f("onBindStore",h)};return(h,r)=>{const g=Y,F=T,b=M,V=O,t=j,l=q,a=K,s=ue,D=ee;return E(),N("div",null,[e(V,{class:"mb-[-16px]",model:i(c),inline:""},{default:o(()=>[e(F,{label:"\u95E8\u5E97\u540D\u79F0",prop:"name"},{default:o(()=>[e(g,{class:"w-[200px]",modelValue:i(c).name,"onUpdate:modelValue":r[0]||(r[0]=p=>i(c).name=p),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(F,{label:"\u624B\u673A\u53F7\u7801",prop:"phone"},{default:o(()=>[e(g,{class:"w-[200px]",modelValue:i(c).phone,"onUpdate:modelValue":r[1]||(r[1]=p=>i(c).phone=p),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7\u7801"},null,8,["modelValue"])]),_:1}),e(F,null,{default:o(()=>[e(b,{type:"primary",onClick:i(x)},{default:o(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(b,{onClick:i(k)},{default:o(()=>[m("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),U((E(),N("div",he,[e(a,{data:i(n).lists,onSelectionChange:y,height:300},{default:o(()=>[e(t,{type:"selection",width:"55"}),e(t,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(t,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({row:p})=>[e(l,{style:{width:"50px",height:"50px"},src:p.image},null,8,["src"])]),_:1}),e(t,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(t,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(t,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(t,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u6210\u672C\u4EF7",prop:"cost","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u91C7\u8D2D\u4EF7",prop:"purchase","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u9500\u91CF",prop:"sales","min-width":"100","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[D,i(n).loading]]),v("div",we,[e(s,{modelValue:i(n),"onUpdate:modelVa
|