webpackJsonp([45],{"58by":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i("aA9S"),a=i.n(r),o=i("4YfN"),l=i.n(o),s=i("AKaA"),n=i("NTL1"),d=i("SJI6"),c=i("8V46"),u={name:"customergradeDialog",props:{dialogVisible:{type:Boolean,default:!1},gradeList:{type:Array,default:function(){return[]}}},data:function(){return{form:{gradeId:"",remark:"",isClique:0},rules:{gradeId:[{required:!0,message:"请选择修改后等级",trigger:"change"}],remark:[{required:!0,message:"请输入原因备注",trigger:"change"}]},btnLoading:!1}},computed:l()({},Object(d.mapState)(["showEditClique"])),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(s.a)(n.a.updateBaseDetail,a()({},e.form)).then(function(t){0===t.data.errorCode?setTimeout(function(){e.btnLoading=!1,Object(c.c)(),e.$refs.form.resetFields(),e.$emit("update:dialogVisible",!1),e.$emit("refresh")},4500):(Object(c.a)(),e.btnLoading=!1)}).catch(function(t){e.btnLoading=!1,Object(c.b)(t)})})}},watch:{dialogVisible:function(e,t){e&&this.showEditClique&&(this.form.isClique=1)}}},f={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-dialog",{attrs:{title:"修改等级","custom-class":"customer-dailog",visible:e.dialogVisible,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.cancel}},[i("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"133px"}},[e.showEditClique?i("el-form-item",{attrs:{label:"等级类型：",prop:"gradeType"}},[i("el-radio",{attrs:{label:1},on:{change:function(t){e.form.gradeId=""}},model:{value:e.form.isClique,callback:function(t){e.$set(e.form,"isClique",t)},expression:"form.isClique"}},[e._v("集团等级")]),e._v(" "),i("el-radio",{attrs:{label:0},on:{change:function(t){e.form.gradeId=""}},model:{value:e.form.isClique,callback:function(t){e.$set(e.form,"isClique",t)},expression:"form.isClique"}},[e._v("商户等级")])],1):e._e(),e._v(" "),i("el-form-item",{attrs:{label:"调整后等级：",prop:"gradeId"}},[i("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 i("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),i("el-form-item",{attrs:{label:"原因备注：",prop:"remark"}},[i("el-input",{staticStyle:{width:"386px"},attrs:{type:"text",maxlength:"20","show-word-limit":""},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.cancel}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary",loading:e.btnLoading},on:{click:e.submit}},[e._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var m=i("C7Lr")(u,f,!1,function(e){i("T698")},null,null);t.default=m.exports},T698:function(e,t){}});