Files
jianfeng-server/public/static/js/38.js
2025-10-02 10:33:06 +08:00

1 line
12 KiB
JavaScript
Executable File

webpackJsonp([38],{"3GBS":function(e,t){},RUn2:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("mvHQ"),n=a.n(r),s=a("Xxa5"),i=a.n(s),o=a("exGp"),l=a.n(o),c={data:function(){return{pickerOptions:{disabledDate:function(e){return e.getTime()>Date.now()}},statusOptions:[{label:"全部",value:0},{label:"未授权微信昵称/头像",value:1},{label:"已授权微信昵称/头像",value:2}],blacklist:0,loading:!1,searchForm:{page:1,limit:10,nickName:"",type:0,is_black:0,start_time:"",end_time:""},tableData:[],total:0,showDialog:!1,subForm:{id:0,nickName:"",phone:"",yu_integral:"",oper_type:1,integral:""},subFormRules:{oper_type:{required:!0,type:"number",message:"请选择操作类型",trigger:"blur"},integral:{required:!0,validator:this.$reg.isFloatNum,text:"积分",reg_type:2,trigger:"blur"}}}},activated:function(){var e=this;return l()(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getBaseInfo();case 2:e.getTableDataList();case 3:case"end":return t.stop()}},t,e)}))()},methods:{getBaseInfo:function(){var e=this;return l()(i.a.mark(function t(){var a,r,n,s;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$api.system.configInfo();case 2:if(a=t.sent,r=a.code,n=a.data,200===r){t.next=7;break}return t.abrupt("return");case 7:s=n.blacklist,e.blacklist=s,e.searchForm.is_black=s?0:-1;case 10:case"end":return t.stop()}},t,e)}))()},changeType:function(){var e=this.searchForm,t=e.type,a=e.nickName;this.searchForm.nickName=1===t?"":a,this.getTableDataList(1)},resetForm:function(e){this.$refs[e].resetFields(),this.getTableDataList(1)},handleSizeChange:function(e){this.searchForm.limit=e,this.handleCurrentChange(1)},handleCurrentChange:function(e){this.searchForm.page=e,this.getTableDataList()},getTableDataList:function(e){var t=this;return l()(i.a.mark(function a(){var r,s,o,l,c;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e&&(t.searchForm.page=1),t.loading=!0,r=JSON.parse(n()(t.searchForm)),(s=r.start_time)&&s.length>0?(r.start_time=parseInt(s[0]/1e3),r.end_time=parseInt(s[1]/1e3)+86400-1):(r.start_time="",r.end_time=""),-1===r.is_black&&delete r.is_black,a.next=8,t.$api.custom.userList(r);case 8:if(o=a.sent,l=o.code,c=o.data,t.loading=!1,200===l){a.next=14;break}return a.abrupt("return");case 14:t.tableData=c.data,t.total=c.total;case 16:case"end":return a.stop()}},a,t)}))()},handleSelectionChange:function(e){var t=[];e.map(function(e){t.push(e.id)}),this.multipleSelection=t},confirmRemoveBlackList:function(e){var t=this,a=e.id,r=e.nickName,n=e.is_black,s=1===n?"移出":"移入";this.$confirm("请确认是否要将「"+r+"」"+s+"黑名单?",this.$t("tips.reminder"),{confirmButtonText:this.$t("action.comfirm"),cancelButtonText:this.$t("action.cancel"),type:"warning"}).then(function(){t.updateItem(a,1===n?0:1)}).catch(function(){})},updateItem:function(e,t){var a=this;return l()(i.a.mark(function r(){return i.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:a.$api.custom.userUpdate({id:e,is_black:t}).then(function(e){200===e.code?(a.$message.success(a.$t("tips.successOper")),a.getTableDataList()):a.getTableDataList()});case 1:case"end":return r.stop()}},r,a)}))()},toShowDialog:function(e){var t=this;return l()(i.a.mark(function a(){var r;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:for(r in(e=JSON.parse(n()(e))).yu_integral=e.integral,e.oper_type=1,e.integral="",t.subForm)t.subForm[r]=e[r];t.showDialog=!t.showDialog;case 6:case"end":return a.stop()}},a,t)}))()},submitFormInfo:function(){var e=this;return l()(i.a.mark(function t(){var a,r,s,o,l,c;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a=!0,e.$refs.subForm.validate(function(e){e||(a=!1)}),!a){t.next=14;break}return r=JSON.parse(n()(e.subForm)),s=r.id,o=r.oper_type,l=r.integral,2===o&&(l="-"+l),t.next=7,e.$api.custom.userIntegralUpdate({user_id:s,integral:l});case 7:if(c=t.sent,200===c.code){t.next=11;break}return t.abrupt("return");case 11:e.$message.success(e.$t("tips.successRev")),e.showDialog=!1,e.getTableDataList();case 14:case"end":return t.stop()}},t,e)}))()}},filters:{handleTime:function(e,t){return 1===t?moment(1e3*e).format("YYYY-MM-DD"):2===t?moment(1e3*e).format("HH:mm:ss"):moment(1e3*e).format("YYYY-MM-DD HH:mm:ss")}}},u={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"lb-custom"},[a("top-nav"),e._v(" "),a("div",{staticClass:"page-main"},[a("el-row",{staticClass:"page-search-form"},[a("el-form",{ref:"searchForm",attrs:{inline:!0,model:e.searchForm},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-form-item",{attrs:{label:"授权类型",prop:"type"}},[a("el-select",{attrs:{placeholder:"请选择"},on:{change:e.changeType},model:{value:e.searchForm.type,callback:function(t){e.$set(e.searchForm,"type",t)},expression:"searchForm.type"}},e._l(e.statusOptions,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),1!==e.searchForm.type?a("el-form-item",{attrs:{label:"微信昵称",prop:"nickName"}},[a("el-input",{attrs:{placeholder:"请输入微信昵称"},model:{value:e.searchForm.nickName,callback:function(t){e.$set(e.searchForm,"nickName",t)},expression:"searchForm.nickName"}})],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"加入时间",prop:"start_time"}},[a("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","picker-options":e.pickerOptions,"value-format":"timestamp"},on:{change:function(t){return e.getTableDataList(1)}},model:{value:e.searchForm.start_time,callback:function(t){e.$set(e.searchForm,"start_time",t)},expression:"searchForm.start_time"}})],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.blacklist,expression:"blacklist"}],attrs:{label:"黑名单",prop:"is_black"}},[a("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(t){return e.getTableDataList(1)}},model:{value:e.searchForm.is_black,callback:function(t){e.$set(e.searchForm,"is_black",t)},expression:"searchForm.is_black"}})],1),e._v(" "),a("el-form-item",[a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",type:"primary",icon:"el-icon-search"},on:{click:function(t){return e.getTableDataList(1)}}},[e._v(e._s(e.$t("action.search")))]),e._v(" "),a("lb-button",{staticStyle:{"margin-right":"5px"},attrs:{size:"medium",icon:"el-icon-refresh-left"},on:{click:function(t){return e.resetForm("searchForm")}}},[e._v(e._s(e.$t("action.reset")))])],1)],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,"header-cell-style":{background:"#f5f7fa",color:"#606266"}},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{prop:"id",label:"ID",fixed:""}}),e._v(" "),a("el-table-column",{attrs:{prop:"nickName",label:"微信昵称","min-width":"200"}}),e._v(" "),a("el-table-column",{attrs:{prop:"avatarUrl",label:"微信头像"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("lb-image",{attrs:{src:e.row.avatarUrl}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"phone",label:"手机号","min-width":"200"}}),e._v(" "),a("el-table-column",{attrs:{prop:"member_title",label:"会员等级","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.member_level?t.row.member_title:"普通会员")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"pay_cash",label:"","min-width":"120"},scopedSlots:e._u([{key:"header",fn:function(t){return[a("div",[e._v("\n 消费总金额"),a("lb-tool-tips",{attrs:{padding:"2"}},[e._v("包含土地、认养、养殖,配送邮费、商城的所有消费,不包含退款的")])],1)]}},{key:"default",fn:function(t){return[e._v("\n "+e._s("¥"+t.row.pay_cash)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"refund_cash",label:"退款金额","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s("¥"+t.row.refund_cash)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"balance_cash",label:"充值总金额","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s("¥"+t.row.balance_cash)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"balance",label:"当前余额","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s("¥"+t.row.balance)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"total_integral",label:"总积分","min-width":"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"integral",label:"当前积分","min-width":"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"pay_integral",label:"已兑换积分","min-width":"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"加入时间","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("p",[e._v(e._s(e._f("handleTime")(t.row.create_time,1)))]),e._v(" "),a("p",[e._v(e._s(e._f("handleTime")(t.row.create_time,2)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"240"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"table-operate"},[a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:e.$route.name+"-editIntegral",expression:"`${$route.name}-editIntegral`"}],attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(a){return e.toShowDialog(t.row)}}},[e._v(e._s(e.$t("action.editIntegral")))]),e._v(" "),a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:e.$route.name+"-removeInBlackList",expression:"`${$route.name}-removeInBlackList`"},{name:"show",rawName:"v-show",value:e.blacklist&&!t.row.is_black,expression:"blacklist && !scope.row.is_black"}],attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(a){return e.confirmRemoveBlackList(t.row)}}},[e._v(e._s(e.$t("action.removeInBlackList")))]),e._v(" "),a("lb-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:e.$route.name+"-removeOutBlackList",expression:"`${$route.name}-removeOutBlackList`"},{name:"show",rawName:"v-show",value:e.blacklist&&t.row.is_black,expression:"blacklist && scope.row.is_black"}],attrs:{size:"mini",plain:"",type:"success"},on:{click:function(a){return e.confirmRemoveBlackList(t.row)}}},[e._v(e._s(e.$t("action.removeOutBlackList")))])],1)]}}])})],1),e._v(" "),a("lb-page",{attrs:{batch:!1,page:e.searchForm.page,pageSize:e.searchForm.limit,total:e.total},on:{handleSizeChange:e.handleSizeChange,handleCurrentChange:e.handleCurrentChange}})],1),e._v(" "),a("el-dialog",{attrs:{title:"修改积分",visible:e.showDialog,width:"500px",center:""},on:{"update:visible":function(t){e.showDialog=t}}},[a("lb-tips",[a("div",[e._v("微信昵称:"+e._s(e.subForm.nickName))]),e._v(" "),a("div",{staticClass:"mt-sm mb-sm"},[e._v("手机号:"+e._s(e.subForm.phone||"-"))]),e._v(" "),a("div",[e._v("总积分:"+e._s(e.subForm.yu_integral))])]),e._v(" "),a("el-form",{ref:"subForm",staticClass:"dialog-form",attrs:{model:e.subForm,rules:e.subFormRules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"操作类型",prop:"oper_type"}},[a("el-radio-group",{model:{value:e.subForm.oper_type,callback:function(t){e.$set(e.subForm,"oper_type",t)},expression:"subForm.oper_type"}},[a("el-radio",{attrs:{label:1}},[e._v("增加")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("减少")])],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"积分",prop:"integral"}},[a("el-input",{attrs:{placeholder:"请输入积分"},model:{value:e.subForm.integral,callback:function(t){e.$set(e.subForm,"integral",t)},expression:"subForm.integral"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.showDialog=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],attrs:{type:"primary"},on:{click:e.submitFormInfo}},[e._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var m=a("VU/8")(c,u,!1,function(e){a("3GBS")},"data-v-9397dc48",null);t.default=m.exports}});