Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-01-18 09:51:21
|
* @Date : 2022-01-18 09:51:21
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-01-26 16:26:27
|
* @LastEditTime : 2022-01-26 17:45:55
|
||||||
* @FilePath : \\tms-obc-web\\proxy.conf.js
|
* @FilePath : \\tms-obc-web\\proxy.conf.js
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-01-25 16:03:45
|
* @Date : 2022-01-25 16:03:45
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-01-25 19:12:23
|
* @LastEditTime : 2022-02-09 17:23:22
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\core\\guards\\auth.guard.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\core\\guards\\auth.guard.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,3 +1,13 @@
|
|||||||
|
/*
|
||||||
|
* @Description :
|
||||||
|
* @Version : 1.0
|
||||||
|
* @Author : Shiming
|
||||||
|
* @Date : 2022-01-25 13:10:49
|
||||||
|
* @LastEditors : Shiming
|
||||||
|
* @LastEditTime : 2022-01-26 17:45:11
|
||||||
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\components\\basic-setting\\basic-setting.component.ts
|
||||||
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
|
*/
|
||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||||
import { dateTimePickerUtil } from '@delon/util';
|
import { dateTimePickerUtil } from '@delon/util';
|
||||||
@ -24,8 +34,8 @@ export class BasicSettingComponent implements OnInit {
|
|||||||
if (res?.length > 0) {
|
if (res?.length > 0) {
|
||||||
const typeData = res.find(config => config.configFullKey === 'sys.config');
|
const typeData = res.find(config => config.configFullKey === 'sys.config');
|
||||||
if (typeData) {
|
if (typeData) {
|
||||||
this.tabs = typeData.children;
|
this.tabs = typeData?.children;
|
||||||
this.selectedTab = typeData.children[0];
|
this.selectedTab = typeData?.children?.[0];
|
||||||
this.getConfigList(this.selectedTab);
|
this.getConfigList(this.selectedTab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -34,7 +44,7 @@ export class BasicSettingComponent implements OnInit {
|
|||||||
|
|
||||||
getConfigList(selectedTab: any) {
|
getConfigList(selectedTab: any) {
|
||||||
this.selectedTab = selectedTab;
|
this.selectedTab = selectedTab;
|
||||||
this.service.request(this.service.$api_get_config_by_parent_id, { id: selectedTab.id }).subscribe((res: Array<any>) => {
|
this.service.request(this.service.$api_get_config_by_parent_id, { id: selectedTab?.id }).subscribe((res: Array<any>) => {
|
||||||
if (res?.length > 0) {
|
if (res?.length > 0) {
|
||||||
res = res.map(item => ({
|
res = res.map(item => ({
|
||||||
...item,
|
...item,
|
||||||
|
|||||||
@ -1,3 +1,13 @@
|
|||||||
|
<!--
|
||||||
|
* @Description :
|
||||||
|
* @Version : 1.0
|
||||||
|
* @Author : Shiming
|
||||||
|
* @Date : 2022-01-12 13:35:56
|
||||||
|
* @LastEditors : Shiming
|
||||||
|
* @LastEditTime : 2022-02-09 17:41:57
|
||||||
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\driver\\driver.component.html
|
||||||
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
|
-->
|
||||||
<!-- 页头 -->
|
<!-- 页头 -->
|
||||||
<page-header-wrapper [title]="'司机列表'"></page-header-wrapper>
|
<page-header-wrapper [title]="'司机列表'"></page-header-wrapper>
|
||||||
<nz-card>
|
<nz-card>
|
||||||
@ -26,7 +36,7 @@
|
|||||||
</nz-tabset>
|
</nz-tabset>
|
||||||
|
|
||||||
<!-- 数据列表 -->
|
<!-- 数据列表 -->
|
||||||
<st #st [columns]="columns" [data]='service.$api_get_driver_list'
|
<st #st [columns]="columns" [scroll]="{x: '1200px'}" [data]='service.$api_get_driver_list'
|
||||||
[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] }"
|
||||||
|
|||||||
@ -248,9 +248,10 @@ export class UserCenterComponentsDriverComponent implements OnInit {
|
|||||||
|
|
||||||
private initST(): STColumn[] {
|
private initST(): STColumn[] {
|
||||||
return [
|
return [
|
||||||
{ title: '司机姓名', className: 'text-center', index: 'name' },
|
{ title: '司机姓名', className: 'text-center', index: 'name' , width: 150},
|
||||||
{ title: '手机号', className: 'text-center', index: 'mobile' },
|
{ title: '手机号', className: 'text-center', index: 'mobile',width: 150 },
|
||||||
{ title: '当前车辆', className: 'text-center', index: 'carNo' },
|
{ title: '身份证号码', className: 'text-center', index: 'identityNo', width: 200 },
|
||||||
|
{ title: '当前车辆', className: 'text-center', index: 'carNo' , width: 200},
|
||||||
{
|
{
|
||||||
title: '实名认证状态',
|
title: '实名认证状态',
|
||||||
className: 'text-center',
|
className: 'text-center',
|
||||||
@ -262,6 +263,8 @@ export class UserCenterComponentsDriverComponent implements OnInit {
|
|||||||
1: { text: '通过', color: 'success' },
|
1: { text: '通过', color: 'success' },
|
||||||
2: { text: '驳回', color: 'warning' }
|
2: { text: '驳回', color: 'warning' }
|
||||||
}
|
}
|
||||||
|
, width: 180
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '驾驶证状态',
|
title: '驾驶证状态',
|
||||||
@ -275,6 +278,7 @@ export class UserCenterComponentsDriverComponent implements OnInit {
|
|||||||
30: { text: '驳回', color: 'warning' },
|
30: { text: '驳回', color: 'warning' },
|
||||||
40: { text: '证件过期', color: 'error' }
|
40: { text: '证件过期', color: 'error' }
|
||||||
}
|
}
|
||||||
|
, width: 180
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '从业资格证状态',
|
title: '从业资格证状态',
|
||||||
@ -288,10 +292,11 @@ export class UserCenterComponentsDriverComponent implements OnInit {
|
|||||||
30: { text: '驳回', color: 'warning' },
|
30: { text: '驳回', color: 'warning' },
|
||||||
40: { text: '证件过期', color: 'error' }
|
40: { text: '证件过期', color: 'error' }
|
||||||
}
|
}
|
||||||
|
, width: 180
|
||||||
},
|
},
|
||||||
{ title: '推广业务员', className: 'text-center', render: 'promotersTelephone' },
|
{ title: '推广业务员', className: 'text-center', render: 'promotersTelephone' , width: 180},
|
||||||
{ title: '注册渠道', className: 'text-center', index: 'source', type: 'enum', enum: { 1: '用户注册', 2: '货主添加' } },
|
{ title: '注册渠道', className: 'text-center', index: 'source', type: 'enum', enum: { 1: '用户注册', 2: '货主添加' }, width: 150 },
|
||||||
{ title: '注册时间', className: 'text-center', index: 'createTime' },
|
{ title: '注册时间', className: 'text-center', index: 'createTime', width: 200 },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: '110px',
|
width: '110px',
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<!-- 页头 -->
|
<!-- 页头 -->
|
||||||
<page-header-wrapper [logo]="logo" [content]="content" [title]="'企业详情'">
|
<page-header-wrapper [logo]="logo" [content]="content" [title]="'企业详情'" >
|
||||||
<ng-template #logo>
|
<ng-template #logo>
|
||||||
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
|
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
|
||||||
<i nz-icon nzType="left" nzTheme="outline"></i>
|
<i nz-icon nzType="left" nzTheme="outline"></i>
|
||||||
@ -143,7 +143,7 @@
|
|||||||
nzTheme="fill" class="mr-xs"></i>审核通过
|
nzTheme="fill" class="mr-xs"></i>审核通过
|
||||||
</label>
|
</label>
|
||||||
<label *ngIf="detailData?.approvalStatus===30" style="color: #ff4d4f;"><i nz-icon nzType="close-circle"
|
<label *ngIf="detailData?.approvalStatus===30" style="color: #ff4d4f;"><i nz-icon nzType="close-circle"
|
||||||
nzTheme="fill" class="mr-xs"></i>驳回
|
nzTheme="fill" class="mr-xs"></i>驳回 驳回原因:{{detailData?.approvalOpinion}}
|
||||||
</label>
|
</label>
|
||||||
</sv-title>
|
</sv-title>
|
||||||
<sv label="公司名称">
|
<sv label="公司名称">
|
||||||
@ -172,7 +172,8 @@
|
|||||||
<nz-date-picker [(ngModel)]="detailData.enterpriseRegistrationTime" [nzDisabled]="!isEdit"
|
<nz-date-picker [(ngModel)]="detailData.enterpriseRegistrationTime" [nzDisabled]="!isEdit"
|
||||||
[nzPlaceHolder]="isEdit?'':'-'" [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''"></nz-date-picker>
|
[nzPlaceHolder]="isEdit?'':'-'" [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''"></nz-date-picker>
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="营业期限">
|
|
||||||
|
<sv label="营业期限" col="1">
|
||||||
<nz-date-picker [(ngModel)]="detailData.operatingStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
|
<nz-date-picker [(ngModel)]="detailData.operatingStartTime" [nzDisabled]="!isEdit" nzPlaceHolder=" "
|
||||||
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar">
|
[nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;" class="calendar">
|
||||||
</nz-date-picker>
|
</nz-date-picker>
|
||||||
@ -228,7 +229,7 @@
|
|||||||
<input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentityVO.certificateNumber" [readonly]="!isEdit"
|
<input nz-input type="text" [(ngModel)]="detailData.legalPersonIdentityVO.certificateNumber" [readonly]="!isEdit"
|
||||||
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
[nzBorderless]="!isEdit" [placeholder]="isEdit?'':'-'">
|
||||||
</sv>
|
</sv>
|
||||||
<sv label="身份证有效期">
|
<sv label="身份证有效期" col="1">
|
||||||
<nz-date-picker [(ngModel)]="detailData.legalPersonIdentityVO.validStartTime" [nzDisabled]="!isEdit"
|
<nz-date-picker [(ngModel)]="detailData.legalPersonIdentityVO.validStartTime" [nzDisabled]="!isEdit"
|
||||||
nzPlaceHolder=" " [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;"
|
nzPlaceHolder=" " [nzBorderless]="!isEdit" [nzSuffixIcon]="isEdit?'calendar':''" style="width: 100px;"
|
||||||
class="calendar"></nz-date-picker>
|
class="calendar"></nz-date-picker>
|
||||||
|
|||||||
@ -1,3 +1,13 @@
|
|||||||
|
<!--
|
||||||
|
* @Description :
|
||||||
|
* @Version : 1.0
|
||||||
|
* @Author : Shiming
|
||||||
|
* @Date : 2022-01-12 10:52:50
|
||||||
|
* @LastEditors : Shiming
|
||||||
|
* @LastEditTime : 2022-02-09 15:28:00
|
||||||
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\freight\\list\\list.component.html
|
||||||
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
|
-->
|
||||||
<!-- 页头 -->
|
<!-- 页头 -->
|
||||||
<page-header-wrapper [title]="'企业列表'"></page-header-wrapper>
|
<page-header-wrapper [title]="'企业列表'"></page-header-wrapper>
|
||||||
<nz-card>
|
<nz-card>
|
||||||
@ -36,6 +46,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
<ng-template st-row="contacter" let-item let-index="index">
|
||||||
|
{{ item.contacter }}/{{item.mobile}}
|
||||||
|
</ng-template>
|
||||||
<ng-template st-row="promotersTelephone" let-item let-index="index">
|
<ng-template st-row="promotersTelephone" let-item let-index="index">
|
||||||
<a (click)="addPromoter(item)">{{ item.promotersTelephone || '添加' }}</a>
|
<a (click)="addPromoter(item)">{{ item.promotersTelephone || '添加' }}</a>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|||||||
@ -106,34 +106,35 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
contactName: {
|
contactName: {
|
||||||
title: '联系人',
|
title: '管理员',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
showRequired: false
|
showRequired: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// networkTransporter: {
|
|
||||||
// title: '网络货运人',
|
|
||||||
// type: 'string',
|
|
||||||
// ui: {
|
|
||||||
// placeholder: '请输入',
|
|
||||||
// showRequired: false
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
networkTransporter: {
|
networkTransporter: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '网络货运人',
|
title: '网络货运人',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
visibleIf: {
|
|
||||||
_$expand: (value: boolean) => value,
|
|
||||||
},
|
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
|
asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
promotersTelephone: {
|
||||||
|
title: '业务员',
|
||||||
|
type: 'string',
|
||||||
|
ui: {
|
||||||
|
placeholder: '请输入',
|
||||||
|
showRequired: false,
|
||||||
|
visibleIf: {
|
||||||
|
expand: (value: boolean) => value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
source: {
|
source: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '注册渠道',
|
title: '注册渠道',
|
||||||
@ -175,7 +176,7 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
this.columns = [
|
this.columns = [
|
||||||
// { title: '', type: 'checkbox', className: 'text-center' },
|
// { title: '', type: 'checkbox', className: 'text-center' },
|
||||||
{ title: '企业名称', className: 'text-center', index: 'enterpriseName' },
|
{ title: '企业名称', className: 'text-center', index: 'enterpriseName' },
|
||||||
{ title: '联系人', className: 'text-center', index: 'contacter' },
|
{ title: '管理员', className: 'text-center', render: 'contacter' },
|
||||||
{ title: '网络货运人', className: 'text-center', index: 'netTranName' },
|
{ title: '网络货运人', className: 'text-center', index: 'netTranName' },
|
||||||
{ title: '常用服务', className: 'text-center', index: 'oftenUsedServices', type: 'enum', enum: { 10: '整车发货', 20: '大宗发货' } },
|
{ title: '常用服务', className: 'text-center', index: 'oftenUsedServices', type: 'enum', enum: { 10: '整车发货', 20: '大宗发货' } },
|
||||||
{ title: '推广业务员', className: 'text-center', render: 'promotersTelephone' },
|
{ title: '推广业务员', className: 'text-center', render: 'promotersTelephone' },
|
||||||
|
|||||||
@ -390,7 +390,7 @@ export class FreightComponentsListNewComponent implements OnInit {
|
|||||||
title: '经营范围',
|
title: '经营范围',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
minLength: 1,
|
minLength: 1,
|
||||||
maxLength: 240,
|
maxLength: 500,
|
||||||
ui: {
|
ui: {
|
||||||
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
|
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
|
||||||
widget: 'textarea',
|
widget: 'textarea',
|
||||||
|
|||||||
@ -1,3 +1,13 @@
|
|||||||
|
<!--
|
||||||
|
* @Description :
|
||||||
|
* @Version : 1.0
|
||||||
|
* @Author : Shiming
|
||||||
|
* @Date : 2022-01-25 20:18:52
|
||||||
|
* @LastEditors : Shiming
|
||||||
|
* @LastEditTime : 2022-02-09 14:57:23
|
||||||
|
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\insurance-table\\insurance-table.component.html
|
||||||
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
|
-->
|
||||||
<div nz-row>
|
<div nz-row>
|
||||||
<div nz-col nzSpan="24">
|
<div nz-col nzSpan="24">
|
||||||
<div class="mb-md ml-xl" style="text-align: right;">
|
<div class="mb-md ml-xl" style="text-align: right;">
|
||||||
@ -9,12 +19,13 @@
|
|||||||
[nzScroll]="{ x: '1200px' }" [nzShowPagination]="false" class="ml-xl" style="max-width: 1100px;">
|
[nzScroll]="{ x: '1200px' }" [nzShowPagination]="false" class="ml-xl" style="max-width: 1100px;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th rowspan="2" nzWidth="200px" nzAlign="center" nzLeft>公里数</th>
|
<th rowspan="2" nzWidth="250px" nzAlign="center" nzLeft>险种</th>
|
||||||
<th rowspan="2" nzWidth="130px" nzAlign="center">计算方式</th>
|
<!-- <th rowspan="2" nzWidth="130px" nzAlign="center">计算方式</th> -->
|
||||||
<th nzWidth="220px" nzAlign="center" *ngFor="let item of headers">车长(米)</th>
|
<th nzWidth="220px" nzAlign="center" >普货-基本险</th>
|
||||||
|
<th nzWidth="220px" nzAlign="center" >普货-综合险</th>
|
||||||
<th rowspan="2" nzWidth="60px" nzAlign="center" nzRight>操作</th>
|
<th rowspan="2" nzWidth="60px" nzAlign="center" nzRight>操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<!-- <tr>
|
||||||
<th nzWidth="220px" nzAlign="center" *ngFor="let item of headers;let i = index">
|
<th nzWidth="220px" nzAlign="center" *ngFor="let item of headers;let i = index">
|
||||||
<div style="display: flex;align-items: center;justify-content: space-between;">
|
<div style="display: flex;align-items: center;justify-content: space-between;">
|
||||||
<label style="width: 65px;text-align: right;"> {{item.startLength}}</label>
|
<label style="width: 65px;text-align: right;"> {{item.startLength}}</label>
|
||||||
@ -24,35 +35,46 @@
|
|||||||
</nz-input-number>
|
</nz-input-number>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr> -->
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let item of groupingTable.data;let i = index">
|
<tr *ngFor="let item of groupingTable.data;let i = index">
|
||||||
<td nzWidth="200px" nzAlign="center" nzLeft>
|
<td nzWidth="250px" nzAlign="center" nzLeft>
|
||||||
<div style="display: flex;align-items: center;justify-content: space-between;">
|
<div style="display: flex;align-items: center;justify-content: space-between;">
|
||||||
<label style="width: 65px;text-align: right;"> {{item.startKm}}</label>
|
<div >
|
||||||
<label>-</label>
|
公里数(km)
|
||||||
<nz-input-number [ngModel]="item.endKm" (ngModelChange)="changeEndKm($event,i)" [nzMin]="0"
|
</div>
|
||||||
[nzFormatter]="formatterDollar" nzSize="small">
|
<div style="color:#f0f0f0;">|</div>
|
||||||
|
<div >
|
||||||
|
<label style="width: 65px;text-align: right;"> {{item.startKm}}</label>
|
||||||
|
<label>-</label>
|
||||||
|
<nz-input-number [ngModel]="item.endKm" (ngModelChange)="changeEndKm($event,i)" [nzMin]="0"
|
||||||
|
[nzFormatter]="formatterDollar" nzSize="small">
|
||||||
|
</nz-input-number>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<!-- <td nzWidth="130px" nzAlign="center">{{computeMode[item.computeMode] }}</td> -->
|
||||||
|
<td nzWidth="220px" nzAlign="center" >
|
||||||
|
<div style="display: flex;align-items: center;justify-content: center;" >
|
||||||
|
<nz-input-number [(ngModel)]="item.baseInsuranceRate" [nzMin]="0" nzSize="small" style="width: 55px;"
|
||||||
|
class="ml-sm mr-sm">
|
||||||
</nz-input-number>
|
</nz-input-number>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td nzWidth="130px" nzAlign="center">{{computeMode[item.computeMode] }}</td>
|
<td nzWidth="220px" nzAlign="center" >
|
||||||
<td nzWidth="220px" nzAlign="center" *ngFor="let node of item.configValue">
|
|
||||||
<div style="display: flex;align-items: center;justify-content: center;">
|
<div style="display: flex;align-items: center;justify-content: center;">
|
||||||
<label>最高</label>
|
<nz-input-number [(ngModel)]="item.blanketInsuranceRate" [nzMin]="0" nzSize="small" style="width: 55px;"
|
||||||
<nz-input-number [(ngModel)]="node.maxPrice" [nzMin]="0" nzSize="small" style="width: 55px;"
|
|
||||||
class="ml-sm mr-sm">
|
class="ml-sm mr-sm">
|
||||||
</nz-input-number>
|
</nz-input-number>
|
||||||
<label>预警</label>
|
|
||||||
<nz-input-number [(ngModel)]="node.ewPrice" [nzMin]="0" nzSize="small" style="width: 55px;"
|
|
||||||
class="ml-sm">
|
|
||||||
</nz-input-number>
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td nzWidth="60px" nzAlign="center" nzRight>
|
<td nzWidth="60px" nzAlign="center" nzRight>
|
||||||
<a *ngIf="i === groupingTable.data.length-1 && groupingTable.data.length>2" nz-popconfirm
|
<a *ngIf="i === groupingTable.data.length-1 && groupingTable.data.length>2"
|
||||||
nzPopconfirmTitle="是否确认删除?" (nzOnConfirm)="deleteRow(i)">删除</a>
|
nz-popconfirm
|
||||||
|
nzPopconfirmTitle="是否确认删除?" (nzOnConfirm)="deleteRow(i)"
|
||||||
|
>删除</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { debounceTime } from 'rxjs/operators';
|
||||||
|
import { Subject } from 'rxjs';
|
||||||
|
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core';
|
||||||
import { BaseService } from '@shared';
|
import { BaseService } from '@shared';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -11,29 +13,21 @@ export class InsuranceTableComponent implements OnInit {
|
|||||||
headers: any[] = [];
|
headers: any[] = [];
|
||||||
|
|
||||||
formatterDollar = (value: number): string => `${value} (含)`;
|
formatterDollar = (value: number): string => `${value} (含)`;
|
||||||
computeMode: any = {
|
|
||||||
0: '总运价',
|
changeSub = new Subject<string>();
|
||||||
1: '单公里运价'
|
constructor(public service: BaseService, private cdr: ChangeDetectorRef) {}
|
||||||
};
|
|
||||||
constructor(public service: BaseService) {}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.loadHeaders();
|
|
||||||
this.loadData();
|
this.loadData();
|
||||||
}
|
this.changeEndKmAction();
|
||||||
|
|
||||||
loadHeaders() {
|
|
||||||
this.service.request('/api/mdc/cuc/freightConfigItem/list').subscribe(res => {
|
|
||||||
if (res) {
|
|
||||||
this.headers = res;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadData() {
|
loadData() {
|
||||||
this.service.request('/api/mdc/cuc/freightConfig/list').subscribe(res => {
|
this.service.request('/api/mdc/cuc/insuranceConfig/list').subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
|
console.log(res);
|
||||||
this.data = res;
|
this.data = res;
|
||||||
|
this.cdr.detectChanges();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -59,13 +53,35 @@ export class InsuranceTableComponent implements OnInit {
|
|||||||
* @param i 下标
|
* @param i 下标
|
||||||
*/
|
*/
|
||||||
changeEndKm(event: any, i: number) {
|
changeEndKm(event: any, i: number) {
|
||||||
if (event <= this.data[i].startKm) {
|
// console.log(this.debounce4(event, i));
|
||||||
this.data[i].endKm = this.data[i].startKm + 1;
|
// console.log(this.data[i].startKm);
|
||||||
this.changeNextStartKm(event, i + 1);
|
// console.log(event);
|
||||||
return;
|
// console.log(i);
|
||||||
|
if (event) {
|
||||||
|
console.log(event);
|
||||||
|
|
||||||
|
this.changeSub.next(`${event},${i}`);
|
||||||
}
|
}
|
||||||
this.data[i].endKm = event;
|
}
|
||||||
this.changeNextStartKm(event, i + 1);
|
changeEndKmAction() {
|
||||||
|
this.changeSub.pipe(debounceTime(500)).subscribe((res: string) => {
|
||||||
|
if (res) {
|
||||||
|
const paras = res.split(',');
|
||||||
|
const num = Number(paras[0]);
|
||||||
|
const i = Number(paras[1]);
|
||||||
|
|
||||||
|
if (num <= this.data[i].startKm) {
|
||||||
|
this.data[i].endKm = null;
|
||||||
|
setTimeout(() => {
|
||||||
|
this.data[i].endKm = this.data[i].startKm + 1 ;
|
||||||
|
}, 0);
|
||||||
|
this.changeNextStartKm(this.data[i].startKm + 1, i + 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.data[i].endKm = num;
|
||||||
|
this.changeNextStartKm(num, i + 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
add() {
|
add() {
|
||||||
@ -73,14 +89,7 @@ export class InsuranceTableComponent implements OnInit {
|
|||||||
|
|
||||||
const tem = this.data[this.data?.length - 1];
|
const tem = this.data[this.data?.length - 1];
|
||||||
if (tem && tem.endKm) {
|
if (tem && tem.endKm) {
|
||||||
const list = this.headers.map(item => ({
|
|
||||||
ewPrice: null,
|
|
||||||
itemId: item.id,
|
|
||||||
maxPrice: null
|
|
||||||
}));
|
|
||||||
this.data.push({
|
this.data.push({
|
||||||
computeMode: 1,
|
|
||||||
configValue: list,
|
|
||||||
endKm: '',
|
endKm: '',
|
||||||
startKm: tem.endKm
|
startKm: tem.endKm
|
||||||
});
|
});
|
||||||
@ -91,17 +100,24 @@ export class InsuranceTableComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
deleteRow(index: number) {
|
deleteRow(index: number) {
|
||||||
this.data = this.data.filter((d, i) => index !== i);
|
console.log(index);
|
||||||
|
this.data = this.data.filter((d, i) => {
|
||||||
|
console.log(d);
|
||||||
|
console.log(i);
|
||||||
|
index !== i;
|
||||||
|
});
|
||||||
|
console.log(this.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
save() {
|
save() {
|
||||||
this.service.request('/api/mdc/cuc/freightConfig/saveBatch', this.data).subscribe(res => {
|
console.log(this.data);
|
||||||
if (res) {
|
// this.service.request('/api/mdc/cuc/freightConfig/saveBatch', this.data).subscribe(res => {
|
||||||
console.log(res);
|
// if (res) {
|
||||||
this.service.msgSrv.success('修改成功');
|
// console.log(res);
|
||||||
this.loadData();
|
// this.service.msgSrv.success('修改成功');
|
||||||
}
|
// this.loadData();
|
||||||
});
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-01-25 20:23:54
|
* @Date : 2022-01-25 20:23:54
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-01-25 20:35:32
|
* @LastEditTime : 2022-02-09 14:57:05
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\insurance-table\\insurance-table.module.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\insurance-table\\insurance-table.module.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -14,12 +14,13 @@ import { FormsModule } from '@angular/forms';
|
|||||||
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
||||||
import { NzTableModule } from 'ng-zorro-antd/table';
|
import { NzTableModule } from 'ng-zorro-antd/table';
|
||||||
import { InsuranceTableComponent } from './insurance-table.component';
|
import { InsuranceTableComponent } from './insurance-table.component';
|
||||||
|
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
|
||||||
|
|
||||||
const COMPONENTS = [InsuranceTableComponent];
|
const COMPONENTS = [InsuranceTableComponent];
|
||||||
const COMPONENTSs = [
|
const COMPONENTSs = [
|
||||||
NzTableModule,
|
NzTableModule,
|
||||||
NzInputNumberModule
|
NzInputNumberModule,
|
||||||
|
NzPopconfirmModule
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|||||||
Reference in New Issue
Block a user