moreShopAdmin/build/admin/assets/add.958a1905.js

2 lines
9.3 KiB
JavaScript
Raw Normal View History

2024-10-18 11:10:49 +08:00
import{k as Z,C as $,D as R,w as I,F as M,M as O,b as T,N as K,O as Q,G as W,H as X,U as ee,J as le,K as te,I as oe,L as ae}from"./element-plus.4a7d92a3.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{d as D,Z as N,r as v,o as w,c as S,U as e,L as o,u as a,aa as ne,R as i,M as re,a as F,j as Y,s as se,K as P,T as de,a9 as ie}from"./@vue.18505fe0.js";import{u as pe}from"./usePaging.6a6670f9.js";import{u as me}from"./useDictOptions.b027b472.js";import{a as _e}from"./store_product.f1012f05.js";import{a as ce}from"./vue-router.101084e3.js";import{a as fe}from"./beforehand_order.8d40cf80.js";import{a as he}from"./system_store.c7d57ffd.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.9fc4c153.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 be={class:"mt-4"},Ve={class:"flex mt-4 justify-end"},Ce=D({name:"systemStoreLists"}),Ee=D({...Ce,emits:["onBindStore"],setup(j,{emit:L}){const V=N({store_name:"",is_warehouse:1}),u=v([]);v();const b=n=>{u.value=n.map(({id:l})=>l)};me("");const _=()=>{C()},{pager:f,getLists:C,resetParams:g,resetPage:B}=pe({fetchFun:_e,params:V});C();const k=L,y=()=>{const n=f.lists.filter(l=>u.value.includes(l.id));if(!n.length)return Z.error("\u8BF7\u5148\u9009\u62E9\u5546\u54C1");k("onBindStore",n)};return(n,l)=>{const r=$,s=R,c=I,x=M,p=O,U=T,A=K,E=ue,d=Q;return w(),S("div",null,[e(x,{class:"mb-[-16px]",model:a(V),inline:""},{default:o(()=>[e(s,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:o(()=>[e(r,{class:"w-[200px]",modelValue:a(V).store_name,"onUpdate:modelValue":l[0]||(l[0]=h=>a(V).store_name=h),onKeydown:l[1]||(l[1]=ne(h=>_(),["enter"])),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(s,null,{default:o(()=>[e(c,{type:"primary",onClick:a(B)},{default:o(()=>[i("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(c,{onClick:a(g)},{default:o(()=>[i("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),re((w(),S("div",be,[e(A,{data:a(f).lists,onSelectionChange:b,height:300},{default:o(()=>[e(p,{type:"selection",width:"55"}),e(p,{label:"\u5546\u54C1ID",prop:"product_id","show-overflow-tooltip":""}),e(p,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({row:h})=>[e(U,{style:{width:"50px",height:"50px"},src:h.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(p,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(p,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(p,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(p,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),e(p,{label:"\u4ED3\u5E93\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[d,a(f).loading]]),F("div",Ve,[e(E,{modelValue:a(f),"onUpdate:modelValue":l[2]||(l[2]=h=>Y(f)?f.value=h:null),onChange:a(C)},null,8,["modelValue","onChange"])]),e(c,{class:"w-full mt-4",type:"primary",onClick:y},{default:o(()=>[i("\u6DFB\u52A0\u5546\u54C1")]),_:1})])}}}),ve=F("div",{class:"mb-4 text-lg font-bold"},"\u9884\u5B9A\u5355\u6DFB\u52A0",-1),we={class:"flex-1 w-full"},Fe={class:"mb-2"},ge=D({name:"storeProductEdit"}),sl=D({..