浏览代码

修复数据删除bug

ellisran 2 月之前
父节点
当前提交
88c55ad6de
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/service/material_list.js

+ 1 - 1
app/service/material_list.js

@@ -675,7 +675,7 @@ module.exports = app => {
         async cover() {
             const transaction = await this.db.beginTransaction();
             try {
-                await transaction.delete(this.tableName, { tid: this.ctx.tender.id, mid: this.ctx.material.id, is_self: 0 });
+                await transaction.delete(this.tableName, { tid: this.ctx.tender.id, order: this.ctx.material.order, is_self: 0 });
                 await transaction.delete(this.ctx.service.materialListGcl.tableName, { tid: this.ctx.tender.id, mid: this.ctx.material.id });
                 await transaction.update(this.ctx.service.materialChecklist.tableName, { had_bills: 0 }, { where: { tid: this.ctx.tender.id, mid: this.ctx.material.id } });
                 await transaction.commit();