webpackJsonp([61],{lJ8c:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=o("NTL1"),l=o("8V46"),r={props:{dialogVisible:{type:Boolean,default:!1}},filters:{formatType:function(e){switch(e=+e){case 11:return"积分增加";case 12:return"积分扣除";case 13:return"等级调整";case 14:return"服务门店_专属导购调整";case 15:return"批量冻结会员";case 16:return"批量解冻会员"}}},data:function(){return{actionUrl:a.a.uploadExecl,importType:"",dialogImport:!1,formByImport:{importValue:"",fileList:[]},expendParams:{requestProject:"member",batchType:""},rules:{importValue:[{required:!0,message:"请选择导入类型",trigger:"change"}]},rows:0,load:!1}},watch:{dialogVisible:function(e,t){this.dialogImport=e}},methods:{handleChangeType:function(e){console.log(e),this.expendParams.batchType=e},openDialogImport:function(){this.formByImport.importValue="",this.dialogImport=!0},onDialogImportClosed:function(){this.$refs.formByImport.resetFields(),this.$emit("update:dialogVisible",!1)},downloadTemplate:function(){window.location.href=a.a.downLoadExcelTemplate+"?requestProject=member&batchType="+this.formByImport.importValue},importTable:function(){var e=this;this.$refs.formByImport.validateField("importValue",function(t){t||(e.formByImport.fileList.length?(e.load=!0,e.$refs.memberUpload.submit()):Object(l.a)("请上传积分数据"))})},beforeUpload:function(e){var t=e.size/1024/1024<1,o=e.name.split("."),a=o[o.length-1];return["xlsx","xlc","xlm","xls","xlt","xlw","csv"].some(function(e){return e===a})?t?void 0:(this.$message.error("上传模板大小不能超过 1MB"),!1):(this.$message.warning("请上传excel表格"),!1)},handleChange:function(e,t){this.formByImport.fileList=t},handelExceed:function(){this.$message.warning("超出最大上传数")},handleError:function(){Object(l.a)("上传失败"),this.$refs.memberUpload.clearFiles(),this.load=!1},handleSuccess:function(e,t,o){0==e.errorCode?(Object(l.c)("上传成功"),this.load=!1,this.$refs.memberUpload.clearFiles(),this.$emit("update:dialogVisible",!1),this.$emit("successImport",e.result)):(this.$refs.memberUpload.clearFiles(),this.load=!1,Object(l.a)(e.message))}},created:function(){}},i={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("el-dialog",{attrs:{title:"新建导入","custom-class":"customer-dialog",visible:e.dialogImport,width:"600px"},on:{"update:visible":function(t){e.dialogImport=t},closed:e.onDialogImportClosed}},[o("el-form",{ref:"formByImport",staticStyle:{"margin-bottom":"36px"},attrs:{rules:e.rules,model:e.formByImport,"label-width":"100px","label-suffix":"："}},[o("el-form-item",{attrs:{label:"导入类型",prop:"importValue"}},[o("el-select",{attrs:{placeholder:"请选择导入类型"},on:{change:e.handleChangeType},model:{value:e.formByImport.importValue,callback:function(t){e.$set(e.formByImport,"importValue",t)},expression:"formByImport.importValue"}},[o("el-option",{attrs:{label:"积分增加",value:"11"}}),e._v(" "),o("el-option",{attrs:{label:"积分扣除",value:"12"}}),e._v(" "),o("el-option",{attrs:{label:"等级调整",value:"13"}}),e._v(" "),o("el-option",{attrs:{label:"服务门店/专属导购调整",value:"14"}}),e._v(" "),o("el-option",{attrs:{label:"批量冻结会员",value:"15"}}),e._v(" "),o("el-option",{attrs:{label:"批量解冻会员",value:"16"}})],1)],1),e._v(" "),o("el-form-item",{attrs:{label:"选择文件",prop:"file",required:""}},[o("el-upload",{directives:[{name:"loading",rawName:"v-loading",value:e.load,expression:"load"}],ref:"memberUpload",staticClass:"upload-demo",attrs:{action:e.actionUrl,accept:".xlsx","file-list":e.formByImport.fileList,"before-upload":e.beforeUpload,limit:1,data:e.expendParams,"with-credentials":!0,"on-error":e.handleError,"on-exceed":e.handelExceed,"on-change":e.handleChange,"on-success":e.handleSuccess,"auto-upload":!1}},[o("div",{attrs:{slot:"trigger"},slot:"trigger"},[o("div",{staticClass:"importBox"},[o("i",{staticClass:"iconfont icon-shangchuan"}),e._v("\n            点击上传\n          ")])]),e._v(" "),e.formByImport.importValue?o("el-button",{staticStyle:{"font-size":"12px","margin-left":"12px"},attrs:{type:"text"},on:{click:e.downloadTemplate}},[e._v("\n          点击下载"+e._s(e._f("formatType")(e.formByImport.importValue))+"模板\n        ")]):e._e()],1)],1)],1),e._v(" "),o("div",{staticClass:"dialogTips"},[o("h3",[e._v("导入规则")]),e._v(" "),o("p",[e._v("1. 通过导入Excel表格的形式变更GIC已存在会员的积分等级门店；不支持导入新会员数据 ")]),e._v(" "),o("p",[e._v("2. 仅支持.xlsx 文件的导入；每次导入数据量最多为10000条；文件大小不超过1M ")]),e._v(" "),o("p",[e._v("3. 导入类型不同，文件模板也不同，请严格按照模板内容填入会员数据，否则将会报错 ")]),e._v(" "),o("p",[e._v("4. 请仔细核对需要变更的会员数据是否准确，否则GIC校验不通过将无法执行成功")]),e._v(" "),o("p",[e._v("5. 超管账号支持导入变更全部会员信息，已分权商户的子管理员账号仅可修改管辖范围内的会员信息")])]),e._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:e.onDialogImportClosed}},[e._v("取 消")]),e._v(" "),o("el-button",{attrs:{type:"primary",disable:e.load},on:{click:e.importTable}},[e._v("确 定")])],1)],1)},staticRenderFns:[]};var s=o("VU/8")(r,i,!1,function(e){o("qLaC")},"data-v-0c74d6e3",null);t.default=s.exports},qLaC:function(e,t){}});