seimin 4 月之前
父节点
当前提交
355ebc77a3
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      src/app/views/keep-order-config/keep-order-config.component.ts

+ 6 - 6
src/app/views/keep-order-config/keep-order-config.component.ts

@@ -213,10 +213,10 @@ export class KeepOrderConfigComponent implements OnInit {
213 213
         hosId: this.hosId,
214 214
         startTaskTypeId: this.validateForm.value.startTaskTypeId || undefined,
215 215
         createTaskTypeId: this.validateForm.value.createTaskTypeId || undefined,
216
-        startDept: { id: this.validateForm.value.startDept },
217
-        endDept: { id: this.validateForm.value.endDept },
216
+        startDept: this.validateForm.value.startDept ? { id: this.validateForm.value.startDept } : undefined,
217
+        endDept: this.validateForm.value.endDept ? { id: this.validateForm.value.endDept } : undefined,
218 218
         getOrderType: this.validateForm.value.getOrderType ? this.keepOrderGetorderTypeList.find(v => v.value === this.validateForm.value.getOrderType) : undefined,
219
-        getOrderRange: this.validateForm.value.getOrderRange,
219
+        getOrderRange: this.validateForm.value.getOrderRange || undefined,
220 220
         copyRemark: this.validateForm.value.copyRemark,
221 221
         active: this.validateForm.value.active,
222 222
       };
@@ -226,10 +226,10 @@ export class KeepOrderConfigComponent implements OnInit {
226 226
         ...this.coopData,
227 227
         startTaskTypeId: this.validateForm.value.startTaskTypeId || undefined,
228 228
         createTaskTypeId: this.validateForm.value.createTaskTypeId || undefined,
229
-        startDept: { id: this.validateForm.value.startDept },
230
-        endDept: { id: this.validateForm.value.endDept },
229
+        startDept: this.validateForm.value.startDept ? { id: this.validateForm.value.startDept } : undefined,
230
+        endDept: this.validateForm.value.endDept ? { id: this.validateForm.value.endDept } : undefined,
231 231
         getOrderType: this.validateForm.value.getOrderType ? this.keepOrderGetorderTypeList.find(v => v.value === this.validateForm.value.getOrderType) : undefined,
232
-        getOrderRange: this.validateForm.value.getOrderRange,
232
+        getOrderRange: this.validateForm.value.getOrderRange || undefined,
233 233
         copyRemark: this.validateForm.value.copyRemark,
234 234
         active: this.validateForm.value.active,
235 235
       };