index-004c0e10.js 7.8 KB

1
  1. import{d as j,i as W,r as d,f as Z,m as $,S as Q,o as _,c as N,g as t,w as l,a as e,F as V,v as R,x as p,q as f,y as b,h as aa,t as ta,X as ea,B as la,z as ra,A as oa,C as na,k as ua,D as _a,G as sa,H as pa,d2 as ma,I as ca,J as ia,_ as da,__tla as fa}from"./index-12a7743c.js";import{_ as ya,__tla as ha}from"./index-ed9bc77e.js";import{_ as wa,__tla as va}from"./DictTag-25cb5422.js";import{_ as ba,__tla as Ta}from"./ContentWrap-a222efbc.js";import{g as ga,b as Ca,d as Oa,__tla as ka}from"./couponTemplate-7de61c1c.js";import{C as T}from"./constants-d55a3460.js";import{a as Y,D as y,__tla as xa}from"./dict-0bfe78a3.js";import{d as Na,__tla as Va}from"./formatTime-adaaebb7.js";import Pa,{__tla as Sa}from"./CouponTemplateForm-dece2577.js";import{d as Ea,v as Ua,r as Da,t as Ia,__tla as Ma}from"./formatter-85c40c3a.js";import{u as Aa,__tla as Ra}from"./useMessage-9e9b1c85.js";import{__tla as Ya}from"./index-088af6ea.js";import"./color-6e929987.js";import{__tla as za}from"./ContentWrap.vue_vue_type_script_setup_true_lang-4150ac91.js";import{__tla as Ba}from"./el-card-73514116.js";import{__tla as La}from"./Dialog-639a3ed8.js";import{__tla as qa}from"./SpuShowcase-285305bb.js";import{__tla as Fa}from"./el-image-2f2c3912.js";import{__tla as Ha}from"./el-image-viewer-900c7087.js";import{__tla as Ga}from"./spu-eef4392f.js";import{__tla as Ka}from"./SpuTableSelect-0833363c.js";import{__tla as Ja}from"./el-tree-select-53f01660.js";import"./tree-0af4953a.js";import{__tla as Xa}from"./category-1e4d7630.js";import{__tla as ja}from"./ProductCategorySelect-e267cd25.js";let z,Wa=Promise.all([(()=>{try{return fa}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Xa}catch{}})(),(()=>{try{return ja}catch{}})()]).then(async()=>{z=da(j({name:"PromotionCouponTemplate",__name:"index",setup(Za){const h=Aa(),{t:B}=W(),g=d(!0),P=d(0),S=d([]),o=Z({pageNo:1,pageSize:10,name:null,status:null,discountType:null,type:null,createTime:[]}),w=d(),m=async()=>{g.value=!0;try{const s=await ga(o);S.value=s.list,P.value=s.total}finally{g.value=!1}},C=()=>{o.pageNo=1,m()},L=()=>{var s;(s=w==null?void 0:w.value)==null||s.resetFields(),C()},E=d(),U=(s,r)=>{E.value.open(s,r)};return $(()=>{m()}),(s,r)=>{const q=ea,c=la,D=ra,I=oa,F=na,O=ua,i=_a,H=sa,M=ba,n=pa,k=wa,G=ma,K=ca,J=ya,x=Q("hasPermi"),X=ia;return _(),N(V,null,[t(M,null,{default:l(()=>[t(H,{ref_key:"queryFormRef",ref:w,inline:!0,model:e(o),class:"-mb-15px","label-width":"82px"},{default:l(()=>[t(c,{label:"\u4F18\u60E0\u5238\u540D\u79F0",prop:"name"},{default:l(()=>[t(q,{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(c,{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(()=>[(_(!0),N(V,null,R(e(Y)(e(y).PROMOTION_DISCOUNT_TYPE),a=>(_(),p(D,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(c,{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(()=>[(_(!0),N(V,null,R(e(Y)(e(y).COMMON_STATUS),a=>(_(),p(D,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(c,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:l(()=>[t(F,{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(c,null,{default:l(()=>[t(i,{onClick:C},{default:l(()=>[t(O,{class:"mr-5px",icon:"ep:search"}),f(" \u641C\u7D22 ")]),_:1}),t(i,{onClick:L},{default:l(()=>[t(O,{class:"mr-5px",icon:"ep:refresh"}),f(" \u91CD\u7F6E ")]),_:1}),b((_(),p(i,{plain:"",type:"primary",onClick:r[4]||(r[4]=a=>U("create"))},{default:l(()=>[t(O,{class:"mr-5px",icon:"ep:plus"}),f(" \u65B0\u589E ")]),_:1})),[[x,["promotion:coupon-template:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),t(M,null,{default:l(()=>[b((_(),p(K,{data:e(S)},{default:l(()=>[t(n,{label:"\u4F18\u60E0\u5238\u540D\u79F0","min-width":"140",prop:"name"}),t(n,{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(n,{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(Ea)(a.row)),1)]),_:1}),t(n,{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(n,{formatter:e(Ua),align:"center",label:"\u4F7F\u7528\u65F6\u95F4",prop:"validityType",width:"185"},null,8,["formatter"]),t(n,{align:"center",label:"\u53D1\u653E\u6570\u91CF",prop:"totalCount"}),t(n,{formatter:e(Da),align:"center",label:"\u5269\u4F59\u6570\u91CF",prop:"totalCount"},null,8,["formatter"]),t(n,{formatter:e(Ia),align:"center",label:"\u9886\u53D6\u4E0A\u9650",prop:"takeLimitCount"},null,8,["formatter"]),t(n,{align:"center",label:"\u72B6\u6001",prop:"status"},{default:l(a=>[t(G,{modelValue:a.row.status,"onUpdate:modelValue":v=>a.row.status=v,"active-value":0,"inactive-value":1,onChange:v=>(async u=>{let A=u.status===T.ENABLE?"\u542F\u7528":"\u505C\u7528";try{await h.confirm('\u786E\u8BA4\u8981"'+A+'""'+u.name+'"\u4F18\u60E0\u52B5\u5417?'),await Ca(u.id,u.status),h.success(A+"\u6210\u529F")}catch{u.status=u.status===T.ENABLE?T.DISABLE:T.ENABLE}})(a.row)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),t(n,{formatter:e(Na),align:"center",label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:"180"},null,8,["formatter"]),t(n,{align:"center","class-name":"small-padding fixed-width",fixed:"right",label:"\u64CD\u4F5C",width:"120"},{default:l(a=>[b((_(),p(i,{link:"",type:"primary",onClick:v=>U("update",a.row.id)},{default:l(()=>[f(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[x,["promotion:coupon-template:update"]]]),b((_(),p(i,{link:"",type:"danger",onClick:v=>(async u=>{try{await h.confirm('\u662F\u5426\u786E\u8BA4\u5220\u9664\u4F18\u60E0\u52B5\u7F16\u53F7\u4E3A"'+u+'"\u7684\u6570\u636E\u9879?'),await Oa(u),h.success(B("common.delSuccess")),await m()}catch{}})(a.row.id)},{default:l(()=>[f(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[x,["promotion:coupon-template:delete"]]])]),_:1})]),_:1},8,["data"])),[[X,e(g)]]),t(J,{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(P),onPagination:m},null,8,["limit","page","total"])]),_:1}),t(Pa,{ref_key:"formRef",ref:E,onSuccess:m},null,512)],64)}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/mall/promotion/coupon/template/index.vue"]])});export{Wa as __tla,z as default};