MaiXinRong 4 anos atrás
pai
commit
4627ae6fdc
1 arquivos alterados com 6 adições e 2 exclusões
  1. 6 2
      app/service/stage_detail.js

+ 6 - 2
app/service/stage_detail.js

@@ -8,6 +8,7 @@
  * @version
  */
 const timesLen = require('../const/audit').stage.timesLen;
+const editField = ['doc_code', 'bw', 'start_peg', 'end_peg', 'jldy', 'drawing_code', 'calc_memo', 'calc_img', 'calc_img_org', 'peg', 'xm', 'position', '']
 
 module.exports = app => {
     class StageDetail extends app.BaseService {
@@ -137,8 +138,11 @@ module.exports = app => {
                 } else {
                     const nd = this._.assign(org, data);
                     delete nd.id;
-                    await this.db.insert(this.tableName, data);
-                    return data;
+                    nd.times = this.ctx.stage.times;
+                    nd.order = order;
+
+                    await this.db.insert(this.tableName, nd);
+                    return nd;
                 }
             } else {
                 data.uuid = this.uuid.v4();