1 |
- import{d as X,P as j,r as i,x as B,b as G,a3 as L,o as s,c as S,f as a,A as e,a as r,a4 as Z,F as U,Q as $,C as u,D as c,k as d,E as V,a8 as tt,U as at,R as rt,S as et,I as lt,_ as _t,J as ot,V as st,W as it,X as ct,Y as mt,__tla as nt}from"./index-6e0fa573.js";import{_ as ut,__tla as pt}from"./index.vue_vue_type_script_setup_true_lang-cd12277f.js";import{_ as dt,__tla as ft}from"./DictTag.vue_vue_type_script_lang-66c5118d.js";import{E as yt,__tla as ht}from"./el-image-f27c893c.js";import{__tla as wt}from"./el-image-viewer-bd37a3c0.js";import{_ as vt,__tla as bt}from"./ContentWrap.vue_vue_type_script_setup_true_lang-bed37a76.js";import{a as gt,D as N,__tla as kt}from"./dict-33efee75.js";import{f as O,d as xt,__tla as Ct}from"./formatTime-4408999b.js";import{_ as Yt,g as Dt,c as Tt,d as Mt,__tla as St}from"./DiscountActivityForm.vue_vue_type_script_setup_true_lang-abc5788d.js";import{u as Ut,__tla as Vt}from"./useMessage-7f978edc.js";import{__tla as Nt}from"./index-99c4720b.js";import"./color-6e929987.js";import{__tla as Ot}from"./el-card-f999e23d.js";import{__tla as At}from"./Dialog-a16029e3.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Pt}from"./Form-eb11acaf.js";import{__tla as zt}from"./el-virtual-list-ea1d649a.js";import{__tla as Et}from"./el-tree-select-490c6b16.js";import{__tla as Ft}from"./el-time-select-4b083112.js";import{__tla as Ht}from"./InputPassword-ef08409c.js";import{__tla as Rt}from"./InputPassword.vue_vue_type_style_index_0_scoped_38c93dba_lang-8bbb0363.js";import{__tla as qt}from"./style.css_vue_type_style_index_0_src_true_lang-f8cebfb8.js";import{__tla as It}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-16273a08.js";import{__tla as Jt}from"./index-f34352a4.js";import{__tla as Kt}from"./UploadImg-db85e21f.js";import{__tla as Qt}from"./UploadImgs-d20458da.js";import{__tla as Wt}from"./UploadImgs.vue_vue_type_style_index_0_scoped_3d27d917_lang-eaa39ea2.js";import{__tla as Xt}from"./UploadFile-b3a5e699.js";import{__tla as jt}from"./UploadFile.vue_vue_type_style_index_0_scoped_2570c8e9_lang-4b94ac58.js";import{__tla as Bt}from"./SpuSelect.vue_vue_type_script_setup_true_lang-f8fde9e5.js";import{__tla as Gt}from"./index-e51978ae.js";import{__tla as Lt}from"./SkuList.vue_vue_type_script_setup_true_lang-8a949c88.js";import"./tree-0af4953a.js";import{__tla as Zt}from"./category-cf27cb18.js";import{__tla as $t}from"./spu-d1310ca3.js";import{__tla as ta}from"./SpuAndSkuList.vue_vue_type_script_setup_true_lang-e8d88247.js";import{__tla as aa}from"./formRules-fc997671.js";import{__tla as ra}from"./useCrudSchemas-39e04c46.js";let A,ea=Promise.all([(()=>{try{return nt}catch{}})(),(()=>{try{return pt}catch{}})(),(()=>{try{return ft}catch{}})(),(()=>{try{return ht}catch{}})(),(()=>{try{return wt}catch{}})(),(()=>{try{return bt}catch{}})(),(()=>{try{return kt}catch{}})(),(()=>{try{return Ct}catch{}})(),(()=>{try{return St}catch{}})(),(()=>{try{return Vt}catch{}})(),(()=>{try{return Nt}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return Pt}catch{}})(),(()=>{try{return zt}catch{}})(),(()=>{try{return Et}catch{}})(),(()=>{try{return Ft}catch{}})(),(()=>{try{return Ht}catch{}})(),(()=>{try{return Rt}catch{}})(),(()=>{try{return qt}catch{}})(),(()=>{try{return It}catch{}})(),(()=>{try{return Jt}catch{}})(),(()=>{try{return Kt}catch{}})(),(()=>{try{return Qt}catch{}})(),(()=>{try{return Wt}catch{}})(),(()=>{try{return Xt}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return Bt}catch{}})(),(()=>{try{return Gt}catch{}})(),(()=>{try{return Lt}catch{}})(),(()=>{try{return Zt}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ra}catch{}})()]).then(async()=>{A=X({name:"DiscountActivity",__name:"index",setup(la){const f=Ut(),{t:P}=j(),w=i(!0),k=i(0),x=i([]),_=B({pageNo:1,pageSize:10,activeTime:null,name:null,status:null}),C=i();i(!1);const m=async()=>{w.value=!0;try{const p=await Dt(_);x.value=p.list,k.value=p.total}finally{w.value=!1}},v=()=>{_.pageNo=1,m()},z=()=>{C.value.resetFields(),v()},Y=i(),D=(p,l)=>{Y.value.open(p,l)};return i([]),G(async()=>{await m()}),(p,l)=>{const E=tt,y=at,F=rt,H=et,R=lt,b=_t,n=ot,q=st,T=vt,o=it,I=yt,J=dt,K=ct,Q=ut,h=L("hasPermi"),W=mt;return s(),S(U,null,[a(T,null,{default:e(()=>[a(q,{class:"-mb-15px",model:r(_),ref_key:"queryFormRef",ref:C,inline:!0,"label-width":"68px"},{default:e(()=>[a(y,{label:"\u6D3B\u52A8\u540D\u79F0",prop:"name"},{default:e(()=>[a(E,{modelValue:r(_).name,"onUpdate:modelValue":l[0]||(l[0]=t=>r(_).name=t),placeholder:"\u8BF7\u8F93\u5165\u6D3B\u52A8\u540D\u79F0",clearable:"",onKeyup:Z(v,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(y,{label:"\u6D3B\u52A8\u72B6\u6001",prop:"status"},{default:e(()=>[a(H,{modelValue:r(_).status,"onUpdate:modelValue":l[1]||(l[1]=t=>r(_).status=t),placeholder:"\u8BF7\u9009\u62E9\u6D3B\u52A8\u72B6\u6001",clearable:"",class:"!w-240px"},{default:e(()=>[(s(!0),S(U,null,$(r(gt)(r(N).COMMON_STATUS),t=>(s(),u(F,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(y,{label:"\u6D3B\u52A8\u65F6\u95F4",prop:"activeTime"},{default:e(()=>[a(R,{modelValue:r(_).activeTime,"onUpdate:modelValue":l[2]||(l[2]=t=>r(_).activeTime=t),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-240px"},null,8,["modelValue","default-time"])]),_:1}),a(y,null,{default:e(()=>[a(n,{onClick:v},{default:e(()=>[a(b,{icon:"ep:search",class:"mr-5px"}),c(" \u641C\u7D22")]),_:1}),a(n,{onClick:z},{default:e(()=>[a(b,{icon:"ep:refresh",class:"mr-5px"}),c(" \u91CD\u7F6E")]),_:1}),d((s(),u(n,{type:"primary",plain:"",onClick:l[3]||(l[3]=t=>D("create"))},{default:e(()=>[a(b,{icon:"ep:plus",class:"mr-5px"}),c(" \u65B0\u589E\u6D3B\u52A8 ")]),_:1})),[[h,["promotion:discount-activity:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(T,null,{default:e(()=>[d((s(),u(K,{data:r(x),stripe:!0,"show-overflow-tooltip":!0},{default:e(()=>[a(o,{label:"\u6D3B\u52A8\u7F16\u53F7",prop:"id","min-width":"80"}),a(o,{label:"\u6D3B\u52A8\u540D\u79F0",prop:"name","min-width":"140"}),a(o,{label:"\u6D3B\u52A8\u65F6\u95F4","min-width":"210"},{default:e(t=>[c(V(r(O)(t.row.startTime,"YYYY-MM-DD"))+" ~ "+V(r(O)(t.row.endTime,"YYYY-MM-DD")),1)]),_:1}),a(o,{label:"\u5546\u54C1\u56FE\u7247",prop:"spuName","min-width":"80"},{default:e(t=>[a(I,{src:t.row.picUrl,class:"h-40px w-40px","preview-src-list":[t.row.picUrl],"preview-teleported":""},null,8,["src","preview-src-list"])]),_:1}),a(o,{label:"\u5546\u54C1\u6807\u9898",prop:"spuName","min-width":"300"}),a(o,{label:"\u6D3B\u52A8\u72B6\u6001",align:"center",prop:"status","min-width":"100"},{default:e(t=>[a(J,{type:r(N).COMMON_STATUS,value:t.row.status},null,8,["type","value"])]),_:1}),a(o,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:r(xt),width:"180px"},null,8,["formatter"]),a(o,{label:"\u64CD\u4F5C",align:"center",width:"150px",fixed:"right"},{default:e(t=>[d((s(),u(n,{link:"",type:"primary",onClick:M=>D("update",t.row.id)},{default:e(()=>[c(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[h,["promotion:discount-activity:update"]]]),t.row.status===0?d((s(),u(n,{key:0,link:"",type:"danger",onClick:M=>(async g=>{try{await f.confirm("\u786E\u8BA4\u5173\u95ED\u8BE5\u9650\u65F6\u6298\u6263\u6D3B\u52A8\u5417\uFF1F"),await Tt(g),f.success("\u5173\u95ED\u6210\u529F"),await m()}catch{}})(t.row.id)},{default:e(()=>[c(" \u5173\u95ED ")]),_:2},1032,["onClick"])),[[h,["promotion:discount-activity:close"]]]):d((s(),u(n,{key:1,link:"",type:"danger",onClick:M=>(async g=>{try{await f.delConfirm(),await Mt(g),f.success(P("common.delSuccess")),await m()}catch{}})(t.row.id)},{default:e(()=>[c(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[h,["promotion:discount-activity:delete"]]])]),_:1})]),_:1},8,["data"])),[[W,r(w)]]),a(Q,{total:r(k),page:r(_).pageNo,"onUpdate:page":l[4]||(l[4]=t=>r(_).pageNo=t),limit:r(_).pageSize,"onUpdate:limit":l[5]||(l[5]=t=>r(_).pageSize=t),onPagination:m},null,8,["total","page","limit"])]),_:1}),a(Yt,{ref_key:"formRef",ref:Y,onSuccess:m},null,512)],64)}}})});export{ea as __tla,A as default};
|