Merge pull request 'fix_record_direct_problem' (#382) from fix_record_direct_problem into @hera/dev
Reviewed-on: daoyoucloud/tachycode#382 Reviewed-by: sealday <zhanglin@daoyoucloud.com>
This commit is contained in:
commit
8f1b7693a8
@ -27,8 +27,10 @@ export class RecordService {
|
|||||||
if (!values) {
|
if (!values) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (values.record_category === RecordTypes.purchaseDirect || values.record_category === RecordTypes.rentDirect) {
|
||||||
await this.createRecord(model, values, transaction, context, null);
|
await this.createRecord(model, values, transaction, context, null);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 处理直发单生成单
|
* 处理直发单生成单
|
||||||
*/
|
*/
|
||||||
@ -648,7 +650,7 @@ export class RecordService {
|
|||||||
async createRecord(model, values, transaction, context, updateData) {
|
async createRecord(model, values, transaction, context, updateData) {
|
||||||
delete values.number;
|
delete values.number;
|
||||||
delete values.id;
|
delete values.id;
|
||||||
values.vehicles.forEach((item) => delete item.record_vehicles);
|
values.vehicles?.forEach((item) => delete item.record_vehicles);
|
||||||
//采购直发单
|
//采购直发单
|
||||||
if (values.record_category === RecordTypes.purchaseDirect && values.category === RecordCategory.purchase2lease) {
|
if (values.record_category === RecordTypes.purchaseDirect && values.category === RecordCategory.purchase2lease) {
|
||||||
const inProject = await this.db.getModel('project').findOne({
|
const inProject = await this.db.getModel('project').findOne({
|
||||||
|
Loading…
Reference in New Issue
Block a user