车辆对接
This commit is contained in:
		| @ -99,7 +99,16 @@ tabs = { | ||||
|     this.getGoodsSourceStatistical() | ||||
|   } | ||||
|   getGoodsSourceStatistical() { | ||||
|     this.service.request(this.service.$api_getBulkStatistical).subscribe(res => { | ||||
|     this.tabs = { | ||||
|       cancelQuantity: 0, | ||||
|       receivedQuantity: 0, | ||||
|       stayQuantity: 0, | ||||
|       signQuantity: 0, | ||||
|       compolatelQuantity: 0, | ||||
|       GoingQuantity: 0, | ||||
|       totalCount: 0 | ||||
|     }; | ||||
|     this.service.request(this.service.$api_getBulkStatistical, {...this.reqParams}).subscribe(res => { | ||||
|       if (res) { | ||||
|         let totalCount = 0; | ||||
|        res.forEach((element: any) => { | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| <!-- | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-03 11:10:14 | ||||
|  * @LastEditTime: 2022-01-12 10:50:31 | ||||
|  * @LastEditTime: 2022-01-13 20:59:08 | ||||
|  * @LastEditors: Please set LastEditors | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\supply-management\components\vehicle\vehicle.component.html | ||||
| @ -55,7 +55,7 @@ | ||||
|     [loading]="service.http.loading" | ||||
|     > | ||||
|     <ng-template st-row="complaintCode" let-item let-index="index"> | ||||
|       <a [routerLink]="'/order-management/complaint-detail/'+item.id">{{item.complaintCode}}</a> | ||||
|       <a href="javascript:;" (click)="view(item)">{{item.complaintCode}}</a> | ||||
|     </ng-template> | ||||
|     </st> | ||||
|   </div> | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| <!-- | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-03 11:10:14 | ||||
|  * @LastEditTime: 2022-01-13 14:14:33 | ||||
|  * @LastEditTime: 2022-01-14 14:11:40 | ||||
|  * @LastEditors: Please set LastEditors | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\supply-management\components\vehicle\vehicle.component.html | ||||
| @ -117,25 +117,6 @@ | ||||
|       <div *ngIf="item?.loadingTime">装 | {{item?.loadingTime}}</div> | ||||
|       <div *ngIf="item?.unloadingTime">卸 | {{item?.unloadingTime}}</div> | ||||
|     </ng-template> | ||||
|       <!-- <ng-template st-row="externalSn" let-item let-index="index"> | ||||
|         <span class="mr-xs">{{111111}}</span> | ||||
|         <a (click)="editEnternalSn(item)">编辑</a> | ||||
|       </ng-template> --> | ||||
|       <!-- <ng-template st-row="feiong" let-item let-index="index"> | ||||
|         <div style="color: aqua;" (click)="OpenPrice()"> | ||||
|           {{item.no}} | ||||
|         </div> | ||||
|       </ng-template> --> | ||||
|       <!-- <ng-template #contentTemplate> | ||||
|         <div> | ||||
|           <p>预付:¥200.00</p> | ||||
|           <p>到付:¥200.00</p> | ||||
|           <p>油卡:¥200.00</p> | ||||
|           <p>回单付:¥200.00</p> | ||||
|           <p>小计:¥200.00</p> | ||||
|           <p>附加费:¥200.00</p> | ||||
|         </div> | ||||
|       </ng-template> --> | ||||
|     </st> | ||||
|   </div> | ||||
| </nz-card> | ||||
|  | ||||
| @ -112,7 +112,17 @@ resourceStatus: any; | ||||
|   this.getGoodsSourceStatistical() | ||||
|   } | ||||
|   getGoodsSourceStatistical() { | ||||
|     this.service.request(this.service.$api_statisticalStatus).subscribe(res => { | ||||
|     this.tabs = { | ||||
|       cancelQuantity: 0, | ||||
|       receivedQuantity: 0, | ||||
|       stayQuantity: 0, | ||||
|       signQuantity: 0, | ||||
|       compolatelQuantity: 0, | ||||
|       GoingQuantity: 0, | ||||
|       totalCount: 0 | ||||
|     }; | ||||
|     console.log(this.tabs) | ||||
|     this.service.request(this.service.$api_statisticalStatus,{...this.reqParams}).subscribe(res => { | ||||
|       if (res) { | ||||
|         let totalCount = 0; | ||||
|        res.forEach((element: any) => { | ||||
|  | ||||
| @ -488,7 +488,13 @@ export class SupplyManagementBulkComponent implements OnInit { | ||||
|   } | ||||
|     // 获取货源状态统计 | ||||
|     getGoodsSourceStatistical() { | ||||
|       this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 2 }).subscribe(res => { | ||||
|       this.tabs = { | ||||
|         totalQuantity: 0, | ||||
|         cancelQuantity: 0, | ||||
|         receivedQuantity: 0, | ||||
|         stayQuantity: 0 | ||||
|       }; | ||||
|       this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 2, ...this.reqParams }).subscribe(res => { | ||||
|         if (res) { | ||||
|           console.log(res) | ||||
|           this.tabs = res; | ||||
|  | ||||
| @ -245,7 +245,13 @@ export class SupplyManagementVehicleComponent implements OnInit { | ||||
|   } | ||||
|   // 获取货源状态统计 | ||||
|   getGoodsSourceStatistical() { | ||||
|     this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 1 }).subscribe(res => { | ||||
|     this.tabs = { | ||||
|       totalQuantity: 0, | ||||
|       cancelQuantity: 0, | ||||
|       receivedQuantity: 0, | ||||
|       stayQuantity: 0 | ||||
|     }; | ||||
|     this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 1, ...this.reqParams }).subscribe(res => { | ||||
|       if (res) { | ||||
|         console.log(res); | ||||
|         this.tabs = res; | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| <!-- | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-24 15:38:08 | ||||
|  * @LastEditTime: 2021-12-27 10:46:43 | ||||
|  * @LastEditTime: 2022-01-14 10:43:58 | ||||
|  * @LastEditors: Please set LastEditors | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\sys-setting\components\crm-management\crm-management.component.html | ||||
| @ -56,3 +56,14 @@ | ||||
|       <button nz-button nzType="default" (click)="handleOK()">确 定</button> | ||||
|     </ng-template> | ||||
| </nz-modal> | ||||
|  | ||||
| <nz-modal [(nzVisible)]="isVisibleTicket"   [nzFooter]="nzModalFooterTiket" nzTitle="票务设置"  (nzOnCancel)="handleCancelTicket()"> | ||||
|     <ng-container *nzModalContent> | ||||
|       <sf #sfTicket [schema]="ticketSchema" [ui]="ui3" [formData]="formDataTicket" [compact]="false" [button]="'none'"> | ||||
|       </sf> | ||||
|     </ng-container> | ||||
|     <ng-template #nzModalFooterTiket> | ||||
|       <button nz-button nzType="primary" (click)="handleCancelTicket()" [disabled]="">取消</button> | ||||
|       <button nz-button nzType="default" (click)="handleOKTicket()">确 定</button> | ||||
|     </ng-template> | ||||
| </nz-modal> | ||||
|  | ||||
| @ -1,8 +1,9 @@ | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { STComponent, STColumn, STChange } from '@delon/abc/st'; | ||||
| import { SFComponent, SFRadioWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; | ||||
| import { SFCascaderWidgetSchema, SFComponent, SFRadioWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; | ||||
| import { DynamicSettingModalComponent } from '@shared'; | ||||
| import { NzModalService } from 'ng-zorro-antd/modal'; | ||||
| import { takeLast } from 'rxjs/operators'; | ||||
| import { SystemService } from '../../services/system.service'; | ||||
|  | ||||
| @Component({ | ||||
| @ -15,13 +16,20 @@ export class NetworkFreightComponent implements OnInit { | ||||
|   st!: STComponent; | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|   @ViewChild('sfFre', { static: false }) sfFre!: SFComponent; | ||||
|   @ViewChild('sfTicket', { static: false }) sfTicket!: SFComponent; | ||||
|   ui: SFUISchema = {}; | ||||
|   ui2: SFUISchema = {}; | ||||
|   ui3: SFUISchema = {}; | ||||
|   schema: SFSchema = {}; | ||||
|   addSchema: SFSchema = {}; | ||||
|   ticketSchema: SFSchema = {}; | ||||
|   _$expand = false; | ||||
|   formData: any; | ||||
|   ticketId: any; | ||||
|   ticketItem: any; | ||||
|   formDataTicket: any | ||||
|   isVisible = false; | ||||
|   isVisibleTicket = false; | ||||
|   edit = false; | ||||
|   editId = false; | ||||
|  | ||||
| @ -48,6 +56,10 @@ export class NetworkFreightComponent implements OnInit { | ||||
|           text: '财务设置', | ||||
|           click: item => this.roleAction(item, 2) | ||||
|         }, | ||||
|         { | ||||
|           text: '票务设置', | ||||
|           click: item => this.ticket(item) | ||||
|         }, | ||||
|         { | ||||
|           text: '合同设置', | ||||
|           click: item => this.roleAction(item, 2) | ||||
| @ -73,6 +85,7 @@ export class NetworkFreightComponent implements OnInit { | ||||
|   ngOnInit(): void { | ||||
|     this.initSF(); | ||||
|     this.initSFFre(); | ||||
|     // this.initSFTicket(); | ||||
|   } | ||||
|  | ||||
|   stChange(e: STChange): void { | ||||
| @ -116,6 +129,88 @@ export class NetworkFreightComponent implements OnInit { | ||||
|     }; | ||||
|     this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; | ||||
|   } | ||||
|   initSFTicket() { | ||||
|     this.ticketSchema = { | ||||
|       properties: { | ||||
|         enterpriseName1: { | ||||
|           type: 'string', | ||||
|           title: '公司名称', | ||||
|           ui: { | ||||
|             widget: 'text', | ||||
|            }, | ||||
|            default: this.ticketItem?.enterpriseName, | ||||
|         }, | ||||
|         taxCode2: { | ||||
|           type: 'string', | ||||
|           title: '纳税人识别号', | ||||
|           ui: { | ||||
|             widget: 'text', | ||||
|            }, | ||||
|            default: this.ticketItem?.taxCode, | ||||
|         }, | ||||
|         bankName: { | ||||
|           type: 'string', | ||||
|           title: '开户银行', | ||||
|           ui: { placeholder: '请输入' } | ||||
|         }, | ||||
|         bankAccount: { | ||||
|           type: 'string', | ||||
|           title: '银行账号', | ||||
|           ui: { placeholder: '请输入' } | ||||
|         }, | ||||
|         registerAddress: { | ||||
|           type: 'string', | ||||
|           title: '注册地址', | ||||
|           ui: { placeholder: '请输入' } | ||||
|         }, | ||||
|         registerPhone: { | ||||
|           type: 'string', | ||||
|           title: '注册电话', | ||||
|           ui: { placeholder: '请输入' } | ||||
|         }, | ||||
|         senderName: { | ||||
|           type: 'string', | ||||
|           title: '寄件人姓名', | ||||
|           ui: { placeholder: '请输入' } | ||||
|         }, | ||||
|         senderPhone: { | ||||
|           type: 'string', | ||||
|           title: '寄件人电话', | ||||
|           ui: { placeholder: '请输入' } | ||||
|         }, | ||||
|         senderRegionCode: { | ||||
|           type: 'number', | ||||
|           title: '营业执照所在地', | ||||
|           ui: { | ||||
|             grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, | ||||
|             widget: 'cascader', | ||||
|             valueProperty: 'regionCode', | ||||
|             labelProperty: 'name', | ||||
|             asyncData: (node: any, index: any) => { | ||||
|               return new Promise(resolve => { | ||||
|                 this.getRegionDetailByCode(node?.regionCode || '').subscribe( | ||||
|                   res => { | ||||
|                     node.children = res.map((item: any) => ({ ...item, isLeaf: index === 1 })); | ||||
|                   }, | ||||
|                   _ => {}, | ||||
|                   () => { | ||||
|                     resolve(); | ||||
|                   } | ||||
|                 ); | ||||
|               }); | ||||
|             } | ||||
|           } as SFCascaderWidgetSchema | ||||
|         }, | ||||
|         senderAddress: { | ||||
|           type: 'string', | ||||
|           title: '详细地址', | ||||
|           ui: { placeholder: '请输入' } | ||||
|         }, | ||||
|       }, | ||||
|       required: ['enterpriseName', 'taxCode', 'bankName', 'bankAccount', 'registerAddress','registerPhone', 'senderName','senderRegionCode','senderPhone', 'senderAddress'] | ||||
|     }; | ||||
|     this.ui3 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } }; | ||||
|   } | ||||
|   initSFFre() { | ||||
|     this.addSchema = { | ||||
|       properties: { | ||||
| @ -160,7 +255,37 @@ export class NetworkFreightComponent implements OnInit { | ||||
|     this.editId = value.id; | ||||
|     this.isVisible = true; | ||||
|   } | ||||
|  | ||||
|   ticket(value: any) { | ||||
|     this.formDataTicket = []; | ||||
|     this.ticketItem  = value; | ||||
|       this.initSFTicket(); | ||||
|     this.service.request(this.service.$api_getTicketByNetworkTransporterId, { id: value.id }).subscribe((res: any) => { | ||||
|       console.log(res); | ||||
|       if (res) { | ||||
|         let List = { | ||||
|           ...res | ||||
|         }; | ||||
|         delete List.senderRegionCode; | ||||
|         List.senderRegionCode = this.getProvinceData(res?.senderRegionCode), | ||||
|         this.formDataTicket = List; | ||||
|         this.ticketId  = res.id; | ||||
|       } | ||||
|     }); | ||||
|     this.isVisibleTicket = true; | ||||
|   } | ||||
|   getProvinceData(value: any) { | ||||
|     this.service.http.post(this.service.$api_getRegionDetailByCode, { regionCode: value}).subscribe(res => { | ||||
|       console.log(res.data) | ||||
|       console.log(this.formDataTicket) | ||||
|       let enterpriseAddressCode : any= []; | ||||
|       let regioin = res?.data?.regionFullCodes.split(','); | ||||
|       console.log(regioin) | ||||
|       regioin?.forEach((element: any) => { | ||||
|            enterpriseAddressCode.push(Number(element)) | ||||
|       }); | ||||
|      return enterpriseAddressCode; | ||||
|     }); | ||||
|   } | ||||
|   deleteAction(item?: any) { | ||||
|     this.nzModalService.error({ | ||||
|       nzTitle: '确认删除?', | ||||
| @ -192,6 +317,32 @@ export class NetworkFreightComponent implements OnInit { | ||||
|   handleCancel() { | ||||
|     this.isVisible = false; | ||||
|   } | ||||
|   handleCancelTicket() { | ||||
|     this.isVisibleTicket = false; | ||||
|   } | ||||
|   handleOKTicket() { | ||||
|     console.log(this.sfTicket.valid) | ||||
|     console.log(this.sfTicket.value) | ||||
|     if (!this.sfTicket.valid) { | ||||
|       this.service.msgSrv.warning('请正确填写完整!'); | ||||
|       return; | ||||
|     } | ||||
|     const params = { | ||||
|       ...this.sfTicket.value | ||||
|     }; | ||||
|     if (this.ticketId) { | ||||
|       params.id = this.ticketId; | ||||
|     } | ||||
|     params.senderRegionCode = this.sfTicket.value.senderRegionCode[2] | ||||
|     console.log(params) | ||||
|     this.service.request(this.service.$api_networkTransporterTicket_save, params).subscribe((res: any) => { | ||||
|       if (res) { | ||||
|         this.service.msgSrv.success('保存成功!'); | ||||
|         this.isVisibleTicket = false; | ||||
|         this.st.reload(1); | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   handleOK() { | ||||
|     console.log(this.sfFre.value); | ||||
| @ -215,4 +366,11 @@ export class NetworkFreightComponent implements OnInit { | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
|    | ||||
|   /* | ||||
|    * 根据地区code查询地区列表 | ||||
|    */ | ||||
|   getRegionDetailByCode(regionCode: any) { | ||||
|     return this.service.request(this.service.$api_get_region_by_code, { regionCode }); | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| /* | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-20 17:18:43 | ||||
|  * @LastEditTime: 2021-12-29 16:53:47 | ||||
|  * @LastEditTime: 2022-01-14 10:57:58 | ||||
|  * @LastEditors: Please set LastEditors | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\sys-setting\services\system.service.ts | ||||
| @ -124,6 +124,16 @@ export class SystemService extends BaseService { | ||||
|   // 删除系统配置项 | ||||
|   public $api_remove_config_item = '/api/mdc/pbc/sysConfigItem/deletebatch'; | ||||
|  | ||||
|  | ||||
|   // 根据网络货运人ID获取票务信息 | ||||
|   public $api_getTicketByNetworkTransporterId = '/api/mdc/cuc/networkTransporterTicket/getTicketByNetworkTransporterId'; | ||||
|   // 保存票务信息 | ||||
|   public $api_networkTransporterTicket_save = '/api/mdc/cuc/networkTransporterTicket/save'; | ||||
|  // 根据地区code查询列表 | ||||
|  $api_get_region_by_code = '/api/mdc/pbc/region/getRegionByCode'; | ||||
|   // 根据地区code查询地区详情 | ||||
|   $api_getRegionDetailByCode = '/api/mdc/pbc/region/getRegionDetailByCode'; | ||||
|   | ||||
|   $api_getRoleTemplateInfo: string = ''; | ||||
|   $api_getFunctionButtonInfo: string = ''; | ||||
|   $api_getFunctionDataInfo: string = ''; | ||||
|  | ||||
| @ -115,6 +115,7 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { | ||||
|     this.service.request(this.service.$api_get_driver_practice_seniority, { appUserId: this.route.snapshot.params.id }).subscribe(res => { | ||||
|       if (res?.id) { | ||||
|         this.licenseDetail = res; | ||||
|         console.log(res) | ||||
|         this.tempalateLicenseDetail = { ...this.licenseDetail }; | ||||
|       } | ||||
|     }); | ||||
|  | ||||
| @ -68,6 +68,7 @@ export class FreightComponentsListDetailComponent implements OnInit { | ||||
|             Number(this.detailData.fullRegionVO?.cityCode), | ||||
|             Number(this.detailData.fullRegionVO?.areaCode) | ||||
|           ]; | ||||
|           console.log(this.enterpriseAddressCode) | ||||
|         } | ||||
|         console.log(res); | ||||
|       }); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user