From 697cd62e7cd863ef4e909fddd8ad425cb7bfc4dd Mon Sep 17 00:00:00 2001 From: lyx <2027667395@qq.com> Date: Fri, 22 Mar 2024 10:50:08 +0800 Subject: [PATCH 1/3] fix: create error because waybill --- .../@hera/plugin-rental/src/server/services/record-service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts index dc32b333b..dfaf2cc69 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts @@ -35,7 +35,7 @@ export class RecordService { return; } // 运输单的创建会走订单的update,如果存在waybill一定是在录运输单 - if (values.waybill) return; + if (values?.waybill) return; if (values.record_category === RecordTypes.purchaseDirect || values.record_category === RecordTypes.rentDirect) { const deleteDatas = await this.db.getRepository('records').find({ where: { direct_record_id: model.id } }); // 删除订单多对多项目表数据 @@ -65,7 +65,7 @@ export class RecordService { */ async recordsAfterSave(model: MagicAttributeModel, options: CreateOptions): Promise { // 运输单导致的订单更新不必走以下订单逻辑,减少性能消耗,有waybill一定是运输单录入 - if (options.values.waybill) return; + if (options.values?.waybill) return; // 订单新建更新后(根据合同确定出入库字段) await this._setProject(model, options); // 订单发生变化时更新对应结算单的状态(需要重新计算) From 44259e82606753f379ed54e8df3cbceb78d6d305 Mon Sep 17 00:00:00 2001 From: lyx <2027667395@qq.com> Date: Fri, 22 Mar 2024 10:54:59 +0800 Subject: [PATCH 2/3] feat: rental upversions --- packages/plugins/@hera/plugin-rental/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugins/@hera/plugin-rental/package.json b/packages/plugins/@hera/plugin-rental/package.json index 22bcb27b1..fbf34de51 100644 --- a/packages/plugins/@hera/plugin-rental/package.json +++ b/packages/plugins/@hera/plugin-rental/package.json @@ -1,6 +1,6 @@ { "name": "@hera/plugin-rental", - "version": "1.5.9", + "version": "1.6.0", "main": "dist/server/index.js", "displayName": "professional construction materials rental system - customized based on hera", "displayName.zh-CN": "专业建材租赁系统 - 基于赫拉定制", @@ -27,4 +27,4 @@ "keywords": [ "System management" ] -} +} \ No newline at end of file From 8368ca0f6242f34a3c342998bf353312878fc7a1 Mon Sep 17 00:00:00 2001 From: lyx <2027667395@qq.com> Date: Fri, 22 Mar 2024 11:24:27 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E6=81=A2=E5=A4=8D=E4=B8=8D?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84=E5=88=A4=E6=96=AD=E5=86=99=E6=B3=95?= =?UTF-8?q?=EF=BC=8Cvaluse=E4=B8=8D=E5=8F=AF=E8=83=BD=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=BF=85=E8=A6=81=E6=89=93=E9=97=AE=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../@hera/plugin-rental/src/server/services/record-service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts index dfaf2cc69..9abd10956 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/record-service.ts @@ -35,7 +35,7 @@ export class RecordService { return; } // 运输单的创建会走订单的update,如果存在waybill一定是在录运输单 - if (values?.waybill) return; + if (values.waybill) return; if (values.record_category === RecordTypes.purchaseDirect || values.record_category === RecordTypes.rentDirect) { const deleteDatas = await this.db.getRepository('records').find({ where: { direct_record_id: model.id } }); // 删除订单多对多项目表数据