2 lines
8.4 KiB
JavaScript
2 lines
8.4 KiB
JavaScript
|
import{k as Z,C as P,D as R,w as I,F as O,M as T,b as K,N,O as Q,G as W,H as X,J as Y,K as ee,I as te,L as oe}from"./element-plus.4a7d92a3.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{d as B,Z as j,r as w,o as g,c as S,U as e,L as o,u as a,aa as ae,R as s,M as ue,a as V,j as M,s as ne,K as $,T as re,a9 as se}from"./@vue.18505fe0.js";import{u as ie}from"./usePaging.6a6670f9.js";import{u as pe}from"./useDictOptions.a7406cbe.js";import{a as de}from"./store_product.56262412.js";import{a as me}from"./vue-router.101084e3.js";import{a as _e}from"./beforehand_order.17229984.js";import{a as ce}from"./system_store.4e1fa10d.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.b557d8ee.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 fe={class:"mt-4"},he={class:"flex mt-4 justify-end"},be=B({name:"systemStoreLists"}),Ce=B({...be,emits:["onBindStore"],setup(z,{emit:L}){const C=j({store_name:"",is_warehouse:1}),n=w([]);w();const b=u=>{n.value=u.map(({id:t})=>t)};pe("");const m=()=>{v()},{pager:f,getLists:v,resetParams:F,resetPage:D}=ie({fetchFun:de,params:C});v();const k=L,y=()=>{const u=f.lists.filter(t=>n.value.includes(t.id));if(!u.length)return Z.error("\u8BF7\u5148\u9009\u62E9\u5546\u54C1");k("onBindStore",u)};return(u,t)=>{const i=P,_=R,c=I,x=O,p=T,U=K,E=N,r=le,A=Q;return g(),S("div",null,[e(x,{class:"mb-[-16px]",model:a(C),inline:""},{default:o(()=>[e(_,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:o(()=>[e(i,{class:"w-[200px]",modelValue:a(C).store_name,"onUpdate:modelValue":t[0]||(t[0]=h=>a(C).store_name=h),onKeydown:t[1]||(t[1]=ae(h=>m(),["enter"])),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(_,null,{default:o(()=>[e(c,{type:"primary",onClick:a(D)},{default:o(()=>[s("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(c,{onClick:a(F)},{default:o(()=>[s("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),ue((g(),S("div",fe,[e(E,{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"])])),[[A,a(f).loading]]),V("div",he,[e(r,{modelValue:a(f),"onUpdate:modelValue":t[2]||(t[2]=h=>M(f)?f.value=h:null),onChange:a(v)},null,8,["modelValue","onChange"])]),e(c,{class:"w-full mt-4",type:"primary",onClick:y},{default:o(()=>[s("\u6DFB\u52A0\u5546\u54C1")]),_:1})])}}}),ve=V("div",{class:"mb-4 text-lg font-bold"},"\u9884\u5B9A\u5355\u6DFB\u52A0",-1),Ee={class:"flex-1 w-full"},we={class:"mb-2"},ge=B({name:"storeProductEdit"}),nt=B({...ge,props:{dic
|