解决冲突
This commit is contained in:
@ -1,10 +1,11 @@
|
|||||||
|
import { OnChanges } from '@angular/core';
|
||||||
/*
|
/*
|
||||||
* @Description :
|
* @Description :
|
||||||
* @Version : 1.0
|
* @Version : 1.0
|
||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-01-05 11:01:55
|
* @Date : 2022-01-05 11:01:55
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-02-24 20:06:26
|
* @LastEditTime : 2022-02-28 20:22:46
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-detail\\contract-template-detail.component.ts
|
* @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.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -29,7 +30,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
|||||||
public route: ActivatedRoute,
|
public route: ActivatedRoute,
|
||||||
private datePipe: DatePipe,
|
private datePipe: DatePipe,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
public shipperservice: ShipperBaseService,
|
public shipperservice: ShipperBaseService
|
||||||
) {}
|
) {}
|
||||||
textStatus = '新建模板';
|
textStatus = '新建模板';
|
||||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
@ -40,6 +41,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
|||||||
sfdata: any;
|
sfdata: any;
|
||||||
sfdata2: any;
|
sfdata2: any;
|
||||||
title: any;
|
title: any;
|
||||||
|
Types: any;
|
||||||
templateHTML: any;
|
templateHTML: any;
|
||||||
detailList: any = {
|
detailList: any = {
|
||||||
templateName: ''
|
templateName: ''
|
||||||
@ -76,17 +78,57 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
|||||||
templateType: {
|
templateType: {
|
||||||
title: '模板类型',
|
title: '模板类型',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: '',
|
enum: [
|
||||||
|
{ label: '框架合同', value: 'KJ' },
|
||||||
|
{ label: '明细合同', value: 'MX' },
|
||||||
|
{ label: '合伙人合同', value: 'HHR' }
|
||||||
|
],
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'dict-select',
|
widget: 'select',
|
||||||
params: { dictKey: 'contract:template:type' },
|
placeholder: '请选择',
|
||||||
containAllLable: true,
|
change: (tag: any, org: any) => {
|
||||||
visibleIf: {
|
console.log(tag);
|
||||||
_$expand: (value: boolean) => value
|
switch (tag) {
|
||||||
|
case 'MX':
|
||||||
|
this.Types = [
|
||||||
|
{ label: '订单合同', value: '1' },
|
||||||
|
{ label: '订单补充协议', value: '2' },
|
||||||
|
{ label: '运单合同', value: '3' },
|
||||||
|
{ label: '运单补充协议', value: '4' },
|
||||||
|
{ label: '委托代收合同', value: '5' }
|
||||||
|
];
|
||||||
|
this.sf.getProperty('/contractType')!.schema.enum = this.Types;
|
||||||
|
this.sf.getProperty('/contractType')!.widget.reset(this.Types);
|
||||||
|
this.sf.setValue('/contractType', this.Types);
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
case 'KJ':
|
||||||
|
this.Types = [
|
||||||
|
{ label: '网络货物运输服务合同', value: '6' },
|
||||||
|
{ label: '运输服务承揽合同', value: '7' }
|
||||||
|
];
|
||||||
|
this.sf.getProperty('/contractType')!.schema.enum = this.Types;
|
||||||
|
this.sf.getProperty('/contractType')!.widget.reset(this.Types);
|
||||||
|
this.sf.setValue('/contractType', this.Types);
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
case 'HHR':
|
||||||
|
this.Types = [
|
||||||
|
{ label: '企业合伙人入驻合同', value: '8' },
|
||||||
|
{ label: '个人合伙人入驻合同', value: '9' }
|
||||||
|
];
|
||||||
|
this.sf.getProperty('/contractType')!.schema.enum = this.Types;
|
||||||
|
this.sf.getProperty('/contractType')!.widget.reset(this.Types);
|
||||||
|
this.sf.setValue('/contractType', this.Types);
|
||||||
|
return;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} as SFSelectWidgetSchema
|
}
|
||||||
},
|
},
|
||||||
signingObject: {
|
signingObject: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '承包商对象',
|
title: '承包商对象',
|
||||||
enum: [
|
enum: [
|
||||||
@ -101,13 +143,11 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
|||||||
contractType: {
|
contractType: {
|
||||||
title: '合同类型',
|
title: '合同类型',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: '',
|
enum: this.Types,
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'dict-select',
|
widget: 'select',
|
||||||
containsAllLable: true,
|
placeholder: '请选择'
|
||||||
params: { dictKey: 'contract:type' },
|
}
|
||||||
containAllLable: true,
|
|
||||||
} as SFSelectWidgetSchema
|
|
||||||
},
|
},
|
||||||
resourceType: {
|
resourceType: {
|
||||||
title: '货源类型',
|
title: '货源类型',
|
||||||
@ -120,7 +160,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
|||||||
visibleIf: {
|
visibleIf: {
|
||||||
templateType: value => value === 'MX'
|
templateType: value => value === 'MX'
|
||||||
}
|
}
|
||||||
} as SFSelectWidgetSchema,
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
enterpriseInfoId: {
|
enterpriseInfoId: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -134,7 +174,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
|
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
required: ['templateName', 'templateType']
|
required: ['templateName', 'templateType']
|
||||||
};
|
};
|
||||||
@ -165,11 +205,11 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
initData(url: string) {
|
initData(url: string) {
|
||||||
console.log('编辑');
|
console.log('编辑');
|
||||||
|
|
||||||
this.service.request(url, { id: this.route.snapshot.params.id }).subscribe(res => {
|
this.service.request(url, { id: this.route.snapshot.params.id }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.detailList = res;
|
this.detailList = res;
|
||||||
this.title = this.detailList?.templateName
|
this.title = this.detailList?.templateName;
|
||||||
this.sfdata = res;
|
this.sfdata = res;
|
||||||
this.sfdata2 = res;
|
this.sfdata2 = res;
|
||||||
}
|
}
|
||||||
@ -195,7 +235,7 @@ export class ContractManagementTemplateTextComponent implements OnInit {
|
|||||||
...this.sf2.value,
|
...this.sf2.value,
|
||||||
templateTitle: this.title || this.detailList.templateName
|
templateTitle: this.title || this.detailList.templateName
|
||||||
};
|
};
|
||||||
console.log(params)
|
console.log(params);
|
||||||
this.service.request(this.service.$api_save_contractTemplate, params).subscribe((res: any) => {
|
this.service.request(this.service.$api_save_contractTemplate, params).subscribe((res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.service.msgSrv.success('保存成功!');
|
this.service.msgSrv.success('保存成功!');
|
||||||
|
|||||||
Reference in New Issue
Block a user