徐总多门店
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
68 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-647372fa"],{"0d3e":function(t,e,r){"use strict";function a(t){var e=t.replace(/<img[^>]*>/gi,(function(t,e){return(t=(t=t.replace(/style="[^"]+"/gi,"").replace(/style='[^']+'/gi,"")).replace(/width="[^"]+"/gi,"").replace(/width='[^']+'/gi,"")).replace(/height="[^"]+"/gi,"").replace(/height='[^']+'/gi,"")}));return(e=e.replace(/style="[^"]+"/gi,(function(t,e){return t.replace(/width:[^;]+;/gi,"max-width:100%;").replace(/width:[^;]+;/gi,"max-width:100%;")}))).replace(/\<img/gi,'<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"')}r.d(e,"a",(function(){return a}))},"0f0e":function(t,e,r){"use strict";var a=r("c4c8"),n={name:"userLabel",props:{},data:function(){return{labelList:[],dataLabel:[],isUser:!1}},mounted:function(){},methods:{inArray:function(t,e){for(var r in e)if(e[r].id===t)return!0;return!1},userLabel:function(t){var e=this;this.dataLabel=t,Object(a.ob)().then((function(t){t.data.map((function(t){t.children&&t.children.length&&(e.isUser=!0,t.children.map((function(t){e.inArray(t.id,e.dataLabel)?t.disabled=!0:t.disabled=!1})))})),e.labelList=t.data})).catch((function(t){e.$Message.error(t.msg)}))},selectLabel:function(t){if(t.disabled){var e=this.dataLabel.indexOf(this.dataLabel.filter((function(e){return e.id===t.id}))[0]);this.dataLabel.splice(e,1),t.disabled=!1}else this.dataLabel.push({label_name:t.label_name,id:t.id,tag_id:t.tag_id}),t.disabled=!0},subBtn:function(){this.$emit("activeData",JSON.parse(JSON.stringify(this.dataLabel)))},cancel:function(){this.$emit("close")}}},o=(r("a405"),r("2877")),i=Object(o.a)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"label-wrapper"},[e("div",{staticClass:"list-box"},[t._l(t.labelList,(function(r,a){return t.isUser?e("div",{key:a,staticClass:"label-box"},[r.children&&r.children.length?e("div",{staticClass:"title"},[t._v("\n "+t._s(r.label_name)+"\n ")]):t._e(),r.children&&r.children.length?e("div",{staticClass:"list"},t._l(r.children,(function(r,a){return e("div",{key:a,staticClass:"label-item",class:{on:r.disabled},on:{click:function(e){return t.selectLabel(r)}}},[t._v("\n "+t._s(r.label_name)+"\n ")])})),0):t._e()]):t._e()})),t.isUser?t._e():e("div",[t._v("暂无标签")])],2),e("div",{staticClass:"footer"},[e("Button",{staticClass:"btns",attrs:{type:"primary"},on:{click:t.subBtn}},[t._v("确定")]),e("Button",{staticClass:"btns",attrs:{type:"primary",ghost:""},on:{click:t.cancel}},[t._v("取消")])],1)])}),[],!1,null,"ea2c8f16",null);e.a=i.exports},1184:function(t,e,r){"use strict";r.d(e,"d",(function(){return n})),r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return s})),r.d(e,"f",(function(){return l})),r.d(e,"g",(function(){return c})),r.d(e,"e",(function(){return u}));var a=r("b6bd");function n(t){return Object(a.a)({url:"lottery/list",method:"get",params:t})}function o(t){return Object(a.a)({url:"lottery/add",method:"post",data:t})}function i(t,e){return Object(a.a)({url:"lottery/edit/".concat(t),method:"put",data:e})}function s(t){return Object(a.a)({url:"lottery/factor_info/".concat(t),method:"get"})}function l(t){return Object(a.a)({url:"lottery/set_status/".concat(t.id,"/").concat(t.status),method:"post"})}function c(t){return Object(a.a)({url:"lottery/record/list",method:"get",params:t})}function u(t){return Object(a.a)({url:"lottery/record/deliver",method:"post",data:t})}},"340c":function(module,__webpack_exports__,__webpack_require__){"use strict";var _setting__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("d708"),vuex__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("2f62"),_components_goodsList_index__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("c4ad"),_components_uploadPictures__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("b0e7"),_components_labelList__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("0f0e"),_addGoods__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("eab1"),_api_lottery__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("1184"),_formRule_lotteryFrom__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("d1cc"),_api_product__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("c4c8"),_api_user__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("c24f"),_components_wangEditor_index_vue__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("a069"),_utils_validate__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("61f7"),_utils_editorImg__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("0d3e");function _typeof(t){return(_typeof="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 _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){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 _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(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)?_arrayLikeToArray(t,e):void 0}}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r<e;r++)a[r]=t[r];return a}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){return e};var t,e={},r=Object.prototype,a=r.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,a){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),s=new D(a||[]);return n(i,"_invoke",{value:k(t,r,s)}),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var m="suspendedStart",f="suspendedYield",p="executing",_="completed",h={};function b(){}function g(){}function v(){}var y={};c(y,i,(function(){return this}));var w=Object.getPrototypeOf,V=w&&w(w(L([])));V&&V!==r&&a.call(V,i)&&(y=V);var O=v.prototype=b.prototype=Object.create(y);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(n,o,i,s){var l=d(t[n],t,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==_typeof(u)&&a.call(u,"__await")?e.resolve(u.__await).then((function(t){r("next",t,i,s)}),(function(t){r("throw",t,i,s)})):e.resolve(u).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,s)}))}s(l.arg)}var o;n(this,"_invoke",{value:function(t,a){function n(){return new e((function(e,n){r(t,a,e,n)}))}return o=o?o.then(n,n):n()}})}function k(e,r,a){var n=m;return function(o,i){if(n===p)throw Error("Generator is already running");if(n===_){if("throw"===o)throw i;return{value:t,done:!0}}for(a.method=o,a.arg=i;;){var s=a.delegate;if(s){var l=P(s,a);if(l){if(l===h)continue;return l}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(n===m)throw n=_,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n=p;var c=d(e,r,a);if("normal"===c.type){if(n=a.done?_:f,c.arg===h)continue;return{value:c.arg,done:a.done}}"throw"===c.type&&(n=_,a.method="throw",a.arg=c.arg)}}}function P(e,r){var a=r.method,n=e.iterator[a];if(n===t)return r.delegate=null,"throw"===a&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),h;var o=d(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function r(){for(;++n<e.length;)if(a.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(_typeof(e)+" is not iterable")}return g.prototype=v,n(O,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:g,configurable:!0}),g.displayName=c(v,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,l,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},C(x.prototype),c(x.prototype,s,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,a,n,o){void 0===o&&(o=Promise);var i=new x(u(t,r,a,n),o);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},C(O),c(O,l,"Generator"),c(O,i,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var a in e)r.push(a);return r.reverse(),function t(){for(;r.length;){var a=r.pop();if(a in e)return t.value=a,t.done=!1,t}return t.done=!0,t}},e.values=L,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(a,n){return s.type="throw",s.arg=e,r.next=a,n&&(r.method="next",r.arg=t),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var a=r.completion;if("throw"===a.type){var n=a.arg;I(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(e,r,a){return this.delegate={iterator:L(e),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=t),h}},e}function asyncGeneratorStep(t,e,r,a,n,o,i){try{var s=t[o](i),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(a,n)}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(a,n){var o=t.apply(e,r);function i(t){asyncGeneratorStep(o,a,n,i,s,"next",t)}function s(t){asyncGeneratorStep(o,a,n,i,s,"throw",t)}i(void 0)}))}}function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach((function(e){_defineProperty(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _defineProperty(t,e,r){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var a=r.call(t,e||"default");if("object"!=_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}__webpack_exports__.a={name:"lotteryCreate",components:{goodsList:_components_goodsList_index__WEBPACK_IMPORTED_MODULE_2__.default,uploadPictures:_components_uploadPictures__WEBPACK_IMPORTED_MODULE_3__.a,WangEditor:_components_wangEditor_index_vue__WEBPACK_IMPORTED_MODULE_10__.a,addGoods:_addGoods__WEBPACK_IMPORTED_MODULE_5__.a,userLabel:_components_labelList__WEBPACK_IMPORTED_MODULE_4__.a},data:function(){var t=this;return Object.keys(_formRule_lotteryFrom__WEBPACK_IMPORTED_MODULE_7__.a).forEach((function(e){"total_lottery_num"===e&&(_formRule_lotteryFrom__WEBPACK_IMPORTED_MODULE_7__.a[e][0].validator=function(e,r,a){if(r<t.formValidate.lottery_num)return a(new Error("总次数不能小于每天抽奖次数"));a()})})),{baseURL:_setting__WEBPACK_IMPORTED_MODULE_0__.a.apiBaseURL.replace(/adminapi/,""),dataLabel:[],labelShow:!1,headTab:[{name:"积分抽奖",type:"1"},{name:"订单支付",type:"3"},{name:"订单评价",type:"4"},{name:"关注公众号",type:"5"}],title:"添加商品",loading:!1,userLabelList:[],userLevelListApi:[],submitOpen:!1,spinShow:!1,addGoodsModel:!1,editData:{},isChoice:"单选",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:[],formValidate:{images:[],name:"",desc:"",image:"",factor:"1",factor_num:1,attends_user:1,user_level:0,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,total_lottery_num:1,type:1},ruleValidate:_formRule_lotteryFrom__WEBPACK_IMPORTED_MODULE_7__.a,currentid:"",picTit:"",tableIndex:0,copy:0,editIndex:null,id:"",isData:0,content:""}},filters:{typeName:function(t){return 1==t?"未中奖":2==t?"积分":3==t?"余额":4==t?"红包":5==t?"优惠券":6==t?"商品":void 0}},computed:_objectSpread(_objectSpread({},Object(vuex__WEBPACK_IMPORTED_MODULE_1__.e)("admin/layout",["isMobile","menuCollapse"])),{},{labelWidth:function(){return this.isMobile?void 0:135},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){this.prizeList(),this.getInfo(),this.labelListApi(),this.levelListApi(),this.setCopyrightShow({value:!1})},destroyed:function(){this.setCopyrightShow({value:!0})},methods:_objectSpread(_objectSpread({},Object(vuex__WEBPACK_IMPORTED_MODULE_1__.d)("admin/layout",["setCopyrightShow"])),{},{prizeList:function(){for(var t=[],e={type:1,name:"",num:0,image:"",chance:1,total:0,prompt:""},r=0;r<8;r++)t.push(e);this.specsData=JSON.parse(JSON.stringify(t))},getEditorContent:function(t){this.content=t},closeLabel:function(t){var e=this.dataLabel.indexOf(this.dataLabel.filter((function(e){return e.id==t.id}))[0]);this.dataLabel.splice(e,1)},activeData:function(t){this.labelShow=!1,this.dataLabel=t},openLabel:function(t){this.labelShow=!0,this.$refs.userLabel.userLabel(JSON.parse(JSON.stringify(this.dataLabel)))},labelClose:function(){this.labelShow=!1},labelListApi:function(){var t=this;Object(_api_product__WEBPACK_IMPORTED_MODULE_8__.y)().then((function(e){t.userLabelList=e.data.list}))},levelListApi:function(){var t=this;Object(_api_user__WEBPACK_IMPORTED_MODULE_9__.s)().then((function(e){t.userLevelListApi=e.data.list}))},onchangeTime:function(t){var e=this;this.$nextTick((function(){e.$set(e.formValidate,"period",t)}))},lotteryType:function(){this.getInfo()},getInfo:function(){var t=this;this.spinShow=!0,Object(_api_lottery__WEBPACK_IMPORTED_MODULE_6__.c)(this.formValidate.factor).then((function(e){var r=t.formValidate.factor;if(t.spinShow=!1,t.isData=e.data.id||0,!t.isData)return t.prizeList(),void(t.formValidate={factor:r,images:[],name:"",desc:"",image:"",factor_num:1,attends_user:1,user_level:0,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.formValidate=e.data,t.formValidate.factor=e.data.factor.toString(),t.formValidate.user_level=e.data.user_level||[],t.formValidate.user_label=e.data.user_label||[],t.dataLabel=e.data.user_label||[],t.formValidate.is_svip=e.data.is_svip,t.content=e.data.is_content?e.data.content:"",t.formValidate.period=[t.formatDate(e.data.start_time)||"",t.formatDate(e.data.end_time)||""],t.specsData=e.data.prize,t.getProbability()}))},next:function(t){var e=this;if(this.formValidate.prize=this.specsData,this.formValidate.is_content&&(this.formValidate.content=Object(_utils_editorImg__WEBPACK_IMPORTED_MODULE_12__.a)(this.content)),this.submitOpen)return!1;this.$refs[t].validate((function(t){if(!t)return e.$Message.error("请完善信息");if(""==e.formValidate.period[0])return e.$Message.error("请选择日期");e.submitOpen=!0;var r=[];e.dataLabel.forEach((function(t){r.push(t.id)})),e.formValidate.user_label=r,e.isData?Object(_api_lottery__WEBPACK_IMPORTED_MODULE_6__.b)(e.isData,e.formValidate).then(function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function t(r){return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(r.msg),setTimeout((function(){e.submitOpen=!1}),500);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.submitOpen=!1,e.$Message.error(t.msg)})):Object(_api_lottery__WEBPACK_IMPORTED_MODULE_6__.a)(e.formValidate).then(function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function t(r){return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(r.msg),setTimeout((function(){e.submitOpen=!1}),500);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.submitOpen=!1,e.$Message.error(t.msg)}))}))},step:function(){this.current--},getContent:function(t){this.formValidate.content=t},getRole:function(t){this.formValidate.rule=t},modalPicTap:function(t,e,r){this.modalPic=!0,this.isChoice="dan"===t?"单选":"多选",this.picTit=e||"",this.tableIndex=r},getPic:function(t){switch(this.picTit){case"danFrom":this.formValidate.image=t.att_dir;break;default:this.specsData[this.tableIndex].image=t.att_dir}this.modalPic=!1},handleRemove:function(){this.formValidate.image=""},addCustomDialog:function(t){window.UE.registerUI("test-dialog",(function(t,e){var r=new window.UE.ui.Dialog({iframeUrl:"/admin/widget.images/index.html?fodder=dialog",editor:t,name:e,title:"上传图片",cssRules:"width:1200px;height:500px;padding:20px;"});return this.dialog=r,new window.UE.ui.Button({name:"dialog-button",title:"上传图片",cssRules:"background-image: url(../../../assets/images/icons.png);background-position: -726px -77px;",onclick:function(){r.render(),r.open()}})}),37)},addGoods:function(){this.addGoodsModel=!0,this.title="添加商品",this.editData={}},editGoods:function(t){this.addGoodsModel=!0,this.title="编辑奖品",this.editData=this.specsData[t],this.editIndex=t},deleteGoods:function(t){this.specsData.splice(t,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(t){null!=this.editIndex?this.$set(this.specsData,[this.editIndex],t):this.specsData.length<8?this.specsData.push(t):this.$Message.warning("最多添加8个奖品"),this.getProbability(),this.addGoodsModel=!1,this.editIndex=null},changeChance:function(t,e){var r=this;this.$set(this.specsData[e],"chance",t),this.$nextTick((function(t){r.getProbability()}))},changeTotal:function(t,e){this.$set(this.specsData[e],"total",t)},getProbability:function(){var t;t=this.sumArr(this.specsData,"chance");for(var e=0;e<this.specsData.length;e++)this.$set(this.specsData[e],"probability",(this.specsData[e].chance/t*100).toFixed(2)+"%")},onDragDrop:function(t,e){var r;(r=this.specsData).splice.apply(r,[e,1].concat(_toConsumableArray(this.specsData.splice(t,1,this.specsData[e]))))},formatDate:function(t){if(t){var e=new Date(1e3*t);return Object(_utils_validate__WEBPACK_IMPORTED_MODULE_11__.a)(e,"yyyy-MM-dd hh:mm")}return""}})}},"3dee":function(t,e,r){},"5ab1":function(t,e,r){},"61f7":function(t,e,r){"use strict";function a(t){return(a="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 n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function i(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==a(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 a in r)if(new RegExp("(".concat(a,")")).test(e)){var n=r[a]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?n:l(n))}return e}function l(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 m}));var c={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},u=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function d(t){return o({required:!0,message:t,type:"string"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function m(t){return f.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}u(d,"请输入%s"),u(m,"%s格式不正确");var f=Object.keys(c).reduce((function(t,e){return t[e]=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n="range"===e?{min:t[0],max:t[1]}:i({},e,t);return o(o({message:r.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},n),a)},u(t[e],c[e]),t}),{})},"819e":function(t,e,r){"use strict";r("3dee")},a405:function(t,e,r){"use strict";r("d5fd")},b0c0:function(t,e){t.exports="data:image/png;base64,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"},c24f:function(t,e,r){"use strict";r.d(e,"X",(function(){return n})),r.d(e,"N",(function(){return o})),r.d(e,"M",(function(){return i})),r.d(e,"k",(function(){return s})),r.d(e,"r",(function(){return l})),r.d(e,"d",(function(){return c})),r.d(e,"h",(function(){return u})),r.d(e,"g",(function(){return d})),r.d(e,"q",(function(){return m})),r.d(e,"s",(function(){return f})),r.d(e,"J",(function(){return p})),r.d(e,"P",(function(){return _})),r.d(e,"L",(function(){return h})),r.d(e,"K",(function(){return b})),r.d(e,"f",(function(){return g})),r.d(e,"e",(function(){return v})),r.d(e,"n",(function(){return y})),r.d(e,"R",(function(){return w})),r.d(e,"p",(function(){return V})),r.d(e,"Q",(function(){return O})),r.d(e,"cb",(function(){return C})),r.d(e,"U",(function(){return x})),r.d(e,"S",(function(){return k})),r.d(e,"T",(function(){return P})),r.d(e,"W",(function(){return j})),r.d(e,"V",(function(){return I})),r.d(e,"Y",(function(){return D})),r.d(e,"v",(function(){return L})),r.d(e,"w",(function(){return E})),r.d(e,"Z",(function(){return T})),r.d(e,"i",(function(){return S})),r.d(e,"bb",(function(){return M})),r.d(e,"C",(function(){return A})),r.d(e,"db",(function(){return W})),r.d(e,"m",(function(){return q})),r.d(e,"ab",(function(){return R})),r.d(e,"F",(function(){return U})),r.d(e,"B",(function(){return N})),r.d(e,"A",(function(){return F})),r.d(e,"z",(function(){return z})),r.d(e,"D",(function(){return K})),r.d(e,"y",(function(){return X})),r.d(e,"x",(function(){return G})),r.d(e,"u",(function(){return B})),r.d(e,"t",(function(){return $})),r.d(e,"o",(function(){return Z})),r.d(e,"l",(function(){return H})),r.d(e,"G",(function(){return J})),r.d(e,"I",(function(){return Q})),r.d(e,"eb",(function(){return Y})),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 at})),r.d(e,"fb",(function(){return nt})),r.d(e,"j",(function(){return ot})),r.d(e,"c",(function(){return it})),r.d(e,"H",(function(){return st}));var a=r("b6bd");function n(t){return Object(a.a)({url:"user/user",method:"get",params:t})}function o(t){return Object(a.a)({url:"setting/config/user/".concat(t),method:"get"})}function i(t,e){return Object(a.a)({url:"setting/config/user/".concat(t),method:"post",data:e})}function s(t){return Object(a.a)({url:"user/user/".concat(t,"/edit"),method:"get"})}function l(t){return Object(a.a)({url:"user/set_status/".concat(t.status,"/").concat(t.id),method:"put"})}function c(t){return Object(a.a)({url:"marketing/coupon/grant",method:"get",params:t})}function u(t){return Object(a.a)({url:"user/edit_other/".concat(t),method:"get"})}function d(t){return Object(a.a)({url:"user/user/".concat(t),method:"get"})}function m(t){return Object(a.a)({url:"user/one_info/".concat(t.id),method:"get",params:t.datas})}function f(t){return Object(a.a)({url:"user/user_level/vip_list",method:"get",params:t})}function p(t){return Object(a.a)({url:"user/user_level/set_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function _(t,e){return Object(a.a)({url:"user/user_level/task/".concat(t),method:"get",params:e})}function h(t){return Object(a.a)({url:"user/user_level/set_task_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function b(t){return Object(a.a)({url:"user/user_level/set_task_must/".concat(t.id,"/").concat(t.is_must),method:"PUT"})}function g(t){return Object(a.a)({url:"/user/user_level/create_task",method:"get",params:t})}function v(t){return Object(a.a)({url:"user/user_level/create",method:"get",params:t})}function y(t){return Object(a.a)({url:"user/give_level/".concat(t),method:"get"})}function w(t){return Object(a.a)({url:"user/user_group/list",method:"get",params:t})}function V(t){return Object(a.a)({url:"user/user_group/add/".concat(t),method:"get"})}function O(t){return Object(a.a)({url:"setting/update_admin",method:"PUT",data:t})}function C(t){return Object(a.a)({url:"user/set_group",method:"post",data:t})}function x(t){return Object(a.a)({url:"user/user_label",method:"get",params:t})}function k(t,e){return Object(a.a)({url:"user/user_label/add/".concat(t),method:"get",params:e})}function P(t){return Object(a.a)({url:"user/user_label_cate/all",method:"get",params:t})}function j(t){return Object(a.a)({url:"user/user_label_cate/".concat(t,"/edit"),method:"get"})}function I(t){return Object(a.a)({url:"user/user_label_cate/create",method:"get"})}function D(t){return Object(a.a)({url:"/user/member_batch/index",method:"get",params:t})}function L(t,e){return Object(a.a)({url:"/user/member_batch/save/".concat(t),method:"post",data:e})}function E(t,e){return Object(a.a)({url:"/user/member_batch/set_value/".concat(t),method:"get",params:e})}function T(t,e){return Object(a.a)({url:"/user/member_card/index/".concat(t),method:"get",params:e})}function S(t,e){return Object(a.a)({url:"/export/memberCard/".concat(t),method:"get",params:e})}function M(){return Object(a.a)({url:"/user/member/ship",method:"get"})}function A(t,e){return Object(a.a)({url:"/user/member_ship/save/".concat(t),method:"post",data:e})}function W(){return Object(a.a)({url:"/user/user/syncUsers",method:"get"})}function q(){return Object(a.a)({url:"/user/user/create",method:"get"})}function R(){return Object(a.a)({url:"/user/member_scan",method:"get"})}function U(t,e){return Object(a.a)({url:"user/label/".concat(t),method:"post",data:e})}function N(t){return Object(a.a)({url:"user/member_right/save/".concat(t.id),method:"post",data:t})}function F(){return Object(a.a)({url:"user/member/right",method:"get"})}function z(t){return Object(a.a)({url:"/user/member/record",method:"get",params:t})}function K(){return Object(a.a)({url:"user/member/ship_select",method:"get"})}function X(t){return Object(a.a)({url:"user/member_card/set_status",method:"get",params:t})}function G(t){return Object(a.a)({url:"user/member_ship/set_ship_status",method:"get",params:t})}function B(t,e){return Object(a.a)({url:"user/member_agreement/save/".concat(t),method:"post",data:e})}function $(){return Object(a.a)({url:"user/member/agreement",method:"get"})}function Z(t){return Object(a.a)({url:"user/give_level_time/".concat(t),method:"get"})}function H(t){return Object(a.a)({url:"user/label/".concat(t),method:"get"})}function J(t){return Object(a.a)({url:"user/save_set_label",method:"put",data:t})}function Q(t){return Object(a.a)({url:"setting/info",method:"get"})}function Y(t){return Object(a.a)({url:"user/visit_list/".concat(t.id),method:"get",params:t.datas})}function tt(t){return Object(a.a)({url:"user/spread_list/".concat(t.id),method:"get",params:t.datas})}function et(t){return Object(a.a)({url:"user/user/".concat(t.uid),method:"put",data:t})}function rt(t,e){return Object(a.a)({url:"agent/set_agent_agreement/".concat(t),method:"post",data:e})}function at(){return Object(a.a)({url:"agent/get_agent_agreement",method:"get"})}function nt(){return Object(a.a)({url:"user/synchro/work/label",method:"get"})}function ot(t){return Object(a.a)({url:"user/user/extend_info/".concat(t),method:"get"})}function it(t){return Object(a.a)({url:"user/batch_process",method:"post",data:t})}function st(t,e){return Object(a.a)({url:"/user/member/save/content/".concat(t),method:"post",data:e})}},d111:function(t,e,r){"use strict";r("5ab1")},d1cc:function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var a={name:[{required:!0,message:"请输入活动名称",trigger:"blur"}],factor:[{required:!0,type:"number",message:"请选择活动类型",trigger:"change"}],type:[{required:!0,type:"number",message:"请选择抽奖类型",trigger:"change"}],attends_user:[{required:!0,type:"number",message:"请选择参与用户",trigger:"change"}],period:[{required:!0,validator:function(t,e,r){if(Array.isArray(e))e.map((function(t){if(""===t)return r("日期不能为空")}));else if(""===e)return r("日期不能为空");return r()},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"}],total_lottery_num:[{required:!0,type:"number",trigger:"blur"}]}},d5fd:function(t,e,r){},e449:function(t,e,r){"use strict";var a=r("b7be"),n=r("61f7");function o(t){return function(t){if(Array.isArray(t))return i(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 i(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)?i(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 i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r<e;r++)a[r]=t[r];return a}var s={name:"index",filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(n.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 a=r.row.id,n=!1;n=t.currentid===a;var o=t;return e("div",[e("Radio",{props:{value:n},on:{"on-change":function(){o.currentid=a,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,a){r.id===t.id&&e.splice(a,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 a=Array.from(this.selectedNames);Array.from(this.selectedNames).forEach((function(t,r){t.id===e.id&&a.splice(r,1)})),this.selectedNames=new Set(a),this.$nextTick((function(){r.setChecked()}))}},setChecked:function(){this.ids=o(this.selectedIds),this.texts=o(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(a.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()}}},l=r("2877"),c=Object(l.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 a=r.row;return[1==a.coupon_type?e("span",[t._v(t._s(a.coupon_price)+"元")]):t._e(),2==a.coupon_type?e("span",[t._v(t._s(parseFloat(a.coupon_price)/10)+"折("+t._s(a.coupon_price.toString().split(".")[0])+"%)")]):t._e()]}},{key:"count",fn:function(r){var a=r.row;return r.index,[a.is_permanent?e("span",[t._v("不限量")]):e("div",[e("span",{staticClass:"fa"},[t._v("发布:"+t._s(a.total_count))]),e("span",{staticClass:"sheng"},[t._v("剩余:"+t._s(a.remain_count))])])]}},{key:"start_time",fn:function(r){var a=r.row;return r.index,[a.start_time?e("div",[t._v("\n "+t._s(t._f("formatDate")(a.start_time))+" - "+t._s(t._f("formatDate")(a.end_time))+"\n ")]):e("span",[t._v("不限时")])]}},{key:"type",fn:function(r){var a=r.row;return[1===a.type?e("span",[t._v("品类券")]):2===a.type?e("span",[t._v("商品券")]):3===a.type?e("span",[t._v("会员券")]):e("span",[t._v("通用券")])]}},{key:"status",fn:function(r){var a=r.row;return r.index,[e("Tag",{directives:[{name:"show",rawName:"v-show",value:1===a.status,expression:"row.status===1"}],attrs:{color:"blue"}},[t._v("正常")]),e("Tag",{directives:[{name:"show",rawName:"v-show",value:0===a.status,expression:"row.status===0"}],attrs:{color:"gold"}},[t._v("未开启")]),e("Tag",{directives:[{name:"show",rawName:"v-show",value:-1===a.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=c.exports},e90a:function(t,e,r){"use strict";r.r(e);var a=r("340c").a,n=(r("819e"),r("2877")),o=Object(n.a)(a,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"form-submit"},[e("Card",{staticClass:"ivu-mt mb79",attrs:{bordered:!1,"dis-hover":""}},[e("div",{staticClass:"new_tab"},[e("Tabs",{on:{"on-click":t.lotteryType},model:{value:t.formValidate.factor,callback:function(e){t.$set(t.formValidate,"factor",e)},expression:"formValidate.factor"}},t._l(t.headTab,(function(t,r){return e("TabPane",{key:r,attrs:{label:t.name,name:t.type}})})),1)],1),e("Row",{attrs:{type:"flex"}},[e("Col",{attrs:{span:"23"}},[e("Form",{ref:"formValidate",staticClass:"form",attrs:{rules:t.ruleValidate,model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Row",{attrs:{type:"flex"}},[e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"活动名称:",prop:"name","label-for":"name"}},[e("Input",{staticClass:"perW30",attrs:{placeholder:"请输入活动名称","element-id":"name"},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}})],1)],1),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"活动时间:",prop:"period"}},[e("div",{staticClass:"acea-row row-middle"},[e("DatePicker",{staticClass:"perW30",attrs:{editable:!1,type:"datetimerange",format:"yyyy-MM-dd HH:mm",placeholder:"请选择活动时间"},on:{"on-change":t.onchangeTime},model:{value:t.formValidate.period,callback:function(e){t.$set(t.formValidate,"period",e)},expression:"formValidate.period"}})],1)])],1),1==t.formValidate.factor?e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"抽奖类型:",prop:"type","label-for":"type"}},[e("RadioGroup",{attrs:{"element-id":"type"},model:{value:t.formValidate.type,callback:function(e){t.$set(t.formValidate,"type",e)},expression:"formValidate.type"}},[e("Radio",{staticClass:"radio",attrs:{label:1}},[t._v("九宫格")]),e("Radio",{attrs:{label:2}},[t._v("大转盘")])],1)],1)],1):t._e(),e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"参与用户:",prop:"attends_user","label-for":"attends_user"}},[e("RadioGroup",{attrs:{"element-id":"attends_user"},model:{value:t.formValidate.attends_user,callback:function(e){t.$set(t.formValidate,"attends_user",e)},expression:"formValidate.attends_user"}},[e("Radio",{staticClass:"radio",attrs:{label:1}},[t._v("全部用户")]),e("Radio",{attrs:{label:2}},[t._v("部分用户")])],1)],1)],1),2==t.formValidate.attends_user?e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"",prop:2==t.formValidate.attends_user?"user_level":""}},[e("div",{staticClass:"acea-row row-middle"},[e("Select",{staticClass:"perW30",attrs:{multiple:"",placeholder:"请选择用户等级"},model:{value:t.formValidate.user_level,callback:function(e){t.$set(t.formValidate,"user_level",e)},expression:"formValidate.user_level"}},t._l(t.userLevelListApi,(function(r){return e("Option",{key:r.id,attrs:{value:String(r.id)}},[t._v(t._s(r.name))])})),1)],1)])],1):t._e(),2==t.formValidate.attends_user?e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"",prop:2==t.formValidate.attends_user?"is_svip":""}},[e("div",{staticClass:"acea-row row-middle"},[e("Select",{staticClass:"perW30",attrs:{clearable:"",placeholder:"请选择是否是付费会员"},model:{value:t.formValidate.is_svip,callback:function(e){t.$set(t.formValidate,"is_svip",e)},expression:"formValidate.is_svip"}},t._l(t.templateList,(function(r){return e("Option",{key:r.id,attrs:{value:r.id}},[t._v(t._s(r.name))])})),1)],1)])],1):t._e(),2==t.formValidate.attends_user?e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"",prop:2==t.formValidate.attends_user?"user_label":""}},[e("div",{staticClass:"labelInput acea-row row-between-wrapper",on:{click:t.openLabel}},[e("div",{staticStyle:{width:"90%"}},[t.dataLabel.length?e("div",t._l(t.dataLabel,(function(r,a){return e("Tag",{attrs:{closable:""},on:{"on-close":function(e){return t.closeLabel(r)}}},[t._v(t._s(r.label_name))])})),1):e("span",{staticClass:"span"},[t._v("选择用户关联标签")])]),e("div",{staticClass:"iconfont iconxiayi"})]),e("div",{staticClass:"ml100 grey"},[t._v("\n 三个条件都设置后,必须这些条件都满足的用户才能参加抽奖\n ")])])],1):t._e(),1==t.formValidate.factor?e("Col",{key:"total_lottery_num",attrs:{span:"24"}},[e("FormItem",{attrs:{label:"每人抽奖总次数:",prop:1==t.formValidate.factor?"total_lottery_num":"","label-for":"total_lottery_num"}},[e("div",{staticClass:"input-number-wrapper perW20"},[e("InputNumber",{attrs:{min:1,"element-id":"total_lottery_num"},model:{value:t.formValidate.total_lottery_num,callback:function(e){t.$set(t.formValidate,"total_lottery_num",e)},expression:"formValidate.total_lottery_num"}}),e("div",{staticClass:"suffix"},[t._v("次")])],1)])],1):t._e(),1==t.formValidate.factor?e("Col",{key:"lottery_num2",attrs:{span:"24"}},[e("FormItem",{attrs:{label:"每人每天抽奖次数:",prop:1==t.formValidate.factor?"lottery_num":"","label-for":"lottery_num2"}},[e("div",{staticClass:"input-number-wrapper perW20"},[e("InputNumber",{attrs:{min:1,"element-id":"lottery_num2"},model:{value:t.formValidate.lottery_num,callback:function(e){t.$set(t.formValidate,"lottery_num",e)},expression:"formValidate.lottery_num"}}),e("div",{staticClass:"suffix"},[t._v("次")])],1)])],1):t._e(),5==t.formValidate.factor?e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"抽奖次数:",prop:5==t.formValidate.factor?"lottery_num_term":"","label-for":"status"}},[e("RadioGroup",{attrs:{"element-id":"lottery_num_term"},model:{value:t.formValidate.lottery_num_term,callback:function(e){t.$set(t.formValidate,"lottery_num_term",e)},expression:"formValidate.lottery_num_term"}},[e("Radio",{staticClass:"radio",attrs:{label:1}},[t._v("每天N次")]),e("Radio",{attrs:{label:2}},[t._v("每人N次")])],1)],1)],1):t._e(),5==t.formValidate.factor?e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"邀请新用户最多可获得抽奖",prop:5==t.formValidate.factor?"lottery_num":"","label-for":"lottery_num"}},[e("div",{staticClass:"acea-row row-middle"},[e("div",{staticClass:"mr10 grey"}),e("InputNumber",{staticClass:"perW20",attrs:{placeholder:"","element-id":"lottery_num",min:1,precision:0},model:{value:t.formValidate.lottery_num,callback:function(e){t.$set(t.formValidate,"lottery_num",e)},expression:"formValidate.lottery_num"}}),e("div",{staticClass:"ml10 grey"},[t._v("次")])],1)])],1):t._e(),5==t.formValidate.factor?e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"邀请一位新用户关注公众号可获得抽奖",prop:5==t.formValidate.factor?"spread_num":"","label-for":"spread_num"}},[e("div",{staticClass:"acea-row row-middle"},[e("div",{staticClass:"mr10 grey"}),e("InputNumber",{staticClass:"perW20",attrs:{placeholder:"","element-id":"spread_num",min:1,precision:0},model:{value:t.formValidate.spread_num,callback:function(e){t.$set(t.formValidate,"spread_num",e)},expression:"formValidate.spread_num"}}),e("div",{staticClass:"ml10 grey"},[t._v("次")])],1)])],1):t._e(),1==t.formValidate.factor||3==t.formValidate.factor||4==t.formValidate.factor?e("Col",{key:"factor_num",attrs:{span:"24"}},[e("FormItem",{attrs:{label:1==t.formValidate.factor?"单次抽奖消耗积分:":"抽奖次数:",prop:1==t.formValidate.factor||3==t.formValidate.factor||4==t.formValidate.factor?"factor_num":"","label-for":"factor_num"}},[e("div",{staticClass:"acea-row row-middle"},[e("div",{staticClass:"mr10 grey"}),e("InputNumber",{staticClass:"perW20",attrs:{placeholder:"","element-id":"factor_num",min:1,precision:0},model:{value:t.formValidate.factor_num,callback:function(e){t.$set(t.formValidate,"factor_num",e)},expression:"formValidate.factor_num"}}),1!=t.formValidate.factor?e("div",{staticClass:"ml10 grey"},[t._v("\n 次\n ")]):t._e()],1)])],1):t._e()],1),e("Row",[e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"规则选择:",prop:"prize"}},[e("Table",{attrs:{data:t.specsData,columns:t.columns,border:"",draggable:!0},on:{"on-drag-drop":t.onDragDrop},scopedSlots:t._u([{key:"image",fn:function(r){var a=r.row,n=r.index;return[e("div",{staticClass:"acea-row row-middle row-center-wrapper",on:{click:function(e){return t.modalPicTap("dan","goods",n)}}},[a.image?e("div",{staticClass:"pictrue pictrueTab"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:a.image,expression:"row.image"}]})]):e("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[e("Icon",{staticClass:"iconfonts",attrs:{type:"ios-camera-outline",size:"21"}})],1)])]}},{key:"total",fn:function(r){var a=r.row,n=r.index;return[e("InputNumber",{staticClass:"priceBox",attrs:{max:99999,min:0,precision:0},on:{"on-change":function(e){t.changeTotal(e,n)}},model:{value:a.total,callback:function(e){t.$set(a,"total",e)},expression:"row.total"}})]}},{key:"chance",fn:function(r){var a=r.row,n=r.index;return[e("InputNumber",{staticClass:"priceBox",attrs:{max:1e3,min:0,precision:0},on:{"on-change":function(e){t.changeChance(e,n)}},model:{value:a.chance,callback:function(e){t.$set(a,"chance",e)},expression:"row.chance"}})]}},{key:"type",fn:function(r){var a=r.row;return r.index,[e("div",[t._v(t._s(t._f("typeName")(a.type)))])]}},{key:"setting",fn:function(r){r.row;var a=r.index;return[e("Button",{staticClass:"submission",staticStyle:{"background-color":"transparent","box-shadow":"none",color:"#1890ff"},attrs:{type:"text"},on:{click:function(e){return t.editGoods(a)}}},[t._v("编辑")])]}}])}),t.specsData.length<8?e("Button",{staticClass:"submission mr15 mt20",attrs:{type:"primary"},on:{click:t.addGoods}},[t._v("添加商品")]):t._e()],1),e("FormItem",[e("div",{staticClass:"pl60 grey"},[t._v("\n 奖品必须设置为8个,列表中拖拽可调整奖品在九宫中的位置\n "),e("Poptip",{attrs:{placement:"bottom",trigger:"hover",width:"380",transfer:"",padding:"8px"}},[e("a",[t._v("查看位置示例图")]),e("div",{staticClass:"api",attrs:{slot:"content"},slot:"content"},[e("img",{staticStyle:{display:"block",width:"100%",height:"100%","object-fit":"contain"},attrs:{src:r("b0c0"),alt:""}})])])],1)])],1)],1),e("div",[3!=t.formValidate.factor&&4!=t.formValidate.factor?e("FormItem",{attrs:{prop:3!=t.formValidate.factor&&4!=t.formValidate.factor?"image":""}},[e("div",{staticClass:"custom-label",attrs:{slot:"label"},slot:"label"},[e("div",[e("div",[t._v("活动背景图")])]),e("div",[t._v(":")])]),e("div",{staticClass:"acea-row"},[t.formValidate.image?e("div",{staticClass:"pictrue"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.formValidate.image,expression:"formValidate.image"}]}),e("Button",{staticClass:"btndel",attrs:{shape:"circle",icon:"md-close"},nativeOn:{click:function(e){return t.handleRemove()}}})],1):e("div",{staticClass:"upLoad acea-row row-center-wrapper",on:{click:function(e){return t.modalPicTap("dan","danFrom")}}},[e("Icon",{staticClass:"iconfonts",attrs:{type:"ios-camera-outline",size:"26"}})],1)]),e("div",{staticStyle:{"margin-top":"14px","font-size":"12px","line-height":"12px",color:"#999999"}},[t._v("\n 建议尺寸:750*580\n "),e("Poptip",{attrs:{placement:"bottom",trigger:"hover",width:"256",transfer:"",padding:"8px"}},[e("a",[t._v("查看示例")]),e("div",{staticClass:"exampleImg",attrs:{slot:"content"},slot:"content"},[e("img",{attrs:{src:"".concat(t.baseURL,"/statics/system/luck.png"),alt:""}})])])],1)]):t._e(),3!=t.formValidate.factor&&4!=t.formValidate.factor?e("FormItem",{attrs:{label:"中奖名单:",prop:3!=t.formValidate.factor&&4!=t.formValidate.factor?"is_all_record":"","label-for":"is_all_record"}},[e("i-switch",{attrs:{"true-value":1,"false-value":0,"element-id":"is_all_record",size:"large"},model:{value:t.formValidate.is_all_record,callback:function(e){t.$set(t.formValidate,"is_all_record",e)},expression:"formValidate.is_all_record"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1):t._e(),3!=t.formValidate.factor&&4!=t.formValidate.factor?e("FormItem",{attrs:{label:"个人中奖记录:",prop:3!=t.formValidate.factor&&4!=t.formValidate.factor?"is_personal_record":"","label-for":"is_personal_record"}},[e("i-switch",{attrs:{"true-value":1,"false-value":0,"element-id":"is_personal_record",size:"large"},model:{value:t.formValidate.is_personal_record,callback:function(e){t.$set(t.formValidate,"is_personal_record",e)},expression:"formValidate.is_personal_record"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1):t._e(),3!=t.formValidate.factor&&4!=t.formValidate.factor?e("FormItem",{attrs:{label:"活动规则:",prop:"is_content","label-for":"is_content"}},[e("i-switch",{attrs:{"true-value":1,"false-value":0,"element-id":"is_content",size:"large"},model:{value:t.formValidate.is_content,callback:function(e){t.$set(t.formValidate,"is_content",e)},expression:"formValidate.is_content"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1):t._e(),3!=t.formValidate.factor&&4!=t.formValidate.factor&&1==t.formValidate.is_content?e("FormItem",{attrs:{label:"",prop:3!=t.formValidate.factor&&4!=t.formValidate.factor&&1==t.formValidate.is_content?"content":""}},[e("WangEditor",{staticStyle:{width:"90%"},attrs:{content:t.formValidate.content},on:{editorContent:t.getEditorContent}})],1):t._e(),e("FormItem",{attrs:{label:"活动状态:",prop:"status","label-for":"status"}},[e("i-switch",{attrs:{"true-value":1,"false-value":0,"element-id":"status",size:"large"},model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1),t.spinShow?e("Spin",{attrs:{size:"large",fix:""}}):t._e()],1)],1)],1)],1),e("Card",{staticClass:"fixed-card",style:{left:"".concat(t.menuCollapse?t.isMobile?"0":"80px":"200px")},attrs:{bordered:!1,"dis-hover":""}},[e("Form",[e("FormItem",{staticClass:"submit-form-item"},[e("Button",{staticClass:"submission",attrs:{type:"primary",loading:t.submitOpen},on:{click:function(e){return t.next("formValidate")}}},[t.submitOpen?e("div",[t._v("提交中")]):e("div",[t._v("提交")])])],1)],1)],1),e("Modal",{attrs:{scrollable:"",title:"选择用户标签",closable:!0,width:"540","footer-hide":!0,"mask-closable":!1},model:{value:t.labelShow,callback:function(e){t.labelShow=e},expression:"labelShow"}},[e("userLabel",{ref:"userLabel",on:{activeData:t.activeData,close:t.labelClose}})],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},on:{getPic:t.getPic}}):t._e()],1),e("Modal",{attrs:{width:"60%",scrollable:"","footer-hide":"",closable:"",title:t.title,"mask-closable":!1,"z-index":100},model:{value:t.addGoodsModel,callback:function(e){t.addGoodsModel=e},expression:"addGoodsModel"}},[t.addGoodsModel?e("addGoods",{attrs:{editData:t.editData},on:{addGoodsData:t.addGoodsData}}):t._e()],1)],1)}),[],!1,null,"616768e2",null);e.default=o.exports},eab1:function(t,e,r){"use strict";var a=r("e449"),n=r("b0e7"),o=r("c4ad"),i=r("5334"),s=r("c4c8"),l={components:{uploadPictures:n.a,goodsList:o.default,freightTemplate:i.a,couponList:a.a},data:function(){var t=this;return{modalPic:!1,modals:!1,isChoice:"单选",updateIds:[],updateName:[],goodsData:{pic:"",product_id:"",img:"",coverImg:""},formValidate:{type:5,name:"",num:0,image:"",chance:0,product_id:0,coupon_id:0,total:0,prompt:"",goods_image:"",unique:"",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:[],attrColumns:[{width:60,align:"center",render:function(e,r){var a=r.row;return e("Radio",{props:{value:a.unique===t.formValidate.unique},on:{"on-change":function(){t.attrModal=!1,t.attrImage=a.image,t.formValidate.unique=a.unique}}})}},{title:"图片",slot:"image",width:120,align:"center"},{title:"规格",key:"suk",align:"center",minWidth:120}],attrData:[],attrModal:!1,attrImage:""}},props:{editData:{type:Object,default:function(){}}},watch:{editData:function(t){}},mounted:function(){var t=this;Object.keys(this.editData).forEach((function(e){t.formValidate[e]=t.editData[e],"coupon_title"===e&&t.editData[e]&&t.couponName.push({title:t.editData[e],id:t.editData.coupon_id})}))},methods:{getCouponId:function(t){this.formValidate.coupon_id=t.id,this.formValidate.coupon_title=t.coupon_title;var e=[];e.push(t),this.couponName=e},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(t){t?(e.$emit("addGoodsData",e.formValidate),e.$Message.success("添加成功")):e.$Message.warning("请完善数据")}))},getPic:function(t){this.formValidate.image=t.att_dir,this.modalPic=!1},modalPicTap:function(){this.modalPic=!0},cancel:function(){this.modals=!1},getProductId:function(t){this.formValidate.product_id=t.id,this.formValidate.goods_image=t.image,this.modals=!1,this.attrData=t.attrValue},removeGoods:function(){this.formValidate.product_id="",this.formValidate.goods_image="",this.removeAttr()},remove:function(){this.formValidate.image=""},addCoupon:function(){this.$refs.couponTemplates.isTemplate=!0,this.$refs.couponTemplates.tableList()},handleClose:function(t){this.couponName.splice(0,1),this.formValidate.coupon_id=0},unique:function(t){var e=new Map;return t.filter((function(t){return!e.has(t.id)&&e.set(t.id,1)}))},removeAttr:function(){this.attrImage="",this.formValidate.unique=""},callAttr:function(){this.attrModal=!0},getList:function(){var t=this;Object(s.i)().then((function(e){for(var r=e.data.list,a=0;a<r.length;a++)if(r[a].id===t.formValidate.product_id){t.attrData=r[a].attrValue;for(var n=0;n<t.attrData.length;n++)if(t.attrData[n].unique===t.formValidate.unique){t.attrImage=t.attrData[n].image;break}break}}))}}},c=(r("d111"),r("2877")),u=Object(c.a)(l,(function(){var t=this,e=t._self._c;return e("div",[e("Form",{ref:"formValidate",attrs:{model:t.formValidate,rules:t.ruleValidate,"label-width":90}},[e("FormItem",{attrs:{label:"奖品",prop:"type"}},[e("RadioGroup",{model:{value:t.formValidate.type,callback:function(e){t.$set(t.formValidate,"type",e)},expression:"formValidate.type"}},[e("Radio",{attrs:{label:1}},[t._v("未中奖")]),e("Radio",{attrs:{label:5}},[t._v("优惠券")]),e("Radio",{attrs:{label:2}},[t._v("积分")]),e("Radio",{attrs:{label:6}},[t._v("商品")]),e("Radio",{attrs:{label:4}},[t._v("红包")]),e("Radio",{attrs:{label:3}},[t._v("余额")])],1)],1),5==t.formValidate.type?e("FormItem",{attrs:{label:"赠送优惠券:"}},[t.couponName.length?e("div",{staticClass:"mb20"},t._l(t.couponName,(function(r,a){return e("Tag",{key:a,attrs:{closable:""},on:{"on-close":function(e){return t.handleClose(r)}}},[t._v(t._s(r.title))])})),1):t._e(),t.couponName.length?t._e():e("Button",{attrs:{type:"primary"},on:{click:t.addCoupon}},[t._v("添加优惠券")])],1):t._e(),[2,3,4].includes(t.formValidate.type)?e("FormItem",{attrs:{label:[3,4].includes(t.formValidate.type)?"金额信息":"积分数量",prop:"num"}},[[3,4].includes(t.formValidate.type)?e("InputNumber",{staticClass:"width30",attrs:{placeholder:"请输入金额",max:4==t.formValidate.type?999:99999,min:1},model:{value:t.formValidate.num,callback:function(e){t.$set(t.formValidate,"num",e)},expression:"formValidate.num"}}):e("InputNumber",{staticClass:"width30",attrs:{placeholder:"请输入积分数量",max:4==t.formValidate.type?999:99999,min:1,precision:0},model:{value:t.formValidate.num,callback:function(e){t.$set(t.formValidate,"num",e)},expression:"formValidate.num"}}),e("div",{staticClass:"ml100 grey"},[t._v("\n "+t._s(3==t.formValidate.type?"用户领取余额后会自动到账余额账户":4==t.formValidate.type?"用户领取红包后会自动到账微信零钱,添加此奖品需开通微信支付,并且账户中金额不能小于1元":"")+"\n ")])],1):t._e(),6==t.formValidate.type?e("FormItem",{attrs:{label:"商品",prop:"goods_image"}},[t.formValidate.goods_image?[e("div",{staticClass:"upload-list"},[e("img",{attrs:{src:t.formValidate.goods_image}}),e("Icon",{attrs:{type:"ios-close-circle",size:"16"},on:{click:function(e){return t.removeGoods()}}})],1)]:e("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[e("Icon",{attrs:{type:"ios-camera-outline",size:"26"},on:{click:function(e){t.modals=!0}}})],1)],2):t._e(),6==t.formValidate.type&&t.formValidate.goods_image?e("FormItem",{attrs:{label:"商品规格",required:""}},[t.formValidate.unique?[e("div",{staticClass:"upload-list"},[e("img",{attrs:{src:t.attrImage}}),e("Icon",{attrs:{type:"ios-close-circle",size:"16"},on:{click:t.removeAttr}})],1)]:e("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[e("Icon",{attrs:{type:"ios-camera-outline",size:"26"},on:{click:t.callAttr}})],1)],2):t._e(),e("FormItem",{attrs:{label:"奖品名称",prop:"name"}},[e("Input",{staticClass:"width30",attrs:{maxlength:10,placeholder:"请输入奖品名称"},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}})],1),e("FormItem",{attrs:{label:"奖品图片",prop:"image"}},[t.formValidate.image?[e("div",{staticClass:"upload-list"},[e("img",{attrs:{src:t.formValidate.image}}),e("Icon",{attrs:{type:"ios-close-circle",size:"16"},on:{click:function(e){return t.remove()}}})],1)]:e("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[e("Icon",{attrs:{type:"ios-camera-outline",size:"26"},on:{click:function(e){t.modalPic=!0}}})],1)],2),e("FormItem",{attrs:{label:"奖品数量",prop:"total"}},[e("InputNumber",{staticClass:"width30",attrs:{placeholder:"请输入奖品数量",max:99999,min:0,precision:0},model:{value:t.formValidate.total,callback:function(e){t.$set(t.formValidate,"total",e)},expression:"formValidate.total"}})],1),e("FormItem",{attrs:{label:"奖品权重",prop:"chance"}},[e("InputNumber",{staticClass:"width30",attrs:{placeholder:"请输入奖品权重",max:1e3,min:0,precision:0},model:{value:t.formValidate.chance,callback:function(e){t.$set(t.formValidate,"chance",e)},expression:"formValidate.chance"}})],1),e("FormItem",{attrs:{label:"提示语",prop:"prompt"}},[e("Input",{staticClass:"width30",attrs:{maxlength:15,placeholder:"请输入提示语"},model:{value:t.formValidate.prompt,callback:function(e){t.$set(t.formValidate,"prompt",e)},expression:"formValidate.prompt"}})],1),e("FormItem",[e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("提交")])],1)],1),e("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传图片","mask-closable":!1,"z-index":110},model:{value:t.modalPic,callback:function(e){t.modalPic=e},expression:"modalPic"}},[t.modalPic?e("uploadPictures",{attrs:{isChoice:t.isChoice},on:{getPic:t.getPic}}):t._e()],1),e("Modal",{staticClass:"paymentFooter",attrs:{title:"商品列表",footerHide:"",scrollable:"",width:"900"},on:{"on-cancel":t.cancel},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[t.modals?e("goods-list",{ref:"goodslist",on:{getProductId:t.getProductId}}):t._e()],1),e("coupon-list",{ref:"couponTemplates",attrs:{luckDraw:!0},on:{getCouponId:t.getCouponId}}),e("Modal",{attrs:{title:"选择商品规格",width:"960",scrollable:"","footer-hide":""},model:{value:t.attrModal,callback:function(e){t.attrModal=e},expression:"attrModal"}},[e("Table",{attrs:{columns:t.attrColumns,data:t.attrData,height:"500"},scopedSlots:t._u([{key:"image",fn:function(t){var r=t.row;return t.index,[e("div",{staticClass:"product-data"},[e("img",{staticClass:"image",attrs:{src:r.image}})])]}}])})],1)],1)}),[],!1,null,"5b37cc49",null);e.a=u.exports}}]);