Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
		| @ -36,7 +36,7 @@ | ||||
|             {{ item.orderPaymentCode }} <br> <a>{{ item.paymentStatusLabel }}</a> | ||||
|         </ng-template> | ||||
|         <ng-template st-row="amountDetails" let-item let-index="index" let-column="column"> | ||||
|             预付:{{ item.price | currency }}<br /> | ||||
|            {{item.costName}}:{{ item.price | currency }}<br /> | ||||
|             <ng-container *ngIf="item.payType==='1'"> | ||||
|                 附加费: {{ item.surcharge| currency }} | ||||
|             </ng-container> | ||||
|  | ||||
| @ -258,6 +258,7 @@ export class PaymentRecordComponent implements OnInit { | ||||
|           }); | ||||
|           item.surcharge = surcharge.toFixed(2); | ||||
|           item.price = item.amountDetails?.[0]?.price || 0; | ||||
|           item.costName = item.amountDetails?.[0]?.costName; | ||||
|           return ''; | ||||
|         } | ||||
|       }, | ||||
|  | ||||
| @ -30,6 +30,7 @@ | ||||
|     <div class="d-flex align-items-center"> | ||||
|       <div> | ||||
|         <button nz-button nzType="primary" (click)="menuAction('新增菜单')">新增</button> | ||||
|         <button nz-button nzType="primary" (click)="menuSort()">菜单排序</button> | ||||
|         <!-- <button nz-button nzType="primary" (click)="menuImport(0)" [disabled]="service.http.loading" | ||||
|           *ngIf="selectedPlatform.enName==='tms-smc-web'"> | ||||
|           导入货主菜单 | ||||
|  | ||||
| @ -1,11 +1,12 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; | ||||
| import { SFComponent, SFSchema } from '@delon/form'; | ||||
| import { Menu } from '@delon/theme'; | ||||
| import { Menu, ModalHelper } from '@delon/theme'; | ||||
| import { EAEnvironmentService } from '@shared'; | ||||
| import { NzSafeAny } from 'ng-zorro-antd/core/types'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { SettingRoleEditComponent } from 'src/app/routes/sys-setting/components/role-management/edit/edit.component'; | ||||
| import { MenuManagerMenusortComponent } from '../menusort/menusort.component'; | ||||
| import { MenuManagerService } from './../../services/menu-manager.service'; | ||||
| import { MenuModalComponent } from './menu-modal/menu-modal.component'; | ||||
|  | ||||
| @ -36,7 +37,7 @@ export class MenuManagerComponentsIndexComponent implements OnInit { | ||||
|  | ||||
|   mapOfExpandedData: { [key: string]: any[] } = {}; | ||||
|   listOfMapData: any[] = []; | ||||
|   constructor(private envSrv: EAEnvironmentService, public service: MenuManagerService, private modal: NzModalService) { | ||||
|   constructor(private envSrv: EAEnvironmentService, public service: MenuManagerService, private modal: NzModalService, private modalHelper: ModalHelper,) { | ||||
|     this.initData(); | ||||
|   } | ||||
|  | ||||
| @ -125,4 +126,12 @@ export class MenuManagerComponentsIndexComponent implements OnInit { | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|   menuSort(){ | ||||
|     const dialogData = { | ||||
|       appId: this.selectedPlatform.appId | ||||
|     }; | ||||
|     this.modalHelper.create(MenuManagerMenusortComponent, { i: dialogData }, { size: 900 }).subscribe((res:any) => { | ||||
|       this.initData(); | ||||
|     }); | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -0,0 +1,18 @@ | ||||
| <div class="modal-header"> | ||||
|   <div class="modal-title">菜单排序</div> | ||||
| </div> | ||||
| <div> | ||||
|   <nz-tree | ||||
|       #nzTreeComponent | ||||
|       [nzData]="menuList" | ||||
|       (nzClick)="nzEvent($event)" | ||||
|       nzDraggable | ||||
|       nzBlockNode | ||||
|       (nzOnDragEnd)="dragEnd($event)" | ||||
|     > | ||||
|     </nz-tree> | ||||
| </div> | ||||
| <div class="modal-footer"> | ||||
|   <button nz-button type="button" (click)="close()">关闭</button> | ||||
|   <button nz-button nzType="primary" (click)="sure()">确定</button> | ||||
| </div> | ||||
| @ -0,0 +1,24 @@ | ||||
| import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; | ||||
| import { MenuManagerMenusortComponent } from './menusort.component'; | ||||
|  | ||||
| describe('MenuManagerMenusortComponent', () => { | ||||
|   let component: MenuManagerMenusortComponent; | ||||
|   let fixture: ComponentFixture<MenuManagerMenusortComponent>; | ||||
|  | ||||
|   beforeEach(waitForAsync(() => { | ||||
|     TestBed.configureTestingModule({ | ||||
|       declarations: [ MenuManagerMenusortComponent ] | ||||
|     }) | ||||
|     .compileComponents(); | ||||
|   })); | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     fixture = TestBed.createComponent(MenuManagerMenusortComponent); | ||||
|     component = fixture.componentInstance; | ||||
|     fixture.detectChanges(); | ||||
|   }); | ||||
|  | ||||
|   it('should create', () => { | ||||
|     expect(component).toBeTruthy(); | ||||
|   }); | ||||
| }); | ||||
| @ -0,0 +1,77 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { _HttpClient } from '@delon/theme'; | ||||
| import { NzMessageService } from 'ng-zorro-antd/message'; | ||||
| import { NzModalRef } from 'ng-zorro-antd/modal'; | ||||
| import { NzTreeComponent } from 'ng-zorro-antd/tree'; | ||||
| import { MenuManagerService } from '../../services/menu-manager.service'; | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-menu-manager-menusort', | ||||
|   templateUrl: './menusort.component.html', | ||||
| }) | ||||
| export class MenuManagerMenusortComponent implements OnInit { | ||||
|   @ViewChild('nzTreeComponent', { static: false }) nzTreeComponent!: NzTreeComponent; | ||||
|   record: any = {}; | ||||
|   i: any; | ||||
|   functionList: any[] = []; | ||||
|   menuList: any[] = []; | ||||
|  | ||||
|   constructor( | ||||
|     private modal: NzModalRef, | ||||
|     public service: MenuManagerService, | ||||
|   ) { } | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|    this.getAllFunction() | ||||
|   } | ||||
|   getAllFunction() { | ||||
|     this.service.request(this.service.$api_get_all, { appId: this.i.appId }, 'POST', false).subscribe(res => { | ||||
|       this.functionList = res; | ||||
|       this.menuList = res[0].children; | ||||
|     }); | ||||
|   } | ||||
|   nzEvent(event: any): void { | ||||
|     console.log(event) | ||||
|   } | ||||
|   dragEnd(event: any){ | ||||
|     const functionId = event.node.key | ||||
|     let sortNumber = 0 | ||||
|     const newMenuList = this.nzTreeComponent.getTreeNodes() | ||||
|     newMenuList.forEach((item, index) => { | ||||
|       if(event.node.level === 0 && item.children) { | ||||
|  | ||||
|         if(functionId === item.key) { | ||||
|           sortNumber = index | ||||
|         } | ||||
|       } else if(event.node.level === 1  && item.children) { | ||||
|         item.children.forEach((subItem: any, subIndex: number) => { | ||||
|           if(functionId === subItem.key) { | ||||
|             sortNumber = subIndex | ||||
|           } | ||||
|         }) | ||||
|       } else if(event.node.level === 2 && item.children) { | ||||
|         item.children.forEach((thirdItem: any, thirdIndex: number) => { | ||||
|           if(functionId === thirdItem.key) { | ||||
|             sortNumber = thirdIndex | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|     }) | ||||
|     const params: any = { | ||||
|       parentId: event.node.level === 0 ? this.functionList[0].id : event.node.parentNode.key, | ||||
|       functionId, | ||||
|       sortNumber | ||||
|     } | ||||
|     this.service.request(this.service.$api_alterFunctionsParent, params).subscribe(res => { | ||||
|       if (res) { | ||||
|       } | ||||
|     }) | ||||
|      | ||||
|   } | ||||
|   sure(){ | ||||
|     this.modal.close(true) | ||||
|   } | ||||
|   close(): void { | ||||
|     this.modal.destroy(); | ||||
|   } | ||||
| } | ||||
| @ -5,9 +5,10 @@ import { MenuManagerRoutingModule } from './menu-manager-routing.module'; | ||||
| import { MenuModalComponent } from './components/index/menu-modal/menu-modal.component'; | ||||
| import { ApiAuthComponent } from './components/api-auth/api-auth.component'; | ||||
| import { AuthDrawerComponent } from './components/api-auth/auth-drawer/auth-drawer.component'; | ||||
| import { MenuManagerMenusortComponent } from './components/menusort/menusort.component'; | ||||
|  | ||||
| const COMPONENTS: Type<void>[] = [MenuManagerComponentsIndexComponent, ApiAuthComponent]; | ||||
| const COMPONENTS_NOROUNT: Type<void>[] = [MenuModalComponent, AuthDrawerComponent]; | ||||
| const COMPONENTS_NOROUNT: Type<void>[] = [MenuModalComponent, AuthDrawerComponent, MenuManagerMenusortComponent]; | ||||
| @NgModule({ | ||||
|   imports: [SharedModule, MenuManagerRoutingModule], | ||||
|   declarations: [...COMPONENTS, ...COMPONENTS_NOROUNT] | ||||
|  | ||||
| @ -25,6 +25,8 @@ export class MenuManagerService extends BaseService { | ||||
|   $api_save_menu_function = `/api/mdc/cuc/functionButton/saveFunctionButton`; | ||||
|   // 删除菜单按钮关联表 | ||||
|   $api_delete_menu_function = `/api/mdc/cuc/functionButton/deletebatch`; | ||||
|   // 排序菜单 | ||||
|   $api_alterFunctionsParent = `/api/mdc/cuc/functionInfo/alterFunctionsParent`; | ||||
|  | ||||
|   constructor(public injector: Injector) { | ||||
|     super(injector); | ||||
|  | ||||
| @ -80,7 +80,7 @@ export class SettingRoleEditComponent implements OnInit { | ||||
|   } | ||||
|   sure() { | ||||
|     if (!this.sf?.valid) { | ||||
|       this.service.msgSrv.warning('校验错误'); | ||||
|       this.service.msgSrv.warning('角色名称不能为空'); | ||||
|       return; | ||||
|     } | ||||
|     const auths = this.menu?.washTree(); | ||||
|  | ||||
| @ -72,6 +72,11 @@ | ||||
|           <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of roles"></nz-option> | ||||
|         </nz-select> | ||||
|       </se> | ||||
|       <se [col]="1" label="客服人员" required> | ||||
|         <nz-select nzPlaceHolder="请选择" [(ngModel)]="customerServiceId"> | ||||
|           <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of customerServices"></nz-option> | ||||
|         </nz-select> | ||||
|       </se> | ||||
|     </div> | ||||
|   </div> | ||||
| </ng-template> | ||||
|  | ||||
| @ -39,10 +39,12 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { | ||||
|   redectModal!: any; | ||||
|   ltdId: any = []; | ||||
|   roles: any = []; | ||||
|   customerServices: any = []; | ||||
|   detailData: any = null; | ||||
|   approvalOpinion = ''; | ||||
|   networkTransporter = null; | ||||
|   roleId = null; | ||||
|   customerServiceId = null; | ||||
|   constructor(public service: UsermanageService, private router: Router, private modal: NzModalService) {} | ||||
|  | ||||
|   beforeReq = (requestOptions: STRequestOptions) => { | ||||
| @ -84,6 +86,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { | ||||
|   ngOnInit() { | ||||
|     this.loadltdId(); | ||||
|     this.loadRoles(); | ||||
|     this.loadCustomerServices(); | ||||
|   } | ||||
|  | ||||
|   loadltdId() { | ||||
| @ -101,6 +104,14 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   loadCustomerServices() { | ||||
|     this.service.getStaffList({}, false).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.customerServices = res; | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * 查看详情 | ||||
|    */ | ||||
| @ -160,7 +171,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { | ||||
|       nzTitle: '审核通过', | ||||
|       nzContent: this.approvedModal, | ||||
|       nzOnOk: () => { | ||||
|         if (!this.networkTransporter || !this.roleId) { | ||||
|         if (!this.networkTransporter || !this.roleId || !this.customerServiceId) { | ||||
|           return false; | ||||
|         } | ||||
|         this.auditEnterprise(20); | ||||
|  | ||||
| @ -265,7 +265,7 @@ | ||||
|   <sv-container col="3" class="mt16"> | ||||
|     <sv-title>法人信息 | ||||
|       <label *ngIf="detailData?.legalPersonIdentityVO?.isExpired" style="color: #fa8c16;"> | ||||
|         <i nz-icon nzType="info-circle" nzTheme="fill" class="ml-md mr-xs"></i>企业营业期限已过期 | ||||
|         <i nz-icon nzType="info-circle" nzTheme="fill" class="ml-md mr-xs"></i>法人身份证期限已过期 | ||||
|       </label> | ||||
|     </sv-title> | ||||
|     <sv label="法定代表人"> | ||||
| @ -384,6 +384,11 @@ | ||||
|           <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of roles"></nz-option> | ||||
|         </nz-select> | ||||
|       </se> | ||||
|       <se [col]="1" label="客服人员" required> | ||||
|         <nz-select nzPlaceHolder="请选择" [(ngModel)]="customerServiceId"> | ||||
|           <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of customerServices"></nz-option> | ||||
|         </nz-select> | ||||
|       </se> | ||||
|     </div> | ||||
|   </div> | ||||
| </ng-template> | ||||
|  | ||||
| @ -29,10 +29,12 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { | ||||
|   enterpriseAddressCode: any = []; | ||||
|   ltdId: any = []; | ||||
|   roles: any = []; | ||||
|   customerServices: any = []; | ||||
|  | ||||
|   approvalOpinion = ''; | ||||
|   networkTransporter = null; | ||||
|   roleId = null; | ||||
|   customerServiceId = null; | ||||
|  | ||||
|   esignCheckStatus: any = { | ||||
|     0: '不通过', | ||||
| @ -60,6 +62,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { | ||||
|       this.initData(); | ||||
|       this.loadltdId(); | ||||
|       this.loadRoles(); | ||||
|       this.loadCustomerServices(); | ||||
|     }); | ||||
|     this.subscribeScoll = fromEvent(window, 'scroll').subscribe(event => { | ||||
|       this.scrollTop = document.documentElement.scrollTop; | ||||
| @ -79,6 +82,13 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|   loadCustomerServices() { | ||||
|     this.service.getStaffList({}, false).subscribe(res => { | ||||
|       if (res) { | ||||
|         this.customerServices = res; | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   initData() { | ||||
|     this.service | ||||
| @ -163,11 +173,12 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { | ||||
|   auditPass(isSave: boolean) { | ||||
|     this.networkTransporter = null; | ||||
|     this.roleId = null; | ||||
|     this.customerServiceId = null; | ||||
|     this.nzModalService.create({ | ||||
|       nzTitle: '审核通过', | ||||
|       nzContent: this.approvedModal, | ||||
|       nzOnOk: () => { | ||||
|         if (!this.networkTransporter || !this.roleId) { | ||||
|         if (!this.networkTransporter || !this.roleId || !this.customerServiceId) { | ||||
|           return false; | ||||
|         } | ||||
|         if (isSave) { | ||||
| @ -206,6 +217,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { | ||||
|         id: this.detailData.id, | ||||
|         approvalOpinion: this.approvalOpinion, | ||||
|         networkTransporter: this.networkTransporter, | ||||
|         customerServiceId: this.customerServiceId, | ||||
|         roleId: this.roleId || null | ||||
|       }) | ||||
|       .subscribe(res => { | ||||
|  | ||||
| @ -14,19 +14,17 @@ import { UserCenterComponentsDriverDetailComponent } from './components/driver/d | ||||
| import { UserCenterComponentsDriverConfigComponent } from './components/driver/driver-config/driver-config.component'; | ||||
| import { UserCenterComponentsDriverComponent } from './components/driver/driver.component'; | ||||
| import { FreightComponentsEnterpriseAuditComponent } from './components/freight/enterprise-audit/enterprise-audit.component'; | ||||
| import { FreightComponentsEnterpriseAuditViewComponent } from './components/freight/enterprise-audit/view/view.component'; | ||||
| import { FreightConfigComponent } from './components/freight/freight-config/freight-config.component'; | ||||
| import { FreightComponentsListDetailComponent } from './components/freight/list/detail/detail.component'; | ||||
|  | ||||
| import { FreightComponentsListComponent } from './components/freight/list/list.component'; | ||||
| import { FreightComponentsListNewComponent } from './components/freight/list/new/new.component'; | ||||
| import { FreightComponentsListViewComponent } from './components/freight/list/view/view.component'; | ||||
| import { FreightComponentsUserDetailComponent } from './components/freight/user/detail/detail.component'; | ||||
| import { FreightComponentsUserComponent } from './components/freight/user/user.component'; | ||||
|  | ||||
| const routes: Routes = [ | ||||
|   { path: 'freight/list', component: FreightComponentsListComponent, data: { guard: { ability: ['USERCENTER-FREIGHT-LIST-list'] } } }, | ||||
|   { path: 'freight/list/view/:id', component: FreightComponentsListViewComponent }, | ||||
|   // { path: 'freight/list/view/:id', component: FreightComponentsListViewComponent }, | ||||
|   { path: 'freight/list/new', component: FreightComponentsListNewComponent, data: { guard: { ability: ['USERCENTER-FREIGHT-NEW-save'] } } }, | ||||
|   { | ||||
|     path: 'freight/list/detail/:id', | ||||
|  | ||||
| @ -12,11 +12,9 @@ import { UserCenterComponentsDriverCaptainComponent } from './components/driver/ | ||||
| import { UserCenterComponentsDriverDetailComponent } from './components/driver/detail/detail.component'; | ||||
| import { UserCenterComponentsDriverComponent } from './components/driver/driver.component'; | ||||
| import { FreightComponentsEnterpriseAuditComponent } from './components/freight/enterprise-audit/enterprise-audit.component'; | ||||
| import { FreightComponentsEnterpriseAuditViewComponent } from './components/freight/enterprise-audit/view/view.component'; | ||||
| import { FreightComponentsListDetailComponent } from './components/freight/list/detail/detail.component'; | ||||
| import { FreightComponentsListComponent } from './components/freight/list/list.component'; | ||||
| import { FreightComponentsListNewComponent } from './components/freight/list/new/new.component'; | ||||
| import { FreightComponentsListViewComponent } from './components/freight/list/view/view.component'; | ||||
| import { FreightComponentsUserDetailComponent } from './components/freight/user/detail/detail.component'; | ||||
| import { FreightComponentsUserComponent } from './components/freight/user/user.component'; | ||||
| import { UsercenterRoutingModule } from './usercenter-routing.module'; | ||||
| @ -29,11 +27,11 @@ import { UserCenterComponentsDriverConfigComponent } from './components/driver/d | ||||
|  | ||||
| const COMPONENTS = [ | ||||
|   FreightComponentsListComponent, | ||||
|   FreightComponentsListViewComponent, | ||||
|   // FreightComponentsListViewComponent, | ||||
|   FreightComponentsListNewComponent, | ||||
|   FreightComponentsListDetailComponent, | ||||
|   FreightComponentsEnterpriseAuditComponent, | ||||
|   FreightComponentsEnterpriseAuditViewComponent, | ||||
|   // FreightComponentsEnterpriseAuditViewComponent, | ||||
|   FreightComponentsUserComponent, | ||||
|   FreightComponentsUserDetailComponent, | ||||
|   UserCenterComponentsDriverComponent, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user