guhongwei 3 năm trước cách đây
mục cha
commit
f68f303079
2 tập tin đã thay đổi với 12 bổ sung4 xóa
  1. 1 1
      app/controller/patent/.patentapply.js
  2. 11 3
      app/service/patent/patentapply.js

+ 1 - 1
app/controller/patent/.patentapply.js

@@ -90,6 +90,6 @@ module.exports = {
     },
   },
   check: {
-    requestBody: ["id", "status", "remark"],
+    requestBody: ["id", "status", "remark", "admin_id", "admin_name"],
   },
 };

+ 11 - 3
app/service/patent/patentapply.js

@@ -24,8 +24,8 @@ class PatentapplyService extends CrudService {
    * @property status 交底书要改变成的状态
    * @property info 其他数据,当做多个备注,记录使用
    */
-  async check({ id, status, remark }) {
-    const data = { status };
+  async check({ id, status, remark, admin_id, admin_name }) {
+    const data = { status, admin_id, admin_name };
     await this.model.updateOne({ _id: ObjectId(id) }, data);
     // 换成对应的状态码,record在下面
     return await this.record({ id, method: status, remark });
@@ -96,7 +96,15 @@ class PatentapplyService extends CrudService {
   async toNotice(id, code) {
     const data = await this.model.findById(id);
     if (!data) return;
-    const { user_id, mech_id, admin_id, agentmech_id, name, apply_name, status } = data;
+    const {
+      user_id,
+      mech_id,
+      admin_id,
+      agentmech_id,
+      name,
+      apply_name,
+      status,
+    } = data;
     const arr = [];
     let content = '';
     let to = '';