|
@@ -566,18 +566,24 @@ module.exports = app => {
|
|
|
|
|
|
_getChangeConstName(define, value) {
|
|
|
for (const prop in define) {
|
|
|
- if (define[prop].value === value) return define[prop].name;
|
|
|
+ if (define[prop].value === value) {
|
|
|
+ return define[prop].name;
|
|
|
+ }
|
|
|
}
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
async _generateChange(tid) {
|
|
|
if (this.changeData !== null) return;
|
|
|
+ const self = this;
|
|
|
try {
|
|
|
const decimal = this.ctx.tender.info.decimal, ctx = this.ctx;
|
|
|
const change = await this.ctx.service.change.getListByStatus(tid, 3);
|
|
|
for (const c of change) {
|
|
|
- c.type = this._getChangeConstName(changeConst.type, c.type);
|
|
|
+ const types = ctx.helper._.map(c.type.split(','), function (t) {
|
|
|
+ return self._getChangeConstName(changeConst.type, ctx.helper._.toInteger(t));
|
|
|
+ });
|
|
|
+ c.type = types.join(';');
|
|
|
c.class = this._getChangeConstName(changeConst.class, c.class);
|
|
|
c.quality = this._getChangeConstName(changeConst.quality, c.quality);
|
|
|
c.charge = this._getChangeConstName(changeConst.type, c.charge);
|