1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-21bf7e19"],{"11c5":function(t,e,n){},3382:function(t,e,n){"use strict";n.d(e,"e",(function(){return o})),n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return s})),n.d(e,"f",(function(){return u})),n.d(e,"d",(function(){return c})),n.d(e,"a",(function(){return d}));var i=n("b775"),a={couponDetail:"/coupon/detail",create:"/GiveOutCoupon/create",uploadMobiles:"/GiveOutCoupon/uploadMobiles",list:"/GiveOutCoupon/list",details:"/GiveOutCoupon/details",audit:"/GiveOutCoupon/audit"};function o(t){return Object(i["b"])({url:a.list,method:"get",params:t})}function r(t){return Object(i["b"])({url:a.couponDetail,method:"get",params:t})}function s(t){return Object(i["b"])({url:a.create,method:"post",data:t})}function u(t){return Object(i["b"])({url:a.uploadMobiles,method:"post",data:t})}function c(t){return Object(i["b"])({url:a.details,method:"get",params:t})}function d(t){return Object(i["b"])({url:a.audit,method:"post",params:t})}},"33dc":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("a-card",{attrs:{bordered:!1}},[e("div",{staticClass:"card-title"},[t._v(t._s(t.$route.meta.title))]),e("a-button",{staticClass:"addDiscount",attrs:{type:"primary",icon:"plus"},on:{click:t.goToCreate}},[t._v("新增发放")]),e("s-table",{ref:"table",staticClass:"tableBox",attrs:{rowKey:"id",loading:t.isLoading,columns:t.columns,data:t.loadData,pageSize:15,bordered:""},scopedSlots:t._u([{key:"reduce_price",fn:function(n,i){return[20==i.coupon.coupon_type?e("p",[t._v("¥"+t._s(n))]):e("p",[t._v(t._s(i.coupon.discount)+"折")])]}},{key:"rev_type",fn:function(n){return[e("p",[t._v(t._s(1==n?"主动领取":"被动领取"))])]}},{key:"rev_user",fn:function(n){return[1==n?e("p",[t._v("指定用户")]):t._e(),2==n?e("p",[t._v("用户身份")]):t._e(),3==n?e("p",[t._v("按活跃用户")]):t._e()]}},{key:"audit_status",fn:function(n){return[0==n?e("p",[t._v("待审核")]):t._e(),1==n?e("p",[t._v("审核通过")]):t._e(),2==n?e("p",[t._v("审核拒绝")]):t._e()]}},{key:"look",fn:function(n,i){return[e("a",{on:{click:function(e){return t.lookDetails(i)}}},[t._v("查看")])]}},{key:"auditAdmin",fn:function(n){return[e("p",[t._v(t._s(n&&n.real_name||"--"))])]}},{key:"audit_time",fn:function(n){return[e("p",n?{domProps:{innerHTML:t._s(t.$options.filters.splitTime(n))}}:[t._v("--")])]}},{key:"action",fn:function(n,i){return[0==i.audit_status?e("div",[1===t.isSuper||"activity-zg-audit"==t.role?e("div",[e("a",{staticClass:"aBot",on:{click:function(e){return t.audit(i,1)}}},[t._v("允许发放")]),e("a",{staticClass:"aBot",on:{click:function(e){return t.audit(i,2)}}},[t._v("不允许")])]):e("p",[t._v("--")])]):e("p",{staticClass:"grText"},[t._v("已审核")])]}}])})],1)},a=[],o=n("753f"),r=(n("9f29"),n("0528"),n("3382")),s=n("2af9"),u=[{title:"ID",width:"100px",dataIndex:"id"},{title:"优惠券ID",width:"100px",dataIndex:"coupon_id"},{title:"面额",width:"100px",dataIndex:"coupon.reduce_price",scopedSlots:{customRender:"reduce_price"}},{title:"领取方式",width:"100px",dataIndex:"rev_type",scopedSlots:{customRender:"rev_type"}},{title:"发放对象",width:"100px",dataIndex:"rev_user",scopedSlots:{customRender:"rev_user"}},{title:"发放理由",width:"240px",dataIndex:"reason"},{title:"发放详情",width:"80px",scopedSlots:{customRender:"look"}},{title:"发放状态",width:"100px",dataIndex:"audit_status",scopedSlots:{customRender:"audit_status"}},{title:"提交人",width:"100px",dataIndex:"createrAdmin.real_name"},{title:"审核人",width:"100px",dataIndex:"auditAdmin",scopedSlots:{customRender:"auditAdmin"}},{title:"审核时间",width:"100px",dataIndex:"audit_time",scopedSlots:{customRender:"audit_time"}},{title:"操作",width:"160px",scopedSlots:{customRender:"action"}}],c={components:{STable:s["c"]},data:function(){var t=this;return{searchForm:this.$form.createForm(this),isLoading:!1,queryParam:{},columns:u,isSuper:1,role:"",loadData:function(e){return r["e"](Object(o["a"])(Object(o["a"])({},e),t.queryParam)).then((function(t){return t.data.list}))}}},created:function(){var t=this;if(this.$store.getters.roles){this.isSuper=this.$store.getters.roles.isSuper;var e=this.$store.getters.roles.permissions;e.forEach((function(e){"/marketingCenter/grant/index"==e.permissionId&&e.actionEntitySet&&e.actionEntitySet.length>0&&(t.role=e.actionEntitySet[0].action)}))}},methods:{handleSearch:function(t){var e=this;t.preventDefault(),this.searchForm.validateFields((function(t,n){t||(e.queryParam=Object(o["a"])(Object(o["a"])({},e.queryParam),n),e.handleRefresh(!0))}))},reloadList:function(){this.searchForm.resetFields(),this.queryParam={},this.handleRefresh(!0)},handleRefresh:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(t),this.selectedRowKeys=[]},audit:function(t,e){var n=this;this.$confirm({title:"提示",content:1==e?"确认允许本次优惠券发放吗?":"确认不允许本次优惠券发放吗?",okText:"确定",cancelText:"取消",onOk:function(){r["a"]({id:t.id,audit_status:e}).then((function(t){n.$message.success(t.message,1.5),n.handleRefresh(!0)})).catch((function(){})).finally((function(){}))}})},goToCreate:function(){this.$router.push({path:"./create"})},lookDetails:function(t){this.$router.push({path:"./details",query:{id:t.id}})}}},d=c,l=(n("dea4"),n("829d")),p=Object(l["a"])(d,i,a,!1,null,"ecc21556",null);e["default"]=p.exports},dea4:function(t,e,n){"use strict";n("11c5")}}]);
|