From 6e1544083236161cb89842147898d4d1a9128fc0 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 28 Feb 2022 15:20:41 +0800 Subject: [PATCH 001/107] edit --- .../withdrawals-detail/withdrawals-detail.component.html | 2 +- .../modal/vehicle/cancel-confirm/cancel-confirm.component.ts | 2 ++ .../components/invoice-detail/invoice-detail.component.html | 4 ++-- src/app/routes/ticket-management/services/ticket.service.ts | 4 ++-- .../components/freight/list/detail/detail.component.html | 4 ++++ 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html index 27916f8e..f9b29185 100644 --- a/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html +++ b/src/app/routes/financial-management/components/withdrawals-record/withdrawals-detail/withdrawals-detail.component.html @@ -47,7 +47,7 @@ {{formData?.bankSerialNumber}} - {{formData?.bankId}} + {{formData?.bankCardNumber}} {{formData?.refundStatus==='3'?'下载回单':'暂无回单'}} diff --git a/src/app/routes/order-management/modal/vehicle/cancel-confirm/cancel-confirm.component.ts b/src/app/routes/order-management/modal/vehicle/cancel-confirm/cancel-confirm.component.ts index 56e734b3..257180aa 100644 --- a/src/app/routes/order-management/modal/vehicle/cancel-confirm/cancel-confirm.component.ts +++ b/src/app/routes/order-management/modal/vehicle/cancel-confirm/cancel-confirm.component.ts @@ -75,6 +75,8 @@ export class OneCarOrderCancelConfirmComponent implements OnInit { initData() { let indexId = 0 let index = 0 + console.log(this.i); + this.i?.mybidDetailInfo.forEach((ele: any) => { if(this.sts == 1) { // 大宗 diff --git a/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.html b/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.html index 542c9eb7..fdd1d5bf 100644 --- a/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.html +++ b/src/app/routes/ticket-management/components/invoice-detail/invoice-detail.component.html @@ -25,10 +25,10 @@ {{ headerInfo?.invoicedate }} - {{ headerInfo?.vatmoney }} + {{ headerInfo?.vatmoney | currency }} - {{ headerInfo?.vattax }} + {{ headerInfo?.vattax | currency }}
diff --git a/src/app/routes/ticket-management/services/ticket.service.ts b/src/app/routes/ticket-management/services/ticket.service.ts index 231ad653..690eea09 100644 --- a/src/app/routes/ticket-management/services/ticket.service.ts +++ b/src/app/routes/ticket-management/services/ticket.service.ts @@ -26,8 +26,8 @@ export class TicketService extends ShipperBaseService { // 运营端销票处理-订单明细页面 $api_ficoVatinvHList = '/api/fcc/ficoVatinvH/ficoVatinvHList'; - // 获取销项发票抬头详情信息 - $api_ficoVatinv_header = '/api/fcc/ficoVatinvH/getDetail'; + // 获取开票申请订单明细头部信息 + $api_ficoVatinv_header = '/api/fcc/ficoVatappBill/getDetailHeadByVatappHId'; // 获取分票发票明细 $api_ficoVatinv_Detail = '/api/fcc/ficoVatinvL/getDetailByVatinvHId'; // 运营端订单明细开票处理 diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html index fe34612f..230e4280 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html @@ -47,6 +47,10 @@ + From 394aba4ba1845e684e0ffebed863b69b646923cc Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Feb 2022 15:55:57 +0800 Subject: [PATCH 002/107] fix bug --- .../components/vehicle/vehicle.component.ts | 23 +- .../cancel-confirm.component.ts | 13 +- .../view-track/view-track.component.html | 34 ++ .../view-track/view-track.component.less | 11 + .../view-track/view-track.component.ts | 98 +++ .../order-management.module.ts | 4 +- .../onecar-publish.component.html | 4 +- .../onecar-publish.component.ts | 574 +++++++++++------- .../release-publish.component.ts | 272 +++++---- .../services/supply-management.service.ts | 17 +- 10 files changed, 689 insertions(+), 361 deletions(-) create mode 100644 src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html create mode 100644 src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less create mode 100644 src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index 5acae83a..42e4fd1a 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -12,6 +12,7 @@ import { VehicleFreightPeopleComponent } from '../../modal/vehicle/freight-peopl import { VehicleModifyCaptainComponent } from '../../modal/vehicle/modify-captain/modify-captain.component'; import { VehicleModifyRateComponent } from '../../modal/vehicle/modify-rate/modify-rate.component'; import { VehicleUpdateFreightComponent } from '../../modal/vehicle/update-freight/update-freight.component'; +import { OneCarOrderViewtrackComponent } from '../../modal/vehicle/view-track/view-track.component'; import { OrderManagementService } from '../../services/order-management.service'; @@ -458,8 +459,8 @@ resourceStatus: any; }, { text: '查看轨迹 ', - click: (_record) => this.cancellation(_record), - iif: item => item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3', + click: (_record) => this.viewTrack(_record), + iif: item => item.billStatus !== '1' && item.billStatus !== '6', // acl: { ability: ['VEHICLE-LIST-view'] }, }, @@ -856,4 +857,22 @@ resourceStatus: any; } }); } + /** + *查看轨迹 + */ + viewTrack(item: any) { + const modalRef = this.modal.create({ + nzTitle: '查看轨迹', + nzContent: OneCarOrderViewtrackComponent, + nzWidth: 1200, + nzComponentParams: { + i: item, + }, + nzFooter: null + }); + modalRef.afterClose.subscribe((res: boolean) => { + if(res) { + } + }); + } } diff --git a/src/app/routes/order-management/modal/vehicle/cancel-confirm/cancel-confirm.component.ts b/src/app/routes/order-management/modal/vehicle/cancel-confirm/cancel-confirm.component.ts index 56e734b3..717ac457 100644 --- a/src/app/routes/order-management/modal/vehicle/cancel-confirm/cancel-confirm.component.ts +++ b/src/app/routes/order-management/modal/vehicle/cancel-confirm/cancel-confirm.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-22 13:53:29 * @LastEditors : Shiming - * @LastEditTime : 2022-02-22 15:51:53 + * @LastEditTime : 2022-02-28 15:12:10 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\cancel-confirm\\cancel-confirm.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -75,6 +75,7 @@ export class OneCarOrderCancelConfirmComponent implements OnInit { initData() { let indexId = 0 let index = 0 + let indexSurcharge = 0 this.i?.mybidDetailInfo.forEach((ele: any) => { if(this.sts == 1) { // 大宗 @@ -83,25 +84,21 @@ export class OneCarOrderCancelConfirmComponent implements OnInit { } if (ele?.paymentStatusLabel == '已支付') { indexId += 1; + indexSurcharge += ele?.surcharge; } } else { // 整车 if (ele?.paymentStatusLabel == '已支付') { indexId += 1; index += ele?.price; + indexSurcharge += ele?.surcharge; } console.log(ele.expenseCode) } - if (ele.expenseCode == '"ATT"' || ele.expenseCode == 'ATT'){ - if(ele?.paymentStatusLabel == '已支付') { - this.ATTPrice = ele.price; - } else { - this.ATTPrice = 0; - } - } }); this.index = indexId this.List = index + this.ATTPrice = indexSurcharge console.log(this.index) console.log(this.List) } diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html new file mode 100644 index 00000000..e897a9bf --- /dev/null +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html @@ -0,0 +1,34 @@ + +
+ +
+
+ + +
+
+ +
+
+
+ + + + + + +
+ + diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less new file mode 100644 index 00000000..14049ec8 --- /dev/null +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less @@ -0,0 +1,11 @@ +:host { + ::ng-deep { + .mapBox { + iframe, canvas { + width: 400px !important; + } + } + + } + + } \ No newline at end of file diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts new file mode 100644 index 00000000..dc25b3f4 --- /dev/null +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts @@ -0,0 +1,98 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-02-22 13:53:29 + * @LastEditors : Shiming + * @LastEditTime : 2022-02-28 14:37:42 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STColumn } from '@delon/abc/st'; +import { + SFComponent, + SFCustomWidgetSchema, + SFNumberWidgetSchema, + SFRadioWidgetSchema, + SFSchema, + SFTextareaWidgetSchema, + SFUISchema +} from '@delon/form'; +import format from 'date-fns/format'; +import { _HttpClient } from '@delon/theme'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; +import { OrderManagementService } from '../../../services/order-management.service'; + + +@Component({ + selector: 'app-order-management-view-track', + styleUrls: ['./view-track.component.less'], + templateUrl: './view-track.component.html' +}) +export class OneCarOrderViewtrackComponent implements OnInit { + i: any; // 单行数据 + MapList: any; // 地图数据 + trajectory = 'car'; + addressItems: any[] = []; //打点地址数据组 + logColumns: STColumn[] = [ + { title: '款项', index: 'expenseCodeLabel' }, + { title: '小计(元)', render: 'price' }, + { title: '运输费(元)', render: 'price' }, + { title: '附加费(元)', render: 'surcharge' }, + { title: '支付时间', index: 'paymentTime' }, + { + title: '支付状态', + className: 'text-center', + index: 'paymentStatus', + type: 'badge', + width: '120px', + badge: { + '1': { text: '待申请', color: 'warning' }, + '2': { text: '已支付', color: 'success' }, + '3': { text: '已拒绝', color: 'warning' }, + '4': { text: '申请中', color: 'warning' } + } + } + ]; + constructor( + private modalRef: NzModalRef, + private modal: NzModalService, + private msgSrv: NzMessageService, + public service: OrderManagementService + ) {} + + ngOnInit(): void { + console.log(this.i); + this.MapInit(); + + } + // 获取轨迹 + MapInit() { + this.service.request(this.service.$api_get_getTrajectory, { id: this.i.id }).subscribe(res => { + if (res) { + const points = res.trackArray; + points?.forEach((item: any) => { + this.MapList.push({ + name: item.hgt, + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + }); + }); + this.addressItems = res.parkArray; + if (this.addressItems && this.addressItems.length > 0) { + this.addressItems.forEach(item => { + item.parkBte = this.getLocalTime(item.parkBte); + item.parkEte = this.getLocalTime(item.parkEte); + }); + } + } + }); + } + close(value: boolean): void { + this.modalRef.close(false); + } + getLocalTime(time: any) { + return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss'); + } +} diff --git a/src/app/routes/order-management/order-management.module.ts b/src/app/routes/order-management/order-management.module.ts index 8d59ea15..b71b0fda 100644 --- a/src/app/routes/order-management/order-management.module.ts +++ b/src/app/routes/order-management/order-management.module.ts @@ -36,6 +36,7 @@ import { VehicleModifyRateComponent } from './modal/vehicle/modify-rate/modify-r import { VehicleSureArriveComponent } from './modal/vehicle/sure-arrive/sure-arrive.component'; import { VehicleSureDepartComponent } from './modal/vehicle/sure-depart/sure-depart.component'; import { VehicleUpdateFreightComponent } from './modal/vehicle/update-freight/update-freight.component'; +import { OneCarOrderViewtrackComponent } from './modal/vehicle/view-track/view-track.component'; import { OrderManagementRoutingModule } from './order-management-routing.module'; const COMPONENTS: Type[] = [ @@ -62,7 +63,8 @@ const COMPONENTS: Type[] = [ OrderManagementReceiptsAuditComponent, orderManagementVoucherViewComponent, OrderManagementComplianceAuditComponent, - OneCarOrderCancelConfirmComponent + OneCarOrderCancelConfirmComponent, + OneCarOrderViewtrackComponent ]; @NgModule({ diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html index 4b2384b3..c5399031 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html @@ -239,7 +239,7 @@ [nzMin]="50000" [nzMax]="3000000" [nzStep]="0.01" - (ngModelChange)="i.setValue($event);getInsurersPrice($event)" + (ngModelChange)="i.setValue($event);getInsurersPrice()" nzPlaceHolder="请输入50000-3000000之间数值" >
@@ -353,7 +353,7 @@ acl [acl-ability]="['SUPPLY-VEHICLE-AMEND-submitChange']">提交修改 - diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index 66f3d209..d02862b7 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { debounceTime } from 'rxjs/operators'; import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; +import format from 'date-fns/format'; import { Subject } from 'rxjs'; import { ActivatedRoute, Router } from '@angular/router'; import { @@ -14,7 +15,7 @@ import { SFUISchema } from '@delon/form'; import { _HttpClient } from '@delon/theme'; -import { AmapPoiPickerComponent, AmapService, ShipperBaseService } from '@shared'; +import { AmapPoiPickerComponent, AmapService, EACacheService, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { type } from 'os'; import { of } from 'rxjs'; @@ -24,13 +25,22 @@ import { SupplyManagementVehicleAssignedCarComponent } from '../assigned-car/ass import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component'; import { PublishAddressListComponent } from './address-list/address-list.component'; import { PublishSuccessComponent } from './publish-success/publish-success.component'; +import { cacheConf } from '@conf/cache.conf'; + @Component({ selector: 'app-publish-goods-onecar-publish', templateUrl: './onecar-publish.component.html', styleUrls: ['./onecar-publish.component.less'] }) export class SupplyManagementOnecarPublishComponent implements OnInit { + // 环境信息 appId、tenantId + envInfo = this.eaCacheSrv.get(cacheConf.env); validateForm1: FormGroup; + limitValues = { + maxWeight: 99999, + maxVolume: 99999, + maxPiece: 99999, + } sf1data: any; // 货源单设置回显 sf3data: any; // 货源单设置回显 sf4data: any; // 货源单设置回显 @@ -61,18 +71,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { private modalService: NzModalService, public service: SupplyManagementService, private amapService: AmapService, - public shipperSrv: ShipperBaseService + public shipperSrv: ShipperBaseService, + private eaCacheSrv: EACacheService, + ) { this.validateForm1 = fb.group({ - loadAddress0: [null, [Validators.required]], - loadName0: [null, [Validators.required]], - loadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]], - unloadAddress0: [null, [Validators.required]], - unloadName0: [null, [Validators.required]], - unloadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]], - loadingTime: [null, []], - unloadingTime: [null, []] + loadingTime: [null, [Validators.required]], + unloadingTime: [null, [Validators.required]] }); + this.envCache = this.eaCacheSrv.get(cacheConf.env); } @ViewChild('sf1', { static: false }) sf1!: SFComponent; schema1: SFSchema = {}; @@ -127,8 +134,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.initSF5(); this.initSF6(); this.initSF7(); + this.getLimitvalue(); this.initdata(); - this.getInsurers() } initSF1() { this.schema1 = { @@ -397,8 +404,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { type: 'string', title: '增值服务套餐', ui: { - widget: 'dict-select', - params: { dictKey: 'bill:insurance:type' }, + widget: 'select', + asyncData: () => { + return this.service.request(this.service.$api_getDictValue, { dictKey: 'bill:insurance:type' }).pipe( + map((res: any) => { + return [...res]; + }) + ) + }, + change: (tag: any, org: any) => { + this.getInsurersPrice(tag); + } }, default: '3' }, @@ -409,7 +425,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { readOnly: true, ui: { widget: 'checkbox', - visibleIf: { insuranceType: (value: string) => value === '0' } + visibleIf: { insuranceType: (value: string) => value === '1' } } as SFCheckboxWidgetSchema, default: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险'] }, @@ -420,7 +436,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { readOnly: true, ui: { widget: 'checkbox', - visibleIf: { insuranceType: (value: string) => value === '1' } + visibleIf: { insuranceType: (value: string) => value === '2' } } as SFCheckboxWidgetSchema, default: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'] }, @@ -432,21 +448,22 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { visibleIf: { insuranceType: (value: string) => value !== '3' } } }, - insurancePackagedGoods:{ + insurancePackagedGoods: { type: 'string', title: '货物包装', ui: { widget: 'dict-select', params: { dictKey: 'insure:packaged:goods' }, + containsAllLabel: false, visibleIf: { insuranceType: (value: string) => value !== '3' } } as SFSelectWidgetSchema }, - hidenField:{ + hidenField: { type: 'string', title: '', - default:' ', + default: ' ', ui: { - widget:'text' + widget: 'text' } }, goodsValue: { @@ -463,6 +480,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { title: '', ui: { widget: 'custom', + validator: val => this.customValidator(val), visibleIf: { insuranceType: (value: string) => value !== '3' } } }, @@ -472,26 +490,43 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { ui: { hidden: true } - }, + } }, - required: ['insurancePackagedGoods'] + required: ['insurancePackagedGoods', 'insurancePremium'] }; this.ui5 = { '*': { spanLabelFixed: 115, grid: { span: 12 } }, - $type1:{ + $type1: { grid: { span: 24 } }, - $type2:{ + $type2: { grid: { span: 24 } }, - $freeInsurance:{ + $freeInsurance: { grid: { span: 24 } - }, + } }; } + /** + * 自定义校验数据 + * @param val + */ + customValidator(val: number) { + if (this.isEmpty(val)) { + return [{ keyword: 'required', message: '不能为空' }]; + } else { + if (val <= 0) { + return [{ keyword: 'required', message: '数值需大于0' }]; + } + return []; + } + } + isEmpty(val: any) { + return val === undefined || val === null || val.toString().trim() === ''; + } initSF6() { this.schema6 = { properties: { @@ -522,45 +557,65 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } } }, + receiptAddress: { + type: 'string', + title: '回单收件人信息', + ui: { + widget: 'custom', + placeholder: '请点击选择回单收件人信息', + // validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []), + visibleIf: { + receiptType: value => value === '2' + } + }, + default: '' + }, + receiptAddressId: { + type: 'string', + title: '', + ui: { + hidden: true + } + }, receiptUserName: { type: 'string', title: '联系人', - maxLength: 15, ui: { visibleIf: { receiptType: value => value === '2' } - } + }, + readOnly: true }, - receiptUserPhone: { + phon: { type: 'string', title: '联系电话', - maxLength: 11, ui: { visibleIf: { receiptType: value => value === '2' } - } + }, + readOnly: true }, - receiptAddressArea: { + area: { type: 'string', title: '所在地区', - maxLength: 30, ui: { visibleIf: { receiptType: value => value === '2' } - } + }, + readOnly: true }, - receiptAddress: { + address: { type: 'string', title: '详细地址', - maxLength: 30, ui: { visibleIf: { receiptType: value => value === '2' } - } + }, + readOnly: true }, remarks: { type: 'string', @@ -573,11 +628,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } as SFTextareaWidgetSchema } }, - required: ['stateReceipt', 'receiptType', 'receiptUserName', 'receiptUserPhone', 'receiptAddressArea', 'receiptAddress'] + required: ['stateReceipt', 'receiptType', 'receiptAddress'] }; this.ui6 = { '*': { - spanLabelFixed: 90, + spanLabelFixed: 115, grid: { span: 24 } } }; @@ -590,19 +645,19 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { type: 'number', title: '预付', default: 0, - ui: {widget: 'custom'} + ui: { widget: 'custom' } }, toPay: { type: 'number', title: '到付', default: 0, - ui: { widget: 'custom'} + ui: { widget: 'custom' } }, receiptPay: { type: 'number', title: '回单付', default: 0, - ui: {widget: 'custom'} + ui: { widget: 'custom' } }, subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, appendFee: { type: 'number', title: '附加费', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, @@ -646,47 +701,37 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } }); } - changeValue() { - this.totalFees = - Number(this.sf7?.value?.appendFee) + - Number(this.sf7?.value?.prePay) + - Number(this.sf7?.value?.receiptPay) + - Number(this.sf7?.value?.toPay); - console.log(this.totalFees); - } payChange() { const prePay = this.sf7.value.prePay || 0; - const toPay = this.sf7.value.toPay || 0 + const toPay = this.sf7.value.toPay || 0; const receiptPay = this.sf7.value.receiptPay || 0; - // const oilCardPay = 0; + const oilCardPay = 0; const subtotal = prePay + toPay + receiptPay; const params = { shipperId: this.envCache?.enterpriseId, enterpriseInfoId: this.envCache?.networkTransporterId, - totalFreight:subtotal, - // fuelCardAmount:oilCardPay, - resourcetype:'1' - } - this.service - .request(this.service.$api_getCalculatedSurcharge,params) - .subscribe(res => { - if (res) { - this.sf7.setValue('/appendFee', res.surcharge); - this.sf7.setValue('/subtotal', subtotal); - this.sf7.setValue('/total', subtotal + res.surcharge); - this.service - .request(this.service.$api_getcalculatedServiceRate + `?invoiceAmount=${subtotal + res.surcharge}&totalFreight=${subtotal}`) - .subscribe(res => { - if (res) { - this.currentRate = res.rate * 100; - } else { - this.service.msgSrv.error(res.msg); - } - }); - } else { - this.service.msgSrv.error(res.msg); - } - }); + totalFreight: subtotal, + fuelCardAmount: oilCardPay, + resourcetype: '1' + }; + this.service.request(this.service.$api_getCalculatedSurcharge, params).subscribe(res => { + console.log('999') + console.log(this.envCache) + if (res) { + this.sf7.setValue('/appendFee', res.surcharge); + this.sf7.setValue('/subtotal', subtotal); + this.sf7.setValue('/total', subtotal + res.surcharge); + this.service + .request(this.service.$api_getAdditionalRate + `?shipperId=${this.envCache?.enterpriseId}&enterpriseInfoId=${this?.enterpriseProjectIds}&resourcetype='1'`) + .subscribe(res => { + if (res) { + this.currentRate = res.rate * 100; + } + }); + } else { + this.service.msgSrv.error(res.msg); + } + }); } // 添加 删除发货卸货地址 addStartInfo(_event: any) { @@ -708,6 +753,26 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required)); } } + + getLimitvalue() { + // 货物核载信息最大值 + // 货物运输费(小计)最大值 + const getlimitvaluesParms = [ + this.service.limitKeys.weight, + this.service.limitKeys.volume, + this.service.limitKeys.piece, + ]; + this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe((res) => { + const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys.weight)[0].itemValue; + const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys.volume)[0].itemValue; + const maxPiece = res.filter((item: any) => item.itemKey === this.service.limitKeys.piece)[0].itemValue; + this.limitValues = { + maxWeight: Number(maxWeight), + maxVolume: Number(maxVolume), + maxPiece: Number(maxPiece) + } + }) + } // 添加 删除发货卸货地址 subStartInfo(event: any, index: number, id?: any) { console.log(event, index, id); @@ -773,10 +838,12 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { .subscribe(res => { if (res) { this.sf3.getProperty('/goodsNameId')!.schema.enum = res; - this.sf3.getProperty('/goodsNameId')!.widget?.reset(res); + this.sf3.getProperty('/goodsNameId')!.widget.reset(res); if (this.sf3data.goodsNameId) { this.sf3.setValue('/goodsNameId', this.sf3data.goodsNameId); } + } else { + this.service.msgSrv.error(res.msg); } }); } @@ -811,27 +878,94 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { nzComponentParams: { type: 'onecar', resourceObj, change: change } }); } - // 提交前确认,委托运输协议弹窗 - submitConfirm(submitType?: any) { - Object.keys(this.validateForm1.controls).forEach(key => { - this.validateForm1.controls[key].markAsDirty(); - this.validateForm1.controls[key].updateValueAndValidity(); - }); - this.sf1.validator({ emitError: true }); - this.sf3.validator({ emitError: true }); - this.sf4.validator({ emitError: true }); - this.sf6.validator({ emitError: true }); - this.sf7.validator({ emitError: true }); - console.log(this.sf1.valid); - if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) { - return; - } + // // 提交前确认,委托运输协议弹窗 + // submitConfirm(submitType?: any) { + // Object.keys(this.validateForm1.controls).forEach(key => { + // this.validateForm1.controls[key].markAsDirty(); + // this.validateForm1.controls[key].updateValueAndValidity(); + // }); + // this.sf1.validator({ emitError: true }); + // this.sf3.validator({ emitError: true }); + // this.sf4.validator({ emitError: true }); + // this.sf6.validator({ emitError: true }); + // this.sf7.validator({ emitError: true }); + // console.log(this.sf1.valid); + // if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) { + // return; + // } + // const modalRef = this.modalService.create({ + // nzTitle: '运输协议', + // nzContent: TranAgreementComponent, + // nzWidth: 900, + // nzFooter: null, + // }); + // modalRef.afterClose.subscribe(result => { + // if (result) { + // this.submit(submitType); + // } + // }); + // } + // 提交前确认,委托运输协议弹窗 + submitConfirm(submitType?: string) { + Object.keys(this.validateForm1.controls).forEach(key => { + this.validateForm1.controls[key].markAsDirty(); + this.validateForm1.controls[key].updateValueAndValidity(); + }); + this.sf3.validator({ emitError: true }); + this.sf4.validator({ emitError: true }); + this.sf5.validator({ emitError: true }); + this.sf6.validator({ emitError: true }); + this.sf7.validator({ emitError: true }); + if (this.validateForm1.invalid || !this.sf3.valid || !this.sf4.valid || !this.sf5.valid || !this.sf6.valid || !this.sf7.valid) { + this.service.msgSrv.warning('请完善必填项!'); + return; + } + if (this.validateForm1.value.loadingTime < new Date()) { + this.service.msgSrv.warning('装货时间必须大于当前时间!'); + return; + } + if (this.validateForm1.value.loadingTime > this.validateForm1.value.unloadingTime) { + this.service.msgSrv.warning('装货时间不能大于卸货时间!'); + return; + } + if (this.sf7.value.total <= 0) { + this.service.msgSrv.warning('总费用不能为0!'); + return; + } + + if (this.sf4.value.weight > this.limitValues.maxWeight || this.sf4.value.volume > this.limitValues.maxVolume || this.sf4.value.number > this.limitValues.maxPiece) { + this.service.msgSrv.error(`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxPiece}件】`); + return; + } + + const getFreightParms = { carLengthKeys: this.sf4.value.carLength, km: this.totalDistance }; + this.service.request(this.service.$api_getFreight, getFreightParms).subscribe((res) => { + if (this.sf7.value.subtotal > res.maxPrice) { + this.service.msgSrv.error(`运费过高,请调整录入`); + return; + } else if (this.sf7.value.subtotal > res.ewPrice) { + this.modalService.confirm({ + nzTitle: '', + nzContent: `您的录入的运费过高,可能会影响支付,请仔细确认`, + nzOkText: '继续', + nzCancelText: '取消', + nzOnOk: () => { + this.agreementConfirm(submitType); + }, + }); + } else { + this.agreementConfirm(submitType); + } + }) + } + // 提交前协议弹窗 + agreementConfirm(submitType?: string) { const modalRef = this.modalService.create({ nzTitle: '运输协议', nzContent: TranAgreementComponent, nzWidth: 900, - nzFooter: null, + nzFooter: null }); modalRef.afterClose.subscribe(result => { if (result) { @@ -841,73 +975,109 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } // 提交 submit(submitType?: string): void { - Object.keys(this.validateForm1.controls).forEach(key => { - this.validateForm1.controls[key].markAsDirty(); - this.validateForm1.controls[key].updateValueAndValidity(); + //装卸货信息 + const LoadingList = this.startInfo.concat(this.endInfo); + + // 货物信息 + const sf3Values = { ...this.sf3.value }; + if (sf3Values.goodsTypeName === '其它') { + sf3Values.goodsName = sf3Values.goodsName1; + delete sf3Values.goodsName1; + } + if (this.sf4.value.carModel.includes('999')) { + this.sf4.value.carModel = ['999']; + } + if (this.sf4.value.carLength.includes('999')) { + this.sf4.value.carLength = ['999']; + } + const goodsInfoList = [ + { + ...sf3Values, + ...this.sf4.value, + carModel: this.sf4.value.carModel.join(','), + carLength: this.sf4.value.carLength.join(',') + } + ]; + // 运费信息 + const expenseList = [ + { expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '' }, + { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' }, + { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' } + ]; + + // 从“再下一单”过来,将所有的子参数内的id都删除 + if (this.PageStatus = '整车下一单') { + LoadingList.forEach((ele: any) => { + delete ele.id; }); - this.sf1.validator({ emitError: true }); - this.sf3.validator({ emitError: true }); - this.sf4.validator({ emitError: true }); - this.sf6.validator({ emitError: true }); - this.sf7.validator({ emitError: true }); - console.log(this.sf1.valid); - if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) { - return; - } - console.log(this?.loadingTime); - console.log(this?.unloadingTime); - if (typeof this.unloadingTime !== 'string') { - var c = new Date(this.unloadingTime); - this.unloadingTime = - c.getFullYear() + - '-' + - this.addPreZero(c.getMonth() + 1) + - '-' + - this.addPreZero(c.getDate()) + - ' ' + - this.addPreZero(c.getHours()) + - ':' + - this.addPreZero(c.getMinutes()) + - ':' + - this.addPreZero(c.getSeconds()); - } - if (typeof this.loadingTime !== 'string') { - var c = new Date(this.loadingTime); - this.loadingTime = - c.getFullYear() + - '-' + - this.addPreZero(c.getMonth() + 1) + - '-' + - this.addPreZero(c.getDate()) + - ' ' + - this.addPreZero(c.getHours()) + - ':' + - this.addPreZero(c.getMinutes()) + - ':' + - this.addPreZero(c.getSeconds()); - } - console.log(this.loadingTime) - const params: any = { - ...this.sf1.value, - ...this.sf5.value, - ...this.sf6.value, - paymentDays: this.sf7.value.paymentDays, - loadingTime: this.loadingTime, - unloadingTime: this.unloadingTime, - unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo], - goodsInfoDTOList: [ - { - ...this.sf4.value, - ...this.sf3.value, - carModel: this.sf4.value.carModel.join(','), - carLength: this.sf4.value.carLength.join(',') - } - ] - }; - params.shippingInformationDTO = { - ...this.sf7.value, - totalFees: this.totalFees - }; + goodsInfoList.forEach((ele: any) => { + delete ele.id; + }); + expenseList.forEach((ele: any) => { + delete ele.id; + }); + } + + // if (typeof this.unloadingTime !== 'string') { + // var c = new Date(this.unloadingTime); + // this.unloadingTime = + // c.getFullYear() + + // '-' + + // this.addPreZero(c.getMonth() + 1) + + // '-' + + // this.addPreZero(c.getDate()) + + // ' ' + + // this.addPreZero(c.getHours()) + + // ':' + + // this.addPreZero(c.getMinutes()) + + // ':' + + // this.addPreZero(c.getSeconds()); + // } + // if (typeof this.loadingTime !== 'string') { + // var c = new Date(this.loadingTime); + // this.loadingTime = + // c.getFullYear() + + // '-' + + // this.addPreZero(c.getMonth() + 1) + + // '-' + + // this.addPreZero(c.getDate()) + + // ' ' + + // this.addPreZero(c.getHours()) + + // ':' + + // this.addPreZero(c.getMinutes()) + + // ':' + + // this.addPreZero(c.getSeconds()); + // } + + const params = { + id: '', + ...this.sf1.value, + unLoadingPlaceList: LoadingList, + unloadingTime: format(this.validateForm1.value.unloadingTime, 'yyyy-MM-dd HH:mm:ss'), + loadingTime: format(this.validateForm1.value.loadingTime, 'yyyy-MM-dd HH:mm:ss'), + goodsInfoList: goodsInfoList, + ...this.sf5.value, + ...this.sf6.value, + expenseDTOList: expenseList, + paymentDays: this.sf7.value.paymentDays, + }; + // const params: any = { + // ...this.sf1.value, + // ...this.sf5.value, + // ...this.sf6.value, + // paymentDays: this.sf7.value.paymentDays, + // loadingTime: this.loadingTime, + // unloadingTime: this.unloadingTime, + // unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo], + // goodsInfoDTOList: [ + // { + // ...this.sf4.value, + // ...this.sf3.value, + // carModel: this.sf4.value.carModel.join(','), + // carLength: this.sf4.value.carLength.join(',') + // } + // ] + // }; console.log(params); if (submitType) { if (submitType == 'assign') { @@ -979,6 +1149,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => { this.totalDistance = res.distance; this.totalTime = res.time; + this.getInsurersPrice(); // 计算保费金额 }); } } @@ -1203,6 +1374,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { default: break; } + // 计算里程,时间 + if (this.startInfo[0]?.area && this.endInfo[0]?.area) { + this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { + this.totalDistance = res.distance; + this.totalTime = res.time; + this.getInsurersPrice(); //计算保费金额 + }); + } } }); } @@ -1271,78 +1450,29 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { this.totalDistance = res.distance; this.totalTime = res.time; + this.getInsurersPrice(); //计算保费金额 }); } } - goodsValuesChange(value: any) { - console.log(value); - console.log(this.totalDistance); - - if(value >= 50000 && this.totalDistance > 0){ + // 计算保价费金额 + getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { + if (this.sf5.value.goodsValue >= 50000 && this.totalDistance > 0) { + const params = { - goodsValue: value, - insuranceType: this.sf55.value.insuranceType, + insuranceType, + goodsValue: this.sf5.value.goodsValue, km: this.totalDistance }; - this.service - .request(this.service.$api_getWholeInsuranceInfo, params) - .subscribe(res => { - if (res) { - this.sf5.setValue('/insurancePremium',res.insurancePremium); - }else{ - this.sf5.setValue('/insurancePremium',null); - } + this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => { + if (res) { + this.sf5.setValue('/insurancePremium', res.insurancePremium); + this.sf5.setValue('/insuranceRate', res.insuranceRate); + } else { + this.sf5.setValue('/insurancePremium', null); + this.sf5.setValue('/insuranceRate', null); + } }); } } - getInsurersPrice($event?: any) { - console.log($event); - this.changeSub.next(`${$event}`); - - - } - getInsurers($event?: any) { - this.changeSub.pipe(debounceTime(500)).subscribe((res: any) => { - console.log(res) - if (res) { - console.log(res) - if(res > 3000000 ) { - console.log('1111') - this.sf5.getProperty('/goodsValue')!.widget.reset(3000000); - this.sf5.setValue('/goodsValue', 3000000); - this.service.msgSrv.error('请输入50000-3000000之间数值!') - } - if(res < 50000) { - // this.sf5.setValue('/goodsValue', 50000); - this.sf5.getProperty('/goodsValue')!.widget.reset(50000); - this.sf5.setValue('/goodsValue', 50000); - - console.log('2222') - this.service.msgSrv.error('请输入50000-3000000之间数值!') - } - if (this.sf5.value.goodsValue >= 50000) { - if(this.totalDistance <=0){ - this.service.msgSrv.warning('当前装卸货距离为0,无法计算保价费金额'); - return; - } - const params = { - goodsValue: this.sf5.value.goodsValue, - insuranceType: this.sf5.value.insuranceType, - km: this.totalDistance - }; - this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => { - if (res) { - this.sf5.setValue('/insurancePremium', res.insurancePremium); - this.sf5.setValue('/insuranceRate', res.insuranceRate); - } else { - this.sf5.setValue('/insurancePremium', null); - this.sf5.setValue('/insuranceRate', null); - } - }); - } - } - - }); - } } diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index df1da26e..9572bee4 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { cacheConf } from '@conf/cache.conf'; +import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; import { SFCheckboxWidgetSchema, SFComponent, @@ -241,7 +242,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - errors: { required: '请选择货物类型' }, + errors: { required: '请选择货物名称' }, asyncData: () => this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe( map((data: any) => { @@ -270,7 +271,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { widget: 'select', placeholder: '请选择', errors: { required: '请填写货物名称' }, - change: (_value: any, data: any) => { + change: (value: any, data: any) => { this.sf3.setValue('/goodsName', data.label); }, visibleIf: { @@ -299,11 +300,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } } }, - required: ['goodsTypeId', 'goodsName', 'goodsNameId'] + required: ['goodsTypeId', 'goodsName', 'goodsNameId', 'goodsName1'] }; this.ui3 = { '*': { - spanLabelFixed: 90, + spanLabelFixed: 115, grid: { span: 12 } } }; @@ -317,7 +318,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'custom', placeholder: '请输入', - errors: { required: '必填项' } + errors: { required: '必填项' }, + validator: val => this.customValidator(val) } }, volume: { @@ -325,7 +327,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { title: '', ui: { widget: 'custom', - placeholder: '请输入' + placeholder: '请输入', } }, number: { @@ -333,7 +335,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { title: '', ui: { widget: 'custom', - placeholder: '请输入' + placeholder: '请输入', } }, carModel: { @@ -342,13 +344,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'select', mode: 'multiple', - maxMultipleCount:3, + maxMultipleCount: 3, placeholder: '请选择车型', errors: { required: '请选择车型' }, asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }), - change:(tag:any , org:any)=>{ - if(tag.includes("999")){ - this.sf4.setValue('/carModel',["999"]); + change: (tag: any, org: any) => { + if (tag.includes('999')) { + this.sf4.setValue('/carModel', ['999']); } } } @@ -359,43 +361,28 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'select', mode: 'multiple', - maxMultipleCount:3, + maxMultipleCount: 3, placeholder: '请选择车长', errors: { required: '请选择车长' }, asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }), - change:(tag:any , org:any)=>{ - if(tag.includes("999")){ - this.sf4.setValue('/carModel',["999"]); + change: (tag: any, org: any) => { + if (tag.includes('999')) { + this.sf4.setValue('/carLength', ['999']); } } } - }, + } }, required: ['weight', 'carModel', 'carLength'] }; this.ui4 = { '*': { - spanLabelFixed: 90, - grid: { span: 24 } - }, - $weight: { - grid: { lg: 8, md: 12, sm: 12, xs: 24 } - }, - $volume: { - grid: { lg: 8, md: 12, sm: 12, xs: 24 } - }, - $number: { - grid: { lg: 8, md: 12, sm: 12, xs: 24 } - }, - $carModel: { - spanLabelFixed: 100, - grid: { span: 8 } - }, - $carLength: { + spanLabelFixed: 115, grid: { span: 8 } } }; } + initSF5() { this.schema5 = { properties: { @@ -403,8 +390,17 @@ export class SupplyManagementReleasePublishComponent implements OnInit { type: 'string', title: '增值服务套餐', ui: { - widget: 'dict-select', - params: { dictKey: 'bill:insurance:type' }, + widget: 'select', + asyncData: () => { + return this.service.request(this.service.$api_getDictValue, { dictKey: 'bill:insurance:type' }).pipe( + map((res: any) => { + return [...res]; + }) + ) + }, + change: (tag: any, org: any) => { + this.getInsurersPrice(tag); + } }, default: '3' }, @@ -415,7 +411,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { readOnly: true, ui: { widget: 'checkbox', - visibleIf: { insuranceType: (value: string) => value === '0' } + visibleIf: { insuranceType: (value: string) => value === '1' } } as SFCheckboxWidgetSchema, default: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险'] }, @@ -426,7 +422,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { readOnly: true, ui: { widget: 'checkbox', - visibleIf: { insuranceType: (value: string) => value === '1' } + visibleIf: { insuranceType: (value: string) => value === '2' } } as SFCheckboxWidgetSchema, default: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'] }, @@ -438,21 +434,22 @@ export class SupplyManagementReleasePublishComponent implements OnInit { visibleIf: { insuranceType: (value: string) => value !== '3' } } }, - insurancePackagedGoods:{ + insurancePackagedGoods: { type: 'string', title: '货物包装', ui: { widget: 'dict-select', params: { dictKey: 'insure:packaged:goods' }, + containsAllLabel: false, visibleIf: { insuranceType: (value: string) => value !== '3' } } as SFSelectWidgetSchema }, - hidenField:{ + hidenField: { type: 'string', title: '', - default:' ', + default: ' ', ui: { - widget:'text' + widget: 'text' } }, goodsValue: { @@ -469,6 +466,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { title: '', ui: { widget: 'custom', + validator: val => this.customValidator(val), visibleIf: { insuranceType: (value: string) => value !== '3' } } }, @@ -478,26 +476,27 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { hidden: true } - }, + } }, - required: ['insurancePackagedGoods'] + required: ['insurancePackagedGoods', 'insurancePremium'] }; this.ui5 = { '*': { spanLabelFixed: 115, grid: { span: 12 } }, - $type1:{ + $type1: { grid: { span: 24 } }, - $type2:{ + $type2: { grid: { span: 24 } }, - $freeInsurance:{ + $freeInsurance: { grid: { span: 24 } - }, + } }; } + initSF6() { this.schema6 = { properties: { @@ -520,7 +519,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'receipt:type' }, - containsAllLable: false, + containsAllLabel: false, placeholder: '请选择', errors: { required: '请选择' }, visibleIf: { @@ -528,58 +527,65 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } } }, - // receiptAddressId: { - // type: 'string', - // title: '选择地址', - // ui: { - // widget: 'custom', - // placeholder: '请点击选择收回单地址', - // // validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []), - // visibleIf: { - // receiptType: value => value === '2' - // } - // }, - // default: '' - // }, + receiptAddress: { + type: 'string', + title: '回单收件人信息', + ui: { + widget: 'custom', + placeholder: '请点击选择回单收件人信息', + // validator: val => (this.sf6?.value?.receiptType === '2' ? [{ keyword: 'required', message: '请点击选择收回单地址' }] : []), + visibleIf: { + receiptType: value => value === '2' + } + }, + default: '' + }, + receiptAddressId: { + type: 'string', + title: '', + ui: { + hidden: true + } + }, receiptUserName: { type: 'string', title: '联系人', - maxLength: 15, ui: { visibleIf: { receiptType: value => value === '2' } }, + readOnly: true }, - receiptUserPhone: { + phon: { type: 'string', title: '联系电话', - maxLength: 11, ui: { visibleIf: { receiptType: value => value === '2' } }, + readOnly: true }, - receiptAddressArea: { + area: { type: 'string', title: '所在地区', - maxLength: 30, ui: { visibleIf: { receiptType: value => value === '2' } }, + readOnly: true }, - receiptAddress: { + address: { type: 'string', title: '详细地址', - maxLength: 50, ui: { visibleIf: { receiptType: value => value === '2' } }, + readOnly: true }, remarks: { type: 'string', @@ -592,15 +598,16 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } as SFTextareaWidgetSchema } }, - required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress'] + required: ['stateReceipt', 'receiptType', 'receiptAddress'] }; this.ui6 = { '*': { - spanLabelFixed: 90, + spanLabelFixed: 115, grid: { span: 24 } } }; } + initSF7() { this.schema7 = { properties: { @@ -608,19 +615,19 @@ export class SupplyManagementReleasePublishComponent implements OnInit { type: 'number', title: '预付', default: 0, - ui: {widget: 'custom'} + ui: { widget: 'custom' } }, toPay: { type: 'number', title: '到付', default: 0, - ui: { widget: 'custom'} + ui: { widget: 'custom' } }, receiptPay: { type: 'number', title: '回单付', default: 0, - ui: {widget: 'custom'} + ui: { widget: 'custom' } }, subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, appendFee: { type: 'number', title: '附加费', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, @@ -643,6 +650,29 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } }; } + // 不可选择的时间 + disabledDateStart = (current: Date): boolean => { + return differenceInCalendarDays(new Date(), current) > 0; + }; + + /** + * 自定义校验数据 + * @param val + */ + customValidator(val: number) { + if (this.isEmpty(val)) { + return [{ keyword: 'required', message: '不能为空' }]; + } else { + if (val <= 0) { + return [{ keyword: 'required', message: '数值需大于0' }]; + } + return []; + } + } + + isEmpty(val: any) { + return val === undefined || val === null || val.toString().trim() === ''; + } // 获取城市列表 getRegionCode(regionCode: any) { console.log(regionCode); @@ -663,37 +693,35 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } payChange() { const prePay = this.sf7.value.prePay || 0; - const toPay = this.sf7.value.toPay || 0 + const toPay = this.sf7.value.toPay || 0; const receiptPay = this.sf7.value.receiptPay || 0; - // const oilCardPay = 0; + const oilCardPay = 0; const subtotal = prePay + toPay + receiptPay; const params = { - shipperId: this.envCache?.enterpriseId, - enterpriseInfoId: this.envCache?.networkTransporterId, - totalFreight:subtotal, - // fuelCardAmount:oilCardPay, - resourcetype:'1' - } - this.service - .request(this.service.$api_getCalculatedSurcharge,params) - .subscribe(res => { - if (res) { - this.sf7.setValue('/appendFee', res.surcharge); - this.sf7.setValue('/subtotal', subtotal); - this.sf7.setValue('/total', subtotal + res.surcharge); - this.service - .request(this.service.$api_getcalculatedServiceRate + `?invoiceAmount=${subtotal + res.surcharge}&totalFreight=${subtotal}`) - .subscribe(res => { - if (res) { - this.currentRate = res.rate * 100; - } else { - this.service.msgSrv.error(res.msg); - } - }); - } else { - this.service.msgSrv.error(res.msg); - } - }); + shipperId: this?.sf1.value?.shipperAppUserId, + enterpriseInfoId: this?.sf1.value?.enterpriseInfoName, + totalFreight: subtotal, + fuelCardAmount: oilCardPay, + resourcetype: '1' + }; + this.service.request(this.service.$api_getCalculatedSurcharge, params).subscribe(res => { + console.log('999') + console.log(this?.sf1.value) + if (res) { + this.sf7.setValue('/appendFee', res.surcharge); + this.sf7.setValue('/subtotal', subtotal); + this.sf7.setValue('/total', subtotal + res.surcharge); + this.service + .request(this.service.$api_getAdditionalRate + `?shipperId=${this?.sf1.value?.shipperAppUserId}&enterpriseInfoId=${this?.sf1.value?.enterpriseInfoName}&resourcetype='1'`) + .subscribe(res => { + if (res) { + this.currentRate = res.rate * 100; + } + }); + } else { + this.service.msgSrv.error(res.msg); + } + }); } // 添加 删除发货卸货地址 addStartInfo() { @@ -983,6 +1011,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit { if (this.sf3data.goodsNameId) { this.sf3.setValue('/goodsNameId', this.sf3data.goodsNameId); } + } else { + this.service.msgSrv.error(res.msg); } }); } @@ -1049,28 +1079,24 @@ export class SupplyManagementReleasePublishComponent implements OnInit { }); } } - getInsurersPrice() { - console.log(this.sf5.value.goodsValue) - console.log(this.sf5.value.insuranceType) - if (this.sf5.value.goodsValue >= 50000) { - if(this.totalDistance <=0){ - this.service.msgSrv.warning('当前装卸货距离为0,无法计算保价费金额'); - return; + // 计算保价费金额 + getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { + if (this.sf5.value.goodsValue >= 50000 && this.totalDistance > 0) { + + const params = { + insuranceType, + goodsValue: this.sf5.value.goodsValue, + km: this.totalDistance + }; + this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => { + if (res) { + this.sf5.setValue('/insurancePremium', res.insurancePremium); + this.sf5.setValue('/insuranceRate', res.insuranceRate); + } else { + this.sf5.setValue('/insurancePremium', null); + this.sf5.setValue('/insuranceRate', null); } - const params = { - goodsValue: this.sf5.value.goodsValue, - insuranceType: this.sf5.value.insuranceType, - km: this.totalDistance - }; - this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => { - if (res) { - this.sf5.setValue('/insurancePremium', res.insurancePremium); - this.sf5.setValue('/insuranceRate', res.insuranceRate); - } else { - this.sf5.setValue('/insurancePremium', null); - this.sf5.setValue('/insuranceRate', null); - } - }); - } + }); } + } } diff --git a/src/app/routes/supply-management/services/supply-management.service.ts b/src/app/routes/supply-management/services/supply-management.service.ts index 04ff9de7..dfde3bc3 100644 --- a/src/app/routes/supply-management/services/supply-management.service.ts +++ b/src/app/routes/supply-management/services/supply-management.service.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 11:10:14 * @LastEditors : Shiming - * @LastEditTime : 2022-02-28 11:31:44 + * @LastEditTime : 2022-02-28 15:22:19 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\services\\supply-management.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -54,6 +54,8 @@ export class SupplyManagementService extends BaseService { $api_getCalculatedSurcharge = `/api/sdc/expense/getCalculatedSurcharge`; // 整车计算附加费率 $api_getcalculatedServiceRate = `/api/sdc/expense/getAdditionalRate`; + // 整车计算附加费率 + $api_getAdditionalRate = `/api/sdc/expense/getAdditionalRate`; // 代发整车货源 $api_consignWhole = `/api/sdc/goodsResourceOperate/consignWhole`; // 代发大宗货源 @@ -111,8 +113,10 @@ export class SupplyManagementService extends BaseService { public $api_getOperationLogRecordsList = '/api/mdc/pbc/operationLogRecords/getOperationLogRecordsList'; // 获取数据字典 $api_getDictValue = `/api/mdc/pbc/dictItems/getDictValue`; - // 获取协议信息 - public $api_getAgreementInfoByType = '/api/mdc/pbc/agreementInfo/getAgreementInfoByType'; + // 获取协议信息 + public $api_getAgreementInfoByType = '/api/mdc/pbc/agreementInfo/getAgreementInfoByType'; + // 获取运价 + public $api_getFreight = '/api/mdc/cuc/freightConfig/getFreight'; /** * 获取车型、车长字典数据 * @returns @@ -132,6 +136,13 @@ export class SupplyManagementService extends BaseService { constructor(public injector: Injector) { super(injector); } + public limitKeys = { + weight: 'sys.config.goods.approvalCarMaxWeight', //整车-核载重量上限 + volume: 'sys.config.goods.approvalCarMaxVolume', //整车-核载体积上限 + piece: 'sys.config.goods.approvalCarMaxPiece' //整车-核载件数上限 + }; + // 根据ItemKey获取项值 + public $api_findItemValueByItemKeys = '/api/mdc/pbc/sysConfigItem/findItemValueByItemKeys'; // 获取保价费信息 public $api_getWholeInsuranceInfo = '/api/sdc/goodsResourceShipper/getWholeInsuranceInfo'; } From 545b867fc1dc75b4d7e5e5f23dceaf04f55dac36 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Feb 2022 16:24:04 +0800 Subject: [PATCH 003/107] fix bug --- .../onecar-publish.component.html | 118 ++--- .../onecar-publish.component.ts | 492 +++++++----------- .../release-publish.component.html | 9 +- 3 files changed, 262 insertions(+), 357 deletions(-) diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html index c5399031..3547171e 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html @@ -33,10 +33,10 @@ @@ -69,7 +69,7 @@
- @@ -98,7 +98,7 @@
@@ -131,7 +131,7 @@
- @@ -144,12 +144,11 @@ 装货时间 + nzShowTime + nzFormat="yyyy-MM-dd HH:mm:ss" + formControlName="loadingTime" + [nzDisabledDate]="disabledDateStart" + >
@@ -158,13 +157,7 @@ 卸货时间 - + @@ -172,55 +165,56 @@ -
货物信息
-
- - - - - - - - - - - - - - - - - - +
+
+ + + + + + + + + + + + + + + + + diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index d02862b7..edebb36b 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { debounceTime } from 'rxjs/operators'; import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; +import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; import format from 'date-fns/format'; import { Subject } from 'rxjs'; import { ActivatedRoute, Router } from '@angular/router'; @@ -17,7 +17,6 @@ import { import { _HttpClient } from '@delon/theme'; import { AmapPoiPickerComponent, AmapService, EACacheService, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; -import { type } from 'os'; import { of } from 'rxjs'; import { map } from 'rxjs/operators'; import { SupplyManagementService } from '../../services/supply-management.service'; @@ -39,8 +38,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { limitValues = { maxWeight: 99999, maxVolume: 99999, - maxPiece: 99999, - } + maxPiece: 99999 + }; sf1data: any; // 货源单设置回显 sf3data: any; // 货源单设置回显 sf4data: any; // 货源单设置回显 @@ -72,8 +71,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { public service: SupplyManagementService, private amapService: AmapService, public shipperSrv: ShipperBaseService, - private eaCacheSrv: EACacheService, - + private eaCacheSrv: EACacheService ) { this.validateForm1 = fb.group({ loadingTime: [null, [Validators.required]], @@ -112,15 +110,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { @ViewChild('sf7', { static: false }) sf7!: SFComponent; schema7: SFSchema = {}; ui7!: SFUISchema; - formatterRmb = (value: number): string =>{ - if(value){ - let value2 = Number(value).toLocaleString(undefined,{'minimumFractionDigits':2,'maximumFractionDigits':2}); + formatterRmb = (value: number): string => { + if (value) { + let value2 = Number(value).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); return `¥ ${value2}`; } - return `¥ 0.00` - - } ; - parserRmb = (value: string): string => value.replace('¥ ', '').replace(',',''); + return `¥ 0.00`; + }; + parserRmb = (value: string): string => value.replace('¥ ', '').replace(',', ''); // 页面初始化 ngOnInit(): void { if (this.route.snapshot?.queryParams?.sta === '1') { @@ -343,13 +340,13 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { ui: { widget: 'select', mode: 'multiple', - maxMultipleCount:3, + maxMultipleCount: 3, placeholder: '请选择车型', errors: { required: '请选择车型' }, asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }), - change:(tag:any , org:any)=>{ - if(tag.includes("999")){ - this.sf4.setValue('/carModel',["999"]); + change: (tag: any, org: any) => { + if (tag.includes('999')) { + this.sf4.setValue('/carModel', ['999']); } } } @@ -360,17 +357,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { ui: { widget: 'select', mode: 'multiple', - maxMultipleCount:3, + maxMultipleCount: 3, placeholder: '请选择车长', errors: { required: '请选择车长' }, asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }), - change:(tag:any , org:any)=>{ - if(tag.includes("999")){ - this.sf4.setValue('/carModel',["999"]); + change: (tag: any, org: any) => { + if (tag.includes('999')) { + this.sf4.setValue('/carModel', ['999']); } } } - }, + } }, required: ['weight', 'carModel', 'carLength'] }; @@ -410,7 +407,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { map((res: any) => { return [...res]; }) - ) + ); }, change: (tag: any, org: any) => { this.getInsurersPrice(tag); @@ -514,7 +511,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { * 自定义校验数据 * @param val */ - customValidator(val: number) { + customValidator(val: number) { if (this.isEmpty(val)) { return [{ keyword: 'required', message: '不能为空' }]; } else { @@ -715,14 +712,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { resourcetype: '1' }; this.service.request(this.service.$api_getCalculatedSurcharge, params).subscribe(res => { - console.log('999') - console.log(this.envCache) + console.log('999'); + console.log(this.envCache); if (res) { this.sf7.setValue('/appendFee', res.surcharge); this.sf7.setValue('/subtotal', subtotal); this.sf7.setValue('/total', subtotal + res.surcharge); this.service - .request(this.service.$api_getAdditionalRate + `?shipperId=${this.envCache?.enterpriseId}&enterpriseInfoId=${this?.enterpriseProjectIds}&resourcetype='1'`) + .request( + this.service.$api_getAdditionalRate + + `?shipperId=${this.envCache?.enterpriseId}&enterpriseInfoId=${this?.enterpriseProjectIds}&resourcetype='1'` + ) .subscribe(res => { if (res) { this.currentRate = res.rate * 100; @@ -733,8 +733,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } }); } - // 添加 删除发货卸货地址 - addStartInfo(_event: any) { + addStartInfo() { if (this.startInfo.length < 5) { const controlId = this.startInfo.length; this.startInfo.push({ @@ -746,23 +745,19 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { province: '', city: '', area: '', - type: 1 + type: '1' }); this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); } } - + getLimitvalue() { // 货物核载信息最大值 // 货物运输费(小计)最大值 - const getlimitvaluesParms = [ - this.service.limitKeys.weight, - this.service.limitKeys.volume, - this.service.limitKeys.piece, - ]; - this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe((res) => { + const getlimitvaluesParms = [this.service.limitKeys.weight, this.service.limitKeys.volume, this.service.limitKeys.piece]; + this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe(res => { const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys.weight)[0].itemValue; const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys.volume)[0].itemValue; const maxPiece = res.filter((item: any) => item.itemKey === this.service.limitKeys.piece)[0].itemValue; @@ -770,25 +765,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { maxWeight: Number(maxWeight), maxVolume: Number(maxVolume), maxPiece: Number(maxPiece) - } - }) + }; + }); } - // 添加 删除发货卸货地址 - subStartInfo(event: any, index: number, id?: any) { - console.log(event, index, id); - if (id) { - this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => { - console.log(res); - }); - } + subStartInfo(event: any, index: number) { this.startInfo.splice(index, 1); this.validateForm1.removeControl(`loadAddress${index}`); this.validateForm1.removeControl(`loadName${index}`); this.validateForm1.removeControl(`loadPhone${index}`); } - // 添加 删除发货卸货地址 - addEndInfo(_event: any) { - if (this.addEndInfo.length < 5) { + addEndInfo() { + if (this.endInfo.length < 5) { const controlId = this.endInfo.length; this.endInfo.push({ detailedAddress: '', @@ -799,21 +786,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { province: '', city: '', area: '', - type: 2 + type: '2' }); this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl( + `unloadPhone${controlId}`, + new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]) + ); } } - // 添加 删除发货卸货地址 - subEndInfo(event: any, index: number, id?: any) { - if (id) { - this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => { - console.log(res); - }); - } - console.log(event, index, id); + subEndInfo(event: any, index: number) { this.endInfo.splice(index, 1); this.validateForm1.removeControl(`unloadAddress${index}`); this.validateForm1.removeControl(`unloadName${index}`); @@ -878,88 +861,71 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { nzComponentParams: { type: 'onecar', resourceObj, change: change } }); } - // // 提交前确认,委托运输协议弹窗 - // submitConfirm(submitType?: any) { - // Object.keys(this.validateForm1.controls).forEach(key => { - // this.validateForm1.controls[key].markAsDirty(); - // this.validateForm1.controls[key].updateValueAndValidity(); - // }); - // this.sf1.validator({ emitError: true }); - // this.sf3.validator({ emitError: true }); - // this.sf4.validator({ emitError: true }); - // this.sf6.validator({ emitError: true }); - // this.sf7.validator({ emitError: true }); - // console.log(this.sf1.valid); - // if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) { - // return; - // } - - // const modalRef = this.modalService.create({ - // nzTitle: '运输协议', - // nzContent: TranAgreementComponent, - // nzWidth: 900, - // nzFooter: null, - // }); - // modalRef.afterClose.subscribe(result => { - // if (result) { - // this.submit(submitType); - // } - // }); - // } - // 提交前确认,委托运输协议弹窗 - submitConfirm(submitType?: string) { - Object.keys(this.validateForm1.controls).forEach(key => { - this.validateForm1.controls[key].markAsDirty(); - this.validateForm1.controls[key].updateValueAndValidity(); - }); - this.sf3.validator({ emitError: true }); - this.sf4.validator({ emitError: true }); - this.sf5.validator({ emitError: true }); - this.sf6.validator({ emitError: true }); - this.sf7.validator({ emitError: true }); - if (this.validateForm1.invalid || !this.sf3.valid || !this.sf4.valid || !this.sf5.valid || !this.sf6.valid || !this.sf7.valid) { - this.service.msgSrv.warning('请完善必填项!'); - return; - } - if (this.validateForm1.value.loadingTime < new Date()) { - this.service.msgSrv.warning('装货时间必须大于当前时间!'); - return; - } - if (this.validateForm1.value.loadingTime > this.validateForm1.value.unloadingTime) { - this.service.msgSrv.warning('装货时间不能大于卸货时间!'); - return; - } - if (this.sf7.value.total <= 0) { - this.service.msgSrv.warning('总费用不能为0!'); - return; - } - - if (this.sf4.value.weight > this.limitValues.maxWeight || this.sf4.value.volume > this.limitValues.maxVolume || this.sf4.value.number > this.limitValues.maxPiece) { - this.service.msgSrv.error(`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxPiece}件】`); - return; - } - - const getFreightParms = { carLengthKeys: this.sf4.value.carLength, km: this.totalDistance }; - this.service.request(this.service.$api_getFreight, getFreightParms).subscribe((res) => { - if (this.sf7.value.subtotal > res.maxPrice) { - this.service.msgSrv.error(`运费过高,请调整录入`); - return; - } else if (this.sf7.value.subtotal > res.ewPrice) { - this.modalService.confirm({ - nzTitle: '', - nzContent: `您的录入的运费过高,可能会影响支付,请仔细确认`, - nzOkText: '继续', - nzCancelText: '取消', - nzOnOk: () => { - this.agreementConfirm(submitType); - }, - }); - } else { - this.agreementConfirm(submitType); - } - }) + // 提交前确认,委托运输协议弹窗 + submitConfirm(submitType?: string) { + Object.keys(this.validateForm1.controls).forEach(key => { + this.validateForm1.controls[key].markAsDirty(); + this.validateForm1.controls[key].updateValueAndValidity(); + }); + this.sf3.validator({ emitError: true }); + this.sf4.validator({ emitError: true }); + this.sf5.validator({ emitError: true }); + this.sf6.validator({ emitError: true }); + this.sf7.validator({ emitError: true }); + console.log(this.validateForm1.invalid) + console.log(this.sf4.valid) + console.log(this.sf5.valid) + console.log(this.sf6.valid) + console.log(this.sf7.valid) + if (this.validateForm1.invalid || !this.sf3.valid || !this.sf4.valid || !this.sf5.valid || !this.sf6.valid || !this.sf7.valid) { + this.service.msgSrv.warning('请完善必填项!'); + return; } - // 提交前协议弹窗 + if (this.validateForm1.value.loadingTime < new Date()) { + this.service.msgSrv.warning('装货时间必须大于当前时间!'); + return; + } + if (this.validateForm1.value.loadingTime > this.validateForm1.value.unloadingTime) { + this.service.msgSrv.warning('装货时间不能大于卸货时间!'); + return; + } + if (this.sf7.value.total <= 0) { + this.service.msgSrv.warning('总费用不能为0!'); + return; + } + + if ( + this.sf4.value.weight > this.limitValues.maxWeight || + this.sf4.value.volume > this.limitValues.maxVolume || + this.sf4.value.number > this.limitValues.maxPiece + ) { + this.service.msgSrv.error( + `当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxPiece}件】` + ); + return; + } + + const getFreightParms = { carLengthKeys: this.sf4.value.carLength, km: this.totalDistance }; + this.service.request(this.service.$api_getFreight, getFreightParms).subscribe(res => { + if (this.sf7.value.subtotal > res.maxPrice) { + this.service.msgSrv.error(`运费过高,请调整录入`); + return; + } else if (this.sf7.value.subtotal > res.ewPrice) { + this.modalService.confirm({ + nzTitle: '', + nzContent: `您的录入的运费过高,可能会影响支付,请仔细确认`, + nzOkText: '继续', + nzCancelText: '取消', + nzOnOk: () => { + this.agreementConfirm(submitType); + } + }); + } else { + this.agreementConfirm(submitType); + } + }); + } + // 提交前协议弹窗 agreementConfirm(submitType?: string) { const modalRef = this.modalService.create({ nzTitle: '运输协议', @@ -975,92 +941,60 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } // 提交 submit(submitType?: string): void { - //装卸货信息 - const LoadingList = this.startInfo.concat(this.endInfo); + //装卸货信息 + const LoadingList = this.startInfo.concat(this.endInfo); - // 货物信息 - const sf3Values = { ...this.sf3.value }; - if (sf3Values.goodsTypeName === '其它') { - sf3Values.goodsName = sf3Values.goodsName1; - delete sf3Values.goodsName1; - } - if (this.sf4.value.carModel.includes('999')) { - this.sf4.value.carModel = ['999']; - } - if (this.sf4.value.carLength.includes('999')) { - this.sf4.value.carLength = ['999']; - } - const goodsInfoList = [ - { - ...sf3Values, - ...this.sf4.value, - carModel: this.sf4.value.carModel.join(','), - carLength: this.sf4.value.carLength.join(',') + // 货物信息 + const sf3Values = { ...this.sf3.value }; + if (sf3Values.goodsTypeName === '其它') { + sf3Values.goodsName = sf3Values.goodsName1; + delete sf3Values.goodsName1; } - ]; - // 运费信息 - const expenseList = [ - { expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '' }, - { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' }, - { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' } - ]; + if (this.sf4.value.carModel.includes('999')) { + this.sf4.value.carModel = ['999']; + } + if (this.sf4.value.carLength.includes('999')) { + this.sf4.value.carLength = ['999']; + } + const goodsInfoVOList = [ + { + ...sf3Values, + ...this.sf4.value, + carModel: this.sf4.value.carModel.join(','), + carLength: this.sf4.value.carLength.join(',') + } + ]; + // 运费信息 + const expenseList = [ + { expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '' }, + { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' }, + { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' } + ]; - // 从“再下一单”过来,将所有的子参数内的id都删除 - if (this.PageStatus = '整车下一单') { - LoadingList.forEach((ele: any) => { - delete ele.id; - }); - goodsInfoList.forEach((ele: any) => { - delete ele.id; - }); - expenseList.forEach((ele: any) => { - delete ele.id; - }); - } - - // if (typeof this.unloadingTime !== 'string') { - // var c = new Date(this.unloadingTime); - // this.unloadingTime = - // c.getFullYear() + - // '-' + - // this.addPreZero(c.getMonth() + 1) + - // '-' + - // this.addPreZero(c.getDate()) + - // ' ' + - // this.addPreZero(c.getHours()) + - // ':' + - // this.addPreZero(c.getMinutes()) + - // ':' + - // this.addPreZero(c.getSeconds()); - // } - // if (typeof this.loadingTime !== 'string') { - // var c = new Date(this.loadingTime); - // this.loadingTime = - // c.getFullYear() + - // '-' + - // this.addPreZero(c.getMonth() + 1) + - // '-' + - // this.addPreZero(c.getDate()) + - // ' ' + - // this.addPreZero(c.getHours()) + - // ':' + - // this.addPreZero(c.getMinutes()) + - // ':' + - // this.addPreZero(c.getSeconds()); - // } - - const params = { - id: '', - ...this.sf1.value, - unLoadingPlaceList: LoadingList, - unloadingTime: format(this.validateForm1.value.unloadingTime, 'yyyy-MM-dd HH:mm:ss'), - loadingTime: format(this.validateForm1.value.loadingTime, 'yyyy-MM-dd HH:mm:ss'), - goodsInfoList: goodsInfoList, - ...this.sf5.value, - ...this.sf6.value, - expenseDTOList: expenseList, - paymentDays: this.sf7.value.paymentDays, - }; + // 从“再下一单”过来,将所有的子参数内的id都删除 + if ((this.PageStatus = '整车下一单')) { + LoadingList.forEach((ele: any) => { + delete ele.id; + }); + goodsInfoVOList.forEach((ele: any) => { + delete ele.id; + }); + expenseList.forEach((ele: any) => { + delete ele.id; + }); + } + const params = { + id: '', + ...this.sf1.value, + unLoadingPlaceDTOList: LoadingList, + unloadingTime: format(this.validateForm1.value.unloadingTime, 'yyyy-MM-dd HH:mm:ss'), + loadingTime: format(this.validateForm1.value.loadingTime, 'yyyy-MM-dd HH:mm:ss'), + goodsInfoDTOList: goodsInfoVOList, + ...this.sf5.value, + ...this.sf6.value, + expenseDTOList: expenseList, + paymentDays: this.sf7.value.paymentDays + }; // const params: any = { // ...this.sf1.value, // ...this.sf5.value, @@ -1259,14 +1193,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required)); } - - // 计算里程,时间 - if (this.startInfo?.[0]?.area && this.endInfo?.[0]?.area) { - this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { - this.totalDistance = res.distance; - this.totalTime = res.time; - }); - } + + // 计算里程,时间 + if (this.startInfo?.[0]?.area && this.endInfo?.[0]?.area) { + this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { + this.totalDistance = res.distance; + this.totalTime = res.time; + }); + } }); this.sf3data = { @@ -1279,26 +1213,27 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.sf3data.goodsName1 = res?.goodsInfoVOList[0]?.goodsName || ''; } this.changeGoodsType(this.sf3data.goodsTypeId, { label: this.sf3data.goodsTypeName, value: this.sf3data.goodsTypeId }); - this.sf4data = { - weight: res?.goodsInfoVOList[0]?.weight, - volume: res?.goodsInfoVOList[0]?.volume, - vehicleDemand: res?.goodsInfoVOList[0]?.vehicleDemand, - carLength: res?.goodsInfoVOList[0]?.carLength?.split(','), - carModel: res?.goodsInfoVOList[0]?.carModel?.split(',') || '', - number: res?.goodsInfoVOList[0]?.number, - goodsTypeName: res?.goodsInfoVOList[0]?.goodsTypeName, - modifyUserId: res?.goodsInfoVOList[0]?.modifyUserId, - resourceId: res?.goodsInfoVOList[0]?.resourceId, - rule: res?.goodsInfoVOList[0]?.rule, - settlementBasis: res?.goodsInfoVOList[0]?.settlementBasis - }; + if (res?.loadingTime) { this.loadingTime = res?.loadingTime; } if (res?.unloadingTime) { this.unloadingTime = res?.unloadingTime; } - + this.validateForm1.patchValue( + { + loadingTime: new Date(Date.parse(res.loadingTime.replace(/-/g, '/'))), + unloadingTime: new Date(Date.parse(res.unloadingTime.replace(/-/g, '/'))) + }, + { onlySelf: true } + ); + this.sf4data = { + weight: res?.goodsInfoVOList[0]?.weight || '', + volume: res?.goodsInfoVOList[0]?.volume || '', + number: res?.goodsInfoVOList[0]?.number || '', + carModel: res?.goodsInfoVOList[0]?.carModel?.split(',') || [], + carLength: res?.goodsInfoVOList[0]?.carLength?.split(',') || [] + }; if (this.PageStatus === '整车修改') { this.sf4data.id = res?.goodsInfoVOList[0]?.id; } @@ -1374,56 +1309,29 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { default: break; } - // 计算里程,时间 - if (this.startInfo[0]?.area && this.endInfo[0]?.area) { - this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { - this.totalDistance = res.distance; - this.totalTime = res.time; - this.getInsurersPrice(); //计算保费金额 - }); - } + // 计算里程,时间 + if (this.startInfo[0]?.area && this.endInfo[0]?.area) { + this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { + this.totalDistance = res.distance; + this.totalTime = res.time; + this.getInsurersPrice(); //计算保费金额 + }); + } } }); } - changeUn(event: Date) { - console.log(event) - this.unloadingTime = event; - if(typeof this.loadingTime === 'string') { - var a = new Date(this.loadingTime) - if ( a > this.unloadingTime?.getTime() ) { - this.service.msgSrv.error('卸货时间不能小于装货时间!'); - this.unloadingTime = ''; - } - } else { - if ( this.loadingTime?.getTime() > this.unloadingTime?.getTime() ) { - this.service.msgSrv.error('卸货时间不能小于装货时间!'); - this.unloadingTime = ''; - } - } - } - changeLO(event: Date) { - this.loadingTime = event; - if(typeof this.unloadingTime === 'string') { - var a = new Date(this.unloadingTime) - if ( a.getTime()< this.loadingTime?.getTime()) { - this.service.msgSrv.error('装货时间不能大于卸货时间!'); - this.loadingTime = ''; - } - } else { - if ( this.unloadingTime?.getTime()< this.loadingTime?.getTime()) { - this.service.msgSrv.error('装货时间不能大于卸货时间!'); - this.loadingTime = ''; - } - } - } + // 不可选择的时间 + disabledDateStart = (current: Date): boolean => { + return differenceInCalendarDays(new Date(), current) > 0; + }; // 装卸货地址互换 - swapAddress(){ - this.startInfo.forEach((element:any, index:any) => { + swapAddress() { + this.startInfo.forEach((element: any, index: any) => { this.validateForm1.removeControl(`loadAddress${index}`); this.validateForm1.removeControl(`loadName${index}`); this.validateForm1.removeControl(`loadPhone${index}`); }); - this.endInfo.forEach((element:any, index:any) => { + this.endInfo.forEach((element: any, index: any) => { this.validateForm1.removeControl(`unloadAddress${index}`); this.validateForm1.removeControl(`unloadName${index}`); this.validateForm1.removeControl(`unloadPhone${index}`); @@ -1433,13 +1341,13 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.startInfo = this.endInfo; this.endInfo = item; - this.startInfo.forEach((element:any,index:any) => { + this.startInfo.forEach((element: any, index: any) => { element.type = '1'; this.validateForm1.addControl(`loadAddress${index}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`loadName${index}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`loadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); }); - this.endInfo.forEach((element:any,index:any) => { + this.endInfo.forEach((element: any, index: any) => { element.type = '2'; this.validateForm1.addControl(`unloadAddress${index}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`unloadName${index}`, new FormControl(null, Validators.required)); @@ -1457,7 +1365,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { // 计算保价费金额 getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { if (this.sf5.value.goodsValue >= 50000 && this.totalDistance > 0) { - const params = { insuranceType, goodsValue: this.sf5.value.goodsValue, @@ -1474,5 +1381,4 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { }); } } - } diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.html b/src/app/routes/supply-management/components/release-publish/release-publish.component.html index 90b3a193..e8cf8c34 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.html +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.html @@ -158,7 +158,12 @@ 装货时间 - +
@@ -167,7 +172,7 @@ 卸货时间 - + From f3a1e96d86548c305c40988958f29549d2998534 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Feb 2022 16:47:57 +0800 Subject: [PATCH 004/107] fix bug --- .../modal/vehicle/view-track/view-track.component.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html index e897a9bf..474bc951 100644 --- a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html @@ -4,19 +4,19 @@ * @Author : Shiming * @Date : 2022-02-22 13:53:29 * @LastEditors : Shiming - * @LastEditTime : 2022-02-28 14:35:50 + * @LastEditTime : 2022-02-28 16:47:04 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. -->
- +
- +
From 8e0ea9bf237db5044f6be286876e80b1f237dc36 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Feb 2022 16:59:14 +0800 Subject: [PATCH 005/107] fix bug --- .../components/bulk-publish/bulk-publish.component.ts | 1 + .../bulk-release-publish/bulk-release-publish.component.ts | 1 + .../components/release-publish/release-publish.component.ts | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index 9e5c484b..a2222101 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts @@ -412,6 +412,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { grid: { lg: 8, md: 12, sm: 12, xs: 24 } }, $carModel: { + spanLabelFixed: 120, grid: { span: 8 } }, $carLength: { diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index 94e45979..35f68fc2 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -435,6 +435,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { grid: { lg: 8, md: 12, sm: 12, xs: 24 } }, $carModel: { + spanLabelFixed: 120, grid: { span: 8 } }, $carLength: { diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index 9572bee4..8eeedaa6 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -379,7 +379,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit { '*': { spanLabelFixed: 115, grid: { span: 8 } - } + }, + $carModel: { + spanLabelFixed: 100, + grid: { span: 8 } + }, }; } From 8555bb7f39e22971a792fa609109706dbb4d4280 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Feb 2022 17:01:25 +0800 Subject: [PATCH 006/107] fix bug --- .../components/list/list.component.html | 7 ++++++- .../insurance-management/components/list/list.component.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/routes/insurance-management/components/list/list.component.html b/src/app/routes/insurance-management/components/list/list.component.html index e4dbec7f..a4559f83 100644 --- a/src/app/routes/insurance-management/components/list/list.component.html +++ b/src/app/routes/insurance-management/components/list/list.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-02-24 20:03:23 + * @LastEditTime : 2022-02-28 17:00:48 * @FilePath : \\tms-obc-web\\src\\app\\routes\\insurance-management\\components\\list\\list.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -91,6 +91,11 @@
{{ item?.billCode }}
+ + +
+ {{ item?.resourceCode }} +
{{ item?.resourceStatusLabel }}
diff --git a/src/app/routes/insurance-management/components/list/list.component.ts b/src/app/routes/insurance-management/components/list/list.component.ts index 6a51122c..b163791f 100644 --- a/src/app/routes/insurance-management/components/list/list.component.ts +++ b/src/app/routes/insurance-management/components/list/list.component.ts @@ -412,7 +412,7 @@ export class insuranceManagementListComponent implements OnInit { { title: '货源编号', className: 'text-right', - index: 'resourceCode', + render: 'resourceCode', width: '150px' }, { From a0827b825a220f190db98725873699c1b3abba75 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 28 Feb 2022 19:12:43 +0800 Subject: [PATCH 007/107] edit --- src/app/core/startup/startup.service.ts | 3 ++- .../cost-management-detail.component.html | 2 +- .../cost-management-detail.component.ts | 4 +-- .../payment-order-detail.component.html | 6 ++--- .../cancellation-invoice.component.ts | 25 ++++++++++--------- .../push-invoice/push-invoice.component.html | 24 +++++++++--------- .../push-invoice/push-invoice.component.ts | 5 +++- 7 files changed, 37 insertions(+), 32 deletions(-) diff --git a/src/app/core/startup/startup.service.ts b/src/app/core/startup/startup.service.ts index 9b95436e..4b746335 100644 --- a/src/app/core/startup/startup.service.ts +++ b/src/app/core/startup/startup.service.ts @@ -34,6 +34,7 @@ export class StartupService { private coreSrv: CoreService ) { iconSrv.addIcon(...ICONS_AUTO, ...ICONS); + this.settingService.setLayout('fixSiderbar', true); } // TODO: 退出登录时需要清理用户信息 @@ -95,7 +96,7 @@ export class StartupService { // ACL:设置权限为全量 this.aclService.setFull(false); // 初始化菜单 - if(menuData){ + if (menuData) { this.menuService.add(menuData); } // 设置页面标题的后缀 diff --git a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html index 8b315a1f..73befe16 100644 --- a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html +++ b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html @@ -114,7 +114,7 @@
- + diff --git a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts index d541718c..bc735195 100644 --- a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts +++ b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts @@ -54,10 +54,10 @@ export class CostManagementDetailComponent implements OnInit { { title: '费用科目', index: 'feeSubName', className: 'text-left', width: 200 }, { title: '税率', - index: 'hrvatrate', + index: 'arvatrate', className: 'text-right', width: 200, - format: item => `${item.hrvatrate ? ((item.hrvatrate as number) * 100).toFixed(2) : 0}%` + format: item => `${item.arvatrate ? ((item.arvatrate as number) * 100).toFixed(2) : 0}%` }, { title: '费用金额', render: 'hrvatmoney', className: 'text-right', width: 200 }, { title: '收/付款金额', render: 'armoney', className: 'text-right', width: 200 }, diff --git a/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html b/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html index deda8303..a6a93f4f 100644 --- a/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html +++ b/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html @@ -29,7 +29,7 @@ {{headerInfo?.ltdAccountId}} - {{headerInfo?.payMoney}} + {{headerInfo?.payMoney | currency}}
@@ -37,7 +37,7 @@ {{headerInfo?.payDate}} - {{headerInfo?.ltdaccountId}} + {{headerInfo?.hrAccountId}} {{headerInfo?.payDate}} @@ -51,7 +51,7 @@ {{headerInfo?.payModeLabel}} - {{headerInfo?.payType}} + {{headerInfo?.payTypeLabel}} {{headerInfo?.payMoney |currency}} diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts index d425a8e1..b2c8021c 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts +++ b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts @@ -204,7 +204,7 @@ export class CancellationInvoiceComponent implements OnInit { const modal = this.nzModalService.create({ nzTitle: '推送开票', nzContent: PushInvoiceComponent, - nzComponentParams: { id: item.id }, + nzComponentParams: { id: item.vatappHId }, nzWidth: 1200, nzOnOk: () => { this.service.request(this.service.$api_push_invoic, { id: item.id }).subscribe(res => { @@ -314,22 +314,22 @@ export class CancellationInvoiceComponent implements OnInit { private initST(): STColumn[] { return [ { title: '', index: 'key', type: 'checkbox', fixed: 'left', width: 50, className: 'text-center' }, - { title: '分票编号', render: 'vatinvcode', width: 160 }, + { title: '分票编号', render: 'vatinvcode', width: 200 }, { title: '申请编号', index: 'vatappHCode', - width: 120, + width: 150, type: 'link', click: item => this.router.navigate(['/ticket/invoice-requested/detail/' + item?.vatappHId]) }, { title: '申请时间', index: 'createTime', type: 'date', width: 150 }, - { title: '网络货运人', index: 'ltdName', width: 120 }, - { title: '购买人', index: 'artoname', width: 90 }, + { title: '网络货运人', index: 'ltdName', width: 160 }, + { title: '购买人', index: 'artoname', width: 160 }, { title: '订单数', index: 'ordlines', width: 90, className: 'text-right' }, { title: '价税合计', index: 'vatmoney', - width: 120, + width: 140, type: 'widget', className: 'text-right font-weight-bold', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatmoney }) } @@ -337,7 +337,7 @@ export class CancellationInvoiceComponent implements OnInit { { title: '金额', index: 'vatnotax', - width: 100, + width: 140, type: 'widget', className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vatnotax }) } @@ -345,27 +345,28 @@ export class CancellationInvoiceComponent implements OnInit { { title: '税率', index: 'billvatrate', - width: 90, + width: 120, className: 'text-right', format: item => `${item.billvatrate ? ((item.billvatrate as number) * 100).toFixed(2) : 0}%` }, { title: '税额', index: 'vattax', - width: 90, + width: 140, type: 'widget', className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.vattax }) } }, - { title: '服务名称', index: 'vatname', width: 100 }, - { title: '销货清单', index: 'isdetail', width: 90, type: 'enum', enum: { 1: '是', 0: '否' }, className: 'text-center' }, + { title: '服务名称', index: 'vatname', width: 120 }, + { title: '销货清单', index: 'isdetail', width: 120, type: 'enum', enum: { 1: '是', 0: '否' }, className: 'text-center' }, { title: '票面备注', index: 'remarks', width: 250 }, { title: '其他要求', index: 'otherremarks', width: 100 }, { title: '操作', - width: '100px', + width: '120px', fixed: 'right', buttons: [ + { type: 'divider' }, { text: '查看明细', click: item => diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.html b/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.html index 86dbbfdd..f4ace5d8 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.html +++ b/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.html @@ -4,42 +4,42 @@ {{info?.artoName}} - {{info?.artotaxno}} + {{info?.taxNumber}} - {{info?.artoadd}} + {{info?.registerAddr}} - {{info?.artotel}} + {{info?.registerPhone}} - {{info?.artobank}} + {{info?.bankName}} - {{info?.artoacc}} + {{info?.bankAccount}} - {{info?.remarks}} + {{info?.vatremarks}}
- {{info?.shipperId}} + {{info?.ltdidName}} - {{info?.vatinvcode}} + {{info?.vatappcode}} - {{info?.ordlines}}笔 + {{info?.vatinvBillNum}}笔 - {{info?.vatmoney}}元 + {{info?.vatinvHNumAmount | currency}}元 - {{info?.vatname}} + {{info?.vatnameLabel}} - {{info?.isdetail}} + {{info?.isdetail?'是':'否'}} {{info?.otherremarks}} diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.ts b/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.ts index 6b164d08..dec8b28f 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.ts +++ b/src/app/routes/ticket-management/components/cancellation-invoice/push-invoice/push-invoice.component.ts @@ -13,7 +13,7 @@ import { TicketService } from '../../../services/ticket.service'; export class PushInvoiceComponent implements OnInit { @ViewChild('st', { static: false }) st!: STComponent; - columns: STColumn[] = this.initST(); + columns!: STColumn[]; info: any = {}; id!: number; @@ -22,6 +22,9 @@ export class PushInvoiceComponent implements OnInit { ngOnInit(): void { this.loadHeader(this.id); + setTimeout(() => { + this.columns = this.initST(); + }, 100); } beforeReq = (requestOptions: STRequestOptions) => { From 635ead98ce516e8a92963928c7da817d967b2b1c Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 28 Feb 2022 19:14:33 +0800 Subject: [PATCH 008/107] edit --- .../cost-management-detail.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html index 73befe16..b2c2a205 100644 --- a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html +++ b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html @@ -44,7 +44,7 @@ {{ costInfo?.feetypeLabel }} - {{ costInfo?.hrmoney}} + {{ costInfo?.hrmoney | currency}} {{ costInfo?.hrremarks }} From 5418e008d69086d732a274bb4cf0d02794d8b3f6 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 28 Feb 2022 19:19:56 +0800 Subject: [PATCH 009/107] edit --- .../components/invoiced-list/invoiced-list.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.html b/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.html index 9f2b0031..a0b80dae 100644 --- a/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.html +++ b/src/app/routes/ticket-management/components/invoiced-list/invoiced-list.component.html @@ -41,7 +41,7 @@
--> - {{ item.no }} From 804f25d2451a4f3582b87cae31f39ec584cc9e9b Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 28 Feb 2022 19:30:17 +0800 Subject: [PATCH 010/107] edit --- .../payment-order-detail/payment-order-detail.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html b/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html index a6a93f4f..fb9486d2 100644 --- a/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html +++ b/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html @@ -37,7 +37,7 @@ {{headerInfo?.payDate}} - {{headerInfo?.hrAccountId}} + {{headerInfo?.hrBankName}} - {{headerInfo?.hrBankCode}} {{headerInfo?.payDate}} From 172ecc6263dee2cf5f97be2258231d7e16e8783f Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Feb 2022 19:31:33 +0800 Subject: [PATCH 011/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract-template-detail.component.ts | 13 -- .../components/list/list.component.ts | 4 +- .../services/insurance-management.service.ts | 4 +- .../onecar-publish.component.html | 161 +++++++++--------- .../onecar-publish.component.less | 4 - .../update-price/update-price.component.ts | 4 + .../components/vehicle/vehicle.component.ts | 5 +- 7 files changed, 98 insertions(+), 97 deletions(-) diff --git a/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts b/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts index e94ae430..cf3bdeca 100644 --- a/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts +++ b/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts @@ -86,19 +86,6 @@ export class ContractManagementTemplateTextComponent implements OnInit { } } as SFSelectWidgetSchema }, - // contractType: { - // title: '单据类型', - // type: 'string', - // default: '', - // ui: { - // widget: 'dict-select', - // params: { dictKey: 'contract:document:type' }, - // containAllLable: true, - // visibleIf: { - // templateType: value => value === 'MX' - // } - // } as SFSelectWidgetSchema - // }, signingObject: { type: 'string', title: '承包商对象', diff --git a/src/app/routes/insurance-management/components/list/list.component.ts b/src/app/routes/insurance-management/components/list/list.component.ts index b163791f..563e1306 100644 --- a/src/app/routes/insurance-management/components/list/list.component.ts +++ b/src/app/routes/insurance-management/components/list/list.component.ts @@ -480,6 +480,7 @@ export class insuranceManagementListComponent implements OnInit { { text: '查看保单', click: _record => this.showImg(_record), + iif: item => item.insureStatus == '2' // acl: { ability: ['VEHICLE-LIST-view'] }, // iif: item => // item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '1' @@ -487,6 +488,7 @@ export class insuranceManagementListComponent implements OnInit { { text: '退保费', click: _record => this.retreatPrice(_record), + iif: item => item.insureStatus == '2' // acl: { ability: ['VEHICLE-LIST-view'] }, } ] @@ -531,7 +533,7 @@ export class insuranceManagementListComponent implements OnInit { nzContent: '退还后不可撤销,请谨慎操作!', nzCancelText: '取消', nzOnOk: () => { - this.service.request(this.service.$api_del_many, [value.id]).subscribe(res => { + this.service.request(this.service.$api_get_addINPBillRefundApplication, {id: value.id}).subscribe(res => { if (res) { this.service.msgSrv.success('删除菜单成功'); } diff --git a/src/app/routes/insurance-management/services/insurance-management.service.ts b/src/app/routes/insurance-management/services/insurance-management.service.ts index deaea9a6..4dece0b2 100644 --- a/src/app/routes/insurance-management/services/insurance-management.service.ts +++ b/src/app/routes/insurance-management/services/insurance-management.service.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 15:31:52 * @LastEditors : Shiming - * @LastEditTime : 2022-02-10 10:40:56 + * @LastEditTime : 2022-02-28 17:11:54 * @FilePath : \\tms-obc-web\\src\\app\\routes\\insurance-management\\services\\insurance-management.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -27,6 +27,8 @@ export class InsuranceManagementService extends ShipperBaseService { // 保险费公司认证 $api_get_submitAuthInfo = `/api/sdc/premiumInfo/submitAuthInfo`; + // 退保费 + $api_get_addINPBillRefundApplication = `/billRefundApplication/addINPBillRefundApplication`; constructor(public injector: Injector, public eaCacheSrv: EACacheService) { super(injector, eaCacheSrv); diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html index 3547171e..5ff910f6 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html @@ -14,10 +14,11 @@
装卸货信息预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时
+
-
+
装货地 @@ -25,78 +26,15 @@ - - - -
- - - - 联系人 -
- - - - - - -
-
-
-
- -
-
-
-
- -
-
-
-
- - 卸货地 - -
- - - - @@ -109,7 +47,75 @@ + + + + +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+ + 卸货地 + +
+ + + + + +
+
+
+ + 联系人 +
+ +
-
- +
+
+
+ +
- 装货时间 + 装货时间
- 卸货时间 + 卸货时间
- + diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.less b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.less index 35b08935..f6d4bb4f 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.less +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.less @@ -50,7 +50,3 @@ input[type='number']::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; } -.hides { - margin-left: 10px; - color: aqua; -} diff --git a/src/app/routes/supply-management/components/update-price/update-price.component.ts b/src/app/routes/supply-management/components/update-price/update-price.component.ts index 41494016..0c41962e 100644 --- a/src/app/routes/supply-management/components/update-price/update-price.component.ts +++ b/src/app/routes/supply-management/components/update-price/update-price.component.ts @@ -79,6 +79,10 @@ export class SupplyManagementUpdatePriceComponent implements OnInit { spanLabelFixed: 100, grid: { span: 16 }, }, + '$rule': { + spanLabelFixed: 120, + grid: { span: 16 }, + }, }; } diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts index 6c978665..2f61905f 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -616,13 +616,14 @@ export class SupplyManagementVehicleComponent implements OnInit { click: _record => this.nextOrder(_record), acl: { ability: ['SUPPLY-INDEX-vehiclePlaceOrder'] } }, - {type: 'divider'}, { text: '重新指派 ', click: _record => this.assignedCar(_record), iif: item => item.resourceStatus === '1' && item.serviceType === '2', acl: { ability: ['SUPPLY-INDEX-vehicleReassign'] } - } + }, + {type: 'divider'}, + ] } ]; From c4ea948c73ca518439266a6f9a0afc7e1c3e6d53 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Feb 2022 19:37:40 +0800 Subject: [PATCH 012/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/bulk-publish/bulk-publish.component.html | 4 ++-- .../bulk-release-publish/bulk-release-publish.component.html | 4 ++-- .../components/onecar-publish/onecar-publish.component.html | 4 ++-- .../components/release-publish/release-publish.component.html | 4 ++-- .../components/tran-agreement/tran-agreement.component.ts | 4 ++-- .../supply-management/services/supply-management.service.ts | 4 +++- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html index fea654b7..752660a8 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html @@ -199,7 +199,7 @@
-
+
-
+
 天内支付运费
diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html index 88cd31bb..bb960c37 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html @@ -217,7 +217,7 @@
-
+
-
+
 天内支付运费
diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html index 5ff910f6..93df1984 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html @@ -327,7 +327,7 @@
-
+
-
+
 天内支付运费
diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.html b/src/app/routes/supply-management/components/release-publish/release-publish.component.html index e8cf8c34..d5e0ee88 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.html +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.html @@ -340,7 +340,7 @@
-
+
-
+
 天内支付运费
diff --git a/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts b/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts index 12018aa6..9d66c432 100644 --- a/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts +++ b/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-06 15:01:40 * @LastEditors : Shiming - * @LastEditTime : 2022-02-24 16:24:32 + * @LastEditTime : 2022-02-28 19:34:38 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -25,7 +25,7 @@ export class TranAgreementComponent { } ngOnInit() { - this.service.request(this.service.$api_getAgreementInfoByType,{type:'6'}).subscribe((res) => { + this.service.request(this.service.$api_getContractContent,{type:'6'}).subscribe((res) => { if (res) { this.agreement = res; } diff --git a/src/app/routes/supply-management/services/supply-management.service.ts b/src/app/routes/supply-management/services/supply-management.service.ts index dfde3bc3..b1238bec 100644 --- a/src/app/routes/supply-management/services/supply-management.service.ts +++ b/src/app/routes/supply-management/services/supply-management.service.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 11:10:14 * @LastEditors : Shiming - * @LastEditTime : 2022-02-28 15:22:19 + * @LastEditTime : 2022-02-28 19:34:22 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\services\\supply-management.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -115,6 +115,8 @@ export class SupplyManagementService extends BaseService { $api_getDictValue = `/api/mdc/pbc/dictItems/getDictValue`; // 获取协议信息 public $api_getAgreementInfoByType = '/api/mdc/pbc/agreementInfo/getAgreementInfoByType'; + // 获取协议信息 + public $api_getContractContent = '/api/sdc/contractTemplate/getContractContent'; // 获取运价 public $api_getFreight = '/api/mdc/cuc/freightConfig/getFreight'; /** From 524610ed8ac1f903b8502f78d8bfbb31437e4fad Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 28 Feb 2022 19:38:27 +0800 Subject: [PATCH 013/107] edit --- .../cost-management-detail.component.html | 3 +++ .../cost-management-detail.component.ts | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html index b2c2a205..2775413f 100644 --- a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html +++ b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html @@ -139,6 +139,9 @@ {{ index + 1 }} + + {{ item.phxmoney | currency}} + diff --git a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts index bc735195..eca4cedf 100644 --- a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts +++ b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts @@ -100,9 +100,9 @@ export class CostManagementDetailComponent implements OnInit { { title: '付款单号', index: 'phxHId' }, { title: '要求日期', index: 'billTime' }, { title: '确认日期', index: 'feedate' }, - { title: '付款状态', index: 'callNo' }, - { title: '应付金额', index: 'callNo' }, - { title: '付款金额', index: 'phxmoney' } + // { title: '付款状态', index: 'callNo' }, + { title: '应付金额', render: 'phxmoney' }, + { title: '付款金额', render: 'phxmoney' } ] }; } From f181229238ed490590640839fbbc4fa733ac0b87 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Feb 2022 19:43:46 +0800 Subject: [PATCH 014/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/bulk-publish/bulk-publish.component.ts | 3 ++- .../bulk-release-publish/bulk-release-publish.component.ts | 3 ++- .../components/release-publish/release-publish.component.ts | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index a2222101..a614b852 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts @@ -523,7 +523,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { } as SFTextareaWidgetSchema } }, - required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress'] + required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress','paymentDays'] }; this.ui7 = { '*': { @@ -655,6 +655,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { this.sf4.validator({ emitError: true }); this.sf7.validator({ emitError: true }); if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf7.valid) { + this.service.msgSrv.warning('请完善必填项!'); return; } diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index 35f68fc2..d870e3df 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -533,7 +533,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { } as SFTextareaWidgetSchema } }, - required: ['stateReceipt', 'paymentDays', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress'] + required: ['stateReceipt', 'paymentDays', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress','paymentDays'] }; this.ui6 = { '*': { @@ -581,6 +581,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { this.sf4.validator({ emitError: true }); this.sf6.validator({ emitError: true }); if (this.ngForm.form.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) { + this.service.msgSrv.warning('请完善必填项!'); return; } diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index 8eeedaa6..2a419693 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -813,6 +813,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { this.sf6.validator({ emitError: true }); this.sf7.validator({ emitError: true }); if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) { + this.service.msgSrv.warning('请完善必填项!'); return; } From 7a6a2454a08d83dfa3be94afd1c9c19b38ddbb6e Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Feb 2022 19:48:06 +0800 Subject: [PATCH 015/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/bulk-detail/bulk-detail.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts index 01e93833..b6d7fd88 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-06 20:20:26 * @LastEditors : Shiming - * @LastEditTime : 2022-02-22 10:16:11 + * @LastEditTime : 2022-02-28 19:47:14 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -36,7 +36,7 @@ export class OrderManagementBulkeDetailComponent implements OnInit { { title: '款项', index: 'expenseName' }, { title: '运输费(元)', render: 'price' }, { title: '附加费(元)', render: 'surcharge' }, - { title: '支付时间', index: ' paymentTime' }, + { title: '支付时间', index: 'paymentTime' }, { title: '支付状态', className: 'text-center', From 389c5cd7cfb1dc48b082cadd8764a3955d39a93e Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 28 Feb 2022 20:02:04 +0800 Subject: [PATCH 016/107] edit --- .../components/refund-record/refund-record.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/routes/financial-management/components/refund-record/refund-record.component.ts b/src/app/routes/financial-management/components/refund-record/refund-record.component.ts index 93ea2547..667de869 100644 --- a/src/app/routes/financial-management/components/refund-record/refund-record.component.ts +++ b/src/app/routes/financial-management/components/refund-record/refund-record.component.ts @@ -33,9 +33,9 @@ export class RefundRecordComponent implements OnInit { if (this.sf) { Object.assign(requestOptions.body, { ...this.sf.value, - createTime: { - start: this.sf.value.createTime?.[0] || '', - end: this.sf.value.createTime?.[1] || '' + refundExecuteTime: { + start: this.sf.value.refundExecuteTime?.[0] || '', + end: this.sf.value.refundExecuteTime?.[1] || '' } }); } @@ -251,7 +251,7 @@ export class RefundRecordComponent implements OnInit { return [ { title: '退款单号', render: 'orderRefundCode', width: 190 }, { title: '退款类型', index: 'refundTypeLabel', width: 130 }, - { title: '退款金额', render: 'refundAmount', className: 'text-right', width: 160 }, + { title: '退款金额', render: 'refundAmount', className: 'text-right', width: 180 }, { title: '退款时间', index: 'applyTime', width: 170 }, { title: '货主', index: 'shipperId', width: 150 }, { title: '所属项目', index: 'enterpriseProjectName', width: 140 }, From b22ef9805669d4df8616cdb94cd931fd9dc79b98 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Feb 2022 20:03:30 +0800 Subject: [PATCH 017/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract-frame.component.ts | 6 ++-- .../contract-template.component.ts | 6 ++-- .../components/bulk/bulk.component.ts | 2 +- .../qrcode-page/qrcode-page.component.html | 29 ++++++++++--------- .../qrcode-page/qrcode-page.component.spec.ts | 10 +++++++ .../qrcode-page/qrcode-page.component.ts | 26 ++++++++++------- .../tran-agreement.component.ts | 11 +++++-- 7 files changed, 58 insertions(+), 32 deletions(-) diff --git a/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts b/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts index 626112ec..86bee964 100644 --- a/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts +++ b/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts @@ -78,19 +78,19 @@ export class ContractManagementFrameComponent implements OnInit { title: '签约对象', width: '100px', className: 'text-center', - index: 'signingObject' + index: 'signingObjectLabel' }, { title: '合同类型', width: '100px', className: 'text-center', - index: 'contractType' + index: 'contractTypeLabel' }, { title: '合同名称', width: '100px', className: 'text-center', - index: 'contractName' + index: 'templateName' }, { title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' }, { title: '合同对象', index: 'contractObjectName', width: '120px', className: 'text-center' }, diff --git a/src/app/routes/contract-management/components/contract-template/contract-template.component.ts b/src/app/routes/contract-management/components/contract-template/contract-template.component.ts index 751e3787..e9649bd1 100644 --- a/src/app/routes/contract-management/components/contract-template/contract-template.component.ts +++ b/src/app/routes/contract-management/components/contract-template/contract-template.component.ts @@ -131,19 +131,19 @@ export class ContractManagementTemplateDetailComponent implements OnInit { title: '签约对象', width: '100px', className: 'text-center', - index: 'signingObject' + index: 'signingObjectLabel' }, { title: '合同类型', width: '100px', className: 'text-center', - index: 'contractType' + index: 'contractTypeLabel' }, { title: '货源类型', width: '100px', className: 'text-center', - index: 'resourceType' + index: 'resourceTypeLabel' }, { title: '创建人', index: 'createUserId', width: '120px', className: 'text-center' }, { diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.ts b/src/app/routes/supply-management/components/bulk/bulk.component.ts index a406f526..a7360ee6 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -406,7 +406,7 @@ export class SupplyManagementBulkComponent implements OnInit { assignedQrcode(item: any) { const modalRef = this.modal.create({ nzTitle: '二维码', - nzWidth: '600px', + nzWidth: '468px', nzContent: SupplyManagementQrcodePageComponent, nzComponentParams: { i: item, diff --git a/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.html b/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.html index 99ab2bbe..8515e77e 100644 --- a/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.html +++ b/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.html @@ -4,22 +4,25 @@ * @Author : Shiming * @Date : 2021-12-03 11:10:14 * @LastEditors : Shiming - * @LastEditTime : 2022-01-18 17:28:37 + * @LastEditTime : 2022-02-28 20:00:13 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\qrcode-page\\qrcode-page.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> - -
-
-

公司名称 : {{ i?.enterpriseInfoName }}

- -
卸货地 : {{ address }}
-
装货地 : {{ address }}
-
截止时间 : {{ i?.deadlineTime }}
-
Tips : 二维码用于司机扫码抢单
+
+ +
+
+ +

{{i?.enterpriseInfoName}}

+ +
卸货地 : {{address}}
+
装货地 : {{address}}
+
截止时间 : {{i?.deadlineTime}}
+
+ +
+
- diff --git a/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.spec.ts b/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.spec.ts index 3896c10c..fc268d02 100644 --- a/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.spec.ts +++ b/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.spec.ts @@ -1,3 +1,13 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2021-12-03 11:10:14 + * @LastEditors : Shiming + * @LastEditTime : 2022-02-28 20:00:20 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\qrcode-page\\qrcode-page.component.spec.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { SupplyManagementQrcodePageComponent } from './qrcode-page.component'; diff --git a/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.ts b/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.ts index a9567d27..275b522b 100644 --- a/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.ts +++ b/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 11:10:14 * @LastEditors : Shiming - * @LastEditTime : 2022-01-18 17:28:46 + * @LastEditTime : 2022-02-28 20:00:06 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\qrcode-page\\qrcode-page.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -23,39 +23,44 @@ export class SupplyManagementQrcodePageComponent implements OnInit { record: any = {}; i: any; schema: SFSchema = {}; + qrCodeValue = ''; ui: SFUISchema = { '*': { spanLabelFixed: 100, - grid: { span: 12 } + grid: { span: 12 }, }, $no: { widget: 'text' }, $href: { - widget: 'string' + widget: 'string', }, $description: { widget: 'textarea', - grid: { span: 24 } - } + grid: { span: 24 }, + }, }; - constructor(private modal: NzModalRef) {} + constructor( + private modal: NzModalRef, + ) { } ngOnInit(): void { - console.log(this.i); + this.qrCodeValue = `rid:${this.i?.id}`; } + downLoadQrcode(downloadName: any): void { let aLink = document.createElement('a'); const content = this.qr.dataURL; let blob = this.base64ToBlob(content); //new Blob([content]); - let evt = document.createEvent('HTMLEvents'); - evt.initEvent('click', true, true); //initEvent 不加后两个参数在IE下会报错 事件类型,是否冒泡,是否阻止浏览器的默认行为 + let evt = document.createEvent("HTMLEvents"); + evt.initEvent("click", true, true);//initEvent 不加后两个参数在IE下会报错 事件类型,是否冒泡,是否阻止浏览器的默认行为 aLink.download = downloadName; aLink.href = URL.createObjectURL(blob); // aLink.dispatchEvent(evt); - aLink.click(); + aLink.click() + } //base64转blob @@ -74,4 +79,5 @@ export class SupplyManagementQrcodePageComponent implements OnInit { close(): void { this.modal.destroy(); } + } diff --git a/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts b/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts index 9d66c432..f3e75308 100644 --- a/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts +++ b/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-06 15:01:40 * @LastEditors : Shiming - * @LastEditTime : 2022-02-28 19:34:38 + * @LastEditTime : 2022-02-28 19:58:01 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -25,7 +25,14 @@ export class TranAgreementComponent { } ngOnInit() { - this.service.request(this.service.$api_getContractContent,{type:'6'}).subscribe((res) => { + const params = { + contractType:'1', + enterpriseInfoId: '', + parametersDTO: {} + } + + + this.service.request(this.service.$api_getContractContent,params).subscribe((res) => { if (res) { this.agreement = res; } From 57d567a8f5d8e9d3d34775013ee75eae87936ae5 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Feb 2022 20:23:19 +0800 Subject: [PATCH 018/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract-template-detail.component.ts | 84 ++++++++++++++----- 1 file changed, 62 insertions(+), 22 deletions(-) diff --git a/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts b/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts index cf3bdeca..f74c02e8 100644 --- a/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts +++ b/src/app/routes/contract-management/components/contract-template-detail/contract-template-detail.component.ts @@ -1,10 +1,11 @@ +import { OnChanges } from '@angular/core'; /* - * @Description : + * @Description : * @Version : 1.0 * @Author : Shiming * @Date : 2022-01-05 11:01:55 * @LastEditors : Shiming - * @LastEditTime : 2022-02-24 20:06:26 + * @LastEditTime : 2022-02-28 20:22:46 * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-template-detail\\contract-template-detail.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -29,7 +30,7 @@ export class ContractManagementTemplateTextComponent implements OnInit { public route: ActivatedRoute, private datePipe: DatePipe, private router: Router, - public shipperservice: ShipperBaseService, + public shipperservice: ShipperBaseService ) {} textStatus = '新建模板'; @ViewChild('sf', { static: false }) sf!: SFComponent; @@ -40,6 +41,7 @@ export class ContractManagementTemplateTextComponent implements OnInit { sfdata: any; sfdata2: any; title: any; + Types: any; templateHTML: any; detailList: any = { templateName: '' @@ -76,17 +78,57 @@ export class ContractManagementTemplateTextComponent implements OnInit { templateType: { title: '模板类型', type: 'string', - default: '', + enum: [ + { label: '框架合同', value: 'KJ' }, + { label: '明细合同', value: 'MX' }, + { label: '合伙人合同', value: 'HHR' } + ], ui: { - widget: 'dict-select', - params: { dictKey: 'contract:template:type' }, - containAllLable: true, - visibleIf: { - _$expand: (value: boolean) => value + widget: 'select', + placeholder: '请选择', + change: (tag: any, org: any) => { + console.log(tag); + switch (tag) { + case 'MX': + this.Types = [ + { label: '订单合同', value: '1' }, + { label: '订单补充协议', value: '2' }, + { label: '运单合同', value: '3' }, + { label: '运单补充协议', value: '4' }, + { label: '委托代收合同', value: '5' } + ]; + this.sf.getProperty('/contractType')!.schema.enum = this.Types; + this.sf.getProperty('/contractType')!.widget.reset(this.Types); + this.sf.setValue('/contractType', this.Types); + return; + break; + case 'KJ': + this.Types = [ + { label: '网络货物运输服务合同', value: '6' }, + { label: '运输服务承揽合同', value: '7' } + ]; + this.sf.getProperty('/contractType')!.schema.enum = this.Types; + this.sf.getProperty('/contractType')!.widget.reset(this.Types); + this.sf.setValue('/contractType', this.Types); + return; + break; + case 'HHR': + this.Types = [ + { label: '企业合伙人入驻合同', value: '8' }, + { label: '个人合伙人入驻合同', value: '9' } + ]; + this.sf.getProperty('/contractType')!.schema.enum = this.Types; + this.sf.getProperty('/contractType')!.widget.reset(this.Types); + this.sf.setValue('/contractType', this.Types); + return; + break; + default: + break; + } } - } as SFSelectWidgetSchema + } }, - signingObject: { + signingObject: { type: 'string', title: '承包商对象', enum: [ @@ -101,13 +143,11 @@ export class ContractManagementTemplateTextComponent implements OnInit { contractType: { title: '合同类型', type: 'string', - default: '', + enum: this.Types, ui: { - widget: 'dict-select', - containsAllLable: true, - params: { dictKey: 'contract:type' }, - containAllLable: true, - } as SFSelectWidgetSchema + widget: 'select', + placeholder: '请选择' + } }, resourceType: { title: '货源类型', @@ -120,7 +160,7 @@ export class ContractManagementTemplateTextComponent implements OnInit { visibleIf: { templateType: value => value === 'MX' } - } as SFSelectWidgetSchema, + } as SFSelectWidgetSchema }, enterpriseInfoId: { type: 'string', @@ -134,7 +174,7 @@ export class ContractManagementTemplateTextComponent implements OnInit { }, asyncData: () => this.shipperservice.getNetworkFreightForwarder() } - }, + } }, required: ['templateName', 'templateType'] }; @@ -165,11 +205,11 @@ export class ContractManagementTemplateTextComponent implements OnInit { } initData(url: string) { console.log('编辑'); - + this.service.request(url, { id: this.route.snapshot.params.id }).subscribe(res => { if (res) { this.detailList = res; - this.title = this.detailList?.templateName + this.title = this.detailList?.templateName; this.sfdata = res; this.sfdata2 = res; } @@ -195,7 +235,7 @@ export class ContractManagementTemplateTextComponent implements OnInit { ...this.sf2.value, templateTitle: this.title || this.detailList.templateName }; - console.log(params) + console.log(params); this.service.request(this.service.$api_save_contractTemplate, params).subscribe((res: any) => { if (res) { this.service.msgSrv.success('保存成功!'); From 28f4c8077c3805011895f7ce6734afc27af6bb06 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Feb 2022 20:34:01 +0800 Subject: [PATCH 019/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onecar-publish.component.ts | 31 ++++++++++--------- .../tran-agreement.component.ts | 16 ++++++++-- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index edebb36b..8587663e 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -927,20 +927,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } // 提交前协议弹窗 agreementConfirm(submitType?: string) { - const modalRef = this.modalService.create({ - nzTitle: '运输协议', - nzContent: TranAgreementComponent, - nzWidth: 900, - nzFooter: null - }); - modalRef.afterClose.subscribe(result => { - if (result) { - this.submit(submitType); - } - }); - } - // 提交 - submit(submitType?: string): void { //装卸货信息 const LoadingList = this.startInfo.concat(this.endInfo); @@ -995,6 +981,23 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { expenseDTOList: expenseList, paymentDays: this.sf7.value.paymentDays }; + + const modalRef = this.modalService.create({ + nzTitle: '运输协议', + nzContent: TranAgreementComponent, + nzWidth: 900, + nzFooter: null, + nzComponentParams: {Object: params,} + }); + modalRef.afterClose.subscribe(result => { + if (result) { + this.submit(submitType, params); + } + }); + } + // 提交 + submit(submitType?: string,params?: any): void { + // const params: any = { // ...this.sf1.value, // ...this.sf5.value, diff --git a/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts b/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts index f3e75308..8cb5db21 100644 --- a/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts +++ b/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-06 15:01:40 * @LastEditors : Shiming - * @LastEditTime : 2022-02-28 19:58:01 + * @LastEditTime : 2022-02-28 20:33:56 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -18,17 +18,27 @@ import { SupplyManagementService } from '../../services/supply-management.servic styleUrls: ['./tran-agreement.component.less'] }) export class TranAgreementComponent { - + Object: any; agreement:any; constructor(private modal: NzModalRef,public service: SupplyManagementService,) { } ngOnInit() { + console.log(Object) const params = { contractType:'1', enterpriseInfoId: '', - parametersDTO: {} + parametersDTO: { + // 回单付 + back: '', + // 发货地址 + consignorAddress: '', + // 发货时间 + consignorDate: '', + // 发货时间 + // consignorDate: '', + } } From 2c42d31ea5acb5f5db944a0eeddaaba06c3629d5 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 28 Feb 2022 20:36:57 +0800 Subject: [PATCH 020/107] edit --- .../freight/list/detail/detail.component.html | 6 +-- .../freight/list/detail/detail.component.ts | 42 +++++++++++++++---- .../usercenter/services/usercenter.service.ts | 2 + 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html index 230e4280..7852b908 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html @@ -44,17 +44,17 @@ - - - diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts b/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts index 8021cde5..b36f6b4a 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts @@ -1,5 +1,5 @@ import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { apiConf } from '@conf/api.conf'; import { DatePipe, _HttpClient } from '@delon/theme'; import { NzModalService } from 'ng-zorro-antd/modal'; @@ -48,6 +48,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { public service: UsermanageService, private route: ActivatedRoute, private nzModalService: NzModalService, + private router: Router, private datePipe: DatePipe ) {} ngOnDestroy(): void { @@ -55,9 +56,11 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { } ngOnInit() { - this.initData(); - this.loadltdId(); - this.loadRoles(); + this.route.params.subscribe(({ params }) => { + this.initData(); + this.loadltdId(); + this.loadRoles(); + }); this.subscribeScoll = fromEvent(window, 'scroll').subscribe(event => { this.scrollTop = document.documentElement.scrollTop; }); @@ -157,7 +160,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { }); } - auditPass() { + auditPass(isSave: boolean) { this.networkTransporter = null; this.roleId = null; this.nzModalService.create({ @@ -167,7 +170,15 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { if (!this.networkTransporter || !this.roleId) { return false; } - this.auditEnterprise(20); + if (isSave) { + this.save({ + passSave: true, + roleId: this.roleId, + networkTransporter: this.networkTransporter + }); + } else { + this.auditEnterprise(20); + } return; } }); @@ -200,8 +211,8 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { .subscribe(res => { if (res) { this.service.msgSrv.success(status === 20 ? '审核通过' : '驳回成功'); + this.refreshData(status); } - this.initData(); }); } @@ -263,7 +274,7 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { this.isEdit = false; } - save() { + save(data: any) { const dateil = { ...this.detailData }; Object.assign(dateil.legalPersonIdentityVO, { validStartTime: this.datePipe.transform(dateil.legalPersonIdentityVO.validStartTime, 'yyyy-MM-dd'), @@ -300,15 +311,28 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { taxAuthority: dateil.taxAuthority, unifiedSocialCreditCode: dateil.unifiedSocialCreditCode }); + Object.assign(params, { ...data }); this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => { if (res) { this.service.msgSrv.success('企业修改成功'); - this.initData(); + this.refreshData(data.passSave ? 20 : 10); this.isEdit = false; } }); } + private refreshData(status: number) { + if (status === 20) { + this.service.request(this.service.$api_get_next_audit_freight, { id: this.route.snapshot.params.id }).subscribe(res => { + if (res?.id) { + this.router.navigate(['/usercenter/freight/enterprise/detail/' + res.id]); + } + }); + } else { + this.initData(); + } + } + // 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证 checkIdCard(imgurl: any, isFront: string, type: number) { const params = { diff --git a/src/app/routes/usercenter/services/usercenter.service.ts b/src/app/routes/usercenter/services/usercenter.service.ts index 10477a2e..dacab70f 100644 --- a/src/app/routes/usercenter/services/usercenter.service.ts +++ b/src/app/routes/usercenter/services/usercenter.service.ts @@ -34,6 +34,8 @@ export class UsermanageService extends ShipperBaseService { $api_lock_freight = '/api/mdc/cuc/enterpriseInfo/operate/lock'; // 企业审核 $api_audit_freight = '/api/mdc/cuc/enterpriseInfo/operate/audit'; + // 查询下一个待审核的企业ID + $api_get_next_audit_freight = '/api/mdc/cuc/enterpriseInfo/operate/getNextWaitAuditId'; // 查询货主配置列表 $api_freight_config_page = '/api/mdc/cuc/enterpriseInfo/operate/list/configPage'; From 8b03d58fa283da8b25316bf14da4d53db9920d62 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Feb 2022 20:40:54 +0800 Subject: [PATCH 021/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contract-template-frame.component.ts | 6 +++--- .../contract-template-partner.component.ts | 6 +++--- .../tran-agreement/tran-agreement.component.ts | 17 ++++++++++------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.ts b/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.ts index 9ab02d99..002c28e1 100644 --- a/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.ts +++ b/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.ts @@ -131,19 +131,19 @@ export class ContractManagementTemplateFrameComponent implements OnInit { title: '签约对象', width: '100px', className: 'text-center', - render: 'signingObject' + render: 'signingObjectLabel' }, { title: '合同类型', width: '100px', className: 'text-center', - index: 'contractType' + index: 'contractTypeLabel' }, { title: '货源类型', width: '100px', className: 'text-center', - index: 'resourceType' + index: 'resourceTypeLabel' }, { title: '创建人', index: 'createUserId', width: '120px', className: 'text-center' }, { diff --git a/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.ts b/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.ts index d457c780..257a5832 100644 --- a/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.ts +++ b/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.ts @@ -131,19 +131,19 @@ export class ContractManagementTemplatePartnerComponent implements OnInit { title: '签约对象', width: '100px', className: 'text-center', - index: 'signingObject' + index: 'signingObjectLabel' }, { title: '合同类型', width: '100px', className: 'text-center', - index: 'contractType' + index: 'contractTypeLabel' }, { title: '货源类型', width: '100px', className: 'text-center', - index: 'resourceType' + index: 'resourceTypeLabel' }, { title: '创建人', index: 'createUserId', width: '120px', className: 'text-center' }, { diff --git a/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts b/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts index 8cb5db21..52574266 100644 --- a/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts +++ b/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-06 15:01:40 * @LastEditors : Shiming - * @LastEditTime : 2022-02-28 20:33:56 + * @LastEditTime : 2022-02-28 20:40:35 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -28,19 +28,22 @@ export class TranAgreementComponent { console.log(Object) const params = { contractType:'1', - enterpriseInfoId: '', parametersDTO: { // 回单付 - back: '', + back: 'dsfgffdsg', // 发货地址 - consignorAddress: '', + consignorAddress: 'gfdgdfdg', // 发货时间 - consignorDate: '', + consignorDate: 'dsggdsgsfgds', // 发货时间 // consignorDate: '', - } + + }, + resourceType: '1', + signingObject: '1', + templateType: 'MX', } - + console.log(params) this.service.request(this.service.$api_getContractContent,params).subscribe((res) => { if (res) { From 4af2374189357c46a86b9104770586c25457c0cc Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 28 Feb 2022 20:43:59 +0800 Subject: [PATCH 022/107] edit --- .../components/refund-record/refund-record.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/financial-management/components/refund-record/refund-record.component.ts b/src/app/routes/financial-management/components/refund-record/refund-record.component.ts index 667de869..787616cf 100644 --- a/src/app/routes/financial-management/components/refund-record/refund-record.component.ts +++ b/src/app/routes/financial-management/components/refund-record/refund-record.component.ts @@ -250,9 +250,9 @@ export class RefundRecordComponent implements OnInit { private initST(): STColumn[] { return [ { title: '退款单号', render: 'orderRefundCode', width: 190 }, - { title: '退款类型', index: 'refundTypeLabel', width: 130 }, + { title: '退款类型', index: 'refundTypeLabel', width: 140 }, { title: '退款金额', render: 'refundAmount', className: 'text-right', width: 180 }, - { title: '退款时间', index: 'applyTime', width: 170 }, + { title: '退款时间', index: 'refundExecuteTime', width: 170 }, { title: '货主', index: 'shipperId', width: 150 }, { title: '所属项目', index: 'enterpriseProjectName', width: 140 }, { title: '支付单', render: 'billRefundPaymentVOS', width: 150 }, From 84d7cf5658c6386578ad3330f9228b71412eb5a5 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 28 Feb 2022 20:45:33 +0800 Subject: [PATCH 023/107] edit --- .../cancellation-invoice/cancellation-invoice.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts index b2c8021c..d5ff6af0 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts +++ b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts @@ -115,7 +115,7 @@ export class CancellationInvoiceComponent implements OnInit { */ batchPush() { if (this.selectedRows?.length <= 0) { - this.service.msgSrv.warning('请选择开票申请'); + this.service.msgSrv.warning('请选择推送开票单'); return; } if (this.selectedRows.find(item => item.sts !== '1')) { From 1253266e23c6b081942e2ddc5ceae48a05827794 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 28 Feb 2022 20:49:20 +0800 Subject: [PATCH 024/107] edit --- .../invoice-requested-detail.component.html | 2 +- .../invoice-requested-detail.component.ts | 2 ++ .../components/invoice-requested/invoice-requested.component.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html index 82501843..554c312b 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html @@ -87,7 +87,7 @@ -
+
diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts index 52a829cf..5939afd6 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts @@ -26,6 +26,7 @@ export class InvoiceRequestedDetailComponent implements OnInit { _$expand = false; id = null; + sts = null; headerInfo: any = {}; constructor( public service: TicketService, @@ -34,6 +35,7 @@ export class InvoiceRequestedDetailComponent implements OnInit { private router: Router ) { this.id = route.snapshot.params.id; + this.sts = route.snapshot.queryParams.sts; this.loadHeadInfo(); } diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts index fbe7accb..75e880d8 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts @@ -420,7 +420,7 @@ export class InvoiceRequestedComponent implements OnInit { // }, { text: '订单明细
', - click: item => this.router.navigate(['/ticket/invoice-requested/detail/' + item?.id]) + click: item => this.router.navigate(['/ticket/invoice-requested/detail/' + item?.id], { queryParams: { sts: item.sts } }) }, { text: '查看原因
', From 3088476b6760827c9e3aee142c6aebe351f84c8c Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 28 Feb 2022 20:57:17 +0800 Subject: [PATCH 025/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tran-agreement/tran-agreement.component.html | 2 +- .../tran-agreement/tran-agreement.component.ts | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.html b/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.html index 156e8383..025765ab 100644 --- a/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.html +++ b/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.html @@ -1,5 +1,5 @@

- {{ agreement?.agreementName }} +

diff --git a/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts b/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts index 52574266..05977ab4 100644 --- a/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts +++ b/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts @@ -1,10 +1,20 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-02-24 20:19:51 + * @LastEditors : Shiming + * @LastEditTime : 2022-02-28 20:55:59 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ /* * @Description : * @Version : 1.0 * @Author : Shiming * @Date : 2022-01-06 15:01:40 * @LastEditors : Shiming - * @LastEditTime : 2022-02-28 20:40:35 + * @LastEditTime : 2022-02-28 20:55:07 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -47,7 +57,8 @@ export class TranAgreementComponent { this.service.request(this.service.$api_getContractContent,params).subscribe((res) => { if (res) { - this.agreement = res; + + this.agreement = res.contractContent; } }); } From b03ed166ed36db1cb9c6fc90c85fb2cd5169c2b0 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Mon, 28 Feb 2022 20:59:10 +0800 Subject: [PATCH 026/107] edit --- .../freight/freight-config/freight-config.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts index bc94a1e2..62f6e819 100644 --- a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts +++ b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts @@ -158,6 +158,8 @@ export class FreightConfigComponent implements OnInit { modal.destroy(); } else { this.service.msgSrv.error(`企业${res?.join(',')}修改失败`); + modal.destroy(); + this.st.load(); } }); return false; From f31b8a0d12218b13195f6c752668de8be8e9baa0 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 1 Mar 2022 09:00:00 +0800 Subject: [PATCH 027/107] edit --- .../components/freight/list/detail/detail.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts b/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts index b36f6b4a..de63985a 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.ts @@ -326,6 +326,8 @@ export class FreightComponentsListDetailComponent implements OnInit, OnDestroy { this.service.request(this.service.$api_get_next_audit_freight, { id: this.route.snapshot.params.id }).subscribe(res => { if (res?.id) { this.router.navigate(['/usercenter/freight/enterprise/detail/' + res.id]); + } else { + this.initData(); } }); } else { From b405f2403e07222922c54704ecfca06b1b272c81 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 1 Mar 2022 10:51:46 +0800 Subject: [PATCH 028/107] edit --- .../components/refund-record/refund-record.component.html | 4 ++-- .../components/refund-record/refund-record.component.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/routes/financial-management/components/refund-record/refund-record.component.html b/src/app/routes/financial-management/components/refund-record/refund-record.component.html index 975f2433..a611a196 100644 --- a/src/app/routes/financial-management/components/refund-record/refund-record.component.html +++ b/src/app/routes/financial-management/components/refund-record/refund-record.component.html @@ -25,8 +25,8 @@ - - + + diff --git a/src/app/routes/financial-management/components/refund-record/refund-record.component.ts b/src/app/routes/financial-management/components/refund-record/refund-record.component.ts index 787616cf..c2a8a6de 100644 --- a/src/app/routes/financial-management/components/refund-record/refund-record.component.ts +++ b/src/app/routes/financial-management/components/refund-record/refund-record.component.ts @@ -253,7 +253,7 @@ export class RefundRecordComponent implements OnInit { { title: '退款类型', index: 'refundTypeLabel', width: 140 }, { title: '退款金额', render: 'refundAmount', className: 'text-right', width: 180 }, { title: '退款时间', index: 'refundExecuteTime', width: 170 }, - { title: '货主', index: 'shipperId', width: 150 }, + { title: '企业名称', index: 'shipperId', width: 150 }, { title: '所属项目', index: 'enterpriseProjectName', width: 140 }, { title: '支付单', render: 'billRefundPaymentVOS', width: 150 }, { title: '订单号', index: 'billCode', width: 150 }, From bbd4daa4f6b137084cef169f88623a93f7c2ef4f Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 1 Mar 2022 13:27:56 +0800 Subject: [PATCH 029/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/bulk/bulk.component.html | 16 +++---- .../components/bulk/bulk.component.ts | 45 ++++++++++++------- .../components/vehicle/vehicle.component.html | 10 ++--- .../components/vehicle/vehicle.component.ts | 30 ++++++++++++- .../components/bulk/bulk.component.html | 6 +-- .../components/vehicle/vehicle.component.html | 6 +-- 6 files changed, 78 insertions(+), 35 deletions(-) diff --git a/src/app/routes/order-management/components/bulk/bulk.component.html b/src/app/routes/order-management/components/bulk/bulk.component.html index 74101efc..32cbd517 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.html +++ b/src/app/routes/order-management/components/bulk/bulk.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-02-28 13:59:36 + * @LastEditTime : 2022-03-01 13:26:59 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk\\bulk.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -32,11 +32,11 @@
- - - + +
- - - + + +
- - + + - - + +
@@ -141,6 +142,7 @@ formControlName="unloadAddress{{ idx }}" placeholder="请输入卸货地" name="unloadAddress{{ idx }}" + readonly="true" />
From c20220da1d1b63586ebd0a280ba22bbfbd679aef Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 1 Mar 2022 13:44:01 +0800 Subject: [PATCH 033/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/bulk-publish/bulk-publish.component.html | 2 ++ .../bulk-release-publish/bulk-release-publish.component.html | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html index 752660a8..20668692 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html @@ -30,6 +30,7 @@ (click)="openMap('start', idx)" formControlName="loadAddress{{ idx }}" placeholder="请输入装货地" + readonly="true" />
@@ -80,6 +81,7 @@ (click)="openMap('end', idx)" formControlName="unloadAddress{{ idx }}" placeholder="请输入卸货地" + readonly="true" />
diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html index bb960c37..167c671c 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html @@ -37,6 +37,7 @@ name="startDetailedAddress{{ idx }}" placeholder="请输入装货地" required + readonly="true" />
@@ -90,6 +91,7 @@ name="endDetailedAddress{{ idx }}" placeholder="请输入卸货地" required + readonly="true" />
From c56013d9ea1038fb70c64538f901e47a5a7ec80e Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 1 Mar 2022 13:59:37 +0800 Subject: [PATCH 034/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onecar-publish/onecar-publish.component.ts | 12 +++++++----- .../release-publish/release-publish.component.ts | 11 +++++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index 589f790e..7328931c 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -147,10 +147,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { searchDebounceTime: 300, searchLoadingText: '搜索中...', onSearch: (q: any) => { - console.log(q) - if (q) { + console.log(q === ' ') + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q }) + .request(this.service.$api_enterpriceList, { enterpriseName: str }) .pipe(map(res => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { @@ -158,8 +159,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } }, change: (q: any) => { - if (q) { - this.getRegionCode(q); + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { + this.getRegionCode(str); } } } as SFSelectWidgetSchema diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index a1daafb0..cbc6cbf5 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -135,9 +135,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit { searchDebounceTime: 300, searchLoadingText: '搜索中...', onSearch: (q: any) => { - if (q) { + console.log(q === ' ') + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q }) + .request(this.service.$api_enterpriceList, { enterpriseName: str }) .pipe(map(res => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { @@ -145,8 +147,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } }, change: (q: any) => { - if (q) { - this.getRegionCode(q); + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { + this.getRegionCode(str); } }, } as SFSelectWidgetSchema From b9f582e383699287563bea21552fc651cc9c8575 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 1 Mar 2022 14:00:53 +0800 Subject: [PATCH 035/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/bulk-publish/bulk-publish.component.ts | 10 +++++++--- .../bulk-release-publish.component.ts | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index a614b852..d3744948 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts @@ -110,9 +110,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit { searchDebounceTime: 300, searchLoadingText: '搜索中...', onSearch: (q: any) => { - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q }) + .request(this.service.$api_enterpriceList, { enterpriseName: str }) .pipe(map(res => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { @@ -120,7 +121,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit { } }, change: (q: any) => { - this.getRegionCode(q); + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { + this.getRegionCode(str); + } }, } as SFSelectWidgetSchema }, diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index d870e3df..119aa208 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -121,9 +121,10 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { searchLoadingText: '搜索中...', allowClear: true, onSearch: (q: any) => { - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q }) + .request(this.service.$api_enterpriceList, { enterpriseName: str }) .pipe(map((res: any[]) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { @@ -131,7 +132,10 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { } }, change: (q: any) => { - this.getRegionCode(q); + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { + this.getRegionCode(str); + } } } as SFSelectWidgetSchema }, From adbe2a402f20df6b0c71a208c62aa459f5e5718e Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 1 Mar 2022 14:04:28 +0800 Subject: [PATCH 036/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cost-management/cost-management.component.ts | 10 ++++++---- .../components/list/list.component.ts | 5 +++-- .../order-management/components/bulk/bulk.component.ts | 5 +++-- .../compliance-audit/compliance-audit.component.ts | 5 +++-- .../receipts-audit/receipts-audit.component.ts | 5 +++-- .../components/vehicle/vehicle.component.ts | 5 +++-- .../components/bulk/bulk.component.ts | 6 +++--- .../components/vehicle/vehicle.component.ts | 6 +++--- .../close-account/close-account.component.ts | 6 +++--- .../abnormal-appear/abnormal-appear.component.ts | 6 +++--- .../components/bulk/bulk.component.ts | 5 +++-- .../components/vehicle/vehicle.component.ts | 6 +++--- 12 files changed, 39 insertions(+), 31 deletions(-) diff --git a/src/app/routes/financial-management/components/cost-management/cost-management.component.ts b/src/app/routes/financial-management/components/cost-management/cost-management.component.ts index 541d0dbe..66686124 100644 --- a/src/app/routes/financial-management/components/cost-management/cost-management.component.ts +++ b/src/app/routes/financial-management/components/cost-management/cost-management.component.ts @@ -188,9 +188,10 @@ export class CostManagementComponent implements OnInit { searchLoadingText: '搜索中...', allowClear: true, onSearch: (q: any) => { - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q }) + .request(this.service.$api_enterpriceList, { enterpriseName: str }) .pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { @@ -212,9 +213,10 @@ export class CostManagementComponent implements OnInit { searchLoadingText: '搜索中...', allowClear: true, onSearch: (q: any) => { - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q }) + .request(this.service.$api_enterpriceList, { enterpriseName: str}) .pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { diff --git a/src/app/routes/insurance-management/components/list/list.component.ts b/src/app/routes/insurance-management/components/list/list.component.ts index 563e1306..4cecaf0d 100644 --- a/src/app/routes/insurance-management/components/list/list.component.ts +++ b/src/app/routes/insurance-management/components/list/list.component.ts @@ -213,9 +213,10 @@ export class insuranceManagementListComponent implements OnInit { _$expand: (value: boolean) => value }, onSearch: (q: any) => { - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q }) + .request(this.service.$api_enterpriceList, { enterpriseName: str }) .pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { diff --git a/src/app/routes/order-management/components/bulk/bulk.component.ts b/src/app/routes/order-management/components/bulk/bulk.component.ts index f2ed3ef0..a28a46fd 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -197,9 +197,10 @@ export class OrderManagementBulkComponent implements OnInit { searchLoadingText: '搜索中...', allowClear: true, onSearch: (q: any) => { - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q }) + .request(this.service.$api_enterpriceList, { enterpriseName: str }) .pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { diff --git a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts index d6e0fa51..b896fed5 100644 --- a/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts +++ b/src/app/routes/order-management/components/compliance-audit/compliance-audit.component.ts @@ -156,9 +156,10 @@ export class OrderManagementComplianceAuditComponent implements OnInit { searchLoadingText: '搜索中...', allowClear: true, onSearch: (q: any) => { - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q }) + .request(this.service.$api_enterpriceList, { enterpriseName: str }) .pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts index 1a8cbc08..d8c37fba 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts @@ -131,9 +131,10 @@ export class OrderManagementReceiptsAuditComponent implements OnInit { searchLoadingText: '搜索中...', allowClear: true, onSearch: (q: any) => { - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q }) + .request(this.service.$api_enterpriceList, { enterpriseName: str }) .pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index 7cad40fd..6a1f0494 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -207,9 +207,10 @@ resourceStatus: any; searchLoadingText: '搜索中...', allowClear: true, onSearch: (q: any) => { - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) + .request(this.service.$api_enterpriceList, { enterpriseName: str}) .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.ts b/src/app/routes/supply-management/components/bulk/bulk.component.ts index a7360ee6..0288c323 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -209,10 +209,10 @@ export class SupplyManagementBulkComponent implements OnInit { }, allowClear: true, onSearch: (q: any) => { - console.log(q) - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) + .request(this.service.$api_enterpriceList, { enterpriseName: str}) .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts index f972fdcb..88eb96d0 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -388,10 +388,10 @@ export class SupplyManagementVehicleComponent implements OnInit { }, allowClear: true, onSearch: (q: any) => { - console.log(q); - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q }) + .request(this.service.$api_enterpriceList, { enterpriseName: str }) .pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { diff --git a/src/app/routes/sys-setting/components/close-account/close-account.component.ts b/src/app/routes/sys-setting/components/close-account/close-account.component.ts index 8a61d047..427b1bf5 100644 --- a/src/app/routes/sys-setting/components/close-account/close-account.component.ts +++ b/src/app/routes/sys-setting/components/close-account/close-account.component.ts @@ -159,10 +159,10 @@ export class CloseAccountComponent implements OnInit { searchDebounceTime: 300, searchLoadingText: '搜索中...', onSearch: (q: any) => { - console.log(q) - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) + .request(this.service.$api_enterpriceList, { enterpriseName: str}) .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { diff --git a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts index b22e712e..830ddd5f 100644 --- a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts +++ b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts @@ -124,10 +124,10 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit { searchLoadingText: '搜索中...', allowClear: true, onSearch: (q: any) => { - console.log(q) - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) + .request(this.service.$api_enterpriceList, { enterpriseName: str}) .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { diff --git a/src/app/routes/waybill-management/components/bulk/bulk.component.ts b/src/app/routes/waybill-management/components/bulk/bulk.component.ts index 26890393..53ebc4c6 100644 --- a/src/app/routes/waybill-management/components/bulk/bulk.component.ts +++ b/src/app/routes/waybill-management/components/bulk/bulk.component.ts @@ -96,9 +96,10 @@ tabs = { allowClear: true, onSearch: (q: any) => { console.log(q) - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) + .request(this.service.$api_enterpriceList, { enterpriseName: str}) .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { diff --git a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts index bdd5d180..7dc824d8 100644 --- a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts @@ -93,10 +93,10 @@ export class WaybillManagementVehicleComponent implements OnInit { searchLoadingText: '搜索中...', allowClear: true, onSearch: (q: any) => { - console.log(q) - if (!!q) { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { return this.service - .request(this.service.$api_enterpriceList, { enterpriseName: q}) + .request(this.service.$api_enterpriceList, { enterpriseName: str}) .pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) .toPromise(); } else { From 201b0eaa1aa0df165b25f4934144498358e0c1f5 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 1 Mar 2022 14:30:58 +0800 Subject: [PATCH 037/107] fix bug --- package-lock.json | 40 ++++++++++++ package.json | 1 + .../onecar-publish.component.html | 7 ++- .../onecar-publish.component.ts | 62 ++++++++++++++----- .../qrcode-page/qrcode-page.component.html | 16 +---- .../qrcode-page/qrcode-page.component.ts | 28 +++++++-- .../release-publish.component.html | 13 ++-- .../release-publish.component.ts | 55 +++++++++++++--- .../services/supply-management.service.ts | 14 +++-- 9 files changed, 181 insertions(+), 55 deletions(-) diff --git a/package-lock.json b/package-lock.json index ddf3948b..50a51aea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5172,6 +5172,14 @@ } } }, + "css-line-break": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz", + "integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==", + "requires": { + "utrie": "^1.0.2" + } + }, "css-loader": { "version": "6.2.0", "resolved": "https://registry.npmmirror.com/css-loader/download/css-loader-6.2.0.tgz?cache=0&sync_timestamp=1635967924209&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcss-loader%2Fdownload%2Fcss-loader-6.2.0.tgz", @@ -8113,6 +8121,15 @@ "integrity": "sha1-e15vfmZen7QfMAB+2eDUHpf7IUA=", "dev": true }, + "html2canvas": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz", + "integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==", + "requires": { + "css-line-break": "^2.1.0", + "text-segmentation": "^1.0.3" + } + }, "htmlparser2": { "version": "3.10.1", "resolved": "https://registry.npmmirror.com/htmlparser2/download/htmlparser2-3.10.1.tgz?cache=0&sync_timestamp=1636640940074&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fhtmlparser2%2Fdownload%2Fhtmlparser2-3.10.1.tgz", @@ -22662,6 +22679,14 @@ } } }, + "text-segmentation": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz", + "integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==", + "requires": { + "utrie": "^1.0.2" + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz", @@ -23211,6 +23236,21 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", "dev": true }, + "utrie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz", + "integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==", + "requires": { + "base64-arraybuffer": "^1.0.2" + }, + "dependencies": { + "base64-arraybuffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", + "integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==" + } + } + }, "uuid": { "version": "3.4.0", "resolved": "https://registry.npmmirror.com/uuid/download/uuid-3.4.0.tgz", diff --git a/package.json b/package.json index 1d6e533e..2740f7e3 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "@swimlane/ngx-charts": "^18.0.1", "ajv": "^8.6.2", "file-saver": "^2.0.5", + "html2canvas": "^1.4.1", "js-base64": "^3.6.1", "masonry-layout": "^4.2.2", "ng-gallery": "^5.0.0", diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html index 39eae06f..d48a2dae 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html @@ -155,8 +155,8 @@ 装货时间 @@ -168,7 +168,8 @@ 卸货时间 - +
diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index 7328931c..cc4e7fff 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -38,8 +38,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { limitValues = { maxWeight: 99999, maxVolume: 99999, - maxPiece: 99999 - }; + maxPiece: 99999, + maxDays: 999, + intervalDays: 999, + maxTimes: 999, + } sf1data: any; // 货源单设置回显 sf3data: any; // 货源单设置回显 sf4data: any; // 货源单设置回显 @@ -110,14 +113,18 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { @ViewChild('sf7', { static: false }) sf7!: SFComponent; schema7: SFSchema = {}; ui7!: SFUISchema; + formatterRmb = (value: number): string => { - if (value) { + if (value === null || value === undefined) { + return ''; + }else{ let value2 = Number(value).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); - return `¥ ${value2}`; + return `¥${value2}`; } - return `¥ 0.00`; + }; - parserRmb = (value: string): string => value.replace('¥ ', '').replace(',', ''); + parserRmb = (value: string): string => value.replace('¥', '').replace(',', ''); + // 页面初始化 ngOnInit(): void { if (this.route.snapshot?.queryParams?.sta === '1') { @@ -761,17 +768,30 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { getLimitvalue() { // 货物核载信息最大值 // 货物运输费(小计)最大值 - const getlimitvaluesParms = [this.service.limitKeys.weight, this.service.limitKeys.volume, this.service.limitKeys.piece]; - this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe(res => { + const getlimitvaluesParms = [ + this.service.limitKeys.weight, + this.service.limitKeys.volume, + this.service.limitKeys.piece, + this.service.limitKeys.maxDays, + this.service.limitKeys.intervalDays, + this.service.limitKeys.maxTimes, + ]; + this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe((res) => { const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys.weight)[0].itemValue; const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys.volume)[0].itemValue; const maxPiece = res.filter((item: any) => item.itemKey === this.service.limitKeys.piece)[0].itemValue; + const maxDays = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxDays)[0].itemValue; + const intervalDays = res.filter((item: any) => item.itemKey === this.service.limitKeys.intervalDays)[0].itemValue; + const maxTimes = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxTimes)[0].itemValue; this.limitValues = { maxWeight: Number(maxWeight), maxVolume: Number(maxVolume), - maxPiece: Number(maxPiece) - }; - }); + maxPiece: Number(maxPiece), + maxDays: Number(maxDays), + intervalDays: Number(intervalDays), + maxTimes: Number(maxTimes), + } + }) } subStartInfo(event: any, index: number) { this.startInfo.splice(index, 1); @@ -898,7 +918,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.service.msgSrv.warning('总费用不能为0!'); return; } - + const num = (Number(this.validateForm1.value.unloadingTime) - Number(this.validateForm1.value.loadingTime))/(24*60*60*1000); + if (num > this.limitValues.maxDays) { + this.service.msgSrv.error(`当前计划装卸货时间间隔已超出限定值【${this.limitValues.maxDays}天】`); + return; + } if ( this.sf4.value.weight > this.limitValues.maxWeight || this.sf4.value.volume > this.limitValues.maxVolume || @@ -1328,10 +1352,16 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } }); } - // 不可选择的时间 - disabledDateStart = (current: Date): boolean => { - return differenceInCalendarDays(new Date(), current) > 0; - }; + // 不可选择的时间 + disabledDateStart = (current: Date): boolean => { + let d = new Date(); + let year = d.getFullYear(); + let month = d.getMonth(); + let date = d.getDate(); + let hours = d.getHours(); + let mydate = new Date(year, month, date + this.limitValues.maxDays,hours+1); + return differenceInCalendarDays(new Date(), current) > 0 || new Date(current) > mydate; + }; // 装卸货地址互换 swapAddress() { this.startInfo.forEach((element: any, index: any) => { diff --git a/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.html b/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.html index 8515e77e..6709ad57 100644 --- a/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.html +++ b/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.html @@ -1,18 +1,8 @@ -
-
-
+
+

{{i?.enterpriseInfoName}}

@@ -23,6 +13,6 @@
diff --git a/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.ts b/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.ts index 275b522b..f1681253 100644 --- a/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.ts +++ b/src/app/routes/supply-management/components/qrcode-page/qrcode-page.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 11:10:14 * @LastEditors : Shiming - * @LastEditTime : 2022-02-28 20:00:06 + * @LastEditTime : 2022-03-01 14:19:47 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\qrcode-page\\qrcode-page.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -13,6 +13,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { QRComponent } from '@delon/abc/qr'; import { SFSchema, SFUISchema } from '@delon/form'; import { NzModalRef } from 'ng-zorro-antd/modal'; +import html2canvas from 'html2canvas'; @Component({ selector: 'app-supply-management-qrcode-page', @@ -50,16 +51,22 @@ export class SupplyManagementQrcodePageComponent implements OnInit { } - downLoadQrcode(downloadName: any): void { + /** + * 下载二维码 + * @param downloadName 文件名 + * @param contents 内容 + */ + downLoadQrcode(downloadName: any, contents: any): void { let aLink = document.createElement('a'); - const content = this.qr.dataURL; + const content = contents; let blob = this.base64ToBlob(content); //new Blob([content]); let evt = document.createEvent("HTMLEvents"); evt.initEvent("click", true, true);//initEvent 不加后两个参数在IE下会报错 事件类型,是否冒泡,是否阻止浏览器的默认行为 aLink.download = downloadName; aLink.href = URL.createObjectURL(blob); // aLink.dispatchEvent(evt); - aLink.click() + aLink.click(); + } @@ -80,4 +87,17 @@ export class SupplyManagementQrcodePageComponent implements OnInit { this.modal.destroy(); } + /** + * 把页面装成canvas + */ + toCanvasPhoto() { + let aLink = document.createElement('a'); + html2canvas(document.getElementById('qr_page')!, { height: 340 }).then((canvas:any) => { + let url = canvas.toDataURL("image/jpeg"); + this.downLoadQrcode('二维码', url); + + }) + } + + } diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.html b/src/app/routes/supply-management/components/release-publish/release-publish.component.html index aa0a881f..7d8445ec 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.html +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.html @@ -161,11 +161,11 @@ 装货时间 + [nzShowTime]="{ nzFormat: 'HH' }" + nzFormat="yyyy-MM-dd HH:00前" + formControlName="loadingTime" + [nzDisabledDate]="disabledDateStart" + >
@@ -174,7 +174,8 @@ 卸货时间 - +
diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index cbc6cbf5..2f514508 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -102,15 +102,25 @@ export class SupplyManagementReleasePublishComponent implements OnInit { @ViewChild('sf7', { static: false }) sf7!: SFComponent; schema7: SFSchema = {}; ui7!: SFUISchema; - formatterRmb = (value: number): string =>{ - if(value){ - let value2 = Number(value).toLocaleString(undefined,{'minimumFractionDigits':2,'maximumFractionDigits':2}); - return `¥ ${value2}`; + limitValues = { + maxWeight: 99999, + maxVolume: 99999, + maxPiece: 99999, + maxDays: 999, + intervalDays: 999, + maxTimes: 999, + } + + formatterRmb = (value: number): string => { + if (value === null || value === undefined) { + return ''; + }else{ + let value2 = Number(value).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); + return `¥${value2}`; } - return `¥ 0.00` - - } ; - parserRmb = (value: string): string => value.replace('¥ ', '').replace(',',''); + + }; + parserRmb = (value: string): string => value.replace('¥', '').replace(',', ''); // 页面初始化 ngOnInit(): void { this.initSF1(); @@ -121,6 +131,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { this.initSF7(); this.addStartInfo(); this.addEndInfo(); + this.getLimitvalue(); } initSF1() { this.schema1 = { @@ -658,6 +669,34 @@ export class SupplyManagementReleasePublishComponent implements OnInit { grid: { span: 24 } } }; + } + getLimitvalue() { + // 货物核载信息最大值 + // 货物运输费(小计)最大值 + const getlimitvaluesParms = [ + this.service.limitKeys.weight, + this.service.limitKeys.volume, + this.service.limitKeys.piece, + this.service.limitKeys.maxDays, + this.service.limitKeys.intervalDays, + this.service.limitKeys.maxTimes, + ]; + this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe((res) => { + const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys.weight)[0].itemValue; + const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys.volume)[0].itemValue; + const maxPiece = res.filter((item: any) => item.itemKey === this.service.limitKeys.piece)[0].itemValue; + const maxDays = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxDays)[0].itemValue; + const intervalDays = res.filter((item: any) => item.itemKey === this.service.limitKeys.intervalDays)[0].itemValue; + const maxTimes = res.filter((item: any) => item.itemKey === this.service.limitKeys.maxTimes)[0].itemValue; + this.limitValues = { + maxWeight: Number(maxWeight), + maxVolume: Number(maxVolume), + maxPiece: Number(maxPiece), + maxDays: Number(maxDays), + intervalDays: Number(intervalDays), + maxTimes: Number(maxTimes), + } + }) } // 不可选择的时间 disabledDateStart = (current: Date): boolean => { diff --git a/src/app/routes/supply-management/services/supply-management.service.ts b/src/app/routes/supply-management/services/supply-management.service.ts index b1238bec..aafd8601 100644 --- a/src/app/routes/supply-management/services/supply-management.service.ts +++ b/src/app/routes/supply-management/services/supply-management.service.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 11:10:14 * @LastEditors : Shiming - * @LastEditTime : 2022-02-28 19:34:22 + * @LastEditTime : 2022-03-01 14:08:30 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\services\\supply-management.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -139,10 +139,14 @@ export class SupplyManagementService extends BaseService { super(injector); } public limitKeys = { - weight: 'sys.config.goods.approvalCarMaxWeight', //整车-核载重量上限 - volume: 'sys.config.goods.approvalCarMaxVolume', //整车-核载体积上限 - piece: 'sys.config.goods.approvalCarMaxPiece' //整车-核载件数上限 - }; + weight:'sys.config.goods.approvalCarMaxWeight', //整车-核载重量上限 + volume:'sys.config.goods.approvalCarMaxVolume', //整车-核载体积上限 + piece:'sys.config.goods.approvalCarMaxPiece', //整车-核载件数上限 + maxDays:'sys.config.goods.wholeLoadingMaxDays', //整车-计划装货时间上限 + intervalDays:'sys.config.goods.wholeUnloadingIntervalDays', //计划装、卸货时间间隔 + maxTimes:'sys.config.goods.wholeLoadingMaxTimes', //整车-多装多卸地点上限 + } + // 根据ItemKey获取项值 public $api_findItemValueByItemKeys = '/api/mdc/pbc/sysConfigItem/findItemValueByItemKeys'; // 获取保价费信息 From 615b70a494ae85bb09c95eef4a80864272c79f0d Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 1 Mar 2022 14:31:37 +0800 Subject: [PATCH 038/107] edit --- .../invoice-requested-detail.component.html | 12 +++++++++--- .../invoice-requested-detail.component.ts | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html index 554c312b..cb94640e 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html @@ -8,7 +8,7 @@
-
+
{{headerInfo?.ltdidName}} @@ -24,8 +24,14 @@ {{headerInfo?.vatinvHNum}} + + {{headerInfo?.reciname}} + + + {{headerInfo?.provinceName}}{{headerInfo?.cityName}}{{headerInfo?.areaName}}{{headerInfo?.reciaddr}} +
-
+
{{headerInfo?.artoName}} @@ -45,7 +51,7 @@ {{headerInfo?.bankAccount}}
-
+
{{headerInfo?.vatnameLabel}} diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts index 5939afd6..ba7f509d 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts @@ -247,7 +247,7 @@ export class InvoiceRequestedDetailComponent implements OnInit { }, driverinfo: { type: 'string', - title: '运司机', + title: '承运司机', ui: { placeholder: '请输入', visibleIf: { @@ -266,7 +266,7 @@ export class InvoiceRequestedDetailComponent implements OnInit { } }, projectId: { - title: '项目', + title: '所属项目', type: 'string', default: '', ui: { From 1866410a233c15b63aa136ca54976c87802a6a7c Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 1 Mar 2022 14:55:40 +0800 Subject: [PATCH 039/107] fix bug --- .../onecar-publish.component.ts | 5 - .../release-publish.component.ts | 249 +++++++++++------- 2 files changed, 150 insertions(+), 104 deletions(-) diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index cc4e7fff..f3b11be8 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -897,11 +897,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.sf5.validator({ emitError: true }); this.sf6.validator({ emitError: true }); this.sf7.validator({ emitError: true }); - console.log(this.validateForm1.invalid) - console.log(this.sf4.valid) - console.log(this.sf5.valid) - console.log(this.sf6.valid) - console.log(this.sf7.valid) if (this.validateForm1.invalid || !this.sf3.valid || !this.sf4.valid || !this.sf5.valid || !this.sf6.valid || !this.sf7.valid) { this.service.msgSrv.warning('请完善必填项!'); return; diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index 2f514508..5b8d78a6 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -851,65 +851,137 @@ export class SupplyManagementReleasePublishComponent implements OnInit { this.validateForm1.controls[key].markAsDirty(); this.validateForm1.controls[key].updateValueAndValidity(); }); - this.sf1.validator({ emitError: true }); this.sf3.validator({ emitError: true }); this.sf4.validator({ emitError: true }); + this.sf5.validator({ emitError: true }); this.sf6.validator({ emitError: true }); this.sf7.validator({ emitError: true }); - if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) { + if (this.validateForm1.invalid || !this.sf3.valid || !this.sf4.valid || !this.sf5.valid || !this.sf6.valid || !this.sf7.valid) { this.service.msgSrv.warning('请完善必填项!'); return; } + if (this.validateForm1.value.loadingTime < new Date()) { + this.service.msgSrv.warning('装货时间必须大于当前时间!'); + return; + } + if (this.validateForm1.value.loadingTime > this.validateForm1.value.unloadingTime) { + this.service.msgSrv.warning('装货时间不能大于卸货时间!'); + return; + } + if (this.sf7.value.total <= 0) { + this.service.msgSrv.warning('总费用不能为0!'); + return; + } + const num = (Number(this.validateForm1.value.unloadingTime) - Number(this.validateForm1.value.loadingTime))/(24*60*60*1000); + if (num > this.limitValues.maxDays) { + this.service.msgSrv.error(`当前计划装卸货时间间隔已超出限定值【${this.limitValues.maxDays}天】`); + return; + } + if ( + this.sf4.value.weight > this.limitValues.maxWeight || + this.sf4.value.volume > this.limitValues.maxVolume || + this.sf4.value.number > this.limitValues.maxPiece + ) { + this.service.msgSrv.error( + `当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxPiece}件】` + ); + return; + } - const modalRef = this.modalService.create({ - nzTitle: '运输协议', - nzContent: TranAgreementComponent, - nzWidth: 900, - nzFooter: null - }); - modalRef.afterClose.subscribe(result => { - if (result) { - this.submit(submitType); + const getFreightParms = { carLengthKeys: this.sf4.value.carLength, km: this.totalDistance }; + this.service.request(this.service.$api_getFreight, getFreightParms).subscribe(res => { + if (this.sf7.value.subtotal > res.maxPrice) { + this.service.msgSrv.error(`运费过高,请调整录入`); + return; + } else if (this.sf7.value.subtotal > res.ewPrice) { + this.modalService.confirm({ + nzTitle: '', + nzContent: `您的录入的运费过高,可能会影响支付,请仔细确认`, + nzOkText: '继续', + nzCancelText: '取消', + nzOnOk: () => { + this.agreementConfirm(submitType); + } + }); + } else { + this.agreementConfirm(submitType); } }); } - // 提交 - submit(submitType: string): void { - //装卸货信息 - const LoadingList = this.startInfo.concat(this.endInfo); - // 货物信息 - const goodsInfoList = [ - { - ...this.sf4.value, - ...this.sf3.value, - carModel: this.sf4.value.carModel.join(','), - carLength: this.sf4.value.carLength.join(',') - } - ]; + // 提交前协议弹窗 + agreementConfirm(submitType?: string) { + //装卸货信息 + const LoadingList = this.startInfo.concat(this.endInfo); + + // 货物信息 + const sf3Values = { ...this.sf3.value }; + if (sf3Values.goodsTypeName === '其它') { + sf3Values.goodsName = sf3Values.goodsName1; + delete sf3Values.goodsName1; + } + if (this.sf4.value.carModel.includes('999')) { + this.sf4.value.carModel = ['999']; + } + if (this.sf4.value.carLength.includes('999')) { + this.sf4.value.carLength = ['999']; + } + const goodsInfoVOList = [ + { + ...sf3Values, + ...this.sf4.value, + carModel: this.sf4.value.carModel.join(','), + carLength: this.sf4.value.carLength.join(',') + } + ]; // 运费信息 const expenseList = [ - { expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay, id: this.sf7data?.prePayId ? this.sf7data?.prePayId : '' }, - { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay, id: this.sf7data?.toPayId ? this.sf7data?.toPayId : '' }, - { - expenseCode: 'BACK', - expenseName: '回单付', - price: this.sf7.value.receiptPay, - id: this.sf7data?.receiptPayId ? this.sf7data?.receiptPayId : '' - } + { expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '' }, + { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' }, + { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' } ]; - const params = { - id: '', - ...this.sf1.value, - unLoadingPlaceDTOList: LoadingList, - unloadingTime: format(this.validateForm1.value.unloadingTime, 'yyyy-MM-dd HH:mm:ss'), - loadingTime: format(this.validateForm1.value.loadingTime, 'yyyy-MM-dd HH:mm:ss'), - goodsInfoDTOList: goodsInfoList, - ...this.sf5.value, - ...this.sf6.value, - expenseDTOList: expenseList, - paymentDays: this.sf7.value.paymentDays, - insuranceType:this.sf55.value.insuranceType, - }; + console.log(this.sf55?.value) + // const params = { + // id: '', + // ...this.sf1.value, + // unLoadingPlaceDTOList: LoadingList, + // unloadingTime: format(this.validateForm1.value?.unloadingTime, 'yyyy-MM-dd HH:mm:ss'), + // loadingTime: format(this.validateForm1.value?.loadingTime, 'yyyy-MM-dd HH:mm:ss'), + // goodsInfoDTOList: goodsInfoList, + // ...this.sf5.value, + // ...this.sf6.value, + // expenseDTOList: expenseList, + // paymentDays: this.sf7.value?.paymentDays, + // insuranceType:this.sf55?.value?.insuranceType, + // }; + const params = { + id: '', + ...this.sf1.value, + unLoadingPlaceDTOList: LoadingList, + unloadingTime: format(this.validateForm1.value.unloadingTime, 'yyyy-MM-dd HH:mm:ss'), + loadingTime: format(this.validateForm1.value.loadingTime, 'yyyy-MM-dd HH:mm:ss'), + goodsInfoDTOList: goodsInfoVOList, + ...this.sf5.value, + ...this.sf6.value, + expenseDTOList: expenseList, + paymentDays: this.sf7.value.paymentDays + }; + console.log(params) + const modalRef = this.modalService.create({ + nzTitle: '运输协议', + nzContent: TranAgreementComponent, + nzWidth: 900, + nzFooter: null, + nzComponentParams: {Object: params,} + }); + modalRef.afterClose.subscribe(result => { + if (result) { + this.submit(submitType, params); + } + }); + } + // 提交 + submit(submitType?: string,params?: any): void { + let reqUrl = this.service.$api_consignWhole; if (submitType) { @@ -1069,65 +1141,44 @@ export class SupplyManagementReleasePublishComponent implements OnInit { goBack() { window.history.go(-1); } - // 装卸货地址互换 - swapAddress(){ - this.startInfo.forEach((element:any, index:any) => { - this.validateForm1.removeControl(`loadAddress${index}`); - this.validateForm1.removeControl(`loadName${index}`); - this.validateForm1.removeControl(`loadPhone${index}`); - }); - this.endInfo.forEach((element:any, index:any) => { - this.validateForm1.removeControl(`unloadAddress${index}`); - this.validateForm1.removeControl(`unloadName${index}`); - this.validateForm1.removeControl(`unloadPhone${index}`); - }); - - let item = this.startInfo; - this.startInfo = this.endInfo; - this.endInfo = item; - - this.startInfo.forEach((element:any,index:any) => { - element.type = '1'; - this.validateForm1.addControl(`loadAddress${index}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`loadName${index}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`loadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); - }); - this.endInfo.forEach((element:any,index:any) => { - element.type = '2'; - this.validateForm1.addControl(`unloadAddress${index}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`unloadName${index}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); - }); - - // 计算里程,时间 - if (this.startInfo[0]?.area && this.endInfo[0]?.area) { + // 装卸货地址互换 + swapAddress() { + this.startInfo.forEach((element: any, index: any) => { + this.validateForm1.removeControl(`loadAddress${index}`); + this.validateForm1.removeControl(`loadName${index}`); + this.validateForm1.removeControl(`loadPhone${index}`); + }); + this.endInfo.forEach((element: any, index: any) => { + this.validateForm1.removeControl(`unloadAddress${index}`); + this.validateForm1.removeControl(`unloadName${index}`); + this.validateForm1.removeControl(`unloadPhone${index}`); + }); + + let item = this.startInfo; + this.startInfo = this.endInfo; + this.endInfo = item; + + this.startInfo.forEach((element: any, index: any) => { + element.type = '1'; + this.validateForm1.addControl(`loadAddress${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`loadName${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`loadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); + }); + this.endInfo.forEach((element: any, index: any) => { + element.type = '2'; + this.validateForm1.addControl(`unloadAddress${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`unloadName${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); + }); + // 计算里程,时间 + if (this.startInfo[0]?.area && this.endInfo[0]?.area) { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { this.totalDistance = res.distance; this.totalTime = res.time; + this.getInsurersPrice(); //计算保费金额 }); } - } - goodsValuesChange(value: any) { - console.log(value); - console.log(this.totalDistance); - - if(value >= 50000 && this.totalDistance > 0){ - const params = { - goodsValue: value, - insuranceType: this.sf55.value.insuranceType, - km: this.totalDistance - }; - this.service - .request(this.service.$api_getWholeInsuranceInfo, params) - .subscribe(res => { - if (res) { - this.sf5.setValue('/insurancePremium',res.insurancePremium); - }else{ - this.sf5.setValue('/insurancePremium',null); - } - }); - } - } + } // 计算保价费金额 getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { if (this.sf5.value.goodsValue >= 50000 && this.totalDistance > 0) { From 73b152152354b78799e24bb70133d1da2b2a3fa9 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 1 Mar 2022 15:05:20 +0800 Subject: [PATCH 040/107] fix bug --- .../bulk-publish/bulk-publish.component.html | 1 - .../bulk-publish/bulk-publish.component.ts | 88 ++++++++++++++----- .../bulk-release-publish.component.ts | 49 +++++++++-- .../services/supply-management.service.ts | 8 +- 4 files changed, 113 insertions(+), 33 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html index 20668692..0f52adc0 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html @@ -126,7 +126,6 @@ - diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index d3744948..727e0e7c 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts @@ -46,6 +46,13 @@ export class SupplyManagementBulkPublishComponent implements OnInit { startInfo: any = []; endInfo: any = []; PageStatus = ''; + limitValues = { + maxMonth: 99, + maxWeight: 99999, + maxVolume: 99999, + maxTrainNumber: 99999, + maxFreight: 9999999 + } constructor( private http: _HttpClient, fb: FormBuilder, @@ -96,6 +103,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { this.initSF4(); this.initSF6(); this.initdata(); + this.getLimitvalue(); } initSF1() { this.schema1 = { @@ -150,19 +158,19 @@ export class SupplyManagementBulkPublishComponent implements OnInit { ui: { placeholder: '请输入', format: 'yyyy-MM-dd HH:mm:ss', - disabledDate: (current: Date): boolean => { + validator: (val) => { let d = new Date(); let year = d.getFullYear(); let month = d.getMonth(); let date = d.getDate(); - let mydate = new Date(year, month + 3, date); - return differenceInCalendarDays(current, new Date()) < 0 || differenceInCalendarDays(current, mydate) > 0; - }, - validator: (val) => { - if( new Date(val) mydate) { + return [{ keyword: 'validTime2', message: `有效期最长为${this.limitValues.maxMonth}个月` }]; + } + return []; }, } }, @@ -649,7 +657,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit { } // 提交前确认,委托运输协议弹窗 submitConfirm(submitType?: any) { - // 校验规则 Object.keys(this.validateForm1.controls).forEach(key => { this.validateForm1.controls[key].markAsDirty(); this.validateForm1.controls[key].updateValueAndValidity(); @@ -657,11 +664,20 @@ export class SupplyManagementBulkPublishComponent implements OnInit { this.sf1.validator({ emitError: true }); this.sf3.validator({ emitError: true }); this.sf4.validator({ emitError: true }); - this.sf7.validator({ emitError: true }); - if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf7.valid) { + if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid ) { this.service.msgSrv.warning('请完善必填项!'); return; } + // 校验各个输入限定值 + if (this.sf4.value.weight > this.limitValues.maxWeight || this.sf4.value.volume > this.limitValues.maxVolume || this.sf4.value.number > this.limitValues.maxTrainNumber) { + this.service.msgSrv.error(`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxTrainNumber}车】`); + return; + } + + if (this.sf4.value.freightPrice > this.limitValues.maxFreight) { + this.service.msgSrv.error(`当前运费单价已超出限定值【${this.limitValues.maxFreight}元】`); + return; + } const modalRef = this.modalService.create({ nzTitle: '运输协议', @@ -677,16 +693,21 @@ export class SupplyManagementBulkPublishComponent implements OnInit { } // 确认提交 submit(submitType?: string): void { - if (typeof this.validateForm1.value.modifyTime !== 'string') { - var c = new Date(this.validateForm1.value.modifyTime); - this.validateForm1.value.modifyTime = - c.getFullYear() + '-' + (c.getMonth() + 1) + '-' + c.getDate() + ' ' + c.getHours() + ':' + c.getMinutes() + ':' + c.getSeconds(); - } - if (typeof this.validateForm1.value.createTime !== 'string') { - var c = new Date(this.validateForm1.value.createTime); - this.validateForm1.value.createTime = - c.getFullYear() + '-' + (c.getMonth() + 1) + '-' + c.getDate() + ' ' + c.getHours() + ':' + c.getMinutes() + ':' + c.getSeconds(); - } + // //装卸货信息 + const LoadingList = this.startInfo.concat(this.endInfo); + + // 货物信息 + const sf3Values = { ...this.sf3.value }; + if (sf3Values.goodsTypeName === '其它') { + sf3Values.goodsName = sf3Values.goodsName1; + delete sf3Values.goodsName1; + } + if (this.sf4.value.carModel.includes('999')) { + this.sf4.value.carModel = ['999'] + } + if (this.sf4.value.carLength.includes('999')) { + this.sf4.value.carLength = ['999'] + } const params: any = { ...this.sf1.value, @@ -1057,4 +1078,27 @@ export class SupplyManagementBulkPublishComponent implements OnInit { }); } } + getLimitvalue() { + const getlimitvaluesParms = [ + this.service.limitKeys2.month, + this.service.limitKeys2.weight, + this.service.limitKeys2.volume, + this.service.limitKeys2.trainNumber, + this.service.limitKeys2.freight, + ]; + this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe((res) => { + const maxMonth = res.filter((item: any) => item.itemKey === this.service.limitKeys2.month)[0].itemValue; + const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys2.weight)[0].itemValue; + const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys2.volume)[0].itemValue; + const maxTrainNumber = res.filter((item: any) => item.itemKey === this.service.limitKeys2.trainNumber)[0].itemValue; + const maxFreight = res.filter((item: any) => item.itemKey === this.service.limitKeys2.freight)[0].itemValue; + this.limitValues = { + maxMonth: Number(maxMonth), + maxWeight: Number(maxWeight), + maxVolume: Number(maxVolume), + maxTrainNumber: Number(maxTrainNumber), + maxFreight: Number(maxFreight) + } + }) + } } diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index 119aa208..a19255ab 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -41,6 +41,13 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { totalFees: any; // 总数信息 id = ''; type = 'add'; + limitValues = { + maxMonth: 99, + maxWeight: 99999, + maxVolume: 99999, + maxTrainNumber: 99999, + maxFreight: 9999999 + } // // 单位 startInfo: any[] = []; endInfo: any[] = []; @@ -80,6 +87,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { this.initSF3(); this.initSF4(); this.initSF6(); + this.getLimitvalue(); this.startInfo = [ { detailedAddress: '', @@ -173,19 +181,19 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { ui: { placeholder: '请输入', format: 'yyyy-MM-dd HH:mm:ss', - disabledDate: (current: Date): boolean => { + validator: (val) => { let d = new Date(); let year = d.getFullYear(); let month = d.getMonth(); let date = d.getDate(); - let mydate = new Date(year, month + 3, date); - return differenceInCalendarDays(current, new Date()) < 0 || differenceInCalendarDays(current, mydate) > 0; - }, - validator: (val) => { - if( new Date(val) mydate) { + return [{ keyword: 'validTime2', message: `有效期最长为${this.limitValues.maxMonth}个月` }]; + } + return []; }, } }, @@ -822,4 +830,27 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { }); } } + getLimitvalue() { + const getlimitvaluesParms = [ + this.service.limitKeys2.month, + this.service.limitKeys2.weight, + this.service.limitKeys2.volume, + this.service.limitKeys2.trainNumber, + this.service.limitKeys2.freight, + ]; + this.service.request(this.service.$api_findItemValueByItemKeys, getlimitvaluesParms).subscribe((res) => { + const maxMonth = res.filter((item: any) => item.itemKey === this.service.limitKeys2.month)[0].itemValue; + const maxWeight = res.filter((item: any) => item.itemKey === this.service.limitKeys2.weight)[0].itemValue; + const maxVolume = res.filter((item: any) => item.itemKey === this.service.limitKeys2.volume)[0].itemValue; + const maxTrainNumber = res.filter((item: any) => item.itemKey === this.service.limitKeys2.trainNumber)[0].itemValue; + const maxFreight = res.filter((item: any) => item.itemKey === this.service.limitKeys2.freight)[0].itemValue; + this.limitValues = { + maxMonth: Number(maxMonth), + maxWeight: Number(maxWeight), + maxVolume: Number(maxVolume), + maxTrainNumber: Number(maxTrainNumber), + maxFreight: Number(maxFreight) + } + }) + } } diff --git a/src/app/routes/supply-management/services/supply-management.service.ts b/src/app/routes/supply-management/services/supply-management.service.ts index aafd8601..d57dd32b 100644 --- a/src/app/routes/supply-management/services/supply-management.service.ts +++ b/src/app/routes/supply-management/services/supply-management.service.ts @@ -146,7 +146,13 @@ export class SupplyManagementService extends BaseService { intervalDays:'sys.config.goods.wholeUnloadingIntervalDays', //计划装、卸货时间间隔 maxTimes:'sys.config.goods.wholeLoadingMaxTimes', //整车-多装多卸地点上限 } - + public limitKeys2 = { + month:'sys.config.goods.bulkEndMaxMonth', //大宗-截止时间上限 + weight:'sys.config.goods.bulkMaxWeight', //大宗-重量上限 + volume:'sys.config.goods.bulkMaxVolume', //大宗-体积上限 + trainNumber:'sys.config.goods.bulkMaxTrainNumber', //大宗-车次上限 + freight:'sys.config.goods.bulkMaxUnitFreight', //大宗-运费单价上限 + } // 根据ItemKey获取项值 public $api_findItemValueByItemKeys = '/api/mdc/pbc/sysConfigItem/findItemValueByItemKeys'; // 获取保价费信息 From 5f8594c3ac841be35a9bb08d7e17abe8426088ac Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 1 Mar 2022 15:07:26 +0800 Subject: [PATCH 041/107] fix bug --- .../bulk-release-publish.component.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index a19255ab..53858ad0 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -596,7 +596,16 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { this.service.msgSrv.warning('请完善必填项!'); return; } - + // 校验各个输入限定值 + if (this.sf4.value.weight > this.limitValues.maxWeight || this.sf4.value.volume > this.limitValues.maxVolume || this.sf4.value.number > this.limitValues.maxTrainNumber) { + this.service.msgSrv.error(`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxTrainNumber}车】`); + return; + } + + if (this.sf4.value.freightPrice > this.limitValues.maxFreight) { + this.service.msgSrv.error(`当前运费单价已超出限定值【${this.limitValues.maxFreight}元】`); + return; + } const modalRef = this.modalService.create({ nzTitle: '运输协议', nzContent: TranAgreementComponent, @@ -613,12 +622,20 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { submit(submitType: string): void { // //装卸货信息 const LoadingList = this.startInfo.concat(this.endInfo); + // 货物信息 const sf3Values = { ...this.sf3.value }; if (sf3Values.goodsTypeName === '其它') { sf3Values.goodsName = sf3Values.goodsName1; delete sf3Values.goodsName1; } + if (this.sf4.value.carModel.includes('999')) { + this.sf4.value.carModel = ['999'] + } + if (this.sf4.value.carLength.includes('999')) { + this.sf4.value.carLength = ['999'] + } + const goodsInfoList = [ { ...sf3Values, From 3845400bfadd3700afbff34a11197cd0c50513ff Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 1 Mar 2022 15:25:18 +0800 Subject: [PATCH 042/107] edit --- .../driver-account-detail.component.html | 6 +++--- .../payment-record/payment-record.component.ts | 4 ++-- .../recharge-record/recharge-record.component.ts | 11 +++++++++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.html b/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.html index 8c870a65..bb282f97 100644 --- a/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.html +++ b/src/app/routes/financial-management/components/driver-account/driver-account-detail/driver-account-detail.component.html @@ -15,17 +15,17 @@ - - - diff --git a/src/app/routes/financial-management/components/payment-record/payment-record.component.ts b/src/app/routes/financial-management/components/payment-record/payment-record.component.ts index 500b02e0..a6383c75 100644 --- a/src/app/routes/financial-management/components/payment-record/payment-record.component.ts +++ b/src/app/routes/financial-management/components/payment-record/payment-record.component.ts @@ -242,7 +242,7 @@ export class PaymentRecordComponent implements OnInit { { title: '支付金额', render: 'payAmount', - width: 120, + width: 140, type: 'widget', className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.payAmount }) } @@ -256,7 +256,7 @@ export class PaymentRecordComponent implements OnInit { (item.amountDetails as Array).forEach(detail => { surcharge += detail.surcharge || 0; }); - item.surcharge = surcharge; + item.surcharge = surcharge.toFixed(2); item.price = item.amountDetails?.[0]?.price || 0; return ''; } diff --git a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts index 576b5555..d2bf325d 100644 --- a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts +++ b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts @@ -162,9 +162,16 @@ export class RechargeRecordComponent implements OnInit { { title: '网络货运人', index: 'ltdName', width: 160 }, { title: '银行类型', index: 'bankTypeLabel', width: 100 }, { title: '账户类型', index: 'accountTypeLabel', width: 100 }, - { title: '账户名称', index: 'rechargeName', width: 140 }, + { title: '账户名称', index: 'rechargeName', width: 160 }, { title: '虚拟账户', index: 'virtualAccount', width: 100 }, - { title: '充值金额', index: 'rechargeAmount', width: 100 }, + { + title: '充值金额', + index: 'rechargeAmount', + width: 160, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.rechargeAmount }) } + }, { title: '充值银行账户', render: 'transferBankAccount', width: 200 }, { title: '充值方式', index: 'payChannelLabel', width: 100 }, { title: '充值状态', index: 'rechargeStatusLabel', width: 100 }, From 886a81a19b218d875ff6fb9df0ceca460bcc6c67 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 1 Mar 2022 15:45:06 +0800 Subject: [PATCH 043/107] edit --- .../usercenter/components/freight/list/list.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/routes/usercenter/components/freight/list/list.component.ts b/src/app/routes/usercenter/components/freight/list/list.component.ts index d1af649c..b26b38ec 100644 --- a/src/app/routes/usercenter/components/freight/list/list.component.ts +++ b/src/app/routes/usercenter/components/freight/list/list.component.ts @@ -277,7 +277,11 @@ export class FreightComponentsListComponent implements OnInit { isExpired: { type: 'string', title: '证件是否过期', - enum: [{ label: '全部', value: '' }], + enum: [ + { label: '全部', value: '' }, + { label: '是', value: true }, + { label: '否', value: false }, + ], default: '', ui: { widget: 'select', From 3608442c4006cff56c8dee5c800f6a37db080f5e Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 1 Mar 2022 16:05:24 +0800 Subject: [PATCH 044/107] edit --- .../cost-management-detail.component.html | 4 ++-- .../cost-management-detail.component.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html index 2775413f..54ad912d 100644 --- a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html +++ b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html @@ -103,8 +103,8 @@ - - {{ item.vatnotax | currency}} + + {{ item.armoney | currency}} {{ item.vatmoney | currency}} diff --git a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts index eca4cedf..981f1776 100644 --- a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts +++ b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.ts @@ -67,9 +67,9 @@ export class CostManagementDetailComponent implements OnInit { { title: '序号', render: 'no', width: 70, className: 'text-left' }, { title: '费用明细号', index: 'feeLId', className: 'text-left', width: 200 }, { title: '发票申请', index: 'vatinvcode', className: 'text-left', width: 200 }, - { title: '发票类型', index: 'vatapptype', className: 'text-left', width: 200 }, - { title: '发票号', index: 'vatappcode', className: 'text-left', width: 200 }, - { title: '发票日期', index: 'vatappdate', className: 'text-left', width: 200 }, + { title: '发票类型', index: 'invoicetypeLabel', className: 'text-left', width: 200 }, + { title: '发票号', index: 'invoiceno', className: 'text-left', width: 200 }, + { title: '发票日期', index: 'invoicedate', className: 'text-left', width: 200 }, { title: '发票状态', index: 'stsLabel', className: 'text-left', width: 200 }, { title: '应收金额', render: 'armoney', className: 'text-left', width: 200 }, { title: '开票金额', render: 'vatmoney', className: 'text-left', width: 200 } From 4a2a9fa1c082689cab146edb0ec71519b54f7a6e Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Tue, 1 Mar 2022 16:15:05 +0800 Subject: [PATCH 045/107] edit --- .../payment-order-detail/payment-order-detail.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html b/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html index fb9486d2..0b385a1e 100644 --- a/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html +++ b/src/app/routes/financial-management/components/payment-order/payment-order-detail/payment-order-detail.component.html @@ -37,7 +37,7 @@ {{headerInfo?.payDate}} - {{headerInfo?.hrBankName}} - {{headerInfo?.hrBankCode}} + {{headerInfo?.hrBankName}} - {{headerInfo?.hrBankNo}} {{headerInfo?.payDate}} From a6d213b07c3fecd5708fdc4c54bf577a12edd933 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 1 Mar 2022 16:16:53 +0800 Subject: [PATCH 046/107] fix bug --- .../onecar-publish.component.ts | 1 - .../components/vehicle/vehicle.component.ts | 42 +--- .../import-supply.component.html | 47 +++++ .../import-supply.component.spec.ts | 24 +++ .../import-supply/import-supply.component.ts | 192 ++++++++++++++++++ .../services/supply-management.service.ts | 2 + .../supply-management.module.ts | 6 +- .../dynamic-setting-h5.component.html | 2 +- 8 files changed, 278 insertions(+), 38 deletions(-) create mode 100644 src/app/routes/supply-management/model/import-supply/import-supply.component.html create mode 100644 src/app/routes/supply-management/model/import-supply/import-supply.component.spec.ts create mode 100644 src/app/routes/supply-management/model/import-supply/import-supply.component.ts diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index f3b11be8..84e42573 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -689,7 +689,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } }; } - // 获取城市列表 getRegionCode(regionCode: any) { console.log(regionCode); return this.service diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts index 88eb96d0..552e1a30 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -8,9 +8,9 @@ import { map } from 'rxjs/operators'; import { SupplyManagementService } from '../../services/supply-management.service'; import { SupplyManagementVehicleAssignedCarComponent } from '../assigned-car/assigned-car.component'; import { SupplyManagementUpdateExternalSnComponent } from '../update-external-sn/update-external-sn.component'; -import { SupplyManagementUpdateFreightComponent } from '../update-freight/update-freight.component'; import { of } from 'rxjs'; import { ShipperBaseService } from '@shared'; +import { SupplyManagementImportSupplyComponent } from '../../model/import-supply/import-supply.component'; @Component({ selector: 'app-supply-management-vehicle', @@ -148,49 +148,23 @@ export class SupplyManagementVehicleComponent implements OnInit { }, 500); } - /** - * 编辑外部货源号 - * @param item st当前行对象 - */ - editEnternalSn(item: any) { - const modalRef = this.modal.create({ - nzWidth: '400px', - nzContent: SupplyManagementUpdateExternalSnComponent, - nzComponentParams: { - orderObject: item - }, - nzFooter: null, - nzClosable: false - }); - } - /** * 导入货源 */ importGoodsSource() { const modalRef = this.modal.create({ - nzTitle: '修改运费', - nzWidth: '40%', - nzContent: SupplyManagementUpdateFreightComponent, + nzTitle: '货源导入', + nzWidth: 600, + nzContent: SupplyManagementImportSupplyComponent, nzComponentParams: { // i: item }, nzFooter: null }); - } - - /** - * 修改运费 - */ - updateFreight(item: any) { - const modalRef = this.modal.create({ - nzTitle: '修改运费', - nzWidth: '40%', - nzContent: SupplyManagementUpdateFreightComponent, - nzComponentParams: { - i: item - }, - nzFooter: null + modalRef.afterClose.subscribe(result => { + if (result) { + this.st.reload(); + } }); } diff --git a/src/app/routes/supply-management/model/import-supply/import-supply.component.html b/src/app/routes/supply-management/model/import-supply/import-supply.component.html new file mode 100644 index 00000000..e9f8866d --- /dev/null +++ b/src/app/routes/supply-management/model/import-supply/import-supply.component.html @@ -0,0 +1,47 @@ + +
+ + + + +
+ +
+
+ 下载导入模板 +
仅支持XLX / XLSX文件格式,最多不能超过100行数据
+
+
+ + 注意: + 1、第一次上传请点击下载模板 + 2、请不要调整模板顺序 + 3、必填字段请务必填写 + 4、如果不清楚字段值,请参考货源发布功能 + 5、发布成功后,可在货源列表-待接单查看 + +
+ diff --git a/src/app/routes/supply-management/model/import-supply/import-supply.component.spec.ts b/src/app/routes/supply-management/model/import-supply/import-supply.component.spec.ts new file mode 100644 index 00000000..65a74b1c --- /dev/null +++ b/src/app/routes/supply-management/model/import-supply/import-supply.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { SupplyManagementImportSupplyComponent } from './import-supply.component'; + +describe('SupplyManagementImportSupplyComponent', () => { + let component: SupplyManagementImportSupplyComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ SupplyManagementImportSupplyComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SupplyManagementImportSupplyComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/routes/supply-management/model/import-supply/import-supply.component.ts b/src/app/routes/supply-management/model/import-supply/import-supply.component.ts new file mode 100644 index 00000000..7957abc1 --- /dev/null +++ b/src/app/routes/supply-management/model/import-supply/import-supply.component.ts @@ -0,0 +1,192 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-03-01 15:13:03 + * @LastEditors : Shiming + * @LastEditTime : 2022-03-01 16:15:26 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\model\\import-supply\\import-supply.component.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STColumn } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; +import { _HttpClient } from '@delon/theme'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalRef } from 'ng-zorro-antd/modal'; +import { NzUploadChangeParam, NzUploadFile } from 'ng-zorro-antd/upload'; +import { Observable, Observer, of } from 'rxjs'; +import { map } from 'rxjs/operators'; +import { SupplyManagementService } from '../../services/supply-management.service'; + +@Component({ + selector: 'app-supply-management-import-supply', + templateUrl: './import-supply.component.html', +}) +export class SupplyManagementImportSupplyComponent implements OnInit { + record: any = {}; + files: any; + files2: any; + schema: SFSchema = {}; + ui: SFUISchema = {}; + @ViewChild('sf', { static: false }) sf!: SFComponent; + constructor( + private modal: NzModalRef, + private msgSrv: NzMessageService, + public service: SupplyManagementService + ) { } + + ngOnInit(): void { + this.initSF(); + console.log(this.record) + } + + initSF() { + this.schema = { + properties: { + shipperAppUserId: { + title: '货主', + type: 'string', + maxLength: 30, + ui: { + widget: 'select', + // serverSearch: true, + searchDebounceTime: 300, + searchLoadingText: '搜索中...', + onSearch: (q: any) => { + console.log(q === ' ') + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { + return this.service + .request(this.service.$api_enterpriceList, { enterpriseName: str }) + .pipe(map(res => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum)))) + .toPromise(); + } else { + return of([]); + } + }, + change: (q: any) => { + let str =q.replace(/^\s+|\s+$/g,""); + if (str) { + this.getRegionCode(str); + } + } + } as SFSelectWidgetSchema + }, + resourceCode: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'text' + }, + default: '确认货主后带出' + }, + enterpriseProjectId: { + type: 'string', + title: '项目', + ui: { + widget: 'select', + placeholder: '请选择' + } as SFSelectWidgetSchema + }, + resourceCode2: { + type: 'string', + title: '导入货源信息', + ui: { + widget: 'custom' + } + }, + }, + required: ['shipperAppUserId', 'enterpriseProjectId','resourceCode2',], + }; + this.ui = { + '*': { + grid: { span: 20 }, + }, + '$resourceCode2': { + spanLabelFixed: 130, + grid: { span: 20 }, + }, + '$resourceCode': { + spanLabelFixed: 130, + grid: { span: 20 }, + }, + }; + } + getRegionCode(regionCode: any) { + console.log(regionCode); + return this.service + .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .pipe( + map(res => + res.map((item: any) => ({ + label: item.projectName, + value: item.id + })) + ) + ) + .subscribe(res => { + this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + }); + } + save(): void { + console.log(this.files) + // this.service.request(this.service.$api_update_price, { id, freightType, freightPrice, resourceCode, rule, resourceId }).subscribe(res => { + // if (res) { + // this.msgSrv.success('保存成功'); + // this.modal.close(true); + // } + // }); + } + + close(): void { + this.modal.destroy(); + } + handleChange(info: NzUploadChangeParam): void { + switch (info.file.status) { + case 'uploading': + break; + case 'done': + let fileList = [...info.fileList]; + // 2. Read from response and show file link + fileList = fileList.map((file: any) => { + if (file.response) { + file.url = file.response.data.fullFilePath; + } + return file; + }); + this.files2 = fileList[0].name + break; + case 'error': + this.service.msgSrv.error('网络错误'); + break; + } + } + beforeUpload = (file: NzUploadFile, _fileList: NzUploadFile[]) => { + return new Observable((observer: Observer) => { + const isJpgOrPng = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; + if (!isJpgOrPng) { + this.service.msgSrv.error('仅支持XLX / XLSX文件格式'); + observer.complete(); + return; + } + // tslint:disable-next-line: no-non-null-assertion + const isLt2M = file.size! / 1024 / 1024 < 3; + if (!isLt2M) { + this.service.msgSrv.warning('图片大小超过3兆!'); + observer.complete(); + return; + } + observer.next(isJpgOrPng && isLt2M); + observer.complete(); + }); + }; + downFile() { + this.service.request(this.service.$api_exportGoodsResourceOperateTemplate).subscribe((res: any)=> { + console.log(res) + + }) + // window.location.href('') + } +} diff --git a/src/app/routes/supply-management/services/supply-management.service.ts b/src/app/routes/supply-management/services/supply-management.service.ts index d57dd32b..959f44fa 100644 --- a/src/app/routes/supply-management/services/supply-management.service.ts +++ b/src/app/routes/supply-management/services/supply-management.service.ts @@ -157,4 +157,6 @@ export class SupplyManagementService extends BaseService { public $api_findItemValueByItemKeys = '/api/mdc/pbc/sysConfigItem/findItemValueByItemKeys'; // 获取保价费信息 public $api_getWholeInsuranceInfo = '/api/sdc/goodsResourceShipper/getWholeInsuranceInfo'; + // 下载导入货源模板-运营后台 + public $api_exportGoodsResourceOperateTemplate = '/api/sdc/uploadGoodsResource/exportGoodsResourceOperateTemplate'; } diff --git a/src/app/routes/supply-management/supply-management.module.ts b/src/app/routes/supply-management/supply-management.module.ts index 7ab115ec..54388605 100644 --- a/src/app/routes/supply-management/supply-management.module.ts +++ b/src/app/routes/supply-management/supply-management.module.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-20 10:13:02 * @LastEditors : Shiming - * @LastEditTime : 2022-01-18 17:26:40 + * @LastEditTime : 2022-03-01 15:38:17 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\supply-management.module.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -35,6 +35,7 @@ import { SupplyManagementUpdateFreightComponent } from './components/update-frei import { SupplyManagementUpdatePriceComponent } from './components/update-price/update-price.component'; import { SupplyManagementVehicleDetailComponent } from './components/vehicle-detail/vehicle-detail.component'; import { SupplyManagementVehicleComponent } from './components/vehicle/vehicle.component'; +import { SupplyManagementImportSupplyComponent } from './model/import-supply/import-supply.component'; import { SupplyManagementRoutingModule } from './supply-management-routing.module'; const COMPONENTS: Type[] = [ @@ -61,7 +62,8 @@ const COMPONENTS: Type[] = [ SupplyManagementReleasePublishComponent, SupplyManagementBulkReleasePublishComponent, TranAgreementComponent, - SupplyManagementBulkAssignedCarComponent + SupplyManagementBulkAssignedCarComponent, + SupplyManagementImportSupplyComponent ]; @NgModule({ diff --git a/src/app/shared/components/dynamic-setting/dynamic-setting-h5/dynamic-setting-h5.component.html b/src/app/shared/components/dynamic-setting/dynamic-setting-h5/dynamic-setting-h5.component.html index 1d263382..06381609 100644 --- a/src/app/shared/components/dynamic-setting/dynamic-setting-h5/dynamic-setting-h5.component.html +++ b/src/app/shared/components/dynamic-setting/dynamic-setting-h5/dynamic-setting-h5.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-25 16:03:45 * @LastEditors : Shiming - * @LastEditTime : 2022-02-22 13:26:13 + * @LastEditTime : 2022-03-01 15:31:23 * @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-h5\\dynamic-setting-h5.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> From 36c38de600e3edb7a937e2507f491382fbd99e67 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 1 Mar 2022 16:32:10 +0800 Subject: [PATCH 047/107] fix bug --- .../bulk-publish/bulk-publish.component.html | 8 ++++---- .../bulk-release-publish.component.html | 8 ++++---- .../onecar-publish.component.html | 18 +++++++++--------- .../release-publish.component.html | 12 ++++++------ .../import-supply/import-supply.component.html | 5 ++++- .../import-supply/import-supply.component.ts | 7 +++++-- 6 files changed, 32 insertions(+), 26 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html index 0f52adc0..8b82b607 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html @@ -20,7 +20,7 @@
- 装货地 + 装货地
@@ -37,7 +37,7 @@ - 联系人 + 联系人
- 卸货地 + 卸货地
@@ -88,7 +88,7 @@ - 联系人 + 联系人
- 装货地 + 装货地
@@ -44,7 +44,7 @@ - 联系人 + 联系人
- 卸货地 + 卸货地
@@ -98,7 +98,7 @@ - 联系人 + 联系人
- 装货地 + 装货地
@@ -43,7 +43,7 @@ - 联系人 + 联系人
- 卸货地 + 卸货地
@@ -112,7 +112,7 @@ - 联系人 + 联系人
-
+
- 装货时间 + 装货时间
-
-
+
+
- 卸货时间 + 卸货时间 diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.html b/src/app/routes/supply-management/components/release-publish/release-publish.component.html index 7d8445ec..0a0bbca3 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.html +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.html @@ -26,7 +26,7 @@
- 装货地 + 装货地
@@ -49,7 +49,7 @@ - 联系人 + 联系人
- 卸货地 + 卸货地
@@ -118,7 +118,7 @@ - 联系人 + 联系人
- 装货时间 + 装货时间
- 卸货时间 + 卸货时间 diff --git a/src/app/routes/supply-management/model/import-supply/import-supply.component.html b/src/app/routes/supply-management/model/import-supply/import-supply.component.html index e9f8866d..f6a5b464 100644 --- a/src/app/routes/supply-management/model/import-supply/import-supply.component.html +++ b/src/app/routes/supply-management/model/import-supply/import-supply.component.html @@ -8,7 +8,7 @@ * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\model\\import-supply\\import-supply.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> -
+
@@ -41,6 +41,9 @@ 5、发布成功后,可在货源列表-待接单查看
+
+ 文件上传成功!成功xx条,失败xx条! +
diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index 21b2c1f7..e9308ad5 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-02-28 13:40:31 + * @LastEditTime : 2022-03-02 10:39:01 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -206,7 +206,7 @@
- +
diff --git a/src/app/routes/supply-management/model/import-supply/import-supply.component.ts b/src/app/routes/supply-management/model/import-supply/import-supply.component.ts index 7f691eb6..dfc4fddb 100644 --- a/src/app/routes/supply-management/model/import-supply/import-supply.component.ts +++ b/src/app/routes/supply-management/model/import-supply/import-supply.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-01 15:13:03 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 09:52:53 + * @LastEditTime : 2022-03-02 10:32:15 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\model\\import-supply\\import-supply.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -134,7 +134,7 @@ export class SupplyManagementImportSupplyComponent implements OnInit { getRegionCode2(regionCode: any) { console.log(regionCode); return this.service - .request(this.service.$api_get_enterprise_project, { id: regionCode }) + .request(this.service.$api_getNetworkTransporter, { id: regionCode }) .pipe( map(res => res.map((item: any) => ({ @@ -144,8 +144,8 @@ export class SupplyManagementImportSupplyComponent implements OnInit { ) ) .subscribe(res => { - this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; - this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); + // this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res; + // this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res); }); } save(): void { diff --git a/src/app/routes/supply-management/services/supply-management.service.ts b/src/app/routes/supply-management/services/supply-management.service.ts index 54d88132..5b9641c6 100644 --- a/src/app/routes/supply-management/services/supply-management.service.ts +++ b/src/app/routes/supply-management/services/supply-management.service.ts @@ -161,4 +161,6 @@ export class SupplyManagementService extends BaseService { public $api_exportGoodsResourceOperateTemplate = '/api/sdc/uploadGoodsResource/exportGoodsResourceOperateTemplate'; // 导入货源-运营后台 public $api_goodsResourceOperateImport = '/api/sdc/uploadGoodsResource/goodsResourceOperateImport'; + // 根据货主ID查询网络货运人信息 + public $api_getNetworkTransporter = '/api/mdc/cuc/enterpriseInfo/operate/getNetworkTransporter'; } From e2aeba236fb3bd2b8c34dc08aeec41910959b72b Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 11:02:57 +0800 Subject: [PATCH 063/107] fix bug --- .../bulk-detail/bulk-detail.component.html | 10 +++------- .../bulk-detail/bulk-detail.component.ts | 3 ++- .../vehicle-detail.component.html | 19 ++++++------------- .../vehicle-detail.component.ts | 3 ++- 4 files changed, 13 insertions(+), 22 deletions(-) diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html index dba9b035..27813203 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-06 20:20:26 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 10:39:35 + * @LastEditTime : 2022-03-02 11:00:09 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -62,17 +62,13 @@
  -   -   - -   + > +
diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts index b6d7fd88..f2f04f4e 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-06 20:20:26 * @LastEditors : Shiming - * @LastEditTime : 2022-02-28 19:47:14 + * @LastEditTime : 2022-03-02 11:01:15 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -72,6 +72,7 @@ export class OrderManagementBulkeDetailComponent implements OnInit { this.i = res; this.attObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'ATT')[0]; this.totalObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TOTAL')[0]; + this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE"); } }); } diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index e9308ad5..79fe1100 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 10:39:01 + * @LastEditTime : 2022-03-02 11:02:35 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -62,18 +62,11 @@
  - -   - -   - -   + + +
diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts index 5b8e5ba6..38785244 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-02-28 11:45:39 + * @LastEditTime : 2022-03-02 11:02:35 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -83,6 +83,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit { delete this.approvalLsit[key]; } }); + this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE"); } }); } From ad13d4b11ffec22769201d4445737cbd8efd60ee Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 11:15:59 +0800 Subject: [PATCH 064/107] fix bug --- .../bulk-detail/bulk-detail.component.html | 5 +++-- .../bulk-detail/bulk-detail.component.ts | 12 +++++++----- .../vehicle-detail/vehicle-detail.component.html | 4 ++-- .../vehicle-detail/vehicle-detail.component.ts | 14 ++++---------- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html index 27813203..356c332b 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-06 20:20:26 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 11:00:09 + * @LastEditTime : 2022-03-02 11:14:37 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -136,7 +136,8 @@

{{i?.goodsInfoList?.[0]?.freightPrice}}{{i?.goodsInfoList?.[0]?.freightTypeLabel}}(以发货为准,保留小数)

- + + 到付 {{ item.price | currency }} diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts index f2f04f4e..f53df0ff 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-06 20:20:26 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 11:01:15 + * @LastEditTime : 2022-03-02 11:15:45 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -25,15 +25,16 @@ import format from 'date-fns/format'; styleUrls: ['./bulk-detail.component.less'] }) export class OrderManagementBulkeDetailComponent implements OnInit { - MapList: any; + MapList: any[]=[]; id = this.route.snapshot.params.id; + billExpenses: any[] = []; //运费信息表格信息 i: any; imges: any; totalObj: any; attObj: any; isVisible = false; logColumns: STColumn[] = [ - { title: '款项', index: 'expenseName' }, + { title: '款项', index: 'costName', render: 'PriceType' }, { title: '运输费(元)', render: 'price' }, { title: '附加费(元)', render: 'surcharge' }, { title: '支付时间', index: 'paymentTime' }, @@ -70,8 +71,9 @@ export class OrderManagementBulkeDetailComponent implements OnInit { this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => { if (res) { this.i = res; - this.attObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'ATT')[0]; - this.totalObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TOTAL')[0]; + console.log(this.i.billExpenseDetails ) + this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA'); + console.log(this.billExpenses ) this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE"); } }); diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index 79fe1100..adfc52dc 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 11:02:35 + * @LastEditTime : 2022-03-02 11:11:04 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -132,7 +132,7 @@ - + {{ item.price | currency }} diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts index 38785244..98dca02d 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 11:02:35 + * @LastEditTime : 2022-03-02 11:11:05 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -23,13 +23,14 @@ import { OrderManagementService } from '../../services/order-management.service' }) export class OrderManagementVehicleDetailComponent implements OnInit { id = this.route.snapshot.params.id; - MapList: any; + MapList: any[]=[]; i: any = { unLoadingPlaceList: [], billExpenseDetails: [], goodsInfoList: [], goodsResource: [] }; + billExpenses: any[] = []; //运费信息表格信息 imges: any; attObj: any; totalObj: any; @@ -75,14 +76,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit { this.service.request(this.service.$api_get_getWholeBillDetail, { id: this.id }).subscribe(res => { if (res) { this.i = res; - this.approvalLsit = res.scheduleVOList; - this.attObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'ATT')[0]; - this.totalObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TOTAL')[0]; - this.approvalLsit.map((item: any, key: any) => { - if (item.displayStatus === 'HIDE') { - delete this.approvalLsit[key]; - } - }); + this.billExpenses = this.i?.billExpenseDetails?.filter((data:any)=>data.expenseCode ==="PRE" || data.expenseCode ==="RECE" ||data.expenseCode ==="BACK" ) this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE"); } }); From 5731b477032f55492627bb65b53b90bdcb9a7499 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 13:47:20 +0800 Subject: [PATCH 065/107] fix bug --- .../bulk/confir-receipt/confir-receipt.component.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/routes/order-management/modal/bulk/confir-receipt/confir-receipt.component.html b/src/app/routes/order-management/modal/bulk/confir-receipt/confir-receipt.component.html index 3b22ef68..b1289919 100644 --- a/src/app/routes/order-management/modal/bulk/confir-receipt/confir-receipt.component.html +++ b/src/app/routes/order-management/modal/bulk/confir-receipt/confir-receipt.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-14 15:02:52 * @LastEditors : Shiming - * @LastEditTime : 2022-01-18 17:20:49 + * @LastEditTime : 2022-03-02 13:43:55 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\bulk\\confir-receipt\\confir-receipt.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -18,7 +18,7 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误 - {{detailList?.goodsInfoVO?.freightPrice}} {{detailList?.goodsInfoVO?.freightType}} + {{detailList?.goodsInfoVO?.freightPrice}} {{detailList?.goodsInfoVO?.freightTypeLabel}} @@ -37,7 +37,7 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误
{{detailList?.goodsInfoVO?.weight}}吨
-
{{detailList?.goodsInfoVO?.volume}}吨
+
{{detailList?.goodsInfoVO?.volume}}方
@@ -50,7 +50,7 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误 -
{{detailList?.price}} 元
+
{{detailList?.price | currency}} 元
{{detailList?.driverName}} / {{detailList?.driverPhone}}/ {{detailList?.carNo}}
@@ -69,7 +69,7 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误 [nzPreview]="handlePreview1" [nzBeforeUpload]="beforeUpload" (nzChange)="handleChange1($event)" - >beforeUpload + >
请上传图片
From 38310cb8b65c3475a224e0638907240cff22a6b0 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Wed, 2 Mar 2022 13:52:42 +0800 Subject: [PATCH 066/107] edit --- .../components/freight/list/detail/detail.component.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html index d9cab4ea..eb3fa28f 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html @@ -47,10 +47,10 @@ - + From 6eeb714434ca74e74f428eab81a52c8c5429f875 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 13:52:51 +0800 Subject: [PATCH 067/107] fix bug --- .../confir-receipt.component.html | 17 ++++++++++++-- .../confir-receipt.component.ts | 22 +++++++++++-------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.html b/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.html index b94a1580..d4e298cb 100644 --- a/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.html +++ b/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-15 13:17:42 * @LastEditors : Shiming - * @LastEditTime : 2022-01-18 17:21:57 + * @LastEditTime : 2022-03-02 13:50:12 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\confir-receipt\\confir-receipt.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -17,7 +17,20 @@ - + + + {{item.PRE | currency}} + + + {{ item.RECE | currency }} + + + {{ item.BACK | currency }} + + + {{ item.traiPrice | currency }} + +
{{ dataInfo?.driverName }} / {{ dataInfo?.driverPhone }}/ {{ dataInfo?.carNo }}
diff --git a/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.ts b/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.ts index 86e57768..6d6170e4 100644 --- a/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.ts +++ b/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-15 13:17:42 * @LastEditors : Shiming - * @LastEditTime : 2022-02-25 15:34:07 + * @LastEditTime : 2022-03-02 13:52:27 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\confir-receipt\\confir-receipt.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -143,23 +143,27 @@ export class VehicleConfirReceiptComponent implements OnInit { this.columns = [ { title: '预付', - index: 'PRE' + index: 'PRE', + render:'PRE' }, { title: '到付', - index: 'RECE' - }, - { - title: '油卡', - index: 'OIL' + index: 'RECE', + render:'RECE' }, + // { + // title: '油卡', + // index: 'OIL' + // }, { title: '回单付', - index: 'BACK' + index: 'BACK', + render:'BACK' }, { title: '总运费', - index: 'traiPrice' + index: 'traiPrice', + render:'traiPrice' } ]; } From 0ae6f030be86f5fd5bd686e3d9fa5748c60c0d01 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 14:16:26 +0800 Subject: [PATCH 068/107] fix bug --- .../assigned-car/assigned-car.component.html | 59 ++++------ .../assigned-car/assigned-car.component.ts | 106 +++++++++++++++--- .../onecar-publish.component.ts | 2 - .../services/supply-management.service.ts | 2 + 4 files changed, 114 insertions(+), 55 deletions(-) diff --git a/src/app/routes/supply-management/components/assigned-car/assigned-car.component.html b/src/app/routes/supply-management/components/assigned-car/assigned-car.component.html index 65a2952a..22030b03 100644 --- a/src/app/routes/supply-management/components/assigned-car/assigned-car.component.html +++ b/src/app/routes/supply-management/components/assigned-car/assigned-car.component.html @@ -1,66 +1,49 @@ -
- -
-
- +
+
- + (change)="changeSt($event)"> - + - - {{ car.carNo }} - - {{ car.carLength }}米,{{ car.carLoad }}吨 - - 空闲 - 已被指派 + + {{car.carNo}} - + {{car.carLength}}米,{{car.carLoad}}吨 - + 空闲 + 在途 未认证 - {{ item.captainName }} {{ item.captainPhone }} - 设置 + {{item.captainName}} {{item.captainPhone}} + 设置 空闲 - 已被指派 + 在途 未认证
diff --git a/src/app/routes/supply-management/components/assigned-car/assigned-car.component.ts b/src/app/routes/supply-management/components/assigned-car/assigned-car.component.ts index 11a756c4..bcbd14e5 100644 --- a/src/app/routes/supply-management/components/assigned-car/assigned-car.component.ts +++ b/src/app/routes/supply-management/components/assigned-car/assigned-car.component.ts @@ -2,8 +2,9 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { STChange, STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; +import { EAEnvironmentService } from '@shared'; import { NzMessageService } from 'ng-zorro-antd/message'; -import { NzModalRef } from 'ng-zorro-antd/modal'; +import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; import { SupplyManagementService } from '../../services/supply-management.service'; import { SupplyManagementAddDriversComponent } from '../add-drivers/add-drivers.component'; import { CarAddmodalComponent } from '../addmodal/addmodal.component'; @@ -29,7 +30,6 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit { @ViewChild('st') st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; status: string = 'anew'; - type: any; url = ''; // 请求的api地址 params: any = {}; // 传进来的参数 cardBADGE: STColumnBadge | any = { @@ -43,6 +43,8 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit { private msgSrv: NzMessageService, public service: SupplyManagementService, private modalHelper: ModalHelper, + private envSrv: EAEnvironmentService, + private modalSrv: NzModalService ) { this.initSF(); this.initSt(); @@ -54,10 +56,14 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit { get reqParams() { return { ...this.sf?.value, + loadingTime: this.params?.loadingTime, + unloadingTime: this.params?.unloadingTime }; } + + /** * 初始化查询表单 */ @@ -67,14 +73,15 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit { _$expand: { type: 'boolean', ui: { hidden: true } }, nameOrPhone: { type: 'string', - title: '', + title: '承运司机', ui: { placeholder: '请输入司机姓名/手机号' } }, carNo: { type: 'string', - title: '', + title: '车牌号', + maxLength: 9, ui: { placeholder: '请输入车牌号' } @@ -100,13 +107,12 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit { } ngOnInit(): void { - console.log(this.type) } dataProcess(data: STData[]): STData[] { return data.map((i, index) => { i.carId = ''; - i.disabled = i.carStatus === '1'; + i.disabled = (i?.certificationStatus === 1 && i.driverStatus === 1); const defaultCar = i?.userCarLicenseDesensitizationVOList?.find((item: any) => item.isDefault); if (defaultCar) { i.carId = defaultCar?.carId; @@ -116,16 +122,15 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit { } save(): void { - if (this.selectedRows) { - const { carId, appUserId: driverId, captainAppUserId: carCaptainId } = this.selectedRows; - const params: any = { carId, driverId, carCaptainId }; - this.service.request(this.url, { ...params, ...this.params }).subscribe((res: any) => { - if (res) { - this.modal.close(res); - } - }) + const { carId, appUserId: driverId, captainAppUserId: carCaptainId } = this.selectedRows; + const params: any = { carId, driverId, carCaptainId }; + this.service.request(this.url, { ...params, ...this.params }).subscribe((res: any) => { + if (res) { + this.service.msgSrv.success('指派成功!'); + this.modal.close(res); + } + }) - } } changeSt(e: STChange): void { @@ -143,10 +148,28 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit { }); } + /** + * 校验司机是否能设置车队长 + * @param item 当前对象 + */ + verifyCanSetCarCaptain(item: any) { + this.service.request(this.service.$api_get_sys_config, [{ itemKey: 'sys.config.shipper.setCarCaptain', businessId: this.envSrv.env.enterpriseId }]).subscribe(res => { + if (res && res.length > 0) { + const { itemValue } = res[0]; + if (itemValue !== '1') { + this.service.msgSrv.error('不可设置车队长!'); + return; + } + this.setCarCaptain(item); + } + }) + } + /** * 设置车队长 */ setCarCaptain(item: any) { + this.modalHelper.create(SupplyManagementAddDriversComponent, { dirvierInfo: item }, { size: 900, modalOptions: { nzMaskClosable: false, nzTitle: '设置' } @@ -168,4 +191,57 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit { this.sf.reset(); this.st.load(1); } + + /** + * 验证车辆的状态 + */ + verifyVechicleStatus(params: any) { + if (this.selectedRows) { + const obj = this.status === 'anew' ? { resourceId: params.id } : { ...params }; + const { carId, appUserId: driverId, captainAppUserId: carCaptainId } = this.selectedRows; + const carInfo: any = { carId, driverId, carCaptainId }; + this.service.request(this.service.$api_verify_vehicle_status, { ...obj, ...carInfo }).subscribe(res => { + if (res) { + const { title, alert, subContent, content } = res; + switch (alert) { + case 'Error': + // if (code === '3' || code === '4' || code === '8') { + // this.error(title, subContent, '#CF3834'); + // } else { + this.error(title, content, subContent); + break; + case 'Warn': + this.showConfirm(title, content, subContent); + break; + case 'Success': + this.save(); + break; + } + } + }) + } + + } + + error(title: string, content: string, subContent: string): void { + this.modalSrv.error({ + nzTitle: title, + nzContent: `${content ? content : ''}${subContent ? subContent : ''}`, + nzOkText: '知道了' + }); + } + + showConfirm(title: string, content: string, subContent: string): void { + this.modalSrv.confirm({ + nzTitle: title, + nzContent: `${content ? content : ''}${subContent ? subContent : ''}`, + nzOkText: '继续', + nzCancelText: '取消', + nzOnOk: () => { + this.save(); + } + }); + } + + } diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index 9b1f69ae..0084578d 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -864,7 +864,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } //指派熟车 chooseFamifiar(item: any) { - console.log('999'); const modalRef = this.modalService.create({ nzTitle: '指派熟车', nzContent: SupplyManagementVehicleAssignedCarComponent, @@ -873,7 +872,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { status: 'new', url: this.service.$api_save_assign_whole, params: item, - type: 'next' }, nzFooter: null }); diff --git a/src/app/routes/supply-management/services/supply-management.service.ts b/src/app/routes/supply-management/services/supply-management.service.ts index 5b9641c6..78dd862e 100644 --- a/src/app/routes/supply-management/services/supply-management.service.ts +++ b/src/app/routes/supply-management/services/supply-management.service.ts @@ -163,4 +163,6 @@ export class SupplyManagementService extends BaseService { public $api_goodsResourceOperateImport = '/api/sdc/uploadGoodsResource/goodsResourceOperateImport'; // 根据货主ID查询网络货运人信息 public $api_getNetworkTransporter = '/api/mdc/cuc/enterpriseInfo/operate/getNetworkTransporter'; + $api_verify_vehicle_status = `/api/sdc/goodsResourceShipper/saveVerify`;// 发布货源校验司机/车队长的状态 + $api_get_sys_config = `/api/mdc/pbc/sysConfigItem/findConfigValues`; // 根据项key、业务id获取配置信息 } From e66779ecb3cb6c951139fd7d92fcb39bd003ec29 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 14:29:37 +0800 Subject: [PATCH 069/107] fix bug --- .../choose-famifiar.component.html | 58 ++++------ .../choose-famifiar.component.ts | 108 ++++++++++++++---- .../set-captain/set-captain.component.ts | 19 ++- .../services/supply-management.service.ts | 4 +- 4 files changed, 121 insertions(+), 68 deletions(-) diff --git a/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.html b/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.html index df51267d..016d7031 100644 --- a/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.html +++ b/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.html @@ -4,48 +4,35 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-01-18 17:27:53 + * @LastEditTime : 2022-03-02 14:27:20 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\choose-famifiar\\choose-famifiar.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> - - +
-
-
-
- -
-
- - -
-
+
+ +
+
+ +
- + [loadingDelay]="500" [loading]="service.http.loading" [widthMode]="{ type: 'strict' }" [scroll]="{ x: '600px' }" + style="margin-top: 22px"> - + @@ -53,21 +40,18 @@
已选择{{ st2Data.length }}位司机
- + {{ item.captainName }} {{ item.captainPhone }}   设置 + + {{item.default?.carNo}} +
diff --git a/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.ts b/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.ts index f73d3461..d2f126d1 100644 --- a/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.ts +++ b/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.ts @@ -3,7 +3,7 @@ import { ActivatedRoute, Router } from '@angular/router'; import { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { ModalHelper } from '@delon/theme'; -import { processSingleSort } from '@shared'; +import { EAEnvironmentService, processSingleSort } from '@shared'; import { NzDrawerRef, NzDrawerService } from 'ng-zorro-antd/drawer'; import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; import { SupplyManagementAddDriversComponent } from 'src/app/routes/supply-management/components/add-drivers/add-drivers.component'; @@ -37,7 +37,7 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { submitUrl = ''; @Input() - submitParams = {}; + submitParams:any; constructor( private modal: NzModalRef, @@ -47,8 +47,8 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { public service: SupplyManagementService, private modalService: NzModalService, private modalHelper: ModalHelper, - private cdr: ChangeDetectorRef - ) {} + private envSrv: EAEnvironmentService + ) { } /** * 查询参数 @@ -61,26 +61,23 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { } ngOnInit() { this.initSF(); - - setTimeout(() => { - this.initST(); - this.initST2(); - }, 200); + this.initST(); + this.initST2(); } initSF() { this.schema = { properties: { - name: { + nameOrPhone: { type: 'string', - title: '', + title: '承运司机', ui: { placeholder: '请输入司机姓名/手机号' } }, - name2: { + carNo: { type: 'string', - title: '', + title: '车牌号', ui: { placeholder: '请输入车牌号' } @@ -98,13 +95,11 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { this.columns = [ { title: '司机姓名', - index: 'name', - width: 120 + index: 'name' }, { title: '手机号', - index: 'telephone', - width: 120 + index: 'telephone' }, { title: '指定车辆', @@ -115,7 +110,6 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { title: '状态', className: 'text-center', index: 'certificationStatus', - width: 120, type: 'badge', badge: { '-1': { text: '未提交', color: 'default' }, @@ -127,12 +121,11 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { { title: '操作', className: 'text-center', - width: 80, buttons: [ { text: '选择', iif: item => item.showChoose != false, - click: (_record, _modal, _instance) => this.choose(_record), + click: (_record, _modal, _instance) => this.verifyVechicleStatus(_record), iifBehavior: 'disabled' } ] @@ -145,7 +138,7 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { { title: '司机姓名', index: 'name', - width: 120 + width: '90px' }, { title: '手机号', @@ -155,17 +148,17 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { { title: '车队长', render: 'captain', - width: '100px' + width: '200px' }, { title: '指定车辆', - index: 'carNo', + render: 'defaultCar', width: '130px' }, { title: '操作', className: 'text-center', - width: 80, + width: '90px', buttons: [ { text: '移除', @@ -198,6 +191,23 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { }); } + /** + * 校验司机是否能设置车队长 + * @param item 当前对象 + */ + verifyCanSetCarCaptain(item: any, index: any) { + this.service.request(this.service.$api_get_sys_config, [{ itemKey: 'sys.config.shipper.setCarCaptain', businessId: this.envSrv.env.enterpriseId }]).subscribe(res => { + if (res && res.length > 0) { + const { itemValue } = res[0]; + if (itemValue !== '1') { + this.service.msgSrv.error('不可设置车队长!'); + return; + } + this.setCaptain(item, index); + } + }) + } + //设置车队长 setCaptain(record: STData, index: any) { this.modalHelper @@ -260,5 +270,53 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { }); } - carChange(event: any, item: STData) {} + carChange(event: any, item: STData) { + + } + + /** + * 验证车辆的状态 + */ + verifyVechicleStatus(_record: STData) { + const { carId, appUserId: driverId, captainAppUserId: carCaptainId } = _record; + const carInfo: any = { carId, driverId, carCaptainId }; + const goodsInfoList = this.submitParams?.goodsInfoList; + this.service.request(this.service.$api_verify_vehicle_status, { ...carInfo, goodsInfoList }).subscribe((res: any) => { + if (res) { + const { title, alert, subContent, content } = res; + switch (alert) { + case 'Error': + this.error(title, content, subContent); + break; + case 'Warn': + this.showConfirm(_record, title, content, subContent); + break; + case 'Success': + this.choose(_record); + break; + } + } + }); + + } + + error(title: string, content: string, subContent: string): void { + this.modalService.error({ + nzTitle: title, + nzContent: `${content ? content : ''}${subContent ? subContent : ''}`, + nzOkText: '知道了' + }); + } + + showConfirm(_record: STData, title: string, content: string, subContent: string): void { + this.modalService.confirm({ + nzTitle: title, + nzContent: `${content ? content : ''}${subContent ? subContent : ''}`, + nzOkText: '继续', + nzCancelText: '取消', + nzOnOk: () => { + this.choose(_record); + } + }); + } } diff --git a/src/app/routes/supply-management/components/choose-famifiar/set-captain/set-captain.component.ts b/src/app/routes/supply-management/components/choose-famifiar/set-captain/set-captain.component.ts index cf3b2b56..395a7514 100644 --- a/src/app/routes/supply-management/components/choose-famifiar/set-captain/set-captain.component.ts +++ b/src/app/routes/supply-management/components/choose-famifiar/set-captain/set-captain.component.ts @@ -1,3 +1,13 @@ +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2021-12-06 15:17:52 + * @LastEditors : Shiming + * @LastEditTime : 2022-03-02 14:29:12 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\choose-famifiar\\set-captain\\set-captain.component.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { SFComponent, SFSchema, SFSchemaEnumType, SFUISchema } from '@delon/form'; @@ -16,7 +26,7 @@ export class PublishchooseFamifiarSetCaptainComponent implements OnInit { i: any; - constructor(public http: _HttpClient, private cdr: ChangeDetectorRef, private route: ActivatedRoute) {} + constructor(public http: _HttpClient, private cdr: ChangeDetectorRef, private route: ActivatedRoute, private modal: NzModalRef,) {} ngOnInit(): void { this.initSF(); @@ -24,12 +34,11 @@ export class PublishchooseFamifiarSetCaptainComponent implements OnInit { initSF() { this.schema = { properties: { - name: { + captainPhone: { type: 'string', title: '车队长手机号' } }, - required: ['name'] }; this.ui = { '*': { @@ -39,6 +48,6 @@ export class PublishchooseFamifiarSetCaptainComponent implements OnInit { }; } - close() {} - save() {} + close() {this.modal.close()} + save() {this.modal.close(this.sf.value.captainPhone)} } diff --git a/src/app/routes/supply-management/services/supply-management.service.ts b/src/app/routes/supply-management/services/supply-management.service.ts index 78dd862e..303b6a46 100644 --- a/src/app/routes/supply-management/services/supply-management.service.ts +++ b/src/app/routes/supply-management/services/supply-management.service.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 11:10:14 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 10:10:18 + * @LastEditTime : 2022-03-02 14:27:18 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\services\\supply-management.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -165,4 +165,6 @@ export class SupplyManagementService extends BaseService { public $api_getNetworkTransporter = '/api/mdc/cuc/enterpriseInfo/operate/getNetworkTransporter'; $api_verify_vehicle_status = `/api/sdc/goodsResourceShipper/saveVerify`;// 发布货源校验司机/车队长的状态 $api_get_sys_config = `/api/mdc/pbc/sysConfigItem/findConfigValues`; // 根据项key、业务id获取配置信息 + // 获取指派熟车列表 + $api_getListCars = '/api/mdc/cuc/enterpriseVehicle/getPracticeCarList'; } From ab6f1c68659063ed036577d898e4cfc7fe8ae608 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Wed, 2 Mar 2022 14:30:37 +0800 Subject: [PATCH 070/107] edit --- .../captain-detail.component.html | 111 ++++--------- .../captain-detail.component.ts | 7 +- .../driver/detail/detail.component.html | 2 +- .../driver/detail/detail.component.ts | 10 +- .../enterprise-audit/view/view.component.ts | 11 +- .../freight/user/detail/detail.component.ts | 11 +- .../usercenter/services/usercenter.service.ts | 11 +- .../audit/detail/detail.component.ts | 124 +++++++------- .../list/detail/detail.component.ts | 154 +++++++++--------- .../components/imagelist/image-list.module.ts | 5 +- .../imagelist/imagelist.component.html | 4 +- .../imagelist/imagelist.component.ts | 19 ++- src/app/shared/shared-zorro.module.ts | 6 +- 13 files changed, 232 insertions(+), 243 deletions(-) diff --git a/src/app/routes/usercenter/components/driver/captain/captain-detail/captain-detail.component.html b/src/app/routes/usercenter/components/driver/captain/captain-detail/captain-detail.component.html index c570f528..2e0189b6 100644 --- a/src/app/routes/usercenter/components/driver/captain/captain-detail/captain-detail.component.html +++ b/src/app/routes/usercenter/components/driver/captain/captain-detail/captain-detail.component.html @@ -11,34 +11,17 @@
-

{{ userDetail?.name }} +

{{ userDetail?.name }}

- -
@@ -56,13 +39,12 @@
- 个人信息 -
@@ -118,27 +157,25 @@ - {{i?.insuranceTypeLabel}} + {{ i?.insuranceTypeLabel }} - {{i?.goodsValue |currency}} - - - {{i?.insurancePremium |currency}} 元 + {{ i?.goodsValue | currency }} + {{ i?.insurancePremium | currency }} 元 - - + +
- {{item?.totalAmount | currency}} + {{ item?.totalAmount | currency }} (含附加费)
- {{item?.price | currency}} + {{ item?.price | currency }}
@@ -147,9 +184,9 @@

- {{(i?.totalAmount) | currency}} + {{ i?.totalAmount | currency }} - (运费{{i?.totalFreight | currency}}含附加运费 {{i?.totalSurcharge| currency}}) + (运费{{ i?.totalFreight | currency }}含附加运费 {{ i?.totalSurcharge | currency }})

收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}/{{ i?.payeeCardNo }}
@@ -158,24 +195,23 @@ - {{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}} + {{ i?.supplementaryInformationVO?.stateReceipt ? '是' : '否' }} {{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }} - {{i?.supplementaryInformationVO?.area}} + {{ i?.supplementaryInformationVO?.area }} - {{i?.supplementaryInformationVO?.address}} + {{ i?.supplementaryInformationVO?.address }} - {{i?.supplementaryInformationVO?.remarks}} + {{ i?.supplementaryInformationVO?.remarks }} - - +
From 82c3801cc6ea10d8f6b895d85fe5553850672cea Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 15:43:25 +0800 Subject: [PATCH 079/107] fix bug --- .../components/vehicle-detail/vehicle-detail.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html index f819e340..8d79823d 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html @@ -75,7 +75,7 @@ [nzStatus]="i?.resourceStatus === '1' ? 'wait' : 'finish'" nzIcon="file-done" [nzTitle]="'接单'" - [nzSubtitle]="i?.endTime" + [nzSubtitle]="i?.orderReceivingTime" > Date: Wed, 2 Mar 2022 15:51:24 +0800 Subject: [PATCH 080/107] =?UTF-8?q?=E8=B4=A7=E6=BA=90=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1=E6=B7=BB=E5=8A=A0=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bulk-detail/bulk-detail.component.html | 53 ++++++++----------- .../vehicle-detail.component.html | 21 +++++--- 2 files changed, 34 insertions(+), 40 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html index fb4c2eb6..9af9096c 100644 --- a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html @@ -13,16 +13,17 @@
网络货运人:{{ i?.shipperAppUserName }}
- - - + + +
- 总费用:{{ i?.totalAmount | currency: '¥' }} + 总费用:{{ i?.totalAmount | currency: '¥' }}
@@ -39,19 +40,13 @@
- - - + + +
@@ -77,10 +72,8 @@
-

装货卸货信息 - ( +

装货卸货信息 + ( ) @@ -130,7 +123,8 @@
- {{ item?.freightPrice | currency: '¥' }} {{ freightType[item?.freightType] }} + {{ item?.freightPrice | currency: '¥' }} {{ + freightType[item?.freightType] }}

@@ -139,8 +133,7 @@ - ({{ item?.count }}) + ({{ item?.count }}) -
+
-
-
- - +
+
+ +
-
- +
+
diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less index 14049ec8..ae775710 100644 --- a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.less @@ -1,10 +1,10 @@ :host { ::ng-deep { - .mapBox { - iframe, canvas { - width: 400px !important; - } - } + // .mapBox { + // iframe, canvas { + // width: 400px !important; + // } + // } } diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts index 4916bc04..5bb83e8a 100644 --- a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-22 13:53:29 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 15:58:57 + * @LastEditTime : 2022-03-02 16:02:51 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -37,24 +37,8 @@ export class OneCarOrderViewtrackComponent implements OnInit { trajectory = 'car'; addressItems: any[] = []; //打点地址数据组 logColumns: STColumn[] = [ - { title: '款项', index: 'expenseCodeLabel' }, - { title: '小计(元)', render: 'price' }, - { title: '运输费(元)', render: 'price' }, - { title: '附加费(元)', render: 'surcharge' }, - { title: '支付时间', index: 'paymentTime' }, - { - title: '支付状态', - className: 'text-center', - index: 'paymentStatus', - type: 'badge', - width: '120px', - badge: { - '1': { text: '待申请', color: 'warning' }, - '2': { text: '已支付', color: 'success' }, - '3': { text: '已拒绝', color: 'warning' }, - '4': { text: '申请中', color: 'warning' } - } - } + { title: '时间', index: 'vinOutTime' }, + { title: '地点', index: 'cityName' }, ]; constructor( private modalRef: NzModalRef, @@ -81,11 +65,11 @@ export class OneCarOrderViewtrackComponent implements OnInit { }); }); this.MapList = list; - this.addressItems = res.parkArray; - if (this.addressItems && this.addressItems.length > 0) { + // this.addressItems = res.parkArray; + this.addressItems = res.cityArray; + if(this.addressItems && this.addressItems.length > 0){ this.addressItems.forEach(item => { - item.parkBte = this.getLocalTime(item.parkBte); - item.parkEte = this.getLocalTime(item.parkEte); + item.vinOutTime = this.getLocalTime(item.vinOutTime); }); } } From 01a406dcef62044f8e1cebe431eb2ff4c6b49e81 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 16:30:31 +0800 Subject: [PATCH 086/107] fix bug --- .../bulk-detail/bulk-detail.component.html | 6 +- .../bulk-detail/bulk-detail.component.ts | 9 +-- .../vehicle-detail.component.html | 6 +- .../vehicle-detail.component.ts | 50 +++------------- .../view-track/view-track.component.html | 6 +- .../bulk-detail/bulk-detail.component.html | 26 +++++---- .../bulk-detail/bulk-detail.component.ts | 57 ++++++++++++------- .../vehicle-detail.component.html | 27 +++++---- .../vehicle-detail.component.ts | 56 +++++++++++------- .../services/waybill-management.service.ts | 7 +-- 10 files changed, 130 insertions(+), 120 deletions(-) diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html index 356c332b..3fa12800 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html @@ -202,11 +202,11 @@
- - + +
- +
diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts index f53df0ff..69355b52 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts @@ -125,17 +125,18 @@ export class OrderManagementBulkeDetailComponent implements OnInit { this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { if (res) { const points = res.trackArray; + let list :any[] = []; points?.forEach((item: any) => { - this.MapList.push({ + list.push({ name: item.hgt, lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] }); }); + this.MapList = list; this.addressItems = res.parkArray; - if (this.addressItems && this.addressItems.length > 0) { + if(this.addressItems && this.addressItems.length > 0){ this.addressItems.forEach(item => { - item.parkBte = this.getLocalTime(item.parkBte); - item.parkEte = this.getLocalTime(item.parkEte); + item.vinOutTime = this.getLocalTime(item.vinOutTime); }); } } diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index adfc52dc..bbd4b5ca 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 11:11:04 + * @LastEditTime : 2022-03-02 16:28:37 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -195,11 +195,11 @@
- +
- +
diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts index 98dca02d..c8674b7b 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 11:11:05 + * @LastEditTime : 2022-03-02 16:19:31 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -37,24 +37,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit { approvalLsit: any; isVisible = false; logColumns: STColumn[] = [ - { title: '款项', index: 'expenseCodeLabel' }, - { title: '小计(元)', render: 'price' }, - { title: '运输费(元)', render: 'price' }, - { title: '附加费(元)', render: 'surcharge' }, - { title: '支付时间', index: 'paymentTime' }, - { - title: '支付状态', - className: 'text-center', - index: 'paymentStatus', - type: 'badge', - width: '120px', - badge: { - '1': { text: '待申请', color: 'warning' }, - '2': { text: '已支付', color: 'success' }, - '3': { text: '已拒绝', color: 'warning' }, - '4': { text: '申请中', color: 'warning' } - } - } + { title: '时间', index: 'vinOutTime' }, + { title: '地点', index: 'cityName' }, ]; trajectory = 'car'; addressItems: any[] = []; //打点地址数据组 @@ -69,7 +53,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit { ngOnInit(): void { this.initData(); - this.MapInit(); + this.MapInit() } initData() { @@ -124,39 +108,23 @@ export class OrderManagementVehicleDetailComponent implements OnInit { // elf['elementRef'].nativeElement.className = 'target-fix' } } - // MapInit() { - // this.service.request('/api/sdc/billShipper/getTrajectoryByBillId', { id: this.id }).subscribe(res => { - // if (res?.trackArray) { - // const points = res?.trackArray; - // const list: any[] = []; - // points.forEach((item: any) => { - // list.push({ - // name: item?.hgt, - // lnglat: [Number((Number(item?.lon) / 600000).toFixed(6)), Number((Number(item?.lat) / 600000).toFixed(6))] - // }); - // }); - // console.log(list); - // this.MapList = list; - // } - // }); - // } - // 获取轨迹 MapInit() { this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { if (res) { const points = res.trackArray; + let list :any[] = []; points?.forEach((item: any) => { - this.MapList.push({ + list.push({ name: item.hgt, lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] }); }); + this.MapList = list; this.addressItems = res.parkArray; - if (this.addressItems && this.addressItems.length > 0) { + if(this.addressItems && this.addressItems.length > 0){ this.addressItems.forEach(item => { - item.parkBte = this.getLocalTime(item.parkBte); - item.parkEte = this.getLocalTime(item.parkEte); + item.vinOutTime = this.getLocalTime(item.vinOutTime); }); } } diff --git a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html index 22d42094..36828461 100644 --- a/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html +++ b/src/app/routes/order-management/modal/vehicle/view-track/view-track.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-22 13:53:29 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 16:10:44 + * @LastEditTime : 2022-03-02 16:18:46 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\view-track\\view-track.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -12,11 +12,11 @@
- +
- +
diff --git a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html index 49d99d29..87af10ed 100644 --- a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html @@ -205,17 +205,23 @@
- -
-
- -
-
- -
-
+ +
+
+ + +
+
+ +
+
+ + + + + +
diff --git a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.ts index cc564ea8..572813c8 100644 --- a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.ts +++ b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-03 15:31:52 - * @LastEditTime : 2022-02-21 19:52:43 + * @LastEditTime : 2022-03-02 16:24:32 * @LastEditors : Shiming * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\bulk-detail\\bulk-detail.component.ts @@ -13,6 +13,7 @@ import { _HttpClient } from '@delon/theme'; import { NzCardComponent } from 'ng-zorro-antd/card'; import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalService } from 'ng-zorro-antd/modal'; +import format from 'date-fns/format'; import { VehicleSureArriveComponent } from 'src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component'; import { VehicleSureDepartComponent } from 'src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component'; import { WaybillManagementServe } from '../../services/waybill-management.service'; @@ -28,27 +29,15 @@ export class WaybillManagementBulkeDetailComponent implements OnInit { totalObj: any; attObj: any; isVisible = false; - logColumns: STColumn[] = [ - { title: '款项', index: 'costName' }, - { title: '运输费(元)', index: 'price',render: 'price' }, - { title: '支付时间', index: 'paymentTime' }, - { - title: '支付状态', - className: 'text-center', - index: 'paymentStatus', - type: 'badge', - width: '120px', - badge: { - '1': { text: '待申请', color: 'warning' }, - '2': { text: '已支付', color: 'success' }, - '3': { text: '已拒绝', color: 'warning' }, - '4': { text: '申请中', color: 'warning' }, - }, - }, - ]; + MapList: any[]=[]; imges: any; unLoadingPlaceVOList: any = []; - + logColumns: STColumn[] = [ + { title: '时间', index: 'vinOutTime' }, + { title: '地点', index: 'cityName' }, + ]; + trajectory = 'car'; + addressItems: any[] = []; //打点地址数据组 constructor( private route: ActivatedRoute, private msgSrv: NzMessageService, @@ -61,7 +50,7 @@ export class WaybillManagementBulkeDetailComponent implements OnInit { ngOnInit(): void { this.initData() - + this.MapInit() } initData() { const params = { @@ -148,4 +137,30 @@ sureArrive(item: any) { this.initData() }); } + // 获取轨迹 + MapInit() { + this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { + if (res) { + const points = res.trackArray; + let list :any[] = []; + points?.forEach((item: any) => { + list.push({ + name: item.hgt, + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + }); + }); + this.MapList = list; + this.addressItems = res.parkArray; + if(this.addressItems && this.addressItems.length > 0){ + this.addressItems.forEach(item => { + item.vinOutTime = this.getLocalTime(item.vinOutTime); + }); + } + } + }); + } + + getLocalTime(time: any) { + return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss'); + } } diff --git a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html index 3c51efaa..b18e685b 100644 --- a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html @@ -189,20 +189,25 @@ -
- -
-
- -
-
- -
-
+ +
+
+ + +
+
+ +
+
+ + + + + +
diff --git a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts index a8ea44e8..421e6348 100644 --- a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-03 15:31:52 - * @LastEditTime : 2022-02-21 19:46:47 + * @LastEditTime : 2022-03-02 16:26:15 * @LastEditors : Shiming * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\vehicle-detail\\vehicle-detail.component.ts @@ -10,6 +10,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { STColumn } from '@delon/abc/st'; import { _HttpClient } from '@delon/theme'; +import format from 'date-fns/format'; import { NzCardComponent } from 'ng-zorro-antd/card'; import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalService } from 'ng-zorro-antd/modal'; @@ -24,30 +25,19 @@ import { WaybillManagementServe } from '../../services/waybill-management.servic export class WaybillManagementVehicleDetailComponent implements OnInit { id = this.route.snapshot.params.id; + MapList: any[]=[]; i: any; totalObj: any; attObj: any; isVisible = false; - logColumns: STColumn[] = [ - { title: '款项', index: 'costName' }, - { title: '运输费(元)', index: 'price', render: 'price' }, - { title: '支付时间', render: 'paymentTime' }, - { - title: '支付状态', - className: 'text-center', - index: 'paymentStatus', - type: 'badge', - width: '120px', - badge: { - '1': { text: '待申请', color: 'warning' }, - '2': { text: '已支付', color: 'success' }, - '3': { text: '已拒绝', color: 'warning' }, - '4': { text: '申请中', color: 'warning' }, - }, - }, - ]; imges: any; unLoadingPlaceVOList: any = []; + logColumns: STColumn[] = [ + { title: '时间', index: 'vinOutTime' }, + { title: '地点', index: 'cityName' }, + ]; + trajectory = 'car'; + addressItems: any[] = []; //打点地址数据组 constructor( private route: ActivatedRoute, @@ -60,7 +50,7 @@ export class WaybillManagementVehicleDetailComponent implements OnInit { ngOnInit(): void { this.initData() - + this.MapInit() } initData() { const params = { @@ -140,4 +130,30 @@ goDistance(elf: NzCardComponent) { }); } + // 获取轨迹 + MapInit() { + this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { + if (res) { + const points = res.trackArray; + let list :any[] = []; + points?.forEach((item: any) => { + list.push({ + name: item.hgt, + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + }); + }); + this.MapList = list; + this.addressItems = res.parkArray; + if(this.addressItems && this.addressItems.length > 0){ + this.addressItems.forEach(item => { + item.vinOutTime = this.getLocalTime(item.vinOutTime); + }); + } + } + }); + } + + getLocalTime(time: any) { + return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss'); + } } diff --git a/src/app/routes/waybill-management/services/waybill-management.service.ts b/src/app/routes/waybill-management/services/waybill-management.service.ts index 84cb458e..94649b1b 100644 --- a/src/app/routes/waybill-management/services/waybill-management.service.ts +++ b/src/app/routes/waybill-management/services/waybill-management.service.ts @@ -2,7 +2,7 @@ import { WaybillManagementBulkComponent } from './../components/bulk/bulk.compon /* * @Author: your name * @Date: 2021-12-07 14:52:29 - * @LastEditTime : 2022-03-02 14:30:55 + * @LastEditTime : 2022-03-02 16:22:23 * @LastEditors : Shiming * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\services\\waybill-management.service.ts @@ -15,8 +15,6 @@ import { BaseService } from 'src/app/shared/services'; }) export class WaybillManagementServe extends BaseService { $api_get_enterprise_project = `/api/mdc/cuc/enterpriseProject/getEnterpriseProjectList `; // 所属项目列表 - $api_get_catalogue_member = `/user?_allow_anonymous=true`; - $api_del_driver = ``; // 据 手机号/姓名 查询 车队长/司机 $api_get_getDriverInfo = `/api/mdc/cuc/user/getDriverInfo`; // 查询整车运单-运营后台 @@ -56,7 +54,8 @@ export class WaybillManagementServe extends BaseService { $api_get_listOperatePage = '/api/sdc/exceptionReport/listOperateUnReplyPage'; // 查询运营端已回复异常上报 $api_get_listOperateReplyPage = '/api/sdc/exceptionReport/listOperateReplyPage'; - + // 获取轨迹 + $api_get_getTrajectory = `/api/sdc/billShipper/getTrajectoryByBillId`; // 获取货主企业列表 public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList'; constructor(public injector: Injector) { From 35c459895e2266aeb35d35a1270ae23fb2a7ec8e Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 16:34:35 +0800 Subject: [PATCH 087/107] fix bug --- .../vehicle-detail/vehicle-detail.component.html | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html index ece1f856..d207afac 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html @@ -13,7 +13,7 @@
网络货运人:{{ i?.enterpriseInfoName }}
- <<<<<<< HEAD @@ -21,16 +21,6 @@ [acl-ability]="['SUPPLY-VEHICLE-DETAIL-changeSupply']">修改货源 - ======= - - - - - >>>>>>> 82c3801cc6ea10d8f6b895d85fe5553850672cea
From 6bcc71ab8ebcce4c8703ab2ec9a47d1ecfd0960e Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 16:34:41 +0800 Subject: [PATCH 088/107] fix bug --- .../vehicle-detail.component.html | 73 ++++++++++++++----- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html index d207afac..8d79823d 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html @@ -13,19 +13,40 @@
网络货运人:{{ i?.enterpriseInfoName }}
- - - - + + + +
- 总费用:{{ i?.totalAmount | currency: '¥' }} + 总费用:{{ i?.totalAmount | currency: '¥' }}
@@ -42,13 +63,27 @@
- - - + + +
@@ -77,8 +112,10 @@
-

装货卸货信息 - ( +

装货卸货信息 + ( ) From 3b016972b095b65892d515f8e53bd7682ba93dd1 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 16:39:24 +0800 Subject: [PATCH 089/107] fix bug --- .../components/network-freight/new/new.component.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/routes/sys-setting/components/network-freight/new/new.component.ts b/src/app/routes/sys-setting/components/network-freight/new/new.component.ts index 63df1d8c..2deb983e 100644 --- a/src/app/routes/sys-setting/components/network-freight/new/new.component.ts +++ b/src/app/routes/sys-setting/components/network-freight/new/new.component.ts @@ -148,12 +148,12 @@ export class NetworkFreightNewComponent implements OnInit { }); } submitForm() { - // if (!this.sf1.valid || !this.sf.valid) { - // this.sf.validator({ emitError: true }); - // this.sf1.validator({ emitError: true }); - // this.service.msgSrv.warning('请修改填写错误信息'); - // return; - // } + if (!this.sf1.valid || !this.sf.valid) { + this.sf.validator({ emitError: true }); + this.sf1.validator({ emitError: true }); + this.service.msgSrv.warning('请修改填写错误信息'); + return; + } const enterpriseRegistrationTime = new Date(this.sf1.value.enterpriseRegistrationTime); const operatingStartTime = new Date(this.sf1.value.operatingStartTime); if (enterpriseRegistrationTime.getTime() > operatingStartTime.getTime()) { From ce57fe029e9713c2a8d22f045ce204a1998c3600 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Wed, 2 Mar 2022 16:42:19 +0800 Subject: [PATCH 090/107] edit --- .../components/role-management/edit/edit.component.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts b/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts index 29c5ec89..683be185 100644 --- a/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts +++ b/src/app/routes/sys-setting/components/role-management/edit/edit.component.ts @@ -83,14 +83,11 @@ export class SettingRoleEditComponent implements OnInit { this.service.msgSrv.warning('校验错误'); return; } - // this.menu.washTree(); - // if (this.authorityAssistId.length === 0) { - // this.service.msgSrv.warning('请选择权限!'); - // return; - // } - console.log(this.params); - const auths = this.menu?.washTree(); + if (auths.authorityAssistId.length === 0) { + this.service.msgSrv.warning('请选择权限!'); + return; + } const params: any = { id: this.params.id, ...this.sf.value, From 899c708482d019e3c7c7115b0ae0485778d35165 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 16:43:48 +0800 Subject: [PATCH 091/107] fix bug --- .../components/network-freight/new/new.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/sys-setting/components/network-freight/new/new.component.ts b/src/app/routes/sys-setting/components/network-freight/new/new.component.ts index 2deb983e..6ed3a65e 100644 --- a/src/app/routes/sys-setting/components/network-freight/new/new.component.ts +++ b/src/app/routes/sys-setting/components/network-freight/new/new.component.ts @@ -151,7 +151,7 @@ export class NetworkFreightNewComponent implements OnInit { if (!this.sf1.valid || !this.sf.valid) { this.sf.validator({ emitError: true }); this.sf1.validator({ emitError: true }); - this.service.msgSrv.warning('请修改填写错误信息'); + this.service.msgSrv.warning('请填写必填项!'); return; } const enterpriseRegistrationTime = new Date(this.sf1.value.enterpriseRegistrationTime); @@ -584,7 +584,7 @@ export class NetworkFreightNewComponent implements OnInit { } } }, - required: ['certificatePhotoFront', 'certificatePhotoBack', 'name', 'certificateType', 'certificateNumber',] + required: ['certificatePhotoFront', 'certificatePhotoBack', 'name', 'certificateType', 'certificateNumber','certificatePhotoFrontWatermark','certificatePhotoBackWatermark'] } }, required: [ From ec47e67b21048476f0e8c93e09ed01fe9b56e26e Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Wed, 2 Mar 2022 16:48:49 +0800 Subject: [PATCH 092/107] edit --- .../freight-account-detail.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.ts b/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.ts index 8330957b..d3d962dc 100644 --- a/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.ts +++ b/src/app/routes/financial-management/components/freight-account/freight-account-detail/freight-account-detail.component.ts @@ -199,8 +199,8 @@ export class FreightAccountDetailComponent implements OnInit { { title: '流水号', index: 'transactionNumber', width: 170 }, { title: '交易类型', index: 'tradeTypeLabel', className: 'text-center', width: 140 }, { title: '交易单号', index: 'businessNumber', width: 170 }, - { title: '订单号', index: 'business2Number', width: 170 }, - { title: '运单号', index: 'busine1ssNumber', width: 170 }, + { title: '订单号', index: 'orderSn', width: 170 }, + { title: '运单号', index: 'transportSn', width: 170 }, { title: '货主', index: 'enterpriseName' , width: 170}, { title: '所属项目', index: 'projectName' , width: 170}, { title: '收支类型', index: 'incomeTypeLabel', className: 'text-center', width: 140 }, @@ -220,9 +220,9 @@ export class FreightAccountDetailComponent implements OnInit { className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.accountBalance }) } }, - { title: '付款方', index: 'busine111ssNumber' , width: 170}, + { title: '付款方', index: 'payName' , width: 170}, { title: '收款方', index: 'payeeName', width: 170 }, - { title: '备注', index: 'projectId1', width: 170 } + { title: '备注', index: 'tradeContent', width: 170 } ]; } } From 5a7e7df5c5b6a2458ca52e363dae1a41f97dae60 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 16:55:35 +0800 Subject: [PATCH 093/107] fix bug --- .../network-freight/network-freight.component.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts b/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts index 3d86fbce..f5e23a68 100644 --- a/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts +++ b/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts @@ -326,7 +326,10 @@ export class NetworkFreightComponent implements OnInit { 'drawer' ] }; - this.ui3 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } }; + this.ui3 = { + '*': { spanLabelFixed: 120, grid: { span: 24 } }, + '$taxClassificationVersion': { spanLabelFixed: 150, grid: { span: 24 } }, + }; } initSFTax() { this.TaxSchema = { @@ -574,7 +577,7 @@ export class NetworkFreightComponent implements OnInit { } // 新增 creat(value?: any) { - console.log(value) - this.router.navigate(['./new/'+ value?.id], { relativeTo: this.ar }); + console.log(value); + this.router.navigate(['./new/' + value?.id], { relativeTo: this.ar }); } } From bf14ddd7eb0737ae76a360471b810ea8e483498f Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 17:02:10 +0800 Subject: [PATCH 094/107] fix bug --- .../components/bulk-detail/bulk-detail.component.html | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html index 4d996866..5d118b1f 100644 --- a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html @@ -13,20 +13,12 @@
网络货运人:{{ i?.shipperAppUserName }}
- <<<<<<< HEAD - - - ======= - >>>>>>> 82c3801cc6ea10d8f6b895d85fe5553850672cea
From 67e54f2a13b3145cf506de8ad5f8a065dd498d6b Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 17:18:42 +0800 Subject: [PATCH 095/107] fix bug --- .../supply-management/components/bulk/bulk.component.ts | 2 +- .../components/vehicle/vehicle.component.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.ts b/src/app/routes/supply-management/components/bulk/bulk.component.ts index acd942c8..cd18ca36 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -459,7 +459,7 @@ export class SupplyManagementBulkComponent implements OnInit { * 审核通过按钮 */ handleOK(value: any) { - if(this.selectedRows.length <= 0) { + if(this.auditMany === false) { const params: any = { id: this.auditID, remarks: this.sfFre.value.remarks, diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts index 95e34137..d3c00b09 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -227,9 +227,7 @@ export class SupplyManagementVehicleComponent implements OnInit { * 审核通过按钮 */ handleOK(value: any) { - console.log(this.sfFre.valid); - console.log(this.sfFre.value); - if (this.selectedRows.length <= 0) { + if (this.auditMany === false) { const params: any = { id: this.auditID, remarks: this.sfFre.value.remarks @@ -239,6 +237,7 @@ export class SupplyManagementVehicleComponent implements OnInit { } else { params.auditStatus = 3; } + console.log('999'); console.log(params); this.service.request(this.service.$api_goodsResourceAudit, params).subscribe(res => { if (res === true) { From a017104170c1904a1019a0f7c2219df0ec28aa31 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Wed, 2 Mar 2022 17:29:08 +0800 Subject: [PATCH 096/107] edit --- .../invoice-requested-detail.component.html | 2 +- .../invoice-requested-detail.component.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html index cb94640e..04e52e6a 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.html @@ -106,7 +106,7 @@

- diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts index 4f65c1cb..fc9c0897 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts @@ -166,9 +166,9 @@ export class InvoiceRequestedDetailComponent implements OnInit { routeToOrder(item: any) { if (item.billType === 1) { - this.router.navigate(['/order-management/vehicle-detail/' + item.billHId]); + this.router.navigate(['/order-management/vehicle/vehicle-detail/' + item.billHId]); } else { - this.router.navigate(['/order-management/bulk-detail/' + item.billHId]); + this.router.navigate(['/order-management/bulk/bulk-detail/' + item.billHId]); } } From a8ed4b000010c344ddd5cac500592f72f79a6d98 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Wed, 2 Mar 2022 17:30:58 +0800 Subject: [PATCH 097/107] edit --- .../components/payment-record/payment-record.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/financial-management/components/payment-record/payment-record.component.html b/src/app/routes/financial-management/components/payment-record/payment-record.component.html index f8e57409..38aa1e2f 100644 --- a/src/app/routes/financial-management/components/payment-record/payment-record.component.html +++ b/src/app/routes/financial-management/components/payment-record/payment-record.component.html @@ -36,9 +36,9 @@ {{ item.orderPaymentCode }}
{{ item.paymentStatusLabel }}
- 预付:¥{{ item.price }}
+ 预付:{{ item.price | currency }}
- 附加费:¥ {{ item.surcharge }} + 附加费: {{ item.surcharge| currency }}
From 60d00f960cb2f99ef7a3461b486d01fccf63de63 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 17:37:11 +0800 Subject: [PATCH 098/107] fix bug --- .../bulk-detail/bulk-detail.component.ts | 2 +- .../vehicle-detail.component.html | 6 +++++- .../vehicle-detail.component.ts | 19 ++++++++++++------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts index 9eca7624..235faf6f 100644 --- a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts +++ b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts @@ -20,7 +20,7 @@ export class SupplyManagementBulkDetailComponent implements OnInit { logColumns: STColumn[] = [ { title: '内容', index: 'operationContent' }, { title: '操作人', index: 'operator' }, - { title: '操作时间', index: ' operatorTimestamp' }, + { title: '操作时间', index: 'operatorTimestamp' }, ]; driverColums: STColumn[] = [ { title: '司机姓名', index: 'theme' }, diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html index 8d79823d..28c6636e 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html @@ -212,6 +212,10 @@ - + +
diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts index b70c8827..ce6a9c05 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts @@ -17,15 +17,15 @@ export class SupplyManagementVehicleDetailComponent implements OnInit { id = this.route.snapshot.params.id; i: any; - logColumns: STColumn[] = [ - { title: '内容', index: 'theme' }, - { title: '操作人', index: 'operationUserPhone' }, - { title: '操作时间', index: ' createTime' }, - ]; serviceType: any = { 1: '抢单', 2: '指派' } + logColumns: STColumn[] = [ + { title: '内容', index: 'operationContent' }, + { title: '操作人', index: 'operator' }, + { title: '操作时间', index: 'operatorTimestamp' }, + ]; totalObj: any; attObj: any; status: any = { 1: '待接单', 2: '已接单', 3: '已取消' }; @@ -50,11 +50,16 @@ export class SupplyManagementVehicleDetailComponent implements OnInit { render: 'price' }, ]; - + get reqParams() { + return { + operateObject: this.i?.resourceCode, + operateType: 4, + }; + } constructor( private route: ActivatedRoute, private msgSrv: NzMessageService, - private service: SupplyManagementService, + public service: SupplyManagementService, public modal: NzModalService, public router: Router ) { From 946bd59ffb2871d4669db7d454d25ccd7cb8d079 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 2 Mar 2022 17:50:07 +0800 Subject: [PATCH 099/107] fix bug --- .../components/network-freight/network-freight.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts b/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts index f5e23a68..ec676d98 100644 --- a/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts +++ b/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts @@ -244,12 +244,12 @@ export class NetworkFreightComponent implements OnInit { ui: { placeholder: '请输入' } }, invoiceTaxRate: { - type: 'string', + type: 'number', title: '发票税率', ui: { placeholder: '请输入' } }, invoiceMaxAmount: { - type: 'string', + type: 'number', title: '发票面额上限', ui: { placeholder: '请输入' } }, @@ -366,7 +366,7 @@ export class NetworkFreightComponent implements OnInit { ui: { placeholder: '请输入' } }, invoiceTaxRate: { - type: 'string', + type: 'number', title: '发票税率', ui: { placeholder: '请输入' } }, From 5387c5d882a15b4a8af0fa8c7a1867eb9b6980f7 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Wed, 2 Mar 2022 17:53:29 +0800 Subject: [PATCH 100/107] edit --- .../driver/captain/captain.component.ts | 10 +++++----- .../driver/detail/detail.component.html | 20 ++++++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/app/routes/usercenter/components/driver/captain/captain.component.ts b/src/app/routes/usercenter/components/driver/captain/captain.component.ts index 88314530..0b797772 100644 --- a/src/app/routes/usercenter/components/driver/captain/captain.component.ts +++ b/src/app/routes/usercenter/components/driver/captain/captain.component.ts @@ -223,11 +223,11 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { }, acl: { ability: ['USERCENTER-DRIVER-CAPTAIN-view'] } }, - { - text: '基础设置', - click: item => this.settingAction(item), - acl: { ability: ['USERCENTER-DRIVER-CAPTAIN-basicSetting'] } - } + // { + // text: '基础设置', + // click: item => this.settingAction(item), + // acl: { ability: ['USERCENTER-DRIVER-CAPTAIN-basicSetting'] } + // } ] } ]; diff --git a/src/app/routes/usercenter/components/driver/detail/detail.component.html b/src/app/routes/usercenter/components/driver/detail/detail.component.html index 362e4952..b70f5df7 100644 --- a/src/app/routes/usercenter/components/driver/detail/detail.component.html +++ b/src/app/routes/usercenter/components/driver/detail/detail.component.html @@ -47,7 +47,7 @@ nzType="check-circle" nzTheme="fill" class="mr-xs">审核通过