You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
40 KiB
1 lines
40 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-d8121a88"],{"2a57":function(t,e,r){"use strict";r("41f5")},"41f5":function(t,e,r){},"4c00":function(t,e,r){},"61f7":function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var r={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var n in r)if(new RegExp("(".concat(n,")")).test(e)){var i=r[n]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?i:c(i))}return e}function c(t){return("00"+t).substr(t.length)}r.d(e,"a",(function(){return s})),r.d(e,"c",(function(){return d})),r.d(e,"b",(function(){return f}));var u={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},l=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function d(t){return a({required:!0,message:t,type:"string"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function f(t){return m.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}l(d,"请输入%s"),l(f,"%s格式不正确");var m=Object.keys(u).reduce((function(t,e){return t[e]=function(t){var r=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]}:o({},e,t);return a(a({message:r.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},i),n)},l(t[e],u[e]),t}),{})},a965:function(t,e,r){"use strict";r("4c00")},b621:function(t,e,r){"use strict";r.r(e);var n=r("b0e7"),i=r("e449"),a=r("c4ad"),o={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(r){-1!=r.info.indexOf(t.formValidate.info)&&e.push(r)})),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}}},s=(r("2a57"),r("2877")),c=Object(s.a)(o,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"information"},[e("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"}},[e("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":100}},[e("FormItem",{attrs:{label:"信息搜索:"}},[e("Input",{staticClass:"inputw",attrs:{placeholder:"请输入信息"},model:{value:t.formValidate.info,callback:function(e){t.$set(t.formValidate,"info",e)},expression:"formValidate.info"}}),e("Button",{attrs:{type:"primary"},on:{click:t.handleSubmit}},[t._v("\n 查询\n ")])],1)],1),e("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}}),e("div",{staticClass:"footer mt20"},[e("Button",{staticClass:"btn",on:{click:t.cancel}},[t._v("取消")]),e("Button",{staticClass:"btn",attrs:{type:"primary"},on:{click:t.ok}},[t._v("确认")])],1)],1)],1)}),[],!1,null,"6c4a1af8",null).exports,u=r("a069"),l=r("c24f");function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function m(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){p(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=d(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==d(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var h={name:"setupUser",components:{uploadPictures:n.a,couponList:i.a,goodsList:a.default,WangEditor:u.a,information:c},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:""},register_price_status:"",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,r){e.length<2?r(new Error("单选项最少输入2个")):r()},type:"array",trigger:"blur"}]},ruleActive:{activeInput:[{required:!0,validator:function(t,e,r){""===e||null==e||e<0?r(new Error("活动价不能为空")):r()},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 r=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,r)}if(t>e){for(n=t;n>e;n--)this.listOne.splice(n,1,this.listOne[n-1]);this.listOne.splice(e,1,r)}var i=1;this.listOne.forEach((function(t){t.sort=i,i++}))},settingUser:function(){var t=this;Object(l.N)(this.tabVal).then((function(e){if("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;var r=function(t){return t.map((function(t){return m(m({},t),{},{ativity_price:t.price,id:t.product_id,attrValue:t.attrValue?r(t.attrValue):[]})}))};t.tableData=r(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,t.tableData=e.data.product,t.register_price_status=e.data.register_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(r){r&&(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(r,n){e.id==r.id?t.tableData.splice(n,1):r.attrValue.forEach((function(i,a){e.id==i.id&&(1==r.attrValue.length?t.tableData.splice(n,1):r.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 r=m(m({},t.formItem),{},{required:0,use:0,user_show:0,label:""});switch(r.format){case"text":r.label="文本";break;case"num":r.label="数字";break;case"date":r.label="日期";break;case"radio":r.label="单选项";break;case"id":r.label="身份证";break;case"mail":r.label="邮件";break;case"phone":r.label="手机号";break;case"address":r.label="地址"}var n=[];t.listOne.forEach((function(t){n.push(t.info)})),e&&(-1==n.indexOf(r.info)?(t.listOne.push(r),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 r={h5_avatar:this.authorizedPicture,user_extend_info:this.listOne};Object(l.M)(t,r).then((function(t){e.$Message.success(t.msg)}));break;case"register":this.product_list=[],this.tableData.forEach((function(t){var r={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};r.attr.push(e)})),e.product_list.push(r)}));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(l.M)(t,this.loginForm).then((function(t){e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t.msg)}));break;case"level":var i=this.vipCopon.map((function(t){return t.id}));this.vipForm.level_give_coupon=Array.from(new Set(i)),this.vipForm.level_extend_info=this.listVip,Object(l.M)(t,this.vipForm).then((function(t){e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t.msg)}));break;case"svip":this.product_list=[],this.tableData.forEach((function(t){var r={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};r.attr.push(e)})),e.product_list.push(r)}));var a={member_card_status:this.member_card_status,svip_price_status:this.svip_price_status,product:this.product_list,register_price_status:this.register_price_status};Object(l.M)(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 r=this.formItem.singlearr.indexOf(e);this.formItem.singlearr.splice(r,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 r=this.promotionsData[e].giveCoupon.concat(t),n=this.unique(r);"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(r,n){if(t.id==r.id)return e.tableData.splice(n,1);r.attrValue.forEach((function(i,a){if(t.id==i.id)return 1==r.attrValue.length?e.tableData.splice(n,1):r.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),r=this.unique(e);r.forEach((function(t){t.attrValue.forEach((function(e){e.cate_name=t.cate_name,e.store_label=t.store_label}))}));var n=function(t){return t.map((function(t){return m(m({},t),{},{ativity_price:"",attrValue:t.attrValue?n(t.attrValue):[]})}))};this.tableData=n(r)},getInfoList:function(t){var e=this.listVip.concat(t),r=this.uniqueVip(e);r.forEach((function(t){1==t.required||1==t.required?t.required=!0:t.required=!1})),this.listVip=r,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}}},b=(r("a965"),Object(s.a)(h,(function(){var t=this,e=t._self._c;return e("div",[e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("Tabs",{on:{"on-click":t.tabChange},model:{value:t.tabVal,callback:function(e){t.tabVal=e},expression:"tabVal"}},[e("TabPane",{attrs:{label:"基础信息",name:"basic"}},[e("Form",{attrs:{model:t.basicsForm,"label-width":120}},[e("Row",{attrs:{gutter:24,type:"flex"}},[e("Col",{attrs:{span:"24"}},[e("div",{staticClass:"basics"},[t._v("用户设置")])]),e("Col",{staticClass:"mt10",attrs:{span:"24"}},[e("FormItem",{attrs:{label:"用户默认头像:"}},[t.authorizedPicture?e("div",{staticClass:"uploadPictrue",on:{click:function(e){return t.modalPicTap("单选")}}},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.authorizedPicture,expression:"authorizedPicture"}]})]):e("div",{staticClass:"uploadPictrue",on:{click:function(e){return t.modalPicTap("单选")}}},[e("span",{staticClass:"iconfont iconshangpinshuliang-jia"})]),e("div",{staticClass:"upload-text"},[t._v("建议尺寸:120*120px")])])],1),e("Col",{staticClass:"mt10",attrs:{span:"14"}},[e("FormItem",{attrs:{label:"用户信息设置:"}},[e("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,[e("div",{staticClass:"iconfont icondrag"})]}},{key:"use",fn:function(r){r.row;var n=r.index;return[e("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(r){r.row;var n=r.index;return[e("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(r){r.row;var n=r.index;return[e("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(r){r.row;var n=r.index;return[t.listOne[n].param?t._e():e("a",{on:{click:function(e){return t.delInfo(n)}}},[t._v("删除")])]}}])}),e("div",{staticClass:"upload-text goods"},[t._v("\n 开启使用后,后台添加用户时可填写此信息;开启必填后,后台添加用户时此信息必须填写;开启用户端展示后,在商城用户个人信息中展示\n ")]),e("div",{staticClass:"addInfo",on:{click:function(e){t.addModel=!0}}},[t._v("新增信息")]),e("div",{staticClass:"subBtn mt20",on:{click:function(e){return t.handleSubmit("basic")}}},[t._v("\n 保存\n ")])],1)],1)],1)],1)],1),t._e(),t._e(),e("TabPane",{attrs:{label:"付费会员",name:"svip"}},[e("Form",{attrs:{model:t.basicsForm,"label-width":120}},[e("Row",{attrs:{gutter:24,type:"flex"}},[e("Col",{staticClass:"mt10",attrs:{span:"24"}},[e("FormItem",{attrs:{label:"付费会员启用:"}},[e("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"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1),1==t.member_card_status?e("FormItem",{attrs:{label:"付费会员价展示:"}},[e("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"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1):t._e()],1),e("Col",{staticClass:"mt10",attrs:{span:"24"}},[e("FormItem",{attrs:{label:"会员礼包商品:"}},[e("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.register_price_status,callback:function(e){t.register_price_status=e},expression:"register_price_status"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])]),e("div",{staticClass:"upload-text"},[t._v("\n\t\t\t 购买付费会员可领取一件商品礼包\n\t\t\t ")]),1===t.register_price_status?e("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}},[e("vxe-column",{attrs:{type:"checkbox",title:"多选",width:"90","tree-node":""}}),e("vxe-column",{attrs:{field:"id",title:"ID","min-width":"80"}}),e("vxe-column",{attrs:{field:"info",title:"商品信息","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(r){var n=r.row;return[e("div",{staticClass:"imgPic acea-row row-middle"},[e("viewer",[e("div",{staticClass:"pictrue"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:n.image,expression:"row.image"}]})])]),e("div",{staticClass:"info"},[e("Tooltip",{attrs:{"max-width":"200",placement:"bottom",transfer:""}},[e("span",{staticClass:"line2"},[t._v(t._s(n.store_name)+t._s(n.suk))]),e("p",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(n.store_name)+t._s(n.suk))])])],1)],1)]}}],null,!1,1988674042)}),e("vxe-column",{attrs:{field:"price",title:"售价","min-width":"80"}}),e("vxe-column",{attrs:{field:"stock",title:"库存","min-width":"80"}}),e("vxe-column",{attrs:{field:"date",title:"操作","min-width":"50",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(r){var n=r.row;return[e("a",{on:{click:function(e){return t.del(n)}}},[t._v("删除")])]}}],null,!1,1383043590)})],1):t._e(),1===t.register_price_status?e("div",{staticClass:"add-goods"},[e("Button",{on:{click:t.addGoods}},[t._v("添加商品")]),e("Button",{staticClass:"goods-btn",on:{click:t.activityShowFn}},[t._v("\n\t\t\t 设置活动价\n\t\t\t ")]),e("Button",{on:{click:t.delAll}},[t._v("批量删除")])],1):t._e()],1)],1),e("Col",{staticClass:"mt10",attrs:{span:"24"}},[e("FormItem",[e("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),e("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?e("uploadPictures",{attrs:{isChoice:t.isChoice,gridBtn:t.gridBtn,gridPic:t.gridPic},on:{getPic:t.getPic}}):t._e()],1),e("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"}},[e("Form",{ref:"formValidate",attrs:{model:t.formItem,rules:t.ruleValidate,"label-width":90}},[e("Row",[e("Col",[e("FormItem",{attrs:{label:"信息名称:",prop:"info"}},[e("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),e("Col",[e("FormItem",{attrs:{label:"信息格式 :",prop:"format"}},[e("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(r){return e("Option",{key:r.value,attrs:{value:r.value}},[t._v("\n "+t._s(r.label)+"\n ")])})),1)],1)],1),e("Col",["radio"===t.formItem.format?e("FormItem",{attrs:{label:"单选项 :",prop:"singlearr"}},[e("div",{staticClass:"arrbox"},[t._l(t.formItem.singlearr,(function(r,n){return e("Tag",{key:n,attrs:{name:r,closable:!0},on:{"on-close":t.handleClose}},[t._v("\n "+t._s(r)+"\n ")])})),e("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.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.formItem,"single",e.target.value)}}})],2)]):t._e()],1),e("Col",[e("FormItem",{attrs:{label:"提示文案:",prop:"tip"}},[e("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),e("div",{staticClass:"acea-row row-right",attrs:{slot:"footer"},slot:"footer"},[e("Button",{on:{click:t.cancelSubmit}},[t._v("取消")]),e("Button",{attrs:{type:"primary"},on:{click:t.addSubmit}},[t._v("提交")])],1)],1),e("coupon-list",{ref:"couponTemplates",attrs:{discount:!0},on:{getCouponList:t.getCouponList}}),e("Modal",{staticClass:"paymentFooter",attrs:{title:"商品列表",footerHide:"",scrollable:"",width:"900"},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[t.modals?e("goods-list",{ref:"goodslist",attrs:{ischeckbox:!0,isdiy:!0},on:{getProductId:t.getProductId}}):t._e()],1),e("information",{ref:"information",attrs:{listOne:t.listOne},on:{getInfoList:t.getInfoList}}),e("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"}},[e("Form",{ref:"activityShow",attrs:{model:t.formActive,rules:t.ruleActive,"label-width":100}},[e("FormItem",{attrs:{label:"设置活动价:",prop:"activeInput"}},[e("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),e("div",{staticClass:"acea-row row-right"},[e("Button",{on:{click:function(e){return t.cancel("activityShow")}}},[t._v("取消")]),e("Button",{staticClass:"ml15 mr5",attrs:{type:"primary"},on:{click:function(e){return t.ok("activityShow")}}},[t._v("提交")])],1)],1)],1)],1)}),[],!1,null,"f34d47d2",null));e.default=b.exports},c24f:function(t,e,r){"use strict";r.d(e,"X",(function(){return i})),r.d(e,"N",(function(){return a})),r.d(e,"M",(function(){return o})),r.d(e,"k",(function(){return s})),r.d(e,"r",(function(){return c})),r.d(e,"d",(function(){return u})),r.d(e,"h",(function(){return l})),r.d(e,"g",(function(){return d})),r.d(e,"q",(function(){return f})),r.d(e,"s",(function(){return m})),r.d(e,"J",(function(){return p})),r.d(e,"P",(function(){return h})),r.d(e,"L",(function(){return b})),r.d(e,"K",(function(){return v})),r.d(e,"f",(function(){return g})),r.d(e,"e",(function(){return _})),r.d(e,"n",(function(){return y})),r.d(e,"R",(function(){return w})),r.d(e,"p",(function(){return O})),r.d(e,"Q",(function(){return k})),r.d(e,"cb",(function(){return x})),r.d(e,"U",(function(){return C})),r.d(e,"S",(function(){return j})),r.d(e,"T",(function(){return I})),r.d(e,"W",(function(){return S})),r.d(e,"V",(function(){return P})),r.d(e,"Y",(function(){return V})),r.d(e,"v",(function(){return $})),r.d(e,"w",(function(){return F})),r.d(e,"Z",(function(){return D})),r.d(e,"i",(function(){return E})),r.d(e,"bb",(function(){return T})),r.d(e,"C",(function(){return A})),r.d(e,"db",(function(){return q})),r.d(e,"m",(function(){return M})),r.d(e,"ab",(function(){return N})),r.d(e,"F",(function(){return W})),r.d(e,"B",(function(){return L})),r.d(e,"A",(function(){return z})),r.d(e,"z",(function(){return B})),r.d(e,"D",(function(){return R})),r.d(e,"y",(function(){return U})),r.d(e,"x",(function(){return G})),r.d(e,"u",(function(){return H})),r.d(e,"t",(function(){return J})),r.d(e,"o",(function(){return Y})),r.d(e,"l",(function(){return K})),r.d(e,"G",(function(){return Q})),r.d(e,"I",(function(){return X})),r.d(e,"eb",(function(){return Z})),r.d(e,"O",(function(){return tt})),r.d(e,"E",(function(){return et})),r.d(e,"b",(function(){return rt})),r.d(e,"a",(function(){return nt})),r.d(e,"fb",(function(){return it})),r.d(e,"j",(function(){return at})),r.d(e,"c",(function(){return ot})),r.d(e,"H",(function(){return st}));var n=r("b6bd");function i(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 o(t,e){return Object(n.a)({url:"setting/config/user/".concat(t),method:"post",data:e})}function s(t){return Object(n.a)({url:"user/user/".concat(t,"/edit"),method:"get"})}function c(t){return Object(n.a)({url:"user/set_status/".concat(t.status,"/").concat(t.id),method:"put"})}function u(t){return Object(n.a)({url:"marketing/coupon/grant",method:"get",params:t})}function l(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 f(t){return Object(n.a)({url:"user/one_info/".concat(t.id),method:"get",params:t.datas})}function m(t){return Object(n.a)({url:"user/user_level/vip_list",method:"get",params:t})}function p(t){return Object(n.a)({url:"user/user_level/set_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function h(t,e){return Object(n.a)({url:"user/user_level/task/".concat(t),method:"get",params:e})}function b(t){return Object(n.a)({url:"user/user_level/set_task_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function v(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 _(t){return Object(n.a)({url:"user/user_level/create",method:"get",params:t})}function y(t){return Object(n.a)({url:"user/give_level/".concat(t),method:"get"})}function w(t){return Object(n.a)({url:"user/user_group/list",method:"get",params:t})}function O(t){return Object(n.a)({url:"user/user_group/add/".concat(t),method:"get"})}function k(t){return Object(n.a)({url:"setting/update_admin",method:"PUT",data:t})}function x(t){return Object(n.a)({url:"user/set_group",method:"post",data:t})}function C(t){return Object(n.a)({url:"user/user_label",method:"get",params:t})}function j(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 S(t){return Object(n.a)({url:"user/user_label_cate/".concat(t,"/edit"),method:"get"})}function P(t){return Object(n.a)({url:"user/user_label_cate/create",method:"get"})}function V(t){return Object(n.a)({url:"/user/member_batch/index",method:"get",params:t})}function $(t,e){return Object(n.a)({url:"/user/member_batch/save/".concat(t),method:"post",data:e})}function F(t,e){return Object(n.a)({url:"/user/member_batch/set_value/".concat(t),method:"get",params:e})}function D(t,e){return Object(n.a)({url:"/user/member_card/index/".concat(t),method:"get",params:e})}function E(t,e){return Object(n.a)({url:"/export/memberCard/".concat(t),method:"get",params:e})}function T(){return Object(n.a)({url:"/user/member/ship",method:"get"})}function A(t,e){return Object(n.a)({url:"/user/member_ship/save/".concat(t),method:"post",data:e})}function q(){return Object(n.a)({url:"/user/user/syncUsers",method:"get"})}function M(){return Object(n.a)({url:"/user/user/create",method:"get"})}function N(){return Object(n.a)({url:"/user/member_scan",method:"get"})}function W(t,e){return Object(n.a)({url:"user/label/".concat(t),method:"post",data:e})}function L(t){return Object(n.a)({url:"user/member_right/save/".concat(t.id),method:"post",data:t})}function z(){return Object(n.a)({url:"user/member/right",method:"get"})}function B(t){return Object(n.a)({url:"/user/member/record",method:"get",params:t})}function R(){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 rt(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 it(){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 ot(t){return Object(n.a)({url:"user/batch_process",method:"post",data:t})}function st(t,e){return Object(n.a)({url:"/user/member/save/content/".concat(t),method:"post",data:e})}},e449:function(t,e,r){"use strict";var n=r("b7be"),i=r("61f7");function a(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var s={name:"index",filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(i.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,r){var n=r.row.id,i=!1;i=t.currentid===n;var a=t;return e("div",[e("Radio",{props:{value:i},on:{"on-change":function(){a.currentid=n,t.productRow=r.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 r=this;r.$refs.table.data.forEach((function(t){if(r.selectedIds.has(t.id)){r.selectedIds.delete(t.id);var e=r.unique(Array.from(r.selectedNames));r.unique(Array.from(r.selectedNames)).forEach((function(r,n){r.id===t.id&&e.splice(n,1)})),r.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 r=this;this.discount||(this.selectedIds.add(e.id),this.selectedNames.add({id:e.id,title:e.title}),this.$nextTick((function(){r.setChecked()})))},handleCancelRow:function(t,e){var r=this;if(!this.discount){this.selectedIds.delete(e.id);var n=Array.from(this.selectedNames);Array.from(this.selectedNames).forEach((function(t,r){t.id===e.id&&n.splice(r,1)})),this.selectedNames=new Set(n),this.$nextTick((function(){r.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.tb)(this.tableFrom).then((function(e){var r=e.data;t.couponList=r.list,t.discount||t.$nextTick((function(){t.setChecked()})),t.total=r.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()}}},c=r("2877"),u=Object(c.a)(s,(function(){var t=this,e=t._self._c;return e("div",[e("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"}},[e("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(r){var n=r.row;return[1==n.coupon_type?e("span",[t._v(t._s(n.coupon_price)+"元")]):t._e(),2==n.coupon_type?e("span",[t._v(t._s(parseFloat(n.coupon_price)/10)+"折("+t._s(n.coupon_price.toString().split(".")[0])+"%)")]):t._e()]}},{key:"count",fn:function(r){var n=r.row;return r.index,[n.is_permanent?e("span",[t._v("不限量")]):e("div",[e("span",{staticClass:"fa"},[t._v("发布:"+t._s(n.total_count))]),e("span",{staticClass:"sheng"},[t._v("剩余:"+t._s(n.remain_count))])])]}},{key:"start_time",fn:function(r){var n=r.row;return r.index,[n.start_time?e("div",[t._v("\n "+t._s(t._f("formatDate")(n.start_time))+" - "+t._s(t._f("formatDate")(n.end_time))+"\n ")]):e("span",[t._v("不限时")])]}},{key:"type",fn:function(r){var n=r.row;return[1===n.type?e("span",[t._v("品类券")]):2===n.type?e("span",[t._v("商品券")]):3===n.type?e("span",[t._v("会员券")]):e("span",[t._v("通用券")])]}},{key:"status",fn:function(r){var n=r.row;return r.index,[e("Tag",{directives:[{name:"show",rawName:"v-show",value:1===n.status,expression:"row.status===1"}],attrs:{color:"blue"}},[t._v("正常")]),e("Tag",{directives:[{name:"show",rawName:"v-show",value:0===n.status,expression:"row.status===0"}],attrs:{color:"gold"}},[t._v("未开启")]),e("Tag",{directives:[{name:"show",rawName:"v-show",value:-1===n.status,expression:"row.status=== -1"}],attrs:{color:"red"}},[t._v("已失效")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("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=u.exports}}]); |