webpackJsonp([28],{"38GJ":function(e,t){},OoPs:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a("woOf"),i=a.n(o),r=a("Dd8w"),s=a.n(r),n=a("AKaA"),l=a("NTL1"),c=a("SJI6"),d=a("8V46"),m={name:"MainstoreDailog",props:{dialogVisible:{type:Boolean,default:!1},ajaxObj:{type:Object,default:function(){return{pageName:""}}},selectObj:{type:Object,default:function(){return{totalCount:0,selectAll:!1,multipleList:[]}}}},data:function(){return{visible:!1,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:s()({},Object(c.mapState)(["showEditClique"])),watch:{dialogVisible:function(e,t){this.visible=e}},methods:{cancel:function(){this.$refs.form.resetFields(),this.$emit("update:dialogVisible",!1)},getMainStoreCodeName:function(e){var t=this;this.loading=!0,Object(n.c)(l.a.storeCodeName,{searchParam:e,flag:1}).then(function(e){0===e.data.errorCode?t.mainstoreList=e.data.result:Object(d.a)(e.data.message)}).catch(function(e){Object(d.b)(e)}).finally(function(e){return t.loading=!1})},submit:function(){var e=this;this.$refs.form.validate(function(t){if(!t)return!1;var a=e.selectObj,o=a.selectAll,r=a.multipleList,s=e.ajaxObj,c=s.pageSize,m=s.phoneNameCard,u=s.storeId;e.btnLoading=!0;var f=[];r.forEach(function(e){f.push(e.memberId)});var p=i()({},e.form,{memberIds:f.join(","),isCurrent:1==o?2:r.length==c?1:0,optType:1,mainOptType:4,listSign:"MemberProcessed",listSignId:u,sortField:"",phoneNameNick:m||"",memberListType:0});Object(n.a)(l.a.batchUpdateStore,p).then(function(t){0===t.data.errorCode?(Object(d.c)(),e.$refs.form.resetFields(),e.$emit("update:dialogVisible",!1),e.$emit("successImport",t.data.result),e.$emit("refresh")):Object(d.a)()}).catch(function(e){Object(d.b)(e)}).finally(function(t){return e.btnLoading=!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-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"}},[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,"popper-class":"option-wrap",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(t){return a("el-option",{key:t.storeId,attrs:{label:t.storeName,value:t.storeId}},[a("p",{staticClass:"name"},[e._v("\n              "+e._s(t.storeName)+"\n            ")]),e._v(" "),a("p",{staticClass:"code"},[e._v("\n              "+e._s(t.storeCode)+"\n            ")])])}),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":"",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")(m,u,!1,function(e){a("38GJ"),a("g8+R")},"data-v-20e9a220",null);t.default=f.exports},"g8+R":function(e,t){}});