ソースを参照

fix: 完善拷贝设置-单选框默认的选中状态

lanjianrong 4 年 前
コミット
fbf1e06447
1 ファイル変更4 行追加2 行削除
  1. 4 2
      app/service/tender_info.js

+ 4 - 2
app/service/tender_info.js

@@ -355,7 +355,6 @@ module.exports = app => {
          * 拷贝标段数据至当前标段
          * @param {number} id - 当前标段id
          * @param {number} copy_id - 被拷贝的标段id
-         * @return {Boolean} - 返回更新结果
          */
         async copyTenderHandler(id, copy_id) {
             const [data] = await this.getAllDataByCondition({
@@ -364,7 +363,10 @@ module.exports = app => {
                 },
                 columns: ['deal_info', 'construction_unit', 'tech_param', 'chapter', 'pay_account'],
             });
-            return await this.update(data, { tid: id });
+            const isUpdate = await this.update(data, { tid: id });
+            if (isUpdate) {
+                await this.ctx.service.tender.update({ copy_id }, { id });
+            }
         }
     }