(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1d9c18be"],{1491:function(t,e,r){"use strict";r.d(e,"B",(function(){return i})),r.d(e,"z",(function(){return n})),r.d(e,"g",(function(){return s})),r.d(e,"C",(function(){return o})),r.d(e,"y",(function(){return c})),r.d(e,"l",(function(){return u})),r.d(e,"r",(function(){return d})),r.d(e,"c",(function(){return l})),r.d(e,"D",(function(){return m})),r.d(e,"a",(function(){return _})),r.d(e,"b",(function(){return p})),r.d(e,"o",(function(){return f})),r.d(e,"p",(function(){return h})),r.d(e,"t",(function(){return g})),r.d(e,"x",(function(){return v})),r.d(e,"w",(function(){return y})),r.d(e,"d",(function(){return b})),r.d(e,"e",(function(){return w})),r.d(e,"n",(function(){return j})),r.d(e,"v",(function(){return x})),r.d(e,"j",(function(){return O})),r.d(e,"s",(function(){return I})),r.d(e,"k",(function(){return U})),r.d(e,"i",(function(){return S})),r.d(e,"h",(function(){return P})),r.d(e,"m",(function(){return k})),r.d(e,"q",(function(){return $})),r.d(e,"A",(function(){return C})),r.d(e,"f",(function(){return G})),r.d(e,"u",(function(){return B}));var a=r("b775");function i(t){return Object(a["a"])({url:"/orders/get_agent_gift_bag",method:"get",params:t})}function n(t){return Object(a["a"])({url:"/orders/add_list_tag",method:"post",data:t})}function s(t){return Object(a["a"])({url:"/orders/BatchAddTag",method:"post",data:t})}function o(t){return Object(a["a"])({url:"/orders/export_list",method:"get",params:t})}function c(){return Object(a["a"])({url:"/activity/getactivityinfo",method:"get"})}function u(t){return Object(a["a"])({url:"/orders/GetActivityLimit",method:"get",params:t})}function d(t){return Object(a["a"])({url:"/UserImg/GetUserInfo",method:"get",params:t})}function l(t){return Object(a["a"])({url:"/UserImg/AddUserImgInfo",method:"post",data:t})}function m(t){return Object(a["a"])({url:"/UserImg/uploadImage",method:"post",data:t})}function _(t){return Object(a["a"])({url:"/UserImg/AddUpdateImg",method:"get",params:t})}function p(t){return Object(a["a"])({url:"/UserImg/AddUpdateImgB",method:"get",params:t})}function f(t){return Object(a["a"])({url:"/UserImg/GetImgStatus",method:"get",params:t})}function h(t){return Object(a["a"])({url:"/UserImg/GetImgStatusB",method:"get",params:t})}function g(t){return Object(a["a"])({url:"/UserImg/GetUserList",method:"get",params:t})}function v(t){return Object(a["a"])({url:"/UserImg/UpdateUserImgInfoB ",method:"post",data:t})}function y(t){return Object(a["a"])({url:"/UserImg/UpdateUserImgInfo",method:"post",data:t})}function b(t){return Object(a["a"])({url:"/UserImg/AgainCreateImg",method:"get",params:t})}function w(t){return Object(a["a"])({url:"/UserImg/AgainCreateImgB",method:"get",params:t})}function j(t){return Object(a["a"])({url:"/UserImg/GetCrownInfo",method:"get",params:t})}function x(t){return Object(a["a"])({url:"/UserImg/UpdateCrownImgInfo",method:"post",data:t})}function O(t){return Object(a["a"])({url:"/UserImg/DeleteUserImg",method:"get",params:t})}function I(t){return Object(a["a"])({url:"/UserImg/GetUserInfos",method:"get",params:t})}function U(t){return Object(a["a"])({url:"/UserImg/ExportAddress",method:"get",params:t})}function S(t){return Object(a["a"])({url:"/CrownBigGiftInfo",method:"get",params:t})}function P(t){return Object(a["a"])({url:"/BigGiftInfo",method:"get",params:t})}function k(t){return Object(a["a"])({url:"/BigGift/GetApplyList",method:"get",params:t})}function $(t){return Object(a["a"])({url:"/BigGift/GetUserInfo",method:"get",params:t})}function C(t){return Object(a["a"])({url:"/BigGift/editBelongToUser",method:"post",data:t})}function G(t){return Object(a["a"])({url:"/BigGift/ApplySuccess",method:"post",data:t})}function B(t){return Object(a["a"])({url:"/BigGift/UpdateApply",method:"post",data:t})}},"2c2f":function(t,e,r){"use strict";r("f4a9")},"7db7":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"app-container"},[r("el-form",{staticClass:"form1",attrs:{"label-width":"120px"}},[r("div",{staticClass:"form-title"},[t._v("工作室兑换时间设置")]),t._v(" "),t.is_set?[r("div",{staticStyle:{width:"100% !important"}},[r("el-form-item",{attrs:{label:"选择活动:"}},[r("el-select",{staticStyle:{width:"200px !important"},model:{value:t.setParams.activity_id,callback:function(e){t.$set(t.setParams,"activity_id",e)},expression:"setParams.activity_id"}},t._l(t.activitys,(function(t){return r("el-option",{key:t.id,attrs:{label:t.title,value:t.id}})})),1)],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"开始兑换时间:"}},[r("el-date-picker",{staticStyle:{width:"300px"},attrs:{type:"datetime",placeholder:"选择日期时间","value-format":"yyyy-MM-dd hh:mm:ss"},model:{value:t.setParams.start_time,callback:function(e){t.$set(t.setParams,"start_time",e)},expression:"setParams.start_time"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"结束兑换时间:"}},[r("el-date-picker",{staticStyle:{width:"300px"},attrs:{type:"datetime",placeholder:"选择日期时间","value-format":"yyyy-MM-dd hh:mm:ss"},model:{value:t.setParams.end_time,callback:function(e){t.$set(t.setParams,"end_time",e)},expression:"setParams.end_time"}})],1),t._v(" "),r("el-form-item",{staticStyle:{"margin-top":"50px"}},[r("el-button",{attrs:{type:"primary"},on:{click:t.toSetTime}},[t._v("设置")]),t._v(" "),r("el-button",{on:{click:function(e){t.is_set=!1}}},[t._v("取消")])],1)]:[r("el-form-item",{attrs:{label:"活动名称:"}},[r("el-select",{staticStyle:{width:"400px"},model:{value:t.getParams.activity_id,callback:function(e){t.$set(t.getParams,"activity_id",e)},expression:"getParams.activity_id"}},t._l(t.activitys,(function(t){return r("el-option",{key:t.id,attrs:{label:t.title,value:t.id}})})),1)],1),t._v(" "),r("el-form-item",{attrs:{label:"开始时间:"}},[t._v("\n "+t._s(t.getParams.start_time||"暂未设置")+"\n ")]),t._v(" "),r("el-form-item",{attrs:{label:"结束时间:"}},[t._v("\n "+t._s(t.getParams.end_time||"暂未设置")+"\n ")]),t._v(" "),r("el-form-item",{staticStyle:{"margin-top":"50px"}},[r("el-button",{attrs:{type:"primary"},on:{click:function(e){t.is_set=!0}}},[t._v(t._s(t.getParams.start_time?"修改":"设置"))])],1)]],2),t._v(" "),r("el-form",{staticClass:"form2",attrs:{"label-width":"120px"}},[r("div",{staticClass:"form-title"},[t._v("工作室兑换比例设置")]),t._v(" "),r("div",{staticClass:"block"},[r("el-timeline",[r("el-timeline-item",{attrs:{placement:"top",color:"#0bbd87"}},[r("el-card",[r("h4",[t._v("第一阶段")]),t._v(" "),r("el-form-item",{attrs:{label:"订单金额小于:"}},[r("el-input",{staticStyle:{width:"60px"},attrs:{placeholder:"请输入兑换金额",readonly:t.change},model:{value:t.proportion.studio_first_reward_money,callback:function(e){t.$set(t.proportion,"studio_first_reward_money",e)},expression:"proportion.studio_first_reward_money"}}),t._v(" "),r("span",[t._v("万")])],1),t._v(" "),r("el-form-item",{staticClass:"input-text input-text1",attrs:{label:"兑换比例:"}},[r("el-input",{staticClass:"input-text",attrs:{placeholder:"请输入兑换比例",readonly:t.change},model:{value:t.proportion.studio_first_reward_scale,callback:function(e){t.$set(t.proportion,"studio_first_reward_scale",e)},expression:"proportion.studio_first_reward_scale"}})],1),t._v(" "),r("div",{staticClass:"danwei"},[t._v("%")])],1)],1),t._v(" "),r("el-timeline-item",{attrs:{placement:"top",color:"#F27C0A"}},[r("el-card",[r("h4",[t._v("第二阶段")]),t._v(" "),r("el-form-item",{attrs:{label:"订单金额: "}},[r("el-input",{staticStyle:{width:"60px"},attrs:{placeholder:"请输入兑换金额",readonly:t.change},model:{value:t.proportion.studio_second_reward_money,callback:function(e){t.$set(t.proportion,"studio_second_reward_money",e)},expression:"proportion.studio_second_reward_money"}}),t._v(" "),r("span",[t._v("万")]),t._v(" "),r("span",[t._v("(大于等于"+t._s(t.proportion.studio_first_reward_money)+"万,小于"+t._s(t.proportion.studio_third_reward_money)+"万)")])],1),t._v(" "),r("el-form-item",{staticClass:"input-text input-text1",attrs:{label:"兑换比例:"}},[r("el-input",{staticClass:"input-text",attrs:{placeholder:"请输入兑换比例",readonly:t.change},model:{value:t.proportion.studio_second_reward_scale,callback:function(e){t.$set(t.proportion,"studio_second_reward_scale",e)},expression:"proportion.studio_second_reward_scale"}})],1),t._v(" "),r("div",{staticClass:"danwei"},[t._v("%")])],1)],1),t._v(" "),r("el-timeline-item",{attrs:{placement:"top",color:"#69BEFC"}},[r("el-card",[r("h4",[t._v("第三阶段")]),t._v(" "),r("el-form-item",{attrs:{label:"订单金额:"}},[r("el-input",{staticStyle:{width:"60px"},attrs:{placeholder:"请输入兑换金额",readonly:t.change},model:{value:t.proportion.studio_third_reward_money,callback:function(e){t.$set(t.proportion,"studio_third_reward_money",e)},expression:"proportion.studio_third_reward_money"}}),t._v(" "),r("span",[t._v("万(大于等于"+t._s(t.proportion.studio_second_reward_money)+"万)")])],1),t._v(" "),r("el-form-item",{staticClass:"input-text input-text1",attrs:{label:"兑换比例:"}},[r("el-input",{staticClass:"input-text",attrs:{placeholder:"请输入兑换比例",readonly:t.change},model:{value:t.proportion.studio_third_reward_scale,callback:function(e){t.$set(t.proportion,"studio_third_reward_scale",e)},expression:"proportion.studio_third_reward_scale"}})],1),t._v(" "),r("div",{staticClass:"danwei"},[t._v("%")])],1)],1)],1),t._v(" "),r("el-form-item",{staticStyle:{"margin-top":"30px"}},[r("el-button",{attrs:{type:"primary"},on:{click:t.SetStudioSystem}},[t._v(t._s(t.change?"修改":"设置"))]),t._v(" "),0==t.change?r("el-button",{on:{click:function(e){t.change=!0}}},[t._v("取消")]):t._e()],1)],1)])],1)},i=[],n=r("c7eb"),s=(r("96cf"),r("1da1")),o=r("b775");function c(t){return Object(o["a"])({url:"/studio/get_studio_time",method:"get",params:t})}function u(t){return Object(o["a"])({url:"/studio/set_studio_time",method:"get",params:t})}function d(t){return Object(o["a"])({url:"/studio/GetStudioSystem",method:"get",params:t})}function l(t){return Object(o["a"])({url:"/studio/SetStudioSystem",method:"get",params:t})}var m=r("1491"),_={data:function(){return{activitys:[],is_set:!1,getParams:{activity_id:"",start_time:"",end_time:""},proportion:{studio_first_reward_money:"",studio_first_reward_scale:"",studio_second_reward_money:"",studio_second_reward_scale:"",studio_third_reward_money:"",studio_third_reward_scale:""},setParams:{start_time:"",end_time:"",activity_id:""},change:!0}},watch:{"getParams.activity_id":function(){this.toGetTime()}},mounted:function(){this.activityList(this.toGetTime),this.GetStudioSystem()},methods:{GetStudioSystem:function(){var t=Object(s["a"])(Object(n["a"])().mark((function t(){var e=this;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:d().then((function(t){console.log(t),e.proportion={studio_first_reward_money:t.data.studio_first_reward.money,studio_first_reward_scale:t.data.studio_first_reward.scale,studio_second_reward_money:t.data.studio_second_reward.money,studio_second_reward_scale:t.data.studio_second_reward.scale,studio_third_reward_money:t.data.studio_third_reward.money,studio_third_reward_scale:t.data.studio_third_reward.scale}}));case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),SetStudioSystem:function(){var t=this;this.change=!this.change,console.log(this.change),!0===this.change&&this.$confirm("此操作将修工作室兑换比例, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e=t.proportion;l(e).then((function(e){200===e.code?t.$message({type:"success",message:"操作成功"}):t.$message.error(e.message||"兑换比例设置失败")}))})).catch((function(){t.change=!0,t.$message({type:"info",message:"操作取消"})}))},activityList:function(){var t=Object(s["a"])(Object(n["a"])().mark((function t(e){var r=this;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loadingFull=!0,t.next=3,Object(m["y"])().then((function(t){r.loadingFull=!1,200===t.code&&(r.activitys=t.data,t.data.map((function(t){1===t.is_ing&&(r.getParams.activity_id=t.id)}))),e&&e()})).catch((function(t){r.loadingFull=!1,e&&e()}));case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),toGetTime:function(){var t=this,e=this.$loading();c({activity_id:this.getParams.activity_id}).then((function(r){e.close(),200===r.code?(t.getParams.start_time=r.data.start_time,t.getParams.end_time=r.data.end_time):t.$message.error(r.message||"获取时间设置失败")})).catch((function(){e.close(),t.$message.error("获取时间设置失败")}))},toSetTime:function(){var t=this;if(!this.setParams.activity_id)return this.$message.error("请选择活动"),!1;if(!this.setParams.start_time||!this.setParams.end_time)return this.$message.error("请设置完整"),!1;if(new Date(this.setParams.start_time).getTime()>new Date(this.setParams.end_time).getTime())return this.$message.error("结束兑换时间必须大于开始兑换时间"),!1;var e=this.$loading();u(this.setParams).then((function(r){e.close(),200===r.code?t.$confirm("此操作将修工作室兑换时间, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.is_set=!t.is_set,t.$message({type:"success",message:"操作成功"}),t.toGetTime()})):t.$message.error(r.message||"时间设置失败")})).catch((function(){e.close(),t.$message.error("时间设置失败")}))}}},p=_,f=(r("2c2f"),r("2877")),h=Object(f["a"])(p,a,i,!1,null,null,null);e["default"]=h.exports},f4a9:function(t,e,r){}}]);