2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
|
import{k as oe,C as O,D as N,w as j,F as M,M as z,b as G,N as H,O as le,G as te,H as ae,J as ue,K as ne,I as se,L as re}from"./element-plus.4a7d92a3.js";import{_ as pe}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{d as D,Z as P,r as E,o as F,c as q,U as l,L as a,u as d,aa as J,R as g,M as de,a as B,j as Z,s as ie,K as T,T as me,a9 as _e,n as v}from"./@vue.18505fe0.js";import{u as ce}from"./usePaging.6a6670f9.js";import{u as fe}from"./useDictOptions.a5324ab4.js";import{a as ge,b as he}from"./store_product.e5ee1cc4.js";import{a as Ve}from"./vue-router.101084e3.js";import{a as be}from"./beforehand_order.94ae6162.js";import{a as Ce}from"./system_store.8a268cdf.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.3ee06ac6.js";import"./lodash.9dc701ad.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.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const we={class:"mt-4"},ye={class:"flex mt-4 justify-end"},ve=D({name:"systemStoreLists"}),Ee=D({...ve,emits:["onBindStore"],setup(Q,{emit:R}){const w=P({store_name:"",is_warehouse:1}),_=E([]);E();const U=b=>{_.value=b.map(({id:r})=>r)};fe("");const C=()=>{y()},{pager:i,getLists:y,resetParams:k,resetPage:K}=ce({fetchFun:ge,params:w});y();const S=R,A=()=>{const b=i.lists.filter(r=>_.value.includes(r.id));if(!b.length)return oe.error("\u8BF7\u5148\u9009\u62E9\u5546\u54C1");S("onBindStore",b)};return(b,r)=>{const c=O,u=N,e=j,n=M,s=z,f=G,V=H,I=pe,L=le;return F(),q("div",null,[l(n,{class:"mb-[-16px]",model:d(w),inline:""},{default:a(()=>[l(u,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:a(()=>[l(c,{class:"w-[200px]",modelValue:d(w).store_name,"onUpdate:modelValue":r[0]||(r[0]=h=>d(w).store_name=h),onKeydown:r[1]||(r[1]=J(h=>C(),["enter"])),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),l(u,null,{default:a(()=>[l(e,{type:"primary",onClick:d(K)},{default:a(()=>[g("\u67E5\u8BE2")]),_:1},8,["onClick"]),l(e,{onClick:d(k)},{default:a(()=>[g("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),de((F(),q("div",we,[l(V,{data:d(i).lists,onSelectionChange:U,height:300},{default:a(()=>[l(s,{type:"selection",width:"55"}),l(s,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),l(s,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:a(({row:h})=>[l(f,{style:{width:"50px",height:"50px"},src:h.image,"preview-teleported":!0},null,8,["src"])]),_:1}),l(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),l(s,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),l(s,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),l(s,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),l(s,{label:"\u4ED3\u5E93\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[L,d(i).loading]]),B("div",ye,[l(I,{modelValue:d(i),"onUpdate:modelValue":r[2]||(r[2]=h=>Z(i)?i.value=h:null),onChange:d(y)},null,8,["modelValue","onChange"])]),l(e,{class:"w-full mt-4",type:"primary",onClick:A},{default:a(()=>[g("\u6DFB\u52A0\u5546\u54C1")]),_:1})])}}}),Fe=B("div",{class:"mb-4 text-lg font-bold"},"\u9884\u5B9A\u5355\u6DFB\u52A0",-1),Be={class:"flex-1 w-full"},Ke={class:"mb-2"},De=D({name:"storeProductEdit"}),_o=D(
|