2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-bbd8c324"],{"03be":function(e,t,l){},"41fe":function(e,t,l){"use strict";l("03be")},"8d0e":function(e,t,l){"use strict";l("983d")},"983d":function(e,t,l){},b63e:function(e,t,l){"use strict";l.d(t,"a",(function(){return o})),l.d(t,"b",(function(){return i}));var a=l("b775");function o(e){return new Promise((t,l)=>{Object(a["a"])({url:"/couponShopPool.listCouponShopPool",method:"get",params:e}).then(e=>{const l=e.data;t(l)}).catch(e=>{l(e)})})}function i(e){return new Promise((t,l)=>{Object(a["a"])({url:"/cart/sendGoldCount",method:"post",data:e}).then(e=>{const l=e.data;t(l)}).catch(e=>{l(e)})})}},c258:function(e,t,l){"use strict";l.r(t);var a=function(){var e=this,t=e._self._c;return t("div",[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-card",[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("查询条件")])]),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:4}},[t("el-input",{attrs:{placeholder:"请输入会员名称",clearable:""},model:{value:e.conditions.levelName,callback:function(t){e.$set(e.conditions,"levelName",t)},expression:"conditions.levelName"}})],1),t("el-col",{attrs:{span:4}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择会员等级",clearable:""},model:{value:e.conditions.vipLevel,callback:function(t){e.$set(e.conditions,"vipLevel",t)},expression:"conditions.vipLevel"}},e._l(e.vipLevels,(function(e){return t("el-option",{key:e.statusCd,attrs:{label:e.name,value:e.statusCd}})})),1)],1),t("el-col",{attrs:{span:4}},[t("el-input",{attrs:{placeholder:"请输入等级编号",clearable:""},model:{value:e.conditions.vipLevelId,callback:function(t){e.$set(e.conditions,"vipLevelId",t)},expression:"conditions.vipLevelId"}})],1),t("el-col",{attrs:{span:4}},[t("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.queryShopVipLevelMethod}},[e._v("查询")]),t("el-button",{attrs:{icon:"el-icon-refresh"},on:{click:e.resetShopVipLevelMethod}},[e._v("重置")])],1)],1)],1)],1)],1),t("el-row",{staticClass:"margin-top"},[t("el-col",{attrs:{span:24}},[t("el-card",[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("会员等级")]),t("el-button",{staticStyle:{float:"right"},attrs:{type:"primary",icon:"el-icon-plus",size:"small"},on:{click:e.openAddShopVipLevelModal}},[e._v("添加等级")])],1),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.shopVipLevels,border:""}},[t("el-table-column",{attrs:{prop:"levelName",label:"会员名称",align:"center"}}),t("el-table-column",{attrs:{prop:"vipLevelName",label:"会员等级",align:"center"}}),t("el-table-column",{attrs:{prop:"remark",label:"说明",align:"center"}}),t("el-table-column",{attrs:{prop:"createTime",label:"创建时间",align:"center"}}),t("el-table-column",{attrs:{label:"操作",align:"center",width:"200"},scopedSlots:e._u([{key:"default",fn:function(l){return[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.openEditShopVipLevelModel(l.row)}}},[e._v("修改")]),t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e.openDeleteShopVipLevelModel(l.row)}}},[e._v("删除")])]}}])})],1),t("el-pagination",{attrs:{"current-page":e.page,"page-size":e.rows,total:e.total,layout:"total, sizes, prev, pager, next, jumper"},on:{"current-change":e.handlePageChange}}),t("div",{staticClass:"margin-top"},[t("span",[e._v("会员等级从大到小依次为:一级、二级、三级")])])],1)],1)],1),t("add-shop-vip-level",{ref:"addShopVipLevel",on:{refresh:e.listShopVipLevels}}),t("edit-shop-vip-level",{ref:"editShopVipLevel",on:{refresh:e.listShopVipLevels}}),t("delete-shop-vip-level",{ref:"deleteShopVipLevel",on:{refresh:e.listShopVipLevels}}),t("choose-coupon-shop-pool",{ref:"chooseCouponShopPool",on:{refresh:e.listShopVipLevels}})],1)},o=[],i=l("7323"),s=l("b775");function r(e){return new Promise((t,l)=>{Object(s["a"])({url:"/shopVipUser.queryShopVipLevel",method:"get",params:e}).then(e=>{const l=e.data;t(l)}).catch(e=>{l(e)})})}function n(e){return new Promise((t,l)=>{Object(s["a"])({url:"/shopVipUser/saveShopVipLevel",method:"post",data:e}).then(e=>{const l=e.data;t(l)}).catch(e=>{l(e)})})}function p(e){return new Promise((t,l)=>{Object(s["a"])({url:"/shopVipUser/updateShopVipLevel",method:"post",data:e}).then(e=>{const l=e.data;t(l)}).catch(e=>{l(e)})})}function c(e){return new Promise((t,l)=>{Object(s["a"])({url:"/shopVipUser/deleteShopVipLevel",method:"post",data:e}).then(e=>{const l=e.data;t(l)}).catch(e=>{l(e)})})}var h=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"添加会员等级",visible:e.dialogVisible,width:"50%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.formData,"label-width":"120px"}},[t("el-form-item",{attrs:{label:"会员名称",prop:"levelName",required:""}},[t("el-input",{attrs:{placeholder:"必填,请填写会员名称",clearable:""},model:{value:e.formData.levelName,callback:function(t){e.$set(e.formData,"levelName",t)},expression:"formData.levelName"}})],1),t("el-form-item",{attrs:{label:"会员等级",prop:"vipLevel",required:""}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请选择会员等级",clearable:""},model:{value:e.formData.vipLevel,callback:function(t){e.$set(e.formData,"vipLevel",t)},expression:"formData.vipLevel"}},e._l(e.vipLevels,(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:"remark"}},[t("el-input",{attrs:{type:"textarea",placeholder:"选填,请填写说明",rows:3},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],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.handleSubmit}},[e._v("确 定")])],1)],1)},d=[],v={name:"AddShopVipLevel",data(){return{dialogVisible:!1,formData:{levelName:"",vipLevel:"",remark:"",goldCostMoney:"1",integralCostMoney:"1",shopId:"",couponValues:[]},vipLevels:[]}},methods:{open(){this.dialogVisible=!0,this.getVipLevelDict(),this.formData.shopId=Object(i["f"])()},async getVipLevelDict(){try{const{data:e}=await Object(i["e"])("s_shop_vip_level","vip_level");this.vipLevels=e}catch(e){console.error(e)}},handleClose(){this.$refs.form.resetFields(),this.formData={levelName:"",vipLevel:"",remark:"",goldCostMoney:"1",integralCostMoney:"1",couponValues:[]}},async handleSubmit(){try{await this.$refs.form.validate();const e=await n(this.formData);console.log(e),this.$message.success("添加成功"),this.dialogVisible=!1,this.$emit("refresh")}catch(e){console.error(e)}}}},u=v,m=l("2877"),f=Object(m["a"])(u,h,d,!1,null,null,null),b=f.exports,g=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"修改会员等级",visible:e.dialogVisible,width:"50%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.formData,"label-width":"120px"}},[t("el-form-item",{attrs:{label:"会员名称",prop:"levelName",required:""}},[t("el-input",{attrs:{placeholder:"必填,请填写会员名称",clearable:""},model:{value:e.formData.levelName,callback:function(t){e.$set(e.formData,"levelName",t)},expression:"formData.levelName"}})],1),t("el-form-item",{attrs:{label:"会员等级",prop:"vipLevel",required:""}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请选择会员等级",clearable:""},model:{value:e.formData.vipLevel,callback:function(t){e.$set(e.formData,"vipLevel",t)},expression:"formData.vipLevel"}},e._l(e.vipLevels,(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:"remark"}},[t("el-input",{attrs:{type:"textarea",placeholder:"选填,请填写说明",rows:3},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],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.handleSubmit}},[e._v("确 定")])],1)],1)},L=[],V={name:"EditShopVipLevel",data(){return{dialogVisible:!1,formData:{vipLevelId:"",levelName:"",vipLevel:"",remark:"",goldCostMoney:"1",integralCostMoney:"1",couponValues:[]},vipLevels:[]}},methods:{open(e){this.dialogVisible=!0,this.formData={...e},this.getVipLevelDict()},async getVipLevelDict(){try{const{data:e}=await Object(i["e"])("s_shop_vip_level","vip_level");this.vipLevels=e}catch(e){console.error(e)}},handleClose(){this.$refs.form.resetFields(),this.formData={vipLevelId:"",levelName:"",vipLevel:"",remark:"",goldCostMoney:"1",integralCostMoney:"1",couponValues:[]}},async handleSubmit(){try{await this.$refs.form.validate();const e=await p(this.formData);console.log(e),this.$message.success("修改成功"),this.dialogVisible=!1,this.$emit("refresh")}catch(e){console.error(e)}}}},S=V,y=Object(m["a"])(S,g,L,!1,null,null,null),w=y.exports,k=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"删除确认",visible:e.dialogVisible,width:"30%",center:""},on:{"update:visible":function(t){e.dialogVisible=t}}},[t("div",{staticStyle:{"text-align":"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.handleConfirm}},[e._v("确认删除")])],1)])},_=[],C={name:"DeleteShopVipLevel",data(){return{dialogVisible:!1,currentRow:null}},methods:{open(e){this.dialogVisible=!0,this.currentRow=e},async handleConfirm(){try{await c({vipLevelId:this.currentRow.vipLevelId}),this.$message.success("删除成功"),this.dialogVisible=!1,this.$emit("refresh")}catch(e){console.error(e)}}}},D=C,x=Object(m["a"])(D,k,_,!1,null,null,null),$=x.exports,N=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"选择商家优惠券",visible:e.dialogVisible,width:"70%",top:"5vh"},on:{"update:visible":function(t){e.dialogVisible=t}}},[t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:24}},[t("el-input",{staticStyle:{width:"300px","margin-bottom":"20px"},attrs:{placeholder:"输入商家优惠券池名称",clearable:""},model:{value:e.searchText,callback:function(t){e.searchText=t},expression:"searchText"}},[t("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:e.handleSearch},slot:"append"})],1),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.couponList,border:""}},[t("el-table-column",{attrs:{prop:"poolId",label:"优惠券编码",align:"center"}}),t("el-table-column",{attrs:{prop:"couponName",label:"优惠券名称",align:"center"}}),t("el-table-column",{attrs:{prop:"actualPrice",label:"面值",align:"center"}}),t("el-table-column",{attrs:{prop:"stock",label:"库存",align:"center"}}),t("el-table-column",{attrs:{prop:"validityDay",label:"有效期",align:"center"}}),t("el-table-column",{attrs:{label:"操作",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(l){return[t("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.handleSelect(l.row)}}},[e._v("选择")])]}}])})],1),t("el-pagination",{staticStyle:{"margin-top":"20px"},attrs:{"current-page":e.page,"page-size":e.pageSize,total:e.total,layout:"total, prev, pager, next"},on:{"current-change":e.handlePageChange}})],1)],1)],1)},j=[],M=l("b63e"),O={name:"ChooseCouponShopPool",data(){return{dialogVisible:!1,searchText:"",couponList:[],page:1,pageSize:10,total:0}},methods:{open(){this.dialogVisible=!0,this.getCouponList()},async getCouponList(){try{const e=await Object(M["a"])({page:this.page,row:this.pageSize,couponName:this.searchText});this.couponList=e.data,this.total=e.total}catch(e){console.error(e)}},handleSearch(){this.page=1,this.getCouponList()},handlePageChange(e){this.page=e,this.getCouponList()},handleSelect(e){this.$emit("selected",e),this.dialogVisible=!1}}},P=O,I=(l("8d0e"),Object(m["a"])(P,N,j,!1,null,"ed524986",null)),z=I.exports,T={name:"ShopVipLevel",components:{AddShopVipLevel:b,EditShopVipLevel:w,DeleteShopVipLevel:$,ChooseCouponShopPool:z},data(){return{shopVipLevels:[],total:0,page:1,rows:10,vipLevels:[],conditions:{levelName:"",vipLevel:"",vipLevelId:"",shopId:""}}},created(){this.listShopVipLevels(),this.getVipLevelDict()},methods:{async listShopVipLevels(){try{let e=await Object(i["f"])();this.conditions.shopId=e;const t=await r({...this.conditions,page:this.page,row:this.rows});this.shopVipLevels=t.data,this.total=t.total}catch(e){console.error(e)}},async getVipLevelDict(){try{const{data:e}=await Object(i["e"])("s_shop_vip_level","vip_level");this.vipLevels=e}catch(e){console.error(e)}},queryShopVipLevelMethod(){this.page=1,this.listShopVipLevels()},resetShopVipLevelMethod(){this.conditions={levelName:"",vipLevel:"",vipLevelId:"",shopId:""},this.listShopVipLevels()},openAddShopVipLevelModal(){this.componentShow="addShopVipLevel",this.$nextTick(()=>{this.$refs.addShopVipLevel.open()})},openEditShopVipLevelModel(e){this.componentShow="editShopVipLevel",this.$nextTick(()=>{this.$refs.editShopVipLevel.open(e)})},openDeleteShopVipLevelModel(e){this.$refs.deleteShopVipLevel.open(e)},handlePageChange(e){this.page=e,this.listShopVipLevels()}}},q=T,A=(l("41fe"),Object(m["a"])(q,a,o,!1,null,"32b9d4f0",null));t["default"]=A.exports}}]);
|
|
//# sourceMappingURL=chunk-bbd8c324.b7a4e409.js.map
|