fix bug
This commit is contained in:
@ -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 { Injectable, Injector } from '@angular/core';
|
||||||
import { BaseService } from '@shared';
|
import { BaseService } from '@shared';
|
||||||
|
|
||||||
@ -7,7 +17,7 @@ import { BaseService } from '@shared';
|
|||||||
export class RecordedService extends BaseService {
|
export class RecordedService extends BaseService {
|
||||||
|
|
||||||
$api_get_recorded_page = `/api/bpc/partnerInvoiceEntry/queryInvoiceEntrylist`; // 查询合伙人发票入账主表
|
$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_disagree_recorded = ``; // 拒绝审核
|
||||||
$api_agree_recorded = ``; // 同意审核
|
$api_agree_recorded = ``; // 同意审核
|
||||||
$api_audit_recored = `/api/bpc/partnerInvoiceEntry/oprationAudit`; // 审核单据
|
$api_audit_recored = `/api/bpc/partnerInvoiceEntry/oprationAudit`; // 审核单据
|
||||||
|
|||||||
@ -73,7 +73,7 @@ export class EditPartnerComponentsAddComponent implements OnInit {
|
|||||||
// { label: '销售渠道可见', value: 3 },
|
// { label: '销售渠道可见', value: 3 },
|
||||||
// ],
|
// ],
|
||||||
// },channelId
|
// },channelId
|
||||||
channelId: {
|
partnerId: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '合伙人修改为',
|
title: '合伙人修改为',
|
||||||
ui: {
|
ui: {
|
||||||
@ -83,7 +83,7 @@ export class EditPartnerComponentsAddComponent implements OnInit {
|
|||||||
visibleIf: {
|
visibleIf: {
|
||||||
_$expand: (value: boolean) => value
|
_$expand: (value: boolean) => value
|
||||||
},
|
},
|
||||||
asyncData: () => this.shipperservice.getNetworkenterpriceIds()
|
asyncData: () => this.shipperservice.getNetworkEnterpriseName()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// settStartTime: {
|
// settStartTime: {
|
||||||
@ -151,13 +151,13 @@ export class EditPartnerComponentsAddComponent implements OnInit {
|
|||||||
const params = {
|
const params = {
|
||||||
...this.sf.value,
|
...this.sf.value,
|
||||||
enterpriceIds: enterId,
|
enterpriceIds: enterId,
|
||||||
|
settStartTime: this.sf?.value?.settStartTime + ' 00:00:00'
|
||||||
}
|
}
|
||||||
|
|
||||||
this.service.request(this.service.$api_batchUpdateEnterpricePartner, params).subscribe(res => {
|
this.service.request(this.service.$api_batchUpdateEnterpricePartner, params).subscribe(res => {
|
||||||
if(res) {
|
if(res) {
|
||||||
this.service.msgSrv.success('修改成功')
|
this.service.msgSrv.success('修改成功');
|
||||||
} else {
|
this.modal.destroy(true)
|
||||||
this.service.msgSrv.error(res.msg)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
|
|||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||||
import { _HttpClient } from '@delon/theme';
|
import { _HttpClient } from '@delon/theme';
|
||||||
import { EAEnvironmentService } from '@shared';
|
import { EAEnvironmentService, ShipperBaseService } from '@shared';
|
||||||
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
|
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
|
||||||
import format from 'date-fns/format';
|
import format from 'date-fns/format';
|
||||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||||
@ -21,6 +21,8 @@ export class EditSaleComponentsAddComponent implements OnInit {
|
|||||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
record: any = {};
|
record: any = {};
|
||||||
i: any;
|
i: any;
|
||||||
|
sts: any;
|
||||||
|
rows: any;
|
||||||
schema: SFSchema = {};
|
schema: SFSchema = {};
|
||||||
detailData: any = {}
|
detailData: any = {}
|
||||||
ui: SFUISchema = {};
|
ui: SFUISchema = {};
|
||||||
@ -33,12 +35,15 @@ export class EditSaleComponentsAddComponent implements OnInit {
|
|||||||
public service: UsermanageService,
|
public service: UsermanageService,
|
||||||
private envSrv: EAEnvironmentService,
|
private envSrv: EAEnvironmentService,
|
||||||
private modal: NzModalRef,
|
private modal: NzModalRef,
|
||||||
|
public shipperservice: ShipperBaseService
|
||||||
|
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initDetailData()
|
if(this.sts == '2') {
|
||||||
|
this.initDetailData()
|
||||||
|
}
|
||||||
this.initSF();
|
this.initSF();
|
||||||
}
|
}
|
||||||
initDetailData() {
|
initDetailData() {
|
||||||
@ -60,14 +65,14 @@ export class EditSaleComponentsAddComponent implements OnInit {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
title: '渠道销售修改为',
|
title: '渠道销售修改为',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'radio',
|
widget: 'select',
|
||||||
showRequired: true,
|
placeholder: '请选择',
|
||||||
} as SFRadioWidgetSchema,
|
allowClear: true,
|
||||||
enum: [
|
visibleIf: {
|
||||||
{ label: '全部可见', value: 1 },
|
_$expand: (value: boolean) => value
|
||||||
{ label: '合伙人可见', value: 2 },
|
},
|
||||||
{ label: '销售渠道可见', value: 3 },
|
asyncData: () => this.shipperservice.getChanners()
|
||||||
],
|
}
|
||||||
},
|
},
|
||||||
remark: {
|
remark: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -88,7 +93,8 @@ export class EditSaleComponentsAddComponent implements OnInit {
|
|||||||
} as SFRadioWidgetSchema,
|
} as SFRadioWidgetSchema,
|
||||||
enum: [
|
enum: [
|
||||||
{ label: '修改成功后立即生效', value: 1 },
|
{ 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 {};
|
return {};
|
||||||
}
|
}
|
||||||
save() {
|
save() {
|
||||||
|
let enterId : any;
|
||||||
|
if(this.sts == '1') {
|
||||||
|
enterId = this.rows
|
||||||
|
} else {
|
||||||
|
enterId = [this.i.id]
|
||||||
|
}
|
||||||
this.service.nzModalService.create({
|
this.service.nzModalService.create({
|
||||||
nzTitle: '确定提交吗?',
|
nzContent: '确定提交吗?',
|
||||||
nzClosable: false,
|
|
||||||
nzOnOk: () => {
|
nzOnOk: () => {
|
||||||
const params = {
|
const params = {
|
||||||
...this.sf.value
|
...this.sf.value,
|
||||||
|
enterpriceIds: enterId,
|
||||||
|
|
||||||
}
|
}
|
||||||
this.service.request(this.service.$api_batchUpdateEnterpriceChannel, params).subscribe(res => {
|
this.service.request(this.service.$api_batchUpdateEnterpriceChannel, params).subscribe(res => {
|
||||||
if(res) {
|
if(res) {
|
||||||
this.service.msgSrv.success('修改成功')
|
this.service.msgSrv.success('修改成功')
|
||||||
} else {
|
this.modal.destroy(true)
|
||||||
this.service.msgSrv.error(res.msg)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -141,8 +141,6 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
this.selectedRows.forEach(item => {
|
this.selectedRows.forEach(item => {
|
||||||
params.push(item.id);
|
params.push(item.id);
|
||||||
});
|
});
|
||||||
console.log(params);
|
|
||||||
|
|
||||||
const modalRef = this.modal.create({
|
const modalRef = this.modal.create({
|
||||||
nzTitle: '修改合伙人',
|
nzTitle: '修改合伙人',
|
||||||
nzContent: EditPartnerComponentsAddComponent,
|
nzContent: EditPartnerComponentsAddComponent,
|
||||||
@ -161,12 +159,26 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
editSale(record?: any) {
|
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({
|
const modalRef = this.modal.create({
|
||||||
nzTitle: '修改渠道销售',
|
nzTitle: '修改渠道销售',
|
||||||
nzContent: EditSaleComponentsAddComponent,
|
nzContent: EditSaleComponentsAddComponent,
|
||||||
nzWidth: 800,
|
nzWidth: 800,
|
||||||
nzComponentParams: {
|
nzComponentParams: {
|
||||||
i: record
|
i: record,
|
||||||
|
sts: status,
|
||||||
|
rows: params
|
||||||
},
|
},
|
||||||
nzFooter: null
|
nzFooter: null
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-11-29 15:22:34
|
* @Date: 2021-11-29 15:22:34
|
||||||
* @LastEditTime : 2022-04-24 16:49:05
|
* @LastEditTime : 2022-04-25 13:39:46
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @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
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\services\\usercenter.service.ts
|
||||||
|
|||||||
@ -29,6 +29,8 @@ export class ShipperBaseService extends BaseService {
|
|||||||
|
|
||||||
// 合伙人下拉列表
|
// 合伙人下拉列表
|
||||||
public $api_partner_lists = '/api/mdc/partner/list';
|
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';
|
public $api_get_project_list = '/api/mdc/cuc/enterpriseProject/getProjectList';
|
||||||
constructor(public injector: Injector) {
|
constructor(public injector: Injector) {
|
||||||
@ -160,7 +162,7 @@ export class ShipperBaseService extends BaseService {
|
|||||||
}
|
}
|
||||||
const list = res.map((item: any) => {
|
const list = res.map((item: any) => {
|
||||||
return {
|
return {
|
||||||
label: item.keyword,
|
label: item.contactName + '/' + item.contactMobile,
|
||||||
value: item.id
|
value: item.id
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -173,18 +175,18 @@ export class ShipperBaseService extends BaseService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取网络货运人
|
* 获取渠道销售管理集合
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getNetworkenterpriceIds(params = {}, containerAll = false) {
|
getChanners(params = {}, containerAll = false) {
|
||||||
return this.request(this.$api_partner_lists, params).pipe(
|
return this.request(this.$api_listChannelSalesManagement, params).pipe(
|
||||||
map((res: any) => {
|
map((res: any) => {
|
||||||
if (!res) {
|
if (!res) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const list = res.map((item: any) => {
|
const list = res.map((item: any) => {
|
||||||
return {
|
return {
|
||||||
label: item.contactName + '/' + item.contactMobile,
|
label: item.name + '/' + item.telephone,
|
||||||
value: item.id
|
value: item.id
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user