mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-15 13:22:51 +00:00
1 line
50 KiB
JavaScript
1 line
50 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8048fcec"],{"0d3e":function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));a("a481");function r(e){var t=e.replace(/<img[^>]*>/gi,(function(e,t){return e=e.replace(/style="[^"]+"/gi,"").replace(/style='[^']+'/gi,""),e=e.replace(/width="[^"]+"/gi,"").replace(/width='[^']+'/gi,""),e=e.replace(/height="[^"]+"/gi,"").replace(/height='[^']+'/gi,""),e}));return t=t.replace(/style="[^"]+"/gi,(function(e,t){return e=e.replace(/width:[^;]+;/gi,"max-width:100%;").replace(/width:[^;]+;/gi,"max-width:100%;"),e})),t=t.replace(/<br[^>]*\/>/gi,""),t=t.replace(/\<img/gi,'<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"'),t}},1184:function(e,t,a){"use strict";a.d(t,"c",(function(){return i})),a.d(t,"d",(function(){return o})),a.d(t,"a",(function(){return s})),a.d(t,"b",(function(){return n})),a.d(t,"g",(function(){return l})),a.d(t,"f",(function(){return c})),a.d(t,"e",(function(){return d}));var r=a("6b6c");function i(e){return Object(r["a"])({url:"marketing/lottery/list",method:"get",params:e})}function o(e){return Object(r["a"])({url:"marketing/lottery/factor_info/".concat(e),method:"get"})}function s(e){return Object(r["a"])({url:"marketing/lottery/add",method:"post",data:e})}function n(e,t){return Object(r["a"])({url:"marketing/lottery/edit/".concat(e),method:"put",data:t})}function l(e){return Object(r["a"])({url:"marketing/lottery/set_status/".concat(e.id,"/").concat(e.status),method:"post"})}function c(e){return Object(r["a"])({url:"marketing/lottery/record/list",method:"get",params:e})}function d(e){return Object(r["a"])({url:"marketing/lottery/record/deliver",method:"post",data:e})}},"20ee":function(e,t,a){},"232f":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"label-wrapper"},[e.labelList[0]?e._l(e.labelList,(function(t,r){return a("div",{key:r,staticClass:"label-box"},[a("div",{staticClass:"title"},[e._v(e._s(t.name))]),a("div",{staticClass:"list"},e._l(t.label,(function(t,r){return a("div",{key:r,staticClass:"label-item",class:{on:t.disabled},on:{click:function(a){return e.selectLabel(t)}}},[e._v("\n "+e._s(t.label_name)+"\n ")])})),0)])})):a("div",{staticClass:"nonefont"},[e._v("暂无标签")]),a("div",{staticClass:"footer"},[a("Button",{staticClass:"btns",attrs:{type:"primary"},on:{click:e.subBtn}},[e._v("确定")]),a("Button",{staticClass:"btns",attrs:{type:"primary",ghost:""},on:{click:e.cancel}},[e._v("取消")])],1)],2)},i=[],o=(a("c5f6"),a("c24f")),s={name:"userLabel",props:{uid:{type:String|Number,default:""},only_get:{default:!1},selectDataLabel:{type:Array,default:function(){}}},data:function(){return{labelList:[],activeIds:[],unLaberids:[]}},watch:{uid:{handler:function(e,t){e!=t&&this.getList()},deep:!0}},mounted:function(){this.getList()},methods:{getList:function(){var e=this;Object(o["k"])(this.uid).then((function(t){e.selectDataLabel&&e.selectDataLabel.length&&e.selectDataLabel.map((function(e){t.data.map((function(t){t.label.map((function(t){t.id===e.id&&(t.disabled=!0)}))}))})),console.log(t.data),t.data.map((function(t){t.label.map((function(t){t.disabled&&e.activeIds.push(t.id)}))})),e.labelList=t.data}))},selectLabel:function(e){if(e.disabled){var t=this.activeIds.indexOf(e.id);this.activeIds.splice(t,1),e.disabled=!1}else this.activeIds.push(e.id),e.disabled=!0},subBtn:function(){var e=this,t=[];if(this.only_get)return this.labelList.map((function(e){e.label.map((function(e){1==e.disabled&&t.push({id:e.id,label_name:e.label_name})}))})),void this.$emit("activeData",t);this.labelList.map((function(e){e.label.map((function(e){0==e.disabled&&t.push(e.id)}))})),this.unLaberids=t,Object(o["B"])(this.uid,{label_ids:this.activeIds,un_label_ids:this.unLaberids}).then((function(t){e.$emit("onceGetList"),e.activeIds=[],e.unLaberids=[],e.$Message.success(t.msg),e.$emit("close")})).catch((function(t){e.$Message.error(t.msg)}))},cancel:function(){this.activeIds=[],this.unLaberids=[],this.$emit("close")}}},n=s,l=(a("f5a7"),a("2877")),c=Object(l["a"])(n,r,i,!1,null,"3820afdf",null);t["a"]=c.exports},2880:function(module,__webpack_exports__,__webpack_require__){"use strict";var core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("8e6e"),core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es7_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_0__),core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("456d"),core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es6_object_keys__WEBPACK_IMPORTED_MODULE_1__),_Users_wuhaotian_Desktop_code_crmeb_standard_admin_node_modules_babel_runtime_corejs2_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("75fc"),regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("96cf"),regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_3__),_Users_wuhaotian_Desktop_code_crmeb_standard_admin_node_modules_babel_runtime_corejs2_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("3b8d"),core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("7f7f"),core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es6_function_name__WEBPACK_IMPORTED_MODULE_5__),core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("ac6a"),core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(core_js_modules_web_dom_iterable__WEBPACK_IMPORTED_MODULE_6__),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("6b54"),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_7__),_Users_wuhaotian_Desktop_code_crmeb_standard_admin_node_modules_babel_runtime_corejs2_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("7618"),_Users_wuhaotian_Desktop_code_crmeb_standard_admin_node_modules_babel_runtime_corejs2_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("bd86"),vuex__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("2f62"),_components_goodsList_index__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("c4ad"),_components_uploadPictures__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("b0e7"),_components_userLabel__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("232f"),_addGoods__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("eab1"),_api_lottery__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("1184"),_formRule_lotteryFrom__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("d1cc"),_api_product__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("c4c8"),_api_user__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("c24f"),_components_wangEditor_index_vue__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("a069"),_utils_validate__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("61f7"),_utils_editorImg__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("0d3e");function ownKeys(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(a),!0).forEach((function(t){Object(_Users_wuhaotian_Desktop_code_crmeb_standard_admin_node_modules_babel_runtime_corejs2_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_9__["a"])(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}__webpack_exports__["a"]={name:"lotteryCreate",components:{goodsList:_components_goodsList_index__WEBPACK_IMPORTED_MODULE_11__["default"],uploadPictures:_components_uploadPictures__WEBPACK_IMPORTED_MODULE_12__["a"],addGoods:_addGoods__WEBPACK_IMPORTED_MODULE_14__["a"],WangEditor:_components_wangEditor_index_vue__WEBPACK_IMPORTED_MODULE_19__["a"],userLabel:_components_userLabel__WEBPACK_IMPORTED_MODULE_13__["a"]},data:function(){return Object(_Users_wuhaotian_Desktop_code_crmeb_standard_admin_node_modules_babel_runtime_corejs2_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_9__["a"])({selectDataLabel:[],selectLabelShow:!1,tabs:[{name:"积分抽取",type:"1"},{name:"订单支付",type:"3"},{name:"订单评价",type:"4"}],title:"添加商品",loading:!1,userLabelList:[],userLevelListApi:[],submitOpen:!1,spinShow:!1,addGoodsModel:!1,editData:{},myConfig:{autoHeightEnabled:!1,initialFrameHeight:500,initialFrameWidth:"100%",UEDITOR_HOME_URL:"/admin/UEditor/",serverUrl:""},isChoice:"单选",current:0,modalPic:!1,modal_loading:!1,images:[],templateList:[{id:0,name:"非付费会员"},{id:1,name:"付费会员"}],columns:[{title:"序号",type:"index",width:60,align:"center"},{title:"图片",slot:"image",align:"center",minWidth:120},{title:"名称",align:"center",minWidth:80,key:"name"},{title:"奖品",slot:"type",align:"center",minWidth:80},{title:"提示语",key:"prompt",align:"center",minWidth:80},{title:"数量",slot:"total",align:"center",minWidth:80},{title:"奖品权重",slot:"chance",align:"center",minWidth:80},{title:"奖品概率",key:"probability",align:"center",minWidth:80},{title:"操作",slot:"setting",align:"center",minWidth:80}],specsData:[{type:1,name:"",num:10,image:"",chance:1,total:0,prompt:""},{type:1,name:"",num:0,image:"",chance:0,total:0,prompt:""},{type:1,name:"",num:0,image:"",chance:0,total:0,prompt:""},{type:1,name:"",num:0,image:"",chance:0,total:0,prompt:""},{type:1,name:"",num:0,image:"",chance:0,total:0,prompt:""},{type:1,name:"",num:0,image:"",chance:0,total:0,prompt:""},{type:1,name:"",num:0,image:"",chance:0,total:0,prompt:""},{type:1,name:"",num:0,image:"",chance:0,total:0,prompt:""}],formValidate:{images:[],name:"",desc:"",image:"",factor:"1",factor_num:1,attends_user:1,user_level:[],user_label:[],is_svip:"-1",prize_num:0,period:[],prize:[],lottery_num_term:1,lottery_num:1,spread_num:1,is_all_record:0,is_personal_record:0,is_content:0,content:"",status:0},ruleValidate:_formRule_lotteryFrom__WEBPACK_IMPORTED_MODULE_16__["a"],currentid:"",picTit:"",tableIndex:0,copy:0,editIndex:null,id:""},"copy",0)},filters:{typeName:function(e){return 1==e?"未中奖":2==e?"积分":3==e?"余额":4==e?"红包":5==e?"优惠券":6==e?"商品":void 0}},computed:_objectSpread(_objectSpread({},Object(vuex__WEBPACK_IMPORTED_MODULE_10__["e"])("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:135},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){this.getInfo(),this.labelListApi(),this.levelListApi()},methods:{changeUsers:function(e){console.log(e),1==e&&(this.formValidate.user_level=[],this.formValidate.user_label=[],this.formValidate.is_svip="-1",this.selectDataLabel=[])},labelClose:function(){this.selectLabelShow=!1},activeSelectData:function(e){console.log(e),this.selectLabelShow=!1,this.selectDataLabel=e},onClickTab:function(e){this.formValidate.factor=e,this.getInfo(e)},getEditorContent:function(e){this.formValidate.content=e},labelListApi:function(){var e=this;Object(_api_product__WEBPACK_IMPORTED_MODULE_17__["m"])().then((function(t){e.userLabelList=t.data.list}))},levelListApi:function(){var e=this;Object(_api_user__WEBPACK_IMPORTED_MODULE_18__["q"])().then((function(t){e.userLevelListApi=t.data.list}))},onchangeTime:function(e){var t=this;this.$nextTick((function(){t.$set(t.formValidate,"period",e)}))},getInfo:function(e){var t=this;this.spinShow=!0,Object(_api_lottery__WEBPACK_IMPORTED_MODULE_15__["d"])(this.formValidate.factor).then((function(a){console.log(Object(_Users_wuhaotian_Desktop_code_crmeb_standard_admin_node_modules_babel_runtime_corejs2_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_8__["a"])(a.data)),200!=a.status||Array.isArray(a.data)?(t.formValidate={images:[],name:"",desc:"",image:"",factor:e.toString(),factor_num:1,attends_user:1,user_level:[],user_label:[],is_svip:"-1",prize_num:0,period:[],prize:[],lottery_num_term:1,lottery_num:1,spread_num:1,is_all_record:0,is_personal_record:0,is_content:0,content:"",status:0},t.specsData=[{type:1,name:"",num:10,image:"",chance:1,total:0,prompt:""},{type:1,name:"",num:0,image:"",chance:0,total:0,prompt:""},{type:1,name:"",num:0,image:"",chance:0,total:0,prompt:""},{type:1,name:"",num:0,image:"",chance:0,total:0,prompt:""},{type:1,name:"",num:0,image:"",chance:0,total:0,prompt:""},{type:1,name:"",num:0,image:"",chance:0,total:0,prompt:""},{type:1,name:"",num:0,image:"",chance:0,total:0,prompt:""},{type:1,name:"",num:0,image:"",chance:0,total:0,prompt:""}]):(t.formValidate=a.data,t.formValidate.user_level=a.data.user_level||[],t.selectDataLabel=a.data.user_label||[],t.formValidate.is_svip=a.data.is_svip,t.formValidate.factor=a.data.factor.toString(),t.formValidate.period=[t.formatDate(a.data.start_time)||"",t.formatDate(a.data.end_time)||""],t.specsData=a.data.prize,t.getProbability())})).catch((function(e){})),this.spinShow=!1},next:function(e){var t=this;if(console.log(this.selectDataLabel),this.formValidate.prize=this.specsData,this.formValidate.is_content&&(this.formValidate.content=Object(_utils_editorImg__WEBPACK_IMPORTED_MODULE_21__["a"])(this.formValidate.content)),2==this.formValidate.attends_user&&this.selectDataLabel.length){var a=[];this.selectDataLabel.forEach((function(e){a.push(e.id)})),this.formValidate.user_label=a}if(this.submitOpen)return!1;this.$refs[e].validate((function(e){if(!e)return!1;t.submitOpen=!0,t.formValidate.id&&!t.copy?Object(_api_lottery__WEBPACK_IMPORTED_MODULE_15__["b"])(t.formValidate.id,t.formValidate).then(function(){var e=Object(_Users_wuhaotian_Desktop_code_crmeb_standard_admin_node_modules_babel_runtime_corejs2_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_4__["a"])(regeneratorRuntime.mark((function e(a){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$Message.success(a.msg),t.submitOpen=!1;case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.submitOpen=!1,t.$Message.error(e.msg)})):Object(_api_lottery__WEBPACK_IMPORTED_MODULE_15__["a"])(t.formValidate).then(function(){var e=Object(_Users_wuhaotian_Desktop_code_crmeb_standard_admin_node_modules_babel_runtime_corejs2_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_4__["a"])(regeneratorRuntime.mark((function e(a){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.submitOpen=!1,t.$Message.success(a.msg);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.submitOpen=!1,t.$Message.error(e.msg)}))}))},step:function(){this.current--},getContent:function(e){this.formValidate.content=e},getRole:function(e){this.formValidate.rule=e},modalPicTap:function(e,t,a){this.modalPic=!0,this.isChoice="dan"===e?"单选":"多选",this.picTit=t||"",this.tableIndex=a},getPic:function(e){switch(this.picTit){case"danFrom":this.formValidate.image=e.att_dir;break;default:this.specsData[this.tableIndex].image=e.att_dir}this.modalPic=!1},handleRemove:function(){this.formValidate.image=""},validate:function(e,t,a){return!1!==t||(this.$Message.error(a),!1)},addGoods:function(){this.addGoodsModel=!0,this.title="添加商品",this.editData={}},editGoods:function(e){this.addGoodsModel=!0,this.title="添加奖品",this.editData=this.specsData[e],this.editIndex=e},deleteGoods:function(e){this.specsData.splice(e,1)},sumArr:function sumArr(arr,name){for(var arrData=[],i=0;i<arr.length;i++)arrData.push(arr[i][name]);return eval(arrData.join("+"))},addGoodsData:function(e){null!=this.editIndex?this.$set(this.specsData,[this.editIndex],e):this.specsData.length<8?this.specsData.push(e):this.$Message.warning("最多添加8个奖品"),this.getProbability(),this.addGoodsModel=!1,this.editIndex=null},changeChance:function(e,t){var a=this;this.$set(this.specsData[t],"chance",e),this.$nextTick((function(e){a.getProbability()}))},changeTotal:function(e,t){this.$set(this.specsData[t],"total",e)},getProbability:function(){var e=0;e=this.sumArr(this.specsData,"chance");for(var t=0;t<this.specsData.length;t++)this.$set(this.specsData[t],"probability",(this.specsData[t].chance/e*100).toFixed(2)+"%")},onDragDrop:function(e,t){var a;(a=this.specsData).splice.apply(a,[t,1].concat(Object(_Users_wuhaotian_Desktop_code_crmeb_standard_admin_node_modules_babel_runtime_corejs2_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["a"])(this.specsData.splice(e,1,this.specsData[t]))))},formatDate:function(e){if(e){var t=new Date(1e3*e);return Object(_utils_validate__WEBPACK_IMPORTED_MODULE_20__["a"])(t,"yyyy-MM-dd hh:mm")}return""}}}},"3b2b":function(e,t,a){var r=a("7726"),i=a("5dbc"),o=a("86cc").f,s=a("9093").f,n=a("aae3"),l=a("0bfb"),c=r.RegExp,d=c,_=c.prototype,u=/a/g,m=/a/g,p=new c(u)!==u;if(a("9e1e")&&(!p||a("79e5")((function(){return m[a("2b4c")("match")]=!1,c(u)!=u||c(m)==m||"/a/i"!=c(u,"i")})))){c=function(e,t){var a=this instanceof c,r=n(e),o=void 0===t;return!a&&r&&e.constructor===c&&o?e:i(p?new d(r&&!o?e.source:e,t):d((r=e instanceof c)?e.source:e,r&&o?l.call(e):t),a?this:_,c)};for(var f=function(e){e in c||o(c,e,{configurable:!0,get:function(){return d[e]},set:function(t){d[e]=t}})},b=s(d),h=0;b.length>h;)f(b[h++]);_.constructor=c,c.prototype=_,a("2aba")(r,"RegExp",c)}a("7a56")("RegExp")},"5f6c":function(e,t,a){},"61f7":function(e,t,a){"use strict";a.d(t,"a",(function(){return s})),a.d(t,"c",(function(){return d})),a.d(t,"b",(function(){return _}));a("8e6e"),a("ac6a"),a("456d");var r=a("bd86");a("6b54"),a("3b2b"),a("a481");function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function o(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?i(Object(a),!0).forEach((function(t){Object(r["a"])(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):i(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function s(e,t){/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));var a={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(var r in a)if(new RegExp("(".concat(r,")")).test(t)){var i=a[r]+"";t=t.replace(RegExp.$1,1===RegExp.$1.length?i:n(i))}return t}function n(e){return("00"+e).substr(e.length)}var l={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"};var c=function(e,t){e.message=function(e){return t.replace("%s",e||"")}};function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o({required:!0,message:e,type:"string"},t)}function _(e){return u.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,e)}c(d,"请输入%s"),c(_,"%s格式不正确");var u=Object.keys(l).reduce((function(e,t){return e[t]=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s="range"===t?{min:e[0],max:e[1]}:Object(r["a"])({},t,e);return o(o({message:a.replace(":".concat(t),"range"===t?"".concat(e[0],"-").concat(e[1]):e),type:"string"},s),i)},c(e[t],l[t]),e}),{})},b0c0:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVcAAAFWCAMAAADqsy6PAAAAeFBMVEX////09PSkpKTn5+eYmJiZmZm4uLi7u7unp6f29vbNzc2zs7PU1NTPz8/k5OScnJz9/f35+fmfn5/7+/vj4+OxsbHv7++ioqLX19fq6urg4OCsrKzJycnz8/Pu7u7d3d2pqanFxcXCwsLx8fG/v7+urq7S0tLa2toxS1DsAAALuUlEQVR42uza23LbIBAGYEvqgmS53gWis6yz7Pd/w6Z1D06vKzql/z+5ITMJnm82BBZOCPKP5XFG/mTu313zTnsNF9pn1CelfaaIf7heTl4TJyefiT5FJ59J4PoMXOEKV7jCFa5whStc4QpXuMIVrnCFK1zhCle4whWucIUrXOEKV7jCFa5whStc4QpXuMIVrnCFK1zhCle4whWucIUrXOH6511ddouM+HM10ft8f8VVosu9NV5cXXLWeVHkW106D64SPRb1Pp9a6lJ8u0o5x/G2enCVtS8qpvdwqh7R4a6m1ZOlr7GpqiPx6mqSxRKp8nhXN2yWON3zfaqIps+3g12zx/5VtCu61BKl55tHV1M+ciYvrlIuTJWukyYZ+44pvZhDXd3YEU9L/ZZcH8vEVNXGl6tbW1Wxrby4mrsl2z//GqUpmIrkUNdBvbO27jn32/Scz4urXHcmTpfZi2tSEOufJdOm78hyoKucK0ofv4rXkr2IH1dXV0T7GJ19uMqFqSrl51AxaXOga6SI9S9ImYh64821uA8u8+IazcT5S8HMlvLyQNdkp/j+MtaWlsjTOtBcSyMnP66DItu/jD9XVAwHul5Vp5uPrnPm6/+WvBeQJ9ekoOr1A/bVsfW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c2MPV3b/zotrEjB/M8kTw/xb+QByHEnqGeIJiwAAAABJRU5ErkJggg=="},bbea:function(e,t,a){"use strict";var r=a("c1cd"),i=a.n(r);i.a},c1cd:function(e,t,a){},c389:function(e,t,a){"use strict";var r=a("20ee"),i=a.n(r);i.a},d1cc:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var r={name:[{required:!0,message:"请输入活动名称",trigger:"blur"}],factor:[{required:!0,type:"number",message:"请选择活动类型",trigger:"change"}],attends_user:[{required:!0,type:"number",message:"请选择参与用户",trigger:"change"}],factor_num:[{required:!0,type:"number",message:"请输入抽奖次数",trigger:"blur"}],prize:[{required:!0,type:"array",message:"请添加抽奖奖品(8条)",trigger:"change"},{type:"array",min:8,message:"请添加抽奖奖品(8条)",trigger:"change"}],lottery_num:[{required:!0,type:"number",message:"请输入邀请新用户最多可获得抽奖多少次",trigger:"blur"}],spread_num:[{required:!0,type:"number",message:"请输入关注额外抽多少次",trigger:"blur"}],image:[{required:!0,message:"请上传活动背景图",trigger:"change"}],content:[{required:!0,message:"请填写活动规则",trigger:"blur"}]}},e449:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("Modal",{attrs:{title:"优惠券列表",width:"60%"},on:{"on-ok":e.ok,"on-cancel":e.cancel},model:{value:e.isTemplate,callback:function(t){e.isTemplate=t},expression:"isTemplate"}},[a("Table",{ref:"table",staticClass:"mt25",attrs:{columns:e.columns,data:e.couponList,loading:e.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},on:{"on-select":e.handleSelectRow,"on-select-cancel":e.handleCancelRow,"on-select-all":e.handleSelectAll,"on-select-all-cancel":e.handleSelectAll},scopedSlots:e._u([{key:"count",fn:function(t){var r=t.row;t.index;return[r.is_permanent?a("span",[e._v("不限量")]):a("div",[a("span",{staticClass:"fa"},[e._v("发布:"+e._s(r.total_count))]),a("span",{staticClass:"sheng"},[e._v("剩余:"+e._s(r.remain_count))])])]}},{key:"start_time",fn:function(t){var r=t.row;t.index;return[r.start_time?a("div",[e._v("\n "+e._s(e._f("formatDate")(r.start_time))+" - "+e._s(e._f("formatDate")(r.end_time))+"\n ")]):a("span",[e._v("不限时")])]}},{key:"type",fn:function(t){var r=t.row;return[1===r.type?a("span",[e._v("品类券")]):2===r.type?a("span",[e._v("商品券")]):3===r.type?a("span",[e._v("会员券")]):a("span",[e._v("通用券")])]}},{key:"status",fn:function(t){var r=t.row;t.index;return[a("Tag",{directives:[{name:"show",rawName:"v-show",value:1===r.status,expression:"row.status===1"}],attrs:{color:"blue"}},[e._v("正常")]),a("Tag",{directives:[{name:"show",rawName:"v-show",value:0===r.status,expression:"row.status===0"}],attrs:{color:"gold"}},[e._v("未开启")]),a("Tag",{directives:[{name:"show",rawName:"v-show",value:-1===r.status,expression:"row.status=== -1"}],attrs:{color:"red"}},[e._v("已失效")])]}}])}),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:e.total,"show-elevator":"","show-total":"","page-size":e.tableFrom.limit},on:{"on-change":e.receivePageChange}})],1)],1)],1)},i=[],o=a("75fc"),s=(a("1c4c"),a("f400"),a("ac6a"),a("5df3"),a("4f7f"),a("b7be")),n=a("61f7"),l={name:"index",filters:{formatDate:function(e){if(0!==e){var t=new Date(1e3*e);return Object(n["a"])(t,"yyyy-MM-dd hh:mm")}}},props:{couponids:{type:Array},updateIds:{type:Array},updateName:{type:Array},luckDraw:{type:Boolean,default:!1}},data:function(){return{currentid:0,productRow:{},isTemplate:!1,loading:!1,tableFrom:{receive_type:3,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:"面值",key:"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}},mounted:function(){},watch:{updateIds:function(e){this.selectedIds=new Set(e)},updateName:function(e){this.selectedNames=new Set(e)}},created:function(){var e=this,t={width:60,align:"center",render:function(t,a){var r=a.row.id,i=!1;i=e.currentid===r;var o=e;return t("div",[t("Radio",{props:{value:i},on:{"on-change":function(){o.currentid=r,e.productRow=a.row}}})])}},a={type:"selection",width:60,align:"center"};this.luckDraw?this.columns.unshift(t):this.columns.unshift(a)},methods:{unique:function(e){var t=new Map;return e.filter((function(e){return!t.has(e.id)&&t.set(e.id,1)}))},handleSelectAll:function(e){var t=this;if(0===e.length){var a=this,r=a.$refs.table.data;r.forEach((function(e){if(a.selectedIds.has(e.id)){a.selectedIds.delete(e.id);var t=a.unique(Array.from(a.selectedNames));a.unique(Array.from(a.selectedNames)).forEach((function(a,r){a.id===e.id&&t.splice(r,1)})),a.selectedNames=new Set(t)}}))}else e.forEach((function(e){t.selectedIds.add(e.id),t.selectedNames.add({id:e.id,title:e.title})}));this.$nextTick((function(){t.setChecked()}))},handleSelectRow:function(e,t){var a=this;this.selectedIds.add(t.id),this.selectedNames.add({id:t.id,title:t.title}),this.$nextTick((function(){a.setChecked()}))},handleCancelRow:function(e,t){var a=this,r=this;r.selectedIds.delete(t.id);var i=Array.from(r.selectedNames);Array.from(r.selectedNames).forEach((function(e,a){e.id===t.id&&i.splice(a,1)})),r.selectedNames=new Set(i),this.$nextTick((function(){a.setChecked()}))},setChecked:function(){this.ids=Object(o["a"])(this.selectedIds),this.texts=Object(o["a"])(this.selectedNames);var e=this.$refs.table.objData;for(var t in e)this.selectedIds.has(e[t].id)&&(e[t]._isChecked=!0)},cancel:function(){this.isTemplate=!1,this.luckDraw&&(this.currentid=0)},tableList:function(){var e=this;this.loading=!0,Object(s["X"])(this.tableFrom).then((function(t){var a=t.data;e.couponList=a.list,e.$nextTick((function(){e.setChecked()})),e.total=a.count,e.loading=!1}))},ok:function(){this.luckDraw?(this.$emit("getCouponId",this.productRow),this.currentid=0):this.$emit("nameId",this.ids,this.texts)},receivePageChange:function(e){this.tableFrom.page=e,this.tableList()}}},c=l,d=a("2877"),_=Object(d["a"])(c,r,i,!1,null,"5422f074",null);t["a"]=_.exports},e90a:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("div",{staticClass:"i-layout-page-header header_top"},[r("div",{staticClass:"i-layout-page-header fl_header"},[r("span",{staticClass:"ivu-page-header-title mr20",staticStyle:{padding:"0"},domProps:{textContent:e._s(e.$route.params.id?"编辑抽奖信息":"添加抽奖信息")}})])]),r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("div",[r("Tabs",{on:{"on-click":e.onClickTab},model:{value:e.formValidate.factor,callback:function(t){e.$set(e.formValidate,"factor",t)},expression:"formValidate.factor"}},e._l(e.tabs,(function(e,t){return r("TabPane",{attrs:{label:e.name,name:e.type}})})),1)],1),r("Row",{staticClass:"mt30 acea-row row-middle row-center",attrs:{type:"flex"}},[r("Col",{attrs:{span:"23"}},[r("Form",{ref:"formValidate",staticClass:"form mt30",attrs:{rules:e.ruleValidate,model:e.formValidate,"label-width":e.labelWidth,"label-position":e.labelPosition},on:{"on-validate":e.validate},nativeOn:{submit:function(e){e.preventDefault()}}},[r("Row",{attrs:{type:"flex"}},[r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"活动名称:",prop:"name","label-for":"name"}},[r("Input",{staticClass:"perW30",attrs:{placeholder:"请输入活动名称","element-id":"name"},model:{value:e.formValidate.name,callback:function(t){e.$set(e.formValidate,"name",t)},expression:"formValidate.name"}})],1)],1),r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"活动时间:"}},[r("div",{staticClass:"acea-row row-middle"},[r("DatePicker",{staticClass:"perW30",attrs:{editable:!1,type:"datetimerange",format:"yyyy-MM-dd HH:mm",placeholder:"请选择活动时间"},on:{"on-change":e.onchangeTime},model:{value:e.formValidate.period,callback:function(t){e.$set(e.formValidate,"period",t)},expression:"formValidate.period"}})],1)])],1),r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"参与用户:",prop:"attends_user","label-for":"attends_user"}},[r("RadioGroup",{attrs:{"element-id":"attends_user"},on:{"on-change":e.changeUsers},model:{value:e.formValidate.attends_user,callback:function(t){e.$set(e.formValidate,"attends_user",t)},expression:"formValidate.attends_user"}},[r("Radio",{staticClass:"radio",attrs:{label:1}},[e._v("全部用户")]),r("Radio",{attrs:{label:2}},[e._v("部分用户")])],1)],1)],1),2==e.formValidate.attends_user?r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"",prop:2==e.formValidate.attends_user?"user_level":""}},[r("div",{staticClass:"acea-row row-middle"},[r("Select",{staticClass:"perW30",attrs:{multiple:"",placeholder:"请选择用户等级"},model:{value:e.formValidate.user_level,callback:function(t){e.$set(e.formValidate,"user_level",t)},expression:"formValidate.user_level"}},e._l(e.userLevelListApi,(function(t){return r("Option",{key:t.id,attrs:{value:t.id}},[e._v(e._s(t.name))])})),1)],1)])],1):e._e(),2==e.formValidate.attends_user?r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"",prop:2==e.formValidate.attends_user?"is_svip":""}},[r("div",{staticClass:"acea-row row-middle"},[r("Select",{staticClass:"perW30",attrs:{clearable:"",placeholder:"请选择是否是付费会员"},model:{value:e.formValidate.is_svip,callback:function(t){e.$set(e.formValidate,"is_svip",t)},expression:"formValidate.is_svip"}},e._l(e.templateList,(function(t){return r("Option",{key:t.id,attrs:{value:t.id}},[e._v(e._s(t.name))])})),1)],1)])],1):e._e(),2==e.formValidate.attends_user?r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"",prop:2==e.formValidate.attends_user?"user_label":""}},[r("div",{staticClass:"acea-row row-middle"},[r("div",{staticClass:"labelInput acea-row row-between-wrapper",on:{click:function(t){e.selectLabelShow=!0}}},[r("div",{},[e.selectDataLabel.length?r("div",e._l(e.selectDataLabel,(function(t,a){return r("Tag",{key:a,attrs:{closable:!1},on:{"on-close":function(a){return e.closeLabel(t)}}},[e._v(e._s(t.label_name))])})),1):r("span",{staticClass:"span"},[e._v("选择用户标签")])]),r("div",{staticClass:"ivu-icon ivu-icon-ios-arrow-down"})])]),r("div",{staticClass:"ml100 grey"},[e._v("\n 三个条件都设置后,必须这些条件都满足的用户才能参加抽奖\n ")])])],1):e._e(),5==e.formValidate.factor?r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"抽奖次数:",prop:5==e.formValidate.factor?"lottery_num_term":"","label-for":"status"}},[r("RadioGroup",{attrs:{"element-id":"lottery_num_term"},model:{value:e.formValidate.lottery_num_term,callback:function(t){e.$set(e.formValidate,"lottery_num_term",t)},expression:"formValidate.lottery_num_term"}},[r("Radio",{staticClass:"radio",attrs:{label:1}},[e._v("每天N次")]),r("Radio",{attrs:{label:2}},[e._v("每人N次")])],1)],1)],1):e._e(),5==e.formValidate.factor?r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"邀请新用户最多可获得抽奖",prop:5==e.formValidate.factor?"lottery_num":"","label-for":"lottery_num"}},[r("div",{staticClass:"acea-row row-middle"},[r("div",{staticClass:"mr10 grey"}),r("InputNumber",{staticClass:"perW20",attrs:{placeholder:"","element-id":"lottery_num",min:1,precision:0},model:{value:e.formValidate.lottery_num,callback:function(t){e.$set(e.formValidate,"lottery_num",t)},expression:"formValidate.lottery_num"}}),r("div",{staticClass:"ml10 grey"},[e._v("次")])],1)])],1):e._e(),5==e.formValidate.factor?r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"邀请一位新用户关注公众号可获得抽奖",prop:5==e.formValidate.factor?"spread_num":"","label-for":"spread_num"}},[r("div",{staticClass:"acea-row row-middle"},[r("div",{staticClass:"mr10 grey"}),r("InputNumber",{staticClass:"perW20",attrs:{placeholder:"","element-id":"spread_num",min:1,precision:0},model:{value:e.formValidate.spread_num,callback:function(t){e.$set(e.formValidate,"spread_num",t)},expression:"formValidate.spread_num"}}),r("div",{staticClass:"ml10 grey"},[e._v("次")])],1)])],1):e._e(),1==e.formValidate.factor||3==e.formValidate.factor||4==e.formValidate.factor?r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:1==e.formValidate.factor?"抽奖消耗积分:":"抽奖次数:",prop:1==e.formValidate.factor||3==e.formValidate.factor||4==e.formValidate.factor?"factor_num":"","label-for":"factor_num"}},[r("div",{staticClass:"acea-row row-middle"},[r("div",{staticClass:"mr10 grey"}),r("InputNumber",{staticClass:"perW20",attrs:{placeholder:"","element-id":"factor_num",min:1,precision:0},model:{value:e.formValidate.factor_num,callback:function(t){e.$set(e.formValidate,"factor_num",t)},expression:"formValidate.factor_num"}}),1!==e.formValidate.factor?r("div",{staticClass:"ml10 grey"},[e._v("\n 次\n ")]):e._e()],1)])],1):e._e()],1),r("Row",[r("Col",{attrs:{span:"24"}},[r("FormItem",{attrs:{label:"规格选择:",prop:"prize"}},[r("Table",{attrs:{data:e.specsData,columns:e.columns,border:"",draggable:!0},on:{"on-drag-drop":e.onDragDrop},scopedSlots:e._u([{key:"image",fn:function(t){var a=t.row,i=t.index;return[r("div",{staticClass:"acea-row row-middle row-center-wrapper",on:{click:function(t){return e.modalPicTap("dan","goods",i)}}},[a.image?r("div",{staticClass:"pictrue pictrueTab"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:a.image,expression:"row.image"}]})]):r("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[r("Icon",{staticClass:"iconfonts",attrs:{type:"ios-camera-outline",size:"21"}})],1)])]}},{key:"total",fn:function(t){var a=t.row,i=t.index;return[r("InputNumber",{staticClass:"priceBox",attrs:{max:99999,min:0,precision:0},on:{"on-change":function(t){e.changeTotal(t,i)}},model:{value:a.total,callback:function(t){e.$set(a,"total",t)},expression:"row.total"}})]}},{key:"chance",fn:function(t){var a=t.row,i=t.index;return[r("InputNumber",{staticClass:"priceBox",attrs:{max:100,min:1,precision:0},on:{"on-change":function(t){e.changeChance(t,i)}},model:{value:a.chance,callback:function(t){e.$set(a,"chance",t)},expression:"row.chance"}})]}},{key:"type",fn:function(t){var a=t.row;t.index;return[r("div",[e._v(e._s(e._f("typeName")(a.type)))])]}},{key:"setting",fn:function(t){t.row;var a=t.index;return[r("Button",{staticClass:"submission mr15",on:{click:function(t){return e.editGoods(a)}}},[e._v("编辑")])]}}])}),e.specsData.length<8?r("Button",{staticClass:"submission mr15 mt20",attrs:{type:"primary"},on:{click:e.addGoods}},[e._v("添加商品")]):e._e()],1),r("FormItem",[r("div",{staticClass:"pl60 grey"},[e._v("\n 奖品必须设置为8个,列表中拖拽可调整奖品在九宫中的位置\n "),r("Poptip",{attrs:{placement:"bottom",width:"380"}},[r("a",[e._v("查看位置示例图")]),r("div",{staticClass:"api",attrs:{slot:"content"},slot:"content"},[r("img",{attrs:{src:a("b0c0"),alt:""}})])])],1)])],1)],1),r("div",[3!=e.formValidate.factor&&4!=e.formValidate.factor?r("FormItem",{attrs:{prop:3!=e.formValidate.factor&&4!=e.formValidate.factor?"image":""}},[r("div",{staticClass:"custom-label",attrs:{slot:"label"},slot:"label"},[r("div",[r("div",[e._v("活动背景图")]),r("div",[e._v("(750*750)")])]),r("div",[e._v(":")])]),r("div",{staticClass:"acea-row"},[e.formValidate.image?r("div",{staticClass:"pictrue"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.formValidate.image,expression:"formValidate.image"}]}),r("Button",{staticClass:"btndel",attrs:{shape:"circle",icon:"md-close"},nativeOn:{click:function(t){return e.handleRemove()}}})],1):r("div",{staticClass:"upLoad acea-row row-center-wrapper",on:{click:function(t){return e.modalPicTap("dan","danFrom")}}},[r("Icon",{staticClass:"iconfonts",attrs:{type:"ios-camera-outline",size:"26"}})],1)])]):e._e(),3!=e.formValidate.factor&&4!=e.formValidate.factor?r("FormItem",{attrs:{label:"中奖名单:",prop:3!=e.formValidate.factor&&4!=e.formValidate.factor?"is_all_record":"","label-for":"is_all_record"}},[r("RadioGroup",{attrs:{"element-id":"is_all_record"},model:{value:e.formValidate.is_all_record,callback:function(t){e.$set(e.formValidate,"is_all_record",t)},expression:"formValidate.is_all_record"}},[r("Radio",{attrs:{label:0}},[e._v("关闭")]),r("Radio",{staticClass:"radio",attrs:{label:1}},[e._v("开启")])],1)],1):e._e(),3!=e.formValidate.factor&&4!=e.formValidate.factor?r("FormItem",{attrs:{label:"个人中奖记录:",prop:3!=e.formValidate.factor&&4!=e.formValidate.factor?"is_personal_record":"","label-for":"is_personal_record"}},[r("RadioGroup",{attrs:{"element-id":"is_personal_record"},model:{value:e.formValidate.is_personal_record,callback:function(t){e.$set(e.formValidate,"is_personal_record",t)},expression:"formValidate.is_personal_record"}},[r("Radio",{attrs:{label:0}},[e._v("关闭")]),r("Radio",{staticClass:"radio",attrs:{label:1}},[e._v("开启")])],1)],1):e._e(),3!=e.formValidate.factor&&4!=e.formValidate.factor?r("FormItem",{attrs:{label:"活动规则:",prop:"is_content","label-for":"is_content"}},[r("RadioGroup",{attrs:{"element-id":"is_content"},model:{value:e.formValidate.is_content,callback:function(t){e.$set(e.formValidate,"is_content",t)},expression:"formValidate.is_content"}},[r("Radio",{attrs:{label:0}},[e._v("关闭")]),r("Radio",{staticClass:"radio",attrs:{label:1}},[e._v("开启")])],1)],1):e._e(),r("FormItem",{directives:[{name:"show",rawName:"v-show",value:3!=e.formValidate.factor&&4!=e.formValidate.factor&&1==e.formValidate.is_content,expression:"\n formValidate.factor != 3 &&\n formValidate.factor != 4 &&\n formValidate.is_content == 1\n "}],attrs:{label:"",prop:3!=e.formValidate.factor&&4!=e.formValidate.factor&&1==e.formValidate.is_content?"content":""}},[r("WangEditor",{staticStyle:{width:"90%"},attrs:{content:e.formValidate.content},on:{editorContent:e.getEditorContent}})],1),r("FormItem",{attrs:{label:"活动状态:",prop:"status","label-for":"status"}},[r("RadioGroup",{attrs:{"element-id":"status"},model:{value:e.formValidate.status,callback:function(t){e.$set(e.formValidate,"status",t)},expression:"formValidate.status"}},[r("Radio",{attrs:{label:0}},[e._v("关闭")]),r("Radio",{staticClass:"radio",attrs:{label:1}},[e._v("开启")])],1)],1)],1),r("FormItem",[r("Button",{staticClass:"submission",attrs:{type:"primary",loading:e.submitOpen},on:{click:function(t){return e.next("formValidate")}}},[e.submitOpen?r("div",[e._v("提交中")]):r("div",[e._v("提交")])])],1),e.spinShow?r("Spin",{attrs:{size:"large",fix:""}}):e._e()],1)],1)],1)],1),r("Modal",{attrs:{width:"950px",scrollable:"","footer-hide":"",closable:"",title:"上传商品图","mask-closable":!1,"z-index":1},model:{value:e.modalPic,callback:function(t){e.modalPic=t},expression:"modalPic"}},[e.modalPic?r("uploadPictures",{attrs:{isChoice:e.isChoice},on:{getPic:e.getPic}}):e._e()],1),r("Modal",{attrs:{width:"60%",scrollable:"","footer-hide":"",closable:"",title:e.title,"mask-closable":!1,"z-index":1},model:{value:e.addGoodsModel,callback:function(t){e.addGoodsModel=t},expression:"addGoodsModel"}},[e.addGoodsModel?r("addGoods",{attrs:{editData:e.editData},on:{addGoodsData:e.addGoodsData}}):e._e()],1),r("Modal",{attrs:{scrollable:"",title:"请选择用户标签",closable:!1,width:"500","footer-hide":!0,"mask-closable":!1},model:{value:e.selectLabelShow,callback:function(t){e.selectLabelShow=t},expression:"selectLabelShow"}},[e.selectLabelShow?r("userLabel",{ref:"userLabel",attrs:{uid:0,only_get:!0,selectDataLabel:e.selectDataLabel},on:{activeData:e.activeSelectData,close:e.labelClose}}):e._e()],1)],1)},i=[],o=a("2880"),s=o["a"],n=(a("bbea"),a("2877")),l=Object(n["a"])(s,r,i,!1,null,"6fb5cc66",null);t["default"]=l.exports},eab1:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("Form",{ref:"formValidate",attrs:{model:e.formValidate,rules:e.ruleValidate,"label-width":90}},[a("FormItem",{attrs:{label:"奖品",prop:"type"}},[a("RadioGroup",{model:{value:e.formValidate.type,callback:function(t){e.$set(e.formValidate,"type",t)},expression:"formValidate.type"}},[a("Radio",{attrs:{label:1}},[e._v("未中奖")]),a("Radio",{attrs:{label:5}},[e._v("优惠券")]),a("Radio",{attrs:{label:2}},[e._v("积分")]),a("Radio",{attrs:{label:6}},[e._v("商品")]),a("Radio",{attrs:{label:4}},[e._v("红包")]),a("Radio",{attrs:{label:3}},[e._v("余额")])],1)],1),5==e.formValidate.type?a("FormItem",{attrs:{label:"赠送优惠券:"}},[e.couponName.length?a("div",{staticClass:"mb20"},e._l(e.couponName,(function(t,r){return a("Tag",{key:r,attrs:{closable:""},on:{"on-close":function(a){return e.handleClose(t)}}},[e._v(e._s(t.title))])})),1):e._e(),e.couponName.length?e._e():a("Button",{attrs:{type:"primary"},on:{click:e.addCoupon}},[e._v("添加优惠券")])],1):e._e(),[2,3,4].includes(e.formValidate.type)?a("FormItem",{attrs:{label:[3,4].includes(e.formValidate.type)?"金额信息":"积分数量",prop:"num"}},[a("InputNumber",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入金额数量",max:4==e.formValidate.type?999:99999,min:1},model:{value:e.formValidate.num,callback:function(t){e.$set(e.formValidate,"num",t)},expression:"formValidate.num"}}),a("div",{staticClass:"ml100 grey"},[e._v("\n "+e._s(3==e.formValidate.type?"用户领取余额后会自动到账余额账户":4==e.formValidate.type?"用户领取红包后会自动到账微信零钱,添加此奖品需开通微信支付,并且账户中金额不能小于1元":"")+"\n ")])],1):e._e(),6==e.formValidate.type?a("FormItem",{attrs:{label:"商品",prop:"goods_image"}},[e.formValidate.goods_image?[a("div",{staticClass:"upload-list"},[a("img",{attrs:{src:e.formValidate.goods_image}}),a("Icon",{attrs:{type:"ios-close-circle",size:"16"},on:{click:function(t){return e.removeGoods()}}})],1)]:a("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[a("Icon",{attrs:{type:"ios-camera-outline",size:"26"},on:{click:function(t){e.modals=!0}}})],1)],2):e._e(),a("FormItem",{attrs:{label:"奖品名称",prop:"name"}},[a("Input",{staticStyle:{width:"300px"},attrs:{maxlength:10,placeholder:"请输入奖品名称"},model:{value:e.formValidate.name,callback:function(t){e.$set(e.formValidate,"name",t)},expression:"formValidate.name"}})],1),a("FormItem",{attrs:{label:"奖品图片",prop:"image"}},[e.formValidate.image?[a("div",{staticClass:"upload-list"},[a("img",{attrs:{src:e.formValidate.image}}),a("Icon",{attrs:{type:"ios-close-circle",size:"16"},on:{click:function(t){return e.remove()}}})],1)]:a("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[a("Icon",{attrs:{type:"ios-camera-outline",size:"26"},on:{click:function(t){e.modalPic=!0}}})],1)],2),a("FormItem",{attrs:{label:"奖品数量",prop:"total"}},[a("InputNumber",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入奖品数量",max:99999,min:0,precision:0},model:{value:e.formValidate.total,callback:function(t){e.$set(e.formValidate,"total",t)},expression:"formValidate.total"}})],1),a("FormItem",{attrs:{label:"奖品权重",prop:"chance"}},[a("InputNumber",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入奖品权重",max:100,min:1,precision:0},model:{value:e.formValidate.chance,callback:function(t){e.$set(e.formValidate,"chance",t)},expression:"formValidate.chance"}})],1),a("FormItem",{attrs:{label:"提示语",prop:"prompt"}},[a("Input",{staticStyle:{width:"300px"},attrs:{maxlength:15,placeholder:"请输入提示语"},model:{value:e.formValidate.prompt,callback:function(t){e.$set(e.formValidate,"prompt",t)},expression:"formValidate.prompt"}})],1),a("FormItem",[a("Button",{attrs:{type:"primary"},on:{click:function(t){return e.handleSubmit("formValidate")}}},[e._v("提交")])],1)],1),a("Modal",{attrs:{width:"950px",scrollable:"","footer-hide":"",closable:"",title:"上传图片","mask-closable":!1,"z-index":1},model:{value:e.modalPic,callback:function(t){e.modalPic=t},expression:"modalPic"}},[e.modalPic?a("uploadPictures",{attrs:{isChoice:e.isChoice},on:{getPic:e.getPic}}):e._e()],1),a("Modal",{staticClass:"paymentFooter",attrs:{title:"商品列表",footerHide:"",scrollable:"",width:"900"},on:{"on-cancel":e.cancel},model:{value:e.modals,callback:function(t){e.modals=t},expression:"modals"}},[e.modals?a("goods-list",{ref:"goodslist",on:{getProductId:e.getProductId}}):e._e()],1),a("coupon-list",{ref:"couponTemplates",attrs:{luckDraw:!0},on:{getCouponId:e.getCouponId}})],1)},i=[],o=(a("5df3"),a("f400"),a("7f7f"),a("ac6a"),a("456d"),a("e449")),s=a("b0e7"),n=a("c4ad"),l=a("5334"),c={components:{uploadPictures:s["a"],goodsList:n["default"],freightTemplate:l["a"],couponList:o["a"]},data:function(){return{modalPic:!1,modals:!1,isChoice:"单选",updateIds:[],updateName:[],goodsData:{pic:"",product_id:"",img:"",coverImg:""},formValidate:{type:5,name:"",num:0,image:"",chance:1,product_id:0,coupon_id:0,total:0,prompt:"",goods_image:"",coupon_title:""},ruleValidate:{name:[{required:!0,message:"商品名称",trigger:"blur"}],goods_image:[{required:!0,message:"请添加商品",trigger:"blur"}],num:[{required:!0,type:"number",message:"请输入金额数量",trigger:"blur"}],chance:[{required:!0,type:"number",message:"请输入商品权重",trigger:"blur"}],image:[{required:!0,message:"请选择奖品图片",trigger:"blur"}],prompt:[{required:!0,message:"请输入提示语",trigger:"blur"}]},couponName:[]}},props:{editData:{type:Object,default:function(){}}},watch:{editData:function(e){}},mounted:function(){var e=this,t=Object.keys(this.editData);t.forEach((function(t){e.formValidate[t]=e.editData[t],"coupon_title"===t&&e.couponName.push({title:e.editData[t],id:e.editData.coupon_id})}))},methods:{getCouponId:function(e){this.formValidate.coupon_id=e.id,this.formValidate.coupon_title=e.coupon_title;var t=[];t.push(e),this.couponName=t},handleSubmit:function(e){var t=this;this.$refs[e].validate((function(e){e?(t.$emit("addGoodsData",t.formValidate),t.$Message.success("添加成功")):t.$Message.warning("请完善数据")}))},getPic:function(e){this.formValidate.image=e.att_dir,this.modalPic=!1},modalPicTap:function(){this.modalPic=!0},cancel:function(){this.modals=!1},getProductId:function(e){this.formValidate.product_id=e.id,this.formValidate.goods_image=e.image,this.modals=!1},removeGoods:function(){this.formValidate.product_id="",this.formValidate.goods_image=""},remove:function(){this.formValidate.image=""},addCoupon:function(){this.$refs.couponTemplates.isTemplate=!0,this.$refs.couponTemplates.tableList()},handleClose:function(e){this.couponName.splice(0,1),this.formValidate.coupon_id=0},unique:function(e){var t=new Map;return e.filter((function(e){return!t.has(e.id)&&t.set(e.id,1)}))}}},d=c,_=(a("c389"),a("2877")),u=Object(_["a"])(d,r,i,!1,null,"8e41149c",null);t["a"]=u.exports},f5a7:function(e,t,a){"use strict";var r=a("5f6c"),i=a.n(r);i.a}}]); |