Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -179,28 +179,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<nz-card nzTitle="基本信息" id="distannce2">
|
<nz-card nzTitle="基本信息" id="distannce2">
|
||||||
<!-- <sv-container col="1">
|
|
||||||
<sv label="网络货运人">
|
|
||||||
{{i?.goodsResource?.[0]?.enterpriseInfoName}}
|
|
||||||
</sv>
|
|
||||||
<sv label="货物名称">
|
|
||||||
{{i?.goodsInfoList?.[0]?.goodsName}}
|
|
||||||
</sv>
|
|
||||||
</sv-container>
|
|
||||||
<sv-container col="2">
|
|
||||||
<sv label="货物数量">
|
|
||||||
{{i?.goodsInfoList?.[0]?.weight}}顿,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件
|
|
||||||
</sv>
|
|
||||||
<sv label="用车需求">
|
|
||||||
{{i?.goodsInfoList?.[0]?.maxWeightLabel}}/{{i?.goodsInfoList?.[0]?.maxCube}}
|
|
||||||
</sv>
|
|
||||||
<sv label="承运司机">
|
|
||||||
{{i?.driverId}}
|
|
||||||
</sv>
|
|
||||||
<sv label="车型车长载重">
|
|
||||||
{{i?.goodsInfoList?.[0]?.weight}}顿,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件
|
|
||||||
</sv>
|
|
||||||
</sv-container> -->
|
|
||||||
<div nz-row>
|
<div nz-row>
|
||||||
<div nz-col nzSpan="12">
|
<div nz-col nzSpan="12">
|
||||||
<sf #sf3 [schema]="schema3" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf>
|
<sf #sf3 [schema]="schema3" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf>
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { ViewChild } from '@angular/core';
|
|||||||
/*
|
/*
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-12-03 15:31:52
|
* @Date: 2021-12-03 15:31:52
|
||||||
* @LastEditTime: 2021-12-24 17:49:31
|
* @LastEditTime: 2021-12-24 17:55:35
|
||||||
* @LastEditors: Please set LastEditors
|
* @LastEditors: Please set LastEditors
|
||||||
* @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\order-management\components\vehicle-detail\vehicle-detail.component.ts
|
* @FilePath: \tms-obc-web\src\app\routes\order-management\components\vehicle-detail\vehicle-detail.component.ts
|
||||||
@ -11,7 +11,7 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { STColumn, STComponent } from '@delon/abc/st';
|
import { STColumn, STComponent } from '@delon/abc/st';
|
||||||
import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form';
|
import { SFComponent, SFNumberWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form';
|
||||||
import { _HttpClient } from '@delon/theme';
|
import { _HttpClient } from '@delon/theme';
|
||||||
import { AmapPoiPickerComponent, AmapService, EAEnvironmentService, ShipperBaseService } from '@shared';
|
import { AmapPoiPickerComponent, AmapService, EAEnvironmentService, ShipperBaseService } from '@shared';
|
||||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||||
@ -652,7 +652,54 @@ initSF4() {
|
|||||||
placeholder: '请输入'
|
placeholder: '请输入'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
acceptWeight: {
|
||||||
|
type: 'number',
|
||||||
|
title: '装货重量',
|
||||||
|
ui: {
|
||||||
|
unit: '吨',
|
||||||
|
placeholder: '请输入',
|
||||||
|
grid: {
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
hideStep: true,
|
||||||
|
} as SFNumberWidgetSchema
|
||||||
|
},
|
||||||
|
acceptVolume: {
|
||||||
|
type: 'number',
|
||||||
|
title: '装货体积',
|
||||||
|
ui: {
|
||||||
|
unit: '吨',
|
||||||
|
placeholder: '请输入',
|
||||||
|
grid: {
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
hideStep: true,
|
||||||
|
} as SFNumberWidgetSchema
|
||||||
|
},
|
||||||
|
settlementWeight: {
|
||||||
|
type: 'number',
|
||||||
|
title: '卸货重量',
|
||||||
|
ui: {
|
||||||
|
unit: '吨',
|
||||||
|
placeholder: '请输入',
|
||||||
|
grid: {
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
hideStep: true,
|
||||||
|
} as SFNumberWidgetSchema
|
||||||
|
},
|
||||||
|
settlementVolume: {
|
||||||
|
type: 'number',
|
||||||
|
title: '卸货体积',
|
||||||
|
ui: {
|
||||||
|
unit: '吨',
|
||||||
|
placeholder: '请输入',
|
||||||
|
grid: {
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
hideStep: true,
|
||||||
|
} as SFNumberWidgetSchema
|
||||||
|
}
|
||||||
},
|
},
|
||||||
required: ['weight','loadTime','unloadTime']
|
required: ['weight','loadTime','unloadTime']
|
||||||
};
|
};
|
||||||
|
|||||||
@ -158,6 +158,7 @@
|
|||||||
[res]="{ reName: { list: 'data.list', total: 'data.total' } }"
|
[res]="{ reName: { list: 'data.list', total: 'data.total' } }"
|
||||||
[loadingDelay]="500"
|
[loadingDelay]="500"
|
||||||
>
|
>
|
||||||
|
|
||||||
</st>
|
</st>
|
||||||
<div><span>变更原因:{{ViewCause?.changeCause}}</span></div>
|
<div><span>变更原因:{{ViewCause?.changeCause}}</span></div>
|
||||||
<div><span>拒绝原因:{{ViewCause?.refuseCause}}</span></div>
|
<div><span>拒绝原因:{{ViewCause?.refuseCause}}</span></div>
|
||||||
|
|||||||
@ -22,7 +22,6 @@ import { OrderManagementService } from '../../services/order-management.service'
|
|||||||
styleUrls: ['./vehicle.component.less']
|
styleUrls: ['./vehicle.component.less']
|
||||||
})
|
})
|
||||||
export class OrderManagementVehicleComponent implements OnInit {
|
export class OrderManagementVehicleComponent implements OnInit {
|
||||||
url = `/user?_allow_anonymous=true`;
|
|
||||||
ui: SFUISchema = {};
|
ui: SFUISchema = {};
|
||||||
schema: SFSchema = {};
|
schema: SFSchema = {};
|
||||||
auditMany = false;
|
auditMany = false;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-12-14 14:03:07
|
* @Date: 2021-12-14 14:03:07
|
||||||
* @LastEditTime: 2021-12-22 20:08:13
|
* @LastEditTime: 2021-12-24 17:58:45
|
||||||
* @LastEditors: Please set LastEditors
|
* @LastEditors: Please set LastEditors
|
||||||
* @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\order-management\modal\bulk\update-freight\update-freight.component.ts
|
* @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.ts
|
||||||
@ -119,7 +119,7 @@ export class UpdateFreightComponent implements OnInit {
|
|||||||
title: '装货体积',
|
title: '装货体积',
|
||||||
default: data.acceptVolume,
|
default: data.acceptVolume,
|
||||||
ui: {
|
ui: {
|
||||||
unit: '吨',
|
unit: '方',
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
grid: {
|
grid: {
|
||||||
span: 12
|
span: 12
|
||||||
@ -147,7 +147,7 @@ export class UpdateFreightComponent implements OnInit {
|
|||||||
title: '卸货体积',
|
title: '卸货体积',
|
||||||
default: data.settlementVolume,
|
default: data.settlementVolume,
|
||||||
ui: {
|
ui: {
|
||||||
unit: '吨',
|
unit: '方',
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
grid: {
|
grid: {
|
||||||
span: 12
|
span: 12
|
||||||
|
|||||||
@ -1,37 +1,70 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-12-24 15:38:08
|
* @Date: 2021-12-24 15:38:08
|
||||||
* @LastEditTime: 2021-12-24 15:53:02
|
* @LastEditTime: 2021-12-27 10:30:01
|
||||||
* @LastEditors: your name
|
* @LastEditors: Please set LastEditors
|
||||||
* @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\sys-setting\components\crm-management\crm-management.component.html
|
* @FilePath: \tms-obc-web\src\app\routes\sys-setting\components\crm-management\crm-management.component.html
|
||||||
-->
|
-->
|
||||||
<page-header-wrapper title="CRM客户管理">
|
<page-header-wrapper title="CRM客户管理">
|
||||||
</page-header-wrapper>
|
</page-header-wrapper>
|
||||||
|
|
||||||
<nz-card class="search-box">
|
<nz-card >
|
||||||
<div nz-row nzGutter="8">
|
<div nz-row nzGutter="8">
|
||||||
<div nz-col [nzSpan]="6">
|
<!-- 查询字段小于或等于3个时,不显示伸缩按钮 -->
|
||||||
<sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 24 } }}" [compact]="true"
|
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
|
||||||
[button]="'none'"></sf>
|
<sf #sf [schema]="schema" [ui]="ui" [mode]="'search'" [disabled]="!sf?.valid" [loading]="service.http.loading"
|
||||||
|
(formSubmit)="st?.load(1)" (formReset)="resetSF()"></sf>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="8" nzOffset="1">
|
|
||||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
|
<!-- 查询字段大于3个时,根据展开状态调整布局 -->
|
||||||
|
<ng-container *ngIf="queryFieldCount > 4">
|
||||||
|
<div nz-col [nzSpan]="_$expand ? 24 : 18">
|
||||||
|
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||||
|
</div>
|
||||||
|
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
|
||||||
|
<button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
|
||||||
|
(click)="st?.load(1)">查询</button>
|
||||||
|
<button nz-button nzType="primary"
|
||||||
|
>导出</button>
|
||||||
<button nz-button (click)="resetSF()">重置</button>
|
<button nz-button (click)="resetSF()">重置</button>
|
||||||
</div>
|
<button nz-button nzType="link" (click)="expandToggle()">
|
||||||
</div>
|
{{ !_$expand ? '展开' : '收起' }}
|
||||||
|
<i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-card class="content-box">
|
<nz-card class="content-box">
|
||||||
|
|
||||||
<div class="d-flex justify-content-end mb-sm">
|
<div class="d-flex justify-content-end mb-sm">
|
||||||
<div>
|
<div>
|
||||||
<button nz-button nzType="primary" (click)="roleAction()" >新建角色</button>
|
<button nz-button nzType="primary" (click)="roleAction('',1)" >新增CRM客户</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<st #st [data]="url" [columns]="columns"
|
<st #st [data]="service.$api_get_crmCustomer_page" [columns]="columns"
|
||||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||||
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
|
||||||
[loading]="service.http.loading" [scroll]="{ y: '370px' }" (change)="stChange($event)"></st>
|
[loading]="service.http.loading" [scroll]="{ y: '370px' }" (change)="stChange($event)">
|
||||||
</nz-card>
|
<ng-template st-row="customerType" let-item let-index="index">
|
||||||
|
<div>
|
||||||
|
<span *ngIf="item?.customerType == 1">客户</span>
|
||||||
|
<span *ngIf="item?.customerType == 2">供应商</span>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
</st>
|
||||||
|
</nz-card>
|
||||||
|
|
||||||
|
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" [nzTitle]="editText" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||||
|
<ng-container *nzModalContent>
|
||||||
|
<sf #sfFre [schema]="addSchema" [ui]="ui2" [formData]="formData" [compact]="false" [button]="'none'">
|
||||||
|
</sf>
|
||||||
|
</ng-container>
|
||||||
|
<ng-template #nzModalFooter>
|
||||||
|
<button nz-button nzType="primary" (click)="handleCancel()" [disabled]="">取消</button>
|
||||||
|
<button nz-button nzType="default" (click)="handleOK()">确 定</button>
|
||||||
|
</ng-template>
|
||||||
|
</nz-modal>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild, Type } from '@angular/core';
|
||||||
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||||
import { SFComponent, SFSchema } from '@delon/form';
|
import { SFComponent, SFRadioWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { SystemService } from '../../services/system.service';
|
import { SystemService } from '../../services/system.service';
|
||||||
|
|
||||||
@ -12,52 +12,48 @@ import { SystemService } from '../../services/system.service';
|
|||||||
export class CrmManagementComponent implements OnInit {
|
export class CrmManagementComponent implements OnInit {
|
||||||
@ViewChild('st', { static: true })
|
@ViewChild('st', { static: true })
|
||||||
st!: STComponent;
|
st!: STComponent;
|
||||||
@ViewChild('sf', { static: false })
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
sf!: SFComponent;
|
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
||||||
|
ui: SFUISchema = {};
|
||||||
url = `/rule?_allow_anonymous=true`;
|
ui2: SFUISchema = {};
|
||||||
|
schema: SFSchema = {};
|
||||||
searchSchema: SFSchema = {
|
addSchema: SFSchema = {};
|
||||||
properties: {
|
_$expand = false;
|
||||||
receiveName: {
|
editText = '';
|
||||||
type: 'string',
|
formData :any;
|
||||||
title: '角色名称',
|
isVisible = false;
|
||||||
ui: { placeholder: '请输入' }
|
edit = false;
|
||||||
}
|
editId = false;
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
columns: STColumn[] = [
|
columns: STColumn[] = [
|
||||||
{ title: '角色名称', index: 'no' },
|
{ title: '客户名称', index: 'customerName' },
|
||||||
{ title: '角色描述', index: 'description' },
|
{ title: '客户简称', index: 'customerShortName' },
|
||||||
{ title: '创建人手机号', index: 'description' },
|
{ title: '客户编码', index: 'customerCode' },
|
||||||
{
|
{ title: '客户类型', render: 'customerType' },
|
||||||
title: '创建时间',
|
|
||||||
index: 'updatedAt',
|
|
||||||
type: 'date'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: '编辑',
|
text: '编辑',
|
||||||
click: item => this.roleAction(item)
|
click: item => this.roleAction(item, 2)
|
||||||
},
|
},
|
||||||
{
|
|
||||||
text: '删除',
|
|
||||||
click: item => this.deleteAction(item)
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
selectedRows: any[] = [];
|
selectedRows: any[] = [];
|
||||||
|
|
||||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
get reqParams (){
|
||||||
|
return {
|
||||||
|
...this.sf?.value,
|
||||||
|
}};
|
||||||
|
|
||||||
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
ngOnInit(): void {
|
||||||
|
this.initSF()
|
||||||
|
this.initSFFre()
|
||||||
|
}
|
||||||
|
|
||||||
stChange(e: STChange): void {
|
stChange(e: STChange): void {
|
||||||
switch (e.type) {
|
switch (e.type) {
|
||||||
@ -69,17 +65,108 @@ export class CrmManagementComponent implements OnInit {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
roleAction(item?: any) {
|
* 伸缩查询条件
|
||||||
const modal = this.nzModalService.create({
|
*/
|
||||||
// nzContent: SettingRoleEditComponent,
|
expandToggle(): void {
|
||||||
nzWidth: 900,
|
this._$expand = !this._$expand;
|
||||||
nzComponentParams: item ? { i: { ...item } } : { i: { id: 0 } },
|
this.sf?.setValue('/_$expand', this._$expand);
|
||||||
nzFooter: null
|
}
|
||||||
});
|
/**
|
||||||
modal.afterClose.subscribe(res => {
|
* 查询字段个数
|
||||||
this.st.load();
|
*/
|
||||||
});
|
get queryFieldCount(): number {
|
||||||
|
return Object.keys(this.schema?.properties || {}).length;
|
||||||
|
}
|
||||||
|
initSF(){
|
||||||
|
this.schema = {
|
||||||
|
properties: {
|
||||||
|
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||||
|
customerName: {
|
||||||
|
type: 'string',
|
||||||
|
title: '客户名称',
|
||||||
|
ui: { placeholder: '请输入' }
|
||||||
|
},
|
||||||
|
customerShortName: {
|
||||||
|
type: 'string',
|
||||||
|
title: '客户简称',
|
||||||
|
ui: { placeholder: '请输入' }
|
||||||
|
},
|
||||||
|
customerType: {
|
||||||
|
type: 'string',
|
||||||
|
title: '客户类型',
|
||||||
|
enum: [
|
||||||
|
{ label: '客户', value: 1 },
|
||||||
|
{ label: '供应商', value: 2 },
|
||||||
|
],
|
||||||
|
ui: {
|
||||||
|
widget: 'select'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
customerCode: {
|
||||||
|
type: 'string',
|
||||||
|
title: '客户编码',
|
||||||
|
ui: { placeholder: '请输入',
|
||||||
|
visibleIf: {
|
||||||
|
_$expand: (value: boolean) => value
|
||||||
|
} }
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||||
|
}
|
||||||
|
initSFFre() {
|
||||||
|
this.addSchema = {
|
||||||
|
properties: {
|
||||||
|
customerName: {
|
||||||
|
type: 'string',
|
||||||
|
title: '客户名称',
|
||||||
|
ui: { placeholder: '请输入' }
|
||||||
|
},
|
||||||
|
customerShortName: {
|
||||||
|
type: 'string',
|
||||||
|
title: '客户简称',
|
||||||
|
ui: { placeholder: '请输入' }
|
||||||
|
},
|
||||||
|
customerCode: {
|
||||||
|
type: 'string',
|
||||||
|
title: '客户编码',
|
||||||
|
ui: { placeholder: '请输入' }
|
||||||
|
},
|
||||||
|
customerType: {
|
||||||
|
type: 'string',
|
||||||
|
title: '客户类型',
|
||||||
|
enum: [
|
||||||
|
{ label: '客户', value: 1 },
|
||||||
|
{ label: '供应商', value: 2 },
|
||||||
|
],
|
||||||
|
ui: {
|
||||||
|
widget: 'radio',
|
||||||
|
} as SFRadioWidgetSchema,
|
||||||
|
default: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
required: ['customerName', 'customerShortName', 'customerType', 'customerCode']
|
||||||
|
};
|
||||||
|
this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
|
||||||
|
}
|
||||||
|
roleAction(value: any,item?: any) {
|
||||||
|
if(item === 1) {
|
||||||
|
this.edit = false;
|
||||||
|
this.editText = '新增';
|
||||||
|
} else {
|
||||||
|
this.service.request(this.service.$api_get_crmCustomer, {id: value.id}).subscribe((res: any) => {
|
||||||
|
console.log(res)
|
||||||
|
if(res) {
|
||||||
|
this.formData = res;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.edit = true;
|
||||||
|
this.editId = value.id;
|
||||||
|
this.editText = '编辑';
|
||||||
|
}
|
||||||
|
this.isVisible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteAction(item?: any) {
|
deleteAction(item?: any) {
|
||||||
@ -97,4 +184,31 @@ export class CrmManagementComponent implements OnInit {
|
|||||||
resetSF() {
|
resetSF() {
|
||||||
this.sf.reset();
|
this.sf.reset();
|
||||||
}
|
}
|
||||||
|
handleCancel() {
|
||||||
|
this.isVisible = false
|
||||||
|
}
|
||||||
|
|
||||||
|
handleOK() {
|
||||||
|
console.log(this.sfFre.value)
|
||||||
|
if(!this.sfFre.valid) {
|
||||||
|
this.service.msgSrv.warning('请正确填写完整!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const params ={
|
||||||
|
...this.sfFre.value
|
||||||
|
}
|
||||||
|
if(this.editId) {
|
||||||
|
params.id = this.editId
|
||||||
|
}
|
||||||
|
this.service.request(this.service.$api_save_crmCustomer, params).subscribe((res:any) => {
|
||||||
|
if(res) {
|
||||||
|
this.service.msgSrv.success('保存成功!')
|
||||||
|
this.isVisible = false
|
||||||
|
this.st.reload();
|
||||||
|
} else {
|
||||||
|
this.service.msgSrv.warning(res?.msg)
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* @Author: your name
|
||||||
|
* @Date: 2021-12-20 17:18:43
|
||||||
|
* @LastEditTime: 2021-12-27 09:30:39
|
||||||
|
* @LastEditors: your name
|
||||||
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
|
* @FilePath: \tms-obc-web\src\app\routes\sys-setting\services\system.service.ts
|
||||||
|
*/
|
||||||
import { Injectable, Injector } from '@angular/core';
|
import { Injectable, Injector } from '@angular/core';
|
||||||
import { BaseService } from 'src/app/shared/services';
|
import { BaseService } from 'src/app/shared/services';
|
||||||
|
|
||||||
@ -28,6 +36,16 @@ export class SystemService extends BaseService {
|
|||||||
$api_update_dict = '/api/mdc/pbc/dictItems/update';
|
$api_update_dict = '/api/mdc/pbc/dictItems/update';
|
||||||
|
|
||||||
|
|
||||||
|
// 获取CRM客户信息表
|
||||||
|
$api_get_crmCustomer = '/api/mdc/crmCustomer/get';
|
||||||
|
// 查询CRM客户信息表
|
||||||
|
$api_get_crmCustomer_page = '/api/mdc/crmCustomer/list/page';
|
||||||
|
// 保存CRM客户信息表
|
||||||
|
$api_save_crmCustomer = '/api/mdc/crmCustomer/save';
|
||||||
|
// 删除CRM客户信息表
|
||||||
|
$api_deletebatch_crmCustomer = '/api/mdc/crmCustomer/deletebatch';
|
||||||
|
|
||||||
|
|
||||||
$api_getAllFunctionInfoByAppId: string = '';
|
$api_getAllFunctionInfoByAppId: string = '';
|
||||||
$api_getRoleTemplateInfo: string = '';
|
$api_getRoleTemplateInfo: string = '';
|
||||||
$api_getFunctionButtonInfo: string = '';
|
$api_getFunctionButtonInfo: string = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user