Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-24480c50.9556902d.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
18 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-24480c50"],{"090e":function(e,t,i){},"50ae":function(e,t,i){"use strict";i("090e")},"7c63":function(e,t,i){"use strict";i("7fa6")},"7fa6":function(e,t,i){},c92f:function(e,t,i){"use strict";i.r(t);var s=function(){var e=this,t=e._self._c;return t("div",[t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:3}},[t("el-card",{staticClass:"list-selector"},[t("ul",{staticClass:"list-selector-list"},[t("li",{class:{selected:""===e.shopVipUserInfo.conditions.vipLevel},on:{click:function(t){return e.swatchVipLevel({levelName:"全部",vipLevelId:""})}}},[e._v(" "+e._s(e.$t("common.all"))+" ")]),e._l(e.shopVipUserInfo.vipLevels,(function(i,s){return t("li",{key:s,class:{selected:e.shopVipUserInfo.conditions.vipLevel==i.vipLevelId},on:{click:function(t){return e.swatchVipLevel(i)}}},[e._v(" "+e._s(i.levelName)+" ")])}))],2)])],1),t("el-col",{attrs:{span:21}},[t("el-card",[t("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("查询条件")])]),t("el-form",{staticClass:"demo-form-inline text-left",attrs:{inline:!0}},[t("el-form-item",[t("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入会员名称",clearable:""},model:{value:e.shopVipUserInfo.conditions.vipName,callback:function(t){e.$set(e.shopVipUserInfo.conditions,"vipName",t)},expression:"shopVipUserInfo.conditions.vipName"}})],1),t("el-form-item",[t("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入电话",clearable:""},model:{value:e.shopVipUserInfo.conditions.vipTel,callback:function(t){e.$set(e.shopVipUserInfo.conditions,"vipTel",t)},expression:"shopVipUserInfo.conditions.vipTel"}})],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:e._queryShopVipUserMethod}},[t("i",{staticClass:"el-icon-search"}),e._v(" 查询 ")]),t("el-button",{on:{click:e._resetShopVipUserMethod}},[t("i",{staticClass:"el-icon-refresh"}),e._v(" 重置 ")])],1)],1)],1),t("el-card",{staticStyle:{"margin-top":"20px"}},[t("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("会员信息")]),t("div",[t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e._openAddShopVipUserModal}},[t("i",{staticClass:"el-icon-plus"}),e._v("添加会员 ")]),t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e._exportShopVipUser}},[e._v(" 导出 ")])],1)]),t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.shopVipUserInfo.shopVipUsers,border:""}},[t("el-table-column",{attrs:{prop:"vipId",label:"会员编号",align:"center"}}),t("el-table-column",{attrs:{prop:"vipName",label:"会员名称",align:"center"}}),t("el-table-column",{attrs:{prop:"vipTel",label:"会员电话",align:"center"}}),t("el-table-column",{attrs:{prop:"sex",label:"性别",align:"center"},scopedSlots:e._u([{key:"default",fn:function({row:t}){return[e._v(" "+e._s("0"==t.sex?"女":"男")+" ")]}}])}),t("el-table-column",{attrs:{prop:"levelName",label:"会员等级",align:"center"}}),t("el-table-column",{attrs:{prop:"birthday",label:"会员生日",align:"center"}}),t("el-table-column",{attrs:{prop:"startTime",label:"开始时间",align:"center"}}),t("el-table-column",{attrs:{prop:"endTime",label:"结束时间",align:"center"}}),t("el-table-column",{attrs:{label:"操作",align:"center",width:"200"},scopedSlots:e._u([{key:"default",fn:function({row:i}){return[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._openEditShopVipUserModel(i)}}},[e._v(" 修改 ")]),t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e._openDeleteShopVipUserModel(i)}}},[e._v(" 删除 ")]),t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._toUserVipDetail(i)}}},[e._v(" 详情 ")])]}}])})],1),t("el-pagination",{staticStyle:{"margin-top":"20px","text-align":"right"},attrs:{"current-page":e.shopVipUserInfo.conditions.page,"page-size":e.shopVipUserInfo.conditions.row,layout:"total, prev, pager, next",total:e.shopVipUserInfo.total},on:{"current-change":e.handleCurrentChange,"update:currentPage":function(t){return e.$set(e.shopVipUserInfo.conditions,"page",t)},"update:current-page":function(t){return e.$set(e.shopVipUserInfo.conditions,"page",t)}}})],1)],1)],1),t("add-shop-vip-user",{ref:"addShopVipUser",on:{refresh:function(t){return e.listShopVipUsers()}}}),t("edit-shop-vip-user",{ref:"editShopVipUser",on:{refresh:function(t){return e.listShopVipUsers()}}}),t("delete-shop-vip-user",{ref:"deleteShopVipUser",on:{refresh:function(t){return e.listShopVipUsers()}}})],1)},o=[],r=i("7323"),l=i("b775");function p(e){return new Promise((t,i)=>{Object(l["a"])({url:"/shopVipUser.queryShopVipUser",method:"get",params:e}).then(e=>{const i=e.data;t(i)}).catch(e=>{i(e)})})}function a(e){return new Promise((t,i)=>{Object(l["a"])({url:"/shopVipUser.queryShopVipLevel",method:"get",params:e}).then(e=>{const i=e.data;t(i)}).catch(e=>{i(e)})})}function n(e){return new Promise((t,i)=>{Object(l["a"])({url:"/shopVipUser/saveShopVipUser",method:"post",data:e}).then(e=>{const i=e.data;t(i)}).catch(e=>{i(e)})})}function d(e){return new Promise((t,i)=>{Object(l["a"])({url:"/shopVipUser/updateShopVipUser",method:"post",data:e}).then(e=>{const s=e.data;0===s.code?t(s):i(s.msg)}).catch(e=>{i(e)})})}function c(e){return new Promise((t,i)=>{Object(l["a"])({url:"/shopVipUser/deleteShopVipUser",method:"post",data:e}).then(e=>{const s=e.data;0===s.code?t(s):i(s.msg)}).catch(e=>{i(e)})})}function h(e){return new Promise((t,i)=>{Object(l["a"])({url:"/export.exportData",method:"get",params:e}).then(e=>{const i=e.data;t(i)}).catch(e=>{i(e)})})}var f=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"添加会员",visible:e.dialogVisible,width:"70%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.addShopVipUserInfo,"label-width":"120px"}},[t("el-form-item",{attrs:{label:"会员名称",prop:"vipName",required:""}},[t("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请填写会员名称"},model:{value:e.addShopVipUserInfo.vipName,callback:function(t){e.$set(e.addShopVipUserInfo,"vipName",t)},expression:"addShopVipUserInfo.vipName"}})],1),t("el-form-item",{attrs:{label:"会员电话",prop:"vipTel",required:""}},[t("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请填写会员电话"},model:{value:e.addShopVipUserInfo.vipTel,callback:function(t){e.$set(e.addShopVipUserInfo,"vipTel",t)},expression:"addShopVipUserInfo.vipTel"}})],1),t("el-form-item",{attrs:{label:"性别",prop:"sex",required:""}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请选择性别"},model:{value:e.addShopVipUserInfo.sex,callback:function(t){e.$set(e.addShopVipUserInfo,"sex",t)},expression:"addShopVipUserInfo.sex"}},e._l(e.addShopVipUserInfo.sexs,(function(e){return t("el-option",{key:e.statusCd,attrs:{label:e.name,value:e.statusCd}})})),1)],1),t("el-form-item",{attrs:{label:"会员等级",prop:"vipLevel",required:""}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请选择会员等级"},model:{value:e.addShopVipUserInfo.vipLevel,callback:function(t){e.$set(e.addShopVipUserInfo,"vipLevel",t)},expression:"addShopVipUserInfo.vipLevel"}},e._l(e.addShopVipUserInfo.vipLevels,(function(e){return t("el-option",{key:e.vipLevelId,attrs:{label:e.levelName,value:e.vipLevelId}})})),1)],1),t("el-form-item",{attrs:{label:"会员生日",prop:"birthday",required:""}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"必填,请填写会员生日","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.addShopVipUserInfo.birthday,callback:function(t){e.$set(e.addShopVipUserInfo,"birthday",t)},expression:"addShopVipUserInfo.birthday"}})],1),t("el-form-item",{attrs:{label:"开始时间",prop:"startTime",required:""}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"必填,请填写开始时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.addShopVipUserInfo.startTime,callback:function(t){e.$set(e.addShopVipUserInfo,"startTime",t)},expression:"addShopVipUserInfo.startTime"}})],1),t("el-form-item",{attrs:{label:"结束时间",prop:"endTime",required:""}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"必填,请填写结束时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.addShopVipUserInfo.endTime,callback:function(t){e.$set(e.addShopVipUserInfo,"endTime",t)},expression:"addShopVipUserInfo.endTime"}})],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.saveShopVipUserInfo}},[e._v("保存")])],1)],1)},u=[],v={name:"AddShopVipUser",data(){return{dialogVisible:!1,addShopVipUserInfo:{vipId:"",vipName:"",vipTel:"",sex:"",vipLevel:"",birthday:"",startTime:"",endTime:"",vipLevels:[],sexs:[]}}},methods:{open(){this.dialogVisible=!0,this._listAddShopVipLevels(),this.getSexDict()},handleClose(){this.$refs.form.resetFields(),this.clearAddShopVipUserInfo()},async getSexDict(){try{const{data:e}=await Object(r["e"])("s_shop_vip_user","sex");this.addShopVipUserInfo.sexs=e}catch(e){console.error("获取性别字典失败:",e)}},async saveShopVipUserInfo(){try{await this.$refs.form.validate(),this.addShopVipUserInfo.shopId=Object(r["f"])();const e=await n(this.addShopVipUserInfo);console.log(e),this.$message.success("添加成功"),this.dialogVisible=!1,this.$emit("refresh")}catch(e){console.error("添加会员失败:",e)}},clearAddShopVipUserInfo(){this.addShopVipUserInfo={vipName:"",vipTel:"",sex:"",vipLevel:"",birthday:"",startTime:"",endTime:"",vipLevels:[]}},async _listAddShopVipLevels(){const e={page:1,row:50,shopId:Object(r["f"])()};try{const t=await a(e);this.addShopVipUserInfo.vipLevels=t.data}catch(t){console.error("获取会员等级失败:",t)}}}},m=v,V=i("2877"),U=Object(V["a"])(m,f,u,!1,null,null,null),S=U.exports,b=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"修改会员",visible:e.dialogVisible,width:"70%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.editShopVipUserInfo,"label-width":"120px"}},[t("el-form-item",{attrs:{label:"会员名称",prop:"vipName",required:""}},[t("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请填写会员名称"},model:{value:e.editShopVipUserInfo.vipName,callback:function(t){e.$set(e.editShopVipUserInfo,"vipName",t)},expression:"editShopVipUserInfo.vipName"}})],1),t("el-form-item",{attrs:{label:"会员电话",prop:"vipTel",required:""}},[t("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请填写会员电话"},model:{value:e.editShopVipUserInfo.vipTel,callback:function(t){e.$set(e.editShopVipUserInfo,"vipTel",t)},expression:"editShopVipUserInfo.vipTel"}})],1),t("el-form-item",{attrs:{label:"性别",prop:"sex",required:""}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请选择性别"},model:{value:e.editShopVipUserInfo.sex,callback:function(t){e.$set(e.editShopVipUserInfo,"sex",t)},expression:"editShopVipUserInfo.sex"}},e._l(e.editShopVipUserInfo.sexs,(function(e){return t("el-option",{key:e.statusCd,attrs:{label:e.name,value:e.statusCd}})})),1)],1),t("el-form-item",{attrs:{label:"会员等级",prop:"vipLevel",required:""}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请选择会员等级"},model:{value:e.editShopVipUserInfo.vipLevel,callback:function(t){e.$set(e.editShopVipUserInfo,"vipLevel",t)},expression:"editShopVipUserInfo.vipLevel"}},e._l(e.editShopVipUserInfo.vipLevels,(function(e){return t("el-option",{key:e.vipLevelId,attrs:{label:e.levelName,value:e.vipLevelId}})})),1)],1),t("el-form-item",{attrs:{label:"会员生日",prop:"birthday",required:""}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"必填,请填写会员生日","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.editShopVipUserInfo.birthday,callback:function(t){e.$set(e.editShopVipUserInfo,"birthday",t)},expression:"editShopVipUserInfo.birthday"}})],1),t("el-form-item",{attrs:{label:"开始时间",prop:"startTime",required:""}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"必填,请填写开始时间","value-format":"yyyy-MM-dd HH:mm:ss"},model:{value:e.editShopVipUserInfo.startTime,callback:function(t){e.$set(e.editShopVipUserInfo,"startTime",t)},expression:"editShopVipUserInfo.startTime"}})],1),t("el-form-item",{attrs:{label:"结束时间",prop:"endTime",required:""}},[t("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date","value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"必填,请填写结束时间"},model:{value:e.editShopVipUserInfo.endTime,callback:function(t){e.$set(e.editShopVipUserInfo,"endTime",t)},expression:"editShopVipUserInfo.endTime"}})],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.editShopVipUser}},[e._v("保存")])],1)],1)},I=[],y={name:"EditShopVipUser",data(){return{dialogVisible:!1,editShopVipUserInfo:{vipId:"",vipName:"",vipTel:"",sex:"",vipLevel:"",birthday:"",startTime:"",endTime:"",shopId:"",vipLevels:[],sexs:[]}}},methods:{open(e){this.dialogVisible=!0,this.refreshEditShopVipUserInfo(),Object.assign(this.editShopVipUserInfo,e),this._listEditShopVipLevels(),this.getSexDict()},handleClose(){this.$refs.form.resetFields(),this.refreshEditShopVipUserInfo()},async getSexDict(){try{const{data:e}=await Object(r["e"])("s_shop_vip_user","sex");this.editShopVipUserInfo.sexs=e}catch(e){console.error("获取性别字典失败:",e)}},async editShopVipUser(){try{await this.$refs.form.validate(),this.editShopVipUserInfo.shopId=Object(r["f"])();const e=await d(this.editShopVipUserInfo);console.log(e),this.$message.success("修改成功"),this.dialogVisible=!1,this.$emit("refresh")}catch(e){this.$message.error(e),console.error("修改会员失败:",e)}},refreshEditShopVipUserInfo(){this.editShopVipUserInfo={vipId:"",vipName:"",vipTel:"",sex:"",vipLevel:"",birthday:"",startTime:"",endTime:"",shopId:"",vipLevels:[],sexs:[]}},async _listEditShopVipLevels(){const e={page:1,row:50,shopId:Object(r["f"])()};try{const t=await a(e);this.editShopVipUserInfo.vipLevels=t.data}catch(t){console.error("获取会员等级失败:",t)}}}},g=y,_=Object(V["a"])(g,b,I,!1,null,null,null),x=_.exports,w=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"请确认您的操作!",visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticClass:"text-center"},[t("p",[e._v("确定删除会员信息")])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("点错了")]),t("el-button",{attrs:{type:"primary"},on:{click:e.deleteShopVipUser}},[e._v("确认删除")])],1)])},k=[],T={name:"DeleteShopVipUser",data(){return{dialogVisible:!1,deleteShopVipUserInfo:{}}},methods:{open(e){this.dialogVisible=!0,this.deleteShopVipUserInfo={...e}},handleClose(){this.deleteShopVipUserInfo={}},async deleteShopVipUser(){try{this.deleteShopVipUserInfo.shopId=Object(r["f"])();const e=await c(this.deleteShopVipUserInfo);console.log(e),this.$message.success("删除成功"),this.dialogVisible=!1,this.$emit("refresh")}catch(e){this.$message.error(e),console.error("删除会员失败:",e)}}}},L=T,$=(i("7c63"),Object(V["a"])(L,w,k,!1,null,"7a421e34",null)),C=$.exports,N={name:"ShopVipUser",components:{AddShopVipUser:S,EditShopVipUser:x,DeleteShopVipUser:C},data(){return{loading:!1,shopVipUserInfo:{shopVipUsers:[],total:0,records:1,moreCondition:!1,vipId:"",vipLevels:[],conditions:{vipName:"",vipTel:"",vipLevel:"",shopId:"",page:1,row:10}}}},created(){this._listShopVipUsers(),this._listShopVipLevels()},methods:{handleCurrentChange(e){this.shopVipUserInfo.conditions.page=e,this._listShopVipUsers()},async _listShopVipUsers(){this.loading=!0,this.shopVipUserInfo.conditions.shopId=Object(r["f"])();try{const e=await p(this.shopVipUserInfo.conditions);this.shopVipUserInfo.total=e.total,this.shopVipUserInfo.records=e.records,this.shopVipUserInfo.shopVipUsers=e.data}catch(e){console.error("获取会员列表失败:",e)}finally{this.loading=!1}},_openAddShopVipUserModal(){this.$refs.addShopVipUser.open()},_openEditShopVipUserModel(e){this.$refs.editShopVipUser.open(e)},_openDeleteShopVipUserModel(e){this.$refs.deleteShopVipUser.open(e)},_queryShopVipUserMethod(){this.shopVipUserInfo.conditions.page=1,this._listShopVipUsers()},_resetShopVipUserMethod(){this.shopVipUserInfo.conditions={vipName:"",vipTel:"",vipLevel:"",shopId:"",page:1,row:10},this._listShopVipUsers()},async _listShopVipLevels(){const e={page:1,row:50,shopId:Object(r["f"])()};try{const t=await a(e);this.shopVipUserInfo.vipLevels=t.data}catch(t){console.error("获取会员等级失败:",t)}},_toUserVipDetail(e){window.open("/#/pages/user/vipDetail?vipId="+e.vipId)},swatchVipLevel(e){this.shopVipUserInfo.conditions.vipLevel=e.vipLevelId,this._listShopVipUsers()},async _exportShopVipUser(){this.shopVipUserInfo.conditions.pagePath="shopVipUser";try{const e=await h(this.shopVipUserInfo.conditions);this.$message.success(e.msg),0===e.code&&this.$router.push("/pages/property/downloadTempFile?tab=下载中心&fileType=shopVipUser")}catch(e){console.error("导出失败:",e)}}}},j=N,M=(i("50ae"),Object(V["a"])(j,s,o,!1,null,"7c10a926",null));t["default"]=M.exports}}]);
//# sourceMappingURL=chunk-24480c50.9556902d.js.map