This commit is contained in:
Taric Xin
2022-05-09 11:23:33 +08:00
parent 1f462ebdfe
commit d971d09d12
18 changed files with 75 additions and 150 deletions

View File

@ -1,7 +1,7 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { Router } from '@angular/router';
import { STColumn, STComponent, STData } from '@delon/abc/st';
import { SFSchema } from '@delon/form';
import { ModalHelper } from '@delon/theme';
import { DynamicSettingModalComponent, SearchDrawerService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
@ -26,7 +26,6 @@ export class UserCenterComponentsDriverCaptainComponent extends BasicTableCompon
public service: UsermanageService,
private modal: NzModalService,
private router: Router,
private ar: ActivatedRoute,
private modalHelper: ModalHelper,
public searchDrawerService: SearchDrawerService
) {
@ -57,8 +56,7 @@ export class UserCenterComponentsDriverCaptainComponent extends BasicTableCompon
return this.st?.list.filter(item => item.checked) || [];
}
ngOnInit() {
}
ngOnInit() {}
dataProcess(data: STData[]): STData[] {
return data.map((i, index) => {
i.showSortFlag = false;

View File

@ -1,5 +1,4 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFSchema } from '@delon/form';
import { DynamicSettingModalComponent, SearchDrawerService } from '@shared';

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Router } from '@angular/router';
import { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { SearchDrawerService } from '@shared';

View File

@ -1,5 +1,4 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { STColumn, STComponent, STRequestOptions, STData, STChange } from '@delon/abc/st';
import { SFUISchema, SFSchema, SFComponent, SFDateWidgetSchema } from '@delon/form';
import { ShipperBaseService, DynamicSettingModalComponent, SearchDrawerService } from '@shared';

View File

@ -1,14 +1,7 @@
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { SFComponent, SFDateWidgetSchema, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { EAEnvironmentService, ShipperBaseService } from '@shared';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import format from 'date-fns/format';
import { Component, OnInit, ViewChild } from '@angular/core';
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { ShipperBaseService } from '@shared';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzUploadFile } from 'ng-zorro-antd/upload';
import { Observable, Observer, of } from 'rxjs';
import { apiConf } from '@conf/api.conf';
import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service';
import { NzModalRef } from 'ng-zorro-antd/modal';
@ -23,39 +16,33 @@ export class EditPartnerComponentsAddComponent implements OnInit {
sts: any;
rows: any;
schema: SFSchema = {};
detailData: any = {}
detailData: any = {};
ui: SFUISchema = {};
constructor(
public msgSrv: NzMessageService,
public http: _HttpClient,
private route: ActivatedRoute,
private router: Router,
public service: UsermanageService,
private envSrv: EAEnvironmentService,
private modal: NzModalRef,
public shipperservice: ShipperBaseService
) { }
) {}
ngOnInit(): void {
if(this.sts == '2') {
this.initDetailData()
if (this.sts == '2') {
this.initDetailData();
}
this.initSF();
}
initDetailData() {
const params = {
id: this.i.id
}
};
this.service.request(this.service.$api_partnerChannelUpdateDetaiList, params).subscribe(res => {
if(res) {
this.detailData = res
if (res) {
this.detailData = res;
} else {
this.service.msgSrv.error(res.msg)
this.service.msgSrv.error(res.msg);
}
})
});
}
initSF() {
this.schema = {
@ -98,7 +85,7 @@ export class EditPartnerComponentsAddComponent implements OnInit {
settStartTime: {
title: '结算起算日期',
type: 'string',
format: 'date',
format: 'date'
},
remark: {
type: 'string',
@ -107,30 +94,30 @@ export class EditPartnerComponentsAddComponent implements OnInit {
widget: 'textarea',
placeholder: '请不要超过50个字',
maxLength: 50,
autosize: { minRows: 2, maxRows: 6 },
},
autosize: { minRows: 2, maxRows: 6 }
}
},
effectiveNode: {
type: 'string',
title: '生效节点',
ui: {
widget: 'radio',
showRequired: true,
showRequired: true
} as SFRadioWidgetSchema,
enum: [
{ label: '修改成功后立即生效', value: 1 },
{ label: 'CRM流程审核后生效', value: 2 },
{ label: 'CRM流程审核通过后生效', value: 3 }
],
},
]
}
},
required: ['channelId', 'remark', 'effectiveNode'],
required: ['channelId', 'remark', 'effectiveNode']
};
this.ui = {
'*': {
spanLabelFixed: 180,
grid: { span: 18 },
width: 600,
width: 600
}
};
}
@ -138,27 +125,27 @@ export class EditPartnerComponentsAddComponent implements OnInit {
return {};
}
close(): void {
this.modal.close(true)
this.modal.close(true);
}
save() {
console.log(this?.rows);
let enterId : any;
if(this.sts == '1') {
enterId = this.rows
let enterId: any;
if (this.sts == '1') {
enterId = this.rows;
} else {
enterId = [this.i.id]
enterId = [this.i.id];
}
const params = {
...this.sf?.value,
enterpriceIds: enterId,
settStartTime: this.sf?.value?.settStartTime + ' 00:00:00'
}
};
this.service.request(this.service.$api_batchUpdateEnterpricePartner, params).subscribe(res => {
if(res) {
if (res) {
this.service.msgSrv.success('修改成功');
this.modal.destroy(true)
this.modal.destroy(true);
}
})
});
}
}

View File

@ -1,14 +1,7 @@
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { EAEnvironmentService, ShipperBaseService } from '@shared';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import format from 'date-fns/format';
import { Component, OnInit, ViewChild } from '@angular/core';
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
import { ShipperBaseService } from '@shared';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzUploadFile } from 'ng-zorro-antd/upload';
import { Observable, Observer, of } from 'rxjs';
import { apiConf } from '@conf/api.conf';
import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service';
import { NzModalRef } from 'ng-zorro-antd/modal';
@ -24,39 +17,33 @@ export class EditSaleComponentsAddComponent implements OnInit {
sts: any;
rows: any;
schema: SFSchema = {};
detailData: any = {}
detailData: any = {};
ui: SFUISchema = {};
constructor(
public msgSrv: NzMessageService,
public http: _HttpClient,
private route: ActivatedRoute,
private router: Router,
public service: UsermanageService,
private envSrv: EAEnvironmentService,
private modal: NzModalRef,
public shipperservice: ShipperBaseService
) { }
) {}
ngOnInit(): void {
if(this.sts == '2') {
this.initDetailData()
}
if (this.sts == '2') {
this.initDetailData();
}
this.initSF();
}
initDetailData() {
const params = {
id: this.i.id
}
};
this.service.request(this.service.$api_partnerChannelUpdateDetaiList, params).subscribe(res => {
if(res) {
this.detailData = res
if (res) {
this.detailData = res;
} else {
this.service.msgSrv.error(res.msg)
this.service.msgSrv.error(res.msg);
}
})
});
}
initSF() {
this.schema = {
@ -81,30 +68,30 @@ export class EditSaleComponentsAddComponent implements OnInit {
widget: 'textarea',
placeholder: '请不要超过50个字',
maxLength: 50,
autosize: { minRows: 2, maxRows: 6 },
},
autosize: { minRows: 2, maxRows: 6 }
}
},
effectiveNode: {
type: 'string',
title: '生效节点',
ui: {
widget: 'radio',
showRequired: true,
showRequired: true
} as SFRadioWidgetSchema,
enum: [
{ label: '修改成功后立即生效', value: 1 },
{ label: 'CRM流程审核后生效', value: 2 },
{ label: 'CRM流程审核通过后生效', value: 3 }
],
},
]
}
},
required: ['channelId', 'remark', 'effectiveNode'],
required: ['channelId', 'remark', 'effectiveNode']
};
this.ui = {
'*': {
spanLabelFixed: 180,
grid: { span: 18 },
width: 600,
width: 600
}
};
}
@ -112,31 +99,30 @@ export class EditSaleComponentsAddComponent implements OnInit {
return {};
}
save() {
let enterId : any;
if(this.sts == '1') {
enterId = this.rows
let enterId: any;
if (this.sts == '1') {
enterId = this.rows;
} else {
enterId = [this.i.id]
enterId = [this.i.id];
}
this.service.nzModalService.create({
nzContent: '确定提交吗?',
nzOnOk: () => {
const params = {
...this.sf?.value,
enterpriceIds: enterId,
}
enterpriceIds: enterId
};
this.service.request(this.service.$api_batchUpdateEnterpriceChannel, params).subscribe(res => {
if(res) {
this.service.msgSrv.success('修改成功')
this.modal.destroy(true)
if (res) {
this.service.msgSrv.success('修改成功');
this.modal.destroy(true);
}
})
});
}
});
}
close(): void {
this.modal.close(true)
this.modal.close(true);
}
}

View File

@ -1,5 +1,5 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Router } from '@angular/router';
import { apiConf } from '@conf/api.conf';
import {
SFCascaderWidgetSchema,

View File

@ -1,8 +1,6 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { STColumn, STComponent } from '@delon/abc/st';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { STComponent } from '@delon/abc/st';
import { UsermanageService } from '../../../../services/usercenter.service';
import { SFComponent, SFSchema, SFDateWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form';
import { Observable, Observer } from 'rxjs';
@ -31,16 +29,11 @@ export class FreightComponentsListViewComponent implements OnInit {
FreightsData: any = {};
constructor(
private http: _HttpClient,
private modal: ModalHelper,
public service: UsermanageService,
private route: ActivatedRoute,
private modalHelper: ModalHelper,
private msgSrv: NzMessageService,
) {}
ngOnInit() {
console.log(this.route.snapshot);
this.initData();
this.initSF();
// this.launchSign();