CouponSelect-192ac84f.js 6.0 KB

1
  1. import{d as J,r as p,e as Q,o as _,x as v,w as t,f as e,a,y as d,c as N,F as U,v as P,z as W,t as X,l as Z,R as $,C as L,A as ee,B as ae,D as le,j as te,G as oe,H as re,I as ue,J as ne,K as pe,_ as se,__tla as _e}from"./index-327f993b.js";import{_ as ie,__tla as me}from"./Dialog-172e53a1.js";import{_ as de,__tla as ce}from"./index-5a79877f.js";import{_ as fe,__tla as ye}from"./DictTag-74e5844b.js";import{_ as ve,__tla as he}from"./ContentWrap-f767e20d.js";import{a as k,D as i,__tla as Te}from"./dict-2cfe41e3.js";import{d as be,v as we,r as ge,t as Oe,__tla as Ce}from"./formatter-eef9cd68.js";import{d as Se,__tla as Ve}from"./formatTime-63676a29.js";import{g as xe,__tla as Ne}from"./couponTemplate-51ddcb78.js";import{__tla as Ue}from"./index-0ac6413f.js";import"./color-6e929987.js";import{__tla as Pe}from"./el-card-5aa8b203.js";import"./constants-a1da293a.js";let D,ke=Promise.all([(()=>{try{return _e}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return ce}catch{}})(),(()=>{try{return ye}catch{}})(),(()=>{try{return he}catch{}})(),(()=>{try{return Te}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return Ue}catch{}})(),(()=>{try{return Pe}catch{}})()]).then(async()=>{D=se(J({name:"CouponSelect",__name:"CouponSelect",props:{multipleSelection:{type:Array,required:!0}},emits:["update:multipleSelection"],setup(De,{expose:M,emit:Y}){const I=Y,s=p(!1),R=p("\u9009\u62E9\u4F18\u60E0\u5377"),z=p(!1),h=p(!0),b=p(0),w=p([]),r=Q({pageNo:1,pageSize:10,name:null,status:null,discountType:null,type:null,createTime:[]}),c=p(),g=async()=>{h.value=!0;try{const n=await xe(r);w.value=n.list,b.value=n.total}finally{h.value=!1}},T=()=>{r.pageNo=1,g()},O=()=>{var n;(n=c==null?void 0:c.value)==null||n.resetFields(),T()};M({open:async()=>{s.value=!0,O()}});const A=n=>{I("update:multipleSelection",n)},E=()=>{s.value=!1};return(n,o)=>{const F=$,m=L,C=ee,S=ae,H=le,V=te,f=oe,K=re,x=ve,u=ue,y=fe,q=ne,j=de,B=ie,G=pe;return _(),v(B,{modelValue:a(s),"onUpdate:modelValue":o[7]||(o[7]=l=>Z(s)?s.value=l:null),title:a(R),width:"65%"},{footer:t(()=>[e(f,{disabled:a(z),type:"primary",onClick:E},{default:t(()=>[d("\u786E \u5B9A")]),_:1},8,["disabled"]),e(f,{onClick:o[6]||(o[6]=l=>s.value=!1)},{default:t(()=>[d("\u53D6 \u6D88")]),_:1})]),default:t(()=>[e(x,null,{default:t(()=>[e(K,{ref_key:"queryFormRef",ref:c,inline:!0,model:a(r),class:"-mb-15px","label-width":"82px"},{default:t(()=>[e(m,{label:"\u4F18\u60E0\u5238\u540D\u79F0",prop:"name"},{default:t(()=>[e(F,{modelValue:a(r).name,"onUpdate:modelValue":o[0]||(o[0]=l=>a(r).name=l),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4F18\u60E0\u52B5\u540D",onKeyup:T},null,8,["modelValue"])]),_:1}),e(m,{label:"\u4F18\u60E0\u7C7B\u578B",prop:"discountType"},{default:t(()=>[e(S,{modelValue:a(r).discountType,"onUpdate:modelValue":o[1]||(o[1]=l=>a(r).discountType=l),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u4F18\u60E0\u5238\u7C7B\u578B"},{default:t(()=>[(_(!0),N(U,null,P(a(k)(a(i).PROMOTION_DISCOUNT_TYPE),l=>(_(),v(C,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(m,{label:"\u4F18\u60E0\u5238\u72B6\u6001",prop:"status"},{default:t(()=>[e(S,{modelValue:a(r).status,"onUpdate:modelValue":o[2]||(o[2]=l=>a(r).status=l),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u4F18\u60E0\u5238\u72B6\u6001"},{default:t(()=>[(_(!0),N(U,null,P(a(k)(a(i).COMMON_STATUS),l=>(_(),v(C,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(m,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[e(H,{modelValue:a(r).createTime,"onUpdate:modelValue":o[3]||(o[3]=l=>a(r).createTime=l),"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}),e(m,null,{default:t(()=>[e(f,{onClick:T},{default:t(()=>[e(V,{class:"mr-5px",icon:"ep:search"}),d(" \u641C\u7D22 ")]),_:1}),e(f,{onClick:O},{default:t(()=>[e(V,{class:"mr-5px",icon:"ep:refresh"}),d(" \u91CD\u7F6E ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(x,null,{default:t(()=>[W((_(),v(q,{data:a(w),onSelectionChange:A},{default:t(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"\u4F18\u60E0\u5238\u540D\u79F0","min-width":"140",prop:"name"}),e(u,{label:"\u7C7B\u578B","min-width":"80",prop:"productScope"},{default:t(l=>[e(y,{type:a(i).PROMOTION_PRODUCT_SCOPE,value:l.row.productScope},null,8,["type","value"])]),_:1}),e(u,{label:"\u4F18\u60E0","min-width":"100",prop:"discount"},{default:t(l=>[e(y,{type:a(i).PROMOTION_DISCOUNT_TYPE,value:l.row.discountType},null,8,["type","value"]),d(" "+X(a(be)(l.row)),1)]),_:1}),e(u,{label:"\u9886\u53D6\u65B9\u5F0F","min-width":"100",prop:"takeType"},{default:t(l=>[e(y,{type:a(i).PROMOTION_COUPON_TAKE_TYPE,value:l.row.takeType},null,8,["type","value"])]),_:1}),e(u,{formatter:a(we),align:"center",label:"\u4F7F\u7528\u65F6\u95F4",prop:"validityType",width:"185"},null,8,["formatter"]),e(u,{align:"center",label:"\u53D1\u653E\u6570\u91CF",prop:"totalCount"}),e(u,{formatter:a(ge),align:"center",label:"\u5269\u4F59\u6570\u91CF",prop:"totalCount"},null,8,["formatter"]),e(u,{formatter:a(Oe),align:"center",label:"\u9886\u53D6\u4E0A\u9650",prop:"takeLimitCount"},null,8,["formatter"]),e(u,{align:"center",label:"\u72B6\u6001",prop:"status"},{default:t(l=>[e(y,{type:a(i).COMMON_STATUS,value:l.row.status},null,8,["type","value"])]),_:1}),e(u,{formatter:a(Se),align:"center",label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:"180"},null,8,["formatter"])]),_:1},8,["data"])),[[G,a(h)]]),e(j,{limit:a(r).pageSize,"onUpdate:limit":o[4]||(o[4]=l=>a(r).pageSize=l),page:a(r).pageNo,"onUpdate:page":o[5]||(o[5]=l=>a(r).pageNo=l),total:a(b),onPagination:g},null,8,["limit","page","total"])]),_:1})]),_:1},8,["modelValue","title"])}}}),[["__file","D:/zhongxing/mall-newfeifan-zx-admin/src/views/mall/promotion/coupon/components/CouponSelect.vue"]])});export{ke as __tla,D as default};