Commit b232a2b2 by Kyle_Li

批量积分导入增加入口

parent 948b30fe
......@@ -771,36 +771,76 @@ export default {
checkStatus(err);
});
},
handleVisibleBatch(val) {
if(this.multipleList.length < 1) {
this.batchValue = '';
checkFalse('请勾选会员');
return false;
}
// handleVisibleBatch(val) {
// if(this.multipleList.length < 1) {
// this.batchValue = '';
// checkFalse('请勾选会员');
// return false;
// }
// if (!val) {
// if (this.batchValue == "integral") {
// this.dialogIntegralVisible = true;
// this.getEnterpriseInfo();
// if (this.$refs.IntegralForm) {
// this.$refs.IntegralForm.resetFields();
// }
// }
// if (this.batchValue == "grade") {
// this.dialogGradeVisible = true;
// this.getGradeList();
// if (this.$refs.gradeForm) {
// this.$refs.gradeForm.resetFields();
// }
// }
// if (this.batchValue == "mainstore") {
// this.dialogMainstoreVisible = true;
// if (this.$refs.mainstoreForm) {
// this.$refs.mainstoreForm.resetFields();
// }
// this.storeName = "";
// }
// if (this.batchValue == "store") {
// this.dialogSubStoreVisible = true;
// if (this.$refs.storeForm) {
// this.$refs.storeForm.resetFields();
// }
// this.getSubStoreList();
// }
// }
// },
handleFocusBatch() {
if (this.batchValue == "bulkIntegral") {
this.batchValue = '';
this.$router.push({ path: '/bulkIntegral' });
} else if(this.multipleList.length < 1) {
this.batchValue = '';
checkFalse('请勾选会员');
return false;
}
if (!val) {
if (this.batchValue == "integral") {
this.dialogIntegralVisible = true;
this.dilogIntegralVisible = true;
this.getEnterpriseInfo();
if (this.$refs.IntegralForm) {
this.$refs.IntegralForm.resetFields();
}
}
if (this.batchValue == "grade") {
this.dialogGradeVisible = true;
this.getGradeList();
this.dilogGradeVisible = true;
if (this.$refs.gradeForm) {
this.$refs.gradeForm.resetFields();
}
}
if (this.batchValue == "mainstore") {
this.dialogMainstoreVisible = true;
this.dilogMainstoreVisible = true;
this.selectStore(val);
if (this.$refs.mainstoreForm) {
this.$refs.mainstoreForm.resetFields();
}
this.storeName = "";
this.storeName = '';
}
if (this.batchValue == "store") {
this.dialogSubStoreVisible = true;
this.dilogSubStoreVisible = true;
if (this.$refs.storeForm) {
this.$refs.storeForm.resetFields();
}
......@@ -808,13 +848,6 @@ export default {
}
}
},
handleFocusBatch() {
if (this.multipleList.length < 1) {
this.batchValue = "";
checkFalse("请勾选会员");
return false;
}
},
selectAllmultipleList() {
this.selectAll = !this.selectAll;
if (this.selectAll) {
......
......@@ -85,6 +85,11 @@
value="integral"
></el-option>
<el-option
key="bulkIntegral"
label="批量调整积分"
value="bulkIntegral"
></el-option>
<el-option
key="grade"
label="调整会员等级"
value="grade"
......
......@@ -16,11 +16,6 @@
@change="onDateChange">
</el-date-picker>
<el-select v-model="importType" placeholder="所有导入类型" style="width: 130px;margin-left: 8px;" @change="onImportTypeChange">
<!-- <el-option label="基础信息" value="1"></el-option>
<el-option label="资产信息" value="2"></el-option>
<el-option label="家庭信息" value="3"></el-option>
<el-option label="购物偏好" value="4"></el-option>
<el-option label="其他" value="5"></el-option> -->
<el-option label="积分增加" value="11"></el-option>
<el-option label="积分扣除" value="12"></el-option>
</el-select>
......@@ -39,7 +34,7 @@
</el-table-column>
<el-table-column
prop="total"
label="预计导入数量">
label="预计导入数量">
<template slot-scope="{ row }">
{{ row.total || '0' }}
</template>
......@@ -337,7 +332,7 @@ export default {
// 上传验证
beforeUpload(file) {
// let _this = this;
const isLt2M = file.size / 1024 / 1024 < 10;
const isLt2M = file.size / 1024 / 1024 < 3;
const types = file.name.split(".")[1];
const fileType = ["xlsx", "xlc", "xlm", "xls", "xlt", "xlw", "csv"].some(
item => item === types
......@@ -347,7 +342,7 @@ export default {
return false;
}
if(!isLt2M){
this.$message.error('上传模板大小不能超过 10MB')
this.$message.error('上传模板大小不能超过 3MB')
return false;
}
// console.log(file)
......
......@@ -699,12 +699,52 @@ export default {
checkStatus(err);
});
},
handleVisibleBatch(val) {
if(this.multipleList.length < 1) {
this.batchValue = '';
checkFalse('请勾选会员');
return false;
}
// handleVisibleBatch(val) {
// if(this.multipleList.length < 1) {
// this.batchValue = '';
// checkFalse('请勾选会员');
// return false;
// }
// if (!val) {
// if (this.batchValue == "integral") {
// this.dilogIntegralVisible = true;
// this.getEnterpriseInfo();
// if (this.$refs.IntegralForm) {
// this.$refs.IntegralForm.resetFields();
// }
// }
// if (this.batchValue == "grade") {
// this.dilogGradeVisible = true;
// if (this.$refs.gradeForm) {
// this.$refs.gradeForm.resetFields();
// }
// }
// if (this.batchValue == "mainstore") {
// this.dilogMainstoreVisible = true;
// this.selectStore(val);
// if (this.$refs.mainstoreForm) {
// this.$refs.mainstoreForm.resetFields();
// }
// this.storeName = '';
// }
// if (this.batchValue == "store") {
// this.dilogSubStoreVisible = true;
// if (this.$refs.storeForm) {
// this.$refs.storeForm.resetFields();
// }
// this.getSubStoreList();
// }
// }
// },
handleFocusBatch() {
if (this.batchValue == "bulkIntegral") {
this.batchValue = '';
this.$router.push({ path: '/bulkIntegral' });
} else if(this.multipleList.length < 1) {
this.batchValue = '';
checkFalse('请勾选会员');
return false;
}
if (!val) {
if (this.batchValue == "integral") {
this.dilogIntegralVisible = true;
......@@ -736,13 +776,6 @@ export default {
}
}
},
handleFocusBatch() {
if (this.multipleList.length < 1) {
this.batchValue = "";
checkFalse("请勾选会员");
return false;
}
},
selectAllmultipleList() {
this.selectAll = !this.selectAll;
if (this.selectAll) {
......
......@@ -84,6 +84,11 @@
value="integral"
></el-option>
<el-option
key="bulkIntegral"
label="批量调整积分"
value="bulkIntegral"
></el-option>
<el-option
key="grade"
label="调整会员等级"
value="grade"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment