Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-105c7426.d87d416d.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
7.0 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-105c7426"],{"0f95":function(e,o,t){},"276a":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.receiveLogInfo.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.receiveLogInfo.coupons,(function(t,n){return o("li",{key:n,class:{selected:e.receiveLogInfo.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.receiveLogInfo.conditions.userName,callback:function(o){e.$set(e.receiveLogInfo.conditions,"userName",o)},expression:"receiveLogInfo.conditions.userName"}})],1),o("el-form-item",[o("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:e.$t("couponManage.phoneNumber"),clearable:""},model:{value:e.receiveLogInfo.conditions.tel,callback:function(o){e.$set(e.receiveLogInfo.conditions,"tel",o)},expression:"receiveLogInfo.conditions.tel"}})],1),o("el-form-item",[o("el-button",{attrs:{type:"primary"},on:{click:function(o){return e._queryReceiveLogMethod()}}},[o("i",{staticClass:"el-icon-search"}),e._v(" "+e._s(e.$t("couponManage.query"))+" ")]),o("el-button",{on:{click:function(o){return e._resetReceiveLogMethod()}}},[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.receiveLogs")))])]),o("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.receiveLogInfo.receiveLogs,border:""}},[o("el-table-column",{attrs:{prop:"logId",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:"createTime",label:e.$t("couponManage.receiveTime"),align:"center"}}),o("el-table-column",{attrs:{prop:"receiveType",label:e.$t("couponManage.receiveType"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(o){return[e._v(" "+e._s("01"===o.row.receiveType?e.$t("couponManage.userReceive"):e.$t("couponManage.shopGive"))+" ")]}}])})],1),o("el-pagination",{staticStyle:{"margin-top":"20px","text-align":"right"},attrs:{"current-page":e.receiveLogInfo.conditions.page,"page-size":e.receiveLogInfo.conditions.row,layout:"total, prev, pager, next",total:e.receiveLogInfo.total},on:{"current-change":e.handleCurrentChange,"update:currentPage":function(o){return e.$set(e.receiveLogInfo.conditions,"page",o)},"update:current-page":function(o){return e.$set(e.receiveLogInfo.conditions,"page",o)}}})],1)],1)],1)],1)},c=[],a=t("6c49"),i=t("7323"),r={name:"CouponReceiveLogManage",data(){return{loading:!1,receiveLogInfo:{receiveLogs:[],coupons:[],total:0,conditions:{userName:"",tel:"",couponId:"",shopId:"",page:1,row:10}}}},created(){this.receiveLogInfo.conditions.shopId=Object(i["f"])(),this._listCoupons(),this._listReceiveLogs()},methods:{async _listCoupons(){try{const e=await Object(a["f"])({shopId:Object(i["f"])(),page:1,row:100});this.receiveLogInfo.coupons=e.data||[]}catch(e){console.error("获取优惠券列表失败:",e)}},async _listReceiveLogs(){this.loading=!0;try{const e=await Object(a["d"])(this.receiveLogInfo.conditions);this.receiveLogInfo.receiveLogs=e.data,this.receiveLogInfo.total=e.total}catch(e){console.error("获取领取记录失败:",e)}finally{this.loading=!1}},_queryReceiveLogMethod(){this.receiveLogInfo.conditions.page=1,this._listReceiveLogs()},_resetReceiveLogMethod(){this.receiveLogInfo.conditions.userName="",this.receiveLogInfo.conditions.tel="",this.receiveLogInfo.conditions.page=1,this._listReceiveLogs()},handleCurrentChange(e){this.receiveLogInfo.conditions.page=e,this._listReceiveLogs()},switchCoupon(e){this.receiveLogInfo.conditions.couponId=e.couponId||"",this.receiveLogInfo.conditions.page=1,this._listReceiveLogs()}}},s=r,u=(t("3784"),t("2877")),l=Object(u["a"])(s,n,c,!1,null,"eab8c56a",null);o["default"]=l.exports},3784:function(e,o,t){"use strict";t("0f95")},"6c49":function(e,o,t){"use strict";t.d(o,"f",(function(){return a})),t.d(o,"h",(function(){return i})),t.d(o,"i",(function(){return r})),t.d(o,"a",(function(){return s})),t.d(o,"b",(function(){return u})),t.d(o,"g",(function(){return l})),t.d(o,"c",(function(){return p})),t.d(o,"d",(function(){return d})),t.d(o,"e",(function(){return g}));var n=t("b775"),c=t("7323");function a(e){return new Promise((o,t)=>{e.shopId=Object(c["f"])(),Object(n["a"])({url:"/coupon.queryShopCoupon",method:"get",params:e}).then(e=>{const t=e.data;o(t)}).catch(e=>{t(e)})})}function i(e){return new Promise((o,t)=>{e.shopId=Object(c["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 r(e){return new Promise((o,t)=>{e.shopId=Object(c["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 s(e){return new Promise((o,t)=>{e.shopId=Object(c["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 u(e){return new Promise((o,t)=>{e.shopId=Object(c["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(c["f"])(),Object(n["a"])({url:"/coupon.queryUserCoupon",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(c["f"])(),Object(n["a"])({url:"/coupon.queryCouponGiveLog",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(c["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(c["f"])(),Object(n["a"])({url:"/coupon.queryCouponUseLog",method:"get",params:e}).then(e=>{const t=e.data;o(t)}).catch(e=>{t(e)})})}}}]);
//# sourceMappingURL=chunk-105c7426.d87d416d.js.map