From 2c2715acf0db3706f4e0485051afa6d941c10b9c Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 24 Feb 2022 20:45:50 +0800 Subject: [PATCH] edit --- .../freight-config.component.html | 105 ++++++++---------- .../freight-config.component.ts | 30 +++-- 2 files changed, 65 insertions(+), 70 deletions(-) diff --git a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.html b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.html index ec0b95cb..fdf3e863 100644 --- a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.html +++ b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.html @@ -11,73 +11,62 @@ -
-
- -
-
- - - - -
+
+
+
+
+ + + + +
+
-
- - -
- 已选择 - {{ selectedRows.length }} 条数据 - 清空 -
+
+ + +
+ 已选择 + {{ selectedRows.length }} 条数据 + 清空
- - - +
+ + + -
-
- - - - - -
+
+
+ + + + +
+
-
-
- - - - - -
+
+
+ + + + +
- +
+ \ No newline at end of file diff --git a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts index ca688b8f..bc94a1e2 100644 --- a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts +++ b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts @@ -10,7 +10,7 @@ import { UsermanageService } from '../../../services/usercenter.service'; @Component({ selector: 'app-freight-config', templateUrl: './freight-config.component.html', - styleUrls: ['../../../../commom/less/box.less'] + styleUrls: ['../../../../commom/less/box.less', '../../../../commom/less/expend-but.less'] }) export class FreightConfigComponent implements OnInit { schema: SFSchema = this.initSF(); @@ -38,14 +38,20 @@ export class FreightConfigComponent implements OnInit { beforeReq = (requestOptions: STRequestOptions) => { Object.assign(requestOptions.body, { listSource: 1 }); - if (this.sf) { + console.log(1); + + if (this.sf?.value) { Object.assign(requestOptions.body, { - ...this.sf.value, - createTime: { - start: this.sf?.value.effectiveDate[0], - end: this.sf?.value.effectiveDate[1] - } + ...this.sf.value }); + if (this.sf?.value.createTime) { + Object.assign(requestOptions.body, { + createTime: { + start: this.sf?.value.createTime[0], + end: this.sf?.value.createTime[1] + } + }); + } } return requestOptions; }; @@ -239,17 +245,17 @@ export class FreightConfigComponent implements OnInit { } } }, - effectiveDate: { + createTime: { title: '注册时间', type: 'string', ui: { - widget: 'date', - mode: 'range', + widget: 'sl-from-to-search', format: 'yyyy-MM-dd', + placeholder: '请选择', + nzShowTime: true, visibleIf: { _$expand: (value: boolean) => value - }, - allowClear: true + } } as SFDateWidgetSchema } }