1 |
- import{d as X,P as j,r as d,x as Z,b as $,a3 as G,o as n,c as N,f as t,A as l,a as e,F as P,Q as Y,C as p,D as f,k as v,B as aa,E as ta,a8 as ea,U as la,R as ra,S as oa,I as ua,_ as _a,J as na,V as sa,W as pa,cC as ca,X as ma,Y as ia,__tla as da}from"./index-a9d538d5.js";import{_ as fa,__tla as ya}from"./index.vue_vue_type_script_setup_true_lang-ca67dc77.js";import{_ as ha,__tla as wa}from"./DictTag.vue_vue_type_script_lang-9e4dd0a0.js";import{_ as ba,__tla as va}from"./ContentWrap.vue_vue_type_script_setup_true_lang-6b7b4656.js";import{g as Ta,b as ga,d as Ca,__tla as Oa}from"./couponTemplate-77c16d04.js";import{C as T}from"./constants-c811e5ff.js";import{a as A,D as y,__tla as ka}from"./dict-0e53af99.js";import{d as Va,__tla as Na}from"./formatTime-8985a9d0.js";import{_ as Pa,__tla as xa}from"./CouponTemplateForm.vue_vue_type_script_setup_true_lang-022d7415.js";import{d as Sa,v as Ua,r as Ea,t as Da,__tla as Ia}from"./formatter-0a0fc5fe.js";import{u as Ma,__tla as Ra}from"./useMessage-d5cbbfad.js";import{__tla as Ya}from"./index-95ad39b3.js";import"./color-6e929987.js";import{__tla as Aa}from"./el-card-0ea446a3.js";import{__tla as Ba}from"./Dialog-f354f369.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as La}from"./SpuShowcase-a7041ab1.js";import{__tla as za}from"./el-image-2dadd73e.js";import{__tla as Fa}from"./el-image-viewer-2e77a3e7.js";import{__tla as Ka}from"./spu-df5e2077.js";import{__tla as qa}from"./SpuTableSelect.vue_vue_type_script_setup_true_lang-89aaaa66.js";import{__tla as Ha}from"./el-tree-select-ca2609f2.js";import"./tree-fd3a041e.js";import{__tla as Ja}from"./category-3fc66a6d.js";import{__tla as Qa}from"./ProductCategorySelect.vue_vue_type_script_setup_true_lang-71efee5f.js";let B,Wa=Promise.all([(()=>{try{return da}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Qa}catch{}})()]).then(async()=>{B=X({name:"PromotionCouponTemplate",__name:"index",setup(Xa){const h=Ma(),{t:L}=j(),g=d(!0),x=d(0),S=d([]),o=Z({pageNo:1,pageSize:10,name:null,status:null,discountType:null,type:null,createTime:[]}),w=d(),c=async()=>{g.value=!0;try{const s=await Ta(o);S.value=s.list,x.value=s.total}finally{g.value=!1}},C=()=>{o.pageNo=1,c()},z=()=>{var s;(s=w==null?void 0:w.value)==null||s.resetFields(),C()},U=d(),E=(s,r)=>{U.value.open(s,r)};return $(()=>{c()}),(s,r)=>{const F=ea,m=la,D=ra,I=oa,K=ua,O=_a,i=na,q=sa,M=ba,u=pa,k=ha,H=ca,J=ma,Q=fa,V=G("hasPermi"),W=ia;return n(),N(P,null,[t(M,null,{default:l(()=>[t(q,{ref_key:"queryFormRef",ref:w,inline:!0,model:e(o),class:"-mb-15px","label-width":"82px"},{default:l(()=>[t(m,{label:"\u4F18\u60E0\u5238\u540D\u79F0",prop:"name"},{default:l(()=>[t(F,{modelValue:e(o).name,"onUpdate:modelValue":r[0]||(r[0]=a=>e(o).name=a),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4F18\u60E0\u52B5\u540D",onKeyup:C},null,8,["modelValue"])]),_:1}),t(m,{label:"\u4F18\u60E0\u7C7B\u578B",prop:"discountType"},{default:l(()=>[t(I,{modelValue:e(o).discountType,"onUpdate:modelValue":r[1]||(r[1]=a=>e(o).discountType=a),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u4F18\u60E0\u5238\u7C7B\u578B"},{default:l(()=>[(n(!0),N(P,null,Y(e(A)(e(y).PROMOTION_DISCOUNT_TYPE),a=>(n(),p(D,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(m,{label:"\u4F18\u60E0\u5238\u72B6\u6001",prop:"status"},{default:l(()=>[t(I,{modelValue:e(o).status,"onUpdate:modelValue":r[2]||(r[2]=a=>e(o).status=a),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u4F18\u60E0\u5238\u72B6\u6001"},{default:l(()=>[(n(!0),N(P,null,Y(e(A)(e(y).COMMON_STATUS),a=>(n(),p(D,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(m,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:l(()=>[t(K,{modelValue:e(o).createTime,"onUpdate:modelValue":r[3]||(r[3]=a=>e(o).createTime=a),"default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-240px","end-placeholder":"\u7ED3\u675F\u65E5\u671F","start-placeholder":"\u5F00\u59CB\u65E5\u671F",type:"daterange","value-format":"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue","default-time"])]),_:1}),t(m,null,{default:l(()=>[t(i,{onClick:C},{default:l(()=>[t(O,{class:"mr-5px",icon:"ep:search"}),f(" \u641C\u7D22 ")]),_:1}),t(i,{onClick:z},{default:l(()=>[t(O,{class:"mr-5px",icon:"ep:refresh"}),f(" \u91CD\u7F6E ")]),_:1}),v((n(),p(i,{plain:"",type:"primary",onClick:r[4]||(r[4]=a=>E("create"))},{default:l(()=>[t(O,{class:"mr-5px",icon:"ep:plus"}),f(" \u65B0\u589E ")]),_:1})),[[V,["promotion:coupon-template:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),t(M,null,{default:l(()=>[v((n(),p(J,{data:e(S)},{default:l(()=>[t(u,{label:"\u4F18\u60E0\u5238\u540D\u79F0","min-width":"140",prop:"name"}),t(u,{label:"\u7C7B\u578B","min-width":"130",prop:"productScope"},{default:l(a=>[t(k,{type:e(y).PROMOTION_PRODUCT_SCOPE,value:a.row.productScope},null,8,["type","value"])]),_:1}),t(u,{label:"\u4F18\u60E0","min-width":"110",prop:"discount"},{default:l(a=>[t(k,{type:e(y).PROMOTION_DISCOUNT_TYPE,value:a.row.discountType},null,8,["type","value"]),aa("div",null,ta(e(Sa)(a.row)),1)]),_:1}),t(u,{label:"\u9886\u53D6\u65B9\u5F0F","min-width":"100",prop:"takeType"},{default:l(a=>[t(k,{type:e(y).PROMOTION_COUPON_TAKE_TYPE,value:a.row.takeType},null,8,["type","value"])]),_:1}),t(u,{formatter:e(Ua),align:"center",label:"\u4F7F\u7528\u65F6\u95F4",prop:"validityType",width:"185"},null,8,["formatter"]),t(u,{align:"center",label:"\u53D1\u653E\u6570\u91CF",prop:"totalCount"}),t(u,{formatter:e(Ea),align:"center",label:"\u5269\u4F59\u6570\u91CF",prop:"totalCount"},null,8,["formatter"]),t(u,{formatter:e(Da),align:"center",label:"\u9886\u53D6\u4E0A\u9650",prop:"takeLimitCount"},null,8,["formatter"]),t(u,{align:"center",label:"\u72B6\u6001",prop:"status"},{default:l(a=>[t(H,{modelValue:a.row.status,"onUpdate:modelValue":b=>a.row.status=b,"active-value":0,"inactive-value":1,onChange:b=>(async _=>{let R=_.status===T.ENABLE?"\u542F\u7528":"\u505C\u7528";try{await h.confirm('\u786E\u8BA4\u8981"'+R+'""'+_.name+'"\u4F18\u60E0\u52B5\u5417?'),await ga(_.id,_.status),h.success(R+"\u6210\u529F")}catch{_.status=_.status===T.ENABLE?T.DISABLE:T.ENABLE}})(a.row)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),t(u,{formatter:e(Va),align:"center",label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:"180"},null,8,["formatter"]),t(u,{align:"center","class-name":"small-padding fixed-width",fixed:"right",label:"\u64CD\u4F5C",width:"120"},{default:l(a=>[v((n(),p(i,{link:"",type:"primary",onClick:b=>E("update",a.row.id)},{default:l(()=>[f(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[V,["promotion:coupon-template:update"]]]),v((n(),p(i,{link:"",type:"danger",onClick:b=>(async _=>{try{await h.confirm('\u662F\u5426\u786E\u8BA4\u5220\u9664\u4F18\u60E0\u52B5\u7F16\u53F7\u4E3A"'+_+'"\u7684\u6570\u636E\u9879?'),await Ca(_),h.success(L("common.delSuccess")),await c()}catch{}})(a.row.id)},{default:l(()=>[f(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[V,["promotion:coupon-template:delete"]]])]),_:1})]),_:1},8,["data"])),[[W,e(g)]]),t(Q,{limit:e(o).pageSize,"onUpdate:limit":r[5]||(r[5]=a=>e(o).pageSize=a),page:e(o).pageNo,"onUpdate:page":r[6]||(r[6]=a=>e(o).pageNo=a),total:e(x),onPagination:c},null,8,["limit","page","total"])]),_:1}),t(Pa,{ref_key:"formRef",ref:U,onSuccess:c},null,512)],64)}}})});export{Wa as __tla,B as default};
|