webpackJsonp([6],{hFSw:function(e,t){},lUaT:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("aA9S"),i=a.n(r),l=a("4YfN"),o=a.n(l),s=a("AKaA"),n=a("NTL1"),d=a("SJI6"),c=a("8V46"),m={name:"gradeDailog",props:{dialogVisible:{type:Boolean,default:!1},multipleList:{type:Array,default:function(){return[]}},gradeList:{type:Array,default:function(){return[]}},pageSize:{type:Number,default:""},memberSearchStr:{type:Number,default:""},phoneNameCard:{type:String,default:""},pageName:{type:String,default:""}},data:function(){return{form:{gradeId:"",remark:"",isClique:0},rules:{gradeId:[{required:!0,message:"请选择等级",trigger:"change"}],remark:[{required:!0,message:"请输入原因备注",trigger:"change"}]},btnLoading:!1}},computed:o()({},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;var a=[];e.multipleList.forEach(function(e){a.push(e.memberId)}),Object(s.a)(n.a.updateGrade,i()({},e.form,{memberIds:1==e.selectAll?"-1":a.join(","),isCurrent:1==e.selectAll?2:e.multipleList.length==e.pageSize?1:0,memberSearchParamStr:1==e.selectAll?e.memberSearchStr?e.memberSearchStr:"-1":"",phoneNameCard:e.phoneNameCard,pageName:e.pageName})).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)}}},u={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("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}},[a("div",{staticClass:"checkedCustomers"},[e._v("当前选中"),a("span",{staticClass:"num"},[e._v(" "+e._s(e.multipleList.length)+" ")]),e._v("位客户")]),e._v(" "),a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"133px"}},[e.showEditClique?a("el-form-item",{attrs:{label:"等级类型：",prop:"gradeType"}},[a("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(" "),a("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(" "),a("el-form-item",{attrs:{label:"调整后等级：",prop:"gradeId"}},[a("el-select",{staticStyle:{width:"400px"},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 a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"原因备注：",prop:"remark"}},[a("el-input",{staticStyle:{width:"400px"},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(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancel}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary",loading:e.btnLoading},on:{click:e.submit}},[e._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var f=a("C7Lr")(m,u,!1,function(e){a("hFSw"),a("t2i3")},"data-v-ba849c48",null);t.default=f.exports},t2i3:function(e,t){}});