Commit aebba1a2 by DESKTOP-7Q3CA17\86137

gsb

parent 66a552f5
......@@ -5,6 +5,7 @@ const moment = require("moment");
class EcompanybusiService extends ServiceBase {
constructor() {
super(ServiceBase.getDaoName(EcompanybusiService));
this.ecompanyDao = system.getObject("db.ecompanyDao");
}
......@@ -33,9 +34,28 @@ class EcompanybusiService extends ServiceBase {
for (var row of page.rows) {
this.handleDate(row, ["created_at"]);
}
await this.setCompany(page.rows);
}
return page;
}
async setCompany(list) {
if (!list || list.length == 0) {
return;
}
var companyIds = [];
for (var item of list) {
companyIds.push(item.ecompany_id || 0);
}
var companyMap = await this.ecompanyDao.findMapByIds(companyIds, " id, name, contractMobile ");
for (var item of list) {
item.ecompany = companyMap["id_" + (item.ecompany_id || 0)];
}
}
}
module.exports = EcompanybusiService;
......@@ -41,7 +41,7 @@
header-cell-style="background-color: #F5F5F5;color: #2F2F2F;font-size: 14px;font-weight:400;"
row-style="height:50px;" >
<el-table-column prop="id" label="序号" :formatter="onColFormater" width="80" align="center" ></el-table-column>
<el-table-column prop="ecompany_id" label="企业ID" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompany.name" label="企业ID" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="etemplate_id" label="模板ID" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="mchtId" label="mchtId" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="mainId" label="mainId" :formatter="onColFormater" align="center" ></el-table-column>
......
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