Kaynağa Gözat

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

Tony Kang 1 yıl önce
ebeveyn
işleme
ac9d009cf5
1 değiştirilmiş dosya ile 12 ekleme ve 2 silme
  1. 12 2
      app/lib/rm/change.js

+ 12 - 2
app/lib/rm/change.js

@@ -17,9 +17,19 @@ class rptMemChange extends RptMemBase {
         super(ctx, bindData);
     }
 
+    _getChangeConstName(define, value) {
+        for (const prop in define) {
+            if (define[prop].value === value) {
+                return define[prop].name;
+            }
+        }
+        return '';
+    }
+
     async _anaylisChange(change) {
+        const self = this;
         const types = this.ctx.helper._.map(change.type.split(','), function (t) {
-            return self._getChangeConstName(changeConst.type, this.ctx.helper._.toInteger(t));
+            return self._getChangeConstName(changeConst.type, self.ctx.helper._.toInteger(t));
         });
         change.type = types.join(';');
         change.class = this._getChangeConstName(changeConst.class, change.class);
@@ -36,7 +46,7 @@ class rptMemChange extends RptMemBase {
     async doCheckTender(tenderId) {
         if (this.ctx.tender) return;
         this.ctx.tender = { id: tenderId };
-        this.ctx.tender.data = await this.ctx.service.getTender(tenderId);
+        this.ctx.tender.data = await this.ctx.service.tender.getTender(tenderId);
         this.ctx.tender.info = await this.ctx.service.tenderInfo.getTenderInfo(tenderId);
     }