车队长列表
This commit is contained in:
@ -1,30 +1,33 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFTagWidgetSchema, SFTextWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper, _HttpClient } from '@delon/theme';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { UsermanageService } from '../../../../services/usercenter.service';
|
||||
import { UsermanageService } from '../../../services/usercenter.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-supplier-components-list-view',
|
||||
selector: 'app-usercenter-components-driver-detail',
|
||||
templateUrl: './detail.component.html',
|
||||
styleUrls: ['./detail.component.less'],
|
||||
})
|
||||
export class FreightComponentsListDetailComponent implements OnInit {
|
||||
export class UserCenterComponentsDriverDetailComponent implements OnInit {
|
||||
i: any;
|
||||
url = `/rule?_allow_anonymous=true`;
|
||||
@ViewChild('st', { static: false }) st!: STComponent;
|
||||
detailData: any;
|
||||
isShow = false;
|
||||
isVisible = false;
|
||||
isVisibleNo = false;
|
||||
modalTitle = '有效期';
|
||||
modalName = '';
|
||||
ui!: SFUISchema;
|
||||
schema!: SFSchema;
|
||||
ui2!: SFUISchema;
|
||||
schema2!: SFSchema;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema1!: SFSchema;
|
||||
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
|
||||
@ViewChild('sf2', { static: false }) sf2!: SFComponent;
|
||||
validData: any = ['suppliersType'];
|
||||
suppliersData: any = {};
|
||||
|
||||
@ -41,7 +44,7 @@ export class FreightComponentsListDetailComponent implements OnInit {
|
||||
console.log(this.route.snapshot);
|
||||
// this.initData();
|
||||
this.initSF();
|
||||
this.initSF1();
|
||||
this.initSFNo();
|
||||
// this.launchSign();
|
||||
}
|
||||
/**
|
||||
@ -65,44 +68,36 @@ export class FreightComponentsListDetailComponent implements OnInit {
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
|
||||
}
|
||||
initSF1() {
|
||||
this.schema1 = {
|
||||
initSFNo() {
|
||||
this.schema2 = {
|
||||
properties: {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
suppliersType: {
|
||||
'姓名': { type: 'number', ui: { widget: 'text', defaultText: '深圳市星链供应链云科技有限公' } as SFTextWidgetSchema },
|
||||
roleDescription: {
|
||||
title: '备注',
|
||||
type: 'string',
|
||||
title: '类型',
|
||||
enum: [
|
||||
{ label: '非外部供应商', value: 0 },
|
||||
{ label: '外部供应商', value: 1 },
|
||||
],
|
||||
default: '',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
widget: 'select',
|
||||
change: (args: any) => {
|
||||
console.log(args, 'args');
|
||||
this.suppliersData.suppliersType = args;
|
||||
if (args === 1) {
|
||||
this.validData = ['suppliersType', 'externalSuppliersId'];
|
||||
} else {
|
||||
this.validData = ['suppliersType'];
|
||||
this.suppliersData.externalSuppliersId = '';
|
||||
}
|
||||
this.initSF1();
|
||||
},
|
||||
placeholder: '请输入地址',
|
||||
widget: 'textarea',
|
||||
},
|
||||
},
|
||||
externalSuppliersId: {
|
||||
title: '外部供应商id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
like: {
|
||||
type: 'number',
|
||||
title: '可选理由',
|
||||
enum: [
|
||||
{ value: 1, label: '电影' },
|
||||
{ value: 2, label: '书' },
|
||||
{ value: 3, label: '旅行' },
|
||||
],
|
||||
ui: {
|
||||
visibleIf: { suppliersType: (value: any) => value === 1 },
|
||||
},
|
||||
widget: 'tag',
|
||||
} as SFTagWidgetSchema,
|
||||
default: [1, 2],
|
||||
},
|
||||
},
|
||||
required: this.validData,
|
||||
required: ['roleDescription'],
|
||||
};
|
||||
this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
|
||||
}
|
||||
showModal(name: any) {
|
||||
this.modalName = name;
|
||||
@ -221,35 +216,45 @@ export class FreightComponentsListDetailComponent implements OnInit {
|
||||
}
|
||||
|
||||
handleCancel(name: any) {
|
||||
if (name === 'effectiveDate') {
|
||||
this.isShow = false;
|
||||
if (name === 'suppliersTypeNo') {
|
||||
this.isVisibleNo = false;
|
||||
} else {
|
||||
this.isVisible = false;
|
||||
}
|
||||
}
|
||||
handleOK(name: any) {
|
||||
handleOK() {
|
||||
const params: any = {
|
||||
tenantId: this.route.snapshot.params.id,
|
||||
// tenantId: this.route.snapshot.queryParams.tenantId,
|
||||
};
|
||||
|
||||
if (name === 'effectiveDate') {
|
||||
params.effectiveDate = this.sf?.value?.effectiveDate;
|
||||
} else {
|
||||
Object.assign(params, this.sf1?.value);
|
||||
}
|
||||
this.service.http.post(this.service.$api_set_freezeOrResume, params).subscribe((res) => {
|
||||
if (res.data === true) {
|
||||
this.service.msgSrv.success(`编辑成功!`);
|
||||
this.ngOnInit();
|
||||
} else {
|
||||
this.service.msgSrv.error(res.msg || '编辑失败!');
|
||||
}
|
||||
if (name === 'effectiveDate') {
|
||||
this.isShow = false;
|
||||
} else {
|
||||
this.isVisible = false;
|
||||
}
|
||||
});
|
||||
// if (name === 'effectiveDate') {
|
||||
// params.effectiveDate = this.sf?.value?.effectiveDate;
|
||||
// } else {
|
||||
// Object.assign(params, this.sf1?.value);
|
||||
// }
|
||||
// this.service.http.post(this.service.$api_set_freezeOrResume, params).subscribe((res) => {
|
||||
// if (res.data === true) {
|
||||
// this.service.msgSrv.success(`编辑成功!`);
|
||||
// this.ngOnInit();
|
||||
// } else {
|
||||
// this.service.msgSrv.error(res.msg || '编辑失败!');
|
||||
// }
|
||||
// if (name === 'effectiveDate') {
|
||||
// this.isShow = false;
|
||||
// } else {
|
||||
// this.isVisible = false;
|
||||
// }
|
||||
// });
|
||||
}
|
||||
auditPass() {
|
||||
this.isVisible = true
|
||||
}
|
||||
auditNo() {
|
||||
this.isVisibleNo = true
|
||||
}
|
||||
ratify() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user