From 90e53e568c8816121aeac8a125e6b17bb70de54c Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 7 Jan 2022 11:11:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract-template-detail.component.ts | 25 ++++++++------- .../contract-template.component.ts | 32 ++----------------- .../onecar-publish.component.ts | 2 +- 3 files changed, 17 insertions(+), 42 deletions(-) diff --git a/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts b/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts index 06a8c232..9aec5a57 100644 --- a/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts +++ b/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts @@ -2,7 +2,7 @@ import { Router } from '@angular/router'; /* * @Author: your name * @Date: 2022-01-05 11:01:55 - * @LastEditTime: 2022-01-06 20:49:42 + * @LastEditTime: 2022-01-06 21:09:31 * @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 @@ -94,17 +94,6 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { }, } as SFSelectWidgetSchema, }, - // contractType: { - // type: 'string', - // title: '单据类型', - // ui: { - // widget: 'select', - // placeholder: '请选择', - // visibleIf: { - // templateType: value => value === true - // } - // } as SFSelectWidgetSchema - // }, contractType: { title: '单据类型', type: 'string', @@ -119,6 +108,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { } as SFSelectWidgetSchema, }, } + ,required: ['templateName','templateType'] }; this.ui = { '*': { @@ -161,6 +151,17 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { save () { console.log(this.sf.value); + 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' ) { + console.log(this.sf.value.contractType) + if(this.sf.value.contractType == '') { + this.service.msgSrv.error("必填参数为空,请检查再重新保存!"); + return; + } + } console.log(this.sfdata); console.log(this.sf2.value); console.log(this.title); diff --git a/src/app/routes/contract-management/components/contract-template/contract-template.component.ts b/src/app/routes/contract-management/components/contract-template/contract-template.component.ts index 70e5344d..edcfab46 100644 --- a/src/app/routes/contract-management/components/contract-template/contract-template.component.ts +++ b/src/app/routes/contract-management/components/contract-template/contract-template.component.ts @@ -175,34 +175,7 @@ export class OrderManagementTemplateComponent implements OnInit { this.sf.reset(); this._$expand = false; } - /* - * 审核关闭弹窗 - view: 1 - 浮动费用: 0 - 查看评价: 3 - */ - handleCancel(type: string) { - const paramsa = { - handleStatus: 0, - id: this.channelId - } - // this.service.request(this.service.$api_get_dealWithComplaint, paramsa).subscribe((res: any) =>{ - // console.log(res) - // if(res) { - // this.service.msgSrv.success('已拒绝!') - // this.isVisibleRE = false - // } else{ - // this.service.msgSrv.error(res?.msg) - // } - // }) - } - /** - /** - *查看评价 - */ - viewEvaluate(item: any) { - this.channelId = item.id; - } + edit(value: any) { this.router.navigate(['/contract-management/template/detail/' + value.id],{ queryParams: { @@ -231,9 +204,10 @@ export class OrderManagementTemplateComponent implements OnInit { this.modal.confirm({ nzTitle: '删除确认', nzOnOk: () => - this.service.request(this.service.$api_deletebatch_contractTemplate,value.id).subscribe(res => { + this.service.request(this.service.$api_deletebatch_contractTemplate, [value.id]).subscribe(res => { if (res) { this.service.msgSrv.success('删除成功!'); + this.st.reload(1) } }) }); diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index 426e9370..38109f14 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -654,7 +654,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { .subscribe(res => { if (res) { this.sf3.getProperty('/goodsNameId')!.schema.enum = res; - this.sf3.getProperty('/goodsNameId')!.widget.reset(res); + this.sf3.getProperty('/goodsNameId')!.widget?.reset(res); if(this.sf3data.goodsNameId){ this.sf3.setValue('/goodsNameId',this.sf3data.goodsNameId); } From 11c5ab47b866cd105834ffbb0ebc2327b5629534 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 7 Jan 2022 11:13:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../freight/enterprise-audit/enterprise-audit.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.ts b/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.ts index 212659cf..dac692ab 100644 --- a/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.ts +++ b/src/app/routes/usercenter/components/freight/enterprise-audit/enterprise-audit.component.ts @@ -165,6 +165,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { type: 'badge', badge: { 10: { text: '待审核', color: 'processing' }, + 15: { text: '已撤销', color: 'processing' }, 20: { text: '已成功', color: 'success' }, 30: { text: '审核失败', color: 'warning' } } @@ -265,6 +266,7 @@ export class FreightComponentsEnterpriseAuditComponent implements OnInit { enum: [ { label: '全部', value: '' }, { label: '待审核', value: 10 }, + { label: '已撤销', value: 15 }, { label: '已成功', value: 20 }, { label: '审核失败', value: 30 } ],