edit
This commit is contained in:
		| @ -11,73 +11,62 @@ | ||||
| <page-header-wrapper [title]="'货主配置'"></page-header-wrapper> | ||||
| <nz-card class="search-box"> | ||||
|   <!-- 搜索表单 --> | ||||
|     <div nz-row nzGutter="8"> | ||||
|       <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24"> | ||||
|         <sf | ||||
|           #sf | ||||
|           [schema]="schema" | ||||
|           [ui]="{ '*': { spanLabelFixed: 110, grid: { lg: 8, md: 12, sm: 12, xs: 24, gutter: 4 } } }" | ||||
|           [compact]="true" | ||||
|           [button]="'none'" | ||||
|         ></sf> | ||||
|       </div> | ||||
|       <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand" class="text-right"> | ||||
|         <button | ||||
|           nz-button | ||||
|           nzType="primary" | ||||
|           [nzLoading]="service.http.loading" | ||||
|           (click)="st?.load(1)" | ||||
|           acl | ||||
|           [acl-ability]="['USERCENTER-FREIGHT-LIST-list']" | ||||
|           >查询</button | ||||
|         > | ||||
|         <button nz-button nzType="primary" [disabled]="service.http.loading" acl [acl-ability]="['USERCENTER-FREIGHT-LIST-export']" | ||||
|           >导出</button | ||||
|         > | ||||
|         <button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button> | ||||
|         <button nz-button nzType="link" (click)="expandToggle()"> | ||||
|           {{ !_$expand ? '展开' : '收起' }} | ||||
|           <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> | ||||
|         </button> | ||||
|       </div> | ||||
|   <div nz-row nzGutter="8"> | ||||
|     <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24"> | ||||
|       <sf #sf [schema]="schema" | ||||
|         [ui]="{ '*': { spanLabelFixed: 110, grid: { lg: 8, md: 12, sm: 12, xs: 24, gutter: 4 } } }" [compact]="true" | ||||
|         [button]="'none'"></sf> | ||||
|     </div> | ||||
|     <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand" | ||||
|       class="text-right"> | ||||
|       <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl | ||||
|         [acl-ability]="['USERCENTER-FREIGHT-LIST-list']">查询</button> | ||||
|       <button nz-button nzType="primary" [disabled]="service.http.loading" acl | ||||
|         [acl-ability]="['USERCENTER-FREIGHT-LIST-export']">导出</button> | ||||
|       <button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button> | ||||
|       <button nz-button nzType="link" (click)="expandToggle()"> | ||||
|         {{ !_$expand ? '展开' : '收起' }} | ||||
|         <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> | ||||
|       </button> | ||||
|     </div> | ||||
|   </div> | ||||
| </nz-card> | ||||
| <nz-card> | ||||
|     <div class="d-flex align-items-center mb-md " style="justify-content: end;"> | ||||
|         <button nz-button (click)="editRoleBatch()">修改角色</button> | ||||
|         <button nz-button (click)="editIWBatch()">修改网络货运人</button> | ||||
|         <div class="ml-md"> | ||||
|             已选择 | ||||
|             <strong class="text-primary">{{ selectedRows.length }}</strong> 条数据 | ||||
|             <a *ngIf="selectedRows.length > 0" (click)="st.clearCheck()" class="ml-lg">清空</a> | ||||
|         </div> | ||||
|   <div class="d-flex align-items-center mb-md " style="justify-content: end;"> | ||||
|     <button nz-button (click)="editRoleBatch()">修改角色</button> | ||||
|     <button nz-button (click)="editIWBatch()">修改网络货运人</button> | ||||
|     <div class="ml-md"> | ||||
|       已选择 | ||||
|       <strong class="text-primary">{{ selectedRows.length }}</strong> 条数据 | ||||
|       <a *ngIf="selectedRows.length > 0" (click)="st.clearCheck()" class="ml-lg">清空</a> | ||||
|     </div> | ||||
|     <!-- 数据列表 --> | ||||
|     <st #st [columns]="columns" [data]='service.$api_freight_config_page' [req]="{  process: beforeReq }" | ||||
|         [scroll]="{ x: '1200px' }" [loading]="service.http.loading" (change)="stChange($event)"> | ||||
|     </st> | ||||
|   </div> | ||||
|   <!-- 数据列表 --> | ||||
|   <st #st [columns]="columns" [data]='service.$api_freight_config_page' [req]="{  process: beforeReq }" | ||||
|     [scroll]="{ x: '1200px' }" [loading]="service.http.loading" (change)="stChange($event)"> | ||||
|   </st> | ||||
| </nz-card> | ||||
|  | ||||
| <ng-template #IWModal> | ||||
|     <div nz-row nzGutter="8"> | ||||
|         <div nz-col nzSpan="24" se-container [labelWidth]="120"> | ||||
|             <se [col]="1" label="网络货运人" required> | ||||
|                 <nz-select nzPlaceHolder="请选择" [(ngModel)]="networkTransporter"> | ||||
|                     <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of ltdId"></nz-option> | ||||
|                 </nz-select> | ||||
|             </se> | ||||
|         </div> | ||||
|   <div nz-row nzGutter="8"> | ||||
|     <div nz-col nzSpan="24" se-container [labelWidth]="120"> | ||||
|       <se [col]="1" label="网络货运人" required> | ||||
|         <nz-select nzPlaceHolder="请选择" [(ngModel)]="networkTransporter"> | ||||
|           <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of ltdId"></nz-option> | ||||
|         </nz-select> | ||||
|       </se> | ||||
|     </div> | ||||
|   </div> | ||||
| </ng-template> | ||||
|  | ||||
| <ng-template #roleModal> | ||||
|     <div nz-row nzGutter="8"> | ||||
|         <div nz-col nzSpan="24" se-container [labelWidth]="120"> | ||||
|             <se [col]="1" label="企业角色" required> | ||||
|                 <nz-select nzPlaceHolder="请选择" [(ngModel)]="roleId"> | ||||
|                     <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of roles"></nz-option> | ||||
|                 </nz-select> | ||||
|             </se> | ||||
|         </div> | ||||
|   <div nz-row nzGutter="8"> | ||||
|     <div nz-col nzSpan="24" se-container [labelWidth]="120"> | ||||
|       <se [col]="1" label="企业角色" required> | ||||
|         <nz-select nzPlaceHolder="请选择" [(ngModel)]="roleId"> | ||||
|           <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of roles"></nz-option> | ||||
|         </nz-select> | ||||
|       </se> | ||||
|     </div> | ||||
|   </div> | ||||
| </ng-template> | ||||
| @ -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 | ||||
|         } | ||||
|       } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user