批量审核

This commit is contained in:
wangshiming
2022-01-18 17:44:03 +08:00
parent a8a9565b40
commit 8bf3a60425
94 changed files with 2205 additions and 2001 deletions

View File

@ -1,11 +1,14 @@
<!--
* @Author: your name
* @Date: 2022-01-05 11:01:55
* @LastEditTime: 2022-01-06 20:47:40
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\contract-management\components\contract-template-detail\contract-template-detail.component.html
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-05 11:01:55
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:16:27
* @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-detail\\contract-template-detail.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<!-- 页头 -->
<page-header-wrapper [logo]="logo" [title]="textStatus" [content]="headerContent">
<ng-template #logo>

View File

@ -1,11 +1,14 @@
/*
* @Author: your name
* @Date: 2021-11-29 20:19:08
* @LastEditTime: 2022-01-10 14:49:21
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\usercenter\components\freight\list\detail\detail.component.spec.ts
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-05 11:01:55
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:16:31
* @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-detail\\contract-template-detail.component.spec.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ContractManagementTemplateDetailComponent } from './contract-template-detail.component';

View File

@ -1,24 +1,18 @@
import { Router } from '@angular/router';
/*
* @Author: your name
* @Date: 2022-01-05 11:01:55
* @LastEditTime: 2022-01-18 16:38:01
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\contract-management\components\contract-template-detail\contract-template-detail.component.ts
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-05 11:01:55
* @LastEditors : Shiming
* @LastEditTime : 2022-01-18 17:16:49
* @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-detail\\contract-template-detail.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { DatePipe } from '@angular/common';
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { apiConf } from '@conf/api.conf';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFTagWidgetSchema, SFTextWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { ActivatedRoute, Router } from '@angular/router';
import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { ImageViewComponent } from 'src/app/shared/components/imagelist';
import { ContractManagementService } from '../../services/contract-management.service';
@Component({
@ -28,7 +22,6 @@ import { ContractManagementService } from '../../services/contract-management.se
providers: [DatePipe]
})
export class ContractManagementTemplateDetailComponent implements OnInit {
constructor(
private nzModalService: NzModalService,
public service: ContractManagementService,
@ -36,7 +29,7 @@ export class ContractManagementTemplateDetailComponent implements OnInit {
private datePipe: DatePipe,
private router: Router
) {}
textStatus = '新建模板'
textStatus = '新建模板';
@ViewChild('sf', { static: false }) sf!: SFComponent;
schema: SFSchema = {};
@ViewChild('sf2', { static: false }) sf2!: SFComponent;
@ -51,32 +44,32 @@ export class ContractManagementTemplateDetailComponent implements OnInit {
};
isUpdate = false;
ngOnInit() {
this.initSF()
this.initSF2()
if(this.route.snapshot.queryParams.status == 1) {
this.initSF();
this.initSF2();
if (this.route.snapshot.queryParams.status == 1) {
// 新建
this.isUpdate = true;
} else if(this.route.snapshot.queryParams.status == 2) {
} else if (this.route.snapshot.queryParams.status == 2) {
// 编辑
this.textStatus = '编辑模板';
this.isUpdate =true;
this.initData(this.service.$api_get_contractTemplate)
}else if(this.route.snapshot.queryParams.status == 3) {
this.isUpdate = true;
this.initData(this.service.$api_get_contractTemplate);
} else if (this.route.snapshot.queryParams.status == 3) {
// 编辑
this.textStatus = '查看模板';
this.isUpdate =false;
this.initData(this.service.$api_get_contractTemplate)
this.isUpdate = false;
this.initData(this.service.$api_get_contractTemplate);
}
}
goBack() {
window.history.go(-1)
window.history.go(-1);
}
initSF() {
this.schema = {
properties: {
templateName: {
type: 'string',
title: '模版名称',
title: '模版名称'
},
templateType: {
title: '模板类型',
@ -85,11 +78,11 @@ export class ContractManagementTemplateDetailComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'contract:template:type' },
containAllLable:true,
containAllLable: true,
visibleIf: {
_$expand: (value: boolean) => value,
},
} as SFSelectWidgetSchema,
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema
},
contractType: {
title: '单据类型',
@ -98,14 +91,14 @@ export class ContractManagementTemplateDetailComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'contract:type' },
containAllLable:true,
visibleIf: {
templateType: value => value === "MX"
containAllLable: true,
visibleIf: {
templateType: value => value === 'MX'
}
} as SFSelectWidgetSchema,
},
}
,required: ['templateName','templateType']
} as SFSelectWidgetSchema
}
},
required: ['templateName', 'templateType']
};
this.ui = {
'*': {
@ -133,26 +126,26 @@ export class ContractManagementTemplateDetailComponent implements OnInit {
};
}
initData(url: string) {
this.service.request(url, {id: this.route.snapshot.params.id}).subscribe((res) => {
if(res) {
this.service.request(url, { id: this.route.snapshot.params.id }).subscribe(res => {
if (res) {
this.detailList = res;
this.sfdata = res;
this.sfdata2 = res;
}
})
});
}
cancel() {
window.history.go(-1)
window.history.go(-1);
}
save () {
if( !this.sf.value.templateName || !this.sf.value.templateType || !this.sf2.value.templateContent || !this.title) {
this.service.msgSrv.error("必填参数为空,请检查再重新保存!");
save() {
if (!this.sf.value.templateName || !this.sf.value.templateType || !this.sf2.value.templateContent || !this.title) {
this.service.msgSrv.error('必填参数为空,请检查再重新保存!');
return;
}
if(this.sf.value.templateType == 'MX' ) {
if(this.sf.value.contractType == '') {
this.service.msgSrv.error("必填参数为空,请检查再重新保存!");
if (this.sf.value.templateType == 'MX') {
if (this.sf.value.contractType == '') {
this.service.msgSrv.error('必填参数为空,请检查再重新保存!');
return;
}
}
@ -160,12 +153,12 @@ export class ContractManagementTemplateDetailComponent implements OnInit {
...this.sf.value,
...this.sf2.value,
templateTitle: this.title
}
};
this.service.request(this.service.$api_save_contractTemplate, params).subscribe((res: any) => {
if(res) {
this.service.msgSrv.success("保存成功!")
this.router.navigate(['/contract-management/template'])
if (res) {
this.service.msgSrv.success('保存成功!');
this.router.navigate(['/contract-management/template']);
}
})
});
}
}