| 1 |
- {"code":"/*!\n * build: vue-admin-beautiful \n * copyright: chuzhixin 1204505056@qq.com \n * time: 2022-12-12 09:51:32\n */\n(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-34045b75\"],{\"2bce\":function(e,t,o){\"use strict\";o.r(t);var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o(\"div\",[o(\"el-dialog\",{attrs:{\"close-on-press-escape\":!1,\"close-on-click-modal\":!1,title:\"优惠券列表\",visible:e.isShow,width:\"60%\"},on:{close:e.cancel}},[o(\"div\",{staticClass:\"clearfix\",staticStyle:{\"padding-bottom\":\"10px\"}},[o(\"el-input\",{staticStyle:{width:\"240px\"},attrs:{size:\"mini\",placeholder:\"请输入优惠券名称\",clearable:\"\"},on:{clear:function(t){return e.pageChange(1)}},nativeOn:{keyup:function(t){return!t.type.indexOf(\"key\")&&e._k(t.keyCode,\"enter\",13,t.key,\"Enter\")?null:e.pageChange(1)}},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:\"keyword\"}},[o(\"el-button\",{attrs:{slot:\"append\"},on:{click:function(t){return e.pageChange(1)}},slot:\"append\"},[o(\"i\",{staticClass:\"el-icon-search\"})])],1)],1),o(\"el-table\",{ref:\"coupon_list\",attrs:{border:\"\",data:e.coupon_list,size:\"small\"},on:{\"selection-change\":e.selectionChange,\"row-dblclick\":e.selCoupon}},[e.isCheck?o(\"el-table-column\",{attrs:{type:\"selection\",width:\"55\",align:\"center\"}}):e._e(),o(\"el-table-column\",{attrs:{prop:\"name\",label:\"优惠券名称\",align:\"center\"}}),o(\"el-table-column\",{attrs:{label:\"有效时间\",prop:\"startTime\",align:\"center\"},scopedSlots:e._u([{key:\"default\",fn:function(t){return[e._v(\" \"+e._s(e.$_common.formatDate(t.row.startTime,\"yyyy-MM-dd\"))+\" 至 \"+e._s(e.$_common.formatDate(t.row.endTime,\"yyyy-MM-dd\"))+\" \")]}}])}),o(\"el-table-column\",{attrs:{prop:\"basicCode\",label:\"发放日期\",align:\"center\",\"min-width\":\"200\"},scopedSlots:e._u([{key:\"default\",fn:function(t){return[e._v(\" \"+e._s(e.$_common.formatDate(t.row.grantStartTime,\"yyyy-MM-dd\"))+\" 至 \"+e._s(e.$_common.formatDate(t.row.grantEndTime,\"yyyy-MM-dd\"))+\" \")]}}])}),o(\"el-table-column\",{attrs:{label:\"发放范围\",align:\"center\",\"min-width\":\"180\",prop:\"useShopName\"},scopedSlots:e._u([{key:\"default\",fn:function(t){return[e._v(\" \"+e._s(t.row.useShopName.length?t.row.useShopName.join(\",\"):t.row.useShopName[0])+\" \")]}}])}),o(\"el-table-column\",{attrs:{prop:\"reducePrice\",align:\"center\",label:\"面值(元)\",\"min-width\":\"120\"}}),o(\"el-table-column\",{attrs:{prop:\"minPrice\",align:\"center\",label:\"使用门槛\",\"min-width\":\"100\"},scopedSlots:e._u([{key:\"default\",fn:function(t){return[e._v(\" \"+e._s(0===Number(t.row.minPrice)?\"无门槛\":t.row.minPrice)+\" \")]}}])}),o(\"el-table-column\",{attrs:{prop:\"totalNum\",align:\"center\",label:\"总数量\",\"min-width\":\"100\"}}),o(\"el-table-column\",{attrs:{prop:\"usableNum\",align:\"center\",label:\"剩余数量\",\"min-width\":\"100\"}}),o(\"el-table-column\",{attrs:{label:\"选择商品\",align:\"center\"},scopedSlots:e._u([{key:\"default\",fn:function(t){return[o(\"el-button\",{attrs:{size:\"mini\",icon:\"el-icon-check\"},on:{click:function(o){return e.selCoupon(t.row)}}})]}}])})],1),o(\"FooterPage\",{attrs:{\"page-size\":e.pre_page,\"total-page\":e.total,\"current-page\":e.page},on:{\"update:totalPage\":function(t){e.total=t},\"update:total-page\":function(t){e.total=t},\"update:currentPage\":function(t){e.page=t},\"update:current-page\":function(t){e.page=t},pageChange:e.pageChange,sizeChange:e.sizeChange}}),e.isCheck?o(\"div\",{staticStyle:{width:\"100%\",\"border-top\":\"1px solid #eee\",\"padding-top\":\"10px\"},attrs:{slot:\"footer\"},slot:\"footer\"},[o(\"el-button\",{attrs:{size:\"small\",type:\"primary\"},on:{click:e.confirm}},[e._v(\"确定\")]),o(\"el-button\",{attrs:{size:\"small\"},on:{click:e.cancel}},[e._v(\"取消\")])],1):e._e()],1)],1)},s=[],i=o(\"c371\"),r={name:\"CouponModel\",props:{isShow:{type:Boolean,default:!1},isCheck:{type:Boolean,default:!0},shopId:{type:[Number,String,Array],default:0},userCenterId:{type:Number,default:0},categoryId:{type:[Number,String],default:0},grantType:{type:Number,default:0},couponType:{type:Number,default:0}},data(){return{keyword:\"\",choose_data:[],coupon_list:[],loading:!1,total:0,pre_page:10,page:1,pageLayout:\"total, prev, pager, next\"}},created(){this.getList()},methods:{async getAll(){const{data:e,pageTotal:t}=await Object(i[\"getAll\"])({page:this.page,pageSize:this.pre_page,couponType:this.couponType,grantType:this.grantType,auditStatus:2});this.total=t,this.coupon_list=e},async searchMarket(){const{data:e,pageTotal:t}=await Object(i[\"searchMarket\"])({page:this.page,pageSize:this.pre_page,couponType:this.couponType,grantType:this.grantType,keyword:this.keyword,auditStatus:2});this.total=t,this.coupon_list=e},getList(){const e={keyword:this.keyword},t=this.$_common.isSerch(e);t?this.searchMarket():this.getAll()},pageChange(e){this.page=e,this.getList()},sizeChange(e){this.pre_page=e,this.pageChange(1)},selectionChange(e){this.choose_data=e},cancel(){this.$emit(\"cancel\")},confirm(){this.cancel(),this.$emit(\"confirm\",this.choose_data)},selCoupon(e){this.cancel(),this.$emit(\"confirm\",[e])}}},n=r,l=o(\"2877\"),d=Object(l[\"a\"])(n,a,s,!1,null,\"3f3f18fc\",null);t[\"default\"]=d.exports},6782:function(e,t,o){},\"85d3\":function(e,t,o){\"use strict\";o(\"6782\")},c2b5:function(e,t,o){\"use strict\";o.r(t);var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o(\"ContainerTit\",[o(\"div\",{attrs:{slot:\"headr\"},slot:\"headr\"},[o(\"el-button\",{attrs:{loading:e.loading,disabled:e.vipCardId},on:{click:function(t){return e.delPauseSave(1)}}},[e._v(\" 清除暂存 \")]),o(\"el-button\",{attrs:{loading:e.loading,disabled:e.vipCardId},on:{click:e.temData}},[e._v(\" 暂存 \")]),o(\"el-button\",{attrs:{type:\"primary\",loading:e.loading},on:{click:e.submitGoods}},[e._v(\" 提交保存 \")])],1),o(\"div\",{staticClass:\"page-tip-div\",staticStyle:{\"margin-top\":\"0\"}},[e._v(\" 1、添加会员卡之后,只有 \"),o(\"i\",{staticStyle:{color:\"#f00\"}},[e._v(\"排序,状态,库存和使用须知\")]),e._v(\" 可以修改,其他选项不支持修改 2、会员卡禁用请谨慎,一旦禁用用户将无法领取与使用此会员卡 \")]),o(\"el-card\",{staticClass:\"box-card\",attrs:{shadow:\"never\"}},[o(\"div\",{attrs:{slot:\"header\"},slot:\"header\"},[o(\"span\",[e._v(\"基本信息\")])]),o(\"el-form\",{ref:\"form\",attrs:{rules:e.form_rule,model:e.form,size:\"small\",\"label-width\":\"200px\"}},[o(\"el-form-item\",{attrs:{label:\"会员卡名称\",prop:\"name\"}},[o(\"el-input\",{staticStyle:{width:\"300px\"},attrs:{disabled:e.vipCardId,maxlength:\"5\",placeholder:\"请填写五个字以内的会员卡名称\"},model:{value:e.form.name,callback:function(t){e.$set(e.form,\"name\",t)},expression:\"form.name\"}})],1),o(\"el-form-item\",{attrs:{label:\"卡片样式\",prop:\"styleId\"}},[[o(\"div\",{staticClass:\"card\"},e._l(e.typeList,(function(t){return o(\"div\",{key:t.id,staticClass:\"card-item card-style-golden\",class:[t.title,e.form.styleId===t.id?\"active\":\"\"],on:{click:function(o){return e.chooseCard(t.id)}}})})),0)]],2),o(\"el-form-item\",{attrs:{label:\"排序\",prop:\"sort\"}},[o(\"el-input-number\",{staticStyle:{width:\"300px\"},attrs:{controls:!1,placeholder:\"请填写排序\"},model:{value:e.form.sort,callback:function(t){e.$set(e.form,\"sort\",t)},expression:\"form.sort\"}}),o(\"div\",[o(\"p\",{staticClass:\"el-icon-warning\",staticStyle:{\"font-size\":\"12px\",color:\"#e6a23c\"}},[e._v(\" 提示:数字越大排序越靠前,如果为空,默认排序方式为创建时间 \")])])],1),o(\"el-form-item\",{attrs:{label:\"会员卡模式\",prop:\"mode\"}},[o(\"el-radio-group\",{model:{value:e.form.mode,callback:function(t){e.$set(e.form,\"mode\",t)},expression:\"form.mode\"}},e._l(e.vipType,(function(t){return o(\"el-radio\",{key:t.userTypeId,attrs:{disabled:e.vipCardId,label:t.id}},[e._v(\" \"+e._s(t.name)+\" \")])})),1)],1),4===e.form.mode?o(\"el-form-item\",{attrs:{prop:\"useShop\"}},[o(\"el-button\",{attrs:{disabled:e.vipCardId,type:\"primary\"},on:{click:function(t){e.goods_show=!0}}},[e._v(\" 选择商品 \")]),o(\"div\",{staticStyle:{display:\"inline-block\"}},e._l(e.goodsName,(function(t,a){return o(\"el-tag\",{key:a,attrs:{closable:!e.vipCardId},on:{close:function(o){return e.closeTag(\"delgood\",t)}}},[e._v(\" \"+e._s(t)+\" \")])})),1)],1):e._e(),o(\"el-form-item\",{attrs:{label:\"会员权益\",prop:\"freeShipping\"}},[o(\"el-radio-group\",{attrs:{disabled:e.vipCardId},model:{value:e.form.freeShipping,callback:function(t){e.$set(e.form,\"freeShipping\",t)},expression:\"form.freeShipping\"}},[o(\"el-radio\",{attrs:{label:5}},[e._v(\"包邮\")]),o(\"el-radio\",{attrs:{label:4}},[e._v(\"不包邮\")])],1)],1),o(\"el-form-item\",{attrs:{label:\"会员特价\",prop:\"memberSpecialPrice\"}},[o(\"el-radio-group\",{model:{value:e.form.memberSpecialPrice,callback:function(t){e.$set(e.form,\"memberSpecialPrice\",t)},expression:\"form.memberSpecialPrice\"}},[o(\"el-radio\",{attrs:{label:5}},[e._v(\"启用\")]),o(\"el-radio\",{attrs:{label:4}},[e._v(\"禁用\")])],1)],1),o(\"el-form-item\",{attrs:{label:\"会员折扣\",prop:\"discount\"}},[o(\"el-radio-group\",{attrs:{disabled:e.vipCardId},model:{value:e.form.vipDiscount,callback:function(t){e.$set(e.form,\"vipDiscount\",t)},expression:\"form.vipDiscount\"}},[o(\"el-radio\",{attrs:{label:5}},[e._v(\"折扣\")]),o(\"el-radio\",{attrs:{label:4}},[e._v(\"没有折扣\")])],1),5===e.form.vipDiscount?o(\"div\",[o(\"el-input-number\",{staticStyle:{width:\"300px\"},attrs:{disabled:e.vipCardId,controls:!1,max:9.9,min:.1,placeholder:\"请填写会员折扣\"},model:{value:e.form.discount,callback:function(t){e.$set(e.form,\"discount\",t)},expression:\"form.discount\"}}),e._v(\" 折 \"),o(\"div\",[o(\"p\",{staticClass:\"el-icon-warning\",staticStyle:{\"font-size\":\"12px\",color:\"#e6a23c\"}},[e._v(\" 提示:请填写整数或小数点后一位的数字,例如:9.9 \")])])],1):e._e()],1),o(\"el-form-item\",{attrs:{label:\"开卡赠送\",prop:\"hasNewCardCoupon\"}},[o(\"el-radio-group\",{attrs:{disabled:e.vipCardId},model:{value:e.form.hasNewCardCoupon,callback:function(t){e.$set(e.form,\"hasNewCardCoupon\",t)},expression:\"form.hasNewCardCoupon\"}},[o(\"el-radio\",{attrs:{label:4}},[e._v(\"不赠送\")]),o(\"el-radio\",{attrs:{label:5}},[e._v(\"赠送\")])],1)],1),5===e.form.hasNewCardCoupon?o(\"el-form-item\",{attrs:{prop:\"useShop\"}},[o(\"el-button\",{attrs:{disabled:e.vipCardId,type:\"primary\"},on:{click:function(t){e.coupon_show=!0}}},[e._v(\" 选择优惠券 \")]),o(\"div\",{staticStyle:{display:\"inline-block\"}},e._l(e.hasNewCardName,(function(t,a){return o(\"el-tag\",{key:a,attrs:{closable:!e.vipCardId},on:{close:function(o){return e.closeTag(\"NewCard\",t)}}},[e._v(\" \"+e._s(t)+\" \")])})),1)],1):e._e(),o(\"el-form-item\",{attrs:{label:\"每月领取\",prop:\"hasMonthCoupon\"}},[o(\"el-radio-group\",{attrs:{disabled:e.vipCardId},model:{value:e.form.hasMonthCoupon,callback:function(t){e.$set(e.form,\"hasMonthCoupon\",t)},expression:\"form.hasMonthCoupon\"}},[o(\"el-radio\",{attrs:{label:4}},[e._v(\"不赠送\")]),o(\"el-radio\",{attrs:{label:5}},[e._v(\"赠送\")])],1)],1),5===e.form.hasMonthCoupon?o(\"el-form-item\",{attrs:{prop:\"useShop\"}},[o(\"el-button\",{attrs:{disabled:e.vipCardId,type:\"primary\"},on:{click:function(t){e.coupon_month=!0}}},[e._v(\" 选择优惠券 \")]),o(\"div\",{staticStyle:{display:\"inline-block\"}},e._l(e.hasMonthCouponName,(function(t,a){return o(\"el-tag\",{key:a,attrs:{closable:!e.vipCardId},on:{close:function(o){return e.closeTag(\"month\",t)}}},[e._v(\" \"+e._s(t)+\" \")])})),1)],1):e._e()],1)],1),o(\"el-card\",{staticClass:\"box-card\",attrs:{shadow:\"never\"}},[o(\"div\",{attrs:{slot:\"header\"},slot:\"header\"},[o(\"span\",[e._v(\"领取设置\")])]),o(\"el-form\",{attrs:{rules:e.form_rule,\"label-width\":\"200px\",model:e.form}},[o(\"el-form-item\",{attrs:{label:\"有效期:\",prop:\"effectiveDate\"}},[o(\"el-radio-group\",{attrs:{disabled:e.vipCardId},model:{value:e.form.effectiveDate,callback:function(t){e.$set(e.form,\"effectiveDate\",t)},expression:\"form.effectiveDate\"}},e._l(e.userDate,(function(t){return o(\"el-radio\",{key:t.id,attrs:{label:t.id}},[e._v(\" \"+e._s(t.title)+\" \")])})),1),o(\"el-input-number\",{staticStyle:{width:\"80px\",\"margin-left\":\"10px\"},attrs:{disabled:e.vipCardId,controls:!1,placeholder:\"\"},model:{value:e.form.effectiveMonth,callback:function(t){e.$set(e.form,\"effectiveMonth\",t)},expression:\"form.effectiveMonth\"}}),o(\"i\",{staticStyle:{\"margin-left\":\"10px\"}},[e._v(\"个月\")])],1),o(\"el-form-item\",{attrs:{label:\"价格\",prop:\"price\"}},[o(\"el-input-number\",{staticStyle:{width:\"300px\"},attrs:{disabled:e.vipCardId,controls:!1,placeholder:\"请填写价格\"},model:{value:e.form.price,callback:function(t){e.$set(e.form,\"price\",t)},expression:\"form.price\"}}),o(\"div\",[o(\"p\",{staticClass:\"el-icon-warning\",staticStyle:{\"font-size\":\"12px\",color:\"#e6a23c\"}},[e._v(\" 提示:用户购买会员卡需要支付的金额,不填或填0用户将可以免费领取 \")])])],1),o(\"el-form-item\",{attrs:{label:\"库存\",prop:\"totalNum\"}},[o(\"el-input-number\",{staticStyle:{width:\"300px\"},attrs:{controls:!1,placeholder:\"请填写库存\"},model:{value:e.form.totalNum,callback:function(t){e.$set(e.form,\"totalNum\",t)},expression:\"form.totalNum\"}}),o(\"div\",[o(\"p\",{staticClass:\"el-icon-warning\",staticStyle:{\"font-size\":\"12px\",color:\"#e6a23c\"}},[e._v(\" 提示:会员卡剩余可以领取的数量 \")])])],1),o(\"el-form-item\",{attrs:{label:\"状态:\",prop:\"enableStatus\"}},[o(\"el-radio-group\",{model:{value:e.form.enableStatus,callback:function(t){e.$set(e.form,\"enableStatus\",t)},expression:\"form.enableStatus\"}},e._l(e.eableList,(function(t){return o(\"el-radio\",{key:t.id,attrs:{label:t.id}},[e._v(\" \"+e._s(t.title)+\" \")])})),1)],1),o(\"el-form-item\",{attrs:{label:\"使用须知:\",prop:\"remark\"}},[o(\"el-input\",{staticStyle:{width:\"400px\"},attrs:{type:\"textarea\",rows:7,placeholder:\"请输入内容\"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,\"remark\",t)},expression:\"form.remark\"}})],1)],1)],1),e.goods_show?o(\"SaleGoodsList\",{attrs:{\"is-show\":e.goods_show},on:{cancel:function(t){e.goods_show=!1},confirm:e.selGoods}}):e._e(),e.coupon_show?o(\"CouponModel\",{attrs:{\"is-show\":e.coupon_show,\"grant-type\":50,\"coupon-type\":20},on:{cancel:function(t){e.coupon_show=!1},confirm:e.selCoupon}}):e._e(),e.coupon_month?o(\"CouponModel\",{attrs:{\"is-show\":e.coupon_month,\"coupon-type\":20},on:{cancel:function(t){e.coupon_month=!1},confirm:e.selMonthCoupon}}):e._e()],1)},s=[],i=o(\"35eb\"),r=o(\"2bce\"),n=o(\"2934\"),l=o(\"c371\"),d={name:\"AddCard\",components:{SaleGoodsList:i[\"default\"],CouponModel:r[\"default\"]},data(){const e=(e,t,o)=>{5===this.form.vipDiscount&&\"\"===this.form.discount?o(new Error(\"请输入会员折扣\")):5===this.form.vipDiscount&&this.form.discount.toString().length>3?o(new Error(\"请输入正确的会员折扣\")):o()},t=(e,t,o)=>{this.form.price<0?o(new Error(\"请输入正确的价格\")):o()};return{vipCardId:\"\",loading:!1,goods_show:!1,coupon_show:!1,coupon_month:!1,goodsName:[],hasMonthCouponName:[],hasNewCardName:[],form:{shopId:\"\",name:\"\",styleId:1,sort:\"\",mode:5,goodsIds:\"\",doubleDiscount:5,freeShipping:5,memberSpecialPrice:5,vipDiscount:5,discount:\"\",hasNewCardCoupon:4,newCardCouponIds:\"\",hasMonthCoupon:4,monthCouponIds:\"\",enableStatus:5,effectiveDate:5,effectiveMonth:1,price:\"\",totalNum:1,remark:\"1、持卡可以享受会员打折的尊贵服务,商城消费下单时请主动选择此卡。\\n2、此卡一经办理非店方原因,不找零、不提现、不退换。\\n3、此卡为实名制会员卡,仅限本人使用不可转借他人。\\n4、此卡的最终解释权归本商城所有。\\n5、本卡有效期请以开卡日期为准,从开卡日期起计算。\"},chooseId:1,pageName:\"\",typeList:[{id:1,title:\"card-style-golden\"},{id:2,title:\"card-style-erythrine\"},{id:3,title:\"card-style-gray\"},{id:4,title:\"card-style-brown\"},{id:5,title:\"card-style-blue\"},{id:6,title:\"card-style-black\"}],form_rule:{remark:[{required:!0,message:\"请输入使用须知\",trigger:\"blur\"}],name:[{required:!0,message:\"请输入会员卡名称\",trigger:\"blur\"}],styleId:[{required:!0,message:\"请选择会员卡样式\",trigger:\"blur\"}],price:[{required:!0,validator:t,trigger:\"blur\"}],discount:[{required:!0,validator:e,trigger:\"blur\"}]},vipType:[{id:5,name:\"所有商品\"},{id:4,name:\"部分商品\"}],eableList:[{id:5,title:\"启用\"},{id:4,title:\"禁用\"}],userDate:[{id:5,title:\"永久有效\"},{id:4,title:\"\"}]}},async created(){this.pageName=this.$route.name,this.vipCardId=this.$route.params.id,this.vipCardId?(await this.getVipCardInfo(),this.getVipCardInfo()):(await this.getTempVipData(),this.getTempVipData())},methods:{selGoods(e){this.goodsName.length?this.goodsName=this.$_common.unique(this.goodsName.concat(e),[\"id\"]):this.goodsName=e,this.goodsName=e.map(e=>e.title),this.form.goodsIds=e.map(e=>e.id).join(\",\")},selCoupon(e){this.hasNewCardName.length?this.hasNewCardName=this.$_common.unique(this.hasNewCardName.concat(e),[\"id\"]):this.hasNewCardName=e,this.hasNewCardName=e.map(e=>e.name),this.form.newCardCouponIds=e.map(e=>e.id).join(\",\")},selMonthCoupon(e){this.hasMonthCouponName.length?this.hasMonthCouponName=this.$_common.unique(this.hasMonthCouponName.concat(e),[\"id\"]):this.hasMonthCouponName=e,this.hasMonthCouponName=e.map(e=>e.name),this.form.monthCouponIds=e.map(e=>e.id).join(\",\")},closeTag(e,t){\"delgood\"===e?(this.goodsName.splice(t,1),this.form.goodsIds=this.goodsName.map(e=>e.id)):\"NewCard\"===e?(this.hasNewCardName.splice(t,1),this.form.newCardCouponIds=val.map(e=>e.id).join(\",\")):\"month\"===e&&(this.hasMonthCouponName.splice(t,1),this.form.monthCouponIds=val.map(e=>e.id).join(\",\"))},async temData(){5===this.form.effectiveDate&&(this.form.effectiveMonth=0);const e={...this.form,newCardCouponNames:this.hasNewCardName,monthCouponNames:this.hasMonthCouponName,goodsName:this.goodsName};this.loading=!0;await Object(n[\"addPauseSave\"])({key:this.pageName,data:e});this.loading=!1,this.$message({type:\"success\",message:\"暂存成功\"}),this.$closeCurrentGoEdit(\"/Marketing/vip/membershipCard\")},async delPauseSave(e){Object(n[\"delPauseSave\"])({key:this.pageName});e&&(this.$message({type:\"success\",message:\"清除暂存成功\"}),this.$closeCurrentGoEdit(\"/Marketing/vip/AddCard\"))},async submitGoods(e){5===this.form.effectiveDate&&(this.form.effectiveMonth=0),this.$refs[\"form\"].validate(async e=>{if(e){const e={...this.form,newCardCouponNames:this.hasNewCardName,monthCouponNames:this.hasMonthCouponName,goodsName:this.goodsName};this.loading=!0;let t={};t=this.vipCardId?await Object(l[\"editVipCard\"])(this.vipCardId,e):await Object(l[\"addVipCard\"])(e);this.loading=!1,this.$message({type:\"success\",message:\"提交成功\"}),await this.delPauseSave(),this.delPauseSave(),this.$closeCurrentGoEdit(\"/Marketing/vip/membershipCard\")}})},async getVipCardInfo(){const{data:e}=await Object(l[\"getVipCardInfo\"])(this.vipCardId);this.form=e,e.goodsName&&(this.goodsName=e.goodsName.map(e=>e)),e.newCardCouponNames&&(this.hasNewCardName=e.newCardCouponNames.map(e=>e)),e.monthCouponNames&&(this.hasMonthCouponName=e.monthCouponNames.map(e=>e))},async getTempVipData(){const{data:e}=await Object(n[\"getPauseSave\"])({key:this.pageName});\"{}\"!==JSON.stringify(e)&&(this.form=e,this.goodsName=e.goodsName?e.goodsName:[],this.hasNewCardName=e.newCardCouponNames?e.newCardCouponNames:[],this.hasMonthCouponName=e.monthCouponNames?e.monthCouponNames:[])},chooseCard(e){this.form.styleId=e}}},c=d,p=(o(\"85d3\"),o(\"2877\")),m=Object(p[\"a\"])(c,a,s,!1,null,\"fbf3a82c\",null);t[\"default\"]=m.exports}}]);","extractedComments":[]}
|