1 |
- import{d as I,B as J,r as i,f as X,z as Q,S as W,o as s,c as S,i as a,w as e,a as r,T as Z,F as U,C as $,j as p,m as c,D as d,t as V,X as tt,I as at,G as rt,H as et,p as lt,_ as _t,q as ot,J as st,K as it,L as ct,M as mt,__tla as nt}from"./index-1e808f2e.js";import{_ as pt,__tla as ut}from"./index.vue_vue_type_script_setup_true_lang-571824c6.js";import{_ as dt,__tla as ft}from"./DictTag.vue_vue_type_script_lang-5c02ebfe.js";import{E as yt,__tla as ht}from"./el-image-263fb014.js";import{__tla as wt}from"./el-image-viewer-dddb6285.js";import{_ as vt,__tla as gt}from"./ContentWrap.vue_vue_type_script_setup_true_lang-cc335a20.js";import{a as bt,D as N,__tla as kt}from"./dict-a31cb4ba.js";import{f as z,d as xt,__tla as Ct}from"./formatTime-a348c3be.js";import{_ as Tt,g as Yt,c as Dt,d as Mt,__tla as St}from"./DiscountActivityForm.vue_vue_type_script_setup_true_lang-dfbfaed6.js";import{u as Ut,__tla as Vt}from"./useMessage-5f9e8917.js";import{__tla as Nt}from"./index-73afebcf.js";import"./color-6e929987.js";import{__tla as zt}from"./el-card-03b3588b.js";import{__tla as Ot}from"./Dialog-f44f9d78.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as At}from"./Form-18c0747a.js";import{__tla as Ft}from"./el-virtual-list-c88c2cf8.js";import{__tla as Ht}from"./el-tree-select-e8e05888.js";import{__tla as Pt}from"./el-time-select-9e66b75c.js";import{__tla as Rt}from"./InputPassword-b3d7a3e7.js";import{__tla as qt}from"./InputPassword.vue_vue_type_style_index_0_scoped_38c93dba_lang-ad69fd33.js";import{__tla as Kt}from"./style.css_vue_type_style_index_0_src_true_lang-507ff6a6.js";import{__tla as Lt}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-b3df4382.js";import{__tla as jt}from"./index-b59955b6.js";import{__tla as Bt}from"./UploadImg-3538b5a5.js";import{__tla as Et}from"./UploadImgs-d9af51cb.js";import{__tla as Gt}from"./UploadImgs.vue_vue_type_style_index_0_scoped_3d27d917_lang-531188a2.js";import{__tla as It}from"./UploadFile-5a50d6dd.js";import{__tla as Jt}from"./UploadFile.vue_vue_type_style_index_0_scoped_2570c8e9_lang-d79157f5.js";import{__tla as Xt}from"./SpuSelect.vue_vue_type_script_setup_true_lang-e19b3e4c.js";import{__tla as Qt}from"./index-89aca07e.js";import{__tla as Wt}from"./SkuList.vue_vue_type_script_setup_true_lang-7b9b16cc.js";import{__tla as Zt}from"./PcComponents.css_vue_type_style_index_0_src_bf8feb19_scoped_bf8feb19_lang-e58f9938.js";import"./tree-fd3a041e.js";import{__tla as $t}from"./category-9d0fc28e.js";import{__tla as ta}from"./spu-d8bf9472.js";import{__tla as aa}from"./SpuAndSkuList.vue_vue_type_script_setup_true_lang-7d504025.js";import{__tla as ra}from"./formRules-83fad61e.js";import{__tla as ea}from"./useCrudSchemas-0ab1b807.js";let O,la=Promise.all([(()=>{try{return nt}catch{}})(),(()=>{try{return ut}catch{}})(),(()=>{try{return ft}catch{}})(),(()=>{try{return ht}catch{}})(),(()=>{try{return wt}catch{}})(),(()=>{try{return gt}catch{}})(),(()=>{try{return kt}catch{}})(),(()=>{try{return Ct}catch{}})(),(()=>{try{return St}catch{}})(),(()=>{try{return Vt}catch{}})(),(()=>{try{return Nt}catch{}})(),(()=>{try{return zt}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return Ft}catch{}})(),(()=>{try{return Ht}catch{}})(),(()=>{try{return Pt}catch{}})(),(()=>{try{return Rt}catch{}})(),(()=>{try{return qt}catch{}})(),(()=>{try{return Kt}catch{}})(),(()=>{try{return Lt}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return Bt}catch{}})(),(()=>{try{return Et}catch{}})(),(()=>{try{return Gt}catch{}})(),(()=>{try{return It}catch{}})(),(()=>{try{return Jt}catch{}})(),(()=>{try{return Xt}catch{}})(),(()=>{try{return Qt}catch{}})(),(()=>{try{return Wt}catch{}})(),(()=>{try{return Zt}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return ea}catch{}})()]).then(async()=>{O=I({name:"DiscountActivity",__name:"index",setup(_a){const f=Ut(),{t:A}=J(),w=i(!0),k=i(0),x=i([]),_=X({pageNo:1,pageSize:10,activeTime:null,name:null,status:null}),C=i();i(!1);const m=async()=>{w.value=!0;try{const u=await Yt(_);x.value=u.list,k.value=u.total}finally{w.value=!1}},v=()=>{_.pageNo=1,m()},F=()=>{C.value.resetFields(),v()},T=i(),Y=(u,l)=>{T.value.open(u,l)};return i([]),Q(async()=>{await m()}),(u,l)=>{const H=tt,y=at,P=rt,R=et,q=lt,g=_t,n=ot,K=st,D=vt,o=it,L=yt,j=dt,B=ct,E=pt,h=W("hasPermi"),G=mt;return s(),S(U,null,[a(D,null,{default:e(()=>[a(K,{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(H,{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(R,{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(bt)(r(N).COMMON_STATUS),t=>(s(),p(P,{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(q,{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(g,{icon:"ep:search",class:"mr-5px"}),c(" \u641C\u7D22")]),_:1}),a(n,{onClick:F},{default:e(()=>[a(g,{icon:"ep:refresh",class:"mr-5px"}),c(" \u91CD\u7F6E")]),_:1}),d((s(),p(n,{type:"primary",plain:"",onClick:l[3]||(l[3]=t=>Y("create"))},{default:e(()=>[a(g,{icon:"ep:plus",class:"mr-5px"}),c(" \u65B0\u589E\u6D3B\u52A8 ")]),_:1})),[[h,["promotion:discount-activity:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(D,null,{default:e(()=>[d((s(),p(B,{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(z)(t.row.startTime,"YYYY-MM-DD"))+" ~ "+V(r(z)(t.row.endTime,"YYYY-MM-DD")),1)]),_:1}),a(o,{label:"\u5546\u54C1\u56FE\u7247",prop:"spuName","min-width":"80"},{default:e(t=>[a(L,{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(),p(n,{link:"",type:"primary",onClick:M=>Y("update",t.row.id)},{default:e(()=>[c(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[h,["promotion:discount-activity:update"]]]),t.row.status===0?d((s(),p(n,{key:0,link:"",type:"danger",onClick:M=>(async b=>{try{await f.confirm("\u786E\u8BA4\u5173\u95ED\u8BE5\u9650\u65F6\u6298\u6263\u6D3B\u52A8\u5417\uFF1F"),await Dt(b),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(),p(n,{key:1,link:"",type:"danger",onClick:M=>(async b=>{try{await f.delConfirm(),await Mt(b),f.success(A("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"])),[[G,r(w)]]),a(E,{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(Tt,{ref_key:"formRef",ref:T,onSuccess:m},null,512)],64)}}})});export{la as __tla,O as default};
|