Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-6a410eb3.084714f5.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
6.9 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6a410eb3"],{"2e93":function(e,o,t){"use strict";t.r(o);var n=function(){var e=this,o=e._self._c;return o("div",[o("el-row",{attrs:{gutter:20}},[o("el-col",{attrs:{span:3}},[o("el-card",{staticClass:"list-selector"},[o("ul",{staticClass:"list-selector-list"},[o("li",{class:{selected:""===e.useLogInfo.conditions.couponId},on:{click:function(o){e.switchCoupon({couponName:e.$t("common.all"),couponId:""})}}},[e._v(" "+e._s(e.$t("common.all"))+" ")]),e._l(e.useLogInfo.coupons,(function(t,n){return o("li",{key:n,class:{selected:e.useLogInfo.conditions.couponId==t.couponId},on:{click:function(o){return e.switchCoupon(t)}}},[e._v(" "+e._s(t.couponName)+" ")])}))],2)])],1),o("el-col",{attrs:{span:21}},[o("el-card",[o("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[o("span",[e._v(e._s(e.$t("couponManage.queryCondition")))])]),o("el-form",{staticClass:"demo-form-inline text-left",attrs:{inline:!0}},[o("el-form-item",[o("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:e.$t("couponManage.userName"),clearable:""},model:{value:e.useLogInfo.conditions.userName,callback:function(o){e.$set(e.useLogInfo.conditions,"userName",o)},expression:"useLogInfo.conditions.userName"}})],1),o("el-form-item",[o("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:e.$t("couponManage.phoneNumber"),clearable:""},model:{value:e.useLogInfo.conditions.tel,callback:function(o){e.$set(e.useLogInfo.conditions,"tel",o)},expression:"useLogInfo.conditions.tel"}})],1),o("el-form-item",[o("el-button",{attrs:{type:"primary"},on:{click:function(o){return e._queryUseLogMethod()}}},[o("i",{staticClass:"el-icon-search"}),e._v(" "+e._s(e.$t("couponManage.query"))+" ")]),o("el-button",{on:{click:function(o){return e._resetUseLogMethod()}}},[o("i",{staticClass:"el-icon-refresh"}),e._v(" "+e._s(e.$t("common.reset"))+" ")])],1)],1)],1),o("el-card",{staticStyle:{"margin-top":"20px"}},[o("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[o("span",[e._v(e._s(e.$t("couponManage.useLogs")))])]),o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.useLogInfo.useLogs,border:""}},[o("el-table-column",{attrs:{prop:"useId",label:e.$t("couponManage.id"),align:"center"}}),o("el-table-column",{attrs:{prop:"couponName",label:e.$t("couponManage.couponName"),align:"center"}}),o("el-table-column",{attrs:{prop:"userName",label:e.$t("couponManage.userName"),align:"center"}}),o("el-table-column",{attrs:{prop:"tel",label:e.$t("couponManage.phoneNumber"),align:"center"}}),o("el-table-column",{attrs:{prop:"orderId",label:e.$t("couponManage.orderId"),align:"center"}}),o("el-table-column",{attrs:{prop:"useTime",label:e.$t("couponManage.useTime"),align:"center"}}),o("el-table-column",{attrs:{label:e.$t("couponManage.discountAmount"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(o){return[e._v(" ¥"+e._s(o.row.discountAmount)+" ")]}}])})],1),o("el-pagination",{staticStyle:{"margin-top":"20px","text-align":"right"},attrs:{"current-page":e.useLogInfo.conditions.page,"page-size":e.useLogInfo.conditions.row,layout:"total, prev, pager, next",total:e.useLogInfo.total},on:{"current-change":e.handleCurrentChange,"update:currentPage":function(o){return e.$set(e.useLogInfo.conditions,"page",o)},"update:current-page":function(o){return e.$set(e.useLogInfo.conditions,"page",o)}}})],1)],1)],1)],1)},s=[],a=t("6c49"),c=t("7323"),u={name:"CouponUseLogManage",data(){return{loading:!1,useLogInfo:{useLogs:[],coupons:[],total:0,conditions:{userName:"",tel:"",couponId:"",shopId:"",page:1,row:10}}}},created(){this.useLogInfo.conditions.shopId=Object(c["f"])(),this._listCoupons(),this._listUseLogs()},methods:{async _listCoupons(){try{const e=await Object(a["f"])({shopId:Object(c["f"])(),page:1,row:100});this.useLogInfo.coupons=e.data||[]}catch(e){console.error("获取优惠券列表失败:",e)}},async _listUseLogs(){this.loading=!0;try{const e=await Object(a["e"])(this.useLogInfo.conditions);this.useLogInfo.useLogs=e.data,this.useLogInfo.total=e.total}catch(e){console.error("获取使用记录失败:",e)}finally{this.loading=!1}},_queryUseLogMethod(){this.useLogInfo.conditions.page=1,this._listUseLogs()},_resetUseLogMethod(){this.useLogInfo.conditions.userName="",this.useLogInfo.conditions.tel="",this.useLogInfo.conditions.page=1,this._listUseLogs()},handleCurrentChange(e){this.useLogInfo.conditions.page=e,this._listUseLogs()},switchCoupon(e){this.useLogInfo.conditions.couponId=e.couponId||"",this.useLogInfo.conditions.page=1,this._listUseLogs()}}},i=u,r=(t("9bcf"),t("2877")),l=Object(r["a"])(i,n,s,!1,null,"49d305b0",null);o["default"]=l.exports},"6c49":function(e,o,t){"use strict";t.d(o,"f",(function(){return a})),t.d(o,"h",(function(){return c})),t.d(o,"i",(function(){return u})),t.d(o,"a",(function(){return i})),t.d(o,"b",(function(){return r})),t.d(o,"g",(function(){return l})),t.d(o,"c",(function(){return d})),t.d(o,"d",(function(){return p})),t.d(o,"e",(function(){return g}));var n=t("b775"),s=t("7323");function a(e){return new Promise((o,t)=>{e.shopId=Object(s["f"])(),Object(n["a"])({url:"/coupon.queryShopCoupon",method:"get",params:e}).then(e=>{const t=e.data;o(t)}).catch(e=>{t(e)})})}function c(e){return new Promise((o,t)=>{e.shopId=Object(s["f"])(),Object(n["a"])({url:"/coupon.saveShopCoupon",method:"post",data:e}).then(e=>{const n=e.data;0===n.code?o(n):t(n.msg)}).catch(e=>{t(e)})})}function u(e){return new Promise((o,t)=>{e.shopId=Object(s["f"])(),Object(n["a"])({url:"/coupon.updateShopCoupon",method:"post",data:e}).then(e=>{const n=e.data;0===n.code?o(n):t(n.msg)}).catch(e=>{t(e)})})}function i(e){return new Promise((o,t)=>{e.shopId=Object(s["f"])(),Object(n["a"])({url:"/coupon.deleteShopCoupon",method:"post",data:e}).then(e=>{const n=e.data;0===n.code?o(n):t(n.msg)}).catch(e=>{t(e)})})}function r(e){return new Promise((o,t)=>{e.shopId=Object(s["f"])(),Object(n["a"])({url:"/coupon.giveCoupon",method:"post",data:e}).then(e=>{const n=e.data;0===n.code?o(n):t(n.msg)}).catch(e=>{t(e)})})}function l(e){return new Promise((o,t)=>{e.shopId=Object(s["f"])(),Object(n["a"])({url:"/coupon.queryUserCoupon",method:"get",params:e}).then(e=>{const t=e.data;o(t)}).catch(e=>{t(e)})})}function d(e){return new Promise((o,t)=>{e.shopId=Object(s["f"])(),Object(n["a"])({url:"/coupon.queryCouponGiveLog",method:"get",params:e}).then(e=>{const t=e.data;o(t)}).catch(e=>{t(e)})})}function p(e){return new Promise((o,t)=>{e.shopId=Object(s["f"])(),Object(n["a"])({url:"/coupon.queryCouponReceiveLog",method:"get",params:e}).then(e=>{const t=e.data;o(t)}).catch(e=>{t(e)})})}function g(e){return new Promise((o,t)=>{e.shopId=Object(s["f"])(),Object(n["a"])({url:"/coupon.queryCouponUseLog",method:"get",params:e}).then(e=>{const t=e.data;o(t)}).catch(e=>{t(e)})})}},"8eab":function(e,o,t){},"9bcf":function(e,o,t){"use strict";t("8eab")}}]);
//# sourceMappingURL=chunk-6a410eb3.084714f5.js.map