用户中心

This commit is contained in:
wangshiming
2021-11-30 15:56:18 +08:00
parent a0845f956f
commit 540c845ca9
13 changed files with 152 additions and 2048 deletions

View File

@ -11,10 +11,15 @@ import { UsermanageService } from '../../../services/usercenter.service';
export class FreightComponentsUserComponent implements OnInit {
_$expand = false;
url = `/rule?_allow_anonymous=true`;
isVisible = false;
isVisibleFreeze = false;
isVisibleOpen = false;
ui!: SFUISchema;
ui2!: SFUISchema;
schema!: SFSchema;
schema2!: SFSchema;
columns!: STColumn[];
suppliersData: any;
datalist = [
{
storeName: '企业名称',
@ -45,6 +50,7 @@ export class FreightComponentsUserComponent implements OnInit {
]
@ViewChild('st', { static: false }) st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('sf2', { static: false }) sf2!: SFComponent;
constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
/**
@ -77,6 +83,7 @@ export class FreightComponentsUserComponent implements OnInit {
ngOnInit() {
this.initSF();
this.initST();
this.initSF2();
this.ar.url.subscribe((params) => {
this.st?.load(1);
});
@ -96,19 +103,21 @@ export class FreightComponentsUserComponent implements OnInit {
hidden: true,
},
},
storeName: { title: '企业名称', type: 'string', ui: { showRequired: false } },
storeName: { title: '用户姓名', type: 'string', ui: { showRequired: false } },
contactsName: {
title: '联系人',
title: '企业名称',
type: 'string',
ui: {
showRequired: false,
},
},
unifiedSocialCreditCode: {
title: '税源地',
phone: {
title: '手机号',
type: 'string',
format: 'mobile',
maxLength: 11,
ui: {
showRequired: false,
placeholder: '请输入手机号',
},
},
enStatus: {
@ -128,18 +137,13 @@ export class FreightComponentsUserComponent implements OnInit {
},
},
},
enStatus2: {
yewuphone: {
title: '业务员手机号',
type: 'string',
title: 'CRM审核状态',
enum: [
{ label: '全部', value: '' },
{ label: '正常', value: 0 },
{ label: '冻结', value: 1 },
{ label: '废弃', value: 2 },
],
default: '',
format: 'mobile',
maxLength: 11,
ui: {
widget: 'select',
placeholder: '请输入手机号',
visibleIf: {
expand: (value: boolean) => value,
},
@ -147,29 +151,38 @@ export class FreightComponentsUserComponent implements OnInit {
},
},
};
this.ui = { '*': { spanLabelFixed: 90, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } };
this.ui = { '*': { spanLabelFixed: 180, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } };
}
initSF2() {
this.schema2 = {
properties: {
phone: {
title: '手机号',
type: 'string',
format: 'mobile',
maxLength: 11,
ui: {
placeholder: '请输入手机号',
},
},
},
};
this.ui2 = { '*': { spanLabelFixed: 90, grid: { span: 16}, enter: () => this.st.load() } };
}
initST() {
this.columns = [
// { title: '', type: 'checkbox', className: 'text-center' },
{ title: '企业名称', className: 'text-center', index: 'storeName' },
{ title: '联系人', className: 'text-center', index: 'contactsName' },
{ title: '税源地', className: 'text-center', render: 'enterpriseName' },
{ title: '累计运单金额', className: 'text-center', index: 'unifiedSocialCreditCode' },
{ title: '道运证', className: 'text-center', index: 'contactsPhone',
{ title: '用户姓名', className: 'text-center', index: 'storeName' },
{ title: '手机号', className: 'text-center', index: 'contactsName' },
{ title: '身份证件号', className: 'text-center', render: 'enterpriseName' },
{ title: '常用服务', className: 'text-center', index: 'unifiedSocialCreditCode' },
{ title: '推广业务员', className: 'text-center', index: 'contactsPhone',
render: 'contactsPhone'
},
{ title: '企业状态', className: 'text-center', index: 'effectiveDateStr',
type: 'badge',
badge: {
: { text: '正常', color: 'success' },
: { text: '冻结', color: 'warning' },
: { text: '废弃', color: 'default' },
},
},
{ title: '申请时间', className: 'text-center', index: 'unifiedSocialCreditCode2' },
{
title: 'CRM审核状态',
title: '状态',
className: 'text-center',
index: 'enStatusStr2',
type: 'badge',
@ -179,19 +192,6 @@ export class FreightComponentsUserComponent implements OnInit {
: { text: '废弃', color: 'default' },
},
},
{
title: '代收权限',
className: 'text-center',
index: 'enStatusStr3',
type: 'badge',
badge: {
: { text: '正常', color: 'success' },
: { text: '冻结', color: 'warning' },
: { text: '废弃', color: 'default' },
},
},
{ title: '常用服务', className: 'text-center', index: 'unifiedSocialCreditCode3' },
{ title: '推广业务员', className: 'text-center', index: 'unifiedSocialCreditCode2' },
{
title: '操作',
width: '170px',
@ -200,8 +200,20 @@ export class FreightComponentsUserComponent implements OnInit {
{
text: '查看',
click: (item) => {
this.router.navigate(['./detail', item.tenantId], { relativeTo: this.ar });
// this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } });
this.router.navigate(['./view', item.tenantId], { relativeTo: this.ar });
},
},
{
text: '冻结',
click: (item) => {
this.isVisibleFreeze = true
},
},
{
text: '启用',
click: (item) => {
this.isVisibleOpen = false
console.log(item)
},
},
],
@ -209,7 +221,7 @@ export class FreightComponentsUserComponent implements OnInit {
];
}
daoyun(item: any) {
this.router.navigate(['./view', item.tenantId], { relativeTo: this.ar });
this.isVisible = true
}
expandToggle() {
this._$expand = !this._$expand;
@ -225,4 +237,16 @@ export class FreightComponentsUserComponent implements OnInit {
this.sf.reset();
this._$expand = false;
}
handleOK() {
console.log(this.sf2.value)
}
handleCancel() {
this.isVisible = false
}
handleCancel_open() {
this.isVisibleOpen = false
}
handleCancel_freeze() {
this.isVisibleFreeze = false
}
}