Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
		| @ -33,37 +33,37 @@ export class ContractManagementFrameComponent implements OnInit { | |||||||
|     private router: Router, |     private router: Router, | ||||||
|     public shipperservice: ShipperBaseService, |     public shipperservice: ShipperBaseService, | ||||||
|     private datePipe: DatePipe, |     private datePipe: DatePipe, | ||||||
|       ) {} |   ) { } | ||||||
|  |  | ||||||
|   ngOnInit(): void { |   ngOnInit(): void { | ||||||
|     this.initST(); |     this.initST(); | ||||||
|     this.initSF(); |     this.initSF(); | ||||||
|   } |   } | ||||||
|     /** |   /** | ||||||
|  * 查询参数 | * 查询参数 | ||||||
|  */ | */ | ||||||
|      get reqParams() { |   get reqParams() { | ||||||
|       const params = { |     const params = { | ||||||
|         ...this.sf?.value, |       ...this.sf?.value, | ||||||
|       } |  | ||||||
|       delete params.signTime; |  | ||||||
|       delete params._$expand; |  | ||||||
|       if(this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { |  | ||||||
|         params.signTime = { |  | ||||||
|           start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'), |  | ||||||
|           end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'), |  | ||||||
|          } |  | ||||||
|       } |  | ||||||
|       if(this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { |  | ||||||
|         params.effectiveEndTime = { |  | ||||||
|           start: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss'), |  | ||||||
|           end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss'), |  | ||||||
|          } |  | ||||||
|       } |  | ||||||
|       return { |  | ||||||
|         ...params |  | ||||||
|       }; |  | ||||||
|     } |     } | ||||||
|  |     delete params.signTime; | ||||||
|  |     delete params._$expand; | ||||||
|  |     if (this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { | ||||||
|  |       params.signTime = { | ||||||
|  |         start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'), | ||||||
|  |         end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'), | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |     if (this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { | ||||||
|  |       params.effectiveEndTime = { | ||||||
|  |         start: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss'), | ||||||
|  |         end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss'), | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |     return { | ||||||
|  |       ...params | ||||||
|  |     }; | ||||||
|  |   } | ||||||
|   /** |   /** | ||||||
|    * 初始化数据列表 |    * 初始化数据列表 | ||||||
|    */ |    */ | ||||||
| @ -91,7 +91,7 @@ export class ContractManagementFrameComponent implements OnInit { | |||||||
|         title: '合同名称', |         title: '合同名称', | ||||||
|         width: '100px', |         width: '100px', | ||||||
|         className: 'text-center', |         className: 'text-center', | ||||||
|         index: 'templateName' |         index: 'contractName' | ||||||
|       }, |       }, | ||||||
|       { title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' }, |       { title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' }, | ||||||
|       { title: '合同对象', index: 'contractObjectName', width: '120px', className: 'text-center' }, |       { title: '合同对象', index: 'contractObjectName', width: '120px', className: 'text-center' }, | ||||||
| @ -157,7 +157,7 @@ export class ContractManagementFrameComponent implements OnInit { | |||||||
|             widget: 'dict-select', |             widget: 'dict-select', | ||||||
|             containsAllLable: true, |             containsAllLable: true, | ||||||
|             params: { dictKey: 'contract:type' }, |             params: { dictKey: 'contract:type' }, | ||||||
|             containAllLable:true, |             containAllLable: true, | ||||||
|           } as SFSelectWidgetSchema, |           } as SFSelectWidgetSchema, | ||||||
|         }, |         }, | ||||||
|         enterpriseInfoId: { |         enterpriseInfoId: { | ||||||
| @ -210,7 +210,7 @@ export class ContractManagementFrameComponent implements OnInit { | |||||||
|             widget: 'dict-select', |             widget: 'dict-select', | ||||||
|             containsAllLable: true, |             containsAllLable: true, | ||||||
|             params: { dictKey: 'esign:flow:status' }, |             params: { dictKey: 'esign:flow:status' }, | ||||||
|             containAllLable:true, |             containAllLable: true, | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               _$expand: (value: boolean) => value, |               _$expand: (value: boolean) => value, | ||||||
|             }, |             }, | ||||||
| @ -238,9 +238,9 @@ export class ContractManagementFrameComponent implements OnInit { | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   approval(): void {} |   approval(): void { } | ||||||
|  |  | ||||||
|   add(): void {} |   add(): void { } | ||||||
|  |  | ||||||
|   routeTo(item: any) { |   routeTo(item: any) { | ||||||
|     this.router.navigate(['/ticket/invoice-requested-detail/1']); |     this.router.navigate(['/ticket/invoice-requested-detail/1']); | ||||||
|  | |||||||
| @ -30,7 +30,7 @@ | |||||||
|       </div> |       </div> | ||||||
|       <div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand"> |       <div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand"> | ||||||
|         <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="isLoading && st.loading" |         <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="isLoading && st.loading" | ||||||
|           (click)="st?.load(1)"  acl  [acl-ability]="['CONTRACT-INDEX-searchDetail']">查询</button> |           (click)="st?.load(1)" acl [acl-ability]="['CONTRACT-INDEX-searchDetail']">查询</button> | ||||||
|         <button nz-button (click)="resetSF()">重置</button> |         <button nz-button (click)="resetSF()">重置</button> | ||||||
|         <button nz-button nzType="link" (click)="expandToggle()"> |         <button nz-button nzType="link" (click)="expandToggle()"> | ||||||
|           {{ !_$expand ? '展开' : '收起' }} |           {{ !_$expand ? '展开' : '收起' }} | ||||||
| @ -48,14 +48,15 @@ | |||||||
|     </nz-alert> |     </nz-alert> | ||||||
|   </div> |   </div> | ||||||
|  |  | ||||||
|   <st #st [data]="service.$api_listDetailed_page" [columns]="columns" [req]="{  params: reqParams }" |   <st #st [data]="service.$api_listDetailed_page" [columns]="columns" [req]="{  params: reqParams }" [loading]="false" | ||||||
|     [loading]="false" [scroll]="{ x: '1200px', y: '370px' }" (change)="stChange($event)"> |     [scroll]="{ x: '1200px', y: '370px' }" (change)="stChange($event)"> | ||||||
|     <ng-template st-row="contractCode" let-item let-index="index"> |     <ng-template st-row="contractCode" let-item let-index="index"> | ||||||
|       <a [routerLink]="'/contract-management/index/detail/' + item.id">{{ item?.contractCode }}</a> |       <a (click)="service.openURL(item?.contractFilePath)">{{ item?.contractCode }}</a> | ||||||
|  |       <!-- <a [routerLink]="'/contract-management/index/detail/' + item.id">{{ item?.contractCode }}</a> --> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template st-row="signingObject" let-item let-index="index"> |     <ng-template st-row="signingObject" let-item let-index="index"> | ||||||
|      <span *ngIf="item.signingObject == 0"></span> |       <span *ngIf="item.signingObject == 0"></span> | ||||||
|      <span></span> |       <span></span> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|   </st> |   </st> | ||||||
| </nz-card> | </nz-card> | ||||||
|  | |||||||
| @ -75,7 +75,8 @@ | |||||||
|       [loading]="false" |       [loading]="false" | ||||||
|     > |     > | ||||||
|       <ng-template st-row="templateName" let-item let-index="index"> |       <ng-template st-row="templateName" let-item let-index="index"> | ||||||
|         <a (click)="view(item)">{{ item.templateName }}</a> |         <a (click)="service.openURL(item?.contractFilePath)">{{ item.templateName }}</a> | ||||||
|  |         <!-- <a (click)="view(item)">{{ item.templateName }}</a> --> | ||||||
|       </ng-template> |       </ng-template> | ||||||
|       <ng-template st-row="signingObject" let-item let-index="index"> |       <ng-template st-row="signingObject" let-item let-index="index"> | ||||||
|         <span *ngIf="item?.signingObject == 1">货主</span> |         <span *ngIf="item?.signingObject == 1">货主</span> | ||||||
|  | |||||||
| @ -75,7 +75,8 @@ | |||||||
|       [loading]="false" |       [loading]="false" | ||||||
|     > |     > | ||||||
|       <ng-template st-row="templateName" let-item let-index="index"> |       <ng-template st-row="templateName" let-item let-index="index"> | ||||||
|         <a (click)="view(item)">{{ item.templateName }}</a> |         <a (click)="service.openURL(item?.contractFilePath)">{{ item.templateName }}</a> | ||||||
|  |         <!-- <a (click)="view(item)">{{ item.templateName }}</a> --> | ||||||
|       </ng-template> |       </ng-template> | ||||||
|     </st> |     </st> | ||||||
|   </div> |   </div> | ||||||
|  | |||||||
| @ -34,13 +34,13 @@ | |||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template st-row="verifyStatus" let-item> |     <ng-template st-row="verifyStatus" let-item> | ||||||
|       <a (click)="viewResult(item)" *ngIf="item?.verifyStatus === '2'">{{item?.verifyStatusLabel}}</a> |       <a (click)="viewResult(item)" *ngIf="item?.verifyStatus === '2'">{{item?.verifyStatusLabel}}</a> | ||||||
|       <span *ngIf="item?.verifyStatus === '1'">{{item?.verifyStatusLabel}}</span> |       <span *ngIf="item?.verifyStatus !== '2'">{{item?.verifyStatusLabel}}</span> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template st-row="orderCode" let-item> |     <ng-template st-row="orderCode" let-item> | ||||||
|       <span class="text-blue-dark">{{item?.orderCode}}</span> |       <a (click)="routeToOrder(item)">{{item?.orderCode}}</a> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template st-row="wayBillCode" let-item> |     <ng-template st-row="wayBillCode" let-item> | ||||||
|       <span class="text-blue-dark">{{item?.wayBillCode}}</span> |       <a (click)="routeTowaybill(item)">{{item?.wayBillCode}}</a> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template st-row="tolalAmount" let-item let-index="index"> |     <ng-template st-row="tolalAmount" let-item let-index="index"> | ||||||
|       <div class="text-right">{{item?.tolalAmount | currency }}</div> |       <div class="text-right">{{item?.tolalAmount | currency }}</div> | ||||||
|  | |||||||
| @ -163,9 +163,9 @@ export class DatatableFundReportingComponent implements OnInit { | |||||||
|           title: '本地校验', |           title: '本地校验', | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           enum: [ |           enum: [ | ||||||
|             { label: '校验中', value: 0 }, |             { label: '校验中', value: '0' }, | ||||||
|             { label: '通过', value: 1 }, |             { label: '通过', value: '1' }, | ||||||
|             { label: '不通过', value: 2 } |             { label: '不通过', value: '2' } | ||||||
|           ], |           ], | ||||||
|           ui: { |           ui: { | ||||||
|             placeholder: '请选择', |             placeholder: '请选择', | ||||||
| @ -465,6 +465,23 @@ export class DatatableFundReportingComponent implements OnInit { | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   routeToOrder(item: any) { | ||||||
|  |     if (item.orderType === '1') { | ||||||
|  |       window.open(location.origin + `/#/order-management/vehicle/vehicle-detail/${item.orderId}`); | ||||||
|  |     } else { | ||||||
|  |       window.open(location.origin + `/#/order-management/bulk/bulk-detail/${item.orderId}`); | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   routeTowaybill(item: any) { | ||||||
|  |     if (item.orderType === '1') { | ||||||
|  |       window.open(location.origin + `/#/waybill-management/vehicle/vehicle-detail/${item.wayBillId}`); | ||||||
|  |  | ||||||
|  |     } else { | ||||||
|  |       window.open(location.origin + `/#/waybill-management/bulk/bulk-detail/${item.wayBillId}`); | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -49,10 +49,10 @@ | |||||||
|     </ng-template> |     </ng-template> | ||||||
|  |  | ||||||
|     <ng-template st-row="billCode" let-item> |     <ng-template st-row="billCode" let-item> | ||||||
|       <span class="text-red-dark">{{item?.billCode}}</span> |       <a class="text-red-dark" (click)="routeToOrder(item)">{{item?.billCode}}</a> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template st-row="wayBillCode" let-item> |     <ng-template st-row="wayBillCode" let-item> | ||||||
|       <span class="text-red-dark">{{item?.wayBillCode}}</span> |       <a class="text-red-dark" (click)="routeTowaybill(item)">{{item?.wayBillCode}}</a> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|  |  | ||||||
|     <ng-template st-row="freightAmount" let-item let-index="index"> |     <ng-template st-row="freightAmount" let-item let-index="index"> | ||||||
|  | |||||||
| @ -594,4 +594,22 @@ export class DatatableOrderReportingComponent implements OnInit { | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   routeToOrder(item: any) { | ||||||
|  |     if (item.billType === '1') { | ||||||
|  |       window.open(location.origin + `/#/order-management/vehicle/vehicle-detail/${item.orderId}`); | ||||||
|  |     } else { | ||||||
|  |       window.open(location.origin + `/#/order-management/bulk/bulk-detail/${item.orderId}`); | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   routeTowaybill(item: any) { | ||||||
|  |     if (item.billType === '1') { | ||||||
|  |       window.open(location.origin + `/#/waybill-management/vehicle/vehicle-detail/${item.waybillId}`); | ||||||
|  |  | ||||||
|  |     } else { | ||||||
|  |       window.open(location.origin + `/#/waybill-management/bulk/bulk-detail/${item.waybillId}`); | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -50,10 +50,10 @@ export class DatatableReportingvViewTrackComponent implements OnInit { | |||||||
|           }); |           }); | ||||||
|         }); |         }); | ||||||
|         this.mapList = list; |         this.mapList = list; | ||||||
|         this.addressItems = [...res.cityArray]; |         this.addressItems = [...res.parkArray]; | ||||||
|         if (this.addressItems && this.addressItems.length > 0) { |         if (this.addressItems && this.addressItems.length > 0) { | ||||||
|           this.addressItems.forEach(item => { |           this.addressItems.forEach(item => { | ||||||
|             item.vinOutTime = this.getLocalTime(item.vinOutTime); |             item.parkBte = this.getLocalTime(item.parkBte); | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @ -78,7 +78,7 @@ export class DatatableReportingvViewTrackComponent implements OnInit { | |||||||
|         this.addressItems = [...res.enclosureDataAppTrack]; |         this.addressItems = [...res.enclosureDataAppTrack]; | ||||||
|         if (this.addressItems && this.addressItems.length > 0) { |         if (this.addressItems && this.addressItems.length > 0) { | ||||||
|           this.addressItems.forEach(item => { |           this.addressItems.forEach(item => { | ||||||
|             item.vinOutTime = item.vinOutTime ? this.getLocalTime(item.gtm) : ''; |             item.parkBte = item.parkBte ? this.getLocalTime(item.parkBte) : ''; | ||||||
|             item.cityName = item.appAdress; |             item.cityName = item.appAdress; | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|  | |||||||
| @ -13,12 +13,13 @@ | |||||||
|  |  | ||||||
| <nz-card class="search-box" nzBordered> | <nz-card class="search-box" nzBordered> | ||||||
|     <div nz-row nzGutter="8"> |     <div nz-row nzGutter="8"> | ||||||
|         <div nz-col [nzXl]="_$expand ? 24 : 16" [nzLg]="24" [nzSm]="24" [nzXs]="24"> |         <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24"> | ||||||
|             <sf #sf [schema]="searchSchema" |             <sf #sf [schema]="searchSchema" | ||||||
|                 [ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true" |                 [ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true" | ||||||
|                 [button]="'none'"></sf> |                 [button]="'none'"></sf> | ||||||
|         </div> |         </div> | ||||||
|         <div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"> |         <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right" | ||||||
|  |             [class.expend-options]="_$expand"> | ||||||
|             <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button> |             <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button> | ||||||
|             <button nz-button [disabled]="false" (click)="resetSF()">重置</button> |             <button nz-button [disabled]="false" (click)="resetSF()">重置</button> | ||||||
|             <!-- <button nz-button nzType="primary" [disabled]="false"> 导出</button> |             <!-- <button nz-button nzType="primary" [disabled]="false"> 导出</button> | ||||||
|  | |||||||
| @ -11,7 +11,7 @@ import { FreightAccountService } from '../../services/freight-account.service'; | |||||||
| @Component({ | @Component({ | ||||||
|   selector: 'app-voucher-summary', |   selector: 'app-voucher-summary', | ||||||
|   templateUrl: './voucher-summary.component.html', |   templateUrl: './voucher-summary.component.html', | ||||||
|   styleUrls: ['../../../commom/less/box.less'] |   styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less'] | ||||||
| }) | }) | ||||||
| export class VoucherSummaryComponent implements OnInit { | export class VoucherSummaryComponent implements OnInit { | ||||||
|   @ViewChild('st', { static: true }) |   @ViewChild('st', { static: true }) | ||||||
| @ -39,12 +39,12 @@ export class VoucherSummaryComponent implements OnInit { | |||||||
|       Object.assign(requestOptions.body, { |       Object.assign(requestOptions.body, { | ||||||
|         ...this.sf.value, |         ...this.sf.value, | ||||||
|         createtime: { |         createtime: { | ||||||
|           start: this.sf.value.createtime?.[0] || null, |           start: this.sf.value.createtime?.[0] || '', | ||||||
|           end: this.sf.value.createtime?.[1] || null |           end: this.sf.value.createtime?.[1] || '' | ||||||
|         }, |         }, | ||||||
|         vctime: { |         vctime: { | ||||||
|           start: this.sf.value.vctime?.[0] || null, |           start: this.sf.value.vctime?.[0] || '', | ||||||
|           end: this.sf.value.vctime?.[1] || null |           end: this.sf.value.vctime?.[1] || '' | ||||||
|         } |         } | ||||||
|       }); |       }); | ||||||
|     } |     } | ||||||
| @ -286,8 +286,8 @@ export class VoucherSummaryComponent implements OnInit { | |||||||
|   private initST(): STColumn[] { |   private initST(): STColumn[] { | ||||||
|     return [ |     return [ | ||||||
|       { title: '', index: 'key', type: 'checkbox', width: 60, className: 'text-center', fixed: 'left' }, |       { title: '', index: 'key', type: 'checkbox', width: 60, className: 'text-center', fixed: 'left' }, | ||||||
|       { title: '汇总凭证号', index: 'vc2code', type: 'link', width: 140 }, |       { title: '汇总凭证号', index: 'vc2code', type: 'link', width: 180 }, | ||||||
|       { title: '帐套', index: 'vcltdcode', width: 120 }, |       { title: '帐套', index: 'vcltdcode', width: 180 }, | ||||||
|       { title: '凭证时间', index: 'createTime', type: 'date', width: 150 }, |       { title: '凭证时间', index: 'createTime', type: 'date', width: 150 }, | ||||||
|       { |       { | ||||||
|         title: '统计区间', |         title: '统计区间', | ||||||
| @ -307,7 +307,7 @@ export class VoucherSummaryComponent implements OnInit { | |||||||
|       { |       { | ||||||
|         title: '借方金额', |         title: '借方金额', | ||||||
|         index: 'drmoney', |         index: 'drmoney', | ||||||
|         width: 120, |         width: 140, | ||||||
|         type: 'widget', |         type: 'widget', | ||||||
|         className: 'text-right', |         className: 'text-right', | ||||||
|         widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.drmoney }) } |         widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.drmoney }) } | ||||||
| @ -315,7 +315,7 @@ export class VoucherSummaryComponent implements OnInit { | |||||||
|       { |       { | ||||||
|         title: '贷方金额', |         title: '贷方金额', | ||||||
|         index: 'crmoney', |         index: 'crmoney', | ||||||
|         width: 120, |         width: 140, | ||||||
|         type: 'widget', |         type: 'widget', | ||||||
|         className: 'text-right', |         className: 'text-right', | ||||||
|         widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.crmoney }) } |         widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.crmoney }) } | ||||||
|  | |||||||
| @ -137,8 +137,6 @@ export class FreightAccountService extends ShipperBaseService { | |||||||
|   // 根据预收款ID获取核销信息明细 |   // 根据预收款ID获取核销信息明细 | ||||||
|   $api_get_advance_collection_hrxiao = '/api/fcc/ficoAhxH/getAhxHByYskblaId'; |   $api_get_advance_collection_hrxiao = '/api/fcc/ficoAhxH/getAhxHByYskblaId'; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|   // 运营导出充值信息 充值记录导出 |   // 运营导出充值信息 充值记录导出 | ||||||
|   $api_get_exportPageByOperator = '/api/fcc/rechargeInfo/exportPageByOperator'; |   $api_get_exportPageByOperator = '/api/fcc/rechargeInfo/exportPageByOperator'; | ||||||
|   // 运营端导出交易流水明细 |   // 运营端导出交易流水明细 | ||||||
| @ -205,21 +203,22 @@ export class FreightAccountService extends ShipperBaseService { | |||||||
|     if (!url) { |     if (!url) { | ||||||
|       return; |       return; | ||||||
|     } |     } | ||||||
|     const uA = window.navigator.userAgent; // 判断浏览器内核 |     this.openURL(url); | ||||||
|     const isIE = |     // const uA = window.navigator.userAgent; // 判断浏览器内核 | ||||||
|       /msie\s|trident\/|edge\//i.test(uA) && |     // const isIE = | ||||||
|       !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); |     //   /msie\s|trident\/|edge\//i.test(uA) && | ||||||
|     const objectUrl = url; |     //   !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); | ||||||
|     const a = document.createElement('a'); |     // const objectUrl = url; | ||||||
|     document.body.appendChild(a); |     // const a = document.createElement('a'); | ||||||
|     a.href = objectUrl; |     // document.body.appendChild(a); | ||||||
|     a.download = `回单.pdf`; |     // a.href = objectUrl; | ||||||
|     if (isIE) { |     // a.download = `回单.pdf`; | ||||||
|       // 兼容IE11无法触发下载的问题 |     // if (isIE) { | ||||||
|       (navigator as any).msSaveBlob(url, a.download); |     //   // 兼容IE11无法触发下载的问题 | ||||||
|     } else { |     //   (navigator as any).msSaveBlob(url, a.download); | ||||||
|       a.click(); |     // } else { | ||||||
|     } |     //   a.click(); | ||||||
|     a.remove(); |     // } | ||||||
|  |     // a.remove(); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -19,12 +19,11 @@ import { map } from 'rxjs/operators'; | |||||||
| export class InsuranceManagementService extends ShipperBaseService { | export class InsuranceManagementService extends ShipperBaseService { | ||||||
|   // 获取货主企业列表 |   // 获取货主企业列表 | ||||||
|   public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList'; |   public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList'; | ||||||
|  // 查询保险费信息表 |   // 查询保险费信息表 | ||||||
|   public $api_premiumInfo_list = '/api/sdc/premiumInfo/list/page'; |   public $api_premiumInfo_list = '/api/sdc/premiumInfo/list/page'; | ||||||
|  // 统计保险单状态数量 |   // 统计保险单状态数量 | ||||||
|   public $api_listStatisticalStatus = '/api/sdc/premiumInfo/listStatisticalStatus'; |   public $api_listStatisticalStatus = '/api/sdc/premiumInfo/listStatisticalStatus'; | ||||||
|  |  | ||||||
|   |  | ||||||
|   //  保险费公司认证 |   //  保险费公司认证 | ||||||
|   $api_get_submitAuthInfo = `/api/sdc/premiumInfo/submitAuthInfo`; |   $api_get_submitAuthInfo = `/api/sdc/premiumInfo/submitAuthInfo`; | ||||||
|   //  退保费 |   //  退保费 | ||||||
| @ -36,24 +35,25 @@ export class InsuranceManagementService extends ShipperBaseService { | |||||||
|     if (!url) { |     if (!url) { | ||||||
|       return; |       return; | ||||||
|     } |     } | ||||||
|     const uA = window.navigator.userAgent; // 判断浏览器内核 |     this.openURL(url); | ||||||
|     const isIE = |     // const uA = window.navigator.userAgent; // 判断浏览器内核 | ||||||
|       /msie\s|trident\/|edge\//i.test(uA) && |     // const isIE = | ||||||
|       !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); |     //   /msie\s|trident\/|edge\//i.test(uA) && | ||||||
|     const objectUrl = url; |     //   !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); | ||||||
|     const a = document.createElement('a'); |     // const objectUrl = url; | ||||||
|     document.body.appendChild(a); |     // const a = document.createElement('a'); | ||||||
|     console.log('5555'); |     // document.body.appendChild(a); | ||||||
|  |     // console.log('5555'); | ||||||
|  |  | ||||||
|     a.href = objectUrl; |     // a.href = objectUrl; | ||||||
|     a.download = '保单.pdf'; |     // a.download = '保单.pdf'; | ||||||
|     if (isIE) { |     // if (isIE) { | ||||||
|       // 兼容IE11无法触发下载的问题 |     //   // 兼容IE11无法触发下载的问题 | ||||||
|       (navigator as any).msSaveBlob(url, a.download); |     //   (navigator as any).msSaveBlob(url, a.download); | ||||||
|     } else { |     // } else { | ||||||
|       a.click(); |     //   a.click(); | ||||||
|     } |     // } | ||||||
|     a.remove(); |     // a.remove(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   constructor(public injector: Injector) { |   constructor(public injector: Injector) { | ||||||
|  | |||||||
| @ -180,7 +180,7 @@ export class OrderManagementAbnormalWarningComponent implements OnInit { | |||||||
|             } |             } | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         carNos: { |         carNo: { | ||||||
|           title: '车牌号', |           title: '车牌号', | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           ui: { |           ui: { | ||||||
|  | |||||||
| @ -76,8 +76,8 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit { | |||||||
|   schema: SFSchema = {}; |   schema: SFSchema = {}; | ||||||
|   ui: SFUISchema = {}; |   ui: SFUISchema = {}; | ||||||
|   logColumns2: STColumn[] = [ |   logColumns2: STColumn[] = [ | ||||||
|     { title: '时间', index: 'vinOutTime' }, |     { title: '时间', index: 'parkBte' }, | ||||||
|     { title: '地点', index: 'cityName' } |     { title: '地点', index: 'parkAdr' } | ||||||
|   ]; |   ]; | ||||||
|   logColumns: STColumn[] = [ |   logColumns: STColumn[] = [ | ||||||
|     { title: '款项', index: 'expenseCodeLabel' }, |     { title: '款项', index: 'expenseCodeLabel' }, | ||||||
| @ -968,14 +968,15 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit { | |||||||
|         points?.forEach((item: any) => { |         points?.forEach((item: any) => { | ||||||
|           list.push({ |           list.push({ | ||||||
|             name: item.hgt, |             name: item.hgt, | ||||||
|             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] |             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], | ||||||
|  |             time: item.gtm | ||||||
|           }); |           }); | ||||||
|         }); |         }); | ||||||
|         this.mapList = list; |         this.mapList = list; | ||||||
|         this.addressItems = res?.cityArray; |         this.addressItems = res?.parkArray; | ||||||
|         if (this.addressItems && this.addressItems.length > 0) { |         if (this.addressItems && this.addressItems.length > 0) { | ||||||
|           this.addressItems.forEach(item => { |           this.addressItems.forEach(item => { | ||||||
|             item.vinOutTime = this.getLocalTime(item.vinOutTime); |             item.parkBte = this.getLocalTime(item.parkBte); | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @ -991,7 +992,8 @@ export class OrderManagementBulkDetailChangeComponent implements OnInit { | |||||||
|         points?.forEach((item: any) => { |         points?.forEach((item: any) => { | ||||||
|           list.push({ |           list.push({ | ||||||
|             name: item.hgt, |             name: item.hgt, | ||||||
|             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] |             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], | ||||||
|  |             time: item.gtm | ||||||
|           }); |           }); | ||||||
|         }); |         }); | ||||||
|         this.mapList = list; |         this.mapList = list; | ||||||
|  | |||||||
| @ -25,7 +25,7 @@ import format from 'date-fns/format'; | |||||||
|   styleUrls: ['./bulk-detail.component.less'] |   styleUrls: ['./bulk-detail.component.less'] | ||||||
| }) | }) | ||||||
| export class OrderManagementBulkeDetailComponent implements OnInit { | export class OrderManagementBulkeDetailComponent implements OnInit { | ||||||
|   MapList: any[]=[]; |   MapList: any[] = []; | ||||||
|   id = this.route.snapshot.params.id; |   id = this.route.snapshot.params.id; | ||||||
|   billExpenses: any[] = []; //运费信息表格信息 |   billExpenses: any[] = []; //运费信息表格信息 | ||||||
|   pois: any[] = []; |   pois: any[] = []; | ||||||
| @ -35,11 +35,11 @@ export class OrderManagementBulkeDetailComponent implements OnInit { | |||||||
|   totalObj: any; |   totalObj: any; | ||||||
|   attObj: any; |   attObj: any; | ||||||
|   modalcontent: any; |   modalcontent: any; | ||||||
|   modalTitle:string = ''; |   modalTitle: string = ''; | ||||||
|   isVisible = false; |   isVisible = false; | ||||||
|   logColumns2: STColumn[] = [ |   logColumns2: STColumn[] = [ | ||||||
|     { title: '时间', index: 'vinOutTime' }, |     { title: '时间', index: 'parkBte' }, | ||||||
|     { title: '地点', index: 'cityName' }, |     { title: '地点', index: 'parkAdr' } | ||||||
|   ]; |   ]; | ||||||
|   logColumns: STColumn[] = [ |   logColumns: STColumn[] = [ | ||||||
|     { title: '款项', index: 'expenseCodeLabel' }, |     { title: '款项', index: 'expenseCodeLabel' }, | ||||||
| @ -62,16 +62,15 @@ export class OrderManagementBulkeDetailComponent implements OnInit { | |||||||
|     } |     } | ||||||
|   ]; |   ]; | ||||||
|   trajectory = 'car'; |   trajectory = 'car'; | ||||||
|   mapList:any[] = [];  //地图点位数据组 |   mapList: any[] = []; //地图点位数据组 | ||||||
|   addressItems:any[] = [];  //打点地址数据组 |   addressItems: any[] = []; //打点地址数据组 | ||||||
|   constructor( |   constructor( | ||||||
|     public route: ActivatedRoute, |     public route: ActivatedRoute, | ||||||
|     private msgSrv: NzMessageService, |     private msgSrv: NzMessageService, | ||||||
|     private service: OrderManagementService, |     private service: OrderManagementService, | ||||||
|     private router: Router, |     private router: Router, | ||||||
|     private modal: NzModalService |     private modal: NzModalService | ||||||
|   ) { |   ) {} | ||||||
|   } |  | ||||||
|  |  | ||||||
|   ngOnInit(): void { |   ngOnInit(): void { | ||||||
|     console.log(this.route?.snapshot?.queryParams?.sts); |     console.log(this.route?.snapshot?.queryParams?.sts); | ||||||
| @ -85,34 +84,36 @@ export class OrderManagementBulkeDetailComponent implements OnInit { | |||||||
|       if (res) { |       if (res) { | ||||||
|         this.i = res; |         this.i = res; | ||||||
|         this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA'); |         this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA'); | ||||||
|         this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE"); |         this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data: any) => data.displayStatus !== 'HIDE'); | ||||||
|         this.pois = [ |         this.pois = [ | ||||||
|           { |           { | ||||||
|             markerLabel: '起', |             markerLabel: '装', | ||||||
|             color: 'blue', |             color: 'blue', | ||||||
|             position: [res.startingPoint.longitude, res.startingPoint.latitude], |             position: [res.startingPoint.longitude, res.startingPoint.latitude], | ||||||
|             title: res.startingPoint.detailedAddress |             title: `发货地:${res.startingPoint.province}${res.startingPoint.city}${res.startingPoint.area}${res.startingPoint.detailedAddress}`, | ||||||
|  |             time: '计划出发时间:' + res.loadPlanTime | ||||||
|           }, |           }, | ||||||
|           { |           { | ||||||
|             markerLabel: '卸', |             markerLabel: '卸', | ||||||
|             color: 'red', |             color: 'red', | ||||||
|             position: [res.endPoint.longitude, res.endPoint.latitude], |             position: [res.endPoint.longitude, res.endPoint.latitude], | ||||||
|             title: res.endPoint.detailedAddress |             title: `卸货地:${res.endPoint.province}${res.endPoint.city}${res.endPoint.area}${res.endPoint.detailedAddress}`, | ||||||
|  |             time: '计划卸货时间:' + res.unloadPlanTime | ||||||
|           } |           } | ||||||
|         ]; |         ]; | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|     this.service.request(this.service.$api_listBillComplianceAbnormalByBillId, { id: this.id }).subscribe(res => { |     this.service.request(this.service.$api_listBillComplianceAbnormalByBillId, { id: this.id }).subscribe(res => { | ||||||
|       if (res) { |       if (res) { | ||||||
|       console.log('风险详情') |         console.log('风险详情'); | ||||||
|       console.log(res) |         console.log(res); | ||||||
|       this.abnormalList = res |         this.abnormalList = res; | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|     this.service.request(this.service.$api_getAbnormalWarningByBillId, { id: this.id }).subscribe(res => { |     this.service.request(this.service.$api_getAbnormalWarningByBillId, { id: this.id }).subscribe(res => { | ||||||
|       if (res) { |       if (res) { | ||||||
|       console.log('异常预警') |         console.log('异常预警'); | ||||||
|       console.log(res) |         console.log(res); | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
| @ -125,11 +126,12 @@ export class OrderManagementBulkeDetailComponent implements OnInit { | |||||||
|     this.router.navigate(['order-management/bulk-detailChange', this.id]); |     this.router.navigate(['order-management/bulk-detailChange', this.id]); | ||||||
|   } |   } | ||||||
|   agreement(value: any) { |   agreement(value: any) { | ||||||
|     if(value  ==='1'){ |     if (value === '1') { | ||||||
|       this.modalTitle = '附件信息'; |       this.modalTitle = '附件信息'; | ||||||
|       // this.modalcontent = this.i?.contractContent?.contractContent; |       // this.modalcontent = this.i?.contractContent?.contractContent; | ||||||
|       this.service.reviewPDF(this.i?.contractContent?.contractFilePath) |       // this.service.reviewPDF(this.i?.contractContent?.contractFilePath) | ||||||
|     }else if(value === '2'){ |       this.service.openURL(this.i?.contractContent?.contractFilePath); | ||||||
|  |     } else if (value === '2') { | ||||||
|       this.modalTitle = '补充协议'; |       this.modalTitle = '补充协议'; | ||||||
|       this.modalcontent = this.i?.supplementContent?.contractContent; |       this.modalcontent = this.i?.supplementContent?.contractContent; | ||||||
|       this.isVisible = true; |       this.isVisible = true; | ||||||
| @ -163,43 +165,45 @@ export class OrderManagementBulkeDetailComponent implements OnInit { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   // 获取车辆轨迹 |   // 获取车辆轨迹 | ||||||
|   getTrajectory(){ |   getTrajectory() { | ||||||
|     this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { |     this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { | ||||||
|       if (res) { |       if (res) { | ||||||
|         const points = res.trackArray; |         const points = res.trackArray; | ||||||
|         let list :any[] = []; |         let list: any[] = []; | ||||||
|         points?.forEach((item: any) => { |         points?.forEach((item: any) => { | ||||||
|           list.push({ |           list.push({ | ||||||
|             name: item.hgt, |             name: item.hgt, | ||||||
|             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] |             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], | ||||||
|  |             time: item.gtm | ||||||
|           }); |           }); | ||||||
|         }); |         }); | ||||||
|         this.mapList = list; |         this.mapList = list; | ||||||
|         this.addressItems = res.cityArray; |         this.addressItems = res.parkArray; | ||||||
|         if(this.addressItems && this.addressItems.length > 0){ |         if (this.addressItems && this.addressItems.length > 0) { | ||||||
|           this.addressItems.forEach(item => { |           this.addressItems.forEach(item => { | ||||||
|             item.vinOutTime = this.getLocalTime(item.vinOutTime); |             item.parkBte = this.getLocalTime(item.parkBte); | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|    // 获取司机轨迹 |   // 获取司机轨迹 | ||||||
|    getDriverTrajectory(){ |   getDriverTrajectory() { | ||||||
|     this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => { |     this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => { | ||||||
|       if (res) { |       if (res) { | ||||||
|         const points = res.tracks; |         const points = res.tracks; | ||||||
|         let list :any[] = []; |         let list: any[] = []; | ||||||
|         points?.forEach((item: any) => { |         points?.forEach((item: any) => { | ||||||
|           list.push({ |           list.push({ | ||||||
|             name: item.hgt, |             name: item.hgt, | ||||||
|             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] |             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], | ||||||
|  |             time: item.gtm | ||||||
|           }); |           }); | ||||||
|         }); |         }); | ||||||
|         this.mapList = list; |         this.mapList = list; | ||||||
|         this.addressItems = [...res.enclosureDataAppTrack]; |         this.addressItems = [...res.enclosureDataAppTrack]; | ||||||
|         if(this.addressItems && this.addressItems.length > 0){ |         if (this.addressItems && this.addressItems.length > 0) { | ||||||
|           this.addressItems.forEach(item => { |           this.addressItems.forEach(item => { | ||||||
|             item.vinOutTime = this.getLocalTime(item.gtm); |             item.vinOutTime = this.getLocalTime(item.gtm); | ||||||
|             item.cityName = item.appAdress; |             item.cityName = item.appAdress; | ||||||
| @ -207,14 +211,14 @@ export class OrderManagementBulkeDetailComponent implements OnInit { | |||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|    } |   } | ||||||
|    trajectoryChange(event:any){ |   trajectoryChange(event: any) { | ||||||
|     if(event ==='car'){ |     if (event === 'car') { | ||||||
|       this.getTrajectory() |       this.getTrajectory(); | ||||||
|     }else if(event ==='driver'){ |     } else if (event === 'driver') { | ||||||
|       this.getDriverTrajectory(); |       this.getDriverTrajectory(); | ||||||
|     } |     } | ||||||
|  } |   } | ||||||
|   getLocalTime(time: any) { |   getLocalTime(time: any) { | ||||||
|     return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss'); |     return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss'); | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -57,6 +57,7 @@ | |||||||
|   <nz-timeline nzMode="left"> |   <nz-timeline nzMode="left"> | ||||||
|     <nz-timeline-item [nzLabel]="item?.operatorTimestamp" nzColor="green" *ngFor="let item of logList"> |     <nz-timeline-item [nzLabel]="item?.operatorTimestamp" nzColor="green" *ngFor="let item of logList"> | ||||||
|       <div>{{item?.operationContent}}</div> |       <div>{{item?.operationContent}}</div> | ||||||
|  |       <div *ngIf="item?.operationContent === '驳回'">驳回原因:{{i?.auditRemark}}</div> | ||||||
|       <div>操作人:{{item?.operator}}</div> |       <div>操作人:{{item?.operator}}</div> | ||||||
|     </nz-timeline-item> |     </nz-timeline-item> | ||||||
|   </nz-timeline> |   </nz-timeline> | ||||||
|  | |||||||
| @ -90,8 +90,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | |||||||
|   mapList: any[] = []; //地图点位数据组 |   mapList: any[] = []; //地图点位数据组 | ||||||
|   addressItems: any[] = []; //打点地址数据组 |   addressItems: any[] = []; //打点地址数据组 | ||||||
|   logColumns2: STColumn[] = [ |   logColumns2: STColumn[] = [ | ||||||
|     { title: '时间', index: 'vinOutTime' }, |     { title: '时间', index: 'parkBte' }, | ||||||
|     { title: '地点', index: 'cityName' } |     { title: '地点', index: 'parkAdr' } | ||||||
|   ]; |   ]; | ||||||
|   constructor( |   constructor( | ||||||
|     private route: ActivatedRoute, |     private route: ActivatedRoute, | ||||||
| @ -923,14 +923,15 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | |||||||
|         points?.forEach((item: any) => { |         points?.forEach((item: any) => { | ||||||
|           list.push({ |           list.push({ | ||||||
|             name: item.hgt, |             name: item.hgt, | ||||||
|             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] |             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], | ||||||
|  |             time: item.gtm | ||||||
|           }); |           }); | ||||||
|         }); |         }); | ||||||
|         this.mapList = list; |         this.mapList = list; | ||||||
|         this.addressItems = res?.cityArray; |         this.addressItems = res?.parkArray; | ||||||
|         if (this.addressItems && this.addressItems.length > 0) { |         if (this.addressItems && this.addressItems.length > 0) { | ||||||
|           this.addressItems.forEach(item => { |           this.addressItems.forEach(item => { | ||||||
|             item.vinOutTime = this.getLocalTime(item.vinOutTime); |             item.parkBte = this.getLocalTime(item.parkBte); | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @ -946,7 +947,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { | |||||||
|         points?.forEach((item: any) => { |         points?.forEach((item: any) => { | ||||||
|           list.push({ |           list.push({ | ||||||
|             name: item.hgt, |             name: item.hgt, | ||||||
|             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] |             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], | ||||||
|  |             time: item.gtm | ||||||
|           }); |           }); | ||||||
|         }); |         }); | ||||||
|         this.mapList = list; |         this.mapList = list; | ||||||
|  | |||||||
| @ -24,7 +24,7 @@ import { OrderManagementService } from '../../services/order-management.service' | |||||||
| export class OrderManagementVehicleDetailComponent implements OnInit { | export class OrderManagementVehicleDetailComponent implements OnInit { | ||||||
|   id = this.route.snapshot.params.id; |   id = this.route.snapshot.params.id; | ||||||
|   modalcontent: any; |   modalcontent: any; | ||||||
|   modalTitle:string = ''; |   modalTitle: string = ''; | ||||||
|   trajectory = 'car'; |   trajectory = 'car'; | ||||||
|   mapList: any[] = []; //地图点位数据组 |   mapList: any[] = []; //地图点位数据组 | ||||||
|   pois: any[] = []; |   pois: any[] = []; | ||||||
| @ -43,8 +43,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit { | |||||||
|   approvalLsit: any; |   approvalLsit: any; | ||||||
|   isVisible = false; |   isVisible = false; | ||||||
|   logColumns2: STColumn[] = [ |   logColumns2: STColumn[] = [ | ||||||
|     { title: '时间', index: 'vinOutTime' }, |     { title: '时间', index: 'parkBte' }, | ||||||
|     { title: '地点', index: 'cityName' } |     { title: '地点', index: 'parkAdr' } | ||||||
|   ]; |   ]; | ||||||
|   logColumns: STColumn[] = [ |   logColumns: STColumn[] = [ | ||||||
|     { title: '款项', index: 'expenseCodeLabel' }, |     { title: '款项', index: 'expenseCodeLabel' }, | ||||||
| @ -55,7 +55,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit { | |||||||
|     { |     { | ||||||
|       title: '支付状态', |       title: '支付状态', | ||||||
|       className: 'text-center', |       className: 'text-center', | ||||||
|       index: 'paymentStatusLabel', |       index: 'paymentStatusLabel' | ||||||
|     } |     } | ||||||
|   ]; |   ]; | ||||||
|   constructor( |   constructor( | ||||||
| @ -77,16 +77,18 @@ export class OrderManagementVehicleDetailComponent implements OnInit { | |||||||
|         this.i = res; |         this.i = res; | ||||||
|         this.pois = [ |         this.pois = [ | ||||||
|           { |           { | ||||||
|             markerLabel: '起', |             markerLabel: '装', | ||||||
|             color: 'blue', |             color: 'blue', | ||||||
|             position: [res.startingPoint.longitude, res.startingPoint.latitude], |             position: [res.startingPoint.longitude, res.startingPoint.latitude], | ||||||
|             title: res.startingPoint.detailedAddress |             title: `发货地:${res.startingPoint.province}${res.startingPoint.city}${res.startingPoint.area}${res.startingPoint.detailedAddress}`, | ||||||
|  |             time: '计划出发时间:' +res.loadPlanTime | ||||||
|           }, |           }, | ||||||
|           { |           { | ||||||
|             markerLabel: '卸', |             markerLabel: '卸', | ||||||
|             color: 'red', |             color: 'red', | ||||||
|             position: [res.endPoint.longitude, res.endPoint.latitude], |             position: [res.endPoint.longitude, res.endPoint.latitude], | ||||||
|             title: res.endPoint.detailedAddress |             title: `卸货地:${res.endPoint.province}${res.endPoint.city}${res.endPoint.area}${res.endPoint.detailedAddress}`, | ||||||
|  |             time: '计划卸货时间:' + res.unloadPlanTime | ||||||
|           } |           } | ||||||
|         ]; |         ]; | ||||||
|         this.billExpenses = this.i?.billExpenseDetails?.filter( |         this.billExpenses = this.i?.billExpenseDetails?.filter( | ||||||
| @ -97,15 +99,15 @@ export class OrderManagementVehicleDetailComponent implements OnInit { | |||||||
|     }); |     }); | ||||||
|     this.service.request(this.service.$api_listBillComplianceAbnormalByBillId, { id: this.id }).subscribe(res => { |     this.service.request(this.service.$api_listBillComplianceAbnormalByBillId, { id: this.id }).subscribe(res => { | ||||||
|       if (res) { |       if (res) { | ||||||
|       console.log('风险详情') |         console.log('风险详情'); | ||||||
|       console.log(res) |         console.log(res); | ||||||
|       this.abnormalList = res |         this.abnormalList = res; | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|     this.service.request(this.service.$api_getAbnormalWarningByBillId, { id: this.id }).subscribe(res => { |     this.service.request(this.service.$api_getAbnormalWarningByBillId, { id: this.id }).subscribe(res => { | ||||||
|       if (res) { |       if (res) { | ||||||
|       console.log('异常预警') |         console.log('异常预警'); | ||||||
|       console.log(res) |         console.log(res); | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
| @ -132,15 +134,15 @@ export class OrderManagementVehicleDetailComponent implements OnInit { | |||||||
|     this.router.navigate(['order-management/vehicle-detailChange', this.id]); |     this.router.navigate(['order-management/vehicle-detailChange', this.id]); | ||||||
|   } |   } | ||||||
|   agreement(value: any) { |   agreement(value: any) { | ||||||
|     if(value  ==='1'){ |     if (value === '1') { | ||||||
|       this.modalTitle = '附件信息'; |       // this.modalTitle = '附件信息'; | ||||||
|       this.modalcontent = this.i?.contractContent?.contractContent; |       // this.modalcontent = this.i?.contractContent?.contractContent; | ||||||
|        |       this.service.openURL(this.i?.contractContent?.contractFilePath); | ||||||
|     }else if(value === '2'){ |     } else if (value === '2') { | ||||||
|       this.modalTitle = '补充协议'; |       this.modalTitle = '补充协议'; | ||||||
|       this.modalcontent = this.i?.supplementContent?.contractContent; |       this.modalcontent = this.i?.supplementContent?.contractContent; | ||||||
|  |       this.isVisible = true; | ||||||
|     } |     } | ||||||
|     this.isVisible = true; |  | ||||||
|   } |   } | ||||||
|   handleCancel() { |   handleCancel() { | ||||||
|     this.isVisible = false; |     this.isVisible = false; | ||||||
| @ -163,16 +165,16 @@ export class OrderManagementVehicleDetailComponent implements OnInit { | |||||||
|         let list: any[] = []; |         let list: any[] = []; | ||||||
|         points?.forEach((item: any) => { |         points?.forEach((item: any) => { | ||||||
|           list.push({ |           list.push({ | ||||||
|             name: `${item.spd}km/h`, |             name: `${item.spd}`, | ||||||
|             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], |             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], | ||||||
|             time: item.gtm |             time: item.gtm | ||||||
|           }); |           }); | ||||||
|         }); |         }); | ||||||
|         this.mapList = list; |         this.mapList = list; | ||||||
|         this.addressItems = res.cityArray; |         this.addressItems = res.parkArray; | ||||||
|         if (this.addressItems && this.addressItems.length > 0) { |         if (this.addressItems && this.addressItems.length > 0) { | ||||||
|           this.addressItems.forEach(item => { |           this.addressItems.forEach(item => { | ||||||
|             item.vinOutTime = this.getLocalTime(item.vinOutTime); |             item.parkBte = this.getLocalTime(item.parkBte); | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @ -188,7 +190,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit { | |||||||
|         points?.forEach((item: any) => { |         points?.forEach((item: any) => { | ||||||
|           list.push({ |           list.push({ | ||||||
|             name: item.hgt, |             name: item.hgt, | ||||||
|             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] |             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], | ||||||
|  |             time: item.gtm | ||||||
|           }); |           }); | ||||||
|         }); |         }); | ||||||
|         this.mapList = list; |         this.mapList = list; | ||||||
| @ -210,6 +213,9 @@ export class OrderManagementVehicleDetailComponent implements OnInit { | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   getLocalTime(time: any) { |   getLocalTime(time: any) { | ||||||
|  |     if (!time) { | ||||||
|  |       return ''; | ||||||
|  |     } | ||||||
|     return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss'); |     return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss'); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -38,8 +38,8 @@ export class OneCarOrderViewtrackComponent implements OnInit { | |||||||
|   mapList:any[] = [];  //地图点位数据组 |   mapList:any[] = [];  //地图点位数据组 | ||||||
|   addressItems: any[] = []; //打点地址数据组 |   addressItems: any[] = []; //打点地址数据组 | ||||||
|   logColumns2: STColumn[] = [ |   logColumns2: STColumn[] = [ | ||||||
|     { title: '时间', index: 'vinOutTime' }, |     { title: '时间', index: 'parkBte' }, | ||||||
|     { title: '地点', index: 'cityName' }, |     { title: '地点', index: 'parkAdr' }, | ||||||
|   ]; |   ]; | ||||||
|   constructor( |   constructor( | ||||||
|     private modalRef: NzModalRef, |     private modalRef: NzModalRef, | ||||||
| @ -65,14 +65,15 @@ export class OneCarOrderViewtrackComponent implements OnInit { | |||||||
|           points?.forEach((item: any) => { |           points?.forEach((item: any) => { | ||||||
|             list.push({ |             list.push({ | ||||||
|               name: item.hgt, |               name: item.hgt, | ||||||
|               lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] |               lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], | ||||||
|  |               time: item.gtm | ||||||
|             }); |             }); | ||||||
|           }); |           }); | ||||||
|           this.mapList = list; |           this.mapList = list; | ||||||
|           this.addressItems = res.cityArray; |           this.addressItems = res.parkAdr; | ||||||
|           if(this.addressItems && this.addressItems.length > 0){ |           if(this.addressItems && this.addressItems.length > 0){ | ||||||
|             this.addressItems.forEach(item => { |             this.addressItems.forEach(item => { | ||||||
|               item.vinOutTime = this.getLocalTime(item.vinOutTime); |               item.parkBte = this.getLocalTime(item.parkBte); | ||||||
|             }); |             }); | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
| @ -88,7 +89,8 @@ export class OneCarOrderViewtrackComponent implements OnInit { | |||||||
|           points?.forEach((item: any) => { |           points?.forEach((item: any) => { | ||||||
|             list.push({ |             list.push({ | ||||||
|               name: item.hgt, |               name: item.hgt, | ||||||
|               lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] |               lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], | ||||||
|  |               time: item.gtm | ||||||
|             }); |             }); | ||||||
|           }); |           }); | ||||||
|           this.mapList = list; |           this.mapList = list; | ||||||
|  | |||||||
| @ -52,7 +52,7 @@ export class OrderManagementService extends ShipperBaseService { | |||||||
|   //  订单申请撤销 |   //  订单申请撤销 | ||||||
|   $api_get_revokeChangeRecord = `/api/sdc/billFreightChangeApplication/revokeChangeRecord`; |   $api_get_revokeChangeRecord = `/api/sdc/billFreightChangeApplication/revokeChangeRecord`; | ||||||
|   //  运费变更申请-整车 |   //  运费变更申请-整车 | ||||||
|   $api_get_insertFreightChangeWhole = `/api/sdc/billFreightChangeApplication/insertFreightChangeWhole`; |   $api_get_insertFreightChangeWhole = `/api/sdc/billFreightChangeApplication/insertOperateFreightChangeWhole`; | ||||||
|   //  取消订单 |   //  取消订单 | ||||||
|   $api_get_cancelAnOrder = `/api/sdc/billOperate/cancelAnOrder`; |   $api_get_cancelAnOrder = `/api/sdc/billOperate/cancelAnOrder`; | ||||||
|   //  批量签收整车订单 |   //  批量签收整车订单 | ||||||
| @ -92,7 +92,7 @@ export class OrderManagementService extends ShipperBaseService { | |||||||
|   //运费变更申请计算费用-整车 |   //运费变更申请计算费用-整车 | ||||||
|   $api_getWholeSurchargeDetail = `/api/sdc/billFreightChangeApplication/getWholeSurchargeDetail`; |   $api_getWholeSurchargeDetail = `/api/sdc/billFreightChangeApplication/getWholeSurchargeDetail`; | ||||||
|   //运费变更申请-大宗 |   //运费变更申请-大宗 | ||||||
|   $api_change_bulk = `/api/sdc/billFreightChangeApplication/insertFreightChangeBulk`; |   $api_change_bulk = `/api/sdc/billFreightChangeApplication/insertOperateFreightChangeBulk`; | ||||||
|   // 删除装卸货信息 |   // 删除装卸货信息 | ||||||
|   $api_delete_Wholedeletebatch = `/api/sdc/unLoadingPlace/deletebatch`; |   $api_delete_Wholedeletebatch = `/api/sdc/unLoadingPlace/deletebatch`; | ||||||
|   // 修改-大宗订单 |   // 修改-大宗订单 | ||||||
| @ -189,7 +189,6 @@ export class OrderManagementService extends ShipperBaseService { | |||||||
|   //  查询异常预警表 |   //  查询异常预警表 | ||||||
|   $api_get_abnormalWarning = `/api/sdc/abnormalWarning/list/page`; |   $api_get_abnormalWarning = `/api/sdc/abnormalWarning/list/page`; | ||||||
|  |  | ||||||
|  |  | ||||||
|   //  异步导出运营后台大宗订单列表 |   //  异步导出运营后台大宗订单列表 | ||||||
|   $api_get_asyncExportBulkList = `/api/sdc/billOperate/asyncExportBulkList`; |   $api_get_asyncExportBulkList = `/api/sdc/billOperate/asyncExportBulkList`; | ||||||
|   //  异步导出运营后台整车订单列表 |   //  异步导出运营后台整车订单列表 | ||||||
| @ -197,13 +196,13 @@ export class OrderManagementService extends ShipperBaseService { | |||||||
|   //  异步导出风险单导出 |   //  异步导出风险单导出 | ||||||
|   $api_get_asyncExportRiskBillList = `/api/sdc/billRiskOperate/asyncExportRiskBillList`; |   $api_get_asyncExportRiskBillList = `/api/sdc/billRiskOperate/asyncExportRiskBillList`; | ||||||
|   //  异步导出合规抽查导出 |   //  异步导出合规抽查导出 | ||||||
|   $api_get_asyncExportSpotCheckList= `/api/sdc/BillComplianceSpotCheck/asyncExportSpotCheckList`; |   $api_get_asyncExportSpotCheckList = `/api/sdc/BillComplianceSpotCheck/asyncExportSpotCheckList`; | ||||||
|   //  异步导出单据审核导出 |   //  异步导出单据审核导出 | ||||||
|   $api_get_asyncExportExamineBillList= `/api/sdc/billExamine/asyncExportExamineBillList`; |   $api_get_asyncExportExamineBillList = `/api/sdc/billExamine/asyncExportExamineBillList`; | ||||||
|   //  异步导出单据审核导出 |   //  异步导出单据审核导出 | ||||||
|   $api_abnormalWarning_asyncExport= `/api/sdc/abnormalWarning/asyncExport`; |   $api_abnormalWarning_asyncExport = `/api/sdc/abnormalWarning/asyncExport`; | ||||||
|   //  异步导出投诉管理导出 |   //  异步导出投诉管理导出 | ||||||
|   $api_asyncExportComplaintListDrv= `/api/sdc/complaint/operate/asyncExportComplaintListDrv`; |   $api_asyncExportComplaintListDrv = `/api/sdc/complaint/operate/asyncExportComplaintListDrv`; | ||||||
|   /** |   /** | ||||||
|    * 根据企业ID,获取企业历史网络货运人 |    * 根据企业ID,获取企业历史网络货运人 | ||||||
|    * @returns |    * @returns | ||||||
| @ -248,21 +247,22 @@ export class OrderManagementService extends ShipperBaseService { | |||||||
|     if (!url) { |     if (!url) { | ||||||
|       return; |       return; | ||||||
|     } |     } | ||||||
|     const uA = window.navigator.userAgent; // 判断浏览器内核 |     this.openURL(url); | ||||||
|     const isIE = |     // const uA = window.navigator.userAgent; // 判断浏览器内核 | ||||||
|       /msie\s|trident\/|edge\//i.test(uA) && |     // const isIE = | ||||||
|       !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); |     //   /msie\s|trident\/|edge\//i.test(uA) && | ||||||
|     const objectUrl = url; |     //   !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); | ||||||
|     const a = document.createElement('a'); |     // const objectUrl = url; | ||||||
|     document.body.appendChild(a); |     // const a = document.createElement('a'); | ||||||
|     a.href = objectUrl; |     // document.body.appendChild(a); | ||||||
|     a.download = '附件.pdf'; |     // a.href = objectUrl; | ||||||
|     if (isIE) { |     // a.download = '附件.pdf'; | ||||||
|       // 兼容IE11无法触发下载的问题 |     // if (isIE) { | ||||||
|       (navigator as any).msSaveBlob(url, a.download); |     //   // 兼容IE11无法触发下载的问题 | ||||||
|     } else { |     //   (navigator as any).msSaveBlob(url, a.download); | ||||||
|       a.click(); |     // } else { | ||||||
|     } |     //   a.click(); | ||||||
|     a.remove(); |     // } | ||||||
|  |     // a.remove(); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -11,52 +11,33 @@ | |||||||
| </nz-card> | </nz-card> | ||||||
|  |  | ||||||
| <nz-card> | <nz-card> | ||||||
|   <div class="card-title" |   <div class="card-title">装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时</span></div> | ||||||
|     >装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时</span></div |  | ||||||
|   > |  | ||||||
|  |  | ||||||
|   <form nz-form [formGroup]="validateForm1" role="form"> |   <form nz-form [formGroup]="validateForm1" role="form"> | ||||||
|     <div nz-row [nzGutter]="24"> |     <div nz-row [nzGutter]="24"> | ||||||
|       <div nz-col [nzSpan]="10"> |       <div nz-col [nzSpan]="10"> | ||||||
|         <div *ngFor="let data1 of startInfo; let idx = index"> |         <div *ngFor="let data1 of startInfo; let idx = index"> | ||||||
|           <nz-form-item> |           <nz-form-item> | ||||||
|             <nz-form-label  nzRequired>装货地</nz-form-label> |             <nz-form-label nzRequired>装货地</nz-form-label> | ||||||
|             <nz-form-control [nzErrorTip]="'请输入装货地'"> |             <nz-form-control [nzErrorTip]="'请输入装货地'"> | ||||||
|               <div class="align-center"> |               <div class="align-center"> | ||||||
|                 <nz-input-group [nzSuffix]="endInconTemp1"> |                 <nz-input-group [nzSuffix]="endInconTemp1"> | ||||||
|                   <input |                   <input nz-input [(ngModel)]="data1.detailedAddress" (click)="openMap('start', idx)" | ||||||
|                     nz-input |                     formControlName="loadAddress{{ idx }}" placeholder="请输入装货地" readonly="true" /> | ||||||
|                     [(ngModel)]="data1.detailedAddress" |  | ||||||
|                     (click)="openMap('start', idx)" |  | ||||||
|                     formControlName="loadAddress{{ idx }}" |  | ||||||
|                     placeholder="请输入装货地" |  | ||||||
|                     readonly="true" |  | ||||||
|                   /> |  | ||||||
|                 </nz-input-group> |                 </nz-input-group> | ||||||
|               </div> |               </div> | ||||||
|             </nz-form-control> |             </nz-form-control> | ||||||
|           </nz-form-item> |           </nz-form-item> | ||||||
|           <nz-form-item> |           <nz-form-item> | ||||||
|             <nz-form-label  nzRequired>联系人</nz-form-label> |             <nz-form-label nzRequired>联系人</nz-form-label> | ||||||
|             <div style="display: flex ;width: 86%"> |             <div style="display: flex ;width: 86%"> | ||||||
|               <nz-form-control [nzErrorTip]="'请输入联系人姓名'"> |               <nz-form-control [nzErrorTip]="'请输入联系人姓名'"> | ||||||
|                 <input |                 <input nz-input [(ngModel)]="data1.appUserName" formControlName="loadName{{ idx }}" maxlength="30" | ||||||
|                   nz-input |                   placeholder="请输入联系人姓名" /> | ||||||
|                   [(ngModel)]="data1.appUserName" |  | ||||||
|                   formControlName="loadName{{ idx }}" |  | ||||||
|                   maxlength="30" |  | ||||||
|                   placeholder="请输入联系人姓名" |  | ||||||
|                 /> |  | ||||||
|               </nz-form-control> |               </nz-form-control> | ||||||
|               <nz-form-control [nzErrorTip]="'请输入联系人电话'"> |               <nz-form-control [nzErrorTip]="'请输入联系人电话'"> | ||||||
|                 <input |                 <input style="margin-left: 12px" nz-input [(ngModel)]="data1.contractTelephone" maxlength="11" | ||||||
|                   style="margin-left: 12px" |                   formControlName="loadPhone{{ idx }}" placeholder="请输入联系人电话" /> | ||||||
|                   nz-input |  | ||||||
|                   [(ngModel)]="data1.contractTelephone" |  | ||||||
|                   maxlength="11" |  | ||||||
|                   formControlName="loadPhone{{ idx }}" |  | ||||||
|                   placeholder="请输入联系人电话" |  | ||||||
|                 /> |  | ||||||
|               </nz-form-control> |               </nz-form-control> | ||||||
|             </div> |             </div> | ||||||
|           </nz-form-item> |           </nz-form-item> | ||||||
| @ -64,50 +45,32 @@ | |||||||
|       </div> |       </div> | ||||||
|       <div nz-col [nzSpan]="4"> |       <div nz-col [nzSpan]="4"> | ||||||
|         <div style="display: flex; justify-content: center"> |         <div style="display: flex; justify-content: center"> | ||||||
|           <span class="swap-icon" (click)="swapAddress()"><i nz-icon nzType="swap" |           <span class="swap-icon" (click)="swapAddress()"><i nz-icon nzType="swap" nzTheme="outline"></i></span> | ||||||
|               nzTheme="outline"></i></span> |  | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|       <div nz-col [nzSpan]="10"> |       <div nz-col [nzSpan]="10"> | ||||||
|         <div *ngFor="let data2 of endInfo; let idx = index"> |         <div *ngFor="let data2 of endInfo; let idx = index"> | ||||||
|           <nz-form-item> |           <nz-form-item> | ||||||
|             <nz-form-label  nzRequired>卸货地</nz-form-label> |             <nz-form-label nzRequired>卸货地</nz-form-label> | ||||||
|             <nz-form-control [nzErrorTip]="'请输入卸货地'"> |             <nz-form-control [nzErrorTip]="'请输入卸货地'"> | ||||||
|               <div class="align-center"> |               <div class="align-center"> | ||||||
|                 <nz-input-group [nzSuffix]="endInconTemp1"> |                 <nz-input-group [nzSuffix]="endInconTemp1"> | ||||||
|                   <input |                   <input nz-input [(ngModel)]="data2.detailedAddress" (click)="openMap('end', idx)" | ||||||
|                     nz-input |                     formControlName="unloadAddress{{ idx }}" placeholder="请输入卸货地" readonly="true" /> | ||||||
|                     [(ngModel)]="data2.detailedAddress" |  | ||||||
|                     (click)="openMap('end', idx)" |  | ||||||
|                     formControlName="unloadAddress{{ idx }}" |  | ||||||
|                     placeholder="请输入卸货地" |  | ||||||
|                     readonly="true" |  | ||||||
|                   /> |  | ||||||
|                 </nz-input-group> |                 </nz-input-group> | ||||||
|               </div> |               </div> | ||||||
|             </nz-form-control> |             </nz-form-control> | ||||||
|           </nz-form-item> |           </nz-form-item> | ||||||
|           <nz-form-item> |           <nz-form-item> | ||||||
|             <nz-form-label  nzRequired>联系人</nz-form-label> |             <nz-form-label nzRequired>联系人</nz-form-label> | ||||||
|             <div style="display: flex;width: 86%"> |             <div style="display: flex;width: 86%"> | ||||||
|               <nz-form-control [nzErrorTip]="'请输入联系人姓名'"> |               <nz-form-control [nzErrorTip]="'请输入联系人姓名'"> | ||||||
|                 <input |                 <input nz-input [(ngModel)]="data2.appUserName" maxlength="30" formControlName="unloadName{{ idx }}" | ||||||
|                   nz-input |                   placeholder="请输入联系人姓名" /> | ||||||
|                   [(ngModel)]="data2.appUserName" |  | ||||||
|                   maxlength="30" |  | ||||||
|                   formControlName="unloadName{{ idx }}" |  | ||||||
|                   placeholder="请输入联系人姓名" |  | ||||||
|                 /> |  | ||||||
|               </nz-form-control> |               </nz-form-control> | ||||||
|               <nz-form-control [nzErrorTip]="'请输入联系人电话'"> |               <nz-form-control [nzErrorTip]="'请输入联系人电话'"> | ||||||
|                 <input |                 <input style="margin-left: 12px" nz-input [(ngModel)]="data2.contractTelephone" | ||||||
|                   style="margin-left: 12px" |                   formControlName="unloadPhone{{ idx }}" maxlength="11" placeholder="请输入联系人电话" /> | ||||||
|                   nz-input |  | ||||||
|                   [(ngModel)]="data2.contractTelephone" |  | ||||||
|                   formControlName="unloadPhone{{ idx }}" |  | ||||||
|                   maxlength="11" |  | ||||||
|                   placeholder="请输入联系人电话" |  | ||||||
|                 /> |  | ||||||
|               </nz-form-control> |               </nz-form-control> | ||||||
|             </div> |             </div> | ||||||
|           </nz-form-item> |           </nz-form-item> | ||||||
| @ -122,16 +85,26 @@ | |||||||
|   <div class="card-title">货物信息</div> |   <div class="card-title">货物信息</div> | ||||||
|   <div nz-row> |   <div nz-row> | ||||||
|     <div nz-col nzSpan="24"> |     <div nz-col nzSpan="24"> | ||||||
|       <sf #sf3 [schema]="schema3" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf> |       <sf #sf3 [schema]="schema3" class="sf3" [formData]="sf3data" [button]="'none'" [ui]="ui3"> | ||||||
|  |         <ng-template class="1" sf-template="goodsTips" let-i let-ui="ui"> | ||||||
|  |           <nz-alert class="goods_tips" nzType="warning" [nzMessage]="tpl" nzShowIcon></nz-alert> | ||||||
|  |         </ng-template> | ||||||
|  |         <ng-template #tpl> | ||||||
|  |           <span> 国家法规及行政命令禁限运货物不能托运 | ||||||
|  |             <a target="_blank" [queryParams]="{ type: 15 }" [routerLink]="['/agreement']">《禁运物品说明》</a> | ||||||
|  |           </span> | ||||||
|  |         </ng-template> | ||||||
|  |       </sf> | ||||||
|       <sf #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4"> |       <sf #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4"> | ||||||
|         <ng-template sf-template="freightPrice" let-i let-ui="ui"> |         <ng-template sf-template="freightPrice" let-i let-ui="ui"> | ||||||
|           <nz-input-group [nzAddOnAfter]="addOnAfterTemplate"> |           <nz-input-group [nzAddOnAfter]="addOnAfterTemplate"> | ||||||
|             <nz-input-number [nzMax]="99999" [nzMin] ="0" nzPlaceHolder="请输入" type="number" [ngModel]="i.value" |             <nz-input-number [nzMax]="99999" [nzMin]="0" nzPlaceHolder="请输入" type="number" [ngModel]="i.value" | ||||||
|             (ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number> |               (ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number> | ||||||
|           </nz-input-group> |           </nz-input-group> | ||||||
|           <ng-template #addOnAfterTemplate> |           <ng-template #addOnAfterTemplate> | ||||||
|             <nz-select [ngModel]="sf4.value.freightType" (ngModelChange)="sf4.setValue('/freightType', $event)"> |             <nz-select [ngModel]="sf4.value.freightType" (ngModelChange)="sf4.setValue('/freightType', $event)"> | ||||||
|               <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of freightTypeOptions"> </nz-option> |               <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of freightTypeOptions"> | ||||||
|  |               </nz-option> | ||||||
|             </nz-select> |             </nz-select> | ||||||
|           </ng-template> |           </ng-template> | ||||||
|         </ng-template> |         </ng-template> | ||||||
| @ -142,9 +115,8 @@ | |||||||
|               <nz-option nzLabel="抹除小数" nzValue="2"></nz-option> |               <nz-option nzLabel="抹除小数" nzValue="2"></nz-option> | ||||||
|               <nz-option nzLabel="抹除个数" nzValue="3"></nz-option> |               <nz-option nzLabel="抹除个数" nzValue="3"></nz-option> | ||||||
|             </nz-select> |             </nz-select> | ||||||
|             <span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom" |             <span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"><i nz-icon | ||||||
|               ><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i |                 nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i></span> | ||||||
|             ></span> |  | ||||||
|             <ng-template #template2> |             <ng-template #template2> | ||||||
|               <p>例如 付司机运费 = 重量*单价 = 999.99</p> |               <p>例如 付司机运费 = 重量*单价 = 999.99</p> | ||||||
|               <p>保留小数,即 999.99</p> |               <p>保留小数,即 999.99</p> | ||||||
| @ -155,35 +127,20 @@ | |||||||
|         </ng-template> |         </ng-template> | ||||||
|         <ng-template sf-template="weight" let-i let-ui="ui"> |         <ng-template sf-template="weight" let-i let-ui="ui"> | ||||||
|           <nz-input-group [nzAddOnAfter]="'吨'"> |           <nz-input-group [nzAddOnAfter]="'吨'"> | ||||||
|             <nz-input-number |             <nz-input-number placeholder="总重量,必填" [ngModel]="i.value" (ngModelChange)="i.setValue($event)" [nzMin]="1" | ||||||
|               placeholder="总重量,必填" |               style="width: 100%"></nz-input-number> | ||||||
|               [ngModel]="i.value" |  | ||||||
|               (ngModelChange)="i.setValue($event)" |  | ||||||
|               [nzMin]="1" |  | ||||||
|               style="width: 100%" |  | ||||||
|             ></nz-input-number> |  | ||||||
|           </nz-input-group> |           </nz-input-group> | ||||||
|         </ng-template> |         </ng-template> | ||||||
|         <ng-template sf-template="volume" let-i let-ui="ui"> |         <ng-template sf-template="volume" let-i let-ui="ui"> | ||||||
|           <nz-input-group [nzAddOnAfter]="'方'"> |           <nz-input-group [nzAddOnAfter]="'方'"> | ||||||
|             <nz-input-number |             <nz-input-number placeholder="总体积" [ngModel]="i.value" (ngModelChange)="i.setValue($event)" [nzMin]="1" | ||||||
|               placeholder="总体积" |               style="width: 100%"></nz-input-number> | ||||||
|               [ngModel]="i.value" |  | ||||||
|               (ngModelChange)="i.setValue($event)" |  | ||||||
|               [nzMin]="1" |  | ||||||
|               style="width: 100%" |  | ||||||
|             ></nz-input-number> |  | ||||||
|           </nz-input-group> |           </nz-input-group> | ||||||
|         </ng-template> |         </ng-template> | ||||||
|         <ng-template sf-template="number" let-i let-ui="ui"> |         <ng-template sf-template="number" let-i let-ui="ui"> | ||||||
|           <nz-input-group [nzAddOnAfter]="'车'"> |           <nz-input-group [nzAddOnAfter]="'车'"> | ||||||
|             <nz-input-number |             <nz-input-number placeholder="总车次" [ngModel]="i.value" (ngModelChange)="i.setValue($event)" [nzMin]="1" | ||||||
|               placeholder="总车次" |               style="width: 100%"></nz-input-number> | ||||||
|               [ngModel]="i.value" |  | ||||||
|               (ngModelChange)="i.setValue($event)" |  | ||||||
|               [nzMin]="1" |  | ||||||
|               style="width: 100%" |  | ||||||
|             ></nz-input-number> |  | ||||||
|           </nz-input-group> |           </nz-input-group> | ||||||
|         </ng-template> |         </ng-template> | ||||||
|       </sf> |       </sf> | ||||||
| @ -198,15 +155,10 @@ | |||||||
|       <sf #sf7 [schema]="schema7" [formData]="sf7data" [button]="'none'" [ui]="ui7"> |       <sf #sf7 [schema]="schema7" [formData]="sf7data" [button]="'none'" [ui]="ui7"> | ||||||
|         <ng-template sf-template="paymentDays" let-i let-ui="ui"> |         <ng-template sf-template="paymentDays" let-i let-ui="ui"> | ||||||
|           <div nz-row> |           <div nz-row> | ||||||
|             <div class="align-center" > |             <div class="align-center"> | ||||||
|               <div nz-col nzSpan="12"> |               <div nz-col nzSpan="12"> | ||||||
|                 <nz-input-number |                 <nz-input-number [(ngModel)]="i.value" (ngModelChange)="i.setValue($event)" [nzMin]="1" [nzMax]="30" | ||||||
|                   [(ngModel)]="i.value" |                   [nzStep]="1"></nz-input-number> | ||||||
|                   (ngModelChange)="i.setValue($event)" |  | ||||||
|                   [nzMin]="1" |  | ||||||
|                   [nzMax]="30" |  | ||||||
|                   [nzStep]="1" |  | ||||||
|                 ></nz-input-number> |  | ||||||
|               </div> |               </div> | ||||||
|               <div nz-col nzSpan="12"> |               <div nz-col nzSpan="12"> | ||||||
|                 <span> 天内支付运费</span> |                 <span> 天内支付运费</span> | ||||||
| @ -220,9 +172,12 @@ | |||||||
| </nz-card> | </nz-card> | ||||||
| <nz-card> | <nz-card> | ||||||
|   <div class="align-center"> |   <div class="align-center"> | ||||||
|     <button nz-button nzType="primary"  (click)="submitConfirm('qrcode')"  acl  [acl-ability]="['SUPPLY-VEHICLE-PLACEORDER- QRCode']">生成二维码</button> |     <button nz-button nzType="primary" (click)="submitConfirm('qrcode')" acl | ||||||
|     <button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('assign')"  acl  [acl-ability]="['SUPPLY-VEHICLE-PLACEORDER-bulkDesignate']">指派熟车</button> |       [acl-ability]="['SUPPLY-VEHICLE-PLACEORDER- QRCode']">生成二维码</button> | ||||||
|  |     <button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('assign')" acl | ||||||
|  |       [acl-ability]="['SUPPLY-VEHICLE-PLACEORDER-bulkDesignate']">指派熟车</button> | ||||||
|     <!-- <button nz-button nzType="primary"    (click)="choose()">取消</button> --> |     <!-- <button nz-button nzType="primary"    (click)="choose()">取消</button> --> | ||||||
|     <button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')"  acl  [acl-ability]="['SUPPLY-VEHICLE-PLACEORDER-bulkAnotherOrder']">司机抢单</button> |     <button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')" acl | ||||||
|  |       [acl-ability]="['SUPPLY-VEHICLE-PLACEORDER-bulkAnotherOrder']">司机抢单</button> | ||||||
|   </div> |   </div> | ||||||
| </nz-card> | </nz-card> | ||||||
|  | |||||||
| @ -3,10 +3,35 @@ | |||||||
|     nz-input-number { |     nz-input-number { | ||||||
|       width: 100%; |       width: 100%; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     nz-date-picker { |     nz-date-picker { | ||||||
|       width: 100%; |       width: 100%; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     .sf3 { | ||||||
|  |       .goods_Tips_item { | ||||||
|  |         .goods_tips { | ||||||
|  |           width: calc(50% - 60px); | ||||||
|  |  | ||||||
|  |           .ant-alert { | ||||||
|  |             padding: 4px; | ||||||
|  |           } | ||||||
|  |  | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         nz-form-item { | ||||||
|  |           margin-bottom: 8px; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         // .ant-form-item-control-input-content { | ||||||
|  |         //   display: flex; | ||||||
|  |         //   justify-content: end; | ||||||
|  |         // } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |  | ||||||
|   i { |   i { | ||||||
|     cursor: pointer; |     cursor: pointer; | ||||||
|   } |   } | ||||||
| @ -34,7 +59,10 @@ | |||||||
|   padding: 24px; |   padding: 24px; | ||||||
|   color: #7d7d7d; |   color: #7d7d7d; | ||||||
|   font-size: 30px; |   font-size: 30px; | ||||||
|   :hover{color: #52acff;} |  | ||||||
|  |   :hover { | ||||||
|  |     color: #52acff; | ||||||
|  |   } | ||||||
| } | } | ||||||
|  |  | ||||||
| #container { | #container { | ||||||
| @ -45,6 +73,7 @@ | |||||||
| input[type='number'] { | input[type='number'] { | ||||||
|   -moz-appearance: textfield; |   -moz-appearance: textfield; | ||||||
| } | } | ||||||
|  |  | ||||||
| input[type='number']::-webkit-inner-spin-button, | input[type='number']::-webkit-inner-spin-button, | ||||||
| input[type='number']::-webkit-outer-spin-button { | input[type='number']::-webkit-outer-spin-button { | ||||||
|   margin: 0; |   margin: 0; | ||||||
|  | |||||||
| @ -210,6 +210,17 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | |||||||
|   initSF3() { |   initSF3() { | ||||||
|     this.schema3 = { |     this.schema3 = { | ||||||
|       properties: { |       properties: { | ||||||
|  |         goodsTips: { | ||||||
|  |           type: 'string', | ||||||
|  |           title: '', | ||||||
|  |           ui: { | ||||||
|  |             widget: 'custom', | ||||||
|  |             class: 'goods_Tips_item', | ||||||
|  |             // visibleIf: { | ||||||
|  |             //   goodsTypeName: (value: any) => value && value === '其它' | ||||||
|  |             // } | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|         goodsTypeId: { |         goodsTypeId: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '货物名称', |           title: '货物名称', | ||||||
| @ -271,6 +282,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | |||||||
|             errors: { required: '请填写货物名称' }, |             errors: { required: '请填写货物名称' }, | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               goodsTypeName: (value: any) => value && value === '其它' |               goodsTypeName: (value: any) => value && value === '其它' | ||||||
|  |             }, | ||||||
|  |             blur: (value: any) => { | ||||||
|  |               this.checkGoodsName(); | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
| @ -281,6 +295,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | |||||||
|       '*': { |       '*': { | ||||||
|         spanLabelFixed: 90, |         spanLabelFixed: 90, | ||||||
|         grid: { span: 12 } |         grid: { span: 12 } | ||||||
|  |       }, | ||||||
|  |       $goodsTips: { | ||||||
|  |         grid: { span: 24 } | ||||||
|       } |       } | ||||||
|     }; |     }; | ||||||
|   } |   } | ||||||
| @ -583,7 +600,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | |||||||
|   } |   } | ||||||
|   subStartInfo(event: any, index: number, id?: any) { |   subStartInfo(event: any, index: number, id?: any) { | ||||||
|     if (id) { |     if (id) { | ||||||
|       this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => {}); |       this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => { }); | ||||||
|     } |     } | ||||||
|     this.startInfo.splice(index, 1); |     this.startInfo.splice(index, 1); | ||||||
|     this.validateForm1.removeControl(`loadAddress${index}`); |     this.validateForm1.removeControl(`loadAddress${index}`); | ||||||
| @ -611,7 +628,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | |||||||
|   } |   } | ||||||
|   subEndInfo(event: any, index: number, id?: any) { |   subEndInfo(event: any, index: number, id?: any) { | ||||||
|     if (id) { |     if (id) { | ||||||
|       this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => {}); |       this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => { }); | ||||||
|     } |     } | ||||||
|     this.endInfo.splice(index, 1); |     this.endInfo.splice(index, 1); | ||||||
|     this.validateForm1.removeControl(`unloadAddress${index}`); |     this.validateForm1.removeControl(`unloadAddress${index}`); | ||||||
| @ -838,43 +855,43 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | |||||||
|       nzContent: AmapPoiPickerComponent, |       nzContent: AmapPoiPickerComponent, | ||||||
|       nzWidth: 900, |       nzWidth: 900, | ||||||
|       nzOnOk: item => { |       nzOnOk: item => { | ||||||
|         if(item?.poi) { |         if (item?.poi) { | ||||||
|         const poi = item.poi; |           const poi = item.poi; | ||||||
|         const locList = poi.location.toString().split(','); |           const locList = poi.location.toString().split(','); | ||||||
|         switch (type) { |           switch (type) { | ||||||
|           case 'start': |             case 'start': | ||||||
|             this.startInfo[index].detailedAddress = poi.district + poi.name; |               this.startInfo[index].detailedAddress = poi.district + poi.name; | ||||||
|             this.startInfo[index].longitude = locList[0]; |               this.startInfo[index].longitude = locList[0]; | ||||||
|             this.startInfo[index].latitude = locList[1]; |               this.startInfo[index].latitude = locList[1]; | ||||||
|             this.startInfo[index].province = poi.cityInfo.province; |               this.startInfo[index].province = poi.cityInfo.province; | ||||||
|             this.startInfo[index].city = poi.cityInfo.city; |               this.startInfo[index].city = poi.cityInfo.city; | ||||||
|             this.startInfo[index].area = poi.cityInfo.district; |               this.startInfo[index].area = poi.cityInfo.district; | ||||||
|             this.startInfo[index].address = poi.name; |               this.startInfo[index].address = poi.name; | ||||||
|             break; |               break; | ||||||
|           case 'end': |             case 'end': | ||||||
|             this.endInfo[index].detailedAddress = poi.district + poi.name; |               this.endInfo[index].detailedAddress = poi.district + poi.name; | ||||||
|             this.endInfo[index].longitude = locList[0]; |               this.endInfo[index].longitude = locList[0]; | ||||||
|             this.endInfo[index].latitude = locList[1]; |               this.endInfo[index].latitude = locList[1]; | ||||||
|             this.endInfo[index].province = poi.cityInfo.province; |               this.endInfo[index].province = poi.cityInfo.province; | ||||||
|             this.endInfo[index].city = poi.cityInfo.city; |               this.endInfo[index].city = poi.cityInfo.city; | ||||||
|             this.endInfo[index].area = poi.cityInfo.district; |               this.endInfo[index].area = poi.cityInfo.district; | ||||||
|             this.endInfo[index].address = poi.name; |               this.endInfo[index].address = poi.name; | ||||||
|             break; |               break; | ||||||
|           default: |             default: | ||||||
|             break; |               break; | ||||||
|         } |           } | ||||||
|  |  | ||||||
|         if (this.startInfo[0]?.area && this.endInfo[0]?.area) { |           if (this.startInfo[0]?.area && this.endInfo[0]?.area) { | ||||||
|           this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => { |             this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => { | ||||||
|             this.totalDistance = res.distance; |               this.totalDistance = res.distance; | ||||||
|             this.totalTime = res.time; |               this.totalTime = res.time; | ||||||
|           }); |             }); | ||||||
|  |           } | ||||||
|  |           return true | ||||||
|  |         } else { | ||||||
|  |           this.service.msgSrv.warning('请重新手动选择地址!') | ||||||
|  |           return false | ||||||
|         } |         } | ||||||
|         return true |  | ||||||
|       } else { |  | ||||||
|         this.service.msgSrv.warning('请重新手动选择地址!') |  | ||||||
|         return false |  | ||||||
|       } |  | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
| @ -1127,4 +1144,16 @@ export class SupplyManagementBulkPublishComponent implements OnInit { | |||||||
|       }; |       }; | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|  |   checkGoodsName() { | ||||||
|  |     this.service.request(this.service.$api_checkGoodsName, this.sf3.value.goodsName1).subscribe(res => { | ||||||
|  |       if (res === false) { | ||||||
|  |         const modalRef = this.modalService.error({ | ||||||
|  |           nzTitle: '货物名称含有违禁词,请重新输入!', | ||||||
|  |         }); | ||||||
|  |         modalRef.afterClose.subscribe(result => { | ||||||
|  |           // this.sf3.setValue('/goodsName1', null); | ||||||
|  |         }); | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -11,60 +11,37 @@ | |||||||
| </nz-card> | </nz-card> | ||||||
|  |  | ||||||
| <nz-card> | <nz-card> | ||||||
|   <div class="card-title" |   <div class="card-title">装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时</span></div> | ||||||
|     >装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时</span></div |  | ||||||
|   > |  | ||||||
|  |  | ||||||
|   <form nz-form [formGroup]="validateForm1" role="form"> |   <form nz-form [formGroup]="validateForm1" role="form"> | ||||||
|     <div nz-row [nzGutter]="24"> |     <div nz-row [nzGutter]="24"> | ||||||
|       <div nz-col [nzSpan]="10"> |       <div nz-col [nzSpan]="10"> | ||||||
|         <div *ngFor="let data1 of startInfo; let idx = index"> |         <div *ngFor="let data1 of startInfo; let idx = index"> | ||||||
|           <nz-form-item> |           <nz-form-item> | ||||||
|             <nz-form-label  nzRequired>装货地</nz-form-label> |             <nz-form-label nzRequired>装货地</nz-form-label> | ||||||
|             <nz-form-control [nzErrorTip]="'请输入装货地'"> |             <nz-form-control [nzErrorTip]="'请输入装货地'"> | ||||||
|               <div class="align-center"> |               <div class="align-center"> | ||||||
|                 <nz-input-group [nzSuffix]="endInconTemp1"> |                 <nz-input-group [nzSuffix]="endInconTemp1"> | ||||||
|                   <input |                   <input nz-input [(ngModel)]="data1.detailedAddress" (click)="openMap('start', idx)" | ||||||
|                     nz-input |                     formControlName="loadAddress{{ idx }}" placeholder="请输入装货地" readonly="true" /> | ||||||
|                     [(ngModel)]="data1.detailedAddress" |  | ||||||
|                     (click)="openMap('start', idx)" |  | ||||||
|                     formControlName="loadAddress{{ idx }}" |  | ||||||
|                     placeholder="请输入装货地" |  | ||||||
|                     readonly="true" |  | ||||||
|                   /> |  | ||||||
|                 </nz-input-group> |                 </nz-input-group> | ||||||
|                 <span *ngIf="idx !== 0" style="padding: 0 10px" |                 <span *ngIf="idx !== 0" style="padding: 0 10px"><i nz-icon nzType="minus-circle" nzTheme="outline" | ||||||
|                   ><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i |                     style="color: #d9001b" (click)="subStartInfo($event, idx)"></i></span> | ||||||
|                 ></span> |                 <span *ngIf="idx == 0" style="visibility:hidden;padding: 0 10px"><i nz-icon nzType="minus-circle" | ||||||
|                 <span *ngIf="idx == 0" style="visibility:hidden;padding: 0 10px" |                     nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i></span> | ||||||
|                 ><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i |  | ||||||
|               ></span> |  | ||||||
|               </div> |               </div> | ||||||
|             </nz-form-control> |             </nz-form-control> | ||||||
|           </nz-form-item> |           </nz-form-item> | ||||||
|           <nz-form-item> |           <nz-form-item> | ||||||
|             <nz-form-label  nzRequired>联系人</nz-form-label> |             <nz-form-label nzRequired>联系人</nz-form-label> | ||||||
|             <div style="display: flex; width: 80.7%"> |             <div style="display: flex; width: 80.7%"> | ||||||
|               <nz-form-control [nzErrorTip]="'请输入联系人姓名'"> |               <nz-form-control [nzErrorTip]="'请输入联系人姓名'"> | ||||||
|                 <input |                 <input nz-input [(ngModel)]="data1.appUserName" formControlName="loadName{{ idx }}" | ||||||
|                   nz-input |                   name="loadName{{ idx }}" maxlength="30" placeholder="请输入联系人姓名" /> | ||||||
|                   [(ngModel)]="data1.appUserName" |  | ||||||
|                   formControlName="loadName{{ idx }}" |  | ||||||
|                   name="loadName{{ idx }}" |  | ||||||
|                   maxlength="30" |  | ||||||
|                   placeholder="请输入联系人姓名" |  | ||||||
|                 /> |  | ||||||
|               </nz-form-control> |               </nz-form-control> | ||||||
|               <nz-form-control [nzErrorTip]="'请输入联系人电话'"> |               <nz-form-control [nzErrorTip]="'请输入联系人电话'"> | ||||||
|                 <input |                 <input style="margin-left: 12px" nz-input [(ngModel)]="data1.contractTelephone" maxlength="11" | ||||||
|                   style="margin-left: 12px" |                   formControlName="loadPhone{{ idx }}" name="loadPhone{{ idx }}" placeholder="请输入联系人电话" /> | ||||||
|                   nz-input |  | ||||||
|                   [(ngModel)]="data1.contractTelephone" |  | ||||||
|                   maxlength="11" |  | ||||||
|                   formControlName="loadPhone{{ idx }}" |  | ||||||
|                   name="loadPhone{{ idx }}" |  | ||||||
|                   placeholder="请输入联系人电话" |  | ||||||
|                 /> |  | ||||||
|               </nz-form-control> |               </nz-form-control> | ||||||
|             </div> |             </div> | ||||||
|           </nz-form-item> |           </nz-form-item> | ||||||
| @ -81,59 +58,38 @@ | |||||||
|       </div> |       </div> | ||||||
|       <div nz-col [nzSpan]="4"> |       <div nz-col [nzSpan]="4"> | ||||||
|         <div style="display: flex; justify-content: center"> |         <div style="display: flex; justify-content: center"> | ||||||
|           <span class="swap-icon" (click)="swapAddress()"><i nz-icon nzType="swap" |           <span class="swap-icon" (click)="swapAddress()"><i nz-icon nzType="swap" nzTheme="outline"></i></span> | ||||||
|               nzTheme="outline"></i></span> |  | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|       <div nz-col [nzSpan]="10"> |       <div nz-col [nzSpan]="10"> | ||||||
|         <div *ngFor="let data2 of endInfo; let idx = index"> |         <div *ngFor="let data2 of endInfo; let idx = index"> | ||||||
|           <nz-form-item> |           <nz-form-item> | ||||||
|             <nz-form-label  nzRequired>卸货地</nz-form-label> |             <nz-form-label nzRequired>卸货地</nz-form-label> | ||||||
|             <nz-form-control [nzErrorTip]="'请输入卸货地'"> |             <nz-form-control [nzErrorTip]="'请输入卸货地'"> | ||||||
|               <div class="align-center"> |               <div class="align-center"> | ||||||
|                 <nz-input-group [nzSuffix]="endInconTemp1"> |                 <nz-input-group [nzSuffix]="endInconTemp1"> | ||||||
|                   <input |                   <input nz-input [(ngModel)]="data2.detailedAddress" (click)="openMap('end', idx)" | ||||||
|                     nz-input |                     formControlName="unloadAddress{{ idx }}" placeholder="请输入卸货地" name="unloadAddress{{ idx }}" | ||||||
|                     [(ngModel)]="data2.detailedAddress" |                     readonly="true" /> | ||||||
|                     (click)="openMap('end', idx)" |  | ||||||
|                     formControlName="unloadAddress{{ idx }}" |  | ||||||
|                     placeholder="请输入卸货地" |  | ||||||
|                     name="unloadAddress{{ idx }}" |  | ||||||
|                     readonly="true" |  | ||||||
|                   /> |  | ||||||
|                 </nz-input-group> |                 </nz-input-group> | ||||||
|                 <span *ngIf="idx !== 0" style="padding: 0 10px" |                 <span *ngIf="idx !== 0" style="padding: 0 10px"><i nz-icon nzType="minus-circle" nzTheme="outline" | ||||||
|                   ><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i |                     style="color: #d9001b" (click)="subEndInfo($event, idx)"></i></span> | ||||||
|                 ></span> |                 <span *ngIf="idx == 0" style="visibility:hidden;padding: 0 10px"><i nz-icon nzType="minus-circle" | ||||||
|                 <span *ngIf="idx == 0" style="visibility:hidden;padding: 0 10px" |                     nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i></span> | ||||||
|                 ><i nz-icon nzType="minus-circle" nzTheme="outline" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i |  | ||||||
|               ></span> |  | ||||||
|               </div> |               </div> | ||||||
|             </nz-form-control> |             </nz-form-control> | ||||||
|           </nz-form-item> |           </nz-form-item> | ||||||
|           <nz-form-item> |           <nz-form-item> | ||||||
|             <nz-form-label  nzRequired>联系人</nz-form-label> |             <nz-form-label nzRequired>联系人</nz-form-label> | ||||||
|             <div style="display: flex; width: 80.7%"> |             <div style="display: flex; width: 80.7%"> | ||||||
|               <nz-form-control [nzErrorTip]="'请输入联系人姓名'"> |               <nz-form-control [nzErrorTip]="'请输入联系人姓名'"> | ||||||
|                 <input |                 <input nz-input [(ngModel)]="data2.appUserName" maxlength="30" formControlName="unloadName{{ idx }}" | ||||||
|                   nz-input |                   name="unloadAddress{{ idx }}" placeholder="请输入联系人姓名" /> | ||||||
|                   [(ngModel)]="data2.appUserName" |  | ||||||
|                   maxlength="30" |  | ||||||
|                   formControlName="unloadName{{ idx }}" |  | ||||||
|                   name="unloadAddress{{ idx }}" |  | ||||||
|                   placeholder="请输入联系人姓名" |  | ||||||
|                 /> |  | ||||||
|               </nz-form-control> |               </nz-form-control> | ||||||
|               <nz-form-control [nzErrorTip]="'请输入联系人电话'"> |               <nz-form-control [nzErrorTip]="'请输入联系人电话'"> | ||||||
|                 <input |                 <input style="margin-left: 12px" nz-input [(ngModel)]="data2.contractTelephone" | ||||||
|                   style="margin-left: 12px" |                   formControlName="unloadPhone{{ idx }}" name="unloadAddress{{ idx }}" maxlength="11" | ||||||
|                   nz-input |                   placeholder="请输入联系人电话" /> | ||||||
|                   [(ngModel)]="data2.contractTelephone" |  | ||||||
|                   formControlName="unloadPhone{{ idx }}" |  | ||||||
|                   name="unloadAddress{{ idx }}" |  | ||||||
|                   maxlength="11" |  | ||||||
|                   placeholder="请输入联系人电话" |  | ||||||
|                 /> |  | ||||||
|               </nz-form-control> |               </nz-form-control> | ||||||
|             </div> |             </div> | ||||||
|           </nz-form-item> |           </nz-form-item> | ||||||
| @ -152,24 +108,20 @@ | |||||||
|     <div nz-row [nzGutter]="24" style="margin-top: 24px"> |     <div nz-row [nzGutter]="24" style="margin-top: 24px"> | ||||||
|       <div nz-col nzXs="2" nzSm="4" nzMd="8" nzLg="8" nzXl="10"> |       <div nz-col nzXs="2" nzSm="4" nzMd="8" nzLg="8" nzXl="10"> | ||||||
|         <nz-form-item> |         <nz-form-item> | ||||||
|           <nz-form-label  nzRequired>装货时间</nz-form-label> |           <nz-form-label nzRequired>装货时间</nz-form-label> | ||||||
|           <nz-form-control [nzErrorTip]="'请输入装货时间'"> |           <nz-form-control [nzErrorTip]="'请输入装货时间'"> | ||||||
|             <nz-date-picker |             <nz-date-picker [nzShowTime]="{ nzFormat: 'HH' }" nzFormat="yyyy-MM-dd HH:00前" formControlName="loadingTime" | ||||||
|             [nzShowTime]="{ nzFormat: 'HH' }" |               [nzDisabledDate]="disabledDateStart"></nz-date-picker> | ||||||
|             nzFormat="yyyy-MM-dd HH:00前" |  | ||||||
|             formControlName="loadingTime" |  | ||||||
|             [nzDisabledDate]="disabledDateStart" |  | ||||||
|           ></nz-date-picker> |  | ||||||
|           </nz-form-control> |           </nz-form-control> | ||||||
|         </nz-form-item> |         </nz-form-item> | ||||||
|       </div> |       </div> | ||||||
|       <div nz-col nzXs="20" nzSm="16" nzMd="12" nzLg="8" nzXl="4"></div> |       <div nz-col nzXs="20" nzSm="16" nzMd="12" nzLg="8" nzXl="4"></div> | ||||||
|       <div nz-col nzXs="2" nzSm="4" nzMd="8" nzLg="8" nzXl="10"> |       <div nz-col nzXs="2" nzSm="4" nzMd="8" nzLg="8" nzXl="10"> | ||||||
|         <nz-form-item> |         <nz-form-item> | ||||||
|           <nz-form-label  nzRequired>卸货时间</nz-form-label> |           <nz-form-label nzRequired>卸货时间</nz-form-label> | ||||||
|           <nz-form-control [nzErrorTip]="'请输入卸货时间'"> |           <nz-form-control [nzErrorTip]="'请输入卸货时间'"> | ||||||
|             <nz-date-picker [nzShowTime]="{ nzFormat: 'HH' }" |             <nz-date-picker [nzShowTime]="{ nzFormat: 'HH' }" nzFormat="yyyy-MM-dd HH:00前" | ||||||
|             nzFormat="yyyy-MM-dd HH:00前" formControlName="unloadingTime"></nz-date-picker> |               formControlName="unloadingTime"></nz-date-picker> | ||||||
|           </nz-form-control> |           </nz-form-control> | ||||||
|         </nz-form-item> |         </nz-form-item> | ||||||
|       </div> |       </div> | ||||||
| @ -182,31 +134,40 @@ | |||||||
|   <div class="card-title">货物信息</div> |   <div class="card-title">货物信息</div> | ||||||
|   <div nz-row> |   <div nz-row> | ||||||
|     <div nz-col nzSpan="16"> |     <div nz-col nzSpan="16"> | ||||||
|       <sf #sf3 [schema]="schema3" [button]="'none'" [ui]="ui3" [formData]="sf3data"></sf> |       <sf #sf3 [schema]="schema3" class="sf3" [button]="'none'" [ui]="ui3" [formData]="sf3data"> | ||||||
|  |         <ng-template class="1" sf-template="goodsTips" let-i let-ui="ui"> | ||||||
|  |           <nz-alert class="goods_tips" nzType="warning" [nzMessage]="tpl" nzShowIcon></nz-alert> | ||||||
|  |         </ng-template> | ||||||
|  |         <ng-template #tpl> | ||||||
|  |           <span> 国家法规及行政命令禁限运货物不能托运 | ||||||
|  |             <a target="_blank" [queryParams]="{ type: 15 }" [routerLink]="['/agreement']">《禁运物品说明》</a> | ||||||
|  |           </span> | ||||||
|  |         </ng-template> | ||||||
|  |       </sf> | ||||||
|     </div> |     </div> | ||||||
|   </div> |   </div> | ||||||
|   <sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data"> |   <sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data"> | ||||||
|     <ng-template sf-template="weight" let-i let-ui="ui"> |     <ng-template sf-template="weight" let-i let-ui="ui"> | ||||||
|       <nz-input-group [nzAddOnAfter]="'吨'"> |       <nz-input-group [nzAddOnAfter]="'吨'"> | ||||||
|         <nz-input-number [nzMax]="99999" [nzMin] ="0" nzPlaceHolder="总重量,必填" type="number" [ngModel]="i.value" |         <nz-input-number [nzMax]="99999" [nzMin]="0" nzPlaceHolder="总重量,必填" type="number" [ngModel]="i.value" | ||||||
|         (ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number> |           (ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number> | ||||||
|       </nz-input-group> |       </nz-input-group> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template sf-template="volume" let-i let-ui="ui"> |     <ng-template sf-template="volume" let-i let-ui="ui"> | ||||||
|       <nz-input-group [nzAddOnAfter]="'方'"> |       <nz-input-group [nzAddOnAfter]="'方'"> | ||||||
|           <nz-input-number [nzMax]="99999" [nzMin] ="0" nzPlaceHolder="体积" type="number" [ngModel]="i.value" |         <nz-input-number [nzMax]="99999" [nzMin]="0" nzPlaceHolder="体积" type="number" [ngModel]="i.value" | ||||||
|         (ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number> |           (ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number> | ||||||
|       </nz-input-group> |       </nz-input-group> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template sf-template="number" let-i let-ui="ui"> |     <ng-template sf-template="number" let-i let-ui="ui"> | ||||||
|       <nz-input-group [nzAddOnAfter]="'件'"> |       <nz-input-group [nzAddOnAfter]="'件'"> | ||||||
|           <nz-input-number [nzMax]="99999" [nzMin] ="0" nzPlaceHolder="件数" type="number" [ngModel]="i.value" |         <nz-input-number [nzMax]="99999" [nzMin]="0" nzPlaceHolder="件数" type="number" [ngModel]="i.value" | ||||||
|           (ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number> |           (ngModelChange)="i.setValue($event)" [nzPrecision]="2" style="width: 100%;"></nz-input-number> | ||||||
|       </nz-input-group> |       </nz-input-group> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template sf-template="goodsValue" let-i let-ui="ui"> |     <ng-template sf-template="goodsValue" let-i let-ui="ui"> | ||||||
|       <div class="align-center"> |       <div class="align-center"> | ||||||
|         <nz-input-number [ngModel]="i.value" [nzMin] = "0" [nzMax]="2000000" [nzStep]="0.01" |         <nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="2000000" [nzStep]="0.01" | ||||||
|           (ngModelChange)="i.setValue($event);getInsurersPrice()" nzPlaceHolder="请输入0-2000000之间数值"> |           (ngModelChange)="i.setValue($event);getInsurersPrice()" nzPlaceHolder="请输入0-2000000之间数值"> | ||||||
|         </nz-input-number> |         </nz-input-number> | ||||||
|       </div> |       </div> | ||||||
| @ -233,8 +194,8 @@ | |||||||
|         <ng-template sf-template="freeInsurance2" let-i let-ui="ui"> |         <ng-template sf-template="freeInsurance2" let-i let-ui="ui"> | ||||||
|           <nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert> |           <nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert> | ||||||
|         </ng-template> |         </ng-template> | ||||||
|         <ng-template #template1>①香港、澳门、台湾、西藏、新疆不予承保,②单次运输保额仅限200万元以内,③保险详细内容及注意事项请见<a target="_blank" [queryParams]="{ type: 10 }" |         <ng-template #template1>①香港、澳门、台湾、西藏、新疆不予承保,②单次运输保额仅限200万元以内,③保险详细内容及注意事项请见<a target="_blank" | ||||||
|             [routerLink]="['/agreement']">《保险告知函》</a></ng-template> |             [queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《保险告知函》</a></ng-template> | ||||||
|       </sf> |       </sf> | ||||||
|     </div> |     </div> | ||||||
|   </div> |   </div> | ||||||
| @ -256,18 +217,21 @@ | |||||||
|     <div nz-col nzSpan="8"> |     <div nz-col nzSpan="8"> | ||||||
|       <sf #sf7 [schema]="schema7" [button]="'none'" [ui]="ui7" [formData]="sf7data"> |       <sf #sf7 [schema]="schema7" [button]="'none'" [ui]="ui7" [formData]="sf7data"> | ||||||
|         <ng-template sf-template="prePay" let-i let-ui="ui"> |         <ng-template sf-template="prePay" let-i let-ui="ui"> | ||||||
|           <nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="99999" [nzStep]="0.01" [nzPrecision]="2" nzPlaceHolder="请输入0-99999" |           <nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="99999" [nzStep]="0.01" [nzPrecision]="2" | ||||||
|             (ngModelChange)="priceChange($event,i)" [nzFormatter]="formatterRmb" [nzParser]="parserRmb"> |             nzPlaceHolder="请输入0-99999" (ngModelChange)="priceChange($event,i)" [nzFormatter]="formatterRmb" | ||||||
|  |             [nzParser]="parserRmb"> | ||||||
|           </nz-input-number> |           </nz-input-number> | ||||||
|         </ng-template> |         </ng-template> | ||||||
|         <ng-template sf-template="toPay" let-i let-ui="ui"> |         <ng-template sf-template="toPay" let-i let-ui="ui"> | ||||||
|           <nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="99999" [nzStep]="0.01" [nzPrecision]="2" nzPlaceHolder="请输入0-99999" |           <nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="99999" [nzStep]="0.01" [nzPrecision]="2" | ||||||
|             (ngModelChange)="priceChange($event,i)" [nzFormatter]="formatterRmb" [nzParser]="parserRmb"> |             nzPlaceHolder="请输入0-99999" (ngModelChange)="priceChange($event,i)" [nzFormatter]="formatterRmb" | ||||||
|  |             [nzParser]="parserRmb"> | ||||||
|           </nz-input-number> |           </nz-input-number> | ||||||
|         </ng-template> |         </ng-template> | ||||||
|         <ng-template sf-template="receiptPay" let-i let-ui="ui"> |         <ng-template sf-template="receiptPay" let-i let-ui="ui"> | ||||||
|           <nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="99999" [nzStep]="0.01" [nzPrecision]="2" nzPlaceHolder="请输入0-99999" |           <nz-input-number [ngModel]="i.value" [nzMin]="0" [nzMax]="99999" [nzStep]="0.01" [nzPrecision]="2" | ||||||
|             (ngModelChange)="priceChange($event,i)" [nzFormatter]="formatterRmb" [nzParser]="parserRmb"> |             nzPlaceHolder="请输入0-99999" (ngModelChange)="priceChange($event,i)" [nzFormatter]="formatterRmb" | ||||||
|  |             [nzParser]="parserRmb"> | ||||||
|           </nz-input-number> |           </nz-input-number> | ||||||
|         </ng-template> |         </ng-template> | ||||||
|         <ng-template sf-template="subtotal" let-i let-ui="ui">{{ i.value | currency }}</ng-template> |         <ng-template sf-template="subtotal" let-i let-ui="ui">{{ i.value | currency }}</ng-template> | ||||||
| @ -276,14 +240,14 @@ | |||||||
|         <ng-template sf-template="total" let-i let-ui="ui">{{ i.value | currency }}</ng-template> |         <ng-template sf-template="total" let-i let-ui="ui">{{ i.value | currency }}</ng-template> | ||||||
|         <ng-template sf-template="paymentDays" let-i let-ui="ui"> |         <ng-template sf-template="paymentDays" let-i let-ui="ui"> | ||||||
|           <div nz-row class="align-center"> |           <div nz-row class="align-center"> | ||||||
|               <div nz-col nzSpan="16"> |             <div nz-col nzSpan="16"> | ||||||
|                 <nz-input-number [ngModel]="i.value" [nzMin]="1" [nzMax]="30" [nzStep]="1" |               <nz-input-number [ngModel]="i.value" [nzMin]="1" [nzMax]="30" [nzStep]="1" | ||||||
|                   (ngModelChange)="i.setValue($event)" nzPlaceHolder="请输入1-30" [nzPrecision]="0" |                 (ngModelChange)="i.setValue($event)" nzPlaceHolder="请输入1-30" [nzPrecision]="0" | ||||||
|                   [nzPrecisionMode]="'cut'"></nz-input-number> |                 [nzPrecisionMode]="'cut'"></nz-input-number> | ||||||
|               </div> |             </div> | ||||||
|               <div nz-col nzSpan="8"> |             <div nz-col nzSpan="8"> | ||||||
|                 <span> 天内支付运费</span> |               <span> 天内支付运费</span> | ||||||
|               </div> |             </div> | ||||||
|           </div> |           </div> | ||||||
|         </ng-template> |         </ng-template> | ||||||
|       </sf> |       </sf> | ||||||
| @ -293,12 +257,12 @@ | |||||||
| <nz-card> | <nz-card> | ||||||
|   <div class="align-center"> |   <div class="align-center"> | ||||||
|     <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车修改'" (click)="goBack()">取消</button> |     <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车修改'" (click)="goBack()">取消</button> | ||||||
|     <button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm()" |     <button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px" | ||||||
|     acl  [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']">提交修改</button |       (click)="submitConfirm()" acl [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']">提交修改</button> | ||||||
|     > |     <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="submitConfirm('assign')" acl | ||||||
|     <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="submitConfirm('assign')" acl  [acl-ability]="['SUPPLY-BULK-PLACEORDER-vehicleDesignate']">指派熟车</button> |       [acl-ability]="['SUPPLY-BULK-PLACEORDER-vehicleDesignate']">指派熟车</button> | ||||||
|     <button *ngIf="this.PageStatus == '整车下一单'" nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')" |     <button *ngIf="this.PageStatus == '整车下一单'" nz-button nzType="primary" style="margin-left: 48px" | ||||||
|     acl  [acl-ability]="['SUPPLY-BULK-PLACEORDER-vehicleAnotherOrder']">司机抢单</button |       (click)="submitConfirm('publish')" acl | ||||||
|     > |       [acl-ability]="['SUPPLY-BULK-PLACEORDER-vehicleAnotherOrder']">司机抢单</button> | ||||||
|   </div> |   </div> | ||||||
| </nz-card> | </nz-card> | ||||||
|  | |||||||
| @ -3,10 +3,35 @@ | |||||||
|     nz-input-number { |     nz-input-number { | ||||||
|       width: 100%; |       width: 100%; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     nz-date-picker { |     nz-date-picker { | ||||||
|       width: 94.3%; |       width: 94.3%; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     .sf3 { | ||||||
|  |       .goods_Tips_item { | ||||||
|  |         .goods_tips { | ||||||
|  |           width: calc(50% - 60px); | ||||||
|  |  | ||||||
|  |           .ant-alert { | ||||||
|  |             padding: 4px; | ||||||
|  |           } | ||||||
|  |  | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         nz-form-item { | ||||||
|  |           margin-bottom: 8px; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         // .ant-form-item-control-input-content { | ||||||
|  |         //   display: flex; | ||||||
|  |         //   justify-content: end; | ||||||
|  |         // } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   i { |   i { | ||||||
|     cursor: pointer; |     cursor: pointer; | ||||||
|   } |   } | ||||||
| @ -34,7 +59,10 @@ | |||||||
|   padding: 24px; |   padding: 24px; | ||||||
|   color: #7d7d7d; |   color: #7d7d7d; | ||||||
|   font-size: 30px; |   font-size: 30px; | ||||||
|   :hover{color: #52acff;} |  | ||||||
|  |   :hover { | ||||||
|  |     color: #52acff; | ||||||
|  |   } | ||||||
| } | } | ||||||
|  |  | ||||||
| #container { | #container { | ||||||
| @ -45,11 +73,13 @@ | |||||||
| input[type='number'] { | input[type='number'] { | ||||||
|   -moz-appearance: textfield; |   -moz-appearance: textfield; | ||||||
| } | } | ||||||
|  |  | ||||||
| input[type='number']::-webkit-inner-spin-button, | input[type='number']::-webkit-inner-spin-button, | ||||||
| input[type='number']::-webkit-outer-spin-button { | input[type='number']::-webkit-outer-spin-button { | ||||||
|   margin: 0; |   margin: 0; | ||||||
|   -webkit-appearance: none; |   -webkit-appearance: none; | ||||||
| } | } | ||||||
|  |  | ||||||
| .hides { | .hides { | ||||||
|   margin-left: 10px; |   margin-left: 10px; | ||||||
|   color: aqua; |   color: aqua; | ||||||
|  | |||||||
| @ -262,6 +262,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|   initSF3() { |   initSF3() { | ||||||
|     this.schema3 = { |     this.schema3 = { | ||||||
|       properties: { |       properties: { | ||||||
|  |         goodsTips: { | ||||||
|  |           type: 'string', | ||||||
|  |           title: '', | ||||||
|  |           ui: { | ||||||
|  |             widget: 'custom', | ||||||
|  |             class: 'goods_Tips_item', | ||||||
|  |             // visibleIf: { | ||||||
|  |             //   goodsTypeName: (value: any) => value && value === '其它' | ||||||
|  |             // } | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|         goodsTypeId: { |         goodsTypeId: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '货物名称', |           title: '货物名称', | ||||||
| @ -323,6 +334,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|             errors: { required: '请填写货物名称' }, |             errors: { required: '请填写货物名称' }, | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               goodsTypeName: (value: any) => value && value === '其它' |               goodsTypeName: (value: any) => value && value === '其它' | ||||||
|  |             }, | ||||||
|  |             blur: (value: any) => { | ||||||
|  |               this.checkGoodsName(); | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
| @ -333,6 +347,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|       '*': { |       '*': { | ||||||
|         spanLabelFixed: 90, |         spanLabelFixed: 90, | ||||||
|         grid: { span: 12 } |         grid: { span: 12 } | ||||||
|  |       }, | ||||||
|  |       $goodsTips: { | ||||||
|  |         grid: { span: 24 } | ||||||
|       } |       } | ||||||
|     }; |     }; | ||||||
|   } |   } | ||||||
| @ -465,10 +482,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|               ) |               ) | ||||||
|             }, |             }, | ||||||
|             change: (tag: any, org: any) => { |             change: (tag: any, org: any) => { | ||||||
|               if(tag === '3'){ |               if (tag === '3') { | ||||||
|                 this.sf5.setValue('/insurancePremium', null); |                 this.sf5.setValue('/insurancePremium', null); | ||||||
|                 this.sf5.setValue('/insuranceRate', null); |                 this.sf5.setValue('/insuranceRate', null); | ||||||
|               }else { |               } else { | ||||||
|                 this.getInsurersPrice(tag); |                 this.getInsurersPrice(tag); | ||||||
|               } |               } | ||||||
|             } |             } | ||||||
| @ -481,7 +498,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|           ui: { |           ui: { | ||||||
|             widget: 'custom', |             widget: 'custom', | ||||||
|             visibleIf: { insuranceType: (value: string) => value === '0' } |             visibleIf: { insuranceType: (value: string) => value === '0' } | ||||||
|           } , |           }, | ||||||
|         }, |         }, | ||||||
|         type2: { |         type2: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
| @ -494,7 +511,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|         insurancePremium: { |         insurancePremium: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '服务包费用', |           title: '服务包费用', | ||||||
|           readOnly:true, |           readOnly: true, | ||||||
|           ui: { |           ui: { | ||||||
|             visibleIf: { insuranceType: (value: string) => value !== '3' } |             visibleIf: { insuranceType: (value: string) => value !== '3' } | ||||||
|           } |           } | ||||||
| @ -523,7 +540,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|       }, |       }, | ||||||
|       required: [ 'insurancePremium'] |       required: ['insurancePremium'] | ||||||
|     }; |     }; | ||||||
|     this.ui5 = { |     this.ui5 = { | ||||||
|       '*': { |       '*': { | ||||||
| @ -733,7 +750,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|         this.service |         this.service | ||||||
|           .request( |           .request( | ||||||
|             this.service.$api_getAdditionalRate + |             this.service.$api_getAdditionalRate + | ||||||
|               `?shipperId=${this?.sf1?.value?.shipperAppUserId || ''}&enterpriseInfoId=${items}&resourcetype='1'` |             `?shipperId=${this?.sf1?.value?.shipperAppUserId || ''}&enterpriseInfoId=${items}&resourcetype='1'` | ||||||
|           ) |           ) | ||||||
|           .subscribe(res => { |           .subscribe(res => { | ||||||
|             if (res) { |             if (res) { | ||||||
| @ -986,9 +1003,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|     ]; |     ]; | ||||||
|     // 运费信息 |     // 运费信息 | ||||||
|     const expenseList = [ |     const expenseList = [ | ||||||
|       { expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '' ,resourceId: this.sf7data?.PREresourceId || '' }, |       { expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '', resourceId: this.sf7data?.PREresourceId || '' }, | ||||||
|       { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' ,resourceId: this.sf7data?.RECEresourceId || ''}, |       { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '', resourceId: this.sf7data?.RECEresourceId || '' }, | ||||||
|       { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' ,resourceId: this.sf7data?.BACKresourceId || ''} |       { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '', resourceId: this.sf7data?.BACKresourceId || '' } | ||||||
|     ]; |     ]; | ||||||
|     // 从“再下一单”过来,将所有的子参数内的id都删除 |     // 从“再下一单”过来,将所有的子参数内的id都删除 | ||||||
|     if (this.PageStatus === '整车下一单') { |     if (this.PageStatus === '整车下一单') { | ||||||
| @ -1017,8 +1034,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|       paymentDays: this.sf7.value.paymentDays, |       paymentDays: this.sf7.value.paymentDays, | ||||||
|       estimatedKilometers: this.totalDistance, |       estimatedKilometers: this.totalDistance, | ||||||
|       estimatedTravelTime: this.totalTime, |       estimatedTravelTime: this.totalTime, | ||||||
|       subtotal :this.sf7.value.subtotal, |       subtotal: this.sf7.value.subtotal, | ||||||
|       total:this.sf7.value.total, |       total: this.sf7.value.total, | ||||||
|       insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, |       insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, | ||||||
|       goodsValue: this.sf4.value.goodsValue |       goodsValue: this.sf4.value.goodsValue | ||||||
|     }; |     }; | ||||||
| @ -1081,7 +1098,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|       nzWidth: 900, |       nzWidth: 900, | ||||||
|       nzOnOk: item => { |       nzOnOk: item => { | ||||||
|         console.log(item); |         console.log(item); | ||||||
|         if(item?.poi) { |         if (item?.poi) { | ||||||
|           const poi = item.poi; |           const poi = item.poi; | ||||||
|           const locList = poi.pois; |           const locList = poi.pois; | ||||||
|           switch (type) { |           switch (type) { | ||||||
| @ -1114,10 +1131,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|               this.getInsurersPrice(); // 计算保费金额 |               this.getInsurersPrice(); // 计算保费金额 | ||||||
|             }); |             }); | ||||||
|           } |           } | ||||||
|         return true |           return true | ||||||
|         } else { |         } else { | ||||||
|           this.service.msgSrv.warning('请重新手动选择地址!') |           this.service.msgSrv.warning('请重新手动选择地址!') | ||||||
|         return false |           return false | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
| @ -1155,7 +1172,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|     this.totalDistance = res?.estimatedKilometers; |     this.totalDistance = res?.estimatedKilometers; | ||||||
|     this.totalTime = res?.estimatedTravelTime; |     this.totalTime = res?.estimatedTravelTime; | ||||||
|     this.sf1data = { |     this.sf1data = { | ||||||
|       resourceCode:res?.resourceCode || '', |       resourceCode: res?.resourceCode || '', | ||||||
|       enterpriseInfoName: res?.enterpriseInfoName, |       enterpriseInfoName: res?.enterpriseInfoName, | ||||||
|       enterpriseInfoId: res?.enterpriseInfoId, |       enterpriseInfoId: res?.enterpriseInfoId, | ||||||
|       dispatchPhone: res?.dispatchPhone, |       dispatchPhone: res?.dispatchPhone, | ||||||
| @ -1423,7 +1440,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|   // 计算保价费金额 |   // 计算保价费金额 | ||||||
|   getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { |   getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { | ||||||
|     console.log(this.totalDistance); |     console.log(this.totalDistance); | ||||||
|     if (insuranceType !== '3' &&  this.totalDistance > 0) { |     if (insuranceType !== '3' && this.totalDistance > 0) { | ||||||
|       const params = { |       const params = { | ||||||
|         insuranceType, |         insuranceType, | ||||||
|         goodsValue: this.sf4.value.goodsValue, |         goodsValue: this.sf4.value.goodsValue, | ||||||
| @ -1440,14 +1457,27 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { | |||||||
|       }); |       }); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|     // 运费信息价格变更 |   // 运费信息价格变更 | ||||||
|     priceChange(event:any, i:any){ |   priceChange(event: any, i: any) { | ||||||
|       i.setValue(event); |     i.setValue(event); | ||||||
|       if(event>=99999){ |     if (event >= 99999) { | ||||||
|         this.modalService.warning({ |       this.modalService.warning({ | ||||||
|           nzTitle: '可输入的最大金额为99999元', |         nzTitle: '可输入的最大金额为99999元', | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |     this.payChange() | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   checkGoodsName() { | ||||||
|  |     this.service.request(this.service.$api_checkGoodsName, this.sf3.value.goodsName1).subscribe(res => { | ||||||
|  |       if (res === false) { | ||||||
|  |         const modalRef = this.modalService.error({ | ||||||
|  |           nzTitle: '货物名称含有违禁词,请重新输入!', | ||||||
|  |         }); | ||||||
|  |         modalRef.afterClose.subscribe(result => { | ||||||
|  |           // this.sf3.setValue('/goodsName1', null); | ||||||
|         }); |         }); | ||||||
|       } |       } | ||||||
|       this.payChange() |     }); | ||||||
|     } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -436,13 +436,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|                 map((res: any) => { |                 map((res: any) => { | ||||||
|                   return [...res]; |                   return [...res]; | ||||||
|                 }) |                 }) | ||||||
|               ) |               ); | ||||||
|             }, |             }, | ||||||
|             change: (tag: any, org: any) => { |             change: (tag: any, org: any) => { | ||||||
|               if(tag === '3'){ |               if (tag === '3') { | ||||||
|                 this.sf5.setValue('/insurancePremium', null); |                 this.sf5.setValue('/insurancePremium', null); | ||||||
|                 this.sf5.setValue('/insuranceRate', null); |                 this.sf5.setValue('/insuranceRate', null); | ||||||
|               }else { |               } else { | ||||||
|                 this.getInsurersPrice(tag); |                 this.getInsurersPrice(tag); | ||||||
|               } |               } | ||||||
|             } |             } | ||||||
| @ -455,7 +455,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|           ui: { |           ui: { | ||||||
|             widget: 'custom', |             widget: 'custom', | ||||||
|             visibleIf: { insuranceType: (value: string) => value === '0' } |             visibleIf: { insuranceType: (value: string) => value === '0' } | ||||||
|           } , |           } | ||||||
|         }, |         }, | ||||||
|         type2: { |         type2: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
| @ -468,7 +468,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|         insurancePremium: { |         insurancePremium: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '服务包费用', |           title: '服务包费用', | ||||||
|           readOnly:true, |           readOnly: true, | ||||||
|           ui: { |           ui: { | ||||||
|             visibleIf: { insuranceType: (value: string) => value !== '3' } |             visibleIf: { insuranceType: (value: string) => value !== '3' } | ||||||
|           } |           } | ||||||
| @ -495,9 +495,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|             widget: 'custom', |             widget: 'custom', | ||||||
|             visibleIf: { insuranceType: (value: string) => value === '1' } |             visibleIf: { insuranceType: (value: string) => value === '1' } | ||||||
|           } |           } | ||||||
|         }, |         } | ||||||
|       }, |       }, | ||||||
|       required: [ 'insurancePremium'] |       required: ['insurancePremium'] | ||||||
|     }; |     }; | ||||||
|     this.ui5 = { |     this.ui5 = { | ||||||
|       '*': { |       '*': { | ||||||
| @ -562,8 +562,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|         receiptUserPhone: { |         receiptUserPhone: { | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           title: '联系电话', |           title: '联系电话', | ||||||
|  |           format: 'mobile', | ||||||
|           maxLength: 11, |           maxLength: 11, | ||||||
|           ui: { |           ui: { | ||||||
|  |             errors: { | ||||||
|  |               format: '请输入正确联系电话格式' | ||||||
|  |             }, | ||||||
|             visibleIf: { |             visibleIf: { | ||||||
|               receiptType: value => value === '2' |               receiptType: value => value === '2' | ||||||
|             } |             } | ||||||
| @ -955,8 +959,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|       ...this.sf6.value, |       ...this.sf6.value, | ||||||
|       expenseDTOList: expenseList, |       expenseDTOList: expenseList, | ||||||
|       paymentDays: this.sf7.value.paymentDays, |       paymentDays: this.sf7.value.paymentDays, | ||||||
|       subtotal :this.sf7.value.subtotal, |       subtotal: this.sf7.value.subtotal, | ||||||
|       total:this.sf7.value.total, |       total: this.sf7.value.total, | ||||||
|       estimatedKilometers: this.totalDistance, |       estimatedKilometers: this.totalDistance, | ||||||
|       estimatedTravelTime: this.totalTime, |       estimatedTravelTime: this.totalTime, | ||||||
|       insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, |       insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, | ||||||
| @ -999,42 +1003,42 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|       nzContent: AmapPoiPickerComponent, |       nzContent: AmapPoiPickerComponent, | ||||||
|       nzWidth: 900, |       nzWidth: 900, | ||||||
|       nzOnOk: item => { |       nzOnOk: item => { | ||||||
|         if(item?.poi) { |         if (item?.poi) { | ||||||
|         const poi = item.poi; |           const poi = item.poi; | ||||||
|         const locList = poi.pois; |           const locList = poi.pois; | ||||||
|         switch (type) { |           switch (type) { | ||||||
|           case 'start': |             case 'start': | ||||||
|             this.startInfo[index].detailedAddress = poi.formattedAddress; |               this.startInfo[index].detailedAddress = poi.formattedAddress; | ||||||
|             this.startInfo[index].longitude = locList[0]; |               this.startInfo[index].longitude = locList[0]; | ||||||
|             this.startInfo[index].latitude = locList[1]; |               this.startInfo[index].latitude = locList[1]; | ||||||
|             this.startInfo[index].province = poi.addressComponent.province; |               this.startInfo[index].province = poi.addressComponent.province; | ||||||
|             this.startInfo[index].city = poi.addressComponent.city; |               this.startInfo[index].city = poi.addressComponent.city; | ||||||
|             this.startInfo[index].area = poi.addressComponent.district; |               this.startInfo[index].area = poi.addressComponent.district; | ||||||
|             break; |               break; | ||||||
|           case 'end': |             case 'end': | ||||||
|             this.endInfo[index].detailedAddress = poi.formattedAddress; |               this.endInfo[index].detailedAddress = poi.formattedAddress; | ||||||
|             this.endInfo[index].longitude = locList[0]; |               this.endInfo[index].longitude = locList[0]; | ||||||
|             this.endInfo[index].latitude = locList[1]; |               this.endInfo[index].latitude = locList[1]; | ||||||
|             this.endInfo[index].province = poi.addressComponent.province; |               this.endInfo[index].province = poi.addressComponent.province; | ||||||
|             this.endInfo[index].city = poi.addressComponent.city; |               this.endInfo[index].city = poi.addressComponent.city; | ||||||
|             this.endInfo[index].area = poi.addressComponent.district; |               this.endInfo[index].area = poi.addressComponent.district; | ||||||
|             break; |               break; | ||||||
|           default: |             default: | ||||||
|             break; |               break; | ||||||
|  |           } | ||||||
|  |           // 计算里程,时间 | ||||||
|  |           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(); // 计算保费金额 | ||||||
|  |             }); | ||||||
|  |           } | ||||||
|  |           return true; | ||||||
|  |         } else { | ||||||
|  |           this.service.msgSrv.warning('请重新手动选择地址!'); | ||||||
|  |           return false; | ||||||
|         } |         } | ||||||
|         // 计算里程,时间 |  | ||||||
|         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(); // 计算保费金额 |  | ||||||
|           }); |  | ||||||
|         } |  | ||||||
|         return true |  | ||||||
|       } else { |  | ||||||
|         this.service.msgSrv.warning('请重新手动选择地址!') |  | ||||||
|         return false |  | ||||||
|       } |  | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
| @ -1193,7 +1197,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|   getInsurersPrice(insuranceType = this.sf5.value?.insuranceType) { |   getInsurersPrice(insuranceType = this.sf5.value?.insuranceType) { | ||||||
|     console.log(insuranceType); |     console.log(insuranceType); | ||||||
|     console.log(this.totalDistance); |     console.log(this.totalDistance); | ||||||
|     if (insuranceType !== '3' &&  this.totalDistance > 0) { |     if (insuranceType !== '3' && this.totalDistance > 0) { | ||||||
|       const params = { |       const params = { | ||||||
|         insuranceType, |         insuranceType, | ||||||
|         goodsValue: this.sf4.value.goodsValue, |         goodsValue: this.sf4.value.goodsValue, | ||||||
| @ -1210,14 +1214,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit { | |||||||
|       }); |       }); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|       // 运费信息价格变更 |   // 运费信息价格变更 | ||||||
|       priceChange(event:any, i:any){ |   priceChange(event: any, i: any) { | ||||||
|         i.setValue(event); |     i.setValue(event); | ||||||
|         if(event>=99999){ |     if (event >= 99999) { | ||||||
|           this.modalService.warning({ |       this.modalService.warning({ | ||||||
|             nzTitle: '可输入的最大金额为99999元', |         nzTitle: '可输入的最大金额为99999元' | ||||||
|           }); |       }); | ||||||
|         } |     } | ||||||
|         this.payChange() |     this.payChange(); | ||||||
|       } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -180,6 +180,9 @@ export class SupplyManagementService extends BaseService { | |||||||
|   // 发送邀请司机短信 |   // 发送邀请司机短信 | ||||||
|   $api_send_msg_code = `/api/mdc/pbc/smsSend/sendInviteDriver`; |   $api_send_msg_code = `/api/mdc/pbc/smsSend/sendInviteDriver`; | ||||||
|  |  | ||||||
|  |   // 校验货物名称是否合规 | ||||||
|  |   $api_checkGoodsName = '/api/sdc/goodsResourceShipper/checkGoodsName'; | ||||||
|  |  | ||||||
|   getDictByKey(dictKey: string) { |   getDictByKey(dictKey: string) { | ||||||
|     const params = { dictKey: dictKey }; |     const params = { dictKey: dictKey }; | ||||||
|     return this.request(this.$api_getDictValue, params); |     return this.request(this.$api_getDictValue, params); | ||||||
|  | |||||||
| @ -36,7 +36,7 @@ | |||||||
|   </nz-tabset> |   </nz-tabset> | ||||||
|   <!-- 数据列表 --> |   <!-- 数据列表 --> | ||||||
|   <st #st [scroll]="{ x: '1200px',y:'450px' }" [data]="service.$api_get_individual_income_page" [columns]="columns" |   <st #st [scroll]="{ x: '1200px',y:'450px' }" [data]="service.$api_get_individual_income_page" [columns]="columns" | ||||||
|     [req]="{  params: reqParams }" [page]="{}" [loading]="service.http.loading" (change)="stChange($event)"> |     [req]="{  process: beforeReq }" [page]="{}" [loading]="service.http.loading" (change)="stChange($event)"> | ||||||
|   </st> |   </st> | ||||||
| </nz-card> | </nz-card> | ||||||
| <ng-template #extraTemplate> | <ng-template #extraTemplate> | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | import { Component, OnInit, ViewChild } from '@angular/core'; | ||||||
| import { ActivatedRoute, Router } from '@angular/router'; | import { ActivatedRoute, Router } from '@angular/router'; | ||||||
| import { STChange, STColumn, STComponent, STData } from '@delon/abc/st'; | import { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; | ||||||
| import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; | import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; | ||||||
| import { ShipperBaseService } from '@shared'; | import { ShipperBaseService } from '@shared'; | ||||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | import { NzModalService } from 'ng-zorro-antd/modal'; | ||||||
| @ -32,16 +32,15 @@ export class TaxManagementIndividualIncomeComponent implements OnInit { | |||||||
|  |  | ||||||
|   constructor(public service: TaxManagementService) {} |   constructor(public service: TaxManagementService) {} | ||||||
|  |  | ||||||
|   /** |   beforeReq = (requestOptions: STRequestOptions) => { | ||||||
|    * 查询参数 |     Object.assign(requestOptions.body, { declareStatus: this.selectedIndex }); | ||||||
|    */ |     if (this.sf) { | ||||||
|   get reqParams() { |       Object.assign(requestOptions.body, { ...this.sf.value }); | ||||||
|     const params = Object.assign({}, this.sf?.value || {}, { |       delete requestOptions.body._$expand; | ||||||
|       declareStatus: this.selectedIndex |     } | ||||||
|     }); |     this.selectedRows = []; | ||||||
|     delete params._$expand; |     return requestOptions; | ||||||
|     return { ...params }; |   }; | ||||||
|   } |  | ||||||
|  |  | ||||||
|   stChange(e: STChange): void { |   stChange(e: STChange): void { | ||||||
|     switch (e.type) { |     switch (e.type) { | ||||||
|  | |||||||
| @ -119,7 +119,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { | |||||||
|             searchLoadingText: '搜索中...', |             searchLoadingText: '搜索中...', | ||||||
|             allowClear: true, |             allowClear: true, | ||||||
|             onSearch: (q: any) => { |             onSearch: (q: any) => { | ||||||
|               let str =q.replace(/^\s+|\s+$/g,""); |               let str = q.replace(/^\s+|\s+$/g, ""); | ||||||
|               if (str) { |               if (str) { | ||||||
|                 return this.service |                 return this.service | ||||||
|                   .request(this.service.$api_enterpriceList, { enterpriseName: str }) |                   .request(this.service.$api_enterpriceList, { enterpriseName: str }) | ||||||
| @ -262,7 +262,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { | |||||||
|       { title: '货主名称', index: 'shipperName', className: 'text-center', width: '180px' }, |       { title: '货主名称', index: 'shipperName', className: 'text-center', width: '180px' }, | ||||||
|       { title: '货主纳税人识别号', index: 'shipperProvinceCode', className: 'text-center', width: '180px' }, |       { title: '货主纳税人识别号', index: 'shipperProvinceCode', className: 'text-center', width: '180px' }, | ||||||
|       { title: '录单时间', index: 'billCreateTime', className: 'text-center', width: '250px' }, |       { title: '录单时间', index: 'billCreateTime', className: 'text-center', width: '250px' }, | ||||||
|       { title: '接单时间', index: 'wayBillCreateTime',  className: 'text-center', width: '200px' }, |       { title: '接单时间', index: 'wayBillCreateTime', className: 'text-center', width: '200px' }, | ||||||
|       { title: '发车时间', index: 'loadTime', className: 'text-center', width: '200px' }, |       { title: '发车时间', index: 'loadTime', className: 'text-center', width: '200px' }, | ||||||
|       { title: '到车时间', index: 'unloadTime', className: 'text-center', width: '150px' }, |       { title: '到车时间', index: 'unloadTime', className: 'text-center', width: '150px' }, | ||||||
|       { title: '结束时间', index: 'payeeName', className: 'text-center', width: '150px' }, |       { title: '结束时间', index: 'payeeName', className: 'text-center', width: '150px' }, | ||||||
| @ -308,7 +308,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { | |||||||
|       nzOkText: '确定', |       nzOkText: '确定', | ||||||
|       nzCancelText: '取消', |       nzCancelText: '取消', | ||||||
|       nzOnOk: () => { |       nzOnOk: () => { | ||||||
|         this.service.request(this.service.$api_get_recessionTaxOrder,params).subscribe((res: any) => { |         this.service.request(this.service.$api_get_recessionTaxOrder, params).subscribe((res: any) => { | ||||||
|           if (res) { |           if (res) { | ||||||
|             this.service.msgSrv.success('撤销成功'); |             this.service.msgSrv.success('撤销成功'); | ||||||
|             this.search(); |             this.search(); | ||||||
| @ -499,5 +499,4 @@ export class TaxManagementOrderReportingComponent implements OnInit { | |||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -51,7 +51,7 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit { | |||||||
|   beforeReq = (requestOptions: STRequestOptions) => {let a: string = ''; |   beforeReq = (requestOptions: STRequestOptions) => {let a: string = ''; | ||||||
|     switch (this.subjectType) { |     switch (this.subjectType) { | ||||||
|       case '0': |       case '0': | ||||||
|       a = this.record?.networkTransporter; |       a = this.record?.networkTransporterId; | ||||||
|       break |       break | ||||||
|       case '1': |       case '1': | ||||||
|       a = this.record?.shipperId; |       a = this.record?.shipperId; | ||||||
| @ -60,7 +60,7 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit { | |||||||
|       a = this.record?.driverId; |       a = this.record?.driverId; | ||||||
|       break |       break | ||||||
|       case '3': |       case '3': | ||||||
|       a = this.record?.billId; |       a = this.record?.wayBillId; | ||||||
|       break |       break | ||||||
|     } |     } | ||||||
|       Object.assign(requestOptions.body, { |       Object.assign(requestOptions.body, { | ||||||
|  | |||||||
| @ -237,7 +237,7 @@ export class ETCBlacklistComponent implements OnInit { | |||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         params5: { |         params5: { | ||||||
|           title: '司机姓名', |           title: '车辆所有人', | ||||||
|           type: 'string', |           type: 'string', | ||||||
|           ui: { |           ui: { | ||||||
|             placeholder: '请输入', |             placeholder: '请输入', | ||||||
|  | |||||||
| @ -177,7 +177,7 @@ export class InvoiceRequestedDetailComponent implements OnInit { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   routeToOrder(item: any) { |   routeToOrder(item: any) { | ||||||
|     if (item.billType === 1) { |     if (item.billType === '1') { | ||||||
|       this.router.navigate(['/order-management/vehicle/vehicle-detail/' + item.billHId]); |       this.router.navigate(['/order-management/vehicle/vehicle-detail/' + item.billHId]); | ||||||
|     } else { |     } else { | ||||||
|       this.router.navigate(['/order-management/bulk/bulk-detail/' + item.billHId]); |       this.router.navigate(['/order-management/bulk/bulk-detail/' + item.billHId]); | ||||||
|  | |||||||
| @ -20,7 +20,7 @@ | |||||||
|     <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"> |     <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"> | ||||||
|       <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button> |       <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button> | ||||||
|       <button nz-button (click)="resetSF()">重置</button> |       <button nz-button (click)="resetSF()">重置</button> | ||||||
|       <!-- <button nz-button> 导出</button> --> |       <button nz-button (click)="exprot()"> 导出</button> | ||||||
|       <button nz-button nzType="link" (click)="expandToggle()"> |       <button nz-button nzType="link" (click)="expandToggle()"> | ||||||
|         {{ !_$expand ? '展开' : '收起' }} |         {{ !_$expand ? '展开' : '收起' }} | ||||||
|         <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> |         <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> | ||||||
|  | |||||||
| @ -302,6 +302,11 @@ export class InvoiceRequestedComponent { | |||||||
|     this.sf?.setValue('/expand', this._$expand); |     this.sf?.setValue('/expand', this._$expand); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   // 导出 | ||||||
|  |   exprot() { | ||||||
|  |     this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_export_invoice_requested_page); | ||||||
|  |   } | ||||||
|  |  | ||||||
|   private initSF(): SFSchema { |   private initSF(): SFSchema { | ||||||
|     return { |     return { | ||||||
|       properties: { |       properties: { | ||||||
|  | |||||||
| @ -17,6 +17,8 @@ export class TicketService extends ShipperBaseService { | |||||||
|  |  | ||||||
|   // 运营端查询发票申请记录 |   // 运营端查询发票申请记录 | ||||||
|   $api_get_invoice_requested_page = '/api/fcc/ficoVatappH/queryOperateVatappHList'; |   $api_get_invoice_requested_page = '/api/fcc/ficoVatappH/queryOperateVatappHList'; | ||||||
|  |   // 导出发票申请记录 | ||||||
|  |   $api_export_invoice_requested_page = '/api/fcc/ficoVatappH/reportOperateVatappHList'; | ||||||
|   // 获取开票申请订单明细头部信息 |   // 获取开票申请订单明细头部信息 | ||||||
|   $api_get_invoice_requested_header_detail = '/api/fcc/ficoVatappBill/getDetailHeadByVatappHId'; |   $api_get_invoice_requested_header_detail = '/api/fcc/ficoVatappBill/getDetailHeadByVatappHId'; | ||||||
|   // 货主/运营端获取开票申请订单明细 |   // 货主/运营端获取开票申请订单明细 | ||||||
| @ -74,7 +76,7 @@ export class TicketService extends ShipperBaseService { | |||||||
|   // 获取分票发票抬头开票申请订单明细 |   // 获取分票发票抬头开票申请订单明细 | ||||||
|   $api_get_invoice_order_detail = '/api/fcc/ficoVatappBill/getDetailByVatinvHId'; |   $api_get_invoice_order_detail = '/api/fcc/ficoVatappBill/getDetailByVatinvHId'; | ||||||
|   // 货主/运营端获取开票申请订单明细导出 |   // 货主/运营端获取开票申请订单明细导出 | ||||||
|   $api_export_invoice_order_detail = '/api/fcc/ficoVatappBill/reportDetailByVatapp'; |   $api_export_invoice_order_detail = '/api/fcc/ficoVatappBill/reportDetailByVatinvHId'; | ||||||
|   // 获取分票发票抬头开票申请费用明细 |   // 获取分票发票抬头开票申请费用明细 | ||||||
|   $api_get_invoice_cost_detail = '/api/fcc/ficoVatappFee/getDetailByVatinvHId'; |   $api_get_invoice_cost_detail = '/api/fcc/ficoVatappFee/getDetailByVatinvHId'; | ||||||
|   // 获取分票发票明细 |   // 获取分票发票明细 | ||||||
| @ -149,21 +151,22 @@ export class TicketService extends ShipperBaseService { | |||||||
|     if (!url) { |     if (!url) { | ||||||
|       return; |       return; | ||||||
|     } |     } | ||||||
|     const uA = window.navigator.userAgent; // 判断浏览器内核 |     this.openURL(url); | ||||||
|     const isIE = |     // const uA = window.navigator.userAgent; // 判断浏览器内核 | ||||||
|       /msie\s|trident\/|edge\//i.test(uA) && |     // const isIE = | ||||||
|       !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); |     //   /msie\s|trident\/|edge\//i.test(uA) && | ||||||
|     const objectUrl = url; |     //   !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); | ||||||
|     const a = document.createElement('a'); |     // const objectUrl = url; | ||||||
|     document.body.appendChild(a); |     // const a = document.createElement('a'); | ||||||
|     a.href = objectUrl; |     // document.body.appendChild(a); | ||||||
|     a.download = '面单.pdf'; |     // a.href = objectUrl; | ||||||
|     if (isIE) { |     // a.download = '面单.pdf'; | ||||||
|       // 兼容IE11无法触发下载的问题 |     // if (isIE) { | ||||||
|       (navigator as any).msSaveBlob(url, a.download); |     //   // 兼容IE11无法触发下载的问题 | ||||||
|     } else { |     //   (navigator as any).msSaveBlob(url, a.download); | ||||||
|       a.click(); |     // } else { | ||||||
|     } |     //   a.click(); | ||||||
|     a.remove(); |     // } | ||||||
|  |     // a.remove(); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -39,8 +39,8 @@ export class WaybillManagementBulkeDetailComponent implements OnInit { | |||||||
|   modalTitle:string = ''; |   modalTitle:string = ''; | ||||||
|   unLoadingPlaceVOList: any = []; |   unLoadingPlaceVOList: any = []; | ||||||
|   logColumns2: STColumn[] = [ |   logColumns2: STColumn[] = [ | ||||||
|     { title: '时间', index: 'vinOutTime' }, |     { title: '时间', index: 'parkBte' }, | ||||||
|     { title: '地点', index: 'cityName' }, |     { title: '地点', index: 'parkAdr' }, | ||||||
|   ]; |   ]; | ||||||
|   logColumns: STColumn[] = [ |   logColumns: STColumn[] = [ | ||||||
|     { title: '款项', index: 'costCodeLabel' }, |     { title: '款项', index: 'costCodeLabel' }, | ||||||
| @ -167,14 +167,15 @@ sureArrive(item: any) { | |||||||
|         points?.forEach((item: any) => { |         points?.forEach((item: any) => { | ||||||
|           list.push({ |           list.push({ | ||||||
|             name: item.hgt, |             name: item.hgt, | ||||||
|             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] |             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], | ||||||
|  |             time: item.gtm | ||||||
|           }); |           }); | ||||||
|         }); |         }); | ||||||
|         this.mapList = list; |         this.mapList = list; | ||||||
|         this.addressItems = res.cityArray; |         this.addressItems = res.parkArray; | ||||||
|         if(this.addressItems && this.addressItems.length > 0){ |         if(this.addressItems && this.addressItems.length > 0){ | ||||||
|           this.addressItems.forEach(item => { |           this.addressItems.forEach(item => { | ||||||
|             item.vinOutTime = this.getLocalTime(item.vinOutTime); |             item.parkBte = this.getLocalTime(item.parkBte); | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @ -190,7 +191,8 @@ sureArrive(item: any) { | |||||||
|         points?.forEach((item: any) => { |         points?.forEach((item: any) => { | ||||||
|           list.push({ |           list.push({ | ||||||
|             name: item.hgt, |             name: item.hgt, | ||||||
|             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] |             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], | ||||||
|  |             time: item.gtm | ||||||
|           }); |           }); | ||||||
|         }); |         }); | ||||||
|         this.mapList = list; |         this.mapList = list; | ||||||
|  | |||||||
| @ -160,14 +160,15 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro | |||||||
|         points?.forEach((item: any) => { |         points?.forEach((item: any) => { | ||||||
|           list.push({ |           list.push({ | ||||||
|             name: item.hgt, |             name: item.hgt, | ||||||
|             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] |             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], | ||||||
|  |             time: item.gtm | ||||||
|           }); |           }); | ||||||
|         }); |         }); | ||||||
|         this.mapList = list; |         this.mapList = list; | ||||||
|         this.addressItems = res.cityArray; |         this.addressItems = res.parkArray; | ||||||
|         if (this.addressItems && this.addressItems.length > 0) { |         if (this.addressItems && this.addressItems.length > 0) { | ||||||
|           this.addressItems.forEach(item => { |           this.addressItems.forEach(item => { | ||||||
|             item.vinOutTime = this.getLocalTime(item.vinOutTime); |             item.parkBte = this.getLocalTime(item.parkBte); | ||||||
|           }); |           }); | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @ -183,7 +184,8 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro | |||||||
|         points?.forEach((item: any) => { |         points?.forEach((item: any) => { | ||||||
|           list.push({ |           list.push({ | ||||||
|             name: item.hgt, |             name: item.hgt, | ||||||
|             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] |             lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], | ||||||
|  |             time: item.gtm | ||||||
|           }); |           }); | ||||||
|         }); |         }); | ||||||
|         this.mapList = list; |         this.mapList = list; | ||||||
|  | |||||||
| @ -48,15 +48,18 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy | |||||||
|   @Output() |   @Output() | ||||||
|   readonly clcikPointEvent = new EventEmitter<any>(); |   readonly clcikPointEvent = new EventEmitter<any>(); | ||||||
|  |  | ||||||
|   constructor(public service: BaseService, private amapService: AmapService) {} |   constructor(public service: BaseService, private amapService: AmapService) { | ||||||
|  |     this.mapInit(); | ||||||
|  |   } | ||||||
|   ngOnChanges(changes: SimpleChanges): void { |   ngOnChanges(changes: SimpleChanges): void { | ||||||
|     // 路线图变更: 设置路线图, 指定路线图 |     // 路线图变更: 设置路线图, 指定路线图 | ||||||
|     if (changes?.pathList?.currentValue && this?.pathSimplifierIns) { |     if (changes?.pathList?.currentValue && this?.pathSimplifierIns) { | ||||||
|       this.setData(changes.pathList?.currentValue); |       this.setData(changes.pathList?.currentValue); | ||||||
|       this.setPathIndex(this.selectedIndex); |       this.setPathIndex(this.selectedIndex); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // 路径信息变更: 更新路线图, 设置路线图, 指定路线图, 获取终点地址信息并标点 |     // 路径信息变更: 更新路线图, 设置路线图, 指定路线图, 获取终点地址信息并标点 | ||||||
|     if (changes?.mapList?.currentValue && this?.pathSimplifierIns && changes.mapList?.currentValue.length > 0) { |     if (changes?.mapList?.currentValue) { | ||||||
|       // console.log(this.mapList); |       // console.log(this.mapList); | ||||||
|       this.pathList = [ |       this.pathList = [ | ||||||
|         { |         { | ||||||
| @ -64,22 +67,29 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy | |||||||
|           points: changes.mapList?.currentValue |           points: changes.mapList?.currentValue | ||||||
|         } |         } | ||||||
|       ]; |       ]; | ||||||
|       this.setData(this.pathList); |       if (this?.pathSimplifierIns) { | ||||||
|       this.setPathIndex(this.selectedIndex); |         this.setData(this.pathList); | ||||||
|       this.getPoiByPositon(this.mapList[this.mapList?.length - 1]?.lnglat); |         if (changes.mapList?.currentValue.length > 0) { | ||||||
|  |           this.setPathIndex(this.selectedIndex); | ||||||
|  |           this.getPoiByPositon('起', 'blue', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time)); | ||||||
|  |           this.getPoiByPositon( | ||||||
|  |             '终', | ||||||
|  |             'red', | ||||||
|  |             this.mapList[this.mapList?.length - 1]?.lnglat, | ||||||
|  |             '时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time) | ||||||
|  |           ); | ||||||
|  |         } | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|     // 标点列表变更: 更新标点数据, 绘画标点 |     // 标点列表变更: 更新标点数据, 绘画标点 | ||||||
|     if (changes?.pois?.currentValue) { |     if (changes?.pois?.currentValue) { | ||||||
|       // console.log(this.pois); |  | ||||||
|       this._pois = changes?.pois?.currentValue; |       this._pois = changes?.pois?.currentValue; | ||||||
|       if (this?.markerList && this._pois.length > 0) { |       if (this?.markerList && this._pois.length > 0) { | ||||||
|         this.markerList.render(this._pois); |         this.markerList.render(this._pois); | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   ngOnInit(): void { |   ngOnInit(): void {} | ||||||
|     this.mapInit(); |  | ||||||
|   } |  | ||||||
|   ngOnDestroy(): void { |   ngOnDestroy(): void { | ||||||
|     // 销毁地图数据 |     // 销毁地图数据 | ||||||
|     if (this.aMap) { |     if (this.aMap) { | ||||||
| @ -145,6 +155,13 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy | |||||||
|  |  | ||||||
|     if (this.pathList.length > 0) { |     if (this.pathList.length > 0) { | ||||||
|       this.setPathIndex(this.selectedIndex); |       this.setPathIndex(this.selectedIndex); | ||||||
|  |       this.getPoiByPositon('起', 'blue', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time)); | ||||||
|  |       this.getPoiByPositon( | ||||||
|  |         '终', | ||||||
|  |         'red', | ||||||
|  |         this.mapList[this.mapList?.length - 1]?.lnglat, | ||||||
|  |         '时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time) | ||||||
|  |       ); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     this.pathSimplifierIns.on('pointClick', (e: any, info: any) => { |     this.pathSimplifierIns.on('pointClick', (e: any, info: any) => { | ||||||
| @ -158,7 +175,10 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy | |||||||
|               position: info.pathData.points[info.pointIndex].lnglat, |               position: info.pathData.points[info.pointIndex].lnglat, | ||||||
|               content: ` |               content: ` | ||||||
|               <label style="font-weight: bold;">${result.regeocode.formattedAddress}<label/><br/> |               <label style="font-weight: bold;">${result.regeocode.formattedAddress}<label/><br/> | ||||||
|               <label style="font-weight: 400;">车速: ${info.pathData.points[info.pointIndex].name}<label/><br/> |               <label style="font-weight: 400;">车速: ${info.pathData.points[info.pointIndex].name}km/h<label/><br/> | ||||||
|  |               <label style="font-weight: 400;">东经: ${info.pathData.points[info.pointIndex].lnglat?.[0]}, 北纬:${ | ||||||
|  |                 info.pathData.points[info.pointIndex].lnglat?.[1] | ||||||
|  |               }<label/><br/> | ||||||
|               <label style="font-weight: 400;">时间: ${this.amapService.formatTime(info.pathData.points[info.pointIndex].time)}<label/> |               <label style="font-weight: 400;">时间: ${this.amapService.formatTime(info.pathData.points[info.pointIndex].time)}<label/> | ||||||
|               ` |               ` | ||||||
|             }); |             }); | ||||||
| @ -179,12 +199,13 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy | |||||||
|         //返回数据项对应的Marker |         //返回数据项对应的Marker | ||||||
|         getMarker: (dataItem: POI, context: any, recycledMarker: any) => { |         getMarker: (dataItem: POI, context: any, recycledMarker: any) => { | ||||||
|           //存在可回收利用的marker |           //存在可回收利用的marker | ||||||
|           if (recycledMarker) { |           // if (recycledMarker) { | ||||||
|             //直接更新内容返回 |           //   //直接更新内容返回 | ||||||
|             recycledMarker.setIconLabel(context.id); |           //   recycledMarker.setIconLabel(context.id); | ||||||
|             recycledMarker.setIconStyle(dataItem.color); |           //   recycledMarker.setIconStyle(dataItem.color); | ||||||
|             return recycledMarker; |           //   return recycledMarker; | ||||||
|           } |           // } | ||||||
|  |  | ||||||
|           this.SimpleMarker = SimpleMarker; |           this.SimpleMarker = SimpleMarker; | ||||||
|           //返回一个新的Marker |           //返回一个新的Marker | ||||||
|           return new SimpleMarker({ |           return new SimpleMarker({ | ||||||
| @ -212,6 +233,8 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy | |||||||
|       }); |       }); | ||||||
|  |  | ||||||
|       if (this._pois?.length > 0) { |       if (this._pois?.length > 0) { | ||||||
|  |         console.log(this._pois); | ||||||
|  |  | ||||||
|         //展示该数据 |         //展示该数据 | ||||||
|         this.markerList.render(this._pois); |         this.markerList.render(this._pois); | ||||||
|       } |       } | ||||||
| @ -241,7 +264,7 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy | |||||||
|   startNav() { |   startNav() { | ||||||
|     this.navigator = this.pathSimplifierIns?.createPathNavigator(this.selectedIndex, { |     this.navigator = this.pathSimplifierIns?.createPathNavigator(this.selectedIndex, { | ||||||
|       loop: true, //循环播放 |       loop: true, //循环播放 | ||||||
|       speed: 500000 * this.navSpeed //巡航速度,单位千米/小时 |       speed: 50000 * this.navSpeed //巡航速度,单位千米/小时 | ||||||
|     }); |     }); | ||||||
|     this.navigator?.start(); |     this.navigator?.start(); | ||||||
|   } |   } | ||||||
| @ -269,11 +292,11 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   /** 根据标点经纬度获取地址信息 */ |   /** 根据标点经纬度获取地址信息 */ | ||||||
|   getPoiByPositon(position: string[]) { |   getPoiByPositon(label: string, color: string, position: string[], time: string) { | ||||||
|     this.geocoder.getAddress(position, (status: any, result: any) => { |     this.geocoder.getAddress(position, (status: any, result: any) => { | ||||||
|       if (status === 'complete' && result.info === 'OK') { |       if (status === 'complete' && result.info === 'OK') { | ||||||
|         // result中对应详细地理坐标信息 |         // result中对应详细地理坐标信息 | ||||||
|         this._pois = [...this.pois, { markerLabel: '终', color: 'red', position: position, title: result.regeocode.formattedAddress }]; |         this._pois = [...this._pois, { markerLabel: label, color: color, position, title: result.regeocode.formattedAddress, time }]; | ||||||
|         if (this.markerList) { |         if (this.markerList) { | ||||||
|           this.markerList.render(this._pois); |           this.markerList.render(this._pois); | ||||||
|         } |         } | ||||||
| @ -287,7 +310,14 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy | |||||||
|    * @param infoItem |    * @param infoItem | ||||||
|    */ |    */ | ||||||
|   selectedPOI(infoItem: InfoItem) { |   selectedPOI(infoItem: InfoItem) { | ||||||
|     this.infoWindow.setContent(infoItem.content || `地址: <pre>${infoItem.title}</pre>`); |     this.infoWindow.setContent( | ||||||
|  |       infoItem.content || | ||||||
|  |         ` | ||||||
|  |     <label style="font-weight: bold;">${infoItem.title}</label><br/> | ||||||
|  |     东经:${infoItem.position?.[0]}, 北纬:${infoItem.position?.[1]}<br/> | ||||||
|  |     ${infoItem.time} | ||||||
|  |     ` | ||||||
|  |     ); | ||||||
|     this.infoWindow.open(this.aMap, infoItem.position); |     this.infoWindow.open(this.aMap, infoItem.position); | ||||||
|     this.infoWindow.setPosition(infoItem.position); |     this.infoWindow.setPosition(infoItem.position); | ||||||
|     // 地图定位居中 |     // 地图定位居中 | ||||||
|  | |||||||
| @ -114,6 +114,9 @@ export class AmapService { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   formatTime(time: string): string { |   formatTime(time: string): string { | ||||||
|  |     if (!time) { | ||||||
|  |       return ''; | ||||||
|  |     } | ||||||
|     return `${time.slice(0, 4)}-${time.slice(4, 6)}-${time.slice(6, 8)} ${time.slice(9, 11)}:${time.slice(11, 13)}:${time.slice(13, 15)}`; |     return `${time.slice(0, 4)}-${time.slice(4, 6)}-${time.slice(6, 8)} ${time.slice(9, 11)}:${time.slice(11, 13)}:${time.slice(13, 15)}`; | ||||||
|   } |   } | ||||||
| } | } | ||||||
| @ -128,6 +131,7 @@ export interface POI { | |||||||
| export interface InfoItem { | export interface InfoItem { | ||||||
|   title?: string; |   title?: string; | ||||||
|   content?: string; |   content?: string; | ||||||
|  |   time?: string; | ||||||
|   position: string[]; |   position: string[]; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | |||||||
| @ -34,7 +34,7 @@ import { IBase } from '../../interfaces'; | |||||||
| import { EAFileUtil } from '../../utils'; | import { EAFileUtil } from '../../utils'; | ||||||
|  |  | ||||||
| @Injectable({ | @Injectable({ | ||||||
|   providedIn: 'root', |   providedIn: 'root' | ||||||
| }) | }) | ||||||
| export class BaseService implements IBase { | export class BaseService implements IBase { | ||||||
|   // 新增实例接口地址 |   // 新增实例接口地址 | ||||||
| @ -94,7 +94,7 @@ export class BaseService implements IBase { | |||||||
|     parameter: any = {}, |     parameter: any = {}, | ||||||
|     method: 'POST' | 'GET', |     method: 'POST' | 'GET', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Observable<any> { |   ): Observable<any> { | ||||||
|     if (paramType === 'FORM') { |     if (paramType === 'FORM') { | ||||||
|       parameter = this.getFormData(parameter); |       parameter = this.getFormData(parameter); | ||||||
| @ -104,7 +104,7 @@ export class BaseService implements IBase { | |||||||
|     return this.http |     return this.http | ||||||
|       .request(method, url, { |       .request(method, url, { | ||||||
|         body: paramInBody ? parameter : null, |         body: paramInBody ? parameter : null, | ||||||
|         params: paramInBody ? null : parameter, |         params: paramInBody ? null : parameter | ||||||
|       }) |       }) | ||||||
|       .pipe( |       .pipe( | ||||||
|         map((res: any) => { |         map((res: any) => { | ||||||
| @ -122,7 +122,7 @@ export class BaseService implements IBase { | |||||||
|             this.msgSrv.warning(res.msg); |             this.msgSrv.warning(res.msg); | ||||||
|             return allowBadCode ? res : null; |             return allowBadCode ? res : null; | ||||||
|           } |           } | ||||||
|         }), |         }) | ||||||
|       ); |       ); | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @ -144,7 +144,7 @@ export class BaseService implements IBase { | |||||||
|     parameter: any = {}, |     parameter: any = {}, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Observable<any> { |   ): Observable<any> { | ||||||
|     return this.httpRequest(url, parameter, method, paramInBody, paramType); |     return this.httpRequest(url, parameter, method, paramInBody, paramType); | ||||||
|   } |   } | ||||||
| @ -154,7 +154,7 @@ export class BaseService implements IBase { | |||||||
|     parameter: any = {}, |     parameter: any = {}, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Promise<any> { |   ): Promise<any> { | ||||||
|     return this.request(url, parameter, method, paramInBody, paramType).toPromise(); |     return this.request(url, parameter, method, paramInBody, paramType).toPromise(); | ||||||
|   } |   } | ||||||
| @ -165,7 +165,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_add_one, |     url: string = this.$api_add_one, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Observable<any> { |   ): Observable<any> { | ||||||
|     return this.request(url, parameter, method, paramInBody, paramType); |     return this.request(url, parameter, method, paramInBody, paramType); | ||||||
|   } |   } | ||||||
| @ -175,7 +175,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_add_one, |     url: string = this.$api_add_one, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Promise<any> { |   ): Promise<any> { | ||||||
|     return this.addOne(parameter, url, method, paramInBody, paramType).toPromise(); |     return this.addOne(parameter, url, method, paramInBody, paramType).toPromise(); | ||||||
|   } |   } | ||||||
| @ -185,7 +185,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_add_many, |     url: string = this.$api_add_many, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Observable<any> { |   ): Observable<any> { | ||||||
|     return this.request(url, parameter, method, paramInBody, paramType); |     return this.request(url, parameter, method, paramInBody, paramType); | ||||||
|   } |   } | ||||||
| @ -195,7 +195,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_add_many, |     url: string = this.$api_add_many, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Promise<any> { |   ): Promise<any> { | ||||||
|     return this.addMany(parameter, url, method, paramInBody, paramType).toPromise(); |     return this.addMany(parameter, url, method, paramInBody, paramType).toPromise(); | ||||||
|   } |   } | ||||||
| @ -206,7 +206,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_del_one, |     url: string = this.$api_del_one, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Observable<any> { |   ): Observable<any> { | ||||||
|     return this.request(url, parameter, method, paramInBody, paramType); |     return this.request(url, parameter, method, paramInBody, paramType); | ||||||
|   } |   } | ||||||
| @ -216,7 +216,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_del_one, |     url: string = this.$api_del_one, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Promise<any> { |   ): Promise<any> { | ||||||
|     return this.delOne(parameter, url, method, paramInBody, paramType).toPromise(); |     return this.delOne(parameter, url, method, paramInBody, paramType).toPromise(); | ||||||
|   } |   } | ||||||
| @ -226,7 +226,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_del_many, |     url: string = this.$api_del_many, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Observable<any> { |   ): Observable<any> { | ||||||
|     return this.request(url, parameter, method, paramInBody, paramType); |     return this.request(url, parameter, method, paramInBody, paramType); | ||||||
|   } |   } | ||||||
| @ -236,7 +236,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_del_many, |     url: string = this.$api_del_many, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Promise<any> { |   ): Promise<any> { | ||||||
|     return this.delMany(parameter, url, method, paramInBody, paramType).toPromise(); |     return this.delMany(parameter, url, method, paramInBody, paramType).toPromise(); | ||||||
|   } |   } | ||||||
| @ -247,7 +247,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_edit_one, |     url: string = this.$api_edit_one, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Observable<any> { |   ): Observable<any> { | ||||||
|     return this.request(url, parameter, method, paramInBody, paramType); |     return this.request(url, parameter, method, paramInBody, paramType); | ||||||
|   } |   } | ||||||
| @ -257,7 +257,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_edit_one, |     url: string = this.$api_edit_one, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Promise<any> { |   ): Promise<any> { | ||||||
|     return this.updateOne(parameter, url, method, paramInBody, paramType).toPromise(); |     return this.updateOne(parameter, url, method, paramInBody, paramType).toPromise(); | ||||||
|   } |   } | ||||||
| @ -267,7 +267,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_edit_many, |     url: string = this.$api_edit_many, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Observable<any> { |   ): Observable<any> { | ||||||
|     return this.request(url, parameter, method, paramInBody, paramType); |     return this.request(url, parameter, method, paramInBody, paramType); | ||||||
|   } |   } | ||||||
| @ -277,7 +277,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_edit_many, |     url: string = this.$api_edit_many, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Promise<any> { |   ): Promise<any> { | ||||||
|     return this.updateMany(parameter, url, method, paramInBody, paramType).toPromise(); |     return this.updateMany(parameter, url, method, paramInBody, paramType).toPromise(); | ||||||
|   } |   } | ||||||
| @ -290,7 +290,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_get_one, |     url: string = this.$api_get_one, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Observable<any> { |   ): Observable<any> { | ||||||
|     return this.request(url, parameter, method, paramInBody, paramType); |     return this.request(url, parameter, method, paramInBody, paramType); | ||||||
|   } |   } | ||||||
| @ -300,7 +300,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_get_one, |     url: string = this.$api_get_one, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Promise<any> { |   ): Promise<any> { | ||||||
|     return this.getOne(parameter, url, method, paramInBody, paramType).toPromise(); |     return this.getOne(parameter, url, method, paramInBody, paramType).toPromise(); | ||||||
|   } |   } | ||||||
| @ -313,12 +313,12 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_get_many, |     url: string = this.$api_get_many, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Observable<any[]> { |   ): Observable<any[]> { | ||||||
|     return this.httpRequest(url, parameter, method, paramInBody, paramType).pipe( |     return this.httpRequest(url, parameter, method, paramInBody, paramType).pipe( | ||||||
|       map((res) => { |       map(res => { | ||||||
|         return (res as any[]) || []; |         return (res as any[]) || []; | ||||||
|       }), |       }) | ||||||
|     ); |     ); | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @ -327,7 +327,7 @@ export class BaseService implements IBase { | |||||||
|     url: string = this.$api_get_many, |     url: string = this.$api_get_many, | ||||||
|     method: 'POST' | 'GET' = 'POST', |     method: 'POST' | 'GET' = 'POST', | ||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON' | ||||||
|   ): Promise<any[]> { |   ): Promise<any[]> { | ||||||
|     return this.getMany(parameter, url, method, paramInBody, paramType).toPromise(); |     return this.getMany(parameter, url, method, paramInBody, paramType).toPromise(); | ||||||
|   } |   } | ||||||
| @ -352,19 +352,19 @@ export class BaseService implements IBase { | |||||||
|     paramInBody: boolean = true, |     paramInBody: boolean = true, | ||||||
|     paramType: 'JSON' | 'FORM' = 'JSON', |     paramType: 'JSON' | 'FORM' = 'JSON', | ||||||
|     allowBadCode: boolean = true, |     allowBadCode: boolean = true, | ||||||
|     async: boolean = true, |     async: boolean = true | ||||||
|   ): Observable<any> | Promise<any> { |   ): Observable<any> | Promise<any> { | ||||||
|     if (allowBadCode) { |     if (allowBadCode) { | ||||||
|       url += `?_allow_badcode=true`; |       url += `?_allow_badcode=true`; | ||||||
|     } |     } | ||||||
|     const response = this.httpRequest(url, parameter, method, paramInBody, paramType).pipe( |     const response = this.httpRequest(url, parameter, method, paramInBody, paramType).pipe( | ||||||
|       tap((res) => { |       tap(res => { | ||||||
|         if (res.success) { |         if (res.success) { | ||||||
|           this.msgSrv.success(`创建下载任务成功,请前往下载任务列表下载您的文件!`); |           this.msgSrv.success(`创建下载任务成功,请前往下载任务列表下载您的文件!`); | ||||||
|           window.open('#/download'); |           window.open('#/download'); | ||||||
|         } |         } | ||||||
|         return res; |         return res; | ||||||
|       }), |       }) | ||||||
|     ); |     ); | ||||||
|     return async ? response.toPromise() : response; |     return async ? response.toPromise() : response; | ||||||
|   } |   } | ||||||
| @ -396,11 +396,15 @@ export class BaseService implements IBase { | |||||||
|             this.msgSrv.warning(m.msg); |             this.msgSrv.warning(m.msg); | ||||||
|             return false; |             return false; | ||||||
|           } |           } | ||||||
|         }), |         }) | ||||||
|       ) |       ) | ||||||
|       .toPromise(); |       .toPromise(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   openURL(url: string) { | ||||||
|  |     window.open(url); | ||||||
|  |   } | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 直接下载文件 |    * 直接下载文件 | ||||||
|    */ |    */ | ||||||
| @ -464,19 +468,19 @@ export class BaseService implements IBase { | |||||||
|    */ |    */ | ||||||
|   getDict(key: string): Observable<any[]> { |   getDict(key: string): Observable<any[]> { | ||||||
|     return this.http.post(this.$api_get_dict, { dict: key }).pipe( |     return this.http.post(this.$api_get_dict, { dict: key }).pipe( | ||||||
|       map((res) => { |       map(res => { | ||||||
|         if (res.success === true) { |         if (res.success === true) { | ||||||
|           return res.data.map((r: any) => { |           return res.data.map((r: any) => { | ||||||
|             return { |             return { | ||||||
|               label: r.itemValue, |               label: r.itemValue, | ||||||
|               value: r.itemKey, |               value: r.itemKey | ||||||
|             }; |             }; | ||||||
|           }); |           }); | ||||||
|         } else { |         } else { | ||||||
|           this.msgSrv.warning(`获取取字典【${key}】时发生错误:${res.msg || '未知错误!'}`); |           this.msgSrv.warning(`获取取字典【${key}】时发生错误:${res.msg || '未知错误!'}`); | ||||||
|           return []; |           return []; | ||||||
|         } |         } | ||||||
|       }), |       }) | ||||||
|     ); |     ); | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @ -508,7 +512,7 @@ export class BaseService implements IBase { | |||||||
|     if (paramsIndex > -1) { |     if (paramsIndex > -1) { | ||||||
|       const paramsStr = url.substr(paramsIndex + 1); |       const paramsStr = url.substr(paramsIndex + 1); | ||||||
|       const params = paramsStr.split('&'); |       const params = paramsStr.split('&'); | ||||||
|       const keyMap = params.find((e) => e.includes(paramName)); |       const keyMap = params.find(e => e.includes(paramName)); | ||||||
|       const value = keyMap ? keyMap.split('=')[1] : ''; |       const value = keyMap ? keyMap.split('=')[1] : ''; | ||||||
|       return value; |       return value; | ||||||
|     } |     } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user