Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 11:10:14
|
||||
* @LastEditTime: 2021-12-24 13:26:16
|
||||
* @LastEditTime: 2021-12-24 15:36:09
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @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
|
||||
@ -42,7 +42,7 @@
|
||||
[nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-tab [nzTitle]="'全部'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待申诉('+tabs?.stayQuantity+')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'申诉中('+tabs?.stayQuantity+')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'申诉中('+tabs?.underwayQuantity+')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'申诉成功('+tabs?.receivedQuantity+')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'申诉失败('+tabs?.cancelQuantity+')'"></nz-tab>
|
||||
</nz-tabset>
|
||||
|
||||
@ -29,7 +29,7 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
@ViewChild('sfView', { static: false }) sfView!: SFComponent;
|
||||
columns: STColumn[] = [];
|
||||
tabs = {
|
||||
totalQuantity: 0,
|
||||
underwayQuantity: 0,
|
||||
cancelQuantity: 0,
|
||||
receivedQuantity: 0,
|
||||
stayQuantity: 0
|
||||
@ -66,12 +66,14 @@ export class OrderManagementRiskComponent implements OnInit {
|
||||
this.service.request(this.service.$api_get_listStatisticalStatus, {}).subscribe(res => {
|
||||
if (res) {
|
||||
res.forEach((element: any) => {
|
||||
if(element.statusLabel === '待发车') {
|
||||
if(element.representationsStatusLabel === '待申述') {
|
||||
this.tabs.stayQuantity = element.quantity
|
||||
} else if (element.statusLabel === '待接单') {
|
||||
} else if (element.representationsStatusLabel === '申诉失败') {
|
||||
this.tabs.receivedQuantity = element.quantity
|
||||
} else if (element.statusLabel === '待签收') {
|
||||
} else if (element.representationsStatusLabel === '申述成功') {
|
||||
this.tabs.cancelQuantity = element.quantity
|
||||
} else if (element.representationsStatusLabel === '申诉中') {
|
||||
this.tabs.underwayQuantity = element.quantity
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 15:31:52
|
||||
* @LastEditTime: 2021-12-24 15:12:35
|
||||
* @LastEditTime: 2021-12-24 16:42:46
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @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.html
|
||||
@ -117,9 +117,6 @@
|
||||
<span style="padding: 0 10px"
|
||||
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="openMap('start', idx)"></i
|
||||
></span>
|
||||
<!-- <span
|
||||
><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subStartInfo($event, idx, data.id)"></i
|
||||
></span> -->
|
||||
</div>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
@ -133,10 +130,6 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<!-- <button nz-button nzType="primary" (click)="addStartInfo($event)">
|
||||
<i nz-icon nzType="plus"></i>
|
||||
添加装货地
|
||||
</button> -->
|
||||
</div>
|
||||
<div nz-col [nzSpan]="8">
|
||||
<div style="display: flex; justify-content: center">
|
||||
@ -159,9 +152,6 @@
|
||||
/>
|
||||
</nz-input-group>
|
||||
<span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff"></i></span>
|
||||
<!-- <span
|
||||
><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i
|
||||
></span> -->
|
||||
</div>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
@ -175,30 +165,14 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<!-- <button nz-button nzType="primary" (click)="addEndInfo($event)">
|
||||
<i nz-icon nzType="plus"></i>
|
||||
添加卸货地
|
||||
</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div nz-row [nzGutter]="24" style="margin-top: 24px">
|
||||
<div nz-col [nzSpan]="9">
|
||||
<!-- <nz-form-item>
|
||||
<nz-form-label [nzSpan]="4" nzRequired>装货时间</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入装货时间'">
|
||||
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="loadingTime" [(ngModel)]="loadingTime"></nz-date-picker>
|
||||
</nz-form-control>
|
||||
</nz-form-item> -->
|
||||
<p class="time-info">计划装货时间:{{i?.goodsResource?.[0]?.loadingTime}}</p>
|
||||
<p class="time-info">计划装货时间:{{i?.loadPlanTime}}</p>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="8">
|
||||
<!-- <nz-form-item>
|
||||
<nz-form-label [nzSpan]="9" nzRequired>卸货时间</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入卸货时间'">
|
||||
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="unloadingTime" [(ngModel)]="unloadingTime"></nz-date-picker>
|
||||
</nz-form-control>
|
||||
</nz-form-item> -->
|
||||
<p class="time-info">计划卸货时间:{{i?.goodsResource?.[0]?.unloadingTime}}</p>
|
||||
<p class="time-info">计划卸货时间:{{i?.unloadPlanTime}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<ng-template #endInconTemp1><i nz-icon nzType="global"></i></ng-template>
|
||||
@ -284,11 +258,11 @@
|
||||
{{i?.goodsInfoList?.[0]?.weight}}顿,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件
|
||||
</ng-template>
|
||||
|
||||
<ng-template sf-template="loadingTime" let-item let-ui="ui">
|
||||
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="loadingTime"></nz-date-picker>
|
||||
<ng-template sf-template="loadTime" let-item let-ui="ui">
|
||||
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="loadTime"></nz-date-picker>
|
||||
</ng-template>
|
||||
<ng-template sf-template="unloadingTime" let-item let-ui="ui">
|
||||
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="unloadingTime"></nz-date-picker>
|
||||
<ng-template sf-template="unloadTime" let-item let-ui="ui">
|
||||
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="unloadTime"></nz-date-picker>
|
||||
</ng-template>
|
||||
|
||||
</sf>
|
||||
@ -299,12 +273,12 @@
|
||||
|
||||
|
||||
<nz-card nzTitle="运费信息" id="distannce3">
|
||||
<st #st [data]="i?.billExpenseDetails" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
<st #st [data]="dirvingMessage" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
<ng-template st-row="price" let-item let-index="index">
|
||||
<input nz-input [ngModel]="item?.price" (ngModelChange)="st.setRow(index, { name: $event })" />
|
||||
<input nz-input [ngModel]="item?.price" (ngModelChange)="st.setRow(index, { price: $event })" />
|
||||
</ng-template>
|
||||
<ng-template st-row="paymentMethodRate" let-item let-index="index">
|
||||
<input nz-input [ngModel]="item?.paymentMethodRate" (ngModelChange)="st.setRow(index, { name: $event })" />
|
||||
<input nz-input [ngModel]="item?.paymentMethodRate" (ngModelChange)="st.setRow(index, { paymentMethodRate: $event })" />
|
||||
</ng-template>
|
||||
</st>
|
||||
<div style="margin-top: 15px;">总计:{{i?.total | currency: '¥'}}(运费¥3500.00,附加运费¥191.98,附加费率3.5%)</div>
|
||||
|
||||
@ -80,5 +80,7 @@
|
||||
width : 300px;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.ant-col-10 {
|
||||
flex: none;
|
||||
}
|
||||
}
|
||||
@ -2,14 +2,14 @@ import { ViewChild } from '@angular/core';
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 15:31:52
|
||||
* @LastEditTime: 2021-12-24 14:59:33
|
||||
* @LastEditTime: 2021-12-24 16:50:42
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @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
|
||||
*/
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form';
|
||||
import { _HttpClient } from '@delon/theme';
|
||||
@ -43,13 +43,14 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
totalTime = 0.0; //路程总时间
|
||||
startInfo: any = []; // 装货信息
|
||||
endInfo: any = []; // 卸货信息
|
||||
unloadingTime: any; // 货源单设置回显
|
||||
loadingTime: any; // 货源单设置回显
|
||||
unloadTime: any; // 货源单设置回显
|
||||
loadTime: any; // 货源单设置回显
|
||||
sf3data: any; // 货源单设置回显
|
||||
sf4data: any; // 货源单设置回显
|
||||
dirverPhone: any; // 货源单设置回显
|
||||
dirverBankCard: any; // 货源单设置回显
|
||||
listImagUrls: any[] = []; // 货源单设置回显
|
||||
dirvingMessage = [];
|
||||
imges: any;
|
||||
previewImage1 = '';
|
||||
previewVisible1 = false;
|
||||
@ -67,6 +68,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
ui: SFUISchema = {};
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private msgSrv: NzMessageService,
|
||||
public service: OrderManagementService,
|
||||
private modalService: NzModalService,
|
||||
@ -76,8 +78,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
private envSrv: EAEnvironmentService,
|
||||
) {
|
||||
this.validateForm1 = fb.group({
|
||||
loadingTime: [null, []],
|
||||
unloadingTime: [null, []],
|
||||
loadTime: [null, []],
|
||||
unloadTime: [null, []],
|
||||
});
|
||||
}
|
||||
|
||||
@ -299,7 +301,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
})
|
||||
});
|
||||
this.listImagUrls = arr;
|
||||
|
||||
this.sf4data = res?.goodsInfoList?.[0]
|
||||
// 对装卸货信息进行初始化
|
||||
res?.unLoadingPlaceList.forEach((element: any) => {
|
||||
if(element.type === 1 || element.type === '1') {
|
||||
@ -388,8 +390,10 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
// 发车时间到车时间初始化
|
||||
this.loadingTime = res.loadingTime
|
||||
this.loadingTime = res.unloadTime
|
||||
this.loadTime = res.loadTime
|
||||
this.unloadTime = res.unloadTime
|
||||
this.dirvingMessage = res.billExpenseDetails;
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -411,39 +415,35 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
}
|
||||
if(typeof(this.unloadingTime) !== 'string' ){
|
||||
var c = new Date(this.unloadingTime);
|
||||
this.unloadingTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds())
|
||||
if(typeof(this.unloadTime) !== 'string' ){
|
||||
var c = new Date(this.unloadTime);
|
||||
this.unloadTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds())
|
||||
}
|
||||
if(typeof(this.loadingTime) !== 'string' ) {
|
||||
var c = new Date(this.loadingTime);
|
||||
this.loadingTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds())
|
||||
if(typeof(this.loadTime) !== 'string' ) {
|
||||
var c = new Date(this.loadTime);
|
||||
this.loadTime = c.getFullYear() + '-' + this.addPreZero(c.getMonth() + 1) + '-' + this.addPreZero(c.getDate()) + ' ' + this.addPreZero(c.getHours()) + ':' + this.addPreZero(c.getMinutes()) + ':' + this.addPreZero(c.getSeconds())
|
||||
}
|
||||
console.log(this.sf3.value)
|
||||
console.log(this.sf4.value)
|
||||
console.log(this.sf.value)
|
||||
console.log('dirvingMessage=>>>>>>'+ this.dirvingMessage)
|
||||
console.log( this.dirvingMessage)
|
||||
console.log( this.st._data)
|
||||
const params = {
|
||||
id: this.id,
|
||||
unLoadingPlaceList: [...this.startInfo, ...this.endInfo,],
|
||||
goodsResource: [{
|
||||
id: this.i?.goodsResource?.id,
|
||||
enterpriseInfoId: this.sf3.value?.enterpriseInfoId,
|
||||
}],
|
||||
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo,],
|
||||
receiptFilePath: imgList,
|
||||
goodsInfoList: [{
|
||||
goodsInfoDTOList: [{
|
||||
id: this.i?.goodsInfoList?.[0].id,
|
||||
goodsName: this.sf3.value?.goodsName,
|
||||
...this.sf4.value
|
||||
}],
|
||||
// 运费信息
|
||||
expenseList: this.i?.billExpenseDetails,
|
||||
billExpenseDetailDTOList: this.st._data,
|
||||
// 收款人
|
||||
payeeId: this.dirverPhone,
|
||||
dirverBankCard: this.dirverBankCard, // 银行卡
|
||||
// 发车时间
|
||||
loadPlanTime: this.loadingTime,
|
||||
loadTime: this.loadTime,
|
||||
// 到车时间
|
||||
unloadPlanTime: this.loadingTime,
|
||||
unloadTime: this.unloadTime,
|
||||
loadingLadingBillFilePath: this.sf.value?.loadingLadingBillFilePath?.data ? this.sf.value?.loadingLadingBillFilePath.data.fullFilePath : this.sf.value?.loadingLadingBillFilePath?.url,
|
||||
|
||||
loadingPeopleVehiclesGoodsFilePath: this.sf.value?.loadingPeopleVehiclesGoodsFilePath?.data ? this.sf.value?.loadingPeopleVehiclesGoodsFilePath.data.fullFilePath : this.sf.value?.loadingPeopleVehiclesGoodsFilePath?.url,
|
||||
@ -455,6 +455,12 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
console.log(params)
|
||||
this.service.request(this.service.$api_set_modifyWholeOrder, params).subscribe((res: any) => {
|
||||
console.log(res)
|
||||
if(res) {
|
||||
this.service.msgSrv.success('修改成功!');
|
||||
this.router.navigate(['/order-management/vehicle']);
|
||||
} else {
|
||||
this.service.msgSrv.error(res?.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
addPreZero(num: any){
|
||||
@ -465,68 +471,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
// -------------------装卸货信息处理
|
||||
addStartInfo(event: any) {
|
||||
if (this.startInfo.length < 5) {
|
||||
const controlId = this.startInfo.length;
|
||||
this.startInfo.push({
|
||||
detailedAddress: '',
|
||||
appUserName: '',
|
||||
contractTelephone: '',
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
province: '',
|
||||
city: '',
|
||||
area: '',
|
||||
type: 1
|
||||
});
|
||||
this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||
}
|
||||
}
|
||||
subStartInfo(event: any, index: number, id?:any) {
|
||||
console.log(event, index, id)
|
||||
if(id) {
|
||||
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe((res) => {
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
this.startInfo.splice(index, 1);
|
||||
this.validateForm1.removeControl(`loadAddress${index}`);
|
||||
this.validateForm1.removeControl(`loadName${index}`);
|
||||
this.validateForm1.removeControl(`loadPhone${index}`);
|
||||
}
|
||||
subEndInfo(event: any, index: number, id?:any) {
|
||||
if(id) {
|
||||
this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe((res) => {
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
console.log(event, index, id)
|
||||
this.endInfo.splice(index, 1);
|
||||
this.validateForm1.removeControl(`unloadAddress${index}`);
|
||||
this.validateForm1.removeControl(`unloadName${index}`);
|
||||
this.validateForm1.removeControl(`unloadPhone${index}`);
|
||||
}
|
||||
addEndInfo(event: any) {
|
||||
if (this.addEndInfo.length < 5) {
|
||||
const controlId = this.endInfo.length;
|
||||
this.endInfo.push({
|
||||
detailedAddress: '',
|
||||
appUserName: '',
|
||||
contractTelephone: '',
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
province: '',
|
||||
city: '',
|
||||
area: '',
|
||||
type: 2
|
||||
});
|
||||
this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||
}
|
||||
}
|
||||
// 打开地图
|
||||
openMap(type: string, index: number) {
|
||||
const modalRef = this.modalService.create({
|
||||
@ -572,18 +516,18 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
initSF3() {
|
||||
this.schema3 = {
|
||||
properties: {
|
||||
enterpriseInfoId: {
|
||||
title: '网络货运人',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请选择',
|
||||
widget: 'select',
|
||||
asyncData: () => this.service2.getNetworkFreightForwarder(),
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
}
|
||||
},
|
||||
// enterpriseInfoId: {
|
||||
// title: '网络货运人',
|
||||
// type: 'string',
|
||||
// ui: {
|
||||
// placeholder: '请选择',
|
||||
// widget: 'select',
|
||||
// asyncData: () => this.service2.getNetworkFreightForwarder(),
|
||||
// visibleIf: {
|
||||
// _$expand: (value: boolean) => value,
|
||||
// },
|
||||
// }
|
||||
// },
|
||||
goodsName: {
|
||||
type: 'string',
|
||||
title: '货物名称',
|
||||
@ -603,16 +547,13 @@ initSF3() {
|
||||
}
|
||||
}
|
||||
},
|
||||
required: ['goodsName', 'enterpriseInfoId']
|
||||
required: ['goodsName',]
|
||||
};
|
||||
this.ui3 = {
|
||||
'*': {
|
||||
spanLabelFixed: 110,
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$enterpriseInfoId: {
|
||||
grid: { span: 16, }
|
||||
},
|
||||
$goodsName: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
@ -696,7 +637,7 @@ initSF4() {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
loadingTime: {
|
||||
loadTime: {
|
||||
type: 'string',
|
||||
title: '发车时间',
|
||||
ui: {
|
||||
@ -704,7 +645,7 @@ initSF4() {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
unloadingTime: {
|
||||
unloadTime: {
|
||||
type: 'string',
|
||||
title: '到车时间',
|
||||
ui: {
|
||||
@ -714,7 +655,7 @@ initSF4() {
|
||||
},
|
||||
|
||||
},
|
||||
required: ['weight','loadingTime','unloadingTime']
|
||||
required: ['weight','loadTime','unloadTime']
|
||||
};
|
||||
this.ui4 = {
|
||||
'*': {
|
||||
@ -739,10 +680,10 @@ initSF4() {
|
||||
$drivers: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$loadingTime: {
|
||||
$loadTime: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$unloadingTime: {
|
||||
$unloadTime: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
};
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-24 15:38:08
|
||||
* @LastEditTime: 2021-12-24 15:53:02
|
||||
* @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\components\crm-management\crm-management.component.html
|
||||
-->
|
||||
<page-header-wrapper title="CRM客户管理">
|
||||
</page-header-wrapper>
|
||||
|
||||
<nz-card class="search-box">
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzSpan]="6">
|
||||
<sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 24 } }}" [compact]="true"
|
||||
[button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="8" nzOffset="1">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box">
|
||||
|
||||
<div class="d-flex justify-content-end mb-sm">
|
||||
<div>
|
||||
<button nz-button nzType="primary" (click)="roleAction()" >新建角色</button>
|
||||
</div>
|
||||
</div>
|
||||
<st #st [data]="url" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[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>
|
||||
</nz-card>
|
||||
@ -0,0 +1,13 @@
|
||||
:host::ng-deep{
|
||||
.search-box{
|
||||
.ant-card-body{
|
||||
padding-bottom: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.content-box{
|
||||
.ant-card-body{
|
||||
padding-top: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema } from '@delon/form';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SystemService } from '../../services/system.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-crm-management',
|
||||
templateUrl: './crm-management.component.html',
|
||||
styleUrls: ['./crm-management.component.less']
|
||||
})
|
||||
export class CrmManagementComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
st!: STComponent;
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
|
||||
url = `/rule?_allow_anonymous=true`;
|
||||
|
||||
searchSchema: SFSchema = {
|
||||
properties: {
|
||||
receiveName: {
|
||||
type: 'string',
|
||||
title: '角色名称',
|
||||
ui: { placeholder: '请输入' }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '角色名称', index: 'no' },
|
||||
{ title: '角色描述', index: 'description' },
|
||||
{ title: '创建人手机号', index: 'description' },
|
||||
{
|
||||
title: '创建时间',
|
||||
index: 'updatedAt',
|
||||
type: 'date'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
buttons: [
|
||||
{
|
||||
text: '编辑',
|
||||
click: item => this.roleAction(item)
|
||||
},
|
||||
{
|
||||
text: '删除',
|
||||
click: item => this.deleteAction(item)
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
selectedRows: any[] = [];
|
||||
|
||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
||||
|
||||
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
stChange(e: STChange): void {
|
||||
switch (e.type) {
|
||||
case 'checkbox':
|
||||
this.selectedRows = e.checkbox!;
|
||||
break;
|
||||
case 'filter':
|
||||
this.st.load();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
roleAction(item?: any) {
|
||||
const modal = this.nzModalService.create({
|
||||
// nzContent: SettingRoleEditComponent,
|
||||
nzWidth: 900,
|
||||
nzComponentParams: item ? { i: { ...item } } : { i: { id: 0 } },
|
||||
nzFooter: null
|
||||
});
|
||||
modal.afterClose.subscribe(res => {
|
||||
this.st.load();
|
||||
});
|
||||
}
|
||||
|
||||
deleteAction(item?: any) {
|
||||
this.nzModalService.error({
|
||||
nzTitle: '确认删除?',
|
||||
nzClosable: false,
|
||||
nzCancelText: '取消',
|
||||
nzOnOk: () => {}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-24 15:38:08
|
||||
* @LastEditTime: 2021-12-24 15:58:48
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @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
|
||||
-->
|
||||
<page-header-wrapper title="网络货运人">
|
||||
</page-header-wrapper>
|
||||
|
||||
<nz-card class="search-box">
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzSpan]="6">
|
||||
<sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 90,grid: { span: 24 } }}" [compact]="true"
|
||||
[button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="8" nzOffset="1">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card class="content-box">
|
||||
|
||||
<div class="d-flex justify-content-end mb-sm">
|
||||
<div>
|
||||
<button nz-button nzType="primary" (click)="roleAction()" >新建角色</button>
|
||||
</div>
|
||||
</div>
|
||||
<st #st [data]="url" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[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>
|
||||
</nz-card>
|
||||
@ -0,0 +1,13 @@
|
||||
:host::ng-deep{
|
||||
.search-box{
|
||||
.ant-card-body{
|
||||
padding-bottom: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.content-box{
|
||||
.ant-card-body{
|
||||
padding-top: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema } from '@delon/form';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SystemService } from '../../services/system.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-network-freight-component',
|
||||
templateUrl: './network-freight.component.html',
|
||||
styleUrls: ['./network-freight.component.less']
|
||||
})
|
||||
export class NetworkFreightComponent implements OnInit {
|
||||
@ViewChild('st', { static: true })
|
||||
st!: STComponent;
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
|
||||
url = `/rule?_allow_anonymous=true`;
|
||||
|
||||
searchSchema: SFSchema = {
|
||||
properties: {
|
||||
receiveName: {
|
||||
type: 'string',
|
||||
title: '角色名称',
|
||||
ui: { placeholder: '请输入' }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '角色名称', index: 'no' },
|
||||
{ title: '角色描述', index: 'description' },
|
||||
{ title: '创建人手机号', index: 'description' },
|
||||
{
|
||||
title: '创建时间',
|
||||
index: 'updatedAt',
|
||||
type: 'date'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
buttons: [
|
||||
{
|
||||
text: '编辑',
|
||||
click: item => this.roleAction(item)
|
||||
},
|
||||
{
|
||||
text: '删除',
|
||||
click: item => this.deleteAction(item)
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
selectedRows: any[] = [];
|
||||
|
||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
||||
|
||||
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
stChange(e: STChange): void {
|
||||
switch (e.type) {
|
||||
case 'checkbox':
|
||||
this.selectedRows = e.checkbox!;
|
||||
break;
|
||||
case 'filter':
|
||||
this.st.load();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
roleAction(item?: any) {
|
||||
const modal = this.nzModalService.create({
|
||||
// nzContent: SettingRoleEditComponent,
|
||||
nzWidth: 900,
|
||||
nzComponentParams: item ? { i: { ...item } } : { i: { id: 0 } },
|
||||
nzFooter: null
|
||||
});
|
||||
modal.afterClose.subscribe(res => {
|
||||
this.st.load();
|
||||
});
|
||||
}
|
||||
|
||||
deleteAction(item?: any) {
|
||||
this.nzModalService.error({
|
||||
nzTitle: '确认删除?',
|
||||
nzClosable: false,
|
||||
nzCancelText: '取消',
|
||||
nzOnOk: () => {}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
}
|
||||
}
|
||||
@ -1,3 +1,11 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-03 15:23:05
|
||||
* @LastEditTime: 2021-12-24 15:57:37
|
||||
* @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\sys-setting-routing.module.ts
|
||||
*/
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { AgreementConfigComponentsBaseComponent } from './components/agreement-config/agreement-config.component';
|
||||
@ -5,7 +13,9 @@ import { AuditReasonConfigComponent } from './components/audit-reason-config/aud
|
||||
import { BasicConfigComponent } from './components/basic-config/basic-config.component';
|
||||
import { BasicSettingComponent } from './components/basic-setting/basic-setting.component';
|
||||
import { CartConfigComponent } from './components/cart-config/cart-config.component';
|
||||
import { CrmManagementComponent } from './components/crm-management/crm-management.component';
|
||||
import { GoodsNameConfigComponent } from './components/goods-name-config/goods-name-config.component';
|
||||
import { NetworkFreightComponent } from './components/network-freight/network-freight.component';
|
||||
import { RoleManagementComponent } from './components/role-management/role-management.component';
|
||||
import { StaffManagementComponent } from './components/staff-management/staff-management.component';
|
||||
import { SystemConfigComponent } from './components/system-config/system-config.component';
|
||||
@ -26,6 +36,8 @@ const routes: Routes = [
|
||||
{ path: 'agreement-config', component: AgreementConfigComponentsBaseComponent },
|
||||
{ path: 'system-config', component: SystemConfigComponent },
|
||||
{ path: 'goods-name-config', component: GoodsNameConfigComponent },
|
||||
{ path: 'crm-management', component: CrmManagementComponent },
|
||||
{ path: 'network-freight', component: NetworkFreightComponent },
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
||||
@ -21,6 +21,8 @@ import { SystemConfigComponent } from './components/system-config/system-config.
|
||||
import { SettingRoleEditComponent } from './components/role-management/edit/edit.component';
|
||||
import { SettingMenuComponent } from './components/role-management/menu/menu.component';
|
||||
import { GoodsNameConfigComponent } from './components/goods-name-config/goods-name-config.component';
|
||||
import { CrmManagementComponent } from './components/crm-management/crm-management.component';
|
||||
import { NetworkFreightComponent } from './components/network-freight/network-freight.component';
|
||||
|
||||
const COMPONENTS = [
|
||||
StaffManagementComponent,
|
||||
@ -34,7 +36,9 @@ const COMPONENTS = [
|
||||
AgreementConfigComponentsBaseComponent,
|
||||
BasicSettingComponent,
|
||||
SystemConfigComponent,
|
||||
GoodsNameConfigComponent
|
||||
GoodsNameConfigComponent,
|
||||
CrmManagementComponent,
|
||||
NetworkFreightComponent
|
||||
];
|
||||
const NOTROUTECOMPONENTS = [
|
||||
BuyerTranspowerComponent,
|
||||
|
||||
@ -385,6 +385,14 @@
|
||||
"text": "员工管理",
|
||||
"link": "/system/staff-management"
|
||||
},
|
||||
{
|
||||
"text": "CRM客户管理",
|
||||
"link": "/system/crm-management"
|
||||
},
|
||||
{
|
||||
"text": "网络货运人",
|
||||
"link": "/system/network-freight"
|
||||
},
|
||||
{
|
||||
"text": "角色管理",
|
||||
"link": "/system/role-management"
|
||||
|
||||
Reference in New Issue
Block a user