moreShopAdmin/dist/admin/assets/add.2e605a3f.js

2 lines
19 KiB
JavaScript
Raw Permalink Normal View History

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