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

This commit is contained in:
Taric Xin
2022-01-17 20:38:32 +08:00
17 changed files with 236 additions and 113 deletions

View File

@ -1,6 +1,7 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { apiConf } from '@conf/api.conf'; import { apiConf } from '@conf/api.conf';
import { SFComponent, SFSchema, SFTextWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form'; import { SFComponent, SFSchema, SFTextWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form';
import { ShipperBaseService } from '@shared';
import { NzModalRef } from 'ng-zorro-antd/modal'; import { NzModalRef } from 'ng-zorro-antd/modal';
import { FreightAccountService } from '../../../services/freight-account.service'; import { FreightAccountService } from '../../../services/freight-account.service';
@ -35,7 +36,11 @@ export class ClearingModalComponent implements OnInit {
} }
}; };
constructor(private modal: NzModalRef, public service: FreightAccountService) {} constructor(
private modal: NzModalRef,
public service: FreightAccountService,
public shipperservice: ShipperBaseService,
) {}
ngOnInit(): void { ngOnInit(): void {
this.initSF(this.i); this.initSF(this.i);
@ -51,13 +56,18 @@ export class ClearingModalComponent implements OnInit {
} as SFTextWidgetSchema, } as SFTextWidgetSchema,
default: '10000.00' default: '10000.00'
}, },
name2: { enterpriseInfoId: {
title: '网络货运人',
type: 'string', type: 'string',
title: '网络货运人',
ui: { ui: {
widget: 'text' widget: 'select',
} as SFTextWidgetSchema, placeholder: '请选择',
default: '天津怡亚通物流科技有限公司' visibleIf: {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
},
}, },
name3: { name3: {
title: '银行类型', title: '银行类型',

View File

@ -74,7 +74,7 @@ loadTime: any; // 货源单设置回显
public service: OrderManagementService, public service: OrderManagementService,
private modalService: NzModalService, private modalService: NzModalService,
private amapService: AmapService, private amapService: AmapService,
public service2: ShipperBaseService, public shipperservice: ShipperBaseService,
fb: FormBuilder, fb: FormBuilder,
private envSrv: EAEnvironmentService, private envSrv: EAEnvironmentService,
) { ) {
@ -528,7 +528,7 @@ initSF3() {
// ui: { // ui: {
// placeholder: '请选择', // placeholder: '请选择',
// widget: 'select', // widget: 'select',
// asyncData: () => this.service2.getNetworkFreightForwarder(), // asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
// visibleIf: { // visibleIf: {
// _$expand: (value: boolean) => value, // _$expand: (value: boolean) => value,
// }, // },

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-12-03 11:10:14 * @Date: 2021-12-03 11:10:14
* @LastEditTime: 2022-01-13 13:30:01 * @LastEditTime: 2022-01-17 17:11:26
* @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\supply-management\components\vehicle\vehicle.component.html * @FilePath: \tms-obc-web\src\app\routes\supply-management\components\vehicle\vehicle.component.html
@ -60,6 +60,9 @@
[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" [loading]="service.http.loading"
> >
<ng-template st-row="freightPrice" let-item let-index="index">
{{ item.freightPrice | currency}}
</ng-template>
<ng-template st-row="billCode" let-item let-index="index"> <ng-template st-row="billCode" let-item let-index="index">
<a [routerLink]="'/order-management/bulk-detail/'+item.id">{{item.billCode}}</a> <a [routerLink]="'/order-management/bulk-detail/'+item.id">{{item.billCode}}</a>
<div> <div>
@ -116,6 +119,7 @@
[res]="{ reName: { list: 'data', total: 'data.total' } }" [res]="{ reName: { list: 'data', 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] }"
> >
<ng-template st-row="order" let-item let-index="index"> <ng-template st-row="order" let-item let-index="index">
{{ index + 1 }} {{ index + 1 }}
</ng-template> </ng-template>
@ -156,6 +160,7 @@
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: changeViewParams }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: changeViewParams }"
[res]="{ reName: { list: 'data.list', total: 'data.total' } }" [res]="{ reName: { list: 'data.list', total: 'data.total' } }"
> >
<ng-template st-row="amountBeforeChange" let-item let-index="index"> <ng-template st-row="amountBeforeChange" let-item let-index="index">
{{ item.amountBeforeChange | currency}} {{ item.amountBeforeChange | currency}}
</ng-template> </ng-template>

View File

@ -68,7 +68,7 @@ tabs = {
constructor( constructor(
public service: OrderManagementService, public service: OrderManagementService,
private modal: NzModalService, private modal: NzModalService,
public service2: ShipperBaseService, public shipperservice: ShipperBaseService,
private router: Router, private router: Router,
) { } ) { }
@ -81,10 +81,16 @@ tabs = {
if(this.resourceStatus) { if(this.resourceStatus) {
a.billStatus = this.resourceStatus; a.billStatus = this.resourceStatus;
} }
return { const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand;
return {
...a, ...a,
...this.sf?.value, ...params,
}; createTime: {
start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '',
},
};
} }
get selectedRows() { get selectedRows() {
return this.st?.list.filter((item) => item.checked) || []; return this.st?.list.filter((item) => item.checked) || [];
@ -243,7 +249,7 @@ tabs = {
.request(this.service.$api_get_getCarLicenseListByCarNo, { .request(this.service.$api_get_getCarLicenseListByCarNo, {
carNo: q carNo: q
}) })
.pipe(map((res: any) => (res?.records as any[]).map(i => ({ label: i.carNo, value: i.carNo } as SFSchemaEnum)))) .pipe(map((res: any) => (res?.records as any[]).map(i => ({ label: i.carNo, value: i.id } as SFSchemaEnum))))
.toPromise(); .toPromise();
} else { } else {
return of([]); return of([]);
@ -283,7 +289,7 @@ tabs = {
type: 'string', type: 'string',
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'payment:status' }, params: { dictKey: 'overall:payment:status' },
containAllLable:true, containAllLable:true,
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
@ -302,13 +308,13 @@ tabs = {
} }
} as SFDateWidgetSchema } as SFDateWidgetSchema
}, },
isRiskSheet: { riskStatus: {
type: 'string', type: 'string',
title: '是否风险单', title: '是否风险单',
enum: [ enum: [
{ label: '全部', value: '' }, { label: '全部', value: '' },
{ label: '是', value: '1' }, { label: '是', value: '3' },
{ label: '否', value: '2' } { label: '否', value: '1' }
], ],
ui: { ui: {
widget: 'select', widget: 'select',
@ -328,7 +334,7 @@ tabs = {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },
allowClear: true, allowClear: true,
asyncData: () => this.service2.getNetworkFreightForwarder(), asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
}, },
}, },
// goodsName: { // goodsName: {
@ -355,7 +361,7 @@ tabs = {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },
asyncData: () => asyncData: () =>
this.service2.loadConfigByKey('goods.name.config.type').pipe( this.shipperservice.loadConfigByKey('goods.name.config.type').pipe(
map((data: any) => { map((data: any) => {
return data[0].children?.map((m: any) => { return data[0].children?.map((m: any) => {
return { label: m.name, value: m.id }; return { label: m.name, value: m.id };
@ -456,13 +462,13 @@ tabs = {
render: 'goodsName' render: 'goodsName'
}, { }, {
title: '运费单价', title: '运费单价',
className: 'text-left', className: 'text-right',
width: '180px', width: '180px',
index: 'freightPrice' render: 'freightPrice'
}, },
{ {
title: '接单数量', title: '接单数量',
className: 'text-left', className: 'text-right',
index: 'goodsNumber', index: 'goodsNumber',
width: '180px', width: '180px',
}, },
@ -494,7 +500,7 @@ tabs = {
title: '创建时间', title: '创建时间',
width: '180px', width: '180px',
className: 'text-left', className: 'text-left',
index: 'creationTime', index: 'createTime',
}, },
{ {
title: '操作', title: '操作',
@ -714,6 +720,7 @@ tabs = {
nzWidth: 580, nzWidth: 580,
nzContent: UpdateFreightComponent, nzContent: UpdateFreightComponent,
nzComponentParams: { data: { ...data, billId: item.id } }, nzComponentParams: { data: { ...data, billId: item.id } },
nzFooter: null
}); });
modal.afterClose.subscribe(_ => modal.afterClose.subscribe(_ =>

View File

@ -36,7 +36,7 @@ export class OrderManagementRiskComponent implements OnInit {
}; };
constructor( constructor(
public service: OrderManagementService, public service: OrderManagementService,
public service2: ShipperBaseService, public shipperservice: ShipperBaseService,
private modal: NzModalService, private modal: NzModalService,
public router: Router public router: Router
) {} ) {}
@ -190,18 +190,18 @@ export class OrderManagementRiskComponent implements OnInit {
} }
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
enterpriseInfoName: { enterpriseInfoId: {
type: 'string', type: 'string',
title: '网络货运人', title: '网络货运人',
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value _$expand: (value: boolean) => value,
}, },
allowClear: true, allowClear: true,
asyncData: () => this.service2.getNetworkFreightForwarder() asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
} },
}, },
createTime: { createTime: {
title: '创建时间', title: '创建时间',

View File

@ -74,7 +74,7 @@ loadTime: any; // 货源单设置回显
public service: OrderManagementService, public service: OrderManagementService,
private modalService: NzModalService, private modalService: NzModalService,
private amapService: AmapService, private amapService: AmapService,
public service2: ShipperBaseService, public shipperservice: ShipperBaseService,
fb: FormBuilder, fb: FormBuilder,
private envSrv: EAEnvironmentService, private envSrv: EAEnvironmentService,
) { ) {
@ -523,7 +523,7 @@ initSF3() {
// ui: { // ui: {
// placeholder: '请选择', // placeholder: '请选择',
// widget: 'select', // widget: 'select',
// asyncData: () => this.service2.getNetworkFreightForwarder(), // asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
// visibleIf: { // visibleIf: {
// _$expand: (value: boolean) => value, // _$expand: (value: boolean) => value,
// }, // },

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-12-03 11:10:14 * @Date: 2021-12-03 11:10:14
* @LastEditTime: 2022-01-17 14:57:44 * @LastEditTime: 2022-01-17 17:50:57
* @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\supply-management\components\vehicle\vehicle.component.html * @FilePath: \tms-obc-web\src\app\routes\supply-management\components\vehicle\vehicle.component.html
@ -151,7 +151,6 @@
<ng-container *nzModalContent> <ng-container *nzModalContent>
<st <st
#stFloatView #stFloatView
multiSort
size="small" size="small"
[bordered]="true" [bordered]="true"
[data]="service.$api_getChangeRecordWholeDetail" [data]="service.$api_getChangeRecordWholeDetail"

View File

@ -70,7 +70,7 @@ resourceStatus: any;
constructor( constructor(
public service: OrderManagementService, public service: OrderManagementService,
private modal: NzModalService, private modal: NzModalService,
public service2: ShipperBaseService, public shipperservice: ShipperBaseService,
public router: Router, public router: Router,
) { } ) { }
@ -91,11 +91,17 @@ resourceStatus: any;
const a:any = {}; const a:any = {};
if(this.resourceStatus) { if(this.resourceStatus) {
a.billStatus = this.resourceStatus; a.billStatus = this.resourceStatus;
} }
return { const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand;
return {
...a, ...a,
...this.sf?.value, ...params,
}; createTime: {
start: this.sf?.value?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '',
},
};
} }
get selectedRows() { get selectedRows() {
return this.st?.list.filter((item) => item.checked) || []; return this.st?.list.filter((item) => item.checked) || [];
@ -225,7 +231,7 @@ resourceStatus: any;
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
plateNumber: { CarNo: {
title: '车牌号', title: '车牌号',
type: 'string', type: 'string',
ui: { ui: {
@ -239,7 +245,7 @@ resourceStatus: any;
.request(this.service.$api_get_getCarLicenseListByCarNo, { .request(this.service.$api_get_getCarLicenseListByCarNo, {
carNo: q carNo: q
}) })
.pipe(map((res: any) => (res?.records as any[]).map(i => ({ label: i.carNo, value: i.carNo } as SFSchemaEnum)))) .pipe(map((res: any) => (res?.records as any[]).map(i => ({ label: i.carNo, value: i.id } as SFSchemaEnum))))
.toPromise(); .toPromise();
} else { } else {
return of([]); return of([]);
@ -279,14 +285,14 @@ resourceStatus: any;
type: 'string', type: 'string',
ui: { ui: {
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'bill:payexpense:status' }, params: { dictKey: 'overall:payment:status' },
containAllLable:true, containAllLable:true,
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },
} as SFSelectWidgetSchema, } as SFSelectWidgetSchema,
}, },
creationTime: { createTime: {
title: '创建时间', title: '创建时间',
type: 'string', type: 'string',
ui: { ui: {
@ -298,13 +304,13 @@ resourceStatus: any;
} }
} as SFDateWidgetSchema } as SFDateWidgetSchema
}, },
isRiskSheet: { riskStatus: {
type: 'string', type: 'string',
title: '是否风险单', title: '是否风险单',
enum: [ enum: [
{ label: '全部', value: '' }, { label: '全部', value: '' },
{ label: '是', value: '1' }, { label: '是', value: '3' },
{ label: '否', value: '2' } { label: '否', value: '1' }
], ],
ui: { ui: {
widget: 'select', widget: 'select',
@ -314,6 +320,19 @@ resourceStatus: any;
}, },
}, },
}, },
// riskStatus: {
// title: '是否风险单',
// type: 'string',
// default: '',
// ui: {
// widget: 'dict-select',
// params: { dictKey: 'bill:risk:status' },
// containAllLable:true,
// visibleIf: {
// _$expand: (value: boolean) => value,
// },
// } as SFSelectWidgetSchema,
// },
enterpriseInfoId: { enterpriseInfoId: {
type: 'string', type: 'string',
title: '网络货运人', title: '网络货运人',
@ -324,7 +343,7 @@ resourceStatus: any;
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },
allowClear: true, allowClear: true,
asyncData: () => this.service2.getNetworkFreightForwarder(), asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
}, },
}, },
goodsNameId: { goodsNameId: {
@ -338,7 +357,7 @@ resourceStatus: any;
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },
asyncData: () => asyncData: () =>
this.service2.loadConfigByKey('goods.name.config.type').pipe( this.shipperservice.loadConfigByKey('goods.name.config.type').pipe(
map((data: any) => { map((data: any) => {
return data[0].children?.map((m: any) => { return data[0].children?.map((m: any) => {
return { label: m.name, value: m.id }; return { label: m.name, value: m.id };
@ -428,7 +447,7 @@ resourceStatus: any;
{ {
title: '创建时间', title: '创建时间',
className: 'text-left', className: 'text-left',
index: 'creationTime', index: 'createTime',
width: '170px', width: '170px',
}, },
{ {

View File

@ -1,17 +1,22 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-12-14 14:03:07 * @Date: 2021-12-14 14:03:07
* @LastEditTime: 2022-01-17 14:53:10 * @LastEditTime: 2022-01-17 17:02:31
* @LastEditors: Please set LastEditors * @LastEditors: your name
* @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.html * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.html
--> -->
<sf #sf [schema]="schema" [ui]="{ '*': { spanLabelFixed: 90, grid: { span:24 } } }" [button]="'none'"> <sf #sf [schema]="schema" [ui]="{ '*': { spanLabelFixed: 90, grid: { span: 24 } } }" [button]="'none'"> </sf>
</sf> <nz-divider style="margin-top: 0"></nz-divider>
<nz-divider style="margin-top: 0;"></nz-divider>
<div> <div>
<p style="font-size: 16px;"> <p style="font-size: 16px">
<span style="font-weight: bolder">总运费:<span style="color: #dc112a">{{ data.totalFreight | currency }}</span></span> <span style="font-weight: bolder"
</p> >总运费:<span style="color: #dc112a">{{ data.totalFreight |currency }}</span></span
<p style="margin-bottom: 0;"> 运输费:{{ data.freight | currency}},附加费:{{ data.surcharge | currency }}</p> >
</div> </p>
<p style="margin-bottom: 0"> 运输费:{{ data.freight |currency }},附加费:{{ data.surcharge |currency}}</p>
</div>
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)">确定</button>
</div>

View File

@ -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: 2022-01-13 13:33:14 * @LastEditTime: 2022-01-17 17:02:25
* @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
@ -12,6 +12,7 @@ import {
SFSelectWidgetSchema, SFSelectWidgetSchema,
SFStringWidgetSchema, SFTextWidgetSchema SFStringWidgetSchema, SFTextWidgetSchema
} from '@delon/form'; } from '@delon/form';
import { NzModalRef } from 'ng-zorro-antd/modal';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
import { OrderManagementService } from '../../../services/order-management.service'; import { OrderManagementService } from '../../../services/order-management.service';
@ -28,7 +29,7 @@ export class UpdateFreightComponent implements OnInit {
data: any; data: any;
calculateSub!: Subscription; calculateSub!: Subscription;
constructor(private service: OrderManagementService) {} constructor(private service: OrderManagementService,private modal: NzModalRef, ) {}
ngOnInit(): void { ngOnInit(): void {
this.schema = this.initSF(this.data); this.schema = this.initSF(this.data);
@ -44,8 +45,10 @@ export class UpdateFreightComponent implements OnInit {
type: 'object', type: 'object',
properties: { properties: {
freightPrice: { freightPrice: {
type: 'string', type: 'number',
title: '运费单价', title: '运费单价',
minimum:0,
maximum:99999,
ui: { ui: {
addOnAfter: data.freightTypeLabel, addOnAfter: data.freightTypeLabel,
placeholder: '请输入', placeholder: '请输入',
@ -104,6 +107,8 @@ export class UpdateFreightComponent implements OnInit {
type: 'number', type: 'number',
title: '装货重量', title: '装货重量',
default: data.acceptWeight, default: data.acceptWeight,
minimum:0,
maximum:99999,
ui: { ui: {
unit: '吨', unit: '吨',
placeholder: '请输入', placeholder: '请输入',
@ -118,8 +123,10 @@ export class UpdateFreightComponent implements OnInit {
type: 'number', type: 'number',
title: '装货体积', title: '装货体积',
default: data.acceptVolume, default: data.acceptVolume,
minimum:0,
maximum:99999,
ui: { ui: {
unit: '', unit: '',
placeholder: '请输入', placeholder: '请输入',
grid: { grid: {
span: 12 span: 12
@ -132,6 +139,8 @@ export class UpdateFreightComponent implements OnInit {
type: 'number', type: 'number',
title: '卸货重量', title: '卸货重量',
default: data.settlementWeight, default: data.settlementWeight,
minimum:0,
maximum:99999,
ui: { ui: {
unit: '吨', unit: '吨',
placeholder: '请输入', placeholder: '请输入',
@ -146,8 +155,10 @@ export class UpdateFreightComponent implements OnInit {
type: 'number', type: 'number',
title: '卸货体积', title: '卸货体积',
default: data.settlementVolume, default: data.settlementVolume,
minimum:0,
maximum:99999,
ui: { ui: {
unit: '', unit: '',
placeholder: '请输入', placeholder: '请输入',
grid: { grid: {
span: 12 span: 12
@ -179,23 +190,36 @@ export class UpdateFreightComponent implements OnInit {
} }
changeNumVal() { changeNumVal() {
console.log(this.sf.valid) if (this.calculateSub) {
if(this.sf.valid) { this.calculateSub.unsubscribe();
console.log(this.sf.valid)
} }
// if (this.calculateSub) { this.calculateSub = this.service
// this.calculateSub.unsubscribe(); .request(this.service.$api_calculate_cost, { billId: this.data.billId, ...this.sf.value, changeCause: '' })
// } .subscribe(res => {
// this.calculateSub = this.service if (res) {
// .request(this.service.$api_calculate_cost, { billId: this.data.billId, ...this.sf.value, changeCause: '' }) Object.assign(this.data, {
// .subscribe((res: any) => { totalFreight: res.totalFreight,
// if (res) { freight: res.freight,
// Object.assign(this.data, { surcharge: res.surcharge
// totalFreight: res.totalFreight, });
// freight: res.freight, }
// surcharge: res.surcharge });
// }); }
// }
// }); save(value: any): void {
if(!this.sf.valid){
this.sf.validator({ emitError: true });
return;
}
this.service.request(this.service.$api_change_bulk, { billId: this.data.billId, ...this.sf.value }).subscribe(res => {
if (res) {
this.service.msgSrv.success('变更运费成功');
this.modal.destroy(true);
}
});
}
close(): void {
this.modal.destroy();
} }
} }

View File

@ -2,7 +2,7 @@ import { Params } from '@angular/router';
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-12-14 14:03:07 * @Date: 2021-12-14 14:03:07
* @LastEditTime: 2022-01-04 09:37:50 * @LastEditTime: 2022-01-17 16:20:06
* @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
@ -12,6 +12,7 @@ import {SFComponent, SFNumberWidgetSchema, SFSchema, SFUISchema} from '@delon/fo
import { NzMessageService } from 'ng-zorro-antd/message'; import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef } from 'ng-zorro-antd/modal'; import { NzModalRef } from 'ng-zorro-antd/modal';
import { OrderManagementService } from '../../../services/order-management.service'; import { OrderManagementService } from '../../../services/order-management.service';
import { ShipperBaseService } from '@shared';
@Component({ @Component({
@ -28,7 +29,12 @@ export class VehicleFreightPeopleComponent implements OnInit {
data: any; data: any;
constructor(private modal: NzModalRef, private msgSrv: NzMessageService, public service: OrderManagementService, ) {} constructor(
private modal: NzModalRef,
private msgSrv: NzMessageService,
public service: OrderManagementService,
public shipperservice: ShipperBaseService,
) {}
ngOnInit(): void { ngOnInit(): void {
console.log(this.data) console.log(this.data)
@ -37,7 +43,7 @@ export class VehicleFreightPeopleComponent implements OnInit {
initSF() { initSF() {
this.schema = { this.schema = {
properties: { properties: {
enterpriseInfoName: { enterpriseInfoId: {
type: 'string', type: 'string',
title: '网络货运人', title: '网络货运人',
ui: { ui: {
@ -47,7 +53,7 @@ export class VehicleFreightPeopleComponent implements OnInit {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },
allowClear: true, allowClear: true,
asyncData: () => this.service.getNetworkFreightForwarderHistory(this.data), asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
}, },
}, },
}, },

View File

@ -37,7 +37,12 @@ export class SupplyManagementBulkComponent implements OnInit {
receivedQuantity: 0, receivedQuantity: 0,
stayQuantity: 0 stayQuantity: 0
}; };
constructor(public service: SupplyManagementService, private modal: NzModalService, private router: Router,public service2: ShipperBaseService) { } constructor(
public service: SupplyManagementService,
private modal: NzModalService,
private router: Router,
public shipperservice: ShipperBaseService
) { }
ngOnInit(): void { ngOnInit(): void {
this.initSF(); this.initSF();
@ -53,10 +58,33 @@ export class SupplyManagementBulkComponent implements OnInit {
if(this.resourceStatus) { if(this.resourceStatus) {
a.resourceStatus = this.resourceStatus a.resourceStatus = this.resourceStatus
} }
return { const params: any = Object.assign({}, this.sf?.value || {});
delete params._$expand;
return {
...a, ...a,
...this.sf?.value, ...params,
}; releaseTime: {
start: this.sf?.value?.releaseTime?.[0] || '',
end: this.sf?.value?.releaseTime?.[1] || '',
},
deadlineTime: {
start: this.sf?.value?.deadlineTime?.[0] || '',
end: this.sf?.value?.deadlineTime?.[1] || '',
},
};
// const a:any = {};
// if(this.resourceStatus) {
// a.resourceStatus = this.resourceStatus
// }
// return {
// ...a,
// ...this.sf?.value,
// createTime: {
// start: this.sf.value.createTime?.[0] || null,
// end: this.sf.value.createTime?.[1] || null,
// }
// };
} }
search() { search() {
this.st?.load(1); this.st?.load(1);
@ -108,7 +136,7 @@ export class SupplyManagementBulkComponent implements OnInit {
}, },
} as SFSelectWidgetSchema, } as SFSelectWidgetSchema,
}, },
createTime: { releaseTime: {
title: '发布时间', title: '发布时间',
type: 'string', type: 'string',
ui: { ui: {
@ -142,7 +170,7 @@ export class SupplyManagementBulkComponent implements OnInit {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },
allowClear: true, allowClear: true,
asyncData: () => this.service2.getNetworkFreightForwarder(), asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
}, },
}, },
shipperAppUserId: { shipperAppUserId: {

View File

@ -55,7 +55,7 @@ export class CloseAccountComponent implements OnInit {
constructor( constructor(
public service: SystemService, public service: SystemService,
private nzModalService: NzModalService, private nzModalService: NzModalService,
public service2: ShipperBaseService, public shipperservice: ShipperBaseService,
) {} ) {}
ngOnInit(): void { ngOnInit(): void {
@ -106,7 +106,7 @@ export class CloseAccountComponent implements OnInit {
ui: { ui: {
placeholder: '请选择', placeholder: '请选择',
widget: 'select', widget: 'select',
asyncData: () => this.service2.getNetworkFreightForwarder(), asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },
@ -144,7 +144,7 @@ export class CloseAccountComponent implements OnInit {
ui: { ui: {
placeholder: '请选择', placeholder: '请选择',
widget: 'select', widget: 'select',
asyncData: () => this.service2.getNetworkFreightForwarder(), asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
visibleIf: { visibleIf: {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },

View File

@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st'; import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { DynamicSettingModalComponent } from '@shared'; import { DynamicSettingModalComponent, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component'; import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
import { UsermanageService } from '../../../services/usercenter.service'; import { UsermanageService } from '../../../services/usercenter.service';
@ -22,7 +22,12 @@ export class FreightComponentsListComponent implements OnInit {
@ViewChild('promoterModal', { static: false }) @ViewChild('promoterModal', { static: false })
promoterModal!: any; promoterModal!: any;
promotersTelephone = ''; promotersTelephone = '';
constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {} constructor(
public service: UsermanageService,
private modal: NzModalService,
private router: Router,
private ar: ActivatedRoute,
public shipperservice: ShipperBaseService) {}
/** /**
* 查询参数 * 查询参数
@ -108,13 +113,26 @@ export class FreightComponentsListComponent implements OnInit {
showRequired: false showRequired: false
} }
}, },
// networkTransporter: {
// title: '网络货运人',
// type: 'string',
// ui: {
// placeholder: '请输入',
// showRequired: false
// }
// },
networkTransporter: { networkTransporter: {
title: '网络货运人',
type: 'string', type: 'string',
title: '网络货运人',
ui: { ui: {
placeholder: '请输入', widget: 'select',
showRequired: false placeholder: '请选择',
} visibleIf: {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
},
}, },
source: { source: {
type: 'string', type: 'string',

View File

@ -61,7 +61,7 @@ tabs = {
constructor( constructor(
public service: WaybillManagementServe, public service: WaybillManagementServe,
private modal: NzModalService, private modal: NzModalService,
public service2: ShipperBaseService) { } public shipperservice: ShipperBaseService) { }
/** /**
* 查询参数 * 查询参数
@ -224,13 +224,13 @@ tabs = {
}, },
} as SFDateWidgetSchema, } as SFDateWidgetSchema,
}, },
isRiskSheet: { riskStatus: {
type: 'string', type: 'string',
title: '是否风险单', title: '是否风险单',
enum: [ enum: [
{ label: '全部', value: '' }, { label: '全部', value: '' },
{ label: '是', value: '1' }, { label: '是', value: '3' },
{ label: '否', value: '2' } { label: '否', value: '1' }
], ],
ui: { ui: {
widget: 'select', widget: 'select',
@ -250,7 +250,7 @@ tabs = {
_$expand: (value: boolean) => value, _$expand: (value: boolean) => value,
}, },
allowClear: true, allowClear: true,
asyncData: () => this.service2.getNetworkFreightForwarder(), asyncData: () => this.shipperservice.getNetworkFreightForwarder(),
}, },
}, },
settlementBasis: { settlementBasis: {
@ -276,7 +276,7 @@ tabs = {
_$expand: (value: boolean) => value _$expand: (value: boolean) => value
}, },
asyncData: () => asyncData: () =>
this.service2.loadConfigByKey('goods.name.config.type').pipe( this.shipperservice.loadConfigByKey('goods.name.config.type').pipe(
map((data: any) => { map((data: any) => {
return data[0].children?.map((m: any) => { return data[0].children?.map((m: any) => {
return { label: m.name, value: m.id }; return { label: m.name, value: m.id };

View File

@ -58,7 +58,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
constructor( constructor(
public service: WaybillManagementServe, public service: WaybillManagementServe,
private modal: NzModalService, private modal: NzModalService,
public service2: ShipperBaseService) {} public shipperservice: ShipperBaseService) {}
/** /**
* 查询参数 * 查询参数
@ -233,13 +233,13 @@ export class WaybillManagementVehicleComponent implements OnInit {
} }
} as SFDateWidgetSchema } as SFDateWidgetSchema
}, },
isRiskSheet: { riskStatus: {
type: 'string', type: 'string',
title: '是否风险单', title: '是否风险单',
enum: [ enum: [
{ label: '全部', value: '' }, { label: '全部', value: '' },
{ label: '是', value: '1' }, { label: '是', value: '3' },
{ label: '否', value: '2' } { label: '否', value: '1' }
], ],
ui: { ui: {
widget: 'select', widget: 'select',
@ -259,7 +259,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
_$expand: (value: boolean) => value _$expand: (value: boolean) => value
}, },
allowClear: true, allowClear: true,
asyncData: () => this.service2.getNetworkFreightForwarder() asyncData: () => this.shipperservice.getNetworkFreightForwarder()
} }
}, },
// goodsName: { // goodsName: {
@ -283,7 +283,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
_$expand: (value: boolean) => value _$expand: (value: boolean) => value
}, },
asyncData: () => asyncData: () =>
this.service2.loadConfigByKey('goods.name.config.type').pipe( this.shipperservice.loadConfigByKey('goods.name.config.type').pipe(
map((data: any) => { map((data: any) => {
return data[0].children?.map((m: any) => { return data[0].children?.map((m: any) => {
return { label: m.name, value: m.id }; return { label: m.name, value: m.id };

View File

@ -2,7 +2,7 @@ import { WaybillManagementBulkComponent } from './../components/bulk/bulk.compon
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-12-07 14:52:29 * @Date: 2021-12-07 14:52:29
* @LastEditTime: 2022-01-12 14:34:04 * @LastEditTime: 2022-01-17 15:06:56
* @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\waybill-management\services\waybill-management.service.ts * @FilePath: \tms-obc-web\src\app\routes\waybill-management\services\waybill-management.service.ts
@ -52,8 +52,10 @@ export class WaybillManagementServe extends BaseService {
// 查询CRM客户信息表 // 查询CRM客户信息表
$api_get_crmCustomer_page = '/api/mdc/cuc/crmCustomer/list/page'; $api_get_crmCustomer_page = '/api/mdc/cuc/crmCustomer/list/page';
// 查询运营端异常上报 // 查询运营端未回复异常上报
$api_get_listOperatePage = '/api/sdc/exceptionReport/listOperateUnReplyPage'; $api_get_listOperatePage = '/api/sdc/exceptionReport/listOperateUnReplyPage';
// 查询运营端已回复异常上报
$api_get_listOperateReplyPage = '/api/sdc/exceptionReport/listOperateReplyPage';
// 获取货主企业列表 // 获取货主企业列表
public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList'; public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';