webpackJsonp([30],{QWb5:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("aA9S"),i=a.n(r),o=a("4YfN"),n=a.n(o),l=a("AKaA"),s=a("NTL1"),m=a("SJI6"),c=a("8V46"),d={name:"mainstoreDailog",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:{remark:"",optType:1,mainOptType:4,mainStoreId:""},rules:{mainStoreId:[{required:!0,message:"请选择服务门店",trigger:"change"}],remark:[{required:!0,message:"请输入原因备注",trigger:"change"}]},mainstoreList:[],loading:!1,btnLoading:!1}},computed:n()({},Object(m.mapState)(["showEditClique"])),methods:{cancel:function(){this.$refs.form.resetFields(),this.$emit("update:dialogVisible",!1)},getMainStoreCodeName:function(e){var t=this;this.loading=!0,Object(l.c)(s.a.storeCodeName,{searchParam:e,flag:1}).then(function(e){0===e.data.errorCode?t.mainstoreList=e.data.result:Object(c.a)(e.data.message)}).catch(function(e){Object(c.b)(e)}).finally(function(e){return t.loading=!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(l.a)(s.a.updateStore,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)})})}}},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"}},[a("el-form-item",{attrs:{label:"服务门店：",prop:"mainStoreId"}},[a("el-select",{staticStyle:{width:"382px"},attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"请输入门店名称/门店code","remote-method":e.getMainStoreCodeName,loading:e.loading},model:{value:e.form.mainStoreId,callback:function(t){e.$set(e.form,"mainStoreId",t)},expression:"form.mainStoreId"}},e._l(e.mainstoreList,function(e){return a("el-option",{key:e.storeId,attrs:{label:e.storeName,value:e.storeId}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"原因备注：",prop:"remark"}},[a("el-input",{staticStyle:{width:"382px"},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")(d,u,!1,function(e){a("mhw1")},"data-v-6a12c182",null);t.default=f.exports},mhw1:function(e,t){}});