明细日期默认日期修改。

feature_0521
kevin jiang 5 years ago
parent 35ae00c688
commit bff78a44a5

@ -248,6 +248,8 @@
}
},
mounted: function () {
this.dateRange[0] = this.$moment().format("YYYY-MM-DD");
this.dateRange[1] = this.$moment().format("YYYY-MM-DD");
this.getCustomerData();
this.getSelectList();
this.downSellerData();

@ -24,6 +24,9 @@
<Button type="primary" class="search-btn"
@click="addOneAccount()">+添加账户
</Button>
<Button type="primary" class="search-btn" @click="exportData" :loading="loading">导出数据</Button>
</div>
</Row>
</template>
@ -47,6 +50,7 @@
import accountManagement from "../../services/account/AccountManagement";
import zeroExtend from "../../services/customer/zeroExtend";
import staff from "../../services/staff/staff";
import IncreaseData from "../../services/generalize/IncreaseData";
export default {
data() {
@ -457,6 +461,60 @@
}
})
},
//广
exportData: function () {
this.loading = true;
let that = this;
let request = {
searchContent: that.searchContent,
pageNum: that.pageNum,
pageSize: that.totalSize,
roleId: that.selectedRoleId,
companyId: that.selectedCompanyId,
shopId: that.selectedShopId
};
accountManagement.listAccountInfoApi(request, function (data) {
that.loading = false;
that.data1 = [];
data = data.data;
if (data.code === '0001') {
return
}
if (data.code === '0000') {
if (data) {
let row = data.results.list;
that.totalSize = data.results.total;
if (row && row.length > 0) {
let originAllData = [];
for (let i = 0; i < row.length; i++) {
let entity = row[i];
entity.index = i + 1;
originAllData.push(entity);
}
let title = "账号";
require.ensure([], () => {
const {export_json_to_excel} = require('../../excel/Export2Excel');
const tHeader = ['序号', '用户名', '别名', '账号', '手机号码', '角色', '零售公司', '零售公司编码', '店铺名称', '店铺编码'];
//
const filterVal = ['index', 'userName', 'abbreviation', 'account', 'mobil', 'roleName', 'companyName', 'companyCode', 'shopName', 'shopCode'];
//
//datatableDatalist
const data = that.formatJson(filterVal, originAllData);
export_json_to_excel(tHeader, data, title);
});
}
}
}
}, function () {
that.loading = false;
});
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => v[j]))
},
},
}

Loading…
Cancel
Save