2 lines
12 KiB
JavaScript
Raw Permalink Normal View History

2025-03-20 10:25:32 +08:00
import{M as le,N as ue,O as be,k as we,B as ae,C as re,w as ne,D as se,b as ie,S as Ce,T as he,I as ge,K as ye,G as Ee,H as Ve,Q as De,L as Fe}from"./element-plus.2acb577d.js";import{_ as Be}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{d as T,Z as R,r as v,o as D,c as N,U as t,L as l,u as a,aa as W,R as w,M as ke,a as C,i as Z,K as z,T as oe,a9 as Ue,Q as Ie,S as H,n as x}from"./@vue.821a47ec.js";import{u as Ke}from"./usePaging.23706826.js";import{u as Se}from"./useDictOptions.4fbfb4d7.js";import{b as de,c as Ae}from"./store_product.b6de24f6.js";import{a as Pe}from"./vue-router.4c04f9b6.js";import{a as Le}from"./purchase_order.3f111107.js";import{r as xe}from"./index.81df6f20.js";import"./lodash-es.df44a280.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.81e2759c.js";import"./@element-plus.dabbc398.js";import"./dayjs.d2a77ee0.js";import"./axios.9e996410.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.6bfd3540.js";import"./pinia.fefed778.js";import"./css-color-function.8ff67959.js";import"./color.bfa08e9a.js";import"./clone.660f80c4.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.dcb32030.js";import"./vue-clipboard3.e681583f.js";import"./clipboard.3ad9b20b.js";import"./echarts.42bea269.js";import"./tslib.60310f1a.js";import"./zrender.2cb48b70.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8864a4be.js";const Re={class:"mt-4"},Ne={class:"flex mt-4 justify-end"},Te=T({name:"systemStoreLists"}),$e=T({...Te,props:{userId:Number,storeId:Number,order_type:Number},emits:["onBindStore"],setup(S,{emit:J}){const F=S,n=R({store_name:"",is_warehouse:1,user_id:F.userId,store_id:F.storeId,order_type:F.order_type,type_filter:1}),A=v([]);v();const U=b=>{A.value=b.map(({id:d})=>d)};Se("");const h=b=>{I(),b.preventDefault()},{pager:m,getLists:I,resetParams:$,resetPage:O}=Ke({fetchFun:de,params:n});I();const M=J,q=()=>{const b=m.lists.filter(d=>A.value.includes(d.id));if(!b.length)return we.error("\u8BF7\u5148\u9009\u62E9\u5546\u54C1");M("onBindStore",b)};return(b,d)=>{const g=ae,B=re,K=ne,j=se,i=le,k=ie,G=ue,P=Be,X=be;return D(),N("div",null,[t(j,{class:"mb-[-16px]",model:a(n),inline:""},{default:l(()=>[t(B,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:l(()=>[t(g,{class:"w-[200px]",modelValue:a(n).store_name,"onUpdate:modelValue":d[0]||(d[0]=y=>a(n).store_name=y),onKeydown:W(h,["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),t(B,null,{default:l(()=>[t(K,{type:"primary",onClick:a(O)},{default:l(()=>d[2]||(d[2]=[w("\u67E5\u8BE2")])),_:1},8,["onClick"]),t(K,{onClick:a($)},{default:l(()=>d[3]||(d[3]=[w("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),ke((D(),N("div",Re,[t(G,{data:a(m).lists,onSelectionChange:U,height:300},{default:l(()=>[t(i,{type:"selection",width:"55"}),t(i,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),t(i,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:l(({row:y})=>[t(k,{style:{width:"50px",height:"50px"},src:y.image,"preview-teleported":!0},null,8,["src"])]),_:1}),t(i,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),t(i,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),t(i,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),t(i,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),t(i,{label:"\u4ED3\u5E93\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[X,a(m).loading]]),C("div",Ne,[t(P,{modelValue:a(m),"onUpdate:modelValue":d[1]||(d[1]=y=>Z(m)?m.value=y:null),onChange:a(I)},null,8,["modelValue","onChange"])]),t(K,{class:"w-full mt-4",type:"primary",onClick:q},{default:l(()=>d[4]||(d[4]=[w("\u6DFB\u52A0\u5546\u54C1")])),_:1