webpackJsonp([23],{"58by":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r("woOf"),a=r.n(i),o=r("Dd8w"),l=r.n(o),n=r("AKaA"),s=r("NTL1"),d=r("8V46"),c={name:"CustomergradeDialog",props:{dialogVisible:{type:Boolean,default:!1},gradeId:{type:String,default:""},gradeList:{type:Array,default:function(){return[]}},memberId:{type:String,default:""}},data:function(){return{visible:!1,form:{memberId:"",gradeId:"",remark:""},rules:{gradeId:[{required:!0,message:"请选择修改后等级",trigger:"change"}],remark:[{required:!0,message:"请输入原因备注",trigger:"change"}]},btnLoading:!1}},watch:{dialogVisible:function(e,t){this.visible=e,e&&(this.form=l()({},this.form,{gradeId:this.gradeId,memberId:this.memberId}))}},methods:{cancel:function(){this.$refs.form.resetFields(),this.$emit("update:dialogVisible",!1)},submit:function(){var e=this;this.$refs.form.validate(function(t){if(!t)return!1;e.btnLoading=!0,Object(n.a)(s.a.memberGrade,a()({},e.form)).then(function(t){0===t.data.errorCode?setTimeout(function(){e.btnLoading=!1,Object(d.c)(),e.$refs.form.resetFields(),e.$emit("update:dialogVisible",!1),e.$emit("refresh")},2e3):(Object(d.a)(),e.btnLoading=!1)}).catch(function(t){e.btnLoading=!1,Object(d.b)(t)})})}}},m={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-dialog",{attrs:{title:"修改等级","custom-class":"customer-dialog",visible:e.visible,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(t){e.visible=t},close:e.cancel}},[r("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"133px"}},[r("el-form-item",{attrs:{label:"修改后等级：",prop:"gradeId"}},[r("el-select",{staticStyle:{width:"386px"},attrs:{placeholder:"请选择"},model:{value:e.form.gradeId,callback:function(t){e.$set(e.form,"gradeId",t)},expression:"form.gradeId"}},e._l(e.gradeList,function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"原因备注：",prop:"remark"}},[r("el-input",{staticStyle:{width:"386px"},attrs:{type:"text",maxlength:"20","show-word-limit":"",placeholder:"请输入内容"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.cancel}},[e._v("取消")]),e._v(" "),r("el-button",{attrs:{type:"primary",loading:e.btnLoading},on:{click:e.submit}},[e._v("确定")])],1)],1)],1)},staticRenderFns:[]};var f=r("VU/8")(c,m,!1,function(e){r("l5zG")},null,null);t.default=f.exports},l5zG:function(e,t){}});