|
|
|
@ -142,6 +142,8 @@
|
|
|
|
|
},
|
|
|
|
|
exportData() {
|
|
|
|
|
let that = this;
|
|
|
|
|
this.loading = true;
|
|
|
|
|
that.data1 = [];
|
|
|
|
|
let stdate = null;
|
|
|
|
|
let eddate = null;
|
|
|
|
|
if (that.dateRange[0]) {
|
|
|
|
@ -149,8 +151,6 @@
|
|
|
|
|
eddate = this.$moment(that.dateRange[1]).format("YYYY-MM-DD");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let csvdata = [];
|
|
|
|
|
let request =
|
|
|
|
|
{
|
|
|
|
|
userId: that.userId,
|
|
|
|
@ -158,51 +158,8 @@
|
|
|
|
|
endDate: eddate,
|
|
|
|
|
companyId: that.changeData(that.companyId),
|
|
|
|
|
shopId: that.changeData(that.shopId),
|
|
|
|
|
sellerId: that.changeData(that.sellerId),
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: that.totalSize
|
|
|
|
|
};
|
|
|
|
|
customerDetail.dataDetail(request, function (data) {
|
|
|
|
|
data = data.data.results;
|
|
|
|
|
if (data) {
|
|
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
|
|
let entity = data[i];
|
|
|
|
|
if (entity) {
|
|
|
|
|
if (i === 0) that.totalSize = entity.totalSize;
|
|
|
|
|
let birthday = entity.birthday;
|
|
|
|
|
let createTime = entity.createTime;
|
|
|
|
|
if (birthday) {
|
|
|
|
|
entity.birthday = that.$moment(birthday).format("MM-DD")
|
|
|
|
|
}
|
|
|
|
|
if (createTime) {
|
|
|
|
|
entity.createTime = that.$moment(createTime).format("YYYY-MM-DD")
|
|
|
|
|
}
|
|
|
|
|
that.checkParamBlank(entity);
|
|
|
|
|
csvdata.push(entity);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (stdate == null) {
|
|
|
|
|
stdate = "--";
|
|
|
|
|
}
|
|
|
|
|
if (eddate == null) {
|
|
|
|
|
eddate = "--";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let title = "客户明细";
|
|
|
|
|
require.ensure([], () => {
|
|
|
|
|
const {export_json_to_excel} = require('../../excel/Export2Excel');
|
|
|
|
|
const tHeader = ['序号', '好友名称', '所属门店', '店铺编号', '所属导购', '工号', '创建时间', '好友手机号', '关联会员', '会员等级', '会员生日'];
|
|
|
|
|
// 属性名
|
|
|
|
|
const filterVal = ['number', 'name', 'shopName', 'shopCode', 'sellerName', 'sellerCode', 'createTime', 'phone', 'vipName', 'vipLevel', 'birthday'];
|
|
|
|
|
// 数据
|
|
|
|
|
const list = csvdata; //把data里的tableData存到list
|
|
|
|
|
const data = that.formatJson(filterVal, list);
|
|
|
|
|
export_json_to_excel(tHeader, data, title);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
customerDetail.downloadstoreDataDetailExcel(request, null);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
getStorerData: function () {
|
|
|
|
|