车辆对接

This commit is contained in:
wangshiming
2022-01-05 20:15:37 +08:00
parent c7f9874e43
commit cd0035940a
43 changed files with 906 additions and 642 deletions

View File

@ -206,8 +206,8 @@
</nz-card>
<nz-card>
<div class="align-center">
<button nz-button nzType="primary" (click)="chooseFamifiar()">生成二维码</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="chooseFamifiar()">指派熟车</button>
<!-- <button nz-button nzType="primary" (click)="chooseFamifiar()">生成二维码</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="chooseFamifiar()">指派熟车</button> -->
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submit()">司机抢单</button>
</div>
</nz-card>

View File

@ -36,6 +36,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
totalFees: any; // 总数信息
totalDistance = 0.0; //总里程
totalTime = 0.0; //路程总时间
currentGoodsTypeName: any;
enterpriseProjectIds: any;
id = this.route.snapshot.params.id;
// // 单位
@ -46,7 +47,15 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
endInfo: any = [];
PageStatus = '';
dataList: any;
constructor(private http: _HttpClient, fb: FormBuilder, private router: Router, private route: ActivatedRoute, private modalService: NzModalService, public service: SupplyManagementService, private amapService: AmapService, public service2: ShipperBaseService,) {
constructor(
private http: _HttpClient,
fb: FormBuilder,
private router: Router,
private route: ActivatedRoute,
private modalService: NzModalService,
public service: SupplyManagementService,
private amapService: AmapService,
public shipperSrv: ShipperBaseService,) {
this.validateForm1 = fb.group({
createTime: [null, []],
modifyTime: [null, []],
@ -155,23 +164,12 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
dispatchId: {
type: 'string',
title: '调度员',
enum: [
{ label: '调度员1', value: '1' },
{ label: '调度员2', value: '2' }
],
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true
// asyncData: () =>
// this.service.loadChildData2('0', '2').pipe(
// map((data: any) => {
// return data.map((m: any) => {
// return { label: m.name, value: m.id };
// });
// }),
// ),
// change: (i) => this.updateCategory(i, '/categoryId2'),
allowClear: true,
optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您',
asyncData: () => this.shipperSrv.getStaffList2()
} as SFSelectWidgetSchema
}
},
@ -231,37 +229,76 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
initSF3() {
this.schema3 = {
properties: {
goodsName: {
goodsTypeId: {
type: 'string',
title: '货物名称',
ui: {
widget: 'dict-select',
params: { dictKey: 'GoodsName' },
placeholder: '请选择'
}
widget: 'select',
placeholder: '请选择',
errors: { required: '请选择货物类型' },
asyncData: () =>
this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe(
map((data: any) => {
return data[0].children?.map((m: any) => {
return { label: m.name, value: m.id };
});
})
),
change: (value, data: any) => {
this.changeGoodsType(value, data);
this.sf3.setValue('/goodsTypeName', data.label);
}
} as SFSelectWidgetSchema
},
qita: {
goodsTypeName: {
type: 'string',
title: '',
ui: {
hidden: true
}
},
goodsNameId: {
type: 'string',
title: '',
ui: {
widget: 'select',
placeholder: '请选择',
errors: { required: '请填写货物名称' },
change: (value: any, data: any) => {
this.sf3.setValue('/goodsName', data.label);
},
visibleIf: {
goodsName: value => value === '3'
goodsTypeName: (value: any) => value && value !== '其它'
}
}
},
goodsName: {
type: 'string',
title: '',
ui: {
hidden: true,
visibleIf: {
goodsTypeName: (value: any) => value && value !== '其它'
}
}
},
goodsName1: {
type: 'string',
title: '',
ui: {
errors: { required: '请填写货物名称' },
visibleIf: {
goodsTypeName: (value: any) => value && value === '其它'
}
}
}
},
required: ['goodsName', ]
required: ['goodsTypeId', 'goodsName', 'goodsNameId']
};
this.ui3 = {
'*': {
spanLabelFixed: 90,
grid: { span: 12 }
},
$goodsName: {
grid: { span: 12 }
},
$qita: {
grid: { span: 12 }
}
};
}
@ -550,6 +587,35 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
}
});
}
changeGoodsType(value: string, data: any) {
if (data.label === '其它') return;
const params = {
pageIndex: 1,
pageSize: 100,
configId: value
};
this.service
.request(this.service.$api_get_config_item_page, params)
.pipe(
map(data => {
return data.records?.map((m: any) => {
return { label: m.name, value: m.id };
});
})
)
.subscribe(res => {
if (res) {
this.sf3.getProperty('/goodsNameId')!.schema.enum = res;
this.sf3.getProperty('/goodsNameId')!.widget.reset(res);
if(this.sf3data.goodsNameId){
this.sf3.setValue('/goodsNameId',this.sf3data.goodsNameId);
}
} else {
this.service.msgSrv.error(res.msg);
}
});
}
// 打开地图
openMap(type: string, index: number) {
const modalRef = this.modalService.create({
@ -704,8 +770,16 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
}
});
this.sf3data = {
goodsTypeId: res?.goodsInfoVOList[0]?.goodsTypeId || '',
goodsTypeName: res?.goodsInfoVOList[0]?.goodsTypeName || '',
goodsNameId: res?.goodsInfoVOList[0]?.goodsNameId || '',
goodsName: res?.goodsInfoVOList[0]?.goodsName || '',
};
if (this.sf3data.goodsTypeName === '其它') {
this.sf3data.goodsName1 = res?.goodsInfoVOList[0]?.goodsName || '';
}
this.changeGoodsType(this.sf3data.goodsTypeId, { label: this.sf3data.goodsTypeName, value: this.sf3data.goodsTypeId });
this.sf4data = {
freightPrice: res?.goodsInfoVOList[0]?.freightPrice || '',
freightType: res?.goodsInfoVOList[0]?.freightType || '',

View File

@ -1,4 +1,10 @@
<page-header-wrapper [title]="''"></page-header-wrapper>
<page-header-wrapper [title]="'大宗代发货源'" [logo]="logo">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
</page-header-wrapper>
<nz-card>
<div class="card-title">货源单设置</div>
<div nz-row>
@ -206,10 +212,11 @@
<sf #sf6 [schema]="schema6" [button]="'none'" [ui]="ui6" [formData]="sf6data">
<ng-template sf-template="paymentDays" let-i let-ui="ui">
<div nz-row>
<div class="align-center">
<div nz-col nzSpan="16">
<div class="align-center" style="width: 500px;">
<div nz-col nzSpan="12">
<nz-input-number
[ngModel]="i.value"
[nzMin]="1"
[nzMax]="30"
[nzStep]="1"
@ -217,7 +224,7 @@
nzPlaceHolder="请输入1-30"
></nz-input-number>
</div>
<div nz-col nzSpan="8">
<div nz-col nzSpan="6">
<span>天内支付运费</span>
</div>
</div>

View File

@ -12,6 +12,7 @@ import {
SFUISchema
} from '@delon/form';
import { SettingsService, _HttpClient } from '@delon/theme';
import { ShipperBaseService } from '@shared';
import format from 'date-fns/format';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
@ -64,7 +65,8 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
private service: SupplyManagementService,
private router: Router,
private route: ActivatedRoute,
private amapService: AmapService
private amapService: AmapService,
public shipperSrv: ShipperBaseService
) {
this.validateForm1 = fb.group({
loadAddress0: [null, [Validators.required]],
@ -166,13 +168,26 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
allowClear: true,
} as SFSelectWidgetSchema
},
// enterpriseInfoName: {
// type: 'string',
// title: '网络货运人',
// ui: {
// widget: 'custom'
// },
// default: '天津市怡亚通XXXX有限公司'
// },
enterpriseInfoName: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'custom'
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.shipperSrv.getNetworkFreightForwarder(),
},
default: '天津市怡亚通XXXX有限公司'
},
deadlineTime: {
title: '截至日期',
@ -186,24 +201,12 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
dispatchId: {
type: 'string',
title: '调度员',
enum: [
{ label: '周涛', value: 1 },
{ label: '李诞', value: 2 }
],
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true,
optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您'
// asyncData: () =>
// this.service.loadChildData2('0', '2').pipe(
// map((data: any) => {
// return data.map((m: any) => {
// return { label: m.name, value: m.id };
// });
// }),
// ),
// change: (i) => this.updateCategory(i, '/categoryId2'),
optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您',
asyncData: () => this.shipperSrv.getStaffList2()
} as SFSelectWidgetSchema
}
},
@ -226,42 +229,68 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
goodsTypeId: {
type: 'string',
title: '货物名称',
enum: [
{ label: '服装', value: '1' },
{ label: '电子产品', value: '2' },
{ label: '其他', value: '3' }
],
ui: {
widget: 'select',
placeholder: '请选择',
errors: { required: '请选择货物类型' },
asyncData: () =>
this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe(
map((data: any) => {
return data[0].children?.map((m: any) => {
return { label: m.name, value: m.id };
});
})
),
change: (value, data: any) => {
this.changeGoodsType(value, data);
this.sf3.setValue('/goodsTypeName', data.label);
}
} as SFSelectWidgetSchema
},
goodsTypeName: {
type: 'string',
title: '',
ui: {
hidden: true
}
},
goodsNameId: {
type: 'string',
title: '',
ui: {
widget: 'select',
placeholder: '请选择',
errors: { required: '请填写货物名称' },
change: (value, data) => {
this.currentGoodsTypeName = data;
change: (value: any, data: any) => {
this.sf3.setValue('/goodsName', data.label);
},
visibleIf: {
goodsTypeName: (value: any) => value && value !== '其它'
}
// asyncData: () =>
// this.categoryService.loadChildData2('0', '2').pipe(
// map((data: any) => {
// return data.map((m: any) => {
// return { label: m.name, value: m.id };
// });
// }),
// ),
// change: (i) => this.updateCategory(i, '/categoryId2'),
} as SFSelectWidgetSchema
}
},
goodsName: {
type: 'string',
title: '',
maxLength: 20,
ui: {
hidden: true,
visibleIf: {
goodsTypeName: (value: any) => value && value !== '其它'
}
}
},
goodsName1: {
type: 'string',
title: '',
ui: {
errors: { required: '请填写货物名称' },
visibleIf: {
goodsType: value => value === '其'
goodsTypeName: (value: any) => value && value === '其'
}
}
}
},
required: ['goodsTypeId', 'goodsName']
required: ['goodsTypeId', 'goodsName', 'goodsNameId']
};
this.ui3 = {
'*': {
@ -453,13 +482,15 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
// //装卸货信息
const LoadingList = this.startInfo.concat(this.endInfo);
// // 货物信息
// 货物信息
const sf3Values = { ...this.sf3.value };
if (sf3Values.goodsTypeName === '其它') {
sf3Values.goodsName = sf3Values.goodsName1;
delete sf3Values.goodsName1;
}
const goodsInfoList = [
{
...this.sf3.value,
goodsTypeName: this.currentGoodsTypeName.label,
goodsName: '电子',
goodsNameId: '1',
...sf3Values,
...this.sf4.value,
maxWeight: this.sf4.value.maxWeight.join(','),
maxCube: this.sf4.value.maxCube.join(',')
@ -592,4 +623,35 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
}
});
}
goBack() {
window.history.go(-1);
}
changeGoodsType(value: string, data: any) {
if (data.label === '其它') return;
const params = {
pageIndex: 1,
pageSize: 100,
configId: value
};
this.service
.request(this.service.$api_get_config_item_page, params)
.pipe(
map(data => {
return data.records?.map((m: any) => {
return { label: m.name, value: m.id };
});
})
)
.subscribe(res => {
if (res) {
this.sf3.getProperty('/goodsNameId')!.schema.enum = res;
this.sf3.getProperty('/goodsNameId')!.widget.reset(res);
if(this.sf3data.goodsNameId){
this.sf3.setValue('/goodsNameId',this.sf3data.goodsNameId);
}
} else {
this.service.msgSrv.error(res.msg);
}
});
}
}

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-03 11:10:14
* @LastEditTime: 2021-12-22 10:36:57
* @LastEditTime: 2022-01-05 15:37:53
* @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\bulk\bulk.component.html
@ -87,11 +87,11 @@
(<span [ngStyle]="{ color:item?.count>0?'#1890FF':''}">{{item?.count}}</span>)
</div>
</ng-template>
<ng-template st-row="demand" let-item let-index="index">
<div>车型: {{item.maxWeightLabel}}</div>
<div class="error">车长: {{item.maxCubeLabel}} 米</div>
</ng-template>
<ng-template st-row="goodsInfo" let-item let-index="index">
<ng-template st-row="useCarDemand" let-item let-index="index">
<div>车型: {{item.carModelLabel}}</div>
<div class="error">车长: {{item.expand}} 米</div>
</ng-template>
<ng-template st-row="goodsInfo" let-item let-index="index">
<div>{{item.owner}}</div>
<div>货源:{{item.progress}} 顿 / {{item.progress}} 方</div>
<div class="error">剩余: {{item.progress}} 顿 / {{item.progress}} 方</div>

View File

@ -216,7 +216,7 @@ export class SupplyManagementBulkComponent implements OnInit {
title: '用车需求',
className: 'text-center',
width: '150px',
render: 'demand'
render: 'useCarDemand'
},
{
title: '运费单价',
@ -334,18 +334,6 @@ export class SupplyManagementBulkComponent implements OnInit {
get selectedRows() {
return this.st?.list.filter((item) => item.checked) || [];
}
// 获取录单员
getCatalogueMember() {
const params = {
};
// return this.service.request(this.service.$api_get_catalogue_member, params, 'GET').pipe(
// map((res) => {
// if (res) {
// console.log(res)
// }
// }),
// );
}
selectChange(e: number) {
console.log(e);

View File

@ -1,15 +1,15 @@
<!--
* @Author: your name
* @Date: 2021-12-14 20:08:17
* @LastEditTime: 2021-12-14 20:09:50
* @LastEditors: your name
* @LastEditTime: 2022-01-05 17:38:44
* @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\onecar-publish\address-list\address-list.component.html
-->
<st
#st
[bordered]="true"
[data]="service.$api_getList"
[data]="service.$api_commonAddress"
[columns]="columns"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams, process: reqProcess }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"

View File

@ -1,8 +1,8 @@
/*
* @Author: your name
* @Date: 2021-12-14 20:08:17
* @LastEditTime: 2021-12-20 09:35:13
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-01-05 17:35: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\supply-management\components\onecar-publish\address-list\address-list.component.ts
*/
@ -12,9 +12,7 @@ import { STChange, STColumn, STComponent, STRequestOptions } from '@delon/abc/st
import { processSingleSort } from '@shared';
import { NzDrawerService } from 'ng-zorro-antd/drawer';
import { NzModalService } from 'ng-zorro-antd/modal';
import { OrderManagementService } from 'src/app/routes/order-management/services/order-management.service';
import { SupplyManagementService } from '../../../services/supply-management.service';
@Component({
selector: 'app-publish-address-list',
templateUrl: './address-list.component.html'
@ -32,7 +30,7 @@ export class PublishAddressListComponent implements OnInit {
public router: Router,
public ar: ActivatedRoute,
private drawerService: NzDrawerService,
public service: OrderManagementService,
public service: SupplyManagementService,
private modalService: NzModalService
) {}

View File

@ -209,14 +209,9 @@
<div nz-row>
<div nz-col nzSpan="12">
<sf #sf6 [schema]="schema6" [formData]="sf6data" [button]="'none'" [ui]="ui6">
<ng-template sf-template="receiptUserId" let-i let-ui="ui">
<input
nz-input
[ngModel]="i.value"
(ngModelChange)="i.setValue($event)"
placeholder="请点击选择收回单地址"
(click)="backBillChange()"
/>
<ng-template sf-template="receiptAddressId" let-i let-ui="ui">
<input nz-input [ngModel]="i.value" (ngModelChange)="i.setValue($event)" placeholder="请点击选择收回单地址"
(click)="backBillChange()" />
</ng-template>
</sf>
</div>
@ -249,7 +244,9 @@
</nz-card>
<nz-card>
<div class="align-center">
<button nz-button nzType="primary" (click)="chooseFamifiar()">取消</button>
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submit()">提交修改</button>
<button nz-button nzType="primary" *ngIf="this.PageStatus == '整车修改'" (click)="choose()">取消</button>
<button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px" (click)="submit()">提交修改</button>
<button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="chooseFamifiar()">指派熟车</button>
<button *ngIf="this.PageStatus == '整车下一单'" nz-button nzType="primary" style="margin-left: 48px" (click)="submit()">司机抢单</button>
</div>
</nz-card>

View File

@ -169,23 +169,12 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
dispatchId: {
type: 'string',
title: '调度员',
enum: [
{ label: '调度员1', value: '1' },
{ label: '调度员2', value: '2' }
],
ui: {
widget: 'select',
placeholder: '请选择',
allowClear: true
// asyncData: () =>
// this.service.loadChildData2('0', '2').pipe(
// map((data: any) => {
// return data.map((m: any) => {
// return { label: m.name, value: m.id };
// });
// }),
// ),
// change: (i) => this.updateCategory(i, '/categoryId2'),
allowClear: true,
optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您',
asyncData: () => this.shipperSrv.getStaffList2()
} as SFSelectWidgetSchema
}
}
@ -221,37 +210,76 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
initSF3() {
this.schema3 = {
properties: {
goodsName: {
goodsTypeId: {
type: 'string',
title: '货物名称',
ui: {
// widget: 'dict-select',
// params: { dictKey: 'GoodsName' },
placeholder: '请选择'
}
widget: 'select',
placeholder: '请选择',
errors: { required: '请选择货物类型' },
asyncData: () =>
this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe(
map((data: any) => {
return data[0].children?.map((m: any) => {
return { label: m.name, value: m.id };
});
})
),
change: (value, data: any) => {
this.changeGoodsType(value, data);
this.sf3.setValue('/goodsTypeName', data.label);
}
} as SFSelectWidgetSchema
},
qita: {
goodsTypeName: {
type: 'string',
title: '',
ui: {
hidden: true
}
},
goodsNameId: {
type: 'string',
title: '',
ui: {
widget: 'select',
placeholder: '请选择',
errors: { required: '请填写货物名称' },
change: (value: any, data: any) => {
this.sf3.setValue('/goodsName', data.label);
},
visibleIf: {
goodsName: value => value === '3'
goodsTypeName: (value: any) => value && value !== '其它'
}
}
},
goodsName: {
type: 'string',
title: '',
ui: {
hidden: true,
visibleIf: {
goodsTypeName: (value: any) => value && value !== '其它'
}
}
},
goodsName1: {
type: 'string',
title: '',
ui: {
errors: { required: '请填写货物名称' },
visibleIf: {
goodsTypeName: (value: any) => value && value === '其它'
}
}
}
},
required: ['goodsName']
required: ['goodsTypeId', 'goodsName', 'goodsNameId']
};
this.ui3 = {
'*': {
spanLabelFixed: 90,
grid: { span: 12 }
},
$goodsName: {
grid: { span: 12 }
},
$qita: {
grid: { span: 12 }
}
};
}
@ -374,6 +402,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
};
}
initSF6() {
this.schema6 = {
properties: {
@ -396,7 +425,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
ui: {
widget: 'dict-select',
params: { dictKey: 'receipt:type' },
containsAllLable: false,
containsAllLabel: false,
placeholder: '请选择',
errors: { required: '请选择' },
visibleIf: {
@ -600,6 +629,34 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.validateForm1.removeControl(`loadName${index}`);
this.validateForm1.removeControl(`loadPhone${index}`);
}
changeGoodsType(value: string, data: any) {
if (data.label === '其它') return;
const params = {
pageIndex: 1,
pageSize: 100,
configId: value
};
this.service
.request(this.service.$api_get_config_item_page, params)
.pipe(
map(data => {
return data.records?.map((m: any) => {
return { label: m.name, value: m.id };
});
})
)
.subscribe(res => {
if (res) {
this.sf3.getProperty('/goodsNameId')!.schema.enum = res;
this.sf3.getProperty('/goodsNameId')!.widget.reset(res);
if(this.sf3data.goodsNameId){
this.sf3.setValue('/goodsNameId',this.sf3data.goodsNameId);
}
} else {
this.service.msgSrv.error(res.msg);
}
});
}
addEndInfo(event: any) {
if (this.addEndInfo.length < 5) {
@ -689,6 +746,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
// if (this.validateForm1.invalid) {
// return;
// }
console.log(this.sf7.value)
const params: any = {
...this.sf1.value,
...this.sf5.value,
@ -888,8 +946,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
});
this.sf3data = {
goodsName: res?.goodsInfoVOList[0]?.goodsName
goodsTypeId: res?.goodsInfoVOList[0]?.goodsTypeId || '',
goodsTypeName: res?.goodsInfoVOList[0]?.goodsTypeName || '',
goodsNameId: res?.goodsInfoVOList[0]?.goodsNameId || '',
goodsName: res?.goodsInfoVOList[0]?.goodsName || '',
};
if (this.sf3data.goodsTypeName === '其它') {
this.sf3data.goodsName1 = res?.goodsInfoVOList[0]?.goodsName || '';
}
this.changeGoodsType(this.sf3data.goodsTypeId, { label: this.sf3data.goodsTypeName, value: this.sf3data.goodsTypeId });
this.sf4data = {
weight: res?.goodsInfoVOList[0]?.weight,
volume: res?.goodsInfoVOList[0]?.volume,
@ -917,11 +982,21 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
goodsValue: res?.goodsValue
};
console.log(res?.stateReceipt);
// this.sf6data = {
// stateReceipt: res?.stateReceipt,
// receiptType: res?.receiptType,
// receiptUserId: res?.receiptUserId,
// remarks: res?.remarks
// };
this.sf6data = {
stateReceipt: res?.stateReceipt,
receiptType: res?.receiptType,
receiptUserId: res?.receiptUserId,
remarks: res?.remarks
receiptType: res?.receiptType || '',
receiptAddressId: res?.receiptAddressId || '',
receiptUserName: res?.receiptUserName || '',
area: res?.area || '',
phon: res?.phon || '',
address: res?.address || '',
remarks: res?.remarks || '',
};
this.sf7data = {
prePay: res?.shippingInformationVO?.prePay,
@ -944,11 +1019,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
nzOnOk: item => {
const data = item.seleteData;
if (JSON.stringify(data) === '{}') return;
this.sf6.setValue('/name4', data.contactName);
this.sf6.setValue('/name5', data.contactTelephone);
this.sf6.setValue('/name6', `${data.province}-${data.city}-${data.area}`);
this.sf6.setValue('/receiptAddress', data.detailedAddress);
this.sf6.setValue('/receiptAddressId', data.id);
this.sf6.setValue('/receiptUserName', data.contactName);
this.sf6.setValue('/phon', data.contactTelephone);
this.sf6.setValue('/area', `${data.province}-${data.city}-${data.area}`);
this.sf6.setValue('/address', data.detailedAddress);
}
});
}
choose(){
window.history.go(-1);
}
}

View File

@ -1,4 +1,10 @@
<page-header-wrapper [title]="''"></page-header-wrapper>
<page-header-wrapper [title]="'整车代发货源'" [logo]="logo">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
</page-header-wrapper>
<nz-card>
<div class="card-title">货源单设置</div>
<div nz-row>

View File

@ -13,7 +13,7 @@ import {
SFUISchema
} from '@delon/form';
import { SettingsService, _HttpClient } from '@delon/theme';
import { EACacheService } from '@shared';
import { EACacheService, ShipperBaseService } from '@shared';
import format from 'date-fns/format';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
@ -70,7 +70,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
private router: Router,
private route: ActivatedRoute,
private eaCacheSrv: EACacheService,
private amapService: AmapService
private amapService: AmapService,
public service2: ShipperBaseService
) {
this.validateForm1 = fb.group({
loadingTime: [null, [Validators.required]],
@ -151,14 +152,27 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
allowClear: true,
} as SFSelectWidgetSchema
},
enterpriseInfoName: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'custom'
},
default: '天津市怡亚通XXXX有限公司'
},
// enterpriseInfoName: {
// type: 'string',
// title: '网络货运人',
// ui: {
// widget: 'custom'
// },
// default: '天津市怡亚通XXXX有限公司'
// },
enterpriseInfoName: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.service2.getNetworkFreightForwarder(),
},
},
externalResourceCode: {
type: 'string',
title: '外部货源号',
@ -808,4 +822,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
close() {
window.history.go(-1);
}
goBack() {
window.history.go(-1);
}
}

View File

@ -1,126 +0,0 @@
<page-header-wrapper [title]="''" [logo]="logo">
<ng-template #logo>
<button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
<i nz-icon nzType="left" nzTheme="outline"></i>
</button>
</ng-template>
</page-header-wrapper>
<nz-card>
<div nz-row>
<div nz-col nzSpan="6">
<sv-container class="bdr">
<sv label="货源编号" col="1">{{ dataList?.resourceCode }}</sv>
<sv-title class="text-center text-lg">
<span *ngIf="dataList?.resourceType === 1">待接单</span>
<span *ngIf="dataList?.resourceType === 2">已接单</span>
<span *ngIf="dataList?.resourceType === 3">已取消</span>
</sv-title>
<sv-title>
<div class="">
<a class="btn-size" (click)="modification()">修改货源</a>
<a class="btn-size m-lg mr-lg">取消货源</a>
<a class="btn-size" (click)="nextOrder()">再下一单</a>
</div>
</sv-title>
</sv-container>
</div>
<div nz-col nzSpan="16" class="approval-status">
<nz-steps style="width: 80%; margin: 0 auto" [nzLabelPlacement]="'vertical'">
<nz-step nzStatus="finish" nzIcon="user" [nzDescription]="i?.createAt" nzTitle="下单"></nz-step>
<nz-step nzStatus="finish" nzIcon="user" nzTitle="完结"></nz-step>
</nz-steps>
</div>
</div>
<nz-divider></nz-divider>
<div sv-container >
<sv label="项目名称">{{ dataList?.enterpriseProjectId }}</sv>
<sv label="外部货源号">{{ dataList?.externalResourceCode }}</sv>
<sv label="录单员">{{ dataList?.enterpriseProjectId }}</sv>
<sv label="调度员">{{ dataList?.dispatchName }}</sv>
</div>
<nz-divider></nz-divider>
<div nz-row>
<div nz-col nzSpan="6">
<div class="source-info">
<div *ngFor="let item of dataList?.unLoadingPlaceVOList; let i = index">
<h3 *ngIf="i === 0" style="font-weight: 700;">装卸货信息</h3>
<div *ngIf="item?.type === 1 || item?.type === '1'">
<p>装货地:{{item?.detailedAddress}}</p>
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
<p>发货日期:{{item?.createTime}}</p>
</div>
<div *ngIf="item.type === 2 || item.type === '2'">
<p>卸货地:{{item?.detailedAddress}}</p>
<p>联系人:{{item?.appUserName}}/{{item?.contractTelephone}}</p>
<p>卸货日期:{{item?.modifyTime}}</p>
</div>
</div>
</div>
</div>
<div nz-col nzSpan="5">
<div class="source-info bdr bdl pl-md">
<div *ngFor="let item of dataList?.goodsInfoVOList; let i = index">
<h3 *ngIf="i === 0" style="font-weight: 700;">货物信息</h3>
<p>货物名称:{{item?.goodsName}}</p>
<p>货物数量:{{item?.weight}}吨/{{item?.volume}}立方</p>
<p>用车需求:{{item?.vehicleDemand}}</p>
</div>
</div>
</div>
<div nz-col nzSpan="5">
<div class="source-info bdr pl-md">
<h3 style="font-weight: 700;">承运信息</h3>
<p>网络货运人:{{dataList?.carrierInformationVO?.enterpriseInfoName}}</p>
<p>服务类型:{{dataList?.carrierInformationVO?.serviceType === 1 ? '抢单' : '指派'}}</p>
<p>司机姓名:{{dataList?.carrierInformationVO?.driverName}}</p>
<p>手机号:{{dataList?.carrierInformationVO?.driverTelephone}}</p>
<p>车牌号:{{dataList?.carrierInformationVO?.driverLicensePlate}}</p>
</div>
</div>
<div nz-col nzSpan="5">
<div class="source-info bdr pl-md">
<h3 style="font-weight: 700;">服务信息</h3>
<p>货物价值:{{dataList?.goodsInfoList?.goodsName}}</p>
<p>保价费金额:{{dataList?.goodsInfoList?.goodsName}}</p>
</div>
</div>
<div class="source-info pl-md">
<h3 style="font-weight: 700;">补充信息</h3>
<p>{{dataList?.supplementaryInformationVO?.stateReceipt === 2 ? '不需要回单' : '需要回单'}}</p>
<p>联系人:{{dataList?.supplementaryInformationVO?.receiptUserId}}</p>
<p>联系电话:{{dataList?.supplementaryInformationVO?.remarks}}</p>
<p>所在地区:{{dataList?.supplementaryInformationVO?.remarks}}</p>
<p>详细地址:{{dataList?.supplementaryInformationVO?.receiptAddress}}</p>
<p>备注:{{dataList?.supplementaryInformationVO?.remarks}}</p>
</div>
</div>
<nz-divider></nz-divider>
<div nz-row>
<div class="freight-info-box">
<h3 style="font-weight: 700;">运费信息</h3>
<div class="text-right">
<p>预付:{{dataList?.shippingInformationVO?.prePay | currency: '¥' }}</p>
<p>油卡:{{dataList?.shippingInformationVO?.oilCardPay | currency: '¥'}}</p>
<p>到付:{{dataList?.shippingInformationVO?.toPay | currency: '¥'}}</p>
<p>回单付:{{dataList?.shippingInformationVO?.receiptPay | currency: '¥'}}</p>
<p>保险费:{{dataList?.shippingInformationVO?.insuranceFee | currency: '¥'}}</p>
<p>附加费保险费:{{dataList?.shippingInformationVO?.appendFee | currency: '¥'}}</p>
</div>
</div>
<nz-divider></nz-divider>
<div class="freight-info-box" nz-row>
<div nz-col nzSpan="24">
<h3 class="text-right"><label>总计 :</label> <span class="text-error-dark text-xl">{{dataList?.shippingInformationVO?.totalFee | currency: '¥' }}</span></h3>
</div>
</div>
</div>
<nz-divider></nz-divider>
<div nz-row>
<nz-card nzTitle="操作日志" style="width: 100%;">
<st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
</st>
</nz-card>
</div>
</nz-card>

View File

@ -1,37 +0,0 @@
:host{
.btn-size{
font-size: 14px;
}
.bdr{
border-right: 1px solid #ccc;
}
.bdl{
border-left: 1px solid #ccc;
}
.title{
font-size: 26;
font-weight: bold;
}
.source-info{
p{
margin-bottom: .5em;
}
}
.freight-info-box{
width: 95%;
}
.freigth-label{
display: inline-block;
width: 50px;
text-align: right;
}
::ng-deep{
.approval-status{
.ant-steps{
width: 70%;
margin: 0 auto;
}
}
}
}

View File

@ -1,24 +0,0 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { SupplyManagementVehicleDetailComponent } from './vehicle-detail.component';
describe('SupplyManagementVehicleDetailComponent', () => {
let component: SupplyManagementVehicleDetailComponent;
let fixture: ComponentFixture<SupplyManagementVehicleDetailComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ SupplyManagementVehicleDetailComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SupplyManagementVehicleDetailComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,80 +0,0 @@
/*
* @Author: your name
* @Date: 2021-12-03 11:10:14
* @LastEditTime: 2021-12-09 20:54:28
* @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-detail\vehicle-detail.component.ts
*/
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn } from '@delon/abc/st';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { SupplyManagementService } from '../../services/supply-management.service';
@Component({
selector: 'app-supply-management-vehicle-detail',
templateUrl: './vehicle-detail.component.html',
styleUrls: ['./vehicle-detail.component.less']
})
export class SupplyManagementVehicleDetailComponentOld implements OnInit {
id = this.route.snapshot.params.id;
i: any;
dataList: any;
logColumns: STColumn[] = [
{ title: '内容', index: 'theme' },
{ title: '操作人', index: 'operationUserPhone' },
{ title: '操作时间', index: ' createTime' },
];
constructor(
private route: ActivatedRoute,
private msgSrv: NzMessageService,
private service: SupplyManagementService,
private router: Router,private ar: ActivatedRoute
) {
}
ngOnInit(): void {
console.log(this.id)
if(this.id) {
this.getDetailList(this.id)
}
}
// 获取录单员
getDetailList(id: any) {
const params = {
id: id
};
this.service.request(`${this.service.$api_get_getCompleteVehicleDetail}`, params).subscribe((res) => {
console.log(res)
this.dataList = res
})
}
// 修改货源
modification() {
this.router.navigate(['/supply-management/vehicle-amend', this.id], {
queryParams: {
sta: 1
},
})
}
// 再下一单
nextOrder() {
this.router.navigate(['/supply-management/vehicle-amend', this.id], {
queryParams: {
sta: 2
},
})
}
goBack() {
window.history.go(-1);
}
}

View File

@ -128,7 +128,7 @@
</sv>
</sv-container>
</nz-card>
<nz-card nzTitle="运费信息到货后15天内支付运费">
<!-- <nz-card nzTitle="运费信息到货后15天内支付运费">
<st [data]="i?.expenseList" [columns]="expenseColumns" [page]="{show:false}">
<ng-template st-row="total" let-item>
<div>
@ -148,6 +148,22 @@
</h3>
</div>
</div>
</nz-card> -->
<nz-card [nzTitle]="'运费信息到货后'+i?.paymentDays+'天内支付运费'">
<st [data]="i?.expenseVOList" [columns]="expenseColumns" [page]="{show:false}">
<ng-template st-row="total" let-item>
<div>
{{(item.price * item.rate) | currency}}
<span>(含附加费)</span>
</div>
</ng-template>
</st>
<div>
总计:<span style="color: #da001b; font-size: 18px">{{ totalObj?.price | currency: '¥' }}</span> (运费¥{{
totalObj?.price - attObj?.price
}},附加运费¥{{ attObj?.price }},附加费率{{ (attObj?.price / totalObj?.price) * 100 | number: '0.2-2' }}%
</div>
<div>收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}</div>
</nz-card>
<nz-card nzTitle="补充信息">
<sv-container>

View File

@ -26,6 +26,8 @@ export class SupplyManagementVehicleDetailComponent implements OnInit {
1: '抢单',
2: '指派'
}
totalObj: any;
attObj: any;
status: any = { 1: '待接单', 2: '已接单', 3: '已取消' };
totalExpensePrice = 0;
expenseColumns: STColumn[] = [
@ -67,6 +69,8 @@ export class SupplyManagementVehicleDetailComponent implements OnInit {
this.service.request(this.service.$api_get_getCompleteVehicleDetail, { id: this.id }).subscribe(res => {
const expenseList = res?.expenseList || [];
this.totalExpensePrice = 0;
this.attObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'ATT')[0];
this.totalObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TOTAL')[0];
expenseList.forEach((e: any) => {
this.totalExpensePrice += e?.price * e?.rate;
});

View File

@ -1,8 +1,8 @@
<!--
* @Author: your name
* @Date: 2021-12-22 11:28:28
* @LastEditTime: 2021-12-28 19:21:08
* @LastEditors: your name
* @LastEditTime: 2022-01-05 15:45:01
* @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
-->
@ -56,9 +56,14 @@
<p>{{item.resourceTypeLabel}}{{item.serviceTypeLabel}}</p>
</ng-template>
<ng-template st-row="totalAmount" let-item let-index="index">
<div class="mr-xs" nzPopoverTitle="Title" nz-popover [nzPopoverContent]="contentTemplate">¥{{item.totalAmount}}
<!-- [nzPopoverContent]="contentTemplate" -->
<div class="mr-xs" nzPopoverTitle="Title" nz-popover>¥{{item.totalAmount}}
</div>
</ng-template>
<ng-template st-row="useCarDemand" let-item let-index="index">
<div>车型: {{item.carModelLabel}}</div>
<div class="error">车长: {{item.expand}} 米</div>
</ng-template>
<ng-template #contentTemplate>
<div>
<p>预付¥200.00</p>

View File

@ -398,9 +398,9 @@ export class SupplyManagementVehicleComponent implements OnInit {
},
{
title: '用车需求',
className: 'text-center',
width: '120px',
format: (item: any) => `<p>车型: ${item.vehicleDemand?.maxWeight || ''}</p><p>车长: ${item.vehicleDemand?.maxCube || ''}米</p>`,
index: 'vehicleDemand'
render: 'useCarDemand'
},
{
title: '总费用',
@ -411,9 +411,10 @@ export class SupplyManagementVehicleComponent implements OnInit {
},
{
title: '总运费',
className: 'text-center',
width: '120px',
index: '总运费'
className: 'text-center',
index: 'totalAmount',
render: 'totalAmount'
},
{
title: '附加费',