moreShopAdmin/dist/admin/assets/add.ce88a494.js

2 lines
20 KiB
JavaScript
Raw Normal View History

2024-12-04 11:31:58 +08:00
import{k as fe,C as X,D as ee,w as le,F as ue,M as oe,b as te,N as ae,O as ge,S as Ve,T as be,G as ce,H as Fe,U as ye,J as Ce,K as Ee,v as we,I as De,L as he}from"./element-plus.91c68cc0.js";import{_ as ve}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{d as I,Z as S,r as w,o as K,c as P,U as e,L as o,u as a,aa as j,R as g,M as Be,a as h,j as H,s as Ue,T as W,a9 as ke,K as Ke,S as Ae,n as q}from"./@vue.76ce7aa3.js";import{u as qe}from"./usePaging.f8c888e4.js";import{u as Se}from"./useDictOptions.4554333f.js";import{a as re,b as Pe}from"./store_product.67afcafd.js";import{a as Ie}from"./vue-router.10bd5b90.js";import{a as Le}from"./beforehand_order.37cd09fa.js";import{a as Re}from"./system_store.a15246e4.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"./index.9db0dab2.js";import"./lodash.4e6d2a38.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./pinia.f3529286.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.8d65305c.js";const Te={class:"mt-4"},xe={class:"flex mt-4 justify-end"},Ne=I({name:"systemStoreLists"}),Oe=I({...Ne,emits:["onBindStore"],setup(ne,{emit:z}){const v=S({store_name:"",product_type:0,is_warehouse:1}),n=w([]);w();const L=D=>{n.value=D.map(({id:f})=>f)};Se("");const U=()=>{V()},{pager:c,getLists:V,resetParams:R,resetPage:T}=qe({fetchFun:re,params:v});V();const x=z,N=()=>{const D=c.lists.filter(f=>n.value.includes(f.id));if(!D.length)return fe.error("\u8BF7\u5148\u9009\u62E9\u5546\u54C1");x("onBindStore",D)};return(D,f)=>{const A=X,B=ee,C=le,k=ue,y=oe,O=te,i=ae,b=ve,M=ge;return K(),P("div",null,[e(k,{class:"mb-[-16px]",model:a(v),inline:""},{default:o(()=>[e(B,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:o(()=>[e(A,{class:"w-[200px]",modelValue:a(v).store_name,"onUpdate:modelValue":f[0]||(f[0]=r=>a(v).store_name=r),onKeydown:f[1]||(f[1]=j(r=>U(),["enter"])),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(B,null,{default:o(()=>[e(C,{type:"primary",onClick:a(T)},{default:o(()=>f[3]||(f[3]=[g("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(C,{onClick:a(R)},{default:o(()=>f[4]||(f[4]=[g("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),Be((K(),P("div",Te,[e(i,{data:a(c).lists,onSelectionChange:L,height:300},{default:o(()=>[e(y,{type:"selection",width:"55"}),e(y,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(y,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({row:r})=>[e(O,{style:{width:"50px",height:"50px"},src:r.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(y,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(y,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(y,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(y,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),e(y,{label:"\u4ED3\u5E93\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[M,a(c).loading]]),h("div",xe,[e(b,{modelValue:a(c),"onUpdate:modelValue":f[2]||(f[2]=r=>H(c)?c.value=r:null),onChange:a(V)},null,8,["modelValue","onChange"])]),e(C,{class:"w-full mt-4",type:"primary",onClick:N},{default:o(()=>f[5]||(f[5]=[g("\u6DFB\u52A0