2 lines
20 KiB
JavaScript
2 lines
20 KiB
JavaScript
|
import{k as Ce,C as se,D as de,w as ie,F as pe,M as me,b as _e,N as fe,O as De,S as he,T as ve,G as Be,H as Ue,U as ke,J as Ke,K as Ae,v as qe,I as Ie,L as Se}from"./element-plus.91c68cc0.js";import{_ as Pe}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{d as x,Z as T,r as y,o as h,c as P,U as e,L as t,u as a,aa as J,R as c,M as Le,a as K,j as Z,s as Re,T as H,a9 as re,K as G,S as Te,n as R}from"./@vue.76ce7aa3.js";import{u as xe}from"./usePaging.f8c888e4.js";import{u as Me}from"./useDictOptions.8c96604e.js";import{a as ge,b as Ne}from"./store_product.809eb5bd.js";import{a as Oe}from"./vue-router.10bd5b90.js";import{a as Ye}from"./beforehand_order.41fdb68a.js";import{a as $e}from"./system_store.031ca026.js";import{f as ne,h as je}from"./index.b1b01f62.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"./lodash.905d29aa.js";import"./axios.74873e41.js";import"./jspdf.9e946b0e.js";import"./fflate.0418c72f.js";import"./pinia.f3529286.js";import"./css-color-function.5dec0992.js";import"./color.f3e3a53f.js";import"./clone.8eedf8fa.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 ze={class:"mt-4"},He={class:"flex mt-4 justify-end"},Ge=x({name:"systemStoreLists"}),Je=x({...Ge,props:{userId:Number},emits:["onBindStore"],setup(Q,{emit:W}){const r=T({store_name:"",product_type:0,is_warehouse:1,user_id:Q.userId}),L=y([]);y();const q=B=>{L.value=B.map(({id:g})=>g)};Me("");const v=()=>{I()},{pager:V,getLists:I,resetParams:M,resetPage:N}=xe({fetchFun:ge,params:r});I();const O=W,Y=()=>{const B=V.lists.filter(g=>L.value.includes(g.id));if(!B.length)return Ce.error("\u8BF7\u5148\u9009\u62E9\u5546\u54C1");O("onBindStore",B)};return(B,g)=>{const S=se,C=de,U=ie,$=pe,E=me,d=_e,F=fe,j=Pe,A=De;return h(),P("div",null,[e($,{class:"mb-[-16px]",model:a(r),inline:""},{default:t(()=>[e(C,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:t(()=>[e(S,{class:"w-[200px]",modelValue:a(r).store_name,"onUpdate:modelValue":g[0]||(g[0]=w=>a(r).store_name=w),onKeydown:g[1]||(g[1]=J(w=>v(),["enter"])),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(C,null,{default:t(()=>[e(U,{type:"primary",onClick:a(N)},{default:t(()=>g[3]||(g[3]=[c("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(U,{onClick:a(M)},{default:t(()=>g[4]||(g[4]=[c("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),Le((h(),P("div",ze,[e(F,{data:a(V).lists,onSelectionChange:q,height:300},{default:t(()=>[e(E,{type:"selection",width:"55"}),e(E,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(E,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:t(({row:w})=>[e(d,{style:{width:"50px",height:"50px"},src:w.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(E,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(E,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(E,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(E,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),e(E,{label:"\u4ED3\u5E93\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[A,a(V).loading]]),K("div",He,[e(j,{modelValue:a(V),"onUpdate:modelValue":g[2]||(g[2]=w=>Z(V)?V.value=w:null),onChange:a(I)},null,8,["modelValue","onChange"])]),e(U,{class:"w-full mt-4",type:"pri
|