Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
Taric Xin
2022-02-15 14:19:41 +08:00
9 changed files with 72 additions and 19 deletions

View File

@ -69,7 +69,7 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误
[nzPreview]="handlePreview1" [nzPreview]="handlePreview1"
[nzBeforeUpload]="beforeUpload" [nzBeforeUpload]="beforeUpload"
(nzChange)="handleChange1($event)" (nzChange)="handleChange1($event)"
> >beforeUpload
<div> <div>
<i nz-icon nzType="plus"></i> <i nz-icon nzType="plus"></i>
<div style="margin-top: 8px">请上传图片</div> <div style="margin-top: 8px">请上传图片</div>

View File

@ -1,3 +1,13 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-12 10:52:50
* @LastEditors : Shiming
* @LastEditTime : 2022-02-15 13:35:46
* @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\freight\\enterprise-audit\\enterprise-audit.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="'企业审核列表'" [content]="content"> <page-header-wrapper [title]="'企业审核列表'" [content]="content">
<nz-card class="mb-md"> <nz-card class="mb-md">
<!-- 搜索表单 --> <!-- 搜索表单 -->
@ -8,8 +18,7 @@
<div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right" <div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"
[class.expend-options]="_$expand"> [class.expend-options]="_$expand">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-list']">查询</button> <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-list']">查询</button>
<button *ngIf="tabType === 1" nz-button nzType="primary" [disabled]="service.http.loading" <button *ngIf="tabType == 1" nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportList()" acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-export']">导出</button>
(click)="exportList()" acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-export']">导出</button>
<button nz-button (click)="resetSF()" [disabled]="service.http.loading">重置</button> <button nz-button (click)="resetSF()" [disabled]="service.http.loading">重置</button>
<button nz-button nzType="link" (click)="expandToggle(!_$expand)"> <button nz-button nzType="link" (click)="expandToggle(!_$expand)">
{{ !_$expand ? '展开' : '收起' }} {{ !_$expand ? '展开' : '收起' }}

View File

@ -213,7 +213,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit {
text: '审核', text: '审核',
click: _record => this.ViewAdimin(_record), click: _record => this.ViewAdimin(_record),
iif: (item: any) => item.approvalStatus === 10, iif: (item: any) => item.approvalStatus === 10,
// acl: { ability: ['USERCENTER-FREIGHT-ENTERPRISE-view'] }, acl: { ability: ['USERCENTER-FREIGHT-LIST-audit'] },
}] }]
} }
]; ];

View File

@ -173,6 +173,8 @@ export class FreightComponentsListComponent implements OnInit {
// { title: '', type: 'checkbox', className: 'text-center' }, // { title: '', type: 'checkbox', className: 'text-center' },
{ title: '企业名称', className: 'text-center', index: 'enterpriseName' }, { title: '企业名称', className: 'text-center', index: 'enterpriseName' },
{ title: '管理员', className: 'text-center', render: 'contacter' }, { title: '管理员', className: 'text-center', render: 'contacter' },
{ title: '审核人', className: 'text-center', index: 'approvalUserName' },
{ title: '网络货运人', className: 'text-center', index: 'netTranName' }, { title: '网络货运人', className: 'text-center', index: 'netTranName' },
{ title: '常用服务', className: 'text-center', index: 'oftenUsedServices', type: 'enum', enum: { 10: '整车发货', 20: '大宗发货' } }, { title: '常用服务', className: 'text-center', index: 'oftenUsedServices', type: 'enum', enum: { 10: '整车发货', 20: '大宗发货' } },
{ title: '推广业务员', className: 'text-center', render: 'promotersTelephone' }, { title: '推广业务员', className: 'text-center', render: 'promotersTelephone' },

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-25 16:03:45 * @Date : 2022-01-25 16:03:45
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-02-14 16:18:02 * @LastEditTime : 2022-02-15 11:16:42
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-h5\\dynamic-setting-h5.component.html * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-h5\\dynamic-setting-h5.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -38,6 +38,7 @@
<label nz-radio [nzValue]="1" class="ml-xl">{{item.remark?.[1] || '是'}}</label> <label nz-radio [nzValue]="1" class="ml-xl">{{item.remark?.[1] || '是'}}</label>
</nz-radio-group> </nz-radio-group>
</ng-container> </ng-container>
<ng-container *ngSwitchCase="3"> <ng-container *ngSwitchCase="3">
<nz-time-picker nzFormat="HH:mm" nzPlaceHolder="请选择时间" [(ngModel)]="item.itemValue" <nz-time-picker nzFormat="HH:mm" nzPlaceHolder="请选择时间" [(ngModel)]="item.itemValue"
class="ml-md mr-xl"> class="ml-md mr-xl">
@ -78,6 +79,22 @@
<input nz-input placeholder="请输入" [(ngModel)]="item.itemValue" /> <input nz-input placeholder="请输入" [(ngModel)]="item.itemValue" />
</nz-input-group> </nz-input-group>
</ng-container> </ng-container>
<ng-container *ngSwitchCase="9">
<nz-upload
[nzAction]="service.$api_upload_url"
[nzName]="'multipartFile'"
[nzHeaders]="{ authorization: 'authorization-text' }"
[(nzFileList)]="item.itemValue"
>
<button nz-button>
<i nz-icon nzType="upload"></i>
上传文件
</button>
</nz-upload>
</ng-container>
<ng-container *ngSwitchCase="10">
<nz-switch [(ngModel)]="item.itemValue"></nz-switch>
</ng-container>
</ng-container> </ng-container>
</se> </se>
</div> </div>

View File

@ -4,14 +4,15 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-25 16:03:45 * @Date : 2022-01-25 16:03:45
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-02-14 14:54:08 * @LastEditTime : 2022-02-15 10:40:43
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-h5\\dynamic-setting-h5.component.ts * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-h5\\dynamic-setting-h5.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
import { Component, OnInit, EventEmitter, Input, Output } from '@angular/core'; import { Component, OnInit, EventEmitter, Input, Output } from '@angular/core';
import { BaseService } from '@shared'; import { BaseService } from '@shared';
import { NzUploadChangeParam } from 'ng-zorro-antd/upload';
const JSONTYPE = new Set([5,6]); const JSONTYPE = new Set([5, 6, 9]);
@Component({ @Component({
selector: 'app-dynamic-setting-h5', selector: 'app-dynamic-setting-h5',
templateUrl: './dynamic-setting-h5.component.html', templateUrl: './dynamic-setting-h5.component.html',
@ -36,11 +37,11 @@ export class DynamicSettingH5Component implements OnInit {
labelWidth = 250; labelWidth = 250;
@Input() @Input()
itemValue = 'itemValue'; itemValue = 'itemValue';
listUrls: any;
constructor(public service: BaseService) {} constructor(public service: BaseService) {}
ngOnInit() { ngOnInit() {
console.log(this.tabs) console.log(this.tabs);
} }
changeType(type: any): void { changeType(type: any): void {
@ -54,9 +55,19 @@ export class DynamicSettingH5Component implements OnInit {
if (this.configList?.length < 0) { if (this.configList?.length < 0) {
return; return;
} }
console.log(this.configList) console.log(this.configList);
let params = [...this.configList]; let params = [...this.configList];
params = params.map((item: any) => { params = params.map((item: any) => {
console.log(item);
if (item.itemType == 9) {
const files = item.itemValue?.map(({ url, name }: any) => ({ url, name }));
return {
...item,
remark: item.remark ? JSON.stringify(item.remark) : null,
itemData: item.itemData ? JSON.stringify(item.itemData) : null,
itemValue: item.itemValue ? JSON.stringify(files) : null
};
}
if (JSONTYPE.has(item.itemType)) { if (JSONTYPE.has(item.itemType)) {
item.itemValue = item.itemValue ? JSON.stringify(item.itemValue) : null; item.itemValue = item.itemValue ? JSON.stringify(item.itemValue) : null;
} }
@ -66,6 +77,8 @@ export class DynamicSettingH5Component implements OnInit {
itemData: item.itemData ? JSON.stringify(item.itemData) : null itemData: item.itemData ? JSON.stringify(item.itemData) : null
}; };
}); });
console.log(params);
this.saveEvent.emit(params); this.saveEvent.emit(params);
} }
} }
// [0]?.response?.data.fullFilePath

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-10 16:06:17 * @Date : 2022-01-10 16:06:17
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-02-14 16:19:54 * @LastEditTime : 2022-02-15 11:23:29
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-modal\\dynamic-setting-modal.component.ts * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-modal\\dynamic-setting-modal.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -101,7 +101,7 @@ export class DynamicSettingModalComponent implements OnInit {
remark: item?.remark ? JSON.parse(item?.remark) : null, remark: item?.remark ? JSON.parse(item?.remark) : null,
extend: item?.extend ? JSON.parse(item?.extend) : [], extend: item?.extend ? JSON.parse(item?.extend) : [],
// itemData: item.itemData ? JSON.parse(item.itemData) : item.itemData, // itemData: item.itemData ? JSON.parse(item.itemData) : item.itemData,
itemValue: item?.itemValue ? item?.itemType === 1? JSON.parse(item?.itemValue) : item?.itemValue : item?.itemValue itemValue: item?.itemValue ? item?.itemType !== 8? JSON.parse(item?.itemValue) : item?.itemValue : item?.itemValue
})); }));
} }
return []; return [];

View File

@ -1,15 +1,26 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-25 13:10:49
* @LastEditors : Shiming
* @LastEditTime : 2022-02-15 10:09:24
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting.module.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { DynamicSettingH5Component } from './dynamic-setting-h5/dynamic-setting-h5.component'; import { DynamicSettingH5Component } from './dynamic-setting-h5/dynamic-setting-h5.component';
import { SHARED_ZORRO_MODULES } from '../../shared-zorro.module'; import { SHARED_ZORRO_MODULES } from '../../shared-zorro.module';
import { SHARED_DELON_MODULES } from '../../shared-delon.module'; import { SHARED_DELON_MODULES } from '../../shared-delon.module';
import { NzSwitchModule } from 'ng-zorro-antd/switch';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { DynamicSettingModalComponent } from './dynamic-setting-modal/dynamic-setting-modal.component'; import { DynamicSettingModalComponent } from './dynamic-setting-modal/dynamic-setting-modal.component';
import { FreightTableComponent } from './freight-table/freight-table.component'; import { FreightTableComponent } from './freight-table/freight-table.component';
const COMPONENTS = [DynamicSettingH5Component, DynamicSettingModalComponent, FreightTableComponent]; const COMPONENTS = [DynamicSettingH5Component, DynamicSettingModalComponent, FreightTableComponent];
@NgModule({ @NgModule({
declarations: [...COMPONENTS], declarations: [...COMPONENTS],
imports: [CommonModule, FormsModule, SHARED_ZORRO_MODULES, SHARED_DELON_MODULES], imports: [CommonModule, FormsModule, NzSwitchModule,SHARED_ZORRO_MODULES, SHARED_DELON_MODULES],
exports: [...COMPONENTS] exports: [...COMPONENTS]
}) })
export class DynamicSettingModule {} export class DynamicSettingModule {}

View File

@ -1,8 +1,8 @@
/* /*
* @Author: Maple * @Author: Maple
* @Date: 2021-03-20 16:38:44 * @Date: 2021-03-20 16:38:44
* @LastEditors: Do not edit * @LastEditors : Shiming
* @LastEditTime: 2021-06-17 15:06:37 * @LastEditTime : 2022-02-15 09:41:48
* @Description: 全局基础服务: * @Description: 全局基础服务:
* 所有实体类服务必须使用extends扩展此类 * 所有实体类服务必须使用extends扩展此类
* 几个特别的Get参数 * 几个特别的Get参数
@ -63,7 +63,8 @@ export class BaseService implements IBase {
public $api_import_download_tpl!: string; public $api_import_download_tpl!: string;
// 获取字典选项 // 获取字典选项
public $api_get_dict!: string; public $api_get_dict!: string;
// 上传图片
public $api_upload_url = `/api/mdc/pbc/upload/multipartFile/file`;
constructor(public injector: Injector) {} constructor(public injector: Injector) {}
get http(): _HttpClient { get http(): _HttpClient {