chunk-932c9858.45078c9b.js 55 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-932c9858"],{"4e4f":function(t,e,s){},5621:function(t,e,s){"use strict";var n=s("6b08");s.n(n).a},"61f7":function(t,e,s){"use strict";function n(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,n)}return s}function r(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?n(s,!0).forEach((function(e){a(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):n(s).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}function a(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function i(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var s={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var n in s)if(new RegExp("(".concat(n,")")).test(e)){var r=s[n]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?r:o(r))}return e}function o(t){return("00"+t).substr(t.length)}s.d(e,"a",(function(){return i})),s.d(e,"c",(function(){return u})),s.d(e,"b",(function(){return d}));var l={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},c=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function u(t){return r({required:!0,message:t,type:"string"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function d(t){return m.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}c(u,"请输入%s"),c(d,"%s格式不正确");var m=Object.keys(l).reduce((function(t,e){return t[e]=function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i="range"===e?{min:t[0],max:t[1]}:a({},e,t);return r({message:s.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},i,{},n)},c(t[e],l[e]),t}),{})},"6b08":function(t,e,s){},b621:function(t,e,s){"use strict";s.r(e);var n=s("b0e7"),r=s("e449"),a=s("c4ad"),i={name:"",components:{},props:{listOne:{type:Array,default:[]}},data:function(){return{formValidate:{info:""},isShow:!1,loading:!1,selectEquips:[],columns1:[{type:"selection",width:60,align:"center"},{title:"信息",key:"info"},{title:"信息格式",key:"label"},{title:"提示信息",key:"tip"}],listOneNew:[]}},computed:{},watch:{listOne:{handler:function(t){this.listOneNew=t}}},created:function(){},mounted:function(){},methods:{handleSubmit:function(){var t=this;if(this.formValidate.info){var e=[];this.listOne.forEach((function(s){-1!=s.info.indexOf(t.formValidate.info)&&e.push(s)})),this.$set(this,"listOneNew",e)}else this.$set(this,"listOneNew",this.listOne)},selectionTap:function(t){this.selectEquips=t},ok:function(){this.$emit("getInfoList",this.selectEquips),this.reset()},cancel:function(){this.isShow=!1,this.reset()},reset:function(){this.formValidate.info="",this.$refs.table.selectAll(!1),this.listOneNew=this.listOne}}},o=(s("e951"),s("2877")),l=Object(o.a)(i,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"information"},[s("Modal",{staticClass:"paymentFooter",attrs:{title:"选择信息",footerHide:"",scrollable:"",width:"900"},on:{"on-cancel":t.cancel},model:{value:t.isShow,callback:function(e){t.isShow=e},expression:"isShow"}},[s("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":100}},[s("FormItem",{attrs:{label:"信息搜索:"}},[s("Input",{staticClass:"inputw",attrs:{placeholder:"请输入信息"},model:{value:t.formValidate.info,callback:function(e){t.$set(t.formValidate,"info",e)},expression:"formValidate.info"}}),s("Button",{attrs:{type:"primary"},on:{click:t.handleSubmit}},[t._v("\n 查询\n ")])],1)],1),s("Table",{ref:"table",staticClass:"mr-20",attrs:{"no-data-text":"暂无数据","no-filtered-data-text":"暂无筛选结果",columns:t.columns1,data:t.listOneNew,loading:t.loading},on:{"on-selection-change":t.selectionTap}}),s("div",{staticClass:"footer mt20"},[s("Button",{staticClass:"btn",on:{click:t.cancel}},[t._v("取消")]),s("Button",{staticClass:"btn",attrs:{type:"primary"},on:{click:t.ok}},[t._v("确认")])],1)],1)],1)}),[],!1,null,"6c4a1af8",null).exports,c=s("a069"),u=s("c24f");function d(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,n)}return s}function m(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?d(s,!0).forEach((function(e){p(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):d(s).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}function p(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}var f={name:"setupUser",components:{uploadPictures:n.a,couponList:r.a,goodsList:a.default,WangEditor:c.a,information:l},props:{},data:function(){return{tabVal:"basic",paySwitch:1,phoneSwitch:1,indexCoupon:0,val:"",formActive:{activeInput:0},basicsForm:{},selectArr:[],value:"",formItem:{info:"",format:"",tip:"",single:"",singlearr:[]},activityShow:!1,isChoice:"单选",modalPic:!1,loading:!1,addModel:!1,inputShow:!1,modals:!1,authorizedPicture:"",ids:[],avatar:{},member_card_status:1,svip_price_status:0,loginForm:{store_user_agreement:0,newcomer_status:"1",store_user_mobile:"",newcomer_limit_status:"",newcomer_limit_time:"",register_integral_status:"",register_give_integral:"",register_money_status:"",register_give_money:"",register_coupon_status:"",register_give_coupon:[],first_order_status:"",first_order_discount:"",first_order_discount_limit:"",register_price_status:"",product:[],newcomer_agreement:"",register_notice:""},newcomer_agreement:"",product_list:[],vipForm:{member_func_status:0,sign_give_exp:"",order_give_exp:"",invite_user_exp:"",level_activate_status:1,level_extend_info:[],level_integral_status:1,level_give_integral:8,level_money_status:1,level_give_money:15,level_coupon_status:1,level_give_coupon:[]},isShow:!1,formatList:[{value:"text",label:"文本"},{value:"num",label:"数字"},{value:"date",label:"日期"},{value:"radio",label:"单选项"},{value:"id",label:"身份证"},{value:"mail",label:"邮件"},{value:"phone",label:"手机号"},{value:"address",label:"地址"}],gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},columns:[{title:"",slot:"drag",width:50},{title:"信息",key:"info",width:120},{title:"使用",slot:"use",width:70},{title:"必填",slot:"required",width:70},{title:"用户端展示",slot:"user_show",minWidth:70},{title:"信息格式",key:"label",minWidth:120},{title:"提示信息",key:"tip",minWidth:120},{title:"操作",slot:"action",minWidth:80}],columns3:[{title:"信息",key:"info",width:120},{title:"必填",slot:"required",width:70},{title:"信息格式",key:"label",minWidth:120},{title:"提示信息",key:"tip",minWidth:120},{title:"操作",slot:"action",minWidth:80}],listOne:[],listVip:[],promotionsData:[{threshold:0,give_integral:0,checkIntegral:!1,checkCoupon:!1,checkGoods:!1,giveProducts:[],giveCoupon:[]}],tableData:[],columns1:[{title:"优惠券名称",key:"title",minWidth:150},{title:"类型",slot:"coupon_type",minWidth:80},{title:"面值",slot:"coupon_price",minWidth:100},{title:"最低消费额",key:"use_min_price",minWidth:100},{title:"操作",slot:"status",align:"center",minWidth:80}],ruleValidate:{info:[{required:!0,message:"信息名称不能为空",trigger:"blur"}],format:[{required:!0,message:"信息格式不能为空",trigger:"blur"}],tip:[{required:!0,message:"信息文案不能为空",trigger:"blur"}],singlearr:[{required:!0,validator:function(t,e,s){e.length<2?s(new Error("单选项最少输入2个")):s()},type:"array",trigger:"blur"}]},ruleActive:{activeInput:[{required:!0,validator:function(t,e,s){""===e||null==e||e<0?s(new Error("活动价不能为空")):s()},trigger:"blur"}]},couponType:0,vipCopon:[]}},computed:{},created:function(){"register"==this.$route.query.type?this.tabVal="register":"level"==this.$route.query.type?this.tabVal="level":this.tabVal="basic",this.settingUser()},mounted:function(){},methods:{tapCheckbox:function(t){},informationTap:function(){this.$refs.information.isShow=!0},onDragDrop:function(t,e){t=parseInt(t),e=parseInt(e);var s=this.listOne[t];if(t<e){for(var n=t+1;n<=e;n++)this.listOne.splice(n-1,1,this.listOne[n]);this.listOne.splice(e,1,s)}if(t>e){for(n=t;n>e;n--)this.listOne.splice(n,1,this.listOne[n-1]);this.listOne.splice(e,1,s)}var r=1;this.listOne.forEach((function(t){t.sort=r,r++}))},settingUser:function(){var t=this;Object(u.M)(this.tabVal).then((function(e){"basic"===t.tabVal&&(t.authorizedPicture=e.data.h5_avatar,t.listOne=e.data.user_extend_info),"register"===t.tabVal&&(t.loginForm=e.data,t.promotionsData[0].giveCoupon=e.data.register_give_coupon,t.tableData=function t(e){return e.map((function(e){return m({},e,{ativity_price:e.price,id:e.product_id,attrValue:e.attrValue?t(e.attrValue):[]})}))}(e.data.product)),"level"===t.tabVal&&(t.vipForm=e.data,t.vipCopon=e.data.level_give_coupon,e.data.level_extend_info.forEach((function(t){1==t.required||1==t.required?t.required=!0:t.required=!1})),t.listVip=e.data.level_extend_info),"svip"===t.tabVal&&(t.member_card_status=e.data.member_card_status,t.svip_price_status=e.data.svip_price_status)}))},selectAll:function(t){this.selectArr=t.records},activityShowFn:function(){0===this.selectArr.length?this.$Message.error("请先选择设置活动价的商品!"):this.activityShow=!0},cancel:function(t){this.activityShow=!1,this.$refs[t].resetFields()},ok:function(t){var e=this;this.$refs[t].validate((function(s){s&&(e.selectArr.forEach((function(t){t.ativity_price=e.formActive.activeInput})),e.activityShow=!1,e.$refs[t].resetFields())}))},delAll:function(){var t=this;0===this.selectArr.length?this.$Message.error("请先选择删除的商品!"):this.$Modal.confirm({title:"删除确认",content:"您确认要删除这些商品?",onOk:function(){t.selectArr.forEach((function(e){t.tableData.forEach((function(s,n){e.id==s.id?t.tableData.splice(n,1):s.attrValue.forEach((function(r,a){e.id==r.id&&(1==s.attrValue.length?t.tableData.splice(n,1):s.attrValue.splice(a,1))}))}))}))}})},tabChange:function(){this.settingUser()},getPic:function(t){this.authorizedPicture=t.att_dir,this.modalPic=!1},modalPicTap:function(){this.modalPic=!0},cancelSubmit:function(){this.formItem={info:"",format:"",tip:"",single:"",singlearr:[]},this.addModel=!1,this.$refs.formValidate.resetFields()},addSubmit:function(){var t=this;this.$refs.formValidate.validate((function(e){var s=m({},t.formItem,{required:0,use:0,user_show:0,label:""});switch(s.format){case"text":s.label="文本";break;case"num":s.label="数字";break;case"date":s.label="日期";break;case"radio":s.label="单选项";break;case"id":s.label="身份证";break;case"mail":s.label="邮件";break;case"phone":s.label="手机号";break;case"address":s.label="地址"}var n=[];t.listOne.forEach((function(t){n.push(t.info)})),e&&(-1==n.indexOf(s.info)?(t.listOne.push(s),t.cancelSubmit()):t.$Message.error("该信息已经添加过"))}))},delInfo:function(t){this.listOne.splice(t,1)},delVip:function(t,e){this.listVip.splice(e,1)},addlabel:function(){this.formItem.single&&(-1===this.formItem.singlearr.indexOf(this.formItem.single)&&this.formItem.singlearr.push(this.formItem.single),this.formItem.single="")},handleSubmit:function(t){var e=this;switch(t){case"basic":var s={h5_avatar:this.authorizedPicture,user_extend_info:this.listOne};Object(u.L)(t,s).then((function(t){e.$Message.success(t.msg)}));break;case"register":this.product_list=[],this.tableData.forEach((function(t){var s={product_id:t.id,price:t.ativity_price,attr:[]};t.attrValue.length&&t.attrValue.forEach((function(t){var e={unique:t.unique,price:t.ativity_price};s.attr.push(e)})),e.product_list.push(s)}));var n=this.promotionsData[0].giveCoupon.map((function(t){return t.id}));this.loginForm.register_give_coupon=Array.from(new Set(n)),this.loginForm.product=this.product_list,this.loginForm.newcomer_agreement=this.newcomer_agreement,Object(u.L)(t,this.loginForm).then((function(t){e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t.msg)}));break;case"level":var r=this.vipCopon.map((function(t){return t.id}));this.vipForm.level_give_coupon=Array.from(new Set(r)),this.vipForm.level_extend_info=this.listVip,Object(u.L)(t,this.vipForm).then((function(t){e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t.msg)}));break;case"svip":var a={member_card_status:this.member_card_status,svip_price_status:this.svip_price_status};Object(u.L)(t,a).then((function(t){e.$Message.success(t.msg)}))}},addCoupon:function(t){this.indexCoupon=t,this.$refs.couponTemplates.isTemplate=!0,this.$refs.couponTemplates.tableList()},handleClose:function(t,e){var s=this.formItem.singlearr.indexOf(e);this.formItem.singlearr.splice(s,1)},getCouponList:function(t){var e=this.indexCoupon;this.$refs.couponTemplates.isTemplate=!1,t.forEach((function(t){t.limit_num=0,t.indexCoupon=e}));var s=this.promotionsData[e].giveCoupon.concat(t),n=this.unique(s);"register"===this.tabVal?this.promotionsData[e].giveCoupon=n:this.vipCopon=n},delCoupon:function(t,e){"level"===this.tabVal&&this.vipCopon.splice(t,1),this.promotionsData[e].giveCoupon.splice(t,1)},addGoods:function(t){this.modals=!0},inputChange:function(t){t.attrValue.length>0&&t.attrValue.forEach((function(e){e.ativity_price=t.ativity_price}))},del:function(t){var e=this;this.tableData.forEach((function(s,n){if(t.id==s.id)return e.tableData.splice(n,1);s.attrValue.forEach((function(r,a){if(t.id==r.id)return 1==s.attrValue.length?e.tableData.splice(n,1):s.attrValue.splice(a,1)}))}))},unique:function(t){var e=new Map;return t.filter((function(t){return!e.has(t.id)&&e.set(t.id,1)}))},getProductId:function(t){this.modals=!1;var e=this.tableData.concat(t),s=this.unique(e);s.forEach((function(t){t.attrValue.forEach((function(e){e.cate_name=t.cate_name,e.store_label=t.store_label}))})),this.tableData=function t(e){return e.map((function(e){return m({},e,{ativity_price:"",attrValue:e.attrValue?t(e.attrValue):[]})}))}(s)},getInfoList:function(t){var e=this.listVip.concat(t),s=this.uniqueVip(e);s.forEach((function(t){1==t.required||1==t.required?t.required=!0:t.required=!1})),this.listVip=s,this.$refs.information.isShow=!1},uniqueVip:function(t){var e=new Map;return t.filter((function(t){return!e.has(t.info)&&e.set(t.info,1)}))},getEditorContent:function(t){this.newcomer_agreement=t}}},_=(s("5621"),Object(o.a)(f,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[s("Tabs",{on:{"on-click":t.tabChange},model:{value:t.tabVal,callback:function(e){t.tabVal=e},expression:"tabVal"}},[s("TabPane",{attrs:{label:"基础信息",name:"basic"}},[s("Form",{attrs:{model:t.basicsForm,"label-width":120}},[s("Row",{attrs:{gutter:24,type:"flex"}},[s("Col",{attrs:{span:"24"}},[s("div",{staticClass:"basics"},[t._v("用户设置")])]),s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"用户默认头像:"}},[t.authorizedPicture?s("div",{staticClass:"uploadPictrue",on:{click:function(e){return t.modalPicTap("单选")}}},[s("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.authorizedPicture,expression:"authorizedPicture"}]})]):s("div",{staticClass:"uploadPictrue",on:{click:function(e){return t.modalPicTap("单选")}}},[s("span",{staticClass:"iconfont iconshangpinshuliang-jia"})]),s("div",{staticClass:"upload-text"},[t._v("建议尺寸:120*120px")])])],1),s("Col",{staticClass:"mt10",attrs:{span:"14"}},[s("FormItem",{attrs:{label:"用户信息设置:"}},[s("Table",{ref:"table",staticClass:"mt25 goods",attrs:{data:t.listOne,columns:t.columns,"highlight-row":"",draggable:!0},on:{"on-drag-drop":t.onDragDrop},scopedSlots:t._u([{key:"drag",fn:function(t){return t.row,t.index,[s("div",{staticClass:"iconfont icondrag"})]}},{key:"use",fn:function(e){e.row;var n=e.index;return[s("Checkbox",{attrs:{"true-value":1,"false-value":0},model:{value:t.listOne[n].use,callback:function(e){t.$set(t.listOne[n],"use",e)},expression:"listOne[index].use"}})]}},{key:"required",fn:function(e){e.row;var n=e.index;return[s("Checkbox",{attrs:{disabled:0==t.listOne[n].use,"true-value":1,"false-value":0},model:{value:t.listOne[n].required,callback:function(e){t.$set(t.listOne[n],"required",e)},expression:"listOne[index].required"}})]}},{key:"user_show",fn:function(e){e.row;var n=e.index;return[s("Checkbox",{attrs:{disabled:0==t.listOne[n].use,"true-value":1,"false-value":0},model:{value:t.listOne[n].user_show,callback:function(e){t.$set(t.listOne[n],"user_show",e)},expression:"listOne[index].user_show"}})]}},{key:"action",fn:function(e){e.row;var n=e.index;return[t.listOne[n].param?t._e():s("a",{on:{click:function(e){return t.delInfo(n)}}},[t._v("删除")])]}}])}),s("div",{staticClass:"upload-text goods"},[t._v("\n 开启使用后,后台添加用户时可填写此信息;开启必填后,后台添加用户时此信息必须填写;开启用户端展示后,在商城用户个人信息中展示\n ")]),s("div",{staticClass:"addInfo",on:{click:function(e){t.addModel=!0}}},[t._v("新增信息")]),s("div",{staticClass:"subBtn mt20",on:{click:function(e){return t.handleSubmit("basic")}}},[t._v("\n 保存\n ")])],1)],1)],1)],1)],1),s("TabPane",{attrs:{label:"登录注册",name:"register"}},[s("Alert",{attrs:{type:"warning","show-icon":""}},[t._v(t._s(t.loginForm.register_notice))]),s("Form",{attrs:{model:t.loginForm,"label-width":120}},[s("Row",{attrs:{gutter:24,type:"flex"}},[s("Col",{attrs:{span:"24"}},[s("div",{staticClass:"basics"},[t._v("登录设置")])]),s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"强制手机号绑定:"}},[s("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.loginForm.store_user_mobile,callback:function(e){t.$set(t.loginForm,"store_user_mobile",e)},expression:"loginForm.store_user_mobile"}},[s("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),s("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),s("div",{staticClass:"upload-text"},[t._v("商城登录时强制手机号登陆/绑定")])],1)],1),s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"用户协议:"}},[s("RadioGroup",{model:{value:t.loginForm.store_user_agreement,callback:function(e){t.$set(t.loginForm,"store_user_agreement",e)},expression:"loginForm.store_user_agreement"}},[s("Radio",{attrs:{label:"0"}},[s("span",[t._v("自动同意")])]),s("Radio",{attrs:{label:"1"}},[s("span",[t._v("手动同意")])])],1),s("div",{staticClass:"upload-text"},[t._v("商城登录时用户协议选定")])],1)],1),s("Col",{attrs:{span:"24"}},[s("div",{staticClass:"basics"},[t._v("注册有礼")])]),s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"注册有礼启用:"}},[s("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.loginForm.newcomer_status,callback:function(e){t.$set(t.loginForm,"newcomer_status",e)},expression:"loginForm.newcomer_status"}},[s("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),s("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),s("div",{staticClass:"upload-text"},[t._v("新用户注册后,会给用户赠送礼品")])],1)],1),1===t.loginForm.newcomer_status?s("Col",{attrs:{span:"24"}},[1===t.loginForm.newcomer_status?s("FormItem",{attrs:{label:"是否限时:"}},[s("RadioGroup",{model:{value:t.loginForm.newcomer_limit_status,callback:function(e){t.$set(t.loginForm,"newcomer_limit_status",e)},expression:"loginForm.newcomer_limit_status"}},[s("Radio",{attrs:{label:"0"}},[s("span",[t._v("不限时")])]),s("Radio",{attrs:{label:"1"}},[s("span",[t._v("限时")])])],1),s("div",{staticClass:"upload-text"},[t._v("新人注册活动的时间设置")]),1==t.loginForm.newcomer_limit_status?s("div",{staticClass:"mt10"},[s("Input",{staticClass:"inputw",attrs:{placeholder:"请输入限时天数"},model:{value:t.loginForm.newcomer_limit_time,callback:function(e){t.$set(t.loginForm,"newcomer_limit_time",e)},expression:"loginForm.newcomer_limit_time"}}),1==t.loginForm.newcomer_limit_status?s("span",{staticClass:"span-text"},[t._v("\n 天\n ")]):t._e()],1):t._e()],1):t._e()],1):t._e(),s("Col",{staticClass:"mt10",attrs:{span:"24"}},[1===t.loginForm.newcomer_status?s("FormItem",{attrs:{label:"赠送积分:"}},[s("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.loginForm.register_integral_status,callback:function(e){t.$set(t.loginForm,"register_integral_status",e)},expression:"loginForm.register_integral_status"}},[s("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),s("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),s("div",{staticClass:"upload-text"},[t._v("用户注册后即赠送一定数额的积分")]),1===t.loginForm.register_integral_status?s("Input",{staticClass:"inputw mt10",attrs:{placeholder:"请输入赠送积分"},model:{value:t.loginForm.register_give_integral,callback:function(e){t.$set(t.loginForm,"register_give_integral",e)},expression:"loginForm.register_give_integral"}}):t._e(),1===t.loginForm.register_integral_status?s("span",{staticClass:"span-text"},[t._v("\n 积分\n ")]):t._e()],1):t._e()],1),1===t.loginForm.newcomer_status?s("Col",{staticClass:"mt10",attrs:{span:"24"}},[1===t.loginForm.newcomer_status?s("FormItem",{attrs:{label:"赠送余额:"}},[s("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.loginForm.register_money_status,callback:function(e){t.$set(t.loginForm,"register_money_status",e)},expression:"loginForm.register_money_status"}},[s("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),s("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),s("div",{staticClass:"upload-text"},[t._v("\n 用户注册后即赠送一定数额的储值余额\n ")]),1===t.loginForm.register_money_status?s("Input",{staticClass:"inputw mt10",attrs:{placeholder:"请输入赠送余额"},model:{value:t.loginForm.register_give_money,callback:function(e){t.$set(t.loginForm,"register_give_money",e)},expression:"loginForm.register_give_money"}}):t._e(),1===t.loginForm.register_money_status?s("span",{staticClass:"span-text"},[t._v("\n 元\n ")]):t._e()],1):t._e()],1):t._e(),1===t.loginForm.newcomer_status?s("Col",{staticClass:"mt10",attrs:{span:"24"}},t._l(t.promotionsData,(function(e,n){return s("div",{key:n,staticClass:"item"},[1===t.loginForm.newcomer_status?s("FormItem",{attrs:{label:"赠送优惠券:"}},[s("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.loginForm.register_coupon_status,callback:function(e){t.$set(t.loginForm,"register_coupon_status",e)},expression:"loginForm.register_coupon_status"}},[s("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),s("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),s("div",{staticClass:"upload-text"},[t._v("用户注册后即赠送优惠券")]),1===t.loginForm.register_coupon_status&&e.giveCoupon.length>0?s("Table",{ref:"table",refInFor:!0,staticClass:"table mt10",attrs:{border:"",columns:t.columns1,data:e.giveCoupon,width:"700"},scopedSlots:t._u([{key:"coupon_price",fn:function(e){var n=e.row;return[1==n.coupon_type?s("span",[t._v("\n "+t._s(n.coupon_price)+"元\n ")]):t._e(),2==n.coupon_type?s("span",[t._v("\n "+t._s(parseFloat(n.coupon_price)/10)+"折("+t._s(n.coupon_price.toString().split(".")[0])+"%)\n ")]):t._e()]}},{key:"coupon_type",fn:function(e){return[1===e.row.coupon_type?s("span",[t._v("满减券")]):s("span",[t._v("折扣券")])]}},{key:"status",fn:function(e){e.row;var r=e.index;return[s("a",{on:{click:function(e){return t.delCoupon(r,n)}}},[t._v("删除")])]}}],null,!0)}):t._e(),1===t.loginForm.register_coupon_status?s("div",{staticClass:"add-coupon",on:{click:function(e){return t.addCoupon(n)}}},[t._v("\n + 添加优惠券\n ")]):t._e()],1):t._e()],1)})),0):t._e(),1===t.loginForm.newcomer_status?s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"首单优惠:"}},[s("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.loginForm.first_order_status,callback:function(e){t.$set(t.loginForm,"first_order_status",e)},expression:"loginForm.first_order_status"}},[s("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),s("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),s("div",{staticClass:"upload-text"},[t._v("\n 新用户下单时可享折扣,折扣仅对商品打折,运费无折扣\n ")])],1)],1):t._e(),1===t.loginForm.newcomer_status&&1===t.loginForm.first_order_status?s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"折扣力度:"}},[s("Input",{staticClass:"inputw",attrs:{placeholder:"请输入折扣力度"},model:{value:t.loginForm.first_order_discount,callback:function(e){t.$set(t.loginForm,"first_order_discount",e)},expression:"loginForm.first_order_discount"}}),s("span",{staticClass:"span-text"},[t._v("%")]),s("div",{staticClass:"upload-text"},[t._v("\n 折扣力度为:0-100%,1折为10%\n ")])],1)],1):t._e(),1===t.loginForm.newcomer_status&&1===t.loginForm.first_order_status?s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"折扣上限:"}},[s("Input",{staticClass:"inputw",attrs:{placeholder:"请输入折扣上限"},model:{value:t.loginForm.first_order_discount_limit,callback:function(e){t.$set(t.loginForm,"first_order_discount_limit",e)},expression:"loginForm.first_order_discount_limit"}}),s("span",{staticClass:"span-text"},[t._v("元")]),s("div",{staticClass:"upload-text"},[t._v("\n 首单优惠最高金额,单位:元\n ")])],1)],1):t._e(),1===t.loginForm.newcomer_status?s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"新人专享价:"}},[s("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.loginForm.register_price_status,callback:function(e){t.$set(t.loginForm,"register_price_status",e)},expression:"loginForm.register_price_status"}},[s("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),s("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),s("div",{staticClass:"upload-text"},[t._v("\n 新用户可购买一件新人商品,购买后移动端不再显示新人专区\n ")]),1===t.loginForm.register_price_status?s("vxe-table",{ref:"xTree",staticClass:"goods mt10",attrs:{border:"inner","column-config":{resizable:!0},"row-id":"id","tree-config":{children:"attrValue",reserve:!0},data:t.tableData,"header-cell-style":{background:"#F7F7F7",height:"40px"}},on:{"checkbox-all":t.selectAll,"checkbox-change":t.selectAll}},[s("vxe-column",{attrs:{type:"checkbox",title:"多选",width:"90","tree-node":""}}),s("vxe-column",{attrs:{field:"id",title:"ID","min-width":"80"}}),s("vxe-column",{attrs:{field:"info",title:"商品信息","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[s("div",{staticClass:"imgPic acea-row row-middle"},[s("viewer",[s("div",{staticClass:"pictrue"},[s("img",{directives:[{name:"lazy",rawName:"v-lazy",value:n.image,expression:"row.image"}]})])]),s("div",{staticClass:"info"},[s("Tooltip",{attrs:{"max-width":"200",placement:"bottom",transfer:""}},[s("span",{staticClass:"line2"},[t._v(t._s(n.store_name)+t._s(n.suk))]),s("p",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(n.store_name)+t._s(n.suk))])])],1)],1)]}}],null,!1,1988674042)}),s("vxe-column",{attrs:{field:"price",title:"售价","min-width":"80"}}),s("vxe-column",{attrs:{field:"stock",title:"库存","min-width":"80"}}),s("vxe-column",{attrs:{field:"date",title:"活动价","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[s("Input",{attrs:{border:!1,placeholder:"请输入活动价"},on:{"on-change":function(e){return t.inputChange(n)}},model:{value:n.ativity_price,callback:function(e){t.$set(n,"ativity_price",e)},expression:"row.ativity_price"}})]}}],null,!1,2807784357)}),s("vxe-column",{attrs:{field:"date",title:"操作","min-width":"50",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[s("a",{on:{click:function(e){return t.del(n)}}},[t._v("删除")])]}}],null,!1,1383043590)})],1):t._e(),1===t.loginForm.register_price_status?s("div",{staticClass:"add-goods"},[s("Button",{on:{click:t.addGoods}},[t._v("添加商品")]),s("Button",{staticClass:"goods-btn",on:{click:t.activityShowFn}},[t._v("\n 设置活动价\n ")]),s("Button",{on:{click:t.delAll}},[t._v("批量删除")])],1):t._e()],1)],1):t._e(),s("Col",{staticClass:"mt10",attrs:{span:"24"}},[1===t.loginForm.newcomer_status?s("FormItem",{attrs:{label:"规则详情:"}},[s("WangEditor",{staticClass:"goods",attrs:{content:t.loginForm.newcomer_agreement},on:{editorContent:t.getEditorContent}})],1):t._e()],1),s("Col",[s("FormItem",[s("div",{staticClass:"subBtn",staticStyle:{"margin-top":"0px"},on:{click:function(e){return t.handleSubmit("register")}}},[t._v("\n 保存\n ")])])],1)],1)],1)],1),s("TabPane",{attrs:{label:"会员等级",name:"level"}},[s("Form",{attrs:{model:t.vipForm,"label-width":120}},[s("Row",{attrs:{gutter:24,type:"flex"}},[s("Col",{attrs:{span:"24"}},[s("div",{staticClass:"basics"},[t._v("基础设置")])]),s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"会员等级启用:"}},[s("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.vipForm.member_func_status,callback:function(e){t.$set(t.vipForm,"member_func_status",e)},expression:"vipForm.member_func_status"}},[s("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),s("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),s("div",{staticClass:"upload-text"},[t._v("\n 开启会员等级后,可以获得经验值\n ")])],1)],1),1===t.vipForm.member_func_status?s("Col",{attrs:{span:"24"}},[s("FormItem",{attrs:{label:"下单获得经验:"}},[s("Input",{staticClass:"inputw",attrs:{placeholder:"请输入获得经验值"},model:{value:t.vipForm.order_give_exp,callback:function(e){t.$set(t.vipForm,"order_give_exp",e)},expression:"vipForm.order_give_exp"}}),s("div",{staticClass:"upload-text"},[t._v("\n 用户实际支付1元,可以获得多少经验值\n ")])],1)],1):t._e(),1===t.vipForm.member_func_status?s("Col",{attrs:{span:"24"}},[s("FormItem",{attrs:{label:"签到获得经验:"}},[s("Input",{staticClass:"inputw",attrs:{placeholder:"请输入签到获得经验值"},model:{value:t.vipForm.sign_give_exp,callback:function(e){t.$set(t.vipForm,"sign_give_exp",e)},expression:"vipForm.sign_give_exp"}}),s("div",{staticClass:"upload-text"},[t._v("用户签到一次,赠送多少经验值")])],1)],1):t._e(),1===t.vipForm.member_func_status?s("Col",{attrs:{span:"24"}},[s("FormItem",{attrs:{label:"邀请新用户获得经验:"}},[s("Input",{staticClass:"inputw",attrs:{placeholder:"请输入获取新用户获得经验值"},model:{value:t.vipForm.invite_user_exp,callback:function(e){t.$set(t.vipForm,"invite_user_exp",e)},expression:"vipForm.invite_user_exp"}}),s("div",{staticClass:"upload-text"},[t._v("\n 邀请一个新用户注册,赠送多少经验值\n ")])],1)],1):t._e(),s("Col",{attrs:{span:"24"}},[s("div",{staticClass:"basics"},[t._v("激活有礼")])]),s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"会员卡激活:"}},[s("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.vipForm.level_activate_status,callback:function(e){t.$set(t.vipForm,"level_activate_status",e)},expression:"vipForm.level_activate_status"}},[s("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),s("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),s("div",{staticClass:"upload-text"},[t._v("\n 开启后用户等级功能不能直接使用,需要用户填写信息,激活后才能使用用户等级\n ")])],1)],1),1===t.vipForm.level_activate_status?s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"会员卡信息:"}},[t.listVip.length>0?s("Table",{ref:"table",staticClass:"mt10 mb10 goods",attrs:{columns:t.columns3,data:t.listVip,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"required",fn:function(e){e.row;var n=e.index;return[s("Checkbox",{on:{"on-change":t.tapCheckbox},model:{value:t.listVip[n].required,callback:function(e){t.$set(t.listVip[n],"required",e)},expression:"listVip[index].required"}})]}},{key:"action",fn:function(e){var n=e.row,r=e.index;return[s("a",{on:{click:function(e){return t.delVip(n,r)}}},[t._v("删除")])]}}],null,!1,1344792718)}):t._e(),s("Button",{on:{click:t.informationTap}},[t._v("\n 选择信息\n ")])],1)],1):t._e(),1===t.vipForm.level_activate_status?s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"赠送积分:"}},[s("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.vipForm.level_integral_status,callback:function(e){t.$set(t.vipForm,"level_integral_status",e)},expression:"vipForm.level_integral_status"}},[s("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),s("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),s("div",{staticClass:"upload-text"},[t._v("\n 用户激活会员卡后即赠送一定数额的积分\n ")]),1===t.vipForm.level_integral_status?s("Input",{staticClass:"inputw mt10",attrs:{placeholder:"请输入赠送的积分"},model:{value:t.vipForm.level_give_integral,callback:function(e){t.$set(t.vipForm,"level_give_integral",e)},expression:"vipForm.level_give_integral"}}):t._e(),1===t.vipForm.level_integral_status?s("span",{staticClass:"span-text"},[t._v("\n 积分\n ")]):t._e()],1)],1):t._e(),1===t.vipForm.level_activate_status?s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"赠送余额:"}},[s("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.vipForm.level_money_status,callback:function(e){t.$set(t.vipForm,"level_money_status",e)},expression:"vipForm.level_money_status"}},[s("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),s("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),s("div",{staticClass:"upload-text"},[t._v("\n 用户激活会员卡后即赠送一定数额的储值余额\n ")]),1===t.vipForm.level_money_status?s("Input",{staticClass:"inputw mt10",attrs:{placeholder:"请输入赠送的余额"},model:{value:t.vipForm.level_give_money,callback:function(e){t.$set(t.vipForm,"level_give_money",e)},expression:"vipForm.level_give_money"}}):t._e(),1===t.vipForm.level_money_status?s("span",{staticClass:"span-text"},[t._v("\n 元\n ")]):t._e()],1)],1):t._e(),1===t.vipForm.level_activate_status?s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"赠送优惠券:"}},[s("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.vipForm.level_coupon_status,callback:function(e){t.$set(t.vipForm,"level_coupon_status",e)},expression:"vipForm.level_coupon_status"}},[s("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),s("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),s("div",{staticClass:"upload-text"},[t._v("\n 用户激活会员卡后即赠送优惠券\n ")]),t._l(t.promotionsData,(function(e,n){return s("div",{key:n,staticClass:"item"},[1===t.vipForm.level_coupon_status?s("div",{staticClass:"add-coupon",on:{click:function(e){return t.addCoupon(n)}}},[t._v("\n + 添加优惠券\n ")]):t._e(),t.vipCopon.length>0&&1===t.vipForm.level_coupon_status?s("Table",{ref:"table",refInFor:!0,staticClass:"table",attrs:{border:"",columns:t.columns1,data:t.vipCopon,width:"700"},scopedSlots:t._u([{key:"coupon_price",fn:function(e){var n=e.row;return[1==n.coupon_type?s("span",[t._v("\n "+t._s(n.coupon_price)+"元\n ")]):t._e(),2==n.coupon_type?s("span",[t._v("\n "+t._s(parseFloat(n.coupon_price)/10)+"折("+t._s(n.coupon_price.toString().split(".")[0])+"%)\n ")]):t._e()]}},{key:"coupon_type",fn:function(e){return[1===e.row.coupon_type?s("span",[t._v("满减券")]):s("span",[t._v("折扣券")])]}},{key:"status",fn:function(e){e.row;var r=e.index;return[s("a",{on:{click:function(e){return t.delCoupon(r,n)}}},[t._v("删除")])]}}],null,!0)}):t._e()],1)}))],2)],1):t._e(),s("Col",[s("FormItem",[s("div",{staticClass:"subBtn mt10",on:{click:function(e){return t.handleSubmit("level")}}},[t._v("\n 保存\n ")])])],1)],1)],1)],1),s("TabPane",{attrs:{label:"付费会员",name:"svip"}},[s("Form",{attrs:{model:t.basicsForm,"label-width":120}},[s("Row",{attrs:{gutter:24,type:"flex"}},[s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",{attrs:{label:"付费会员启用:"}},[s("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.member_card_status,callback:function(e){t.member_card_status=e},expression:"member_card_status"}},[s("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),s("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1),1==t.member_card_status?s("FormItem",{attrs:{label:"付费会员价展示:"}},[s("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.svip_price_status,callback:function(e){t.svip_price_status=e},expression:"svip_price_status"}},[s("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),s("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1):t._e()],1),s("Col",{staticClass:"mt10",attrs:{span:"24"}},[s("FormItem",[s("div",{staticClass:"subBtn",staticStyle:{"margin-top":"0px"},on:{click:function(e){return t.handleSubmit("svip")}}},[t._v("\n 保存\n ")])])],1)],1)],1)],1)],1)],1),s("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传用户图片","mask-closable":!1,"z-index":1},model:{value:t.modalPic,callback:function(e){t.modalPic=e},expression:"modalPic"}},[t.modalPic?s("uploadPictures",{attrs:{isChoice:t.isChoice,gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic}}):t._e()],1),s("Modal",{attrs:{title:"新增信息","class-name":"vertical-center-modal",scrollable:""},on:{"on-cancel":t.cancelSubmit},model:{value:t.addModel,callback:function(e){t.addModel=e},expression:"addModel"}},[s("Form",{ref:"formValidate",attrs:{model:t.formItem,rules:t.ruleValidate,"label-width":90}},[s("Row",[s("Col",[s("FormItem",{attrs:{label:"信息名称:",prop:"info"}},[s("Input",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入信息名称"},model:{value:t.formItem.info,callback:function(e){t.$set(t.formItem,"info",e)},expression:"formItem.info"}})],1)],1),s("Col",[s("FormItem",{attrs:{label:"信息格式 :",prop:"format"}},[s("Select",{staticStyle:{width:"300px"},model:{value:t.formItem.format,callback:function(e){t.$set(t.formItem,"format",e)},expression:"formItem.format"}},t._l(t.formatList,(function(e){return s("Option",{key:e.value,attrs:{value:e.value}},[t._v("\n "+t._s(e.label)+"\n ")])})),1)],1)],1),s("Col",["radio"===t.formItem.format?s("FormItem",{attrs:{label:"单选项 :",prop:"singlearr"}},[s("div",{staticClass:"arrbox"},[t._l(t.formItem.singlearr,(function(e,n){return s("Tag",{key:n,attrs:{name:e,closable:!0},on:{"on-close":t.handleClose}},[t._v("\n "+t._s(e)+"\n ")])})),s("input",{directives:[{name:"model",rawName:"v-model",value:t.formItem.single,expression:"formItem.single"}],staticClass:"arrbox_ip percentage9",attrs:{placeholder:"请输入选项,回车确认"},domProps:{value:t.formItem.single},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addlabel(e)},input:function(e){e.target.composing||t.$set(t.formItem,"single",e.target.value)}}})],2)]):t._e()],1),s("Col",[s("FormItem",{attrs:{label:"提示文案:",prop:"tip"}},[s("Input",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入提示文案"},model:{value:t.formItem.tip,callback:function(e){t.$set(t.formItem,"tip",e)},expression:"formItem.tip"}})],1)],1)],1)],1),s("div",{staticClass:"acea-row row-right",attrs:{slot:"footer"},slot:"footer"},[s("Button",{on:{click:t.cancelSubmit}},[t._v("取消")]),s("Button",{attrs:{type:"primary"},on:{click:t.addSubmit}},[t._v("提交")])],1)],1),s("coupon-list",{ref:"couponTemplates",attrs:{discount:!0},on:{getCouponList:t.getCouponList}}),s("Modal",{staticClass:"paymentFooter",attrs:{title:"商品列表",footerHide:"",scrollable:"",width:"900"},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[t.modals?s("goods-list",{ref:"goodslist",attrs:{ischeckbox:!0,isdiy:!0},on:{getProductId:t.getProductId}}):t._e()],1),s("information",{ref:"information",attrs:{listOne:t.listOne},on:{getInfoList:t.getInfoList}}),s("Modal",{staticClass:"paymentFooter",attrs:{title:"设置",width:"600",closable:!1,"mask-closable":!1,"footer-hide":""},model:{value:t.activityShow,callback:function(e){t.activityShow=e},expression:"activityShow"}},[s("Form",{ref:"activityShow",attrs:{model:t.formActive,rules:t.ruleActive,"label-width":100}},[s("FormItem",{attrs:{label:"设置活动价:",prop:"activeInput"}},[s("InputNumber",{staticClass:"inputw",attrs:{placeholder:"请输入活动价格",min:0},model:{value:t.formActive.activeInput,callback:function(e){t.$set(t.formActive,"activeInput",e)},expression:"formActive.activeInput"}})],1),s("div",{staticClass:"acea-row row-right"},[s("Button",{on:{click:function(e){return t.cancel("activityShow")}}},[t._v("取消")]),s("Button",{staticClass:"ml15 mr5",attrs:{type:"primary"},on:{click:function(e){return t.ok("activityShow")}}},[t._v("提交")])],1)],1)],1)],1)}),[],!1,null,"85284970",null));e.default=_.exports},c24f:function(t,e,s){"use strict";s.d(e,"W",(function(){return r})),s.d(e,"M",(function(){return a})),s.d(e,"L",(function(){return i})),s.d(e,"k",(function(){return o})),s.d(e,"r",(function(){return l})),s.d(e,"d",(function(){return c})),s.d(e,"h",(function(){return u})),s.d(e,"g",(function(){return d})),s.d(e,"q",(function(){return m})),s.d(e,"s",(function(){return p})),s.d(e,"I",(function(){return f})),s.d(e,"O",(function(){return _})),s.d(e,"K",(function(){return v})),s.d(e,"J",(function(){return h})),s.d(e,"f",(function(){return g})),s.d(e,"e",(function(){return b})),s.d(e,"n",(function(){return w})),s.d(e,"Q",(function(){return C})),s.d(e,"p",(function(){return y})),s.d(e,"P",(function(){return x})),s.d(e,"bb",(function(){return F})),s.d(e,"T",(function(){return k})),s.d(e,"R",(function(){return O})),s.d(e,"S",(function(){return I})),s.d(e,"V",(function(){return j})),s.d(e,"U",(function(){return $})),s.d(e,"X",(function(){return S})),s.d(e,"v",(function(){return V})),s.d(e,"w",(function(){return P})),s.d(e,"Y",(function(){return T})),s.d(e,"i",(function(){return D})),s.d(e,"ab",(function(){return E})),s.d(e,"C",(function(){return q})),s.d(e,"cb",(function(){return A})),s.d(e,"m",(function(){return M})),s.d(e,"Z",(function(){return z})),s.d(e,"F",(function(){return N})),s.d(e,"B",(function(){return R})),s.d(e,"A",(function(){return L})),s.d(e,"z",(function(){return W})),s.d(e,"D",(function(){return B})),s.d(e,"y",(function(){return U})),s.d(e,"x",(function(){return G})),s.d(e,"u",(function(){return H})),s.d(e,"t",(function(){return J})),s.d(e,"o",(function(){return Y})),s.d(e,"l",(function(){return K})),s.d(e,"G",(function(){return Q})),s.d(e,"H",(function(){return X})),s.d(e,"db",(function(){return Z})),s.d(e,"N",(function(){return tt})),s.d(e,"E",(function(){return et})),s.d(e,"b",(function(){return st})),s.d(e,"a",(function(){return nt})),s.d(e,"eb",(function(){return rt})),s.d(e,"j",(function(){return at})),s.d(e,"c",(function(){return it}));var n=s("b6bd");function r(t){return Object(n.a)({url:"user/user",method:"get",params:t})}function a(t){return Object(n.a)({url:"setting/config/user/".concat(t),method:"get"})}function i(t,e){return Object(n.a)({url:"setting/config/user/".concat(t),method:"post",data:e})}function o(t){return Object(n.a)({url:"user/user/".concat(t,"/edit"),method:"get"})}function l(t){return Object(n.a)({url:"user/set_status/".concat(t.status,"/").concat(t.id),method:"put"})}function c(t){return Object(n.a)({url:"marketing/coupon/grant",method:"get",params:t})}function u(t){return Object(n.a)({url:"user/edit_other/".concat(t),method:"get"})}function d(t){return Object(n.a)({url:"user/user/".concat(t),method:"get"})}function m(t){return Object(n.a)({url:"user/one_info/".concat(t.id),method:"get",params:t.datas})}function p(t){return Object(n.a)({url:"user/user_level/vip_list",method:"get",params:t})}function f(t){return Object(n.a)({url:"user/user_level/set_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function _(t,e){return Object(n.a)({url:"user/user_level/task/".concat(t),method:"get",params:e})}function v(t){return Object(n.a)({url:"user/user_level/set_task_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function h(t){return Object(n.a)({url:"user/user_level/set_task_must/".concat(t.id,"/").concat(t.is_must),method:"PUT"})}function g(t){return Object(n.a)({url:"/user/user_level/create_task",method:"get",params:t})}function b(t){return Object(n.a)({url:"user/user_level/create",method:"get",params:t})}function w(t){return Object(n.a)({url:"user/give_level/".concat(t),method:"get"})}function C(t){return Object(n.a)({url:"user/user_group/list",method:"get",params:t})}function y(t){return Object(n.a)({url:"user/user_group/add/".concat(t),method:"get"})}function x(t){return Object(n.a)({url:"setting/update_admin",method:"PUT",data:t})}function F(t){return Object(n.a)({url:"user/set_group",method:"post",data:t})}function k(t){return Object(n.a)({url:"user/user_label",method:"get",params:t})}function O(t,e){return Object(n.a)({url:"user/user_label/add/".concat(t),method:"get",params:e})}function I(t){return Object(n.a)({url:"user/user_label_cate/all",method:"get",params:t})}function j(t){return Object(n.a)({url:"user/user_label_cate/".concat(t,"/edit"),method:"get"})}function $(t){return Object(n.a)({url:"user/user_label_cate/create",method:"get"})}function S(t){return Object(n.a)({url:"/user/member_batch/index",method:"get",params:t})}function V(t,e){return Object(n.a)({url:"/user/member_batch/save/".concat(t),method:"post",data:e})}function P(t,e){return Object(n.a)({url:"/user/member_batch/set_value/".concat(t),method:"get",params:e})}function T(t,e){return Object(n.a)({url:"/user/member_card/index/".concat(t),method:"get",params:e})}function D(t,e){return Object(n.a)({url:"/export/memberCard/".concat(t),method:"get",params:e})}function E(){return Object(n.a)({url:"/user/member/ship",method:"get"})}function q(t,e){return Object(n.a)({url:"/user/member_ship/save/".concat(t),method:"post",data:e})}function A(){return Object(n.a)({url:"/user/user/syncUsers",method:"get"})}function M(){return Object(n.a)({url:"/user/user/create",method:"get"})}function z(){return Object(n.a)({url:"/user/member_scan",method:"get"})}function N(t,e){return Object(n.a)({url:"user/label/".concat(t),method:"post",data:e})}function R(t){return Object(n.a)({url:"user/member_right/save/".concat(t.id),method:"post",data:t})}function L(){return Object(n.a)({url:"user/member/right",method:"get"})}function W(t){return Object(n.a)({url:"/user/member/record",method:"get",params:t})}function B(){return Object(n.a)({url:"user/member/ship_select",method:"get"})}function U(t){return Object(n.a)({url:"user/member_card/set_status",method:"get",params:t})}function G(t){return Object(n.a)({url:"user/member_ship/set_ship_status",method:"get",params:t})}function H(t,e){return Object(n.a)({url:"user/member_agreement/save/".concat(t),method:"post",data:e})}function J(){return Object(n.a)({url:"user/member/agreement",method:"get"})}function Y(t){return Object(n.a)({url:"user/give_level_time/".concat(t),method:"get"})}function K(t){return Object(n.a)({url:"user/label/".concat(t),method:"get"})}function Q(t){return Object(n.a)({url:"user/save_set_label",method:"put",data:t})}function X(t){return Object(n.a)({url:"setting/info",method:"get"})}function Z(t){return Object(n.a)({url:"user/visit_list/".concat(t.id),method:"get",params:t.datas})}function tt(t){return Object(n.a)({url:"user/spread_list/".concat(t.id),method:"get",params:t.datas})}function et(t){return Object(n.a)({url:"user/user/".concat(t.uid),method:"put",data:t})}function st(t,e){return Object(n.a)({url:"agent/set_agent_agreement/".concat(t),method:"post",data:e})}function nt(){return Object(n.a)({url:"agent/get_agent_agreement",method:"get"})}function rt(){return Object(n.a)({url:"user/synchro/work/label",method:"get"})}function at(t){return Object(n.a)({url:"user/user/extend_info/".concat(t),method:"get"})}function it(t){return Object(n.a)({url:"user/batch_process",method:"post",data:t})}},e449:function(t,e,s){"use strict";var n=s("b7be"),r=s("61f7");function a(t){return function(t){if(Array.isArray(t)){for(var e=0,s=new Array(t.length);e<t.length;e++)s[e]=t[e];return s}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var i={name:"index",filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(r.a)(e,"yyyy-MM-dd hh:mm")}}},props:{couponids:{type:Array},updateIds:{type:Array},updateName:{type:Array},luckDraw:{type:Boolean,default:!1},discount:{type:Boolean,default:!1}},data:function(){return{currentid:0,productRow:{},isTemplate:!1,loading:!1,tableFrom:{receive_type:3,type:"send",page:1,limit:10},total:0,ids:[],texts:[],columns:[{title:"ID",key:"id",width:60},{title:"优惠券名称",key:"title",minWidth:150},{title:"适用类型",slot:"type",minWidth:80},{title:"面值",slot:"coupon_price",minWidth:100},{title:"最低消费额",key:"use_min_price",minWidth:100},{title:"发布数量",slot:"count",minWidth:120},{title:"有效期限",slot:"start_time",minWidth:120},{title:"状态",slot:"status",minWidth:80}],couponList:[],selectedIds:new Set,selectedNames:new Set,couponVal:[]}},mounted:function(){},watch:{updateIds:function(t){this.selectedIds=new Set(t)},updateName:function(t){this.selectedNames=new Set(t)}},created:function(){var t=this,e={width:60,align:"center",render:function(e,s){var n=s.row.id,r=!1;r=t.currentid===n;var a=t;return e("div",[e("Radio",{props:{value:r},on:{"on-change":function(){a.currentid=n,t.productRow=s.row}}})])}};this.luckDraw?this.columns.unshift(e):this.columns.unshift({type:"selection",width:60,align:"center"})},methods:{unique:function(t){var e=new Map;return t.filter((function(t){return!e.has(t.id)&&e.set(t.id,1)}))},changeCheckbox:function(t){this.couponVal=t},handleSelectAll:function(t){var e=this;if(!this.discount){if(0===t.length){var s=this;s.$refs.table.data.forEach((function(t){if(s.selectedIds.has(t.id)){s.selectedIds.delete(t.id);var e=s.unique(Array.from(s.selectedNames));s.unique(Array.from(s.selectedNames)).forEach((function(s,n){s.id===t.id&&e.splice(n,1)})),s.selectedNames=new Set(e)}}))}else t.forEach((function(t){e.selectedIds.add(t.id),e.selectedNames.add({id:t.id,title:t.title})}));this.$nextTick((function(){e.setChecked()}))}},handleSelectRow:function(t,e){var s=this;this.discount||(this.selectedIds.add(e.id),this.selectedNames.add({id:e.id,title:e.title}),this.$nextTick((function(){s.setChecked()})))},handleCancelRow:function(t,e){var s=this;if(!this.discount){this.selectedIds.delete(e.id);var n=Array.from(this.selectedNames);Array.from(this.selectedNames).forEach((function(t,s){t.id===e.id&&n.splice(s,1)})),this.selectedNames=new Set(n),this.$nextTick((function(){s.setChecked()}))}},setChecked:function(){this.ids=a(this.selectedIds),this.texts=a(this.selectedNames);var t=this.$refs.table.objData;for(var e in t)this.selectedIds.has(t[e].id)&&(t[e]._isChecked=!0)},cancel:function(){this.isTemplate=!1,this.luckDraw&&(this.currentid=0)},tableList:function(){var t=this;this.loading=!0,Object(n.nb)(this.tableFrom).then((function(e){var s=e.data;t.couponList=s.list,t.discount||t.$nextTick((function(){t.setChecked()})),t.total=s.count,t.loading=!1}))},ok:function(){this.luckDraw?(this.$emit("getCouponId",this.productRow),this.currentid=0):this.discount?this.$emit("getCouponList",this.couponVal):this.$emit("nameId",this.ids,this.texts)},receivePageChange:function(t){this.tableFrom.page=t,this.tableList()}}},o=s("2877"),l=Object(o.a)(i,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("Modal",{attrs:{title:"优惠券列表",width:"60%"},on:{"on-ok":t.ok,"on-cancel":t.cancel},model:{value:t.isTemplate,callback:function(e){t.isTemplate=e},expression:"isTemplate"}},[s("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns,data:t.couponList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},on:{"on-select":t.handleSelectRow,"on-select-cancel":t.handleCancelRow,"on-select-all":t.handleSelectAll,"on-select-all-cancel":t.handleSelectAll,"on-selection-change":t.changeCheckbox},scopedSlots:t._u([{key:"coupon_price",fn:function(e){var n=e.row;return[1==n.coupon_type?s("span",[t._v(t._s(n.coupon_price)+"元")]):t._e(),2==n.coupon_type?s("span",[t._v(t._s(parseFloat(n.coupon_price)/10)+"折("+t._s(n.coupon_price.toString().split(".")[0])+"%)")]):t._e()]}},{key:"count",fn:function(e){var n=e.row;return e.index,[n.is_permanent?s("span",[t._v("不限量")]):s("div",[s("span",{staticClass:"fa"},[t._v("发布:"+t._s(n.total_count))]),s("span",{staticClass:"sheng"},[t._v("剩余:"+t._s(n.remain_count))])])]}},{key:"start_time",fn:function(e){var n=e.row;return e.index,[n.start_time?s("div",[t._v("\n "+t._s(t._f("formatDate")(n.start_time))+" - "+t._s(t._f("formatDate")(n.end_time))+"\n ")]):s("span",[t._v("不限时")])]}},{key:"type",fn:function(e){var n=e.row;return[1===n.type?s("span",[t._v("品类券")]):2===n.type?s("span",[t._v("商品券")]):3===n.type?s("span",[t._v("会员券")]):s("span",[t._v("通用券")])]}},{key:"status",fn:function(e){var n=e.row;return e.index,[s("Tag",{directives:[{name:"show",rawName:"v-show",value:1===n.status,expression:"row.status===1"}],attrs:{color:"blue"}},[t._v("正常")]),s("Tag",{directives:[{name:"show",rawName:"v-show",value:0===n.status,expression:"row.status===0"}],attrs:{color:"gold"}},[t._v("未开启")]),s("Tag",{directives:[{name:"show",rawName:"v-show",value:-1===n.status,expression:"row.status=== -1"}],attrs:{color:"red"}},[t._v("已失效")])]}}])}),s("div",{staticClass:"acea-row row-right page"},[s("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.tableFrom.limit},on:{"on-change":t.receivePageChange}})],1)],1)],1)}),[],!1,null,"65e1da4a",null);e.a=l.exports},e951:function(t,e,s){"use strict";var n=s("4e4f");s.n(n).a}}]);