webpackJsonp([33],{Ryi9:function(e,t){},uT4N:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("aA9S"),l=a.n(r),o=a("AKaA"),i=a("NTL1"),s=a("8V46"),n={name:"IntegralDailog",props:{dialogVisible:{type:Boolean,default:!1},ajaxObj:{type:Object,default:function(){return{pageName:""}}},selectObj:{type:Object,default:function(){return{totalCount:0,selectAll:!1,multipleList:[]}}},integralFlag:{type:String,default:""}},data:function(){return{visible:!1,form:{editType:1,accumulatPoints:0,remark:"",settlementStoreId:""},rules:{editType:[{required:!0,message:"请选择调整方式",trigger:"change"}],accumulatPoints:[{required:!0,message:"请选择调整额度",trigger:"change"}],remark:[{required:!0,message:"请输入原因备注",trigger:"change"}],settlementStoreId:[{required:!0,message:"请填写原始成本主体",trigger:"change"}]},btnLoading:!1,loading:!1,storeList:[]}},watch:{dialogVisible:function(e,t){this.visible=e}},methods:{cancel:function(){this.$refs.form.resetFields(),this.$emit("update:dialogVisible",!1)},getStoreCodeName:function(e){var t=this;this.loading=!0,Object(o.c)(i.a.storeCodeName,{searchParam:e,flag:1}).then(function(e){0===e.data.errorCode?t.storeList=e.data.result:Object(s.a)(e.data.message)}).catch(function(e){Object(s.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,r=a.selectAll,n=a.multipleList,c=e.ajaxObj,m=c.memberSearchStr,d=c.pageSize,u=c.phoneNameCard,f=c.pageName;e.btnLoading=!0;var p=[];n.forEach(function(e){p.push(e.memberId)}),Object(o.a)(i.a.updateIntegrals,l()({},e.form,{memberIds:1==r?"-1":p.join(","),isCurrent:1==r?2:n.length==d?1:0,memberSearchParamStr:1==r?m||"-1":"",phoneNameCard:u,pageName:f})).then(function(t){0===t.data.errorCode?(Object(s.c)(""),e.$refs.form.resetFields(),e.$emit("update:dialogVisible",!1),e.$emit("refresh")):Object(s.a)()}).catch(function(e){Object(s.b)(e)}).finally(function(t){return e.btnLoading=!1})})}}},c={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:"editType"}},[a("el-radio-group",{model:{value:e.form.editType,callback:function(t){e.$set(e.form,"editType",t)},expression:"form.editType"}},[a("el-radio",{attrs:{label:1}},[e._v("\n            增加积分\n          ")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("\n            扣除积分\n          ")])],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"调整额度：",prop:"accumulatPoints"}},[a("el-input-number",{staticStyle:{width:"115px"},attrs:{"controls-position":"right",min:1,max:999999},model:{value:e.form.accumulatPoints,callback:function(t){e.$set(e.form,"accumulatPoints",t)},expression:"form.accumulatPoints"}})],1),e._v(" "),"gic"==e.integralFlag&&1==e.form.editType?a("el-form-item",{attrs:{label:"原始成本主体：",prop:"settlementStoreId"}},[a("el-select",{staticStyle:{width:"400px"},attrs:{prop:"settlementStoreId",filterable:"",remote:"","reserve-keyword":"",placeholder:"请输入门店名称/门店code","remote-method":e.getStoreCodeName,loading:e.loading},model:{value:e.form.settlementStoreId,callback:function(t){e.$set(e.form,"settlementStoreId",t)},expression:"form.settlementStoreId"}},e._l(e.storeList,function(e){return a("el-option",{key:e.storeId,attrs:{label:e.storeName,value:e.storeId}})}),1),e._v(" "),a("p",{staticClass:"sub-tip"},[e._v("\n          注：除输入选择具体门店外，还可输入总部，记总部名下\n        ")])],1):e._e(),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 m=a("C7Lr")(n,c,!1,function(e){a("Ryi9")},"data-v-8df2a21c",null);t.default=m.exports}});