This commit is contained in:
Taric Xin
2022-03-30 14:55:49 +08:00
parent 3348e72b58
commit abf59f38e7
9 changed files with 42 additions and 41 deletions

View File

@ -20,7 +20,7 @@ module.exports = {
// } // }
'//api': { '//api': {
target: { target: {
host: 'tms-api-dev.eascs.com', host: 'tms-api-test.eascs.com',
protocol: 'https:', protocol: 'https:',
port: 443 port: 443
}, },

View File

@ -8,7 +8,7 @@ import { DownloadService } from '../../services/download.service';
@Component({ @Component({
selector: 'app-download-center-components-list', selector: 'app-download-center-components-list',
templateUrl: './list.component.html', templateUrl: './list.component.html'
}) })
export class DownloadComponentsListComponent implements OnInit { export class DownloadComponentsListComponent implements OnInit {
ui: SFUISchema = {}; ui: SFUISchema = {};
@ -24,7 +24,7 @@ export class DownloadComponentsListComponent implements OnInit {
get reqParams() { get reqParams() {
const params = Object.assign({}, this.sf?.value || {}); const params = Object.assign({}, this.sf?.value || {});
delete params._$expand; delete params._$expand;
return { ...params }; return { ...params, createTime: params?.createTime?.start, applyEndTime: params?.createTime?.end };
} }
/** /**
@ -49,23 +49,18 @@ export class DownloadComponentsListComponent implements OnInit {
properties: { properties: {
_$expand: { _$expand: {
type: 'boolean', type: 'boolean',
ui: { hidden: true }, ui: { hidden: true }
}, },
applyStartTime: { createTime: {
type: 'string', type: 'string',
title: '创建时间', title: '创建时间',
ui: { ui: {
widget: 'date', widget: 'sl-from-to',
format: 'yyyy-MM-dd', type: 'date',
end: 'applyEndTime', format: 'yyyy-MM-dd'
} as SFDateWidgetSchema, } as SFDateWidgetSchema
}, }
applyEndTime: { }
type: 'string',
title: '',
ui: { widget: 'date', end: 'end' } as SFDateWidgetSchema,
},
},
}; };
this.ui = { '*': { spanLabelFixed: 80, grid: { span: 8, gutter: 4 } } }; this.ui = { '*': { spanLabelFixed: 80, grid: { span: 8, gutter: 4 } } };
} }
@ -87,8 +82,8 @@ export class DownloadComponentsListComponent implements OnInit {
enum: { enum: {
0: '生成中', 0: '生成中',
1: '已完成', 1: '已完成',
2: '失败', 2: '失败'
}, }
}, },
{ title: '下载次数', index: 'downloadCount', width: '120px', className: 'text-center' }, { title: '下载次数', index: 'downloadCount', width: '120px', className: 'text-center' },
{ title: '创建时间', index: 'createTime', width: '120px', className: 'text-center' }, { title: '创建时间', index: 'createTime', width: '120px', className: 'text-center' },
@ -98,10 +93,8 @@ export class DownloadComponentsListComponent implements OnInit {
fixed: 'right', fixed: 'right',
width: '170px', width: '170px',
className: 'text-center', className: 'text-center',
buttons: [ buttons: [{ text: '下载', click: _record => this.download(_record) }]
{ text: '下载', click: (_record) => this.download(_record)}, }
],
},
]; ];
} }
@ -115,12 +108,12 @@ export class DownloadComponentsListComponent implements OnInit {
nzTitle: '<i>删除确认</i>', nzTitle: '<i>删除确认</i>',
nzContent: `<b>即将删除 当前行数据,请仔细核对,避免误操作!<br>是否删除?</br>`, nzContent: `<b>即将删除 当前行数据,请仔细核对,避免误操作!<br>是否删除?</br>`,
nzOnOk: () => nzOnOk: () =>
this.service.request(this.service.encodeUrlHeader(this.service.$api_del_many, headers), { fileKey: record.id }).subscribe((res) => { this.service.request(this.service.encodeUrlHeader(this.service.$api_del_many, headers), { fileKey: record.id }).subscribe(res => {
if (res) { if (res) {
this.service.msgSrv.success('数据删除成功!'); this.service.msgSrv.success('数据删除成功!');
this.st?.reload(); this.st?.reload();
} }
}), })
}); });
} }
download(record: STData) { download(record: STData) {
@ -129,7 +122,7 @@ export class DownloadComponentsListComponent implements OnInit {
this.service.encodeUrlHeader(this.service.$api_download_file, headers), this.service.encodeUrlHeader(this.service.$api_download_file, headers),
{}, {},
{ fileKey: record.fileUniqueKey }, { fileKey: record.fileUniqueKey },
'POST', 'POST'
); );
} }
} }

View File

@ -12,7 +12,7 @@
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"> <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<button nz-button nzType="primary" [nzLoading]="false" (click)="st?.load(1)">查询</button> <button nz-button nzType="primary" [nzLoading]="false" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button> <button nz-button (click)="resetSF()">重置</button>
<button nz-button> 导出</button> <!-- <button nz-button> 导出</button> -->
<button nz-button nzType="link" (click)="expandToggle()"> <button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }} {{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>

View File

@ -99,7 +99,7 @@
<div nz-col [nzXl]="6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"> <div nz-col [nzXl]="6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<button nz-button nzType="primary" [nzLoading]="false" (click)="costST?.load(1)">查询</button> <button nz-button nzType="primary" [nzLoading]="false" (click)="costST?.load(1)">查询</button>
<button nz-button (click)="resetSF(2)">重置</button> <button nz-button (click)="resetSF(2)">重置</button>
<button nz-button> 导出</button> <!-- <button nz-button> 导出</button> -->
</div> </div>
</div> </div>

View File

@ -83,7 +83,7 @@
class="text-right"> class="text-right">
<button nz-button nzType="primary" [nzLoading]="false" (click)="st?.load(1)">查询</button> <button nz-button nzType="primary" [nzLoading]="false" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button> <button nz-button (click)="resetSF()">重置</button>
<button nz-button> 导出</button> <!-- <button nz-button> 导出</button> -->
<button nz-button nzType="link" (click)="expandToggle()"> <button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }} {{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>

View File

@ -20,7 +20,7 @@
<div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"> <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
<button nz-button nzType="primary" [nzLoading]="false" (click)="st?.load(1)">查询</button> <button nz-button nzType="primary" [nzLoading]="false" (click)="st?.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button> <button nz-button (click)="resetSF()">重置</button>
<button nz-button> 导出</button> <!-- <button nz-button> 导出</button> -->
<button nz-button nzType="link" (click)="expandToggle()"> <button nz-button nzType="link" (click)="expandToggle()">
{{ !_$expand ? '展开' : '收起' }} {{ !_$expand ? '展开' : '收起' }}
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>

View File

@ -119,17 +119,18 @@ export class InvoiceRequestedComponent {
this.service.msgSrv.warning('请选择开票申请'); this.service.msgSrv.warning('请选择开票申请');
return; return;
} }
if (item.find(item => item.sts !== '1')) { // if (item.find(item => item.sts !== '1')) {
this.service.msgSrv.warning('请勿选择非待处理订单'); // this.service.msgSrv.warning('请勿选择非待处理订单');
return; // return;
} // }
const modal = this.nzModalService.create({ const modal = this.nzModalService.create({
nzTitle: '修改地址', nzTitle: '修改地址',
nzContent: UpdateAddressModalComponent, nzContent: UpdateAddressModalComponent,
nzOkLoading: this.service.http.loading, nzOkLoading: this.service.http.loading,
nzOnOk: component => { nzOnOk: component => {
if (!component.sf.valid) { if (!component.sf.valid) {
this.service.msgSrv.warning('表单校验错误'); component.sf.validator({ emitError: true });
// this.service.msgSrv.warning('表单校验错误');
return false; return false;
} }
this.service this.service

View File

@ -334,7 +334,7 @@
{{ userIdentityDetail?.name }} {{ userIdentityDetail?.name }}
</se> </se>
<se [col]="1" label="备注" required> <se [col]="1" label="备注" required>
<textarea nz-input rows="3" style="width: 325px;margin-left: 14px;" maxlength="120" [(ngModel)]="approvalOpinion"></textarea> <textarea nz-input rows="3" style="width: 325px;margin-left: 14px;" maxlength="120" [(ngModel)]="approvalOpinion" placeholder="请输入驳回原因"></textarea>
</se> </se>
</div> </div>
</div> </div>

View File

@ -76,7 +76,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.initData(); this.initData();
this.initDetailByCode(); this.initDetailByCode();
this.changeEndKmAction() this.changeEndKmAction();
} }
initData() { initData() {
// 获取司机头部信息 // 获取司机头部信息
@ -191,6 +191,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
nzContent: this.redectModal, nzContent: this.redectModal,
nzOnOk: () => { nzOnOk: () => {
if (!this.approvalOpinion) { if (!this.approvalOpinion) {
this.service.msgSrv.warning('请填写备注');
return false; return false;
} }
this.adjuctUser( this.adjuctUser(
@ -213,7 +214,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
nzTitle: '审核通过', nzTitle: '审核通过',
nzContent: `<p>驾驶证号:${this.driverDetail?.licenseNo}</p><p>从业资格证号:${this.licenseDetail?.licenseNo}</p><p>是否确认通过审核`, nzContent: `<p>驾驶证号:${this.driverDetail?.licenseNo}</p><p>从业资格证号:${this.licenseDetail?.licenseNo}</p><p>是否确认通过审核`,
nzOnOk: () => { nzOnOk: () => {
this.changeEndKmAction() this.changeEndKmAction();
} }
}); });
} }
@ -226,7 +227,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
}, },
'审核成功' '审核成功'
); );
}) });
} }
/** 驳回驾驶员信息 */ /** 驳回驾驶员信息 */
rejectedDriver() { rejectedDriver() {
@ -331,12 +332,18 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit {
return; return;
} }
} }
if (!driverDetail.licenseNo || !driverDetail.driverModel || !driverDetail.validStartTime || !driverDetail.signingOrganization || !driverDetail.certificatePhotoWatermark) { if (
!driverDetail.licenseNo ||
!driverDetail.driverModel ||
!driverDetail.validStartTime ||
!driverDetail.signingOrganization ||
!driverDetail.certificatePhotoWatermark
) {
this.service.msgSrv.warning('请完善驾驶证信息'); this.service.msgSrv.warning('请完善驾驶证信息');
return; return;
} }
if (!licenseDetail.licenseNo || !licenseDetail.validStartTime || !licenseDetail.certificatePhotoWatermark) { if (!licenseDetail.licenseNo || !licenseDetail.validStartTime || !licenseDetail.certificatePhotoWatermark) {
this.service.msgSrv.warning('请完善从业资格证信息'); this.service.msgSrv.warning('请完善从业资格证信息');
return; return;
} }