CRMEB/crmeb/public/admin/system_static/js/chunk-2bb77828.92a8056c.js
2025-06-09 10:32:07 +08:00

1 line
45 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2bb77828"],{1666:function(e,t,a){a("8d19")},"232f":function(e,t,a){a("b0c0"),a("d81d"),a("14d9"),a("a434"),a("a9e3");var i=a("c24f"),r={name:"userLabel",props:{uid:{type:String|Number,default:0},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(i.j)(this.uid||0).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)}))}))})),t.data.map((function(t){t.label.map((function(t){t.disabled&&e.activeIds.push(t.id)}))})),e.labelList=t.data}))},selectLabel:function(e){var t;e.disabled?(t=this.activeIds.indexOf(e.id),this.activeIds.splice(t,1),e.disabled=!1):(this.activeIds.push(e.id),e.disabled=!0)},subBtn:function(){var e=this,t=[];this.only_get?(this.labelList.map((function(e){e.label.map((function(e){1==e.disabled&&t.push({id:e.id,label_name:e.label_name})}))})),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(i.A)(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")}}};a("808a"),a=a("2877"),a=Object(a.a)(r,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"label-wrapper"},[e.labelList[0]?e._l(e.labelList,(function(a,i){return t("div",{key:i,staticClass:"label-box"},[t("div",{staticClass:"title"},[e._v(e._s(a.name))]),t("div",{staticClass:"list"},e._l(a.label,(function(a,i){return t("div",{directives:[{name:"db-click",rawName:"v-db-click"}],key:i,staticClass:"label-item",class:{on:a.disabled},on:{click:function(t){return e.selectLabel(a)}}},[e._v("\n "+e._s(a.label_name)+"\n ")])})),0)])})):t("div",{staticClass:"nonefont"},[e._v("暂无标签")]),t("div",{staticClass:"acea-row row-right mt20"},[t("el-button",{directives:[{name:"db-click",rawName:"v-db-click"}],on:{click:e.cancel}},[e._v("取 消")]),t("el-button",{directives:[{name:"db-click",rawName:"v-db-click"}],attrs:{type:"primary"},on:{click:e.subBtn}},[e._v("确 定")])],1)],2)}),[],!1,null,"ec04917e",null);t.a=a.exports},"61bf":function(module,__webpack_exports__,__webpack_require__){var _Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("2909"),_Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("c7eb"),_Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("1da1"),_Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("5530"),_Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("ade3"),core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("99af"),core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__),core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("a15b"),core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_6__),core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("14d9"),core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_7__),core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("a434"),core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_8__),core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("b680"),core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_9__),core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("d3b7"),core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__),core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("25f0"),core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_11__),core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("159b"),core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_12__),vuex__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("2f62"),_components_goodsList_index__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("c4ad"),_components_uploadPictures__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("b0e7"),_components_userLabel__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("232f"),_addGoods__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("eab1"),_api_lottery__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("1184"),_formRule_lotteryFrom__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("d1cc"),_api_product__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("c4c8"),_api_user__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("c24f"),_components_wangEditor_index_vue__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("a069"),_utils_validate__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("61f7"),_utils_editorImg__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("0d3e"),sortablejs__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("aa47");__webpack_exports__.a={name:"lotteryCreate",components:{goodsList:_components_goodsList_index__WEBPACK_IMPORTED_MODULE_14__.default,uploadPictures:_components_uploadPictures__WEBPACK_IMPORTED_MODULE_15__.a,addGoods:_addGoods__WEBPACK_IMPORTED_MODULE_17__.a,WangEditor:_components_wangEditor_index_vue__WEBPACK_IMPORTED_MODULE_22__.a,userLabel:_components_userLabel__WEBPACK_IMPORTED_MODULE_16__.a},data:function(){return Object(_Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_4__.a)(Object(_Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_4__.a)({selectDataLabel:[],selectLabelShow:!1,content:"",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:"/UEditor/",serverUrl:""},isChoice:"单选",current:0,modalPic:!1,modal_loading:!1,images:[],templateList:[{id:-1,name:"不限制会员类型"},{id:0,name:"非付费会员"},{id:1,name:"付费会员"}],specsData:[{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num:0,prompt:""},{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num:0,prompt:""},{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num:0,prompt:""},{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num:0,prompt:""},{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num:0,prompt:""},{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num:0,prompt:""},{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num:0,prompt:""},{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num: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_19__.a,currentid:"",picTit:"",tableIndex:0,copy:0,editIndex:null,id:""},"copy",0),"lottery_id",0)},filters:{typeName:function(e){return 1==e?"未中奖":2==e?"积分":3==e?"余额":4==e?"红包":5==e?"优惠券":6==e?"商品":void 0}},computed:Object(_Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.a)(Object(_Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__.a)({},Object(vuex__WEBPACK_IMPORTED_MODULE_13__.d)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"120px"},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){var e=this;this.labelListApi(),this.levelListApi(),this.$route.query.type&&(this.formValidate.factor=this.$route.query.type),this.$route.query.lottery_id&&(this.lottery_id=this.$route.query.lottery_id,this.getInfo()),this.$nextTick((function(t){e.setSort()}))},methods:{submitAddGoods:function(){this.$refs.addGoodsForm.handleSubmit("formValidate")},changeUsers:function(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){this.selectLabelShow=!1,this.selectDataLabel=e},onClickTab:function(e){this.lottery_id&&this.getInfo()},getEditorContent:function(e){this.content=e},labelListApi:function(){var e=this;Object(_api_product__WEBPACK_IMPORTED_MODULE_20__.p)().then((function(t){e.userLabelList=t.data.list}))},levelListApi:function(){var e=this;Object(_api_user__WEBPACK_IMPORTED_MODULE_21__.p)().then((function(t){e.userLevelListApi=t.data.list}))},onchangeTime:function(e){this.$set(this.formValidate,"period",e)},getInfo:function(e){var t=this;this.spinShow=!0,Object(_api_lottery__WEBPACK_IMPORTED_MODULE_18__.d)(this.lottery_id).then((function(a){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,percent:0,min_try_num:0,prompt:""},{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num:0,prompt:""},{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num:0,prompt:""},{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num:0,prompt:""},{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num:0,prompt:""},{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num:0,prompt:""},{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num:0,prompt:""},{type:1,name:"",num:10,image:"",chance:1,total:0,percent:0,min_try_num: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.content=a.data.is_content?a.data.content:"",t.formValidate.factor=a.data.factor.toString(),t.$set(t.formValidate,"period",[t.formatDate(a.data.start_time)||"",t.formatDate(a.data.end_time)||""]),t.specsData=a.data.prize,t.getProbability()),t.$nextTick((function(e){t.spinShow=!1}))})).catch((function(e){}))},next:function(e){var t,a=this;if(this.formValidate.prize=this.specsData,this.formValidate.is_content&&(this.formValidate.content=Object(_utils_editorImg__WEBPACK_IMPORTED_MODULE_24__.a)(this.content)),2==this.formValidate.attends_user&&this.selectDataLabel.length&&(t=[],this.selectDataLabel.forEach((function(e){t.push(e.id)})),this.formValidate.user_label=t),this.submitOpen)return!1;this.$refs[e].validate((function(e){if(!e)return!1;a.submitOpen=!0,a.formValidate.id&&!a.copy?Object(_api_lottery__WEBPACK_IMPORTED_MODULE_18__.e)(a.formValidate.id,a.formValidate).then(function(){var e=Object(_Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__.a)().mark((function e(t){return Object(_Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.$message.success(t.msg),a.submitOpen=!1,setTimeout((function(){a.$router.push({path:"/admin/marketing/lottery/list"})}),500);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){a.submitOpen=!1,a.$message.error(e.msg)})):Object(_api_lottery__WEBPACK_IMPORTED_MODULE_18__.c)(a.formValidate).then(function(){var e=Object(_Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__.a)(Object(_Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__.a)().mark((function e(t){return Object(_Users_wuhaotian_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.submitOpen=!1,a.$message.success(t.msg),setTimeout((function(){a.$router.push({path:"/admin/marketing/lottery/list"})}),500);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){a.submitOpen=!1,a.$message.error(e.msg)}))}))},step:function(){this.current--},modalPicTap:function(e,t,a){this.modalPic=!0,this.isChoice="dan"===e?"单选":"多选",this.picTit=t||"",this.tableIndex=a},getPic:function(e){"danFrom"===this.picTit?this.formValidate.image=e.att_dir: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){e=e.target.value,this.$set(this.specsData[t],"percent",e)},changeTotal:function(e,t){this.$set(this.specsData[t],"total",e)},getProbability:function(){for(var e=this.sumArr(this.specsData,"chance"),t=0;t<this.specsData.length;t++)0==e?this.$set(this.specsData[t],"probability","0%"):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_Code_ZhongBang_kaiyuan_gitee_master_template_admin_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0__.a)(this.specsData.splice(e,1,this.specsData[t]))))},setSort:function(){var e=this,t=this.$refs.selection.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0];this.sortable=sortablejs__WEBPACK_IMPORTED_MODULE_25__.a.create(t,{ghostClass:"sortable-ghost",handle:".handle",setData:function(e){e.setData("Text","")},onEnd:function(t){e.elChangeExForArray(t.oldIndex,t.newIndex,e.specsData)}})},elChangeExForArray:function(e,t,a,i){var r=this,s=a,o=a[e];a=a[t];i?(s[t]=a,s[e]=o):(s[e]=a,s[t]=o),this.specsData=[],this.$nextTick((function(e){r.specsData=s}))},formatDate:function(e){return e?(e=new Date(1e3*e),Object(_utils_validate__WEBPACK_IMPORTED_MODULE_23__.a)(e,"yyyy-MM-dd hh:mm")):""}}}},"808a":function(e,t,a){a("ce9a")},"80cc":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAeCAYAAAAhDE4sAAAAAXNSR0IArs4c6QAAAH9JREFUSEtjZGBgYNh/+HQDIyNjPIj9////hY62pg0gNi6ATT0jVLAeWdP///8bcRmGSz3jgSNn7jMwMCig2f7AwcZEEZuLcKmnnkFU8xrVAhtf7JAix0iKYnxqRw0iHJLgMBrNa+CAwplpR/MawYQ0mtcIBhHDaF5DhNHQyWsAiKzwBxioCkgAAAAASUVORK5CYII="},"8d19":function(e,t,a){},b0c06: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+IazcT5S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Sla50pStd6UpXutKVrnSlK13pSle60pWudL267hOvsXXiM927LvGZ+tX1Ha6vd89/8e6a54Wb5nff+aWNf7AKnpu/ujF+c2MPV3b/zotrEjB/M8kTw/xb+QByHEnqGeIJiwAAAABJRU5ErkJggg=="},c00a:function(e,t,a){a("ff7b")},ce9a:function(e,t,a){},d1cc:function(e,t,a){a.d(t,"a",(function(){return i})),a("d81d");var i={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"}]}},e90a:function(e,t,a){a.r(t),a("b0c0");var i=a("61bf").a,r=(a("c00a"),a("2877"));r=Object(r.a)(i,(function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"i-layout-page-header header-title"},[t("div",{staticClass:"fl_header"},[t("el-button",{directives:[{name:"db-click",rawName:"v-db-click"}],staticClass:"btn-back",attrs:{icon:"el-icon-arrow-left",size:"small",type:"text"},on:{click:function(t){return e.$router.go(-1)}}},[e._v("返回")]),t("el-divider",{attrs:{direction:"vertical"}}),t("span",{staticClass:"ivu-page-header-title"},[e._v(e._s(e.$route.meta.title))])],1)]),t("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never","body-style":{padding:"0 20px 20px"}}},[t("el-row",{staticClass:"mt30 acea-row row-middle row-center"},[t("el-col",{directives:[{name:"loading",rawName:"v-loading",value:e.spinShow,expression:"spinShow"}],attrs:{span:24}},[t("el-form",{ref:"formValidate",staticClass:"form",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()}}},[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"活动类型:",prop:"name","label-for":"name"}},[t("el-radio-group",{on:{input:e.onClickTab},model:{value:e.formValidate.factor,callback:function(t){e.$set(e.formValidate,"factor",t)},expression:"formValidate.factor"}},e._l(e.tabs,(function(a,i){return t("el-radio",{key:i,attrs:{label:a.type,disabled:!!e.lottery_id}},[e._v(e._s(a.name))])})),1)],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"活动名称:",prop:"name","label-for":"name"}},[t("el-input",{staticClass:"content_width",attrs:{placeholder:"请输入活动名称",maxlength:"80","show-word-limit":""},model:{value:e.formValidate.name,callback:function(t){e.$set(e.formValidate,"name",t)},expression:"formValidate.name"}})],1)],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"活动时间:"}},[t("div",{staticClass:"acea-row row-middle"},[t("el-date-picker",{staticStyle:{width:"460px"},attrs:{editable:!1,type:"datetimerange",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:e.onchangeTime},model:{value:e.formValidate.period,callback:function(t){e.$set(e.formValidate,"period",t)},expression:"formValidate.period"}})],1)])],1),t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"参与用户:",prop:"attends_user","label-for":"attends_user"}},[t("el-radio-group",{attrs:{"element-id":"attends_user"},on:{input:e.changeUsers},model:{value:e.formValidate.attends_user,callback:function(t){e.$set(e.formValidate,"attends_user",t)},expression:"formValidate.attends_user"}},[t("el-radio",{staticClass:"radio",attrs:{label:1}},[e._v("全部用户")]),t("el-radio",{attrs:{label:2}},[e._v("部分用户")])],1)],1)],1),2==e.formValidate.attends_user?t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"",prop:2==e.formValidate.attends_user?"user_level":""}},[t("div",{staticClass:"acea-row row-middle"},[t("el-select",{staticClass:"content_width",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(e){return t("el-option",{key:e.id,attrs:{value:e.id,label:e.name}})})),1)],1)])],1):e._e(),2==e.formValidate.attends_user?t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"",prop:2==e.formValidate.attends_user?"is_svip":""}},[t("div",{staticClass:"acea-row row-middle"},[t("el-select",{staticClass:"content_width",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(e){return t("el-option",{key:e.id,attrs:{value:e.id,label:e.name}})})),1)],1)])],1):e._e(),2==e.formValidate.attends_user?t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"",prop:2==e.formValidate.attends_user?"user_label":""}},[t("div",{staticClass:"acea-row row-middle"},[t("div",{directives:[{name:"db-click",rawName:"v-db-click"}],staticClass:"labelInput acea-row row-between-wrapper",on:{click:function(t){e.selectLabelShow=!0}}},[t("div",{},[e.selectDataLabel.length?t("div",e._l(e.selectDataLabel,(function(a,i){return t("el-tag",{key:i,staticClass:"mr10",attrs:{closable:!1},on:{close:function(t){return e.closeLabel(a)}}},[e._v(e._s(a.label_name))])})),1):t("span",{staticClass:"span"},[e._v("选择用户标签")])]),t("div",{staticClass:"ivu-icon ivu-icon-ios-arrow-down"})])]),t("div",{staticClass:"tips-info ml100 grey"},[e._v("三个条件都设置后,必须这些条件都满足的用户才能参加抽奖")])])],1):e._e(),5==e.formValidate.factor?t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"抽奖次数:",prop:5==e.formValidate.factor?"lottery_num_term":"","label-for":"status"}},[t("el-radio-group",{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"}},[t("el-radio",{staticClass:"radio",attrs:{label:1}},[e._v("每天N次")]),t("el-radio",{attrs:{label:2}},[e._v("每人N次")])],1)],1)],1):e._e(),5==e.formValidate.factor?t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"邀请新用户最多可获得抽奖",prop:5==e.formValidate.factor?"lottery_num":"","label-for":"lottery_num"}},[t("div",{staticClass:"acea-row row-middle"},[t("div",{staticClass:"mr10 grey"}),t("el-input-number",{staticClass:"content_width",attrs:{controls:!1,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"}}),t("div",{staticClass:"ml10 grey"},[e._v("次")])],1)])],1):e._e(),5==e.formValidate.factor?t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"邀请一位新用户关注公众号可获得抽奖",prop:5==e.formValidate.factor?"spread_num":"","label-for":"spread_num"}},[t("div",{staticClass:"acea-row row-middle"},[t("div",{staticClass:"mr10 grey"}),t("el-input-number",{staticClass:"content_width",attrs:{controls:!1,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"}}),t("div",{staticClass:"ml10 grey"},[e._v("次")])],1)])],1):e._e(),1==e.formValidate.factor||3==e.formValidate.factor||4==e.formValidate.factor?t("el-col",{attrs:{span:24}},[t("el-form-item",{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"}},[t("div",{staticClass:"acea-row row-middle"},[t("el-input-number",{staticClass:"content_width",attrs:{controls:!1,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)])],1):e._e()],1),t("el-row",[t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"规格选择:",prop:"prize"}},[t("el-table",{ref:"selection",attrs:{data:e.specsData}},[t("el-table-column",{attrs:{"min-width":"30"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("div",{staticClass:"drag",on:{"on-drag-drop":e.onDragDrop}},[t("img",{staticClass:"handle",attrs:{src:a("80cc"),alt:""}})])]}}])}),t("el-table-column",{attrs:{label:"序号",type:"index",width:"50"}}),t("el-table-column",{attrs:{label:"图片","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("div",{directives:[{name:"db-click",rawName:"v-db-click"}],staticClass:"acea-row scope.row-middle scope.row-center-wrapper",on:{click:function(t){return e.modalPicTap("dan","goods",a.$index)}}},[a.row.image?t("div",{staticClass:"pictrue pictrueTab"},[t("img",{directives:[{name:"lazy",rawName:"v-lazy",value:a.row.image,expression:"scope.row.image"}]})]):t("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[t("i",{staticClass:"el-icon-picture-outline",staticStyle:{"font-size":"24px"}})])])]}}])}),t("el-table-column",{attrs:{label:"名称","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("div",[e._v(e._s(a.row.name))])]}}])}),t("el-table-column",{attrs:{label:"奖品","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("div",[e._v(e._s(e._f("typeName")(a.row.type)))])]}}])}),t("el-table-column",{attrs:{label:"提示语","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("div",[e._v(e._s(a.row.prompt))])]}}])}),t("el-table-column",{attrs:{label:"数量","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-input-number",{staticClass:"priceBox",attrs:{controls:!1,max:9999999999,min:0,precision:0},model:{value:a.row.total,callback:function(t){e.$set(a.row,"total",t)},expression:"scope.row.total"}})]}}])}),t("el-table-column",{attrs:{label:"奖品概率(%)","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-input-number",{staticClass:"priceBox",attrs:{controls:!1,max:100,min:0,precision:2},model:{value:a.row.percent,callback:function(t){e.$set(a.row,"percent",t)},expression:"scope.row.percent"}})]}}])}),t("el-table-column",{attrs:{label:"操作",fixed:"right",width:"80"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("a",{directives:[{name:"db-click",rawName:"v-db-click"}],staticClass:"submission mr15",on:{click:function(t){return e.editGoods(a.$index)}}},[e._v("编辑")])]}}])})],1),e.specsData.length<8?t("el-button",{directives:[{name:"db-click",rawName:"v-db-click"}],staticClass:"submission mr15 mt20",attrs:{type:"primary"},on:{click:e.addGoods}},[e._v("添加商品")]):e._e()],1),t("el-form-item",[t("div",{staticClass:"pl60 grey"},[e._v("\n 奖品必须设置为8个列表中拖拽可调整奖品在九宫中的位置\n "),t("el-tooltip",{attrs:{effect:"light",placement:"bottom",width:"380"}},[t("a",[e._v("查看位置示例图")]),t("div",{staticClass:"api",attrs:{slot:"content"},slot:"content"},[t("img",{attrs:{src:a("b0c06"),alt:""}})])])],1)])],1)],1),t("div",[3!=e.formValidate.factor&&4!=e.formValidate.factor?t("el-form-item",{attrs:{prop:3!=e.formValidate.factor&&4!=e.formValidate.factor?"image":""}},[t("div",{staticClass:"custom-label",attrs:{slot:"label"},slot:"label"},[t("div",[t("div",[e._v("活动背景图")]),t("div",[e._v("(750*750)")])]),t("div",[e._v("")])]),t("div",{staticClass:"acea-row"},[e.formValidate.image?t("div",{staticClass:"pictrue"},[t("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.formValidate.image,expression:"formValidate.image"}]}),t("i",{directives:[{name:"db-click",rawName:"v-db-click"}],staticClass:"el-icon-circle-close btndel",on:{click:function(t){return e.handleRemove()}}})]):t("div",{directives:[{name:"db-click",rawName:"v-db-click"}],staticClass:"upLoad acea-row row-center-wrapper",on:{click:function(t){return e.modalPicTap("dan","danFrom")}}},[t("i",{staticClass:"el-icon-picture-outline",staticStyle:{"font-size":"24px"}})])])]):e._e(),3!=e.formValidate.factor&&4!=e.formValidate.factor?t("el-form-item",{attrs:{label:"中奖名单:",prop:3!=e.formValidate.factor&&4!=e.formValidate.factor?"is_all_record":"","label-for":"is_all_record"}},[t("el-switch",{staticClass:"defineSwitch",attrs:{"active-value":1,"inactive-value":0,size:"large","active-text":"开启","inactive-text":"关闭"},model:{value:e.formValidate.is_all_record,callback:function(t){e.$set(e.formValidate,"is_all_record",t)},expression:"formValidate.is_all_record"}})],1):e._e(),3!=e.formValidate.factor&&4!=e.formValidate.factor?t("el-form-item",{attrs:{label:"个人中奖记录:",prop:3!=e.formValidate.factor&&4!=e.formValidate.factor?"is_personal_record":"","label-for":"is_personal_record"}},[t("el-switch",{staticClass:"defineSwitch",attrs:{"active-value":1,"inactive-value":0,size:"large","active-text":"开启","inactive-text":"关闭"},model:{value:e.formValidate.is_personal_record,callback:function(t){e.$set(e.formValidate,"is_personal_record",t)},expression:"formValidate.is_personal_record"}})],1):e._e(),3!=e.formValidate.factor&&4!=e.formValidate.factor?t("el-form-item",{attrs:{label:"活动规则:",prop:"is_content","label-for":"is_content"}},[t("el-switch",{staticClass:"defineSwitch",attrs:{"active-value":1,"inactive-value":0,size:"large","active-text":"开启","inactive-text":"关闭"},model:{value:e.formValidate.is_content,callback:function(t){e.$set(e.formValidate,"is_content",t)},expression:"formValidate.is_content"}})],1):e._e(),t("el-form-item",{directives:[{name:"show",rawName:"v-show",value:3!=e.formValidate.factor&&4!=e.formValidate.factor&&1==e.formValidate.is_content,expression:"formValidate.factor != 3 && formValidate.factor != 4 && formValidate.is_content == 1"}],attrs:{label:"",prop:3!=e.formValidate.factor&&4!=e.formValidate.factor&&1==e.formValidate.is_content?"content":""}},[t("WangEditor",{staticStyle:{width:"90%"},attrs:{content:e.formValidate.content},on:{editorContent:e.getEditorContent}})],1),t("el-form-item",{attrs:{label:"活动状态:",prop:"status","label-for":"status"}},[t("el-switch",{staticClass:"defineSwitch",attrs:{"active-value":1,"inactive-value":0,size:"large","active-text":"开启","inactive-text":"关闭"},model:{value:e.formValidate.status,callback:function(t){e.$set(e.formValidate,"status",t)},expression:"formValidate.status"}})],1)],1),t("el-form-item",[t("el-button",{directives:[{name:"db-click",rawName:"v-db-click"}],attrs:{type:"primary",loading:e.submitOpen},on:{click:function(t){return e.next("formValidate")}}},[e._v("提交")])],1)],1)],1)],1)],1),t("el-dialog",{attrs:{visible:e.modalPic,width:"950px",title:"上传商品图","close-on-click-modal":!1},on:{"update:visible":function(t){e.modalPic=t}}},[e.modalPic?t("uploadPictures",{attrs:{isChoice:e.isChoice},on:{getPic:e.getPic}}):e._e()],1),t("el-dialog",{attrs:{visible:e.addGoodsModel,width:"720px",title:e.title,"close-on-click-modal":!1},on:{"update:visible":function(t){e.addGoodsModel=t}}},[e.addGoodsModel?t("addGoods",{ref:"addGoodsForm",attrs:{editData:e.editData},on:{addGoodsData:e.addGoodsData}}):e._e(),t("div",{staticClass:"acea-row row-right mt20"},[t("el-button",{directives:[{name:"db-click",rawName:"v-db-click"}],on:{click:function(t){e.addGoodsModel=!1}}},[e._v("取消")]),t("el-button",{directives:[{name:"db-click",rawName:"v-db-click"}],attrs:{type:"primary"},on:{click:e.submitAddGoods}},[e._v("提交")])],1)],1),t("el-dialog",{attrs:{visible:e.selectLabelShow,scrollable:"",title:"请选择用户标签",closable:!1,width:"540px","footer-hide":!0,"mask-closable":!1},on:{"update:visible":function(t){e.selectLabelShow=t}}},[e.selectLabelShow?t("userLabel",{ref:"userLabel",attrs:{uid:0,only_get:!0,selectDataLabel:e.selectDataLabel},on:{activeData:e.activeSelectData,close:e.labelClose}}):e._e()],1)],1)}),[],!1,null,"16ff3b62",null);t.default=r.exports},eab1:function(e,t,a){a("caad"),a("b0c0"),a("4de4"),a("14d9"),a("a434"),a("4ec9"),a("b64b"),a("d3b7"),a("3ca3"),a("159b"),a("ddb0");var i=a("e449"),r=a("b0e7"),s=a("c4ad"),o=a("5334");r={components:{uploadPictures:r.a,goodsList:s.default,freightTemplate:o.a,couponList:i.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;Object.keys(this.editData).forEach((function(t){e.formValidate[t]=e.editData[t],"coupon_title"===t&&e.editData[t]&&e.couponName.push({title:e.editData[t],id:e.editData.coupon_id})}))},methods:{changeGoods:function(){this.modals=!0,this.$refs.goodslist.getList(),this.$refs.goodslist.goodsCategory()},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)}))}}},a("1666"),s=a("2877"),o=Object(s.a)(r,(function(){var e=this,t=e._self._c;return t("div",[t("el-form",{ref:"formValidate",attrs:{model:e.formValidate,rules:e.ruleValidate,"label-width":"90px"}},[t("el-form-item",{attrs:{label:"奖品:",prop:"type"}},[t("el-radio-group",{model:{value:e.formValidate.type,callback:function(t){e.$set(e.formValidate,"type",t)},expression:"formValidate.type"}},[t("el-radio",{attrs:{label:1}},[e._v("未中奖")]),t("el-radio",{attrs:{label:5}},[e._v("优惠券")]),t("el-radio",{attrs:{label:2}},[e._v("积分")]),t("el-radio",{attrs:{label:6}},[e._v("商品")]),t("el-radio",{attrs:{label:4}},[e._v("红包")]),t("el-radio",{attrs:{label:3}},[e._v("余额")])],1)],1),5==e.formValidate.type?t("el-form-item",{attrs:{label:"赠送优惠券:"}},[e.couponName.length?t("div",{staticClass:"mb20"},e._l(e.couponName,(function(a,i){return t("el-tag",{key:i,attrs:{closable:""},on:{close:function(t){return e.handleClose(a)}}},[e._v(e._s(a.title))])})),1):e._e(),e.couponName.length?e._e():t("el-button",{directives:[{name:"db-click",rawName:"v-db-click"}],attrs:{type:"primary"},on:{click:e.addCoupon}},[e._v("添加优惠券")])],1):e._e(),[2,3,4].includes(e.formValidate.type)?t("el-form-item",{attrs:{label:[3,4].includes(e.formValidate.type)?"金额信息":"积分数量",prop:"num"}},[t("el-input-number",{staticStyle:{width:"300px"},attrs:{controls:!1,placeholder:"请输入金额数量",max:9999999999,min:.1},model:{value:e.formValidate.num,callback:function(t){e.$set(e.formValidate,"num",t)},expression:"formValidate.num"}}),t("div",{staticClass:"ml100 grey"},[e._v("\n "+e._s(3==e.formValidate.type?"用户领取余额后会自动到账余额账户":4==e.formValidate.type?"用户抽到之后需要在抽奖列表中手动领取需要开通微信支付的商家转账功能金额不能小于0.1元":"")+"\n ")])],1):e._e(),6==e.formValidate.type?t("el-form-item",{attrs:{label:"商品:",prop:"goods_image"}},[e.formValidate.goods_image?[t("div",{staticClass:"upload-list"},[t("img",{attrs:{src:e.formValidate.goods_image}}),t("i",{directives:[{name:"db-click",rawName:"v-db-click"}],staticClass:"el-icon-error",staticStyle:{"font-size":"16px"},on:{click:function(t){return e.removeGoods()}}})])]:t("div",{directives:[{name:"db-click",rawName:"v-db-click"}],staticClass:"upLoad pictrueTab acea-row row-center-wrapper",on:{click:e.changeGoods}},[t("i",{staticClass:"el-icon-picture-outline",staticStyle:{"font-size":"24px"}})])],2):e._e(),t("el-form-item",{attrs:{label:"奖品名称:",prop:"name"}},[t("el-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),t("el-form-item",{attrs:{label:"奖品图片:",prop:"image"}},[e.formValidate.image?[t("div",{staticClass:"upload-list"},[t("img",{attrs:{src:e.formValidate.image}}),t("i",{directives:[{name:"db-click",rawName:"v-db-click"}],staticClass:"el-icon-error",staticStyle:{"font-size":"16px"},on:{click:function(t){return e.remove()}}})])]:t("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[t("i",{directives:[{name:"db-click",rawName:"v-db-click"}],staticClass:"el-icon-picture-outline",staticStyle:{"font-size":"24px"},on:{click:function(t){e.modalPic=!0}}})])],2),t("el-form-item",{attrs:{label:"奖品数量:",prop:"total"}},[t("el-input-number",{staticStyle:{width:"300px"},attrs:{controls:!1,placeholder:"请输入奖品数量",max:9999999999,min:0,precision:0},model:{value:e.formValidate.total,callback:function(t){e.$set(e.formValidate,"total",t)},expression:"formValidate.total"}})],1),t("el-form-item",{attrs:{label:"奖品概率(%)",prop:"percent"}},[t("el-input-number",{staticStyle:{width:"300px"},attrs:{controls:!1,placeholder:"请输入奖品概率",max:100,min:0,precision:2},model:{value:e.formValidate.percent,callback:function(t){e.$set(e.formValidate,"percent",t)},expression:"formValidate.percent"}})],1),t("el-form-item",{attrs:{label:"提示语:",prop:"prompt"}},[t("el-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)],1),t("el-dialog",{attrs:{visible:e.modalPic,modal:!1,width:"1024px",title:"上传图片","close-on-click-modal":!1},on:{"update:visible":function(t){e.modalPic=t}}},[e.modalPic?t("uploadPictures",{attrs:{isChoice:e.isChoice},on:{getPic:e.getPic}}):e._e()],1),t("el-dialog",{staticClass:"paymentFooter",attrs:{visible:e.modals,modal:!1,title:"商品列表",width:"1000px"},on:{"update:visible":function(t){e.modals=t}}},[t("goods-list",{ref:"goodslist",on:{getProductId:e.getProductId}})],1),t("coupon-list",{ref:"couponTemplates",attrs:{luckDraw:!0},on:{getCouponId:e.getCouponId}})],1)}),[],!1,null,"0eea8221",null);t.a=o.exports},ff7b:function(e,t,a){}}]);