webpackJsonp([8],{"49fy":function(e,t){},hFH9:function(e,t){},lUaT:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("woOf"),i=a.n(r),l=a("Dd8w"),o=a.n(l),s=a("AKaA"),n=a("NTL1"),c=a("SJI6"),u=a("8V46"),d={name:"GradeDailog",props:{dialogVisible:{type:Boolean,default:!1},gradeList:{type:Array,default:function(){return[]}},cliqueGradeList:{type:Array,default:function(){return[]}},ajaxObj:{type:Object,default:function(){return{pageName:""}}},selectObj:{type:Object,default:function(){return{visible:!1,totalCount:0,selectAll:!1,multipleList:[]}}}},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(c.mapState)(["showEditClique"])),watch:{dialogVisible:function(e,t){this.visible=e,e&&this.showEditClique&&(this.form.isClique=1)}},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;var a=e.selectObj,r=a.selectAll,l=a.multipleList,o=e.ajaxObj,c=o.memberSearchStr,d=o.pageSize,m=o.phoneNameCard,f=o.pageName;e.btnLoading=!0;var b=[];l.forEach(function(e){b.push(e.memberId)}),Object(s.a)(n.a.updateGrade,i()({},e.form,{memberIds:1==r?"-1":b.join(","),isCurrent:1==r?2:l.length==d?1:0,memberSearchParamStr:1==r?c||"-1":"",phoneNameCard:m,pageName:f})).then(function(t){0===t.data.errorCode?(Object(u.c)(),e.$refs.form.resetFields(),e.$emit("update:dialogVisible",!1),e.$emit("successImport",t.data.result),e.$emit("refresh")):Object(u.a)()}).catch(function(e){Object(u.b)(e)}).finally(function(t){return e.btnLoading=!1})})}}},m={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("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}},[a("div",{staticClass:"checkedCustomers"},[e._v("\n      当前选中"),a("span",{staticClass:"num"},[e._v("\n        "+e._s(e.selectObj.selectAll?e.selectObj.totalCount:e.selectObj.multipleList.length)+" ")]),e._v("位客户\n    ")]),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("\n          集团等级\n        ")]),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("\n          商户等级\n        ")])],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"}},[1===e.form.isClique?e._l(e.cliqueGradeList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}):e._l(e.gradeList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})],2)],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":"",placeholder:"请输入内容"},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("VU/8")(d,m,!1,function(e){a("hFH9"),a("49fy")},"data-v-fbdfb060",null);t.default=f.exports}});