Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -41,7 +41,7 @@ export class PayableOrderDetailComponent implements OnInit {
|
||||
}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
Object.assign(requestOptions.body, { billHId: this.billHId });
|
||||
Object.assign(requestOptions.body, { phxHId: this.billHId });
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value,
|
||||
@ -159,14 +159,14 @@ export class PayableOrderDetailComponent implements OnInit {
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '序号', render: 'no', width: 80 },
|
||||
{ title: '费用号', index: 'feeHCode', width: 100 },
|
||||
{ title: '费用号', index: 'feeHCode', width: 140 },
|
||||
{ title: '费用日期', index: 'feedate', type: 'date', width: 150 },
|
||||
{ title: '订单号', index: 'billHCode', width: 100 },
|
||||
{ title: '订单号', index: 'billHCode', width: 140 },
|
||||
{ title: '订单日期', index: 'billTime', width: 150 },
|
||||
{ title: '费用类型', index: 'feetype', width: 90 },
|
||||
{ title: '订单费用科目', index: 'billLTypeLabel', width: 100 },
|
||||
{ title: '费用科目', index: 'feeSubIdName', width: 140 },
|
||||
{ title: '结算客户', index: 'cnoName', width: 100 },
|
||||
{ title: '结算客户', index: 'cnoName', width: 140 },
|
||||
{
|
||||
title: '已收金额',
|
||||
index: 'phxmoney',
|
||||
|
||||
@ -263,7 +263,7 @@ export class PayableOrderComponent implements OnInit {
|
||||
{
|
||||
text: '浏览',
|
||||
click: item =>
|
||||
this.router.navigate(['/financial-management/payable-order/detail/' + item.id], { queryParams: { billHId: item.billHId } })
|
||||
this.router.navigate(['/financial-management/payable-order/detail/' + item.id], { queryParams: { billHId: item.id } })
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-24 16:58:02
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-01 13:42:44
|
||||
* @LastEditTime : 2022-03-04 14:15:24
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -34,7 +34,7 @@
|
||||
<sv label="货主">{{ i?.goodsResource?.shipperAppUserName }} </sv>
|
||||
<sv label="所属项目">{{i?.goodsResource?.enterpriseProjectName}}</sv>
|
||||
<sv label="服务类型">{{i?.goodsResource?.serviceTypeLabel}}</sv>
|
||||
<sv label="录单员">{{i?.goodsResource?.createUserName}} /{{i?.goodsResource?.createUserPhone}} </sv>
|
||||
<sv label="录单员">{{i?.createUserName}} /{{i?.createUserPhone}} </sv>
|
||||
<sv label="调度员">{{i?.goodsResource?.dispatchName}}/{{i?.goodsResource?.dispatchPhone}} </sv>
|
||||
</div>
|
||||
<nz-tabset style="margin-top: 15px;">
|
||||
@ -42,7 +42,7 @@
|
||||
</nz-tab>
|
||||
<nz-tab nzTitle="基本信息" (nzClick)="goDistance(distannce2)">
|
||||
</nz-tab>
|
||||
<nz-tab nzTitle="运费信息" (nzClick)="goDistance(distannce3)">
|
||||
<nz-tab nzTitle="运费信息" (nzClick)="goDistance(distannce3)">
|
||||
</nz-tab>
|
||||
<nz-tab nzTitle="附件信息" (nzClick)="goDistance(distannce4)">
|
||||
</nz-tab>
|
||||
@ -125,7 +125,8 @@
|
||||
</div>
|
||||
<div nz-col [nzSpan]="4">
|
||||
<div style="display: flex; justify-content: center">
|
||||
<span style="padding: 24 px; font-size: 30px; color: #7d7d7d"><i nz-icon nzType="swap" nzTheme="outline"></i></span>
|
||||
<span class="swap-icon" (click)="swapAddress()"><i nz-icon nzType="swap"
|
||||
nzTheme="outline"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="10">
|
||||
@ -177,7 +178,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div nz-row [nzGutter]="24" style="margin-top: 24px">
|
||||
<!-- <div nz-row [nzGutter]="24" style="margin-top: 24px">
|
||||
<div nz-col [nzSpan]="10">
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="4" nzRequired>装货时间</nz-form-label>
|
||||
@ -195,7 +196,7 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<ng-template #endInconTemp1><i nz-icon nzType="environment" nzTheme="outline"></i></ng-template>
|
||||
</form>
|
||||
</nz-card>
|
||||
@ -205,18 +206,7 @@
|
||||
<sf #sf3 [schema]="schema3" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf>
|
||||
<sf #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4">
|
||||
<ng-template sf-template="weight" let-item let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="'吨'">
|
||||
<input
|
||||
nz-input
|
||||
type="number"
|
||||
[ngModel]="item.value"
|
||||
min="0"
|
||||
[max]="999999"
|
||||
step="0.01"
|
||||
(ngModelChange)="item.setValue($event)"
|
||||
placeholder="总重量,必填"
|
||||
/>
|
||||
</nz-input-group>
|
||||
{{i?.goodsInfoList?.[0]?.weight}}吨,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件
|
||||
</ng-template>
|
||||
<ng-template sf-template="volume" let-item let-ui="ui">
|
||||
<nz-input-group [nzAddOnAfter]="'方'">
|
||||
@ -271,9 +261,11 @@
|
||||
|
||||
</nz-card>
|
||||
|
||||
<nz-card nzTitle="运费信息" #distannce3>
|
||||
<h2>{{i?.goodsInfoList?.[0]?.freightPrice}}{{i?.goodsInfoList?.[0]?.freightTypeLabel}}(以发货为准,保留小数)</h2>
|
||||
<st #st [data]="i?.billExpenseDetails" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
<nz-card nzTitle="运费信息"#distannce3>
|
||||
<div *ngIf="(i?.billStatus == '3' && i.goodsInfoList?.[0].settlementBasis == '2') || (i?.billStatus == '4' && i.goodsInfoList?.[0].settlementBasis == '1')" >
|
||||
<h2>{{i?.goodsInfoList?.[0]?.freightPrice}}{{i?.goodsInfoList?.[0]?.freightTypeLabel}}({{ i?.goodsInfoList?.[0]?.settlementBasisLabel ? i?.goodsInfoList?.[0]?.settlementBasisLabel + ',' :' ' }}{{i?.goodsInfoList?.[0]?.ruleLabel}})</h2>
|
||||
<st #st [data]="billExpenses" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
<ng-template st-row="PriceType" let-item let-index="index"> 到付 </ng-template>
|
||||
<ng-template st-row="price" let-item let-index="index">
|
||||
{{ item.price | currency }}
|
||||
</ng-template>
|
||||
@ -288,6 +280,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div>收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
|
||||
@ -352,17 +345,23 @@
|
||||
|
||||
<nz-card>
|
||||
<div nz-row>
|
||||
<nz-card nzTitle="轨迹信息" style="width: 100%;" #distannce5>
|
||||
<div nz-row >
|
||||
<div nz-col [nzSpan]='12'>
|
||||
<!-- <st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
</st> -->
|
||||
</div>
|
||||
<div nz-col [nzSpan]='12'>
|
||||
<amap-path-simplifier></amap-path-simplifier>
|
||||
</div>
|
||||
</div>
|
||||
<nz-card nzTitle="轨迹信息" style="width: 100%" id="distannce5" [nzExtra]="extraTemplate" #distannce5>
|
||||
<div nz-row>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<st [scroll]="{y: '500px'}" #st [data]="addressItems" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
</st>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="12">
|
||||
<amap-path-simplifier [mapWidth]="'100%'" [mapHeight]="'600px'" [MapList]="MapList"></amap-path-simplifier>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
<ng-template #extraTemplate>
|
||||
<nz-radio-group [(ngModel)]="trajectory">
|
||||
<label nz-radio-button nzValue="car">车辆轨迹</label>
|
||||
<label nz-radio-button nzValue="driver">司机轨迹</label>
|
||||
</nz-radio-group>
|
||||
</ng-template>
|
||||
</div>
|
||||
</nz-card>
|
||||
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="附件信息" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-24 16:58:02
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-28 12:01:57
|
||||
* @LastEditTime : 2022-03-04 14:15:21
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -22,6 +22,7 @@ import { NzUploadChangeParam, NzUploadFile } from 'ng-zorro-antd/upload';
|
||||
import { Observable, Observer } from 'rxjs';
|
||||
import { apiConf } from '@conf/api.conf';
|
||||
import { OrderManagementService } from '../../services/order-management.service';
|
||||
import format from 'date-fns/format';
|
||||
import { NzCardComponent } from 'ng-zorro-antd/card';
|
||||
import { map } from 'rxjs/operators';
|
||||
function getBase64(file: File): Promise<string | ArrayBuffer | null> {
|
||||
@ -40,7 +41,9 @@ function getBase64(file: File): Promise<string | ArrayBuffer | null> {
|
||||
export class OrderManagementBulkDetailChangeComponent implements OnInit {
|
||||
validateForm1: FormGroup;
|
||||
id = this.route.snapshot.params.id;
|
||||
trajectory = 'car';
|
||||
@ViewChild('distannce3', { static: false })
|
||||
MapList: any[]=[];
|
||||
i: any= {unLoadingPlaceList:[]};
|
||||
totalDistance = 0.0; //总里程
|
||||
totalTime = 0.0; //路程总时间
|
||||
@ -66,29 +69,16 @@ loadTime: any; // 货源单设置回显
|
||||
@ViewChild('sf4', { static: false }) sf4!: SFComponent;
|
||||
schema4: SFSchema = {};
|
||||
isVisible = false;
|
||||
billExpenses: any[] = []; //运费信息表格信息
|
||||
addressItems: any[] = []; //打点地址数据组
|
||||
ui4!: SFUISchema;
|
||||
formData: any;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema: SFSchema = {};
|
||||
ui: SFUISchema = {};
|
||||
logColumns: STColumn[] = [
|
||||
{ title: '款项', index: 'expenseName' },
|
||||
{ title: '运输费(元)', render: 'price' },
|
||||
{ title: '附加费(元)', render: 'surcharge' },
|
||||
{ title: '支付时间', index: ' paymentTime' },
|
||||
{
|
||||
title: '支付状态',
|
||||
className: 'text-center',
|
||||
index: 'paymentStatus',
|
||||
type: 'badge',
|
||||
width: '120px',
|
||||
badge: {
|
||||
'1': { text: '待申请', color: 'warning' },
|
||||
'2': { text: '已支付', color: 'success' },
|
||||
'3': { text: '已拒绝', color: 'warning' },
|
||||
'4': { text: '申请中', color: 'warning' }
|
||||
}
|
||||
}
|
||||
{ title: '时间', index: 'vinOutTime' },
|
||||
{ title: '地点', index: 'cityName' },
|
||||
];
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
@ -319,8 +309,7 @@ loadTime: any; // 货源单设置回显
|
||||
this.service.request(this.service.$api_getBulkBillDetail, {id: this.id}).subscribe(res => {
|
||||
if (res) {
|
||||
this.i = res;
|
||||
this.attObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'ATT')[0];
|
||||
this.totalObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TOTAL')[0];
|
||||
this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA');
|
||||
// 对装货凭证进行初始化
|
||||
let arr : any= []
|
||||
res?.receiptFilePath.forEach((element: any, index: any) => {
|
||||
@ -438,7 +427,13 @@ loadTime: any; // 货源单设置回显
|
||||
this.loadTime = res.loadTime
|
||||
this.unloadTime = res.unloadTime
|
||||
this.dirvingMessage = res.billExpenseDetails;
|
||||
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -516,6 +511,7 @@ loadTime: any; // 货源单设置回显
|
||||
// -------------------装卸货信息处理
|
||||
// 打开地图
|
||||
// 打开地图
|
||||
// 打开地图
|
||||
openMap(type: string, index: number) {
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '',
|
||||
@ -523,30 +519,32 @@ loadTime: any; // 货源单设置回显
|
||||
nzWidth: 900,
|
||||
nzOnOk: item => {
|
||||
const poi = item.poi;
|
||||
const locList = poi.pois;
|
||||
const locList = poi.location.toString().split(',');
|
||||
switch (type) {
|
||||
case 'start':
|
||||
this.startInfo[index].detailedAddress = poi.formattedAddress;
|
||||
this.startInfo[index].detailedAddress = poi.district + poi.name;
|
||||
this.startInfo[index].longitude = locList[0];
|
||||
this.startInfo[index].latitude = locList[1];
|
||||
this.startInfo[index].province = poi.addressComponent.province;
|
||||
this.startInfo[index].city = poi.addressComponent.city;
|
||||
this.startInfo[index].area = poi.addressComponent.district;
|
||||
this.startInfo[index].province = poi.cityInfo.province;
|
||||
this.startInfo[index].city = poi.cityInfo.city;
|
||||
this.startInfo[index].area = poi.cityInfo.district;
|
||||
this.startInfo[index].address = poi.name;
|
||||
break;
|
||||
case 'end':
|
||||
this.endInfo[index].detailedAddress = poi.formattedAddress;
|
||||
this.endInfo[index].detailedAddress = poi.district + poi.name;
|
||||
this.endInfo[index].longitude = locList[0];
|
||||
this.endInfo[index].latitude = locList[1];
|
||||
this.endInfo[index].province = poi.addressComponent.province;
|
||||
this.endInfo[index].city = poi.addressComponent.city;
|
||||
this.endInfo[index].area = poi.addressComponent.district;
|
||||
this.endInfo[index].province = poi.cityInfo.province;
|
||||
this.endInfo[index].city = poi.cityInfo.city;
|
||||
this.endInfo[index].area = poi.cityInfo.district;
|
||||
this.endInfo[index].address = poi.name;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
});
|
||||
@ -554,7 +552,6 @@ loadTime: any; // 货源单设置回显
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
initSF3() {
|
||||
this.schema3 = {
|
||||
properties: {
|
||||
@ -631,94 +628,6 @@ loadTime: any; // 货源单设置回显
|
||||
}
|
||||
};
|
||||
}
|
||||
initSF4() {
|
||||
this.schema4 = {
|
||||
properties: {
|
||||
weight: {
|
||||
type: 'string',
|
||||
title: '货物数量',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入',
|
||||
errors: { required: '必填项' }
|
||||
}
|
||||
},
|
||||
volume: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
number: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
carModel: {
|
||||
type: 'string',
|
||||
title: '车型/车长',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
mode: 'multiple',
|
||||
maxMultipleCount:3,
|
||||
placeholder: '请选择车型',
|
||||
errors: { required: '请选择车型' },
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }),
|
||||
change:(tag:any , org:any)=>{
|
||||
if(tag.includes("999")){
|
||||
this.sf4.setValue('/carModel',["999"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
carLength: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
mode: 'multiple',
|
||||
maxMultipleCount:3,
|
||||
placeholder: '请选择车长',
|
||||
errors: { required: '请选择车长' },
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
|
||||
change:(tag:any , org:any)=>{
|
||||
if(tag.includes("999")){
|
||||
this.sf4.setValue('/carModel',["999"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
required: ['weight', 'carModel', 'carLength']
|
||||
};
|
||||
this.ui4 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$weight: {
|
||||
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
|
||||
},
|
||||
$volume: {
|
||||
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
|
||||
},
|
||||
$number: {
|
||||
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
|
||||
},
|
||||
$carModel: {
|
||||
spanLabelFixed: 100,
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$carLength: {
|
||||
grid: { span: 8 }
|
||||
}
|
||||
};
|
||||
}
|
||||
changeGoodsType(value: string, data: any) {
|
||||
if (data.label === '其它') return;
|
||||
const params = {
|
||||
@ -745,165 +654,143 @@ changeGoodsType(value: string, data: any) {
|
||||
}
|
||||
});
|
||||
}
|
||||
// initSF4() {
|
||||
// this.schema4 = {
|
||||
// properties: {
|
||||
// weight: {
|
||||
// type: 'string',
|
||||
// title: '货物数量',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入',
|
||||
// errors: { required: '必填项' }
|
||||
// }
|
||||
// },
|
||||
// volume: {
|
||||
// type: 'string',
|
||||
// title: '',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
// number: {
|
||||
// type: 'string',
|
||||
// title: '',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
// carmand: {
|
||||
// type: 'string',
|
||||
// title: '用车需求',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
// drivers: {
|
||||
// type: 'string',
|
||||
// title: '承运司机',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
// weightModel: {
|
||||
// type: 'string',
|
||||
// title: '车型车长承重',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
// loadTime: {
|
||||
// type: 'string',
|
||||
// title: '发车时间',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
// unloadTime: {
|
||||
// type: 'string',
|
||||
// title: '到车时间',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
// acceptWeight: {
|
||||
// type: 'number',
|
||||
// title: '装货重量',
|
||||
// minimum:0,
|
||||
// maximum:99999,
|
||||
// ui: {
|
||||
// unit: '吨',
|
||||
// placeholder: '请输入',
|
||||
// grid: {
|
||||
// span: 12
|
||||
// },
|
||||
// hideStep: true,
|
||||
// } as SFNumberWidgetSchema
|
||||
// },
|
||||
// acceptVolume: {
|
||||
// type: 'number',
|
||||
// title: '装货体积',
|
||||
// minimum:0,
|
||||
// maximum:99999,
|
||||
// ui: {
|
||||
// unit: '吨',
|
||||
// placeholder: '请输入',
|
||||
// grid: {
|
||||
// span: 12
|
||||
// },
|
||||
// hideStep: true,
|
||||
// } as SFNumberWidgetSchema
|
||||
// },
|
||||
// settlementWeight: {
|
||||
// type: 'number',
|
||||
// title: '卸货重量',
|
||||
// minimum:0,
|
||||
// maximum:99999,
|
||||
// ui: {
|
||||
// unit: '吨',
|
||||
// placeholder: '请输入',
|
||||
// grid: {
|
||||
// span: 12
|
||||
// },
|
||||
// hideStep: true,
|
||||
// } as SFNumberWidgetSchema
|
||||
// },
|
||||
// settlementVolume: {
|
||||
// type: 'number',
|
||||
// title: '卸货体积',
|
||||
// minimum:0,
|
||||
// maximum:99999,
|
||||
// ui: {
|
||||
// unit: '吨',
|
||||
// placeholder: '请输入',
|
||||
// grid: {
|
||||
// span: 12
|
||||
// },
|
||||
// hideStep: true,
|
||||
// } as SFNumberWidgetSchema
|
||||
// }
|
||||
// },
|
||||
// required: ['weight','loadTime','unloadTime']
|
||||
// };
|
||||
// this.ui4 = {
|
||||
// '*': {
|
||||
// spanLabelFixed: 90,
|
||||
// grid: { span: 24 }
|
||||
// },
|
||||
// $weight: {
|
||||
// grid: { span: 8 }
|
||||
// },
|
||||
// $volume: {
|
||||
// grid: { span: 8 }
|
||||
// },
|
||||
// $number: {
|
||||
// grid: { span: 8 }
|
||||
// },
|
||||
// $carmand: {
|
||||
// grid: { span: 24 }
|
||||
// },
|
||||
// $weightModel: {
|
||||
// spanLabelFixed: 120,
|
||||
// grid: { span: 12 }
|
||||
// },
|
||||
// $drivers: {
|
||||
// grid: { span: 12 }
|
||||
// },
|
||||
// $loadTime: {
|
||||
// grid: { span: 12 }
|
||||
// },
|
||||
// $unloadTime: {
|
||||
// grid: { span: 12 }
|
||||
// },
|
||||
// };
|
||||
// }
|
||||
initSF4() {
|
||||
this.schema4 = {
|
||||
properties: {
|
||||
weight: {
|
||||
type: 'string',
|
||||
title: '货物数量',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入',
|
||||
errors: { required: '必填项' }
|
||||
}
|
||||
},
|
||||
carmand: {
|
||||
type: 'string',
|
||||
title: '用车需求',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
drivers: {
|
||||
type: 'string',
|
||||
title: '承运司机',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
weightModel: {
|
||||
type: 'string',
|
||||
title: '车型车长承重',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
loadTime: {
|
||||
type: 'string',
|
||||
title: '发车时间',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
unloadTime: {
|
||||
type: 'string',
|
||||
title: '到车时间',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
acceptWeight: {
|
||||
type: 'number',
|
||||
title: '装货重量',
|
||||
minimum:0,
|
||||
maximum:99999,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
grid: {
|
||||
span: 12
|
||||
},
|
||||
hideStep: true,
|
||||
} as SFNumberWidgetSchema
|
||||
},
|
||||
acceptVolume: {
|
||||
type: 'number',
|
||||
title: '装货体积',
|
||||
minimum:0,
|
||||
maximum:99999,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
grid: {
|
||||
span: 12
|
||||
},
|
||||
hideStep: true,
|
||||
} as SFNumberWidgetSchema
|
||||
},
|
||||
settlementWeight: {
|
||||
type: 'number',
|
||||
title: '卸货重量',
|
||||
minimum:0,
|
||||
maximum:99999,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
grid: {
|
||||
span: 12
|
||||
},
|
||||
hideStep: true,
|
||||
} as SFNumberWidgetSchema
|
||||
},
|
||||
settlementVolume: {
|
||||
type: 'number',
|
||||
title: '卸货体积',
|
||||
minimum:0,
|
||||
maximum:99999,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
grid: {
|
||||
span: 12
|
||||
},
|
||||
hideStep: true,
|
||||
} as SFNumberWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['loadTime','unloadTime']
|
||||
};
|
||||
this.ui4 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$weight: {
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$carmand: {
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$weightModel: {
|
||||
spanLabelFixed: 120,
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$drivers: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$loadTime: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$unloadTime: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
};
|
||||
}
|
||||
// 处理上传图片
|
||||
handlePreview1 = async (file: NzUploadFile) => {
|
||||
if (!file.url && !file.preview) {
|
||||
@ -970,4 +857,51 @@ goDistance(elf: NzCardComponent) {
|
||||
elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' });
|
||||
}
|
||||
}
|
||||
// 装卸货地址互换
|
||||
swapAddress() {
|
||||
let item = this.startInfo;
|
||||
this.startInfo = this.endInfo;
|
||||
this.endInfo = item;
|
||||
|
||||
this.startInfo.forEach((element: any) => {
|
||||
element.type = '1';
|
||||
});
|
||||
this.endInfo.forEach((element: any) => {
|
||||
element.type = '2';
|
||||
});
|
||||
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
});
|
||||
}
|
||||
}
|
||||
// 获取轨迹
|
||||
MapInit() {
|
||||
this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
const points = res.trackArray;
|
||||
let list :any[] = [];
|
||||
points?.forEach((item: any) => {
|
||||
list.push({
|
||||
name: item.hgt,
|
||||
lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))]
|
||||
});
|
||||
});
|
||||
this.MapList = list;
|
||||
this.addressItems = res.parkArray;
|
||||
if(this.addressItems && this.addressItems.length > 0){
|
||||
this.addressItems.forEach(item => {
|
||||
item.vinOutTime = this.getLocalTime(item.vinOutTime);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getLocalTime(time: any) {
|
||||
return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-06 20:20:26
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-02 11:14:37
|
||||
* @LastEditTime : 2022-03-04 14:07:44
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -44,7 +44,7 @@
|
||||
<sv label="货主">{{ i?.goodsResource?.shipperAppUserName }} </sv>
|
||||
<sv label="所属项目">{{ i?.goodsResource?.enterpriseProjectName }}</sv>
|
||||
<sv label="服务类型">{{ i?.goodsResource?.serviceTypeLabel }}</sv>
|
||||
<sv label="录单员">{{ i?.goodsResource?.createUserName }} /{{ i?.goodsResource?.createUserPhone }} </sv>
|
||||
<sv label="录单员">{{ i?.createUserName }} /{{ i?.createUserPhone }} </sv>
|
||||
<sv label="调度员">{{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} </sv>
|
||||
</div>
|
||||
<nz-tabset style="margin-top: 15px">
|
||||
@ -90,7 +90,7 @@
|
||||
<sv label="计划卸货时间">
|
||||
{{ i?.unloadPlanTime }}
|
||||
</sv>
|
||||
<sv label="接单数量"> {{ i?.acceptWeight }}吨,{{ i?.acceptVolume }}方,{{ i?.acceptNumber }}件 </sv>
|
||||
<sv label="接单数量"> {{ i?.acceptWeight }}吨,{{ i?.acceptVolume }}方 </sv>
|
||||
<sv *ngIf="i?.billStatus =='3' || i?.billStatus =='4' || i?.billStatus =='5'" label="装货数量"> {{ i?.acceptWeight }}吨,{{ i?.acceptVolume }}方,{{ i?.acceptNumber }}件 </sv>
|
||||
<sv *ngIf="i?.billStatus =='4' || i?.billStatus =='5'" label="卸货数量"> {{ i?.settlementWeight }}吨,{{ i?.settlementVolume }}方,{{ i?.acceptNumber }}件 </sv>
|
||||
</sv-container>
|
||||
@ -135,7 +135,8 @@
|
||||
</div>
|
||||
</nz-card>
|
||||
<nz-card nzTitle="运费信息" #distannce3>
|
||||
<h2>{{i?.goodsInfoList?.[0]?.freightPrice}}{{i?.goodsInfoList?.[0]?.freightTypeLabel}}(以发货为准,保留小数)</h2>
|
||||
<div *ngIf="(i?.billStatus == '3' && i.goodsInfoList?.[0].settlementBasis == '2') || (i?.billStatus == '4' && i.goodsInfoList?.[0].settlementBasis == '1')" >
|
||||
<h2>{{i?.goodsInfoList?.[0]?.freightPrice}}{{i?.goodsInfoList?.[0]?.freightTypeLabel}}({{ i?.goodsInfoList?.[0]?.settlementBasisLabel ? i?.goodsInfoList?.[0]?.settlementBasisLabel + ',' :' ' }}{{i?.goodsInfoList?.[0]?.ruleLabel}})</h2>
|
||||
<st #st [data]="billExpenses" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
|
||||
<ng-template st-row="PriceType" let-item let-index="index"> 到付 </ng-template>
|
||||
<ng-template st-row="price" let-item let-index="index">
|
||||
@ -152,6 +153,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div>收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card nzTitle="附件信息" #distannce4>
|
||||
@ -164,10 +166,10 @@
|
||||
</sv-container>
|
||||
<sv-container col="2" class="mt-md">
|
||||
<sv label="装货凭证">
|
||||
<app-imagelist [imgList]="[i?.loadingLadingBillFilePath, i?.loadingPeopleVehiclesGoodsFilePath]"> </app-imagelist>
|
||||
<app-imagelist *ngIf="i?.loadingLadingBillFilePath || i?.loadingPeopleVehiclesGoodsFilePath" [imgList]="[i?.loadingLadingBillFilePath, i?.loadingPeopleVehiclesGoodsFilePath]"> </app-imagelist>
|
||||
</sv>
|
||||
<sv label="卸货凭证">
|
||||
<app-imagelist [imgList]="[i?.unloadingLadingBillFilePath, i?.unloadingPeopleVehiclesGoodsFilePath]"> </app-imagelist>
|
||||
<app-imagelist *ngIf="i?.unloadingLadingBillFilePath || i?.unloadingPeopleVehiclesGoodsFilePath " [imgList]="[i?.unloadingLadingBillFilePath, i?.unloadingPeopleVehiclesGoodsFilePath]"> </app-imagelist>
|
||||
</sv>
|
||||
</sv-container>
|
||||
</nz-card>
|
||||
|
||||
@ -34,23 +34,8 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
attObj: any;
|
||||
isVisible = false;
|
||||
logColumns: STColumn[] = [
|
||||
{ title: '款项', index: 'costName', render: 'PriceType' },
|
||||
{ title: '运输费(元)', render: 'price' },
|
||||
{ title: '附加费(元)', render: 'surcharge' },
|
||||
{ title: '支付时间', index: 'paymentTime' },
|
||||
{
|
||||
title: '支付状态',
|
||||
className: 'text-center',
|
||||
index: 'paymentStatus',
|
||||
type: 'badge',
|
||||
width: '120px',
|
||||
badge: {
|
||||
'1': { text: '待申请', color: 'warning' },
|
||||
'2': { text: '已支付', color: 'success' },
|
||||
'3': { text: '已拒绝', color: 'warning' },
|
||||
'4': { text: '申请中', color: 'warning' }
|
||||
}
|
||||
}
|
||||
{ title: '时间', index: 'vinOutTime' },
|
||||
{ title: '地点', index: 'cityName' },
|
||||
];
|
||||
trajectory = 'car';
|
||||
addressItems: any[] = []; //打点地址数据组
|
||||
@ -71,9 +56,7 @@ export class OrderManagementBulkeDetailComponent implements OnInit {
|
||||
this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => {
|
||||
if (res) {
|
||||
this.i = res;
|
||||
console.log(this.i.billExpenseDetails )
|
||||
this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA');
|
||||
console.log(this.billExpenses )
|
||||
this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE");
|
||||
}
|
||||
});
|
||||
|
||||
@ -690,7 +690,7 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
};
|
||||
const params2 = {
|
||||
businessCode: item.billCode,
|
||||
passiveUserId: item.shipperAppUserId
|
||||
evaluateUserId: item.shipperAppUserId
|
||||
};
|
||||
this.service.request(this.service.$api_getBillEvaluateByShipper, params).subscribe(res => {
|
||||
console.log(res);
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-23 13:39:58
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-01 13:41:57
|
||||
* @LastEditTime : 2022-03-04 10:42:33
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -75,15 +75,12 @@
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="data1.detailedAddress"
|
||||
(click)="openMap('start', idx)"
|
||||
(click)="openMap('start', idx,data1.detailedAddress)"
|
||||
formControlName="loadAddress{{ idx }}"
|
||||
placeholder="请输入装货地"
|
||||
readonly="true"
|
||||
/>
|
||||
</nz-input-group>
|
||||
<!-- <span style="padding: 0 10px"
|
||||
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
|
||||
></span> -->
|
||||
</div>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
@ -115,7 +112,8 @@
|
||||
</div>
|
||||
<div nz-col [nzSpan]="4">
|
||||
<div style="display: flex; justify-content: center">
|
||||
<span style="padding: 24 px; font-size: 30px; color: #7d7d7d"><i nz-icon nzType="swap" nzTheme="outline"></i></span>
|
||||
<span class="swap-icon" (click)="swapAddress()"><i nz-icon nzType="swap"
|
||||
nzTheme="outline"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="10">
|
||||
@ -128,7 +126,7 @@
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="data2.detailedAddress"
|
||||
(click)="openMap('end', idx)"
|
||||
(click)="openMap('end', idx,data2.detailedAddress)"
|
||||
formControlName="unloadAddress{{ idx }}"
|
||||
placeholder="请输入卸货地"
|
||||
readonly="true"
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-23 13:39:58
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-28 11:53:31
|
||||
* @LastEditTime : 2022-03-04 10:48:50
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -14,7 +14,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { apiConf } from '@conf/api.conf';
|
||||
import { STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form';
|
||||
import { AmapPoiPickerComponent, AmapService, EAEnvironmentService, ShipperBaseService } from '@shared';
|
||||
import { AmapPoiPickerComponent, AmapService, EACacheService, EAEnvironmentService, ShipperBaseService } from '@shared';
|
||||
import { NzCardComponent } from 'ng-zorro-antd/card';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
@ -443,6 +443,13 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
this.loadTime = res.loadTime;
|
||||
this.unloadTime = res.unloadTime;
|
||||
this.dirvingMessage = res.billExpenseDetails;
|
||||
// 计算里程,时间
|
||||
if (this.startInfo?.[0]?.area && this.endInfo?.[0]?.area) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -553,32 +560,36 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
}
|
||||
// -------------------装卸货信息处理
|
||||
// 打开地图
|
||||
openMap(type: string, index: number) {
|
||||
openMap(type: string, index: number, address: string) {
|
||||
console.log(type);
|
||||
console.log(index);
|
||||
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '',
|
||||
nzComponentParams: { selectedAddress: address },
|
||||
nzContent: AmapPoiPickerComponent,
|
||||
nzWidth: 900,
|
||||
nzOnOk: item => {
|
||||
const poi = item.poi;
|
||||
const locList = poi.location.toString().split(',');
|
||||
const locList = poi.pois;
|
||||
switch (type) {
|
||||
case 'start':
|
||||
this.startInfo[index].detailedAddress = poi.district + poi.name;
|
||||
this.startInfo[index].detailedAddress = poi.formattedAddress;
|
||||
this.startInfo[index].longitude = locList[0];
|
||||
this.startInfo[index].latitude = locList[1];
|
||||
this.startInfo[index].province = poi.cityInfo.province;
|
||||
this.startInfo[index].city = poi.cityInfo.city;
|
||||
this.startInfo[index].area = poi.cityInfo.district;
|
||||
this.startInfo[index].address = poi.name;
|
||||
this.startInfo[index].province = poi.addressComponent.province;
|
||||
this.startInfo[index].city = poi.addressComponent.city;
|
||||
this.startInfo[index].area = poi.addressComponent.district;
|
||||
this.startInfo[index].address = poi.formattedAddress;
|
||||
break;
|
||||
case 'end':
|
||||
this.endInfo[index].detailedAddress = poi.district + poi.name;
|
||||
this.endInfo[index].detailedAddress = poi.formattedAddress;
|
||||
this.endInfo[index].longitude = locList[0];
|
||||
this.endInfo[index].latitude = locList[1];
|
||||
this.endInfo[index].province = poi.cityInfo.province;
|
||||
this.endInfo[index].city = poi.cityInfo.city;
|
||||
this.endInfo[index].area = poi.cityInfo.district;
|
||||
this.endInfo[index].address = poi.name;
|
||||
this.endInfo[index].province = poi.addressComponent.province;
|
||||
this.endInfo[index].city = poi.addressComponent.city;
|
||||
this.endInfo[index].area = poi.addressComponent.district;
|
||||
this.endInfo[index].address = poi.formattedAddress;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -593,7 +604,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
initSF3() {
|
||||
this.schema3 = {
|
||||
properties: {
|
||||
@ -874,4 +884,41 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
}
|
||||
console.log(elf);
|
||||
}
|
||||
// 装卸货地址互换
|
||||
swapAddress() {
|
||||
this.startInfo.forEach((element: any, index: any) => {
|
||||
this.validateForm1.removeControl(`loadAddress${index}`);
|
||||
this.validateForm1.removeControl(`loadName${index}`);
|
||||
this.validateForm1.removeControl(`loadPhone${index}`);
|
||||
});
|
||||
this.endInfo.forEach((element: any, index: any) => {
|
||||
this.validateForm1.removeControl(`unloadAddress${index}`);
|
||||
this.validateForm1.removeControl(`unloadName${index}`);
|
||||
this.validateForm1.removeControl(`unloadPhone${index}`);
|
||||
});
|
||||
|
||||
let item = this.startInfo;
|
||||
this.startInfo = this.endInfo;
|
||||
this.endInfo = item;
|
||||
|
||||
this.startInfo.forEach((element: any, index: any) => {
|
||||
element.type = '1';
|
||||
this.validateForm1.addControl(`loadAddress${index}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`loadName${index}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`loadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
|
||||
});
|
||||
this.endInfo.forEach((element: any, index: any) => {
|
||||
element.type = '2';
|
||||
this.validateForm1.addControl(`unloadAddress${index}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadName${index}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
|
||||
});
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -664,7 +664,7 @@ resourceStatus: any;
|
||||
}
|
||||
const params2 = {
|
||||
businessCode: item.billCode,
|
||||
passiveUserId: item.shipperAppUserId,
|
||||
evaluateUserId: item.shipperAppUserId,
|
||||
}
|
||||
this.service.request(this.service.$api_getBillEvaluateByShipper, params).subscribe(res => {
|
||||
console.log(res)
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-14 15:02:52
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-02 13:43:55
|
||||
* @LastEditTime : 2022-03-04 09:38:45
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\bulk\\confir-receipt\\confir-receipt.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -34,18 +34,18 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误
|
||||
</sv-container>
|
||||
<sv-container col="2">
|
||||
<sv label="装货重量">
|
||||
<div>{{detailList?.goodsInfoVO?.weight}}吨</div>
|
||||
<div>{{ detailList?.loadWeight }}吨</div>
|
||||
</sv>
|
||||
<sv label="装货体积">
|
||||
<div>{{detailList?.goodsInfoVO?.volume}}方</div>
|
||||
<div>{{ detailList?.loadVolume }}方</div>
|
||||
</sv>
|
||||
</sv-container>
|
||||
<sv-container col="2">
|
||||
<sv-container col="2" >
|
||||
<sv label="卸货重量">
|
||||
<div>{{detailList?.goodsInfoVO?.volume}}吨</div>
|
||||
<div>{{ detailList?.settlementWeight }}吨</div>
|
||||
</sv>
|
||||
<sv label="卸货体积">
|
||||
<div>{{detailList?.settlementVolume}}方</div>
|
||||
<div>{{ detailList?.settlementVolume }}方</div>
|
||||
</sv>
|
||||
</sv-container>
|
||||
<sv-container col="1">
|
||||
|
||||
@ -10,6 +10,16 @@
|
||||
-->
|
||||
<nz-alert nzType="info" [nzMessage]="'已选择'+ data?.ids?.length + '条订单'" nzShowIcon></nz-alert>
|
||||
<sf style="margin-top: 15px" #sf mode="edit" [schema]="schema" [ui]="ui" button="none"></sf>
|
||||
|
||||
<st #st [data]="service.$api_getChangeRecordWholeDetail" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams}"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{}"
|
||||
>
|
||||
<ng-template st-row="operator" let-item>
|
||||
{{item?.operator}}/{{item.telephone}}
|
||||
</ng-template>
|
||||
</st>
|
||||
<div class="modal-footer">
|
||||
<button nz-button type="button" (click)="close()">关闭</button>
|
||||
<button nz-button type="submit" nzType="primary" (click)="save(sf.value)">确定</button>
|
||||
|
||||
@ -4,12 +4,13 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-29 14:51:07
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-24 11:10:33
|
||||
* @LastEditTime : 2022-03-04 14:45:58
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\modify-rate\\modify-rate.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
|
||||
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { STColumn } from '@delon/abc/st';
|
||||
import { SFComponent, SFNumberWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
@ -24,7 +25,11 @@ export class VehicleModifyRateComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
schema: SFSchema = {};
|
||||
ui: SFUISchema = {};
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '内容', index: 'operationContent' },
|
||||
{ title: '操作人', index: 'operator' },
|
||||
{ title: '操作时间', index: 'operatorTimestamp' },
|
||||
];
|
||||
aggreechecked = false;
|
||||
|
||||
@Input()
|
||||
@ -36,6 +41,12 @@ export class VehicleModifyRateComponent implements OnInit {
|
||||
console.log(this.data);
|
||||
this.initSF();
|
||||
}
|
||||
get reqParams() {
|
||||
return {
|
||||
// operateObject: this.i?.resourceCode,
|
||||
// operateType: 4,
|
||||
};
|
||||
}
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-15 13:17:42
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-01-18 17:23:52
|
||||
* @LastEditTime : 2022-03-04 09:48:12
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\sure-arrive\\sure-arrive.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -12,13 +12,13 @@
|
||||
<sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="formData" button="none">
|
||||
<ng-template sf-template="weight" let-me let-ui="ui" let-schema="schema">
|
||||
<div style="display: flex">
|
||||
<nz-input-number [(ngModel)]="data.weight" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
||||
<nz-input-number [(ngModel)]="data.weight" [nzMin]="1" [nzMax]="999" [nzStep]="1"></nz-input-number>
|
||||
<div class="left_btn">吨</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template sf-template="volume" let-me let-ui="ui" let-schema="schema">
|
||||
<div style="display: flex">
|
||||
<nz-input-number [(ngModel)]="data.volume" [nzMin]="1" [nzMax]="10" [nzStep]="1"></nz-input-number>
|
||||
<nz-input-number [(ngModel)]="data.volume" [nzMin]="1" [nzMax]="999" [nzStep]="1"></nz-input-number>
|
||||
<div class="left_btn">方</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
@ -44,7 +44,7 @@ export class VehicleSureArriveComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
console.log(this.i)
|
||||
this.initData()
|
||||
this.i.time = this.i.loadingTime;
|
||||
this.i.time = this.i?.loadingTime;
|
||||
this.initSF();
|
||||
}
|
||||
initSF() {
|
||||
@ -407,7 +407,7 @@ export class VehicleSureArriveComponent implements OnInit {
|
||||
} as SFUploadWidgetSchema,
|
||||
}
|
||||
},
|
||||
required: ['time', 'weight' ]
|
||||
required: ['time' ]
|
||||
};
|
||||
}
|
||||
this.ui = {
|
||||
@ -429,9 +429,9 @@ export class VehicleSureArriveComponent implements OnInit {
|
||||
}
|
||||
const params = {
|
||||
id: this.i.id,
|
||||
imgUrl1: value.imgUrl1.data.fullFilePath,
|
||||
imgUrl2: value.imgUrl2.data.fullFilePath,
|
||||
time: value.time,
|
||||
imgUrl1: value?.imgUrl1?.data?.fullFilePath,
|
||||
imgUrl2: value?.imgUrl2?.data?.fullFilePath,
|
||||
time: value?.time,
|
||||
}
|
||||
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ')
|
||||
this.service.request(this.service.$api_get_insertWholeUnloadCarInfo, params).subscribe((res) => {
|
||||
@ -441,22 +441,19 @@ export class VehicleSureArriveComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if(!value.time || !this.data.weight) {
|
||||
if(!value.time ) {
|
||||
this.service.msgSrv.warning('必填项为空!')
|
||||
return;
|
||||
}
|
||||
console.log(value)
|
||||
console.log(this.i)
|
||||
const params = {
|
||||
id: this.i?.id,
|
||||
imgUrl1: value.imgUrl1.data.fullFilePath,
|
||||
imgUrl2: value.imgUrl2.data.fullFilePath,
|
||||
time: value.time,
|
||||
volume: this.data.volume,
|
||||
weight: this.data.weight
|
||||
imgUrl1: value?.imgUrl1?.data?.fullFilePath,
|
||||
imgUrl2: value?.imgUrl2?.data?.fullFilePath,
|
||||
time: value?.time,
|
||||
volume: this.data?.volume,
|
||||
weight: this.data?.weight
|
||||
}
|
||||
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ')
|
||||
console.log(params)
|
||||
this.service.request(this.service.$api_get_insertBulkUnloadCarInfo, params).subscribe((res) => {
|
||||
if(res) {
|
||||
this.service.msgSrv.success('确认到车成功!')
|
||||
|
||||
@ -99,7 +99,6 @@ export class VehicleSureDepartComponent implements OnInit {
|
||||
},
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
showRequired: true,
|
||||
} as SFUploadWidgetSchema,
|
||||
},
|
||||
imgUrl2: {
|
||||
@ -138,11 +137,10 @@ export class VehicleSureDepartComponent implements OnInit {
|
||||
},
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
showRequired: true,
|
||||
} as SFUploadWidgetSchema,
|
||||
}
|
||||
},
|
||||
required: ['reason']
|
||||
required: ['time']
|
||||
};
|
||||
} else {
|
||||
this.schema = {
|
||||
@ -210,7 +208,6 @@ export class VehicleSureDepartComponent implements OnInit {
|
||||
},
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
showRequired: true,
|
||||
} as SFUploadWidgetSchema,
|
||||
},
|
||||
imgUrl2: {
|
||||
@ -249,11 +246,10 @@ export class VehicleSureDepartComponent implements OnInit {
|
||||
},
|
||||
multiple: false,
|
||||
listType: 'picture-card',
|
||||
showRequired: true,
|
||||
} as SFUploadWidgetSchema,
|
||||
}
|
||||
},
|
||||
required: ['time', 'weight']
|
||||
required: ['time']
|
||||
};
|
||||
}
|
||||
|
||||
@ -268,15 +264,15 @@ export class VehicleSureDepartComponent implements OnInit {
|
||||
}
|
||||
save(value: any): void {
|
||||
if(this.Status === 1) {
|
||||
if(!value.time) {
|
||||
if(!value?.time) {
|
||||
this.service.msgSrv.warning('必填项为空!')
|
||||
return;
|
||||
}
|
||||
const params = {
|
||||
id: this.i.id,
|
||||
imgUrl1: value.imgUrl1.data.fullFilePath,
|
||||
imgUrl2: value.imgUrl2.data.fullFilePath,
|
||||
time: value.time,
|
||||
imgUrl1: value?.imgUrl1?.data?.fullFilePath,
|
||||
imgUrl2: value?.imgUrl2?.data?.fullFilePath,
|
||||
time: value?.time,
|
||||
}
|
||||
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ')
|
||||
this.service.request(this.service.$api_get_insertWholeStartCarInfo, params).subscribe((res) => {
|
||||
@ -286,18 +282,18 @@ export class VehicleSureDepartComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if(!value.time || !this.data.weight) {
|
||||
if(!value?.time) {
|
||||
this.service.msgSrv.warning('必填项为空!')
|
||||
return;
|
||||
}
|
||||
console.log(value)
|
||||
const params = {
|
||||
id: this.i.id,
|
||||
imgUrl1: value.imgUrl1.data.fullFilePath,
|
||||
imgUrl2: value.imgUrl2.data.fullFilePath,
|
||||
time: value.time,
|
||||
volume: this.data.volume,
|
||||
weight: this.data.weight
|
||||
imgUrl1: value?.imgUrl1?.data?.fullFilePath,
|
||||
imgUrl2: value?.imgUrl2?.data?.fullFilePath,
|
||||
time: value?.time,
|
||||
volume: this.data?.volume,
|
||||
weight: this.data?.weight
|
||||
}
|
||||
params.time = this.datePipe.transform(value.time, 'yyyy-MM-dd HH:mm:ss ')
|
||||
this.service.request(this.service.$api_get_insertBulkStartCarInfo, params).subscribe((res) => {
|
||||
|
||||
@ -171,7 +171,7 @@
|
||||
</nz-card>
|
||||
<nz-card nzTitle="操作日志">
|
||||
<st #st [data]="service.$api_getOperationLogRecordsList" [columns]="logColumns"
|
||||
[page]="{ show: false, showSize: false }"
|
||||
[page]="{}"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }">
|
||||
</st>
|
||||
|
||||
@ -65,7 +65,7 @@ export class SupplyManagementBulkDetailComponent implements OnInit {
|
||||
get reqParams() {
|
||||
return {
|
||||
operateObject: this.i?.resourceCode,
|
||||
operateType: 4,
|
||||
operateTypeList: [4,7],
|
||||
};
|
||||
}
|
||||
currentStatus = 0;
|
||||
|
||||
@ -464,19 +464,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
// receiptAddressId: {
|
||||
// type: 'string',
|
||||
// title: '选择地址',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请点击选择收回单地址',
|
||||
// // validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []),
|
||||
// visibleIf: {
|
||||
// receiptType: value => value === '2'
|
||||
// }
|
||||
// },
|
||||
// default: ''
|
||||
// },
|
||||
receiptUserName: {
|
||||
type: 'string',
|
||||
title: '联系人',
|
||||
@ -738,7 +725,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
nzContent: TranAgreementComponent,
|
||||
nzWidth: 900,
|
||||
nzFooter: null,
|
||||
nzComponentParams: { object: params, shipperName: this.shipperName }
|
||||
nzComponentParams: { object: params, shipperName: this.shipperName , type:'bulk'}
|
||||
});
|
||||
modalRef.afterClose.subscribe(result => {
|
||||
if (result) {
|
||||
@ -1024,6 +1011,13 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
if (this.PageStatus === '大宗修改') {
|
||||
this.sf4data.id = res?.goodsInfoVOList[0]?.id;
|
||||
}
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
});
|
||||
}
|
||||
this.totalFees = res?.freightPrice || '0';
|
||||
this.sf7data = {
|
||||
stateReceipt: res?.stateReceipt,
|
||||
@ -1096,13 +1090,13 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
element.type = '2';
|
||||
});
|
||||
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
});
|
||||
}
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
});
|
||||
}
|
||||
}
|
||||
getLimitvalue() {
|
||||
const getlimitvaluesParms = [
|
||||
|
||||
@ -48,6 +48,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
maxTrainNumber: 99999,
|
||||
maxFreight: 9999999
|
||||
}
|
||||
shipperName = '';
|
||||
// // 单位
|
||||
startInfo: any[] = [];
|
||||
endInfo: any[] = [];
|
||||
@ -139,10 +140,11 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
return of([]);
|
||||
}
|
||||
},
|
||||
change: (q: any) => {
|
||||
change: (q: any, qs: any) => {
|
||||
let str =q.replace(/^\s+|\s+$/g,"");
|
||||
if (str) {
|
||||
this.getRegionCode(str);
|
||||
this.shipperName = qs?.label;
|
||||
}
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
@ -606,51 +608,54 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
this.service.msgSrv.error(`当前运费单价已超出限定值【${this.limitValues.maxFreight}元】`);
|
||||
return;
|
||||
}
|
||||
|
||||
// //装卸货信息
|
||||
const LoadingList = this.startInfo.concat(this.endInfo);
|
||||
|
||||
// 货物信息
|
||||
const sf3Values = { ...this.sf3.value };
|
||||
if (sf3Values.goodsTypeName === '其它') {
|
||||
sf3Values.goodsName = sf3Values.goodsName1;
|
||||
delete sf3Values.goodsName1;
|
||||
}
|
||||
if (this.sf4.value.carModel.includes('999')) {
|
||||
this.sf4.value.carModel = ['999']
|
||||
}
|
||||
if (this.sf4.value.carLength.includes('999')) {
|
||||
this.sf4.value.carLength = ['999']
|
||||
}
|
||||
|
||||
const goodsInfoList = [
|
||||
{
|
||||
...sf3Values,
|
||||
...this.sf4.value,
|
||||
carModel: this.sf4.value.carModel.join(','),
|
||||
carLength: this.sf4.value.carLength.join(',')
|
||||
}
|
||||
];
|
||||
const params = {
|
||||
id: '',
|
||||
...this.sf1.value,
|
||||
unLoadingPlaceDTOList: LoadingList,
|
||||
goodsInfoDTOList: goodsInfoList,
|
||||
...this.sf6.value
|
||||
};
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '运输协议',
|
||||
nzContent: TranAgreementComponent,
|
||||
nzWidth: 900,
|
||||
nzFooter: null
|
||||
nzFooter: null,
|
||||
nzComponentParams: { object: params, shipperName: this.shipperName , type:'bulk'}
|
||||
});
|
||||
modalRef.afterClose.subscribe(result => {
|
||||
if (result) {
|
||||
this.submit(submitType);
|
||||
this.submit(submitType, params);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 确认提交(下单)
|
||||
submit(submitType: string): void {
|
||||
// //装卸货信息
|
||||
const LoadingList = this.startInfo.concat(this.endInfo);
|
||||
|
||||
// 货物信息
|
||||
const sf3Values = { ...this.sf3.value };
|
||||
if (sf3Values.goodsTypeName === '其它') {
|
||||
sf3Values.goodsName = sf3Values.goodsName1;
|
||||
delete sf3Values.goodsName1;
|
||||
}
|
||||
if (this.sf4.value.carModel.includes('999')) {
|
||||
this.sf4.value.carModel = ['999']
|
||||
}
|
||||
if (this.sf4.value.carLength.includes('999')) {
|
||||
this.sf4.value.carLength = ['999']
|
||||
}
|
||||
|
||||
const goodsInfoList = [
|
||||
{
|
||||
...sf3Values,
|
||||
...this.sf4.value,
|
||||
carModel: this.sf4.value.carModel.join(','),
|
||||
carLength: this.sf4.value.carLength.join(',')
|
||||
}
|
||||
];
|
||||
const params = {
|
||||
id: '',
|
||||
...this.sf1.value,
|
||||
unLoadingPlaceDTOList: LoadingList,
|
||||
goodsInfoDTOList: goodsInfoList,
|
||||
...this.sf6.value
|
||||
};
|
||||
submit(submitType?: string, params?: any): void {
|
||||
|
||||
|
||||
let reqUrl = this.service.$api_consignBulk;
|
||||
if (submitType === 'assign') {
|
||||
@ -839,13 +844,13 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
element.type = '2';
|
||||
});
|
||||
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
});
|
||||
}
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
});
|
||||
}
|
||||
}
|
||||
getLimitvalue() {
|
||||
const getlimitvaluesParms = [
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-12 10:52:50
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-02 18:09:01
|
||||
* @LastEditTime : 2022-03-04 15:45:58
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\bulk\\bulk.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -32,7 +32,7 @@
|
||||
</div>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="loading" (click)="search()" acl [acl-ability]="['SUPPLY-INDEX-bulkSearch']">查询</button>
|
||||
<button nz-button nzType="primary" [disabled]="loading">导入</button>
|
||||
<button nz-button nzType="primary" [disabled]="loading" (click)="exportFire()">导出</button>
|
||||
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
|
||||
@ -569,7 +569,12 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
}
|
||||
userAction() {
|
||||
|
||||
}
|
||||
// 导出
|
||||
exportFire() {
|
||||
this.service.request(this.service.$api_asyncExportBulkList, this.reqParams ).subscribe((res: any) => {
|
||||
if(res) {
|
||||
this.service.msgSrv.success('导出成功,请去下载中心下载!')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -228,13 +228,15 @@
|
||||
</ng-template>
|
||||
</sf>
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
<div class="card-title">服务信息</div>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="16">
|
||||
<sf #sf5 [schema]="schema5" [button]="'none'" [ui]="ui5" [formData]="sf5data">
|
||||
<ng-template sf-template="freeInsurance" let-i let-ui="ui">
|
||||
<ng-template sf-template="freeInsurance1" let-i let-ui="ui">
|
||||
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
|
||||
</ng-template>
|
||||
<ng-template sf-template="freeInsurance2" let-i let-ui="ui">
|
||||
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
|
||||
</ng-template>
|
||||
<ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a target="_blank" [queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《投保告知》</a></ng-template>
|
||||
@ -243,10 +245,10 @@
|
||||
<nz-input-number
|
||||
[ngModel]="i.value"
|
||||
[nzMin]="50000"
|
||||
[nzMax]="3000000"
|
||||
[nzMax]="2000000"
|
||||
[nzStep]="0.01"
|
||||
(ngModelChange)="i.setValue($event);getInsurersPrice()"
|
||||
nzPlaceHolder="请输入50000-3000000之间数值"
|
||||
nzPlaceHolder="请输入50000-2000000之间数值"
|
||||
></nz-input-number>
|
||||
</div>
|
||||
</ng-template>
|
||||
@ -258,9 +260,10 @@
|
||||
></span>
|
||||
<ng-template #template2>
|
||||
<p>注意事项:</p>
|
||||
<p>①请仔细阅读《投保告知》</p>
|
||||
<p>②港澳台、西藏不在投保范围内,不予承保</p>
|
||||
<p>③保价费最低收费2元,请按真实货值填写,录入的所有信息必须确保真实,不如实录入的内容,不承担对应赔偿责任。</p>
|
||||
<p>①请仔细阅读《投保告知函》;</p>
|
||||
<p>②香港、澳门、台湾、西藏、新疆不在投保范围内,不予承保;</p>
|
||||
<p>③最低保费12元/每单;单次运输保额仅限200万元以内;</p>
|
||||
<p>④本保险只限于货物起运前投保,起运后投保无效,保险人不负赔偿责任;</p>
|
||||
</ng-template>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
@ -411,7 +411,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
properties: {
|
||||
insuranceType: {
|
||||
type: 'string',
|
||||
title: '增值服务套餐',
|
||||
title: '服务包',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
asyncData: () => {
|
||||
@ -419,10 +419,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
map((res: any) => {
|
||||
return [...res];
|
||||
})
|
||||
);
|
||||
)
|
||||
},
|
||||
change: (tag: any, org: any) => {
|
||||
this.getInsurersPrice(tag);
|
||||
if(tag === '3'){
|
||||
this.sf5.setValue('/insurancePremium', null);
|
||||
this.sf5.setValue('/insuranceRate', null);
|
||||
}else {
|
||||
this.getInsurersPrice(tag);
|
||||
}
|
||||
}
|
||||
},
|
||||
default: '3'
|
||||
@ -430,31 +435,39 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
type1: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
enum: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险'],
|
||||
enum: ['资源曝光率 +10', '车源匹配率 +10'],
|
||||
readOnly: true,
|
||||
ui: {
|
||||
widget: 'checkbox',
|
||||
visibleIf: { insuranceType: (value: string) => value === '0' }
|
||||
} as SFCheckboxWidgetSchema,
|
||||
default: ['资源曝光率 +10', '车源匹配率 +10']
|
||||
},
|
||||
type2: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
enum: ['资源曝光率 +20', '车源匹配率 +20'],
|
||||
readOnly: true,
|
||||
ui: {
|
||||
widget: 'checkbox',
|
||||
visibleIf: { insuranceType: (value: string) => value === '1' }
|
||||
} as SFCheckboxWidgetSchema,
|
||||
default: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险']
|
||||
default: ['资源曝光率 +20', '车源匹配率 +20']
|
||||
},
|
||||
type2: {
|
||||
freeInsurance1: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
enum: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'],
|
||||
readOnly: true,
|
||||
ui: {
|
||||
widget: 'checkbox',
|
||||
visibleIf: { insuranceType: (value: string) => value === '2' }
|
||||
} as SFCheckboxWidgetSchema,
|
||||
default: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险']
|
||||
},
|
||||
freeInsurance: {
|
||||
type: 'string',
|
||||
title: '赠送保险',
|
||||
title: '赠送基本险',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
visibleIf: { insuranceType: (value: string) => value !== '3' }
|
||||
visibleIf: { insuranceType: (value: string) => value === '0' }
|
||||
}
|
||||
},
|
||||
freeInsurance2: {
|
||||
type: 'string',
|
||||
title: '赠送综合险',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
visibleIf: { insuranceType: (value: string) => value === '1' }
|
||||
}
|
||||
},
|
||||
insurancePackagedGoods: {
|
||||
@ -480,7 +493,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
title: '货物价值',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
descriptionI18n: '输入50000-3000000之间数值',
|
||||
visibleIf: { insuranceType: (value: string) => value !== '3' }
|
||||
}
|
||||
},
|
||||
@ -514,7 +526,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
$type2: {
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$freeInsurance: {
|
||||
$freeInsurance1: {
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$freeInsurance2: {
|
||||
grid: { span: 24 }
|
||||
}
|
||||
};
|
||||
@ -566,65 +581,45 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
receiptAddress: {
|
||||
type: 'string',
|
||||
title: '回单收件人信息',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请点击选择回单收件人信息',
|
||||
// validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []),
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
receiptAddressId: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
receiptUserName: {
|
||||
type: 'string',
|
||||
title: '联系人',
|
||||
maxLength: 15,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
}
|
||||
},
|
||||
phon: {
|
||||
receiptUserPhone: {
|
||||
type: 'string',
|
||||
title: '联系电话',
|
||||
maxLength: 11,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
}
|
||||
},
|
||||
area: {
|
||||
receiptAddressArea: {
|
||||
type: 'string',
|
||||
title: '所在地区',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
}
|
||||
},
|
||||
address: {
|
||||
receiptAddress: {
|
||||
type: 'string',
|
||||
title: '详细地址',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
}
|
||||
},
|
||||
remarks: {
|
||||
type: 'string',
|
||||
@ -637,11 +632,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
} as SFTextareaWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['stateReceipt', 'receiptType', 'receiptAddress']
|
||||
required: ['stateReceipt', 'receiptType', 'receiptUserName', 'receiptUserPhone', 'receiptAddressArea', 'receiptAddress']
|
||||
};
|
||||
this.ui6 = {
|
||||
'*': {
|
||||
spanLabelFixed: 115,
|
||||
spanLabelFixed: 90,
|
||||
grid: { span: 24 }
|
||||
}
|
||||
};
|
||||
@ -1004,7 +999,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
nzContent: TranAgreementComponent,
|
||||
nzWidth: 900,
|
||||
nzFooter: null,
|
||||
nzComponentParams: { object: params, shipperName: this.shipperName }
|
||||
nzComponentParams: { object: params, shipperName: this.shipperName,type:'onecar' }
|
||||
});
|
||||
modalRef.afterClose.subscribe(result => {
|
||||
if (result) {
|
||||
@ -1050,6 +1045,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
// 打开地图
|
||||
openMap(type: string, index: number) {
|
||||
console.log(type);
|
||||
console.log(index);
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '',
|
||||
nzContent: AmapPoiPickerComponent,
|
||||
@ -1197,13 +1194,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required));
|
||||
}
|
||||
|
||||
// 计算里程,时间
|
||||
if (this.startInfo?.[0]?.area && this.endInfo?.[0]?.area) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
});
|
||||
}
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
this.getInsurersPrice(); //计算保费金额
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.sf3data = {
|
||||
@ -1312,14 +1310,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
this.getInsurersPrice(); //计算保费金额
|
||||
});
|
||||
}
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
this.getInsurersPrice(); //计算保费金额
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1363,7 +1361,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
|
||||
});
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
|
||||
@ -238,7 +238,10 @@
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="16">
|
||||
<sf #sf5 [schema]="schema5" [button]="'none'" [ui]="ui5" [formData]="sf5data">
|
||||
<ng-template sf-template="freeInsurance" let-i let-ui="ui">
|
||||
<ng-template sf-template="freeInsurance1" let-i let-ui="ui">
|
||||
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
|
||||
</ng-template>
|
||||
<ng-template sf-template="freeInsurance2" let-i let-ui="ui">
|
||||
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
|
||||
</ng-template>
|
||||
<ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a target="_blank" [queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《投保告知》</a></ng-template>
|
||||
@ -247,10 +250,10 @@
|
||||
<nz-input-number
|
||||
[ngModel]="i.value"
|
||||
[nzMin]="50000"
|
||||
[nzMax]="3000000"
|
||||
[nzMax]="2000000"
|
||||
[nzStep]="0.01"
|
||||
(ngModelChange)="i.setValue($event);getInsurersPrice()"
|
||||
nzPlaceHolder="请输入50000-3000000之间数值"
|
||||
nzPlaceHolder="请输入50000-2000000之间数值"
|
||||
></nz-input-number>
|
||||
</div>
|
||||
</ng-template>
|
||||
@ -262,9 +265,10 @@
|
||||
></span>
|
||||
<ng-template #template2>
|
||||
<p>注意事项:</p>
|
||||
<p>①请仔细阅读《投保告知》</p>
|
||||
<p>②港澳台、西藏不在投保范围内,不予承保</p>
|
||||
<p>③保价费最低收费2元,请按真实货值填写,录入的所有信息必须确保真实,不如实录入的内容,不承担对应赔偿责任。</p>
|
||||
<p>①请仔细阅读《投保告知函》;</p>
|
||||
<p>②香港、澳门、台湾、西藏、新疆不在投保范围内,不予承保;</p>
|
||||
<p>③最低保费12元/每单;单次运输保额仅限200万元以内;</p>
|
||||
<p>④本保险只限于货物起运前投保,起运后投保无效,保险人不负赔偿责任;</p>
|
||||
</ng-template>
|
||||
</div>
|
||||
</ng-template>
|
||||
@ -277,15 +281,6 @@
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="12">
|
||||
<sf #sf6 [schema]="schema6" [button]="'none'" [ui]="ui6" [formData]="sf6data">
|
||||
<!-- <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>
|
||||
</div>
|
||||
|
||||
@ -411,7 +411,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
properties: {
|
||||
insuranceType: {
|
||||
type: 'string',
|
||||
title: '增值服务套餐',
|
||||
title: '服务包',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
asyncData: () => {
|
||||
@ -419,10 +419,15 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
map((res: any) => {
|
||||
return [...res];
|
||||
})
|
||||
);
|
||||
)
|
||||
},
|
||||
change: (tag: any, org: any) => {
|
||||
this.getInsurersPrice(tag);
|
||||
if(tag === '3'){
|
||||
this.sf5.setValue('/insurancePremium', null);
|
||||
this.sf5.setValue('/insuranceRate', null);
|
||||
}else {
|
||||
this.getInsurersPrice(tag);
|
||||
}
|
||||
}
|
||||
},
|
||||
default: '3'
|
||||
@ -430,31 +435,39 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
type1: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
enum: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险'],
|
||||
enum: ['资源曝光率 +10', '车源匹配率 +10'],
|
||||
readOnly: true,
|
||||
ui: {
|
||||
widget: 'checkbox',
|
||||
visibleIf: { insuranceType: (value: string) => value === '0' }
|
||||
} as SFCheckboxWidgetSchema,
|
||||
default: ['资源曝光率 +10', '车源匹配率 +10']
|
||||
},
|
||||
type2: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
enum: ['资源曝光率 +20', '车源匹配率 +20'],
|
||||
readOnly: true,
|
||||
ui: {
|
||||
widget: 'checkbox',
|
||||
visibleIf: { insuranceType: (value: string) => value === '1' }
|
||||
} as SFCheckboxWidgetSchema,
|
||||
default: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险']
|
||||
default: ['资源曝光率 +20', '车源匹配率 +20']
|
||||
},
|
||||
type2: {
|
||||
freeInsurance1: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
enum: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'],
|
||||
readOnly: true,
|
||||
ui: {
|
||||
widget: 'checkbox',
|
||||
visibleIf: { insuranceType: (value: string) => value === '2' }
|
||||
} as SFCheckboxWidgetSchema,
|
||||
default: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险']
|
||||
},
|
||||
freeInsurance: {
|
||||
type: 'string',
|
||||
title: '赠送保险',
|
||||
title: '赠送基本险',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
visibleIf: { insuranceType: (value: string) => value !== '3' }
|
||||
visibleIf: { insuranceType: (value: string) => value === '0' }
|
||||
}
|
||||
},
|
||||
freeInsurance2: {
|
||||
type: 'string',
|
||||
title: '赠送综合险',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
visibleIf: { insuranceType: (value: string) => value === '1' }
|
||||
}
|
||||
},
|
||||
insurancePackagedGoods: {
|
||||
@ -480,7 +493,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
title: '货物价值',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
descriptionI18n: '输入50000-3000000之间数值',
|
||||
visibleIf: { insuranceType: (value: string) => value !== '3' }
|
||||
}
|
||||
},
|
||||
@ -514,7 +526,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
$type2: {
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$freeInsurance: {
|
||||
$freeInsurance1: {
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$freeInsurance2: {
|
||||
grid: { span: 24 }
|
||||
}
|
||||
};
|
||||
@ -550,65 +565,45 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
receiptAddress: {
|
||||
type: 'string',
|
||||
title: '回单收件人信息',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请点击选择回单收件人信息',
|
||||
// validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []),
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
default: ''
|
||||
},
|
||||
receiptAddressId: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
receiptUserName: {
|
||||
type: 'string',
|
||||
title: '联系人',
|
||||
maxLength: 15,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
}
|
||||
},
|
||||
phon: {
|
||||
receiptUserPhone: {
|
||||
type: 'string',
|
||||
title: '联系电话',
|
||||
maxLength: 11,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
}
|
||||
},
|
||||
area: {
|
||||
receiptAddressArea: {
|
||||
type: 'string',
|
||||
title: '所在地区',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
}
|
||||
},
|
||||
address: {
|
||||
receiptAddress: {
|
||||
type: 'string',
|
||||
title: '详细地址',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
visibleIf: {
|
||||
receiptType: value => value === '2'
|
||||
}
|
||||
},
|
||||
readOnly: true
|
||||
}
|
||||
},
|
||||
remarks: {
|
||||
type: 'string',
|
||||
@ -621,11 +616,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
} as SFTextareaWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['stateReceipt', 'receiptType', 'receiptAddress']
|
||||
required: ['stateReceipt', 'receiptType', 'receiptUserName', 'receiptUserPhone', 'receiptAddressArea', 'receiptAddress']
|
||||
};
|
||||
this.ui6 = {
|
||||
'*': {
|
||||
spanLabelFixed: 115,
|
||||
spanLabelFixed: 90,
|
||||
grid: { span: 24 }
|
||||
}
|
||||
};
|
||||
@ -979,7 +974,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
nzContent: TranAgreementComponent,
|
||||
nzWidth: 900,
|
||||
nzFooter: null,
|
||||
nzComponentParams: { object: params ,shipperName: this.shipperName}
|
||||
nzComponentParams: { object: params ,shipperName: this.shipperName,type:'onecar'}
|
||||
});
|
||||
modalRef.afterClose.subscribe(result => {
|
||||
if (result) {
|
||||
@ -1176,14 +1171,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
this.validateForm1.addControl(`unloadName${index}`, new FormControl(null, Validators.required));
|
||||
this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
|
||||
});
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
this.getInsurersPrice(); //计算保费金额
|
||||
});
|
||||
}
|
||||
// 计算里程,时间
|
||||
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
|
||||
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
|
||||
this.totalDistance = res.distance;
|
||||
this.totalTime = res.time;
|
||||
this.getInsurersPrice(); //计算保费金额
|
||||
});
|
||||
}
|
||||
}
|
||||
// 计算保价费金额
|
||||
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-02-24 20:19:51
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-03 14:24:51
|
||||
* @LastEditTime : 2022-03-04 16:46:31
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -28,6 +28,8 @@ import { SupplyManagementService } from '../../services/supply-management.servic
|
||||
styleUrls: ['./tran-agreement.component.less']
|
||||
})
|
||||
export class TranAgreementComponent {
|
||||
enterpriseInfo:any; // 网络货运人
|
||||
type:any;
|
||||
object: any;
|
||||
agreement:any;
|
||||
envCache:any;
|
||||
@ -38,13 +40,30 @@ export class TranAgreementComponent {
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.object)
|
||||
const params = {
|
||||
// 获取托运人承运人信息
|
||||
this.service.request(this.service.$api_getContractAtr,{id:this.object?.shipperAppUserId}).subscribe(res => {
|
||||
if (res) {
|
||||
this.enterpriseInfo = res
|
||||
this.getContent();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
getContent() {
|
||||
let params:any;
|
||||
if(this.type ==='onecar'){
|
||||
|
||||
params = {
|
||||
contractType:'1',
|
||||
resourceType: '1',
|
||||
signingObject: '1',
|
||||
templateType: 'MX',
|
||||
parametersDTO: {
|
||||
contractCode:'',
|
||||
shipperLegalPersonName:this.enterpriseInfo.legalPersonName, //托运法定代表人
|
||||
carrierLegalPersonName:this.enterpriseInfo.netLegalPersonName, //承运法定代表人
|
||||
shipperName:this?.shipperName, //托运人
|
||||
carrierName:this.object?.enterpriseInfoName, //承运人
|
||||
consignorInfo: `${this.object?.unLoadingPlaceDTOList[0].appUserName} ${this.object?.unLoadingPlaceDTOList[0].contractTelephone}`, // 发货信息
|
||||
@ -69,15 +88,48 @@ export class TranAgreementComponent {
|
||||
day:new Date().getDate(), // 签约日期
|
||||
}
|
||||
}
|
||||
} else if(this.type ==='bulk'){
|
||||
params = {
|
||||
contractType:'1',
|
||||
resourceType: '2',
|
||||
signingObject: '1',
|
||||
templateType: 'MX',
|
||||
parametersDTO: {
|
||||
contractCode:'',
|
||||
shipperName:this?.shipperName, //托运人
|
||||
carrierName:this.object?.enterpriseInfoName, //承运人
|
||||
shipperLegalPersonName:this.enterpriseInfo.legalPersonName, //托运法定代表人
|
||||
carrierLegalPersonName:this.enterpriseInfo.netLegalPersonName, //承运法定代表人
|
||||
consignorInfo: `${this.object.unLoadingPlaceDTOList[0].appUserName} ${this.object.unLoadingPlaceDTOList[0].contractTelephone}`, // 发货信息
|
||||
consignorAddress: this.object.unLoadingPlaceDTOList[0].detailedAddress, // 发货地址
|
||||
consignorDate: '', // 发货时间
|
||||
consigneeInfo: `${this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].appUserName} ${this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].contractTelephone}`, // 收货信息
|
||||
consigneeDate: '', // 收货时间
|
||||
consigneeAddress: this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].detailedAddress, // 收货地址
|
||||
goodsName:this.object.goodsInfoDTOList[0].goodsName, // 货物名称
|
||||
shippingType:'大宗运输',
|
||||
consignmentVolume:`${this.object.goodsInfoDTOList[0].weight}吨/${this.object.goodsInfoDTOList[0].volume}方/${this.object.goodsInfoDTOList[0].number}车`, //托运量
|
||||
transporterInfo:'', //运输方信息
|
||||
freightAmount:'', // 订单运费金额(元)
|
||||
pre:'', //预付
|
||||
rece:'',// 到付
|
||||
back:'',// 回单付
|
||||
lunarKnot:'',
|
||||
total:'', // 合计(元)
|
||||
paymentTime:`到货后${this.object.paymentDays}天`, // 承诺支付运费时间
|
||||
year:new Date().getFullYear(), // 签约年份
|
||||
month:new Date().getMonth()+1, // 签约月份
|
||||
day:new Date().getDate(), // 签约日期
|
||||
},
|
||||
}
|
||||
}
|
||||
console.log(params)
|
||||
this.service.request(this.service.$api_getContractContent,params).subscribe((res) => {
|
||||
if (res) {
|
||||
|
||||
this.agreement = res.contractContent;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
handleOk(){
|
||||
this.modal.close(true);
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-03 11:10:14
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-16 15:02:33
|
||||
* @LastEditTime : 2022-03-04 14:37:19
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\update-price\\update-price.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -25,12 +25,15 @@
|
||||
</div>
|
||||
<div>
|
||||
<h4>变更日志</h4>
|
||||
<st #st [data]="service.$api_getOperationLogRecordsList" [bordered]="true" [columns]="columns" [page]="{ show: false }" [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }">
|
||||
<ng-template st-row="operator" let-item let-index="index">
|
||||
<span>{{item.operator}}</span>/
|
||||
<span>{{item.telephone}}</span>
|
||||
</ng-template>
|
||||
</st>
|
||||
<st #st [data]="service.$api_getOperationLogRecordsList" [columns]="columns"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams}"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
|
||||
[page]="{}"
|
||||
>
|
||||
<ng-template st-row="operator" let-item>
|
||||
{{item?.operator}}/{{item.telephone}}
|
||||
</ng-template>
|
||||
</st>
|
||||
</div>
|
||||
<ng-template #addOnAfterTemplate>
|
||||
<span> {{ freightType[i?.freightType] }}</span>
|
||||
|
||||
@ -159,10 +159,10 @@
|
||||
<sv label="增值服务套餐">
|
||||
{{ i?.insuranceTypeLabel }}
|
||||
</sv>
|
||||
<sv label="货物价值">
|
||||
<sv label="货物价值" *ngIf="i?.insuranceType !== '3'">
|
||||
{{ i?.goodsValue | currency }}
|
||||
</sv>
|
||||
<sv label="保价费金额"> {{ i?.insurancePremium | currency }} 元 </sv>
|
||||
<sv label="保价费金额" *ngIf="i?.insuranceType !== '3'"> {{ i?.insurancePremium | currency }} 元 </sv>
|
||||
</sv-container>
|
||||
</nz-card>
|
||||
<nz-card [nzTitle]="'运费信息(到货后' + i?.paymentDays + '天内支付运费)'">
|
||||
@ -213,7 +213,7 @@
|
||||
</nz-card>
|
||||
<nz-card nzTitle="操作日志">
|
||||
<st #st [data]="service.$api_getOperationLogRecordsList" [columns]="logColumns"
|
||||
[page]="{ show: false, showSize: false }"
|
||||
[page]="{}"
|
||||
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
|
||||
[res]="{ reName: { list: 'data.records', total: 'data.total' } }">
|
||||
</st>
|
||||
|
||||
@ -53,7 +53,7 @@ export class SupplyManagementVehicleDetailComponent implements OnInit {
|
||||
get reqParams() {
|
||||
return {
|
||||
operateObject: this.i?.resourceCode,
|
||||
operateType: 4,
|
||||
operateTypeList: [4,7],
|
||||
};
|
||||
}
|
||||
constructor(
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-12 10:52:50
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-03 16:34:12
|
||||
* @LastEditTime : 2022-03-04 09:57:16
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\vehicle\\vehicle.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -31,7 +31,7 @@
|
||||
[acl-ability]="['SUPPLY-INDEX-vehicleSearch']"
|
||||
>查询</button
|
||||
>
|
||||
<button nz-button nzType="primary" [disabled]="loading">导出</button>
|
||||
<button nz-button nzType="primary" [disabled]="loading" (click)="exportFire()" >导出</button>
|
||||
<button nz-button [disabled]="loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
@ -80,10 +80,10 @@
|
||||
<p>{{ item?.resourceStatusLabel }}</p>
|
||||
</ng-template>
|
||||
<ng-template st-row="total" let-item let-index="index">
|
||||
<div class="mr-xs">{{ item?.totalAmount + item?.surcharge | currency }} </div>
|
||||
<div class="mr-xs">{{ item?.totalAmount | currency }} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="totalAmount" let-item let-index="index">
|
||||
<div class="mr-xs">{{ item?.totalAmount | currency }} </div>
|
||||
<div class="mr-xs">{{ item?.freight | currency }} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="surcharge" let-item let-index="index">
|
||||
<div class="mr-xs">{{ item?.surcharge | currency }} </div>
|
||||
|
||||
@ -611,4 +611,12 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
}
|
||||
];
|
||||
}
|
||||
// 导出
|
||||
exportFire() {
|
||||
this.service.request(this.service.$api_asyncExportWholeList, this.reqParams ).subscribe((res: any) => {
|
||||
if(res) {
|
||||
this.service.msgSrv.success('导出成功,请去下载中心下载!')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,8 +54,8 @@ export class SupplyManagementService extends BaseService {
|
||||
$api_getCalculatedSurcharge = `/api/sdc/expense/getCalculatedSurcharge`;
|
||||
// 整车计算附加费率
|
||||
$api_getcalculatedServiceRate = `/api/sdc/expense/getAdditionalRate`;
|
||||
// 整车计算附加费率
|
||||
$api_getAdditionalRate = `/api/sdc/expense/getAdditionalRate`;
|
||||
// 整车计算附加费率
|
||||
$api_getAdditionalRate = `/api/sdc/expense/getAdditionalRate`;
|
||||
// 代发整车货源
|
||||
$api_consignWhole = `/api/sdc/goodsResourceOperate/consignWhole`;
|
||||
// 代发大宗货源
|
||||
@ -139,20 +139,20 @@ export class SupplyManagementService extends BaseService {
|
||||
super(injector);
|
||||
}
|
||||
public limitKeys = {
|
||||
weight:'sys.config.goods.approvalCarMaxWeight', //整车-核载重量上限
|
||||
volume:'sys.config.goods.approvalCarMaxVolume', //整车-核载体积上限
|
||||
piece:'sys.config.goods.approvalCarMaxPiece', //整车-核载件数上限
|
||||
maxDays:'sys.config.goods.wholeLoadingMaxDays', //整车-计划装货时间上限
|
||||
intervalDays:'sys.config.goods.wholeUnloadingIntervalDays', //计划装、卸货时间间隔
|
||||
maxTimes:'sys.config.goods.wholeLoadingMaxTimes', //整车-多装多卸地点上限
|
||||
}
|
||||
weight: 'sys.config.goods.approvalCarMaxWeight', //整车-核载重量上限
|
||||
volume: 'sys.config.goods.approvalCarMaxVolume', //整车-核载体积上限
|
||||
piece: 'sys.config.goods.approvalCarMaxPiece', //整车-核载件数上限
|
||||
maxDays: 'sys.config.goods.wholeLoadingMaxDays', //整车-计划装货时间上限
|
||||
intervalDays: 'sys.config.goods.wholeUnloadingIntervalDays', //计划装、卸货时间间隔
|
||||
maxTimes: 'sys.config.goods.wholeLoadingMaxTimes' //整车-多装多卸地点上限
|
||||
};
|
||||
public limitKeys2 = {
|
||||
month:'sys.config.goods.bulkEndMaxMonth', //大宗-截止时间上限
|
||||
weight:'sys.config.goods.bulkMaxWeight', //大宗-重量上限
|
||||
volume:'sys.config.goods.bulkMaxVolume', //大宗-体积上限
|
||||
trainNumber:'sys.config.goods.bulkMaxTrainNumber', //大宗-车次上限
|
||||
freight:'sys.config.goods.bulkMaxUnitFreight', //大宗-运费单价上限
|
||||
}
|
||||
month: 'sys.config.goods.bulkEndMaxMonth', //大宗-截止时间上限
|
||||
weight: 'sys.config.goods.bulkMaxWeight', //大宗-重量上限
|
||||
volume: 'sys.config.goods.bulkMaxVolume', //大宗-体积上限
|
||||
trainNumber: 'sys.config.goods.bulkMaxTrainNumber', //大宗-车次上限
|
||||
freight: 'sys.config.goods.bulkMaxUnitFreight' //大宗-运费单价上限
|
||||
};
|
||||
// 根据ItemKey获取项值
|
||||
public $api_findItemValueByItemKeys = '/api/mdc/pbc/sysConfigItem/findItemValueByItemKeys';
|
||||
// 获取保价费信息
|
||||
@ -163,8 +163,14 @@ export class SupplyManagementService extends BaseService {
|
||||
public $api_goodsResourceOperateImport = '/api/sdc/uploadGoodsResource/goodsResourceOperateImport';
|
||||
// 根据货主ID查询网络货运人信息
|
||||
public $api_getNetworkTransporter = '/api/mdc/cuc/enterpriseInfo/operate/getNetworkTransporter';
|
||||
$api_verify_vehicle_status = `/api/sdc/goodsResourceShipper/saveVerify`;// 发布货源校验司机/车队长的状态
|
||||
$api_verify_vehicle_status = `/api/sdc/goodsResourceShipper/saveVerify`; // 发布货源校验司机/车队长的状态
|
||||
$api_get_sys_config = `/api/mdc/pbc/sysConfigItem/findConfigValues`; // 根据项key、业务id获取配置信息
|
||||
// 获取指派熟车列表
|
||||
$api_getListCars = '/api/mdc/cuc/enterpriseVehicle/getPracticeCarList';
|
||||
// 获取指派熟车列表
|
||||
$api_getListCars = '/api/mdc/cuc/enterpriseVehicle/getPracticeCarList';
|
||||
// 异步导出运营后台大宗货源列表
|
||||
$api_asyncExportBulkList = '/api/sdc/goodsResourceOperate/asyncExportBulkList';
|
||||
// 异步导出运营后台整车货源列表
|
||||
$api_asyncExportWholeList = '/api/sdc/goodsResourceOperate/asyncExportWholeList';
|
||||
// 根据货主ID查询合同签署属性
|
||||
public $api_getContractAtr = '/api/mdc/cuc/enterpriseInfo/cargoOwner/getContractAtr';
|
||||
}
|
||||
|
||||
@ -38,9 +38,11 @@ export class InvoiceDetailComponent implements OnInit {
|
||||
routes: []
|
||||
};
|
||||
id: any = null;
|
||||
type: any = 1;
|
||||
constructor(public service: TicketService, private route: ActivatedRoute) {
|
||||
this.isCanEdit = !!route.snapshot.queryParams.type;
|
||||
const expressno = route.snapshot.queryParams.expressno;
|
||||
this.type = route.snapshot.queryParams.type;
|
||||
this.id = route.snapshot.params.id;
|
||||
this.loadInvoiceHeader(this.id);
|
||||
if (expressno) {
|
||||
@ -156,7 +158,7 @@ export class InvoiceDetailComponent implements OnInit {
|
||||
width: 120,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.billkpnotax }) }
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: this.type ==='2'?record.billkpmoney: record.billkpnotax }) }
|
||||
},
|
||||
{
|
||||
title: '运输费',
|
||||
@ -209,7 +211,7 @@ export class InvoiceDetailComponent implements OnInit {
|
||||
private initCostST(): STColumn[] {
|
||||
return [
|
||||
{ title: '费用号', index: 'feeHId' },
|
||||
{ title: '订单号', index: 'billHId' },
|
||||
{ title: '订单号', index: 'billHCode' },
|
||||
{ title: '订单日期', index: 'createTime', type: 'date' },
|
||||
{ title: '计费日期', index: 'feeDate', type: 'date' },
|
||||
{ title: '税率', index: 'vatrate', format: item => `${item.vatrate ? ((item.vatrate as number) * 100).toFixed(2) : 0}%` },
|
||||
|
||||
@ -16,10 +16,10 @@
|
||||
{{headerInfo?.vatappcode}}
|
||||
</se>
|
||||
<se label="已开/全部订单数">
|
||||
{{headerInfo?.vatinvBillNum}} / {{headerInfo?.ordlines}}
|
||||
{{headerInfo?.vatinvHNum}} / {{headerInfo?.vatinvBillNum}}
|
||||
</se>
|
||||
<se label="已开/全部发票金额">
|
||||
{{headerInfo?.vatinvHAmount}} / {{headerInfo?.vatinvHAmount}}
|
||||
{{headerInfo?.vatinvHAmount}} / {{headerInfo?.vatinvHNumAmount}}
|
||||
</se>
|
||||
<se label="已开发票张数">
|
||||
{{headerInfo?.vatinvHNum}}
|
||||
@ -96,7 +96,7 @@
|
||||
<div class="d-flex align-items-center mb-md mt-sm" *ngIf="sts==='1'">
|
||||
<button nz-button (click)="openRequestedModal('1')">全部开票</button>
|
||||
<button nz-button (click)="openRequestedModal('2')">开票</button>
|
||||
<button nz-button (click)="removeOrder()">移除</button>
|
||||
<!-- <button nz-button (click)="removeOrder()">移除</button> -->
|
||||
<div class="ml-md">
|
||||
已选择
|
||||
<strong class="text-red">{{ selectedRows.length }}</strong> 条数据 开票金额总计 <strong
|
||||
|
||||
@ -242,7 +242,7 @@ export class InvoicedListComponent implements OnInit {
|
||||
text: '查看明细',
|
||||
click: item =>
|
||||
this.router.navigate(['/ticket/invoice-list/detail/' + item.id], {
|
||||
queryParams: { expressno: item.expressno }
|
||||
queryParams: { expressno: item.expressno, type: 2 }
|
||||
})
|
||||
},
|
||||
{
|
||||
|
||||
@ -270,21 +270,21 @@ export class FreightConfigComponent implements OnInit {
|
||||
{
|
||||
title: '货源单费率',
|
||||
className: 'text-right',
|
||||
index: 'contractSurchargeRatio',
|
||||
width: 130,
|
||||
format: item => `${item.contractSurchargeRatio}%`
|
||||
},
|
||||
{
|
||||
title: '合同单费率',
|
||||
className: 'text-right',
|
||||
index: 'goodsSurchargeRatio',
|
||||
width: 130,
|
||||
format: item => `${item.goodsSurchargeRatio}%`
|
||||
},
|
||||
{
|
||||
title: '合同单费率',
|
||||
className: 'text-right',
|
||||
index: 'contractSurchargeRatio',
|
||||
width: 130,
|
||||
format: item => `${item.contractSurchargeRatio}%`
|
||||
},
|
||||
{
|
||||
title: '合同单业务量(元)',
|
||||
index: 'contractQuota',
|
||||
width: 160,
|
||||
width: 170,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.contractQuota }) }
|
||||
@ -292,7 +292,7 @@ export class FreightConfigComponent implements OnInit {
|
||||
{
|
||||
title: '货源单业务量(元)',
|
||||
index: 'goodsQuota',
|
||||
width: 160,
|
||||
width: 170,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.goodsQuota }) }
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ChangeDetectorRef, Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { amapConf } from '@conf/amap.config';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { throwError } from 'rxjs';
|
||||
@ -27,7 +27,10 @@ export class AmapPoiPickerComponent implements OnInit {
|
||||
infoWindow: any;
|
||||
geocoder: any;
|
||||
|
||||
constructor(private modalRef: NzModalRef, private service: AmapService) {}
|
||||
@Input()
|
||||
selectedAddress!: string;
|
||||
|
||||
constructor(private modalRef: NzModalRef, private service: AmapService, private cdr: ChangeDetectorRef) {}
|
||||
ngOnInit(): void {
|
||||
this.mapInit();
|
||||
// this.PoiPicker();
|
||||
@ -77,12 +80,12 @@ export class AmapPoiPickerComponent implements OnInit {
|
||||
|
||||
// 地图创建成功
|
||||
this.aMap.on('complete', () => {
|
||||
console.log('地图创建成功');
|
||||
this.cdr.detectChanges();
|
||||
this.poiPickerReady(poiPicker);
|
||||
});
|
||||
|
||||
this.aMap.on('click', (e: any) => {
|
||||
console.log(e);
|
||||
|
||||
this.selectedPOI(e.lnglat);
|
||||
});
|
||||
})
|
||||
@ -113,12 +116,21 @@ export class AmapPoiPickerComponent implements OnInit {
|
||||
radius: 1000 //范围,默认:500
|
||||
});
|
||||
|
||||
// 获取当前定位
|
||||
this.service.getCurrentPosition().subscribe(res => {
|
||||
if (res) {
|
||||
this.selectedPOI(res.position);
|
||||
}
|
||||
});
|
||||
if (this.selectedAddress) {
|
||||
this.geocoder.getLocation(this.selectedAddress, (status: any, result: any) => {
|
||||
if (status === 'complete' && result.info === 'OK') {
|
||||
// result中对应详细地理坐标信息
|
||||
this.selectedPOI(result.geocodes?.[0].location);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 获取当前定位
|
||||
this.service.getCurrentPosition().subscribe(res => {
|
||||
if (res) {
|
||||
this.selectedPOI(res.position);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//选取了某个POI
|
||||
poiPicker.on('poiPicked', (poiResult: any) => {
|
||||
|
||||
Reference in New Issue
Block a user