|
@@ -374,11 +374,17 @@ class jhHelper {
|
|
|
return this.result;
|
|
|
}
|
|
|
|
|
|
- async convert(tid, sid, memFieldKeys, setting) {
|
|
|
+ async convert(tid, sid, memFieldKeys, option) {
|
|
|
+ if (!option) return [];
|
|
|
+ const setting = JSON.parse(option);
|
|
|
if (!setting || !setting.defaultCompare) return [];
|
|
|
const tender = await this.ctx.service.tender.getCheckTender(tid);
|
|
|
const stage = await this.ctx.service.stage.getDataById(sid);
|
|
|
- await this._gatherStageData(tender, stage, { defaultCompare: setting.defaultCompare });
|
|
|
+ await this._gatherStageData(tender, stage, setting);
|
|
|
+ const helper = this.ctx.helper;
|
|
|
+ // 排序
|
|
|
+ this.result.sort((x, y) => { return helper.compareCode(x.b_code, y.b_code); });
|
|
|
+ return this.result;
|
|
|
}
|
|
|
}
|
|
|
|