edit
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { processSingleSort, ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { RebateManagementService } from '../../services/rebate-management.service';
|
||||
|
||||
@Component({
|
||||
@ -27,10 +25,7 @@ export class ParterRebateManageMentParticularsComponent implements OnInit {
|
||||
resourceStatus: any;
|
||||
data = this.service.$api_get_searchPageList;
|
||||
constructor(
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute,
|
||||
public service: RebateManagementService,
|
||||
private modalService: NzModalService,
|
||||
public shipperservice: ShipperBaseService
|
||||
) {}
|
||||
/**
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
import { ModalHelper } from '@delon/theme';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { processSingleSort, ShipperBaseService } from '@shared';
|
||||
@ -25,8 +23,6 @@ export class ParterRebateManageMentRecordComponent implements OnInit {
|
||||
_$expand = false;
|
||||
data = [{ name1: 1111 }];
|
||||
constructor(
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute,
|
||||
public service: RebateManagementService,
|
||||
private modal: NzModalService,
|
||||
public shipperservice: ShipperBaseService,
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import { ModalHelper } from '@delon/theme';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { processSingleSort, ShipperBaseService } from '@shared';
|
||||
import { Router } from '@angular/router';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { RebateManagementService } from '../../services/rebate-management.service';
|
||||
import { ParterRebateManageMenRecordDetailComponent } from '../../model/record-detail/record-detail.component';
|
||||
import { ParterRebateManageMenAbnormalFeedbackComponent } from '../../model/abnormal-feedback/abnormal-feedback.component';
|
||||
|
||||
@Component({
|
||||
@ -25,19 +23,18 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
|
||||
_$expand = false;
|
||||
constructor(
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute,
|
||||
public service: RebateManagementService,
|
||||
private modal: NzModalService,
|
||||
public shipperservice: ShipperBaseService,
|
||||
public shipperservice: ShipperBaseService
|
||||
) {}
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
const params: any = Object.assign({}, this.sf?.value || {});
|
||||
return {
|
||||
...params,
|
||||
};
|
||||
return {
|
||||
...params
|
||||
};
|
||||
}
|
||||
ngOnInit() {
|
||||
this.initSF();
|
||||
@ -49,21 +46,20 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
|
||||
properties: {
|
||||
configName: {
|
||||
type: 'string',
|
||||
title: '模板名称',
|
||||
title: '模板名称'
|
||||
},
|
||||
stateLocked: {
|
||||
type: 'string',
|
||||
title: '状态',
|
||||
enum: [
|
||||
{label: '全部', value: ''},
|
||||
{label: '生效中', value: 1},
|
||||
{label: '失效', value: 0},
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '生效中', value: 1 },
|
||||
{ label: '失效', value: 0 }
|
||||
],
|
||||
ui: {
|
||||
widget: 'select',
|
||||
},
|
||||
|
||||
},
|
||||
widget: 'select'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
this.ui = {
|
||||
@ -79,43 +75,42 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
|
||||
{
|
||||
title: '模板名称',
|
||||
index: 'configName',
|
||||
width: '200px',
|
||||
width: '200px'
|
||||
},
|
||||
{
|
||||
title: '等级类型',
|
||||
render: 'configType',
|
||||
width: '200px',
|
||||
|
||||
width: '200px'
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
index: 'remark',
|
||||
width: '250px',
|
||||
width: '250px'
|
||||
},
|
||||
{
|
||||
title: '合伙人范围',
|
||||
render: 'partnerType',
|
||||
width: '200px',
|
||||
width: '200px'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
index: 'enableTime',
|
||||
width: '200px',
|
||||
width: '200px'
|
||||
},
|
||||
{
|
||||
title: '生效时间',
|
||||
index: 'enableTime',
|
||||
width: '200px',
|
||||
width: '200px'
|
||||
},
|
||||
{
|
||||
title: '优先级',
|
||||
index: 'priority',
|
||||
width: '100px',
|
||||
width: '100px'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
render: 'stateLocked',
|
||||
width: '100px',
|
||||
width: '100px'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@ -126,20 +121,24 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
|
||||
{
|
||||
text: '查看',
|
||||
acl: { ability: ['REBATE-SETTING-detail'] },
|
||||
click: _record => this.configAction(_record),
|
||||
click: _record => this.configAction(_record)
|
||||
},
|
||||
{
|
||||
text: '禁用',
|
||||
acl: { ability: ['REBATE-SETTING-forbidden'] },
|
||||
iif: (_record) =>{ return _record.stateLocked == true && (_record.partnerType == 3 || _record.partnerType == 2)},
|
||||
click: _record => this.viewEvaluate(_record),
|
||||
iif: _record => {
|
||||
return _record.stateLocked == true && (_record.partnerType == 3 || _record.partnerType == 2);
|
||||
},
|
||||
click: _record => this.viewEvaluate(_record)
|
||||
},
|
||||
{
|
||||
text: '启用',
|
||||
acl: { ability: ['REBATE-SETTING-startUseing'] },
|
||||
iif: (_record) =>{ return _record.stateLocked == false},
|
||||
click: _record => this.viewEvaluate(_record),
|
||||
},
|
||||
iif: _record => {
|
||||
return _record.stateLocked == false;
|
||||
},
|
||||
click: _record => this.viewEvaluate(_record)
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
@ -147,52 +146,52 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
|
||||
/**
|
||||
*禁用
|
||||
*/
|
||||
viewEvaluate(item: any) {
|
||||
console.log(item.stateLocked);
|
||||
let title = ''
|
||||
let stateLocked: boolean;
|
||||
if(item.stateLocked) {
|
||||
title = '是否禁用该配置?'
|
||||
stateLocked = false
|
||||
} else {
|
||||
title = '是否启用该配置?'
|
||||
stateLocked = true
|
||||
}
|
||||
viewEvaluate(item: any) {
|
||||
console.log(item.stateLocked);
|
||||
let title = '';
|
||||
let stateLocked: boolean;
|
||||
if (item.stateLocked) {
|
||||
title = '是否禁用该配置?';
|
||||
stateLocked = false;
|
||||
} else {
|
||||
title = '是否启用该配置?';
|
||||
stateLocked = true;
|
||||
}
|
||||
this.modal.confirm({
|
||||
nzTitle: title,
|
||||
nzOnOk: () => {
|
||||
const params = {
|
||||
id: item?.id,
|
||||
stateLocked: stateLocked,
|
||||
}
|
||||
this.service.request(this.service.$api_set_updateRebateConfig,params).subscribe((res: any) => {
|
||||
if(res) {
|
||||
this.service.msgSrv.success('设置成功!')
|
||||
this.st.reload();
|
||||
}
|
||||
})
|
||||
stateLocked: stateLocked
|
||||
};
|
||||
this.service.request(this.service.$api_set_updateRebateConfig, params).subscribe((res: any) => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('设置成功!');
|
||||
this.st.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
*查看
|
||||
*/
|
||||
feedback(item?: any) {
|
||||
const modal = this.modal.create({
|
||||
nzTitle: '查看',
|
||||
nzWidth: 580,
|
||||
nzContent: ParterRebateManageMenAbnormalFeedbackComponent,
|
||||
nzComponentParams: { i: item },
|
||||
nzFooter: null
|
||||
});
|
||||
modal.afterClose.subscribe((res: any) => {
|
||||
if (res) {
|
||||
}
|
||||
});
|
||||
feedback(item?: any) {
|
||||
const modal = this.modal.create({
|
||||
nzTitle: '查看',
|
||||
nzWidth: 580,
|
||||
nzContent: ParterRebateManageMenAbnormalFeedbackComponent,
|
||||
nzComponentParams: { i: item },
|
||||
nzFooter: null
|
||||
});
|
||||
modal.afterClose.subscribe((res: any) => {
|
||||
if (res) {
|
||||
}
|
||||
});
|
||||
}
|
||||
configAction(value?: any) {
|
||||
this.router.navigate(['/partner/rebate/setting/add/', '0'], {queryParams: value})
|
||||
}
|
||||
this.router.navigate(['/partner/rebate/setting/add/', '0'], { queryParams: value });
|
||||
}
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* @Description :
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-03-10 14:50:45
|
||||
@ -8,15 +8,11 @@
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\model\\abnormal-feedback\\abnormal-feedback.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
import { ModalHelper } from '@delon/theme';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { processSingleSort, ShipperBaseService } from '@shared';
|
||||
import { NzModalService, NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { SFComponent, SFSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { RebateManagementService } from '../../services/rebate-management.service';
|
||||
import { NzButtonSize } from 'ng-zorro-antd/button';
|
||||
|
||||
@Component({
|
||||
selector: 'app-parter-channel-rebate-management-abnormal-feedback',
|
||||
@ -29,15 +25,7 @@ export class ParterRebateManageMenAbnormalFeedbackComponent implements OnInit {
|
||||
sf!: SFComponent;
|
||||
i!: any;
|
||||
data = [{ name1: 1111 }];
|
||||
constructor(
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute,
|
||||
public service: RebateManagementService,
|
||||
private modalService: NzModalService,
|
||||
public shipperservice: ShipperBaseService,
|
||||
public modalRef: NzModalRef,
|
||||
) {}
|
||||
|
||||
constructor(public service: RebateManagementService, public shipperservice: ShipperBaseService, public modalRef: NzModalRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.initSF();
|
||||
@ -53,20 +41,19 @@ export class ParterRebateManageMenAbnormalFeedbackComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 },
|
||||
placeholder:'请不要超过50个字'
|
||||
} as SFTextareaWidgetSchema,
|
||||
},
|
||||
placeholder: '请不要超过50个字'
|
||||
} as SFTextareaWidgetSchema
|
||||
}
|
||||
}
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
spanLabelFixed: 60,
|
||||
grid: { span: 16 },
|
||||
grid: { span: 16 }
|
||||
}
|
||||
};
|
||||
}
|
||||
close() {
|
||||
this.modalRef.destroy()
|
||||
this.modalRef.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
import { ModalHelper } from '@delon/theme';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { processSingleSort, ShipperBaseService } from '@shared';
|
||||
import { NzModalService, NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ShipperBaseService } from '@shared';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { RebateManagementService } from '../../services/rebate-management.service';
|
||||
import { NzButtonSize } from 'ng-zorro-antd/button';
|
||||
|
||||
@ -24,36 +22,29 @@ export class ParterRebateManageMenRecordDetailComponent implements OnInit {
|
||||
size: NzButtonSize = 'large';
|
||||
_$expand = false;
|
||||
data = [{ name1: 1111 }];
|
||||
constructor(
|
||||
public router: Router,
|
||||
public ar: ActivatedRoute,
|
||||
public service: RebateManagementService,
|
||||
private modalService: NzModalService,
|
||||
public shipperservice: ShipperBaseService,
|
||||
public modalRef: NzModalRef,
|
||||
) {}
|
||||
constructor(public service: RebateManagementService, public shipperservice: ShipperBaseService, public modalRef: NzModalRef) {}
|
||||
/**
|
||||
* 查询字段个数
|
||||
*/
|
||||
get queryFieldCount(): number {
|
||||
return Object.keys(this.schema?.properties || {}).length;
|
||||
}
|
||||
/**
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle(): void {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
* 伸缩查询条件
|
||||
*/
|
||||
expandToggle(): void {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
const params: any = Object.assign({}, this.sf?.value || {});
|
||||
delete params._$expand;
|
||||
return {
|
||||
...params,
|
||||
};
|
||||
return {
|
||||
...params
|
||||
};
|
||||
}
|
||||
ngOnInit() {
|
||||
this.initSF();
|
||||
@ -72,8 +63,8 @@ export class ParterRebateManageMenRecordDetailComponent implements OnInit {
|
||||
allowClear: true,
|
||||
asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
|
||||
change: (value: any) => {
|
||||
console.log(value)
|
||||
this.st.reload()
|
||||
console.log(value);
|
||||
this.st.reload();
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -85,11 +76,11 @@ export class ParterRebateManageMenRecordDetailComponent implements OnInit {
|
||||
params: { dictKey: 'overall:payment:status' },
|
||||
containsAllLabel: true,
|
||||
change: (value: any) => {
|
||||
console.log(value)
|
||||
this.st.reload()
|
||||
console.log(value);
|
||||
this.st.reload();
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
this.ui = {
|
||||
@ -165,7 +156,6 @@ export class ParterRebateManageMenRecordDetailComponent implements OnInit {
|
||||
this.st.load(1);
|
||||
}
|
||||
close() {
|
||||
this.modalRef.destroy()
|
||||
this.modalRef.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user