Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
Taric Xin
2022-04-25 14:59:50 +08:00
13 changed files with 141 additions and 58 deletions

View File

@ -195,7 +195,7 @@ export class OrderManagementComplaintDetailComponent implements OnInit {
}
this.service.request(this.service.$api_get_dealWithComplaint, paramsa).subscribe((res: any) =>{
if(res) {
this.service.msgSrv.success('已拒绝')
this.service.msgSrv.success('已取消')
this.isVisibleRE = false
this.getDetail(this.id);
this.complaintStatus = true;
@ -214,9 +214,10 @@ export class OrderManagementComplaintDetailComponent implements OnInit {
return
}
const paramsa = {
...this.sfView.value,
id: this.channelId
}
this.service.request(this.service.$api_get_canelComplaint, paramsa).subscribe((res: any) =>{
this.service.request(this.service.$api_get_dealWithComplaint, paramsa).subscribe((res: any) =>{
if(res) {
this.service.msgSrv.success('已拒绝!')
this.isVisibleRE = false

View File

@ -48,7 +48,11 @@ export class OrderManagementComplaintComponent extends BasicTableComponent imple
{
name: '已撤销',
type: 3
}
},
{
name: '已取消',
type: 4
},
];
constructor(
public service: OrderManagementService,

View File

@ -21,13 +21,13 @@ export class ParterChannelSalesListComponent implements OnInit {
sf!: SFComponent;
spuStatus = '1';
data=[{name1:1111}]
data = [{ name1: 1111 }]
constructor(
public router: Router,
public ar: ActivatedRoute,
public service: ChannelSalesService,
private modalService: NzModalService
) {}
) { }
/**
* 查询参数
@ -90,6 +90,17 @@ export class ParterChannelSalesListComponent implements OnInit {
title: '邀请码',
index: 'inviteCode'
},
{
title: '状态',
className: 'text-center',
index: 'stateLocked',
type: 'badge',
badge: {
true: { text: '冻结', color: 'error' },
false: { text: '正常', color: 'success' }
},
width: 130
},
{
title: '操作',
className: 'text-center',
@ -100,7 +111,7 @@ export class ParterChannelSalesListComponent implements OnInit {
},
{
text: '冻结',
click: (_record, _modal, _instance) => this.stop(_record.id),
click: (_record, _modal, _instance) => this.stop(_record),
}
]
}
@ -109,10 +120,10 @@ export class ParterChannelSalesListComponent implements OnInit {
add() {
const modalRef = this.modalService.create({
nzWidth:600,
nzWidth: 600,
nzTitle: '新增',
nzContent: ParterChannelSalesEditComponent,
nzComponentParams: {sts: 'add'}
nzComponentParams: { sts: 'add' }
});
modalRef.afterClose.subscribe(res => {
if (res) {
@ -124,7 +135,7 @@ export class ParterChannelSalesListComponent implements OnInit {
// 编辑
edit(record: STData) {
const modalRef = this.modalService.create({
nzWidth:600,
nzWidth: 600,
nzTitle: '编辑',
nzContent: ParterChannelSalesEditComponent,
nzComponentParams: { i: record }
@ -135,21 +146,23 @@ export class ParterChannelSalesListComponent implements OnInit {
}
});
}
stop(id: any) {
this.modalService.confirm({
nzTitle: '<i>冻结确认</i>',
nzContent: `<b>确定冻结该账号吗?</br>`,
// nzOnOk: () =>
// this.service.request('', '').subscribe(res => {
// if (res) {
// this.service.msgSrv.success('冻结成功!');
// this.st.reload();
// }
// })
});
stop(record: STData) {
if (!record.stateLocked) {
const params = {
id: record.id
}
this.modalService.confirm({
nzTitle: '<i>冻结确认</i>',
nzContent: `<b>确定冻结该账号吗?</br>`,
nzOnOk: () =>
this.service.request(this.service.$api_frozenChannelSales, params).subscribe(res => {
if (res) {
this.service.msgSrv.success('冻结成功!');
this.st.reload();
}
})
});
}
}
/**

View File

@ -19,6 +19,8 @@ export class ChannelSalesService extends BaseService {
$api_listChannelSalesManagement = '/api/mdc/channelSalesManagement/list/listChannelSalesManagement';
// 根据渠道销售id获取渠道信息
$api_getChannelSalesInfo = '/api/mdc/channelSalesManagement/getChannelSalesInfo';
// 冻结渠道销售
$api_frozenChannelSales = '/api/mdc/channelSalesManagement/frozenChannelSales';
constructor(public injector: Injector) {

View File

@ -1,3 +1,13 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-04-21 13:49:22
* @LastEditors : Shiming
* @LastEditTime : 2022-04-25 11:11:58
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\recorded\\services\\recorded.service.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Injectable, Injector } from '@angular/core';
import { BaseService } from '@shared';
@ -7,7 +17,7 @@ import { BaseService } from '@shared';
export class RecordedService extends BaseService {
$api_get_recorded_page = `/api/bpc/partnerInvoiceEntry/queryInvoiceEntrylist`; // 查询合伙人发票入账主表
$api_get_recorded_record_detail = `/api/bpc/partnerInvoice/getDetailByOpration`; // 入账记录详情
$api_get_recorded_record_detail = `/api/bpc/partnerInvoice/getDetailById`; // 入账记录详情
$api_disagree_recorded = ``; // 拒绝审核
$api_agree_recorded = ``; // 同意审核
$api_audit_recored = `/api/bpc/partnerInvoiceEntry/oprationAudit`; // 审核单据

View File

@ -1,3 +1,13 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-04-21 13:49:22
* @LastEditors : Shiming
* @LastEditTime : 2022-04-25 14:32:43
* @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\components\\role-management\\edit\\edit.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<div class="modal-header">
<div class="modal-title">{{ params.id === 0 ? '新增角色' : '编辑角色' }}</div>
</div>
@ -11,7 +21,7 @@
<se label="角色权限" required [labelWidth]="120">
<app-cuc-menu #menu (changeData)="getData($event)" [type]="params.id === 0 ? 'add' : 'edit'" [roleId]="params.id" [appId]="params.appId"
[isAuthorityIdDTOList]="roleInfoData.authority || []"
[authorityAssistId]="roleInfoData.authorityAssistId || []">
[authorityAssistId]="roleInfoData.authorityAssistId || []" (changeIF)="changeIF($event)">
</app-cuc-menu>
</se>
</se-container>

View File

@ -21,6 +21,7 @@ export class SettingRoleEditComponent implements OnInit {
roleInfoData: any = {};
authorityAssistId: any[] = [];
params: any;
changeValue: boolean = false
schema!: SFSchema;
authority: any[] = [];
constructor(private modal: NzModalRef, public service: SystemService) {}
@ -73,17 +74,26 @@ console.log(this.params.infoUrl)
});
}
getData(res: { authority: any[]; authorityAssistId: any[] }) {
console.log('修改了');
this.authority = res.authority;
this.authorityAssistId = res.authorityAssistId;
}
close() {
this.modal.destroy();
}
changeIF(value: boolean) {
console.log(value);
console.log('54545');
this.changeValue = true
}
sure() {
if (!this.sf?.valid) {
this.service.msgSrv.warning('角色名称不能为空');
return;
}
console.log(this.changeValue);
const auths = this.menu?.washTree();
if (auths.authorityAssistId.length === 0) {
this.service.msgSrv.warning('请选择权限!');
@ -95,6 +105,10 @@ console.log(this.params.infoUrl)
authority: auths.authority,
authorityAssistId: auths.authorityAssistId
};
if(this.changeValue) {
params.isUpdateAuthority = 1
}
if (this.params.id === 0) {
delete params.id;
}

View File

@ -26,6 +26,7 @@ export class SettingMenuComponent implements OnInit, OnChanges {
@Input() isAuthorityIdDTOList: any[] = [];
@Input() authorityAssistId: any[] = [];
@Input() roleId: any;
@Output() changeIF= new EventEmitter();
@Output() changeData = new EventEmitter();
constructor(public service: SystemService, private cdr: ChangeDetectorRef, private envSrv: EAEnvironmentService) {}
ngOnChanges(changes: SimpleChanges): void {
@ -63,19 +64,21 @@ export class SettingMenuComponent implements OnInit, OnChanges {
// 判断此菜单权限是否已经存在权限列表中
// 当前操作菜单id存在权限列表里
this.authority.forEach(menuItem => {
console.log(menuItem);
console.log(item);
if (menuItem.authorityId === origin.id) {
menuItem.buttonAuthorityIds = menuItem.buttonAuthorityIds || []; // 防止属性不存在,给属性指定数据类型
if (item) {
this.changeIF.emit(true);
// 单选
if (item.checked) {
if (menuItem.buttonAuthorityIds.indexOf(item.functionButtonId) === -1) {
// 如果该按钮在数据权限数组中不存在
console.log('不存在');
menuItem.buttonAuthorityIds.push(item.functionButtonId);
}
} else {
console.log('存在');
if (menuItem.buttonAuthorityIds && menuItem.buttonAuthorityIds.length) {
menuItem.buttonAuthorityIds.forEach((btnItem: any, index: any) => {
if (btnItem === item.functionButtonId) {

View File

@ -73,7 +73,7 @@ export class EditPartnerComponentsAddComponent implements OnInit {
// { label: '销售渠道可见', value: 3 },
// ],
// },channelId
channelId: {
partnerId: {
type: 'string',
title: '合伙人修改为',
ui: {
@ -83,7 +83,7 @@ export class EditPartnerComponentsAddComponent implements OnInit {
visibleIf: {
_$expand: (value: boolean) => value
},
asyncData: () => this.shipperservice.getNetworkenterpriceIds()
asyncData: () => this.shipperservice.getNetworkEnterpriseName()
}
},
// settStartTime: {
@ -151,13 +151,13 @@ export class EditPartnerComponentsAddComponent implements OnInit {
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) {
this.service.msgSrv.success('修改成功')
} else {
this.service.msgSrv.error(res.msg)
this.service.msgSrv.success('修改成功');
this.modal.destroy(true)
}
})
}

View File

@ -2,7 +2,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 } from '@shared';
import { EAEnvironmentService, ShipperBaseService } from '@shared';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import format from 'date-fns/format';
import { NzMessageService } from 'ng-zorro-antd/message';
@ -21,6 +21,8 @@ export class EditSaleComponentsAddComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
record: any = {};
i: any;
sts: any;
rows: any;
schema: SFSchema = {};
detailData: any = {}
ui: SFUISchema = {};
@ -33,12 +35,15 @@ export class EditSaleComponentsAddComponent implements OnInit {
public service: UsermanageService,
private envSrv: EAEnvironmentService,
private modal: NzModalRef,
public shipperservice: ShipperBaseService
) { }
ngOnInit(): void {
this.initDetailData()
if(this.sts == '2') {
this.initDetailData()
}
this.initSF();
}
initDetailData() {
@ -60,14 +65,14 @@ export class EditSaleComponentsAddComponent implements OnInit {
type: 'string',
title: '渠道销售修改为',
ui: {
widget: 'radio',
showRequired: true,
} as SFRadioWidgetSchema,
enum: [
{ label: '全部可见', value: 1 },
{ label: '合伙人可见', value: 2 },
{ label: '销售渠道可见', value: 3 },
],
widget: 'select',
placeholder: '请选择',
allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
asyncData: () => this.shipperservice.getChanners()
}
},
remark: {
type: 'string',
@ -88,7 +93,8 @@ export class EditSaleComponentsAddComponent implements OnInit {
} as SFRadioWidgetSchema,
enum: [
{ label: '修改成功后立即生效', value: 1 },
{ label: 'CRM流程审核通过后生效', value: 2 }
{ label: 'CRM流程审核后生效', value: 2 },
{ label: 'CRM流程审核通过后生效', value: 3 }
],
},
},
@ -106,18 +112,24 @@ export class EditSaleComponentsAddComponent implements OnInit {
return {};
}
save() {
let enterId : any;
if(this.sts == '1') {
enterId = this.rows
} else {
enterId = [this.i.id]
}
this.service.nzModalService.create({
nzTitle: '确定提交吗?',
nzClosable: false,
nzContent: '确定提交吗?',
nzOnOk: () => {
const params = {
...this.sf.value
...this.sf.value,
enterpriceIds: enterId,
}
this.service.request(this.service.$api_batchUpdateEnterpriceChannel, params).subscribe(res => {
if(res) {
this.service.msgSrv.success('修改成功')
} else {
this.service.msgSrv.error(res.msg)
this.modal.destroy(true)
}
})
}

View File

@ -141,8 +141,6 @@ export class FreightComponentsListComponent implements OnInit {
this.selectedRows.forEach(item => {
params.push(item.id);
});
console.log(params);
const modalRef = this.modal.create({
nzTitle: '修改合伙人',
nzContent: EditPartnerComponentsAddComponent,
@ -161,12 +159,26 @@ export class FreightComponentsListComponent implements OnInit {
});
}
editSale(record?: any) {
let status = 1
if(record) {
status = 2
}
if (this.selectedRows.length <= 0 && !record) {
this.service.msgSrv.error('请选择订单!');
return;
}
let params: any[] = [];
this.selectedRows.forEach(item => {
params.push(item.id);
});
const modalRef = this.modal.create({
nzTitle: '修改渠道销售',
nzContent: EditSaleComponentsAddComponent,
nzWidth: 800,
nzComponentParams: {
i: record
i: record,
sts: status,
rows: params
},
nzFooter: null
});

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-11-29 15:22:34
* @LastEditTime : 2022-04-24 16:49:05
* @LastEditTime : 2022-04-25 13:39:46
* @LastEditors : Shiming
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\services\\usercenter.service.ts

View File

@ -29,6 +29,8 @@ export class ShipperBaseService extends BaseService {
// 合伙人下拉列表
public $api_partner_lists = '/api/mdc/partner/list';
// 获取渠道销售管理集合
public $api_listChannelSalesManagement = '/api/mdc/channelSalesManagement/list/listChannelSalesManagement';
// 批量获取项目信息
public $api_get_project_list = '/api/mdc/cuc/enterpriseProject/getProjectList';
constructor(public injector: Injector) {
@ -160,7 +162,7 @@ export class ShipperBaseService extends BaseService {
}
const list = res.map((item: any) => {
return {
label: item.keyword,
label: item.contactName + '/' + item.contactMobile,
value: item.id
};
});
@ -173,18 +175,18 @@ export class ShipperBaseService extends BaseService {
);
}
/**
* 获取网络货运人
* 获取渠道销售管理集合
* @returns
*/
getNetworkenterpriceIds(params = {}, containerAll = false) {
return this.request(this.$api_partner_lists, params).pipe(
getChanners(params = {}, containerAll = false) {
return this.request(this.$api_listChannelSalesManagement, params).pipe(
map((res: any) => {
if (!res) {
return [];
}
const list = res.map((item: any) => {
return {
label: item.contactName + '/' + item.contactMobile,
label: item.name + '/' + item.telephone,
value: item.id
};
});