Merge branch 'develop'

This commit is contained in:
wangshiming
2022-04-27 20:00:11 +08:00
17 changed files with 266 additions and 206 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-01-18 09:51:21
* @LastEditors : Shiming
* @LastEditTime : 2022-04-27 11:21:30
* @LastEditTime : 2022-04-27 17:26:44
* @FilePath : \\tms-obc-web\\proxy.conf.js
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
@ -30,7 +30,7 @@ module.exports = {
// },
'//api': {
target: {
host: 'tms-api-test.eascs.com',
host: 'tms-api-dev.eascs.com',
protocol: 'https:',
port: 443
},

View File

@ -9,15 +9,16 @@
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper title="合同管理" [tab]="tpTab">
</page-header-wrapper>
<ng-template #tpTab>
<nz-tabset [(nzSelectedIndex)]="selectedIndex">
<nz-tab nzTitle="明细合同">
<nz-tab nzTitle="明细合同" *ngIf="isShowDetail">
<app-contract-management-contract-list></app-contract-management-contract-list>
</nz-tab>
<nz-tab nzTitle="框架合同">
<app-contract-management-contract-frame></app-contract-management-contract-frame>
<nz-tab nzTitle="框架合同"*ngIf="isShowFrame">
<app-contract-management-contract-frame ></app-contract-management-contract-frame>
</nz-tab>
<nz-tab nzTitle="合伙人合同">
<app-contract-management-contract-partner></app-contract-management-contract-partner>

View File

@ -1,5 +1,5 @@
/*
* @Description :
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-07 13:27:10
@ -10,18 +10,25 @@
*/
import { Component, OnInit } from '@angular/core';
import { ACLService } from '@delon/acl';
import { ModalHelper, _HttpClient } from '@delon/theme';
@Component({
selector: 'app-supply-management-index',
templateUrl: './index.component.html',
templateUrl: './index.component.html'
})
export class ContractManagementIndexComponent implements OnInit {
selectedIndex = 0;
constructor(private http: _HttpClient, private modal: ModalHelper) { }
ngOnInit(): void { }
isShowDetail = false;
isShowFrame = false;
constructor(private http: _HttpClient, private modal: ModalHelper, private acl: ACLService) {
const acls = acl.data.abilities || [];
this.isShowDetail = !!acls.find(acl => acl === 'CONTRACT-INDEX-searchDetail');
this.isShowFrame = !!acls.find(acl => acl === 'CONTRACT-INDEX-listFrame');
console.log(this.isShowFrame);
}
ngOnInit(): void {}
}

View File

@ -1,5 +1,5 @@
/*
* @Description :
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-04 21:05:49
@ -19,12 +19,16 @@ import { ContractManagementIndexComponent } from './components/index/index.compo
import { ContractManagementPolicyComponent } from './components/policy/policy.component';
import { ContractManagementTemplateComponent } from './components/template/template.component';
const routes: Routes = [
{ path: 'index', component: ContractManagementIndexComponent },
{ path: 'index', component: ContractManagementIndexComponent, data: { guard: { ability: ['CONTRACT-INDEX-searchDetail'] } } },
{ path: 'index/detail/:id', component: ContractManagementDetailComponent },
{ path: 'template', component: ContractManagementTemplateComponent },
{ path: 'template/text/:id', component: ContractManagementTemplateTextComponent },
{ path: 'policy', component: ContractManagementPolicyComponent },
{ path: 'partner', component: ContractManagementPartnerComponent },
{ path: 'template', component: ContractManagementTemplateComponent, data: { guard: { ability: ['CONTRACT-TEMPLATE-search'] } } },
{
path: 'template/text/:id',
component: ContractManagementTemplateTextComponent,
data: { guard: { ability: ['CONTRACT-TEMPLATE-detail'] } }
},
{ path: 'policy', component: ContractManagementPolicyComponent, data: { guard: { ability: ['CONTRACT-POLICY-search'] } } },
{ path: 'partner', component: ContractManagementPartnerComponent }
];
@NgModule({

View File

@ -224,6 +224,7 @@ export class PaymentOrderComponent extends BasicTableComponent implements OnInit
buttons: [
{
text: '浏览',
acl: { ability: ['FINANCIAL-PAYMENT-ORDER-view'] },
click: item => this.router.navigate(['/financial-management/payment-order/detail/' + item.id])
}
// {

View File

@ -1039,11 +1039,12 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
paymentDays: this.sf7.value.paymentDays,
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
subtotal: this.sf7.value.subtotal,
total: this.sf7.value.total,
subtotal: this.sf7.value.subtotal.toFixed(2),
total: this.sf7.value.total.toFixed(2),
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,
goodsValue: this.sf4.value.goodsValue
};
console.log(params)
const modalRef = this.modalService.create({
nzTitle: '运输协议',
nzContent: TranAgreementComponent,

View File

@ -986,8 +986,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
...this.sf6.value,
expenseDTOList: expenseList,
paymentDays: this.sf7.value.paymentDays,
subtotal: this.sf7.value.subtotal,
total: this.sf7.value.total,
subtotal: this.sf7.value.subtotal.toFixed(2),
total: this.sf7.value.total.toFixed(2),
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-02-24 20:19:51
* @LastEditors : Shiming
* @LastEditTime : 2022-04-15 15:18:29
* @LastEditTime : 2022-04-27 19:52:22
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/

View File

@ -7,7 +7,7 @@
</div>
<div class="rightBox">
<nz-tabset [nzSize]="'small'">
<nz-tab nzTitle="操作权限">
<nz-tab nzTitle="操作权限(查询权限必须勾选)">
<div *ngIf="origin.buttonInfoList && origin.buttonInfoList.length">
<label style="width: 100%" nz-checkbox [ngModel]="_apiAuthSet.has(item.functionButtonId)"
*ngFor="let item of origin.buttonInfoList"

View File

@ -209,12 +209,12 @@ export class TaxManagementInvoiceReportingComponent implements OnInit {
this.columns = [
{ title: '', type: 'checkbox', className: 'text-center', width: '60px', },
{ title: '上传状态', render: 'uploadSts', className: 'text-center', width: '120px', },
{ title: '发票类型', render: 'invoiceType', className: 'text-center', width: '120px', },
{ title: '发票类型', render: 'invoiceType', className: 'text-center', width: '180px', },
{
title: '发票号码',
index: 'invoiceno',
className: 'text-center',
width: '150px',
width: '120px',
type: 'link',
click: item => {
window.open(`/#/ticket/invoice-list/detail/${item.vatinvHId}?type=${item.invoiceType}`, '_blank', 'noopener')
@ -235,17 +235,17 @@ export class TaxManagementInvoiceReportingComponent implements OnInit {
},
{ title: '购买方统一社会信用代码', index: 'artotaxno', className: 'text-center', width: '200px' },
{
title: '订单号', index: 'billHCode', className: 'text-center', width: '120px', type: 'link',
title: '订单号', index: 'billHCode', className: 'text-center', width: '180px', type: 'link',
click: item => {
window.open(`/#/order-management/vehicle/vehicle-detail/${item.ltdId}`, '_blank', 'noopener')
}
},
{ title: '货物名称', index: 'goodsinfo', className: 'text-center', width: '180px' },
{ title: '价税合计', index: 'vatmoney', className: 'text-center', width: '180px' },
{ title: '货物名称', index: 'goodsinfo', className: 'text-center', width: '120px' },
{ title: '价税合计', index: 'vatmoney', className: 'text-center', width: '120px' },
{ title: '开票日期', index: 'invoicedate', className: 'text-center', width: '180px' },
{ title: '发票所属月份', index: 'invoicemonth', className: 'text-center', width: '250px' },
{ title: '发票状态', index: 'sts', render: 'sts', className: 'text-center', width: '200px' },
{ title: '上传日期', index: 'uoloadDate', className: 'text-center', width: '200px' },
{ title: '发票所属月份', index: 'invoicemonth', className: 'text-center', width: '140px' },
{ title: '发票状态', index: 'sts', render: 'sts', className: 'text-center', width: '120px' },
{ title: '上传日期', index: 'uoloadDate', className: 'text-center', width: '180px' },
];
}

View File

@ -33,7 +33,7 @@ export class TaxManagementOrderReportingComponent implements OnInit {
{ name: '异常', value: '2' },
{ name: '全部', value: '' }
];
selectedIndex = ''; //选择的项目
selectedIndex = '0'; //选择的项目
serviceTel = '';
constructor(
public service: TaxManagementService,

View File

@ -42,7 +42,7 @@ export class TaxManagementService extends ShipperBaseService {
// 撤回税务订单
$api_get_recessionTaxOrder = `/api/sdc/tax/recessionTaxOrder`;
// 上传税务订单
$api_get_uploadingTaxOrder = `/api/sdc/tax/uploadingTaxOrder`;
$api_get_uploadingTaxOrder = `/api/sdc/taxOrder/orderUploadDJtax`;
// 上传税务订单
$api_get_getTaxFieldCheckList = `/api/sdc/taxFieldCheck/getTaxFieldCheckList`;

View File

@ -33,5 +33,8 @@
<span *ngIf="item.sts === '6'">已撤销</span>
<span *ngIf="item.sts === '7'">已作废</span>
</ng-template>
<ng-template st-row="serviceType" let-item let-index="index">
<span>{{item.billTypeLabel + item.serviceTypeLabel}}</span>
</ng-template>
</st>
</nz-card>

View File

@ -77,14 +77,28 @@ export class BillingOrderComponent implements OnInit {
serviceType: {
title: '服务类型',
type: 'string',
enum: [{
label: '全部',
value: ''
},{
label: '整车抢单',
value: 1
},{
label: '整车指派',
value: 2
},{
label: '大宗抢单',
value: 3
},{
label: '大宗指派',
value: 4
},{
label: '结算单',
value: 5
}],
ui: {
widget: 'dict-select',
params: { dictKey: 'service:type' },
containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema
widget: 'select',
}
},
shipperAppUserName: {
type: 'string',
@ -179,7 +193,7 @@ export class BillingOrderComponent implements OnInit {
private initST(): STColumn[] {
return [
{ title: '订单号', index: 'billCode', type:'link', className: 'text-center', width: 180, click: _record => this.routeTo(_record) },
{ title: '订单号', index: 'billCode', type: 'link', className: 'text-center', width: 180, click: _record => this.routeTo(_record) },
{ title: '运单号', index: 'wayBillCode', width: 180, className: 'text-center' },
{ title: '银行类型', index: 'bankTypeLabel', render: 'bankType', width: 100, className: 'text-center' },
{ title: '网络货运人', index: 'enterpriseInfoName', width: 220, className: 'text-center' },
@ -234,24 +248,24 @@ export class BillingOrderComponent implements OnInit {
{ title: '所属项目', index: 'enterpriseProjectName', width: '180px', className: 'text-center', },
{
title: '服务类型',
index: 'serviceTypeLabel',
width: '180px',
render: 'serviceType',
width: '120px',
className: 'text-center'
},
{ title: '装货地', index: 'consignor', width: '180px', className: 'text-center' },
{ title: '卸货地', index: 'consignee', width: '180px', className: 'text-center' },
{ title: '货物信息', index: 'goodsName', className: 'text-center', width: '180px' },
{ title: '车牌号', index: 'carNo', className: 'text-center', width: '180px' },
{ title: '货物信息', index: 'goodsName', className: 'text-center', width: '140px' },
{ title: '车牌号', index: 'carNo', className: 'text-center', width: '120px' },
{
title: '承运司机',
index:'driverName',
index: 'driverName',
className: 'text-center',
width: '180px',
width: '120px',
},
{
title: '车队长',
className: 'text-center',
width: '180px',
width: '120px',
index: 'carCaptainName',
},
{ title: '业务员', width: '100px', index: 'salesmanName', className: 'text-center', },
@ -260,16 +274,16 @@ export class BillingOrderComponent implements OnInit {
{ title: '卸货时间', index: 'unloadTime', type: 'date', width: '150px', className: 'text-center', },
{ title: '订单完成时间', index: 'orderReceivingTime', type: 'date', width: 150, className: 'text-center', },
{ title: '支付完成时间', index: 'overallPaymentTime', type: 'date', width: 150, className: 'text-center', },
{ title: '开票状态', index: 'sts', render: 'sts', className: 'text-center', width: 180 },
{ title: '开票状态', index: 'sts', render: 'sts', className: 'text-center', width: 120 },
{ title: '申请开票时间', index: 'vatappdate', type: 'date', className: 'text-center', width: 180 },
{ title: '申请开票编号', index: 'vatappcode', className: 'text-center', width: 180 },
{ title: '分票编号', index: 'vatinvcode', width: '180px', className: 'text-center', },
{ title: '申请开票编号', index: 'vatappcode', className: 'text-center', width: 190 },
{ title: '分票编号', index: 'vatinvcode', width: '200px', className: 'text-center', },
{ title: '发票号码', index: 'invoiceno', width: 130, className: 'text-center', },
{ title: '发票代码', index: 'invoiceno2', width: 130, className: 'text-center' },
{ title: '开票日期', index: 'invoicedate', type: 'date', width: 150, className: 'text-center' },
// { title: '作废日期', index: 'invalidTime', type: 'date', width: 150 }, // TODO
{
title: 'ETC开票金额', index: 'etcInvoiceMoney', className: 'text-center', width: 200, type: 'widget',
title: 'ETC开票金额', index: 'etcInvoiceMoney', className: 'text-center', width: 120, type: 'widget',
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.etcInvoiceMoney }) }
}
];

View File

@ -36,7 +36,7 @@
<strong class="text-red">{{totalCallNo }}</strong>
<a *ngIf="totalCallNo > 0" (click)="st.clearCheck();totalCallNo=0" class="ml-lg">清空</a>
</div>
<button nz-button *ngIf="resourceStatus===1 || !resourceStatus" (click)="this.batchPush()">推送开票</button>
<!-- <button nz-button *ngIf="resourceStatus===1 || !resourceStatus" (click)="this.batchPush()">推送开票</button> -->
<!-- <button nz-button *ngIf="resourceStatus===1 || !resourceStatus"
(click)="this.batchRemove(selectedRows)">移除</button>
<button nz-button *ngIf="resourceStatus===2 || !resourceStatus"

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-03-14 14:17:38
* @LastEditors : Shiming
* @LastEditTime : 2022-03-25 16:22:32
* @LastEditTime : 2022-04-27 19:39:30
* @FilePath : \\tms-obc-web\\src\\app\\routes\\vehicle\\components\\list\\carauth\\carauth.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -38,9 +38,12 @@
<ng-template sf-template="agreeImg" let-me let-ui="ui" let-schema="schema">
<img height="104" src="/assets/images/vehicle/agreement.png" class="borderImg" />
</ng-template>
<div #aaa style="position: absolute; top: 87.5%; left: 21%; opacity: 0; ">
<div style="color: #0c77e7;" (click)='view()'>点击查看行政区域代码</div>
</div>
</sf>
<img class="drivercard borderImg" height="104" src="/assets/images/vehicle/car.png" />
<div class="modal-footer">
<button nz-button type="button" (click)="close()">关闭</button>
<button nz-button type="button" nzType="primary" (click)="submitForm()" [disabled]="!(sf?.valid && i.flag !== 'view')" [nzLoading]="service.http.loading">确定</button>

View File

@ -2,7 +2,7 @@ import { Placeholder } from '@angular/compiler/src/i18n/i18n_ast';
import { Component, OnInit, ViewChild } from '@angular/core';
import { apiConf } from '@conf/api.conf';
import { cacheConf } from '@conf/cache.conf';
import { SFUISchema, SFSchema, SFUploadWidgetSchema, SFComponent, SFSelectWidgetSchema } from '@delon/form';
import { SFUISchema, SFSchema, SFUploadWidgetSchema, SFComponent, SFSelectWidgetSchema, SFTextWidgetSchema } from '@delon/form';
import { _HttpClient } from '@delon/theme';
import { EACacheService, EAEnvironmentService } from '@shared';
import { NzModalRef } from 'ng-zorro-antd/modal';
@ -17,6 +17,7 @@ import { VehicleService } from '../../../services/vehicle.service';
})
export class CarSettleCarauthComponent implements OnInit {
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ViewChild('aaa', { static: false }) aaa!:any;
record: any = {};
i: any;
ui: SFUISchema = {};
@ -25,37 +26,39 @@ export class CarSettleCarauthComponent implements OnInit {
showJopFlag = false;
companyData: any = {};
detailData: any = {};
carNo = ''
carNo = '';
private titles = `
根据监管要求:总质量 4.5 吨及以下普通货 运车辆的,可填车籍地 6 位行政区域代码+000000。
`;
constructor(
private modal: NzModalRef,
public service: VehicleService,
private envSrv: EAEnvironmentService,
private eaCacheSrv: EACacheService,
) { }
private eaCacheSrv: EACacheService
) {}
ngOnInit(): void {
this.initData()
this.initSF()
this.initData();
this.initSF();
}
initData() {
if (this.i.id) {
this.companyData = this.eaCacheSrv.get(cacheConf.env)
this.companyData = this.eaCacheSrv.get(cacheConf.env);
const params = {
id: this.i.id,
}
id: this.i.id
};
this.service.request(this.service.$api_shipperCarGet, params).subscribe(res => {
this.detailData = res
this.detailData.isSelf = res.isSelf ? 1 : 0
this.detailData.isTrailer = res.isTrailer ? 1 : 0
this.detailData = res;
this.detailData.isSelf = res.isSelf ? 1 : 0;
this.detailData.isTrailer = res.isTrailer ? 1 : 0;
this.detailData.carFrontPhotoWatermark = [
{
uid: -1,
name: 'LOGO',
status: 'done',
url: this.detailData.carFrontPhotoWatermark,
response: this.detailData.carFrontPhotoWatermark,
},
response: this.detailData.carFrontPhotoWatermark
}
];
this.detailData.carProtocalWatermark = [
{
@ -63,8 +66,8 @@ export class CarSettleCarauthComponent implements OnInit {
name: 'LOGO',
status: 'done',
url: this.detailData.carProtocalWatermark,
response: this.detailData.carProtocalWatermark,
},
response: this.detailData.carProtocalWatermark
}
];
this.detailData.certificatePhotoFrontWatermark = [
{
@ -72,8 +75,8 @@ export class CarSettleCarauthComponent implements OnInit {
name: 'LOGO',
status: 'done',
url: this.detailData.certificatePhotoFrontWatermark,
response: this.detailData.certificatePhotoFrontWatermark,
},
response: this.detailData.certificatePhotoFrontWatermark
}
];
this.detailData.certificatePhotoBackWatermark = [
{
@ -81,8 +84,8 @@ export class CarSettleCarauthComponent implements OnInit {
name: 'LOGO',
status: 'done',
url: this.detailData.certificatePhotoBackWatermark,
response: this.detailData.certificatePhotoBackWatermark,
},
response: this.detailData.certificatePhotoBackWatermark
}
];
this.detailData.roadTransportPhotoWatermark = [
{
@ -90,10 +93,10 @@ export class CarSettleCarauthComponent implements OnInit {
name: 'LOGO',
status: 'done',
url: this.detailData.roadTransportPhotoWatermark,
response: this.detailData.roadTransportPhotoWatermark,
},
response: this.detailData.roadTransportPhotoWatermark
}
];
})
});
}
}
initSF() {
@ -112,7 +115,7 @@ export class CarSettleCarauthComponent implements OnInit {
widget: 'upload',
descriptionI18n: '请上传车头照照片支持JPG、PNG格式文件小于5M。',
data: {
appId: this.envSrv.env.appId,
appId: this.envSrv.env.appId
},
name: 'multipartFile',
multiple: false,
@ -127,9 +130,9 @@ export class CarSettleCarauthComponent implements OnInit {
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
url: args.file.response.data.fullFileWatermarkPath
}
}
];
this.sf?.setValue('/carFrontPhotoWatermark', avatar);
this.detailData.carFrontPhoto = args.file.response.data.fullFilePath;
@ -144,13 +147,13 @@ export class CarSettleCarauthComponent implements OnInit {
observer.complete();
return;
}
console.log(_fileList)
console.log(_fileList);
observer.next(isLt2M);
observer.complete();
});
},
// previewFile: (file: NzUploadFile) => of(
}
// previewFile: (file: NzUploadFile) => of(
// file?.response?.data?.fullFilePath
// ),
}
@ -160,8 +163,8 @@ export class CarSettleCarauthComponent implements OnInit {
maxLength: 9,
type: 'string',
ui: {
placeholder: '请输入',
},
placeholder: '请输入'
}
},
carNoColor: {
title: '车牌颜色',
@ -170,24 +173,26 @@ export class CarSettleCarauthComponent implements OnInit {
widget: 'dict-select',
params: { dictKey: 'car:color' },
placeholder: '请选择车牌颜色',
containsAllLabel:false,
} as SFSelectWidgetSchema,
containsAllLabel: false
} as SFSelectWidgetSchema
},
carModel: {
title: '车型',
type: 'string',
readOnly: true,
ui: {
placeholder:'请上传行驶证自动带出'
},
placeholder: '请上传行驶证自动带出'
}
},
carEnergyType: {
title: '车辆能源类型',
type: 'string',
readOnly: true,
ui: {
placeholder:'请输入车辆能源类型'
},
widget: 'dict-select',
params: { dictKey: 'car:energy:type' },
placeholder: '请选择车辆能源类型',
containsAllLabel: false
}
},
carLength: {
title: '车长',
@ -196,20 +201,20 @@ export class CarSettleCarauthComponent implements OnInit {
widget: 'dict-select',
params: { dictKey: 'car:length' },
placeholder: '请选择车长',
containsAllLabel:false,
} as SFSelectWidgetSchema,
containsAllLabel: false
} as SFSelectWidgetSchema
},
carLoad: {
title: '载重',
title: '核定载质量',
type: 'string',
maxLength: 6,
ui: {
placeholder: '请输入',
addOnAfter: '吨',
change: (val: any) =>{
const value = val.replace(/\D/g,'')
this.sf.setValue('/carLoad', value)
},
change: (val: any) => {
const value = val.replace(/\D/g, '');
this.sf.setValue('/carLoad', value);
}
}
},
isSelf: {
@ -217,11 +222,11 @@ export class CarSettleCarauthComponent implements OnInit {
type: 'string',
enum: [
{ label: '否', value: 0 },
{ label: '是', value: 1 },
{ label: '是', value: 1 }
],
ui: {
widget: 'select',
placeholder: '请选择',
placeholder: '请选择'
}
},
isTrailer: {
@ -229,11 +234,11 @@ export class CarSettleCarauthComponent implements OnInit {
type: 'string',
enum: [
{ label: '否', value: 0 },
{ label: '是', value: 1 },
{ label: '是', value: 1 }
],
ui: {
widget: 'select',
placeholder: '请选择',
placeholder: '请选择'
}
},
carProtocalWatermark: {
@ -249,7 +254,7 @@ export class CarSettleCarauthComponent implements OnInit {
widget: 'upload',
descriptionI18n: '请上传挂靠协议支持JPG、PNG格式文件小于5M。',
data: {
appId: this.envSrv.env.appId,
appId: this.envSrv.env.appId
},
name: 'multipartFile',
multiple: false,
@ -263,12 +268,12 @@ export class CarSettleCarauthComponent implements OnInit {
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
url: args.file.response.data.fullFileWatermarkPath
}
}
];
this.sf?.setValue('/carProtocalWatermark', avatar);
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath;
}
},
beforeUpload: (file: any, _fileList: any) => {
@ -283,7 +288,7 @@ export class CarSettleCarauthComponent implements OnInit {
observer.complete();
});
},
previewFile: (file: NzUploadFile) => of(file.url),
previewFile: (file: NzUploadFile) => of(file.url)
}
},
agreeImg: {
@ -291,24 +296,24 @@ export class CarSettleCarauthComponent implements OnInit {
type: 'boolean',
// enum: [{ label: '长期', value: true }],
ui: {
widget: 'custom',
widget: 'custom'
}
},
titleA: {
title: '行驶证信息(必填)',
type: 'string',
ui: {
widget: 'text',
widget: 'text'
},
default: '照片上传后会自动识别文字并填充下列内容栏',
default: '照片上传后会自动识别文字并填充下列内容栏'
},
tipsA: {
title: '',
type: 'string',
ui: {
widget: 'custom',
offsetControl: 6,
},
offsetControl: 6
}
},
certificatePhotoFrontWatermark: {
type: 'string',
@ -323,7 +328,7 @@ export class CarSettleCarauthComponent implements OnInit {
widget: 'upload',
descriptionI18n: '请上传行驶证首页照片支持JPG、PNG格式文件小于5M。照片信息缺失、拼凑、过度PS、模糊不清都不会通过审核。',
data: {
appId: this.envSrv.env.appId,
appId: this.envSrv.env.appId
},
name: 'multipartFile',
multiple: false,
@ -337,15 +342,15 @@ export class CarSettleCarauthComponent implements OnInit {
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
url: args.file.response.data.fullFileWatermarkPath
}
}
];
this.sf?.setValue('/certificatePhotoFrontWatermark', avatar);
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath
this.detailData.certificatePhotoFront = args.file.response.data.fullFilePath;
this.checkCarCard(args.file.response.data.fullFilePath, 'front');
} else {
this.detailData.certificatePhotoFront = ''
this.detailData.certificatePhotoFront = '';
}
},
beforeUpload: (file: any, _fileList: any) => {
@ -359,7 +364,7 @@ export class CarSettleCarauthComponent implements OnInit {
observer.next(isLt2M);
observer.complete();
});
},
}
// previewFile: (file: NzUploadFile) => of(file.url),
}
},
@ -368,8 +373,8 @@ export class CarSettleCarauthComponent implements OnInit {
type: 'string',
ui: {
widget: 'custom',
offsetControl: 6,
},
offsetControl: 6
}
},
certificatePhotoBackWatermark: {
type: 'string',
@ -384,7 +389,7 @@ export class CarSettleCarauthComponent implements OnInit {
widget: 'upload',
descriptionI18n: '请上传行驶证副业照片支持JPG、PNG格式文件小于5M。',
data: {
appId: this.envSrv.env.appId,
appId: this.envSrv.env.appId
},
name: 'multipartFile',
multiple: false,
@ -398,15 +403,15 @@ export class CarSettleCarauthComponent implements OnInit {
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
url: args.file.response.data.fullFileWatermarkPath
}
}
];
this.sf?.setValue('/certificatePhotoBackWatermark', avatar);
this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath
this.detailData.certificatePhotoBack = args.file.response.data.fullFilePath;
this.checkCarCard(args.file.response.data.fullFilePath, 'back');
} else {
this.detailData.certificatePhotoBack = ''
this.detailData.certificatePhotoBack = '';
}
},
beforeUpload: (file: any, _fileList: any) => {
@ -420,7 +425,7 @@ export class CarSettleCarauthComponent implements OnInit {
observer.next(isLt2M);
observer.complete();
});
},
}
// previewFile: (file: NzUploadFile) => of(file.url),
}
},
@ -429,16 +434,16 @@ export class CarSettleCarauthComponent implements OnInit {
type: 'string',
format: 'date',
ui: {
placeholder: '请输入',
},
placeholder: '请输入'
}
},
driverLicenseGetTime: {
title: '行驶证发证日期',
type: 'string',
format: 'date',
ui: {
placeholder: '请输入',
},
placeholder: '请输入'
}
},
driverLicenseEndTime: {
title: '行驶证到期日期',
@ -446,55 +451,64 @@ export class CarSettleCarauthComponent implements OnInit {
format: 'date',
maxLength: 30,
ui: {
placeholder: '请输入',
},
placeholder: '请输入'
}
},
driverLicenseSigningOrg: {
title: '行驶证签发机关',
type: 'string',
maxLength: 30,
ui: {
placeholder: '请输入',
},
placeholder: '请输入'
}
},
carDistinguishCode: {
title: '车辆识别代码',
type: 'string',
maxLength: 30,
ui: {
placeholder: '请输入',
},
placeholder: '请输入'
}
},
useNature: {
title: '使用性质',
type: 'string',
maxLength: 30,
ui: {
placeholder: '请输入',
},
placeholder: '请输入'
}
},
curbWeight: {
title: '整备质量',
type: 'string',
ui: {
placeholder: '请输入',
},
addOnAfter: '吨'
}
},
carTotalLoad: {
title: '总质量',
type: 'string',
ui: {
addOnAfter: '吨',
placeholder: '请输入'
}
},
carOwner: {
title: '所有人',
type: 'string',
maxLength: 30,
ui: {
placeholder: '请输入',
},
placeholder: '请输入'
}
},
titleB: {
title: '道运证(选填)',
type: 'string',
ui: {
widget: 'text',
widget: 'text'
},
default: '照片上传后会自动识别文字并填充下列内容栏',
default: '照片上传后会自动识别文字并填充下列内容栏'
},
roadTransportPhotoWatermark: {
type: 'string',
@ -509,7 +523,7 @@ export class CarSettleCarauthComponent implements OnInit {
widget: 'upload',
descriptionI18n: '请上传道运证照片支持JPG、PNG格式文件小于5M。蓝牌绿牌车辆可不用传道运证',
data: {
appId: this.envSrv.env.appId,
appId: this.envSrv.env.appId
},
name: 'multipartFile',
multiple: false,
@ -523,15 +537,15 @@ export class CarSettleCarauthComponent implements OnInit {
status: 'done',
url: args.file.response.data.fullFileWatermarkPath,
response: {
url: args.file.response.data.fullFileWatermarkPath,
},
},
url: args.file.response.data.fullFileWatermarkPath
}
}
];
this.sf?.setValue('/roadTransportPhotoWatermark', avatar);
this.detailData.roadTransportPhoto = args.file.response.data.fullFilePath
this.detailData.roadTransportPhoto = args.file.response.data.fullFilePath;
this.checkTransCard(args.file.response.data.fullFilePath);
} else {
this.detailData.roadTransportPhoto = ''
this.detailData.roadTransportPhoto = '';
}
},
beforeUpload: (file: any, _fileList: any) => {
@ -545,7 +559,7 @@ export class CarSettleCarauthComponent implements OnInit {
observer.next(isLt2M);
observer.complete();
});
},
}
// previewFile: (file: NzUploadFile) => of(file.url),
}
},
@ -554,7 +568,7 @@ export class CarSettleCarauthComponent implements OnInit {
type: 'boolean',
// enum: [{ label: '长期', value: true }],
ui: {
widget: 'custom',
widget: 'custom'
}
},
roadTransportNo: {
@ -564,33 +578,39 @@ export class CarSettleCarauthComponent implements OnInit {
ui: {
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
placeholder: '请输入',
},
optionalHelp: {
i18n: this.titles
}
}
},
'': { type: 'number', ui: { widget: 'text',
html: this.aaa,
defaultText: '点击查看行政区域代码' } as SFTextWidgetSchema },
roadTransportLicenceNo: {
title: '经营许可证号',
type: 'string',
maxLength: 30,
ui: {
// widget: this.detailData.commitFlag !== 0 ? 'text' : '',
placeholder: '请输入',
},
placeholder: '请输入'
}
},
roadTransportStartTime: {
title: '发证日期',
type: 'string',
format: 'date',
ui: {
placeholder: '请输入',
},
placeholder: '请输入'
}
},
roadTransportEndTime: {
title: '有效期至',
type: 'string',
format: 'date',
ui: {
placeholder: '请输入',
},
},
placeholder: '请输入'
}
}
},
required: [
'carFrontPhotoWatermark',
@ -610,62 +630,63 @@ export class CarSettleCarauthComponent implements OnInit {
'driverLicenseSigningOrg',
'carDistinguishCode',
'useNature',
'curbWeight',
'carTotalLoad',
'carOwner'
],
]
};
this.ui = {
'*': {
spanLabelFixed: 180,
grid: { span: 18 },
width: 600,
width: 600
},
$title1: {
spanLabelFixed: 0,
spanLabelFixed: 0
},
$title2: {
spanLabelFixed: 0,
spanLabelFixed: 0
},
$title3: {
spanLabelFixed: 0,
spanLabelFixed: 0
},
$isTrailer:{
grid: { span: 24 },
$isTrailer: {
grid: { span: 24 }
},
$carProtocalWatermark: {
grid: { span:12 },
grid: { span: 12 }
},
$agreeImg: {
grid: { span: 4 },
class: 'setCustom'
},
$titleB:{
grid: { span: 24 },
$titleB: {
grid: { span: 24 }
},
$roadTransportPhotoWatermark: {
grid: { span: 12 },
grid: { span: 12 }
},
$roadImg: {
grid: { span: 4 },
class: 'setCustom'
},
}
};
}
// 道路运输证识别
checkTransCard(imgurl: any) {
const params = {
transportationLicenseUrl: imgurl,
transportationLicenseUrl: imgurl
};
this.service.request(this.service.$api_recognizeTransportationLicense, params).subscribe((res: any) => {
if (res) {
this.sf.setValue('/roadTransportNo', res.number);
this.sf.setValue('/roadTransportLicenceNo', res.businessCertificate);
this.sf.setValue('/roadTransportStartTime', res.issueDate);
if(this.carNo === '') {
this.carNo = res.number
} else if(this.carNo && res.vehicleNumber.indexOf(this.carNo) === -1) {
this.service.msgSrv.warning('请上传同一认证车辆的相关证件')
if (this.carNo === '') {
this.carNo = res.number;
} else if (this.carNo && res.vehicleNumber.indexOf(this.carNo) === -1) {
this.service.msgSrv.warning('请上传同一认证车辆的相关证件');
}
}
});
@ -674,11 +695,12 @@ export class CarSettleCarauthComponent implements OnInit {
checkCarCard(imgurl: any, side: any) {
const params = {
vehicleLicenseUrl: imgurl,
side,
side
};
this.service.request(this.service.$api_recognizeVehicleLicense, params).subscribe((res: any) => {
if (res) {
if (side === 'front') { // 正面
if (side === 'front') {
// 正面
this.sf.setValue('/driverLicenseRegisterTime', res.registerDate);
this.sf.setValue('/carNo', res.number);
this.sf.setValue('/driverLicenseGetTime', res.issueDate);
@ -687,14 +709,15 @@ export class CarSettleCarauthComponent implements OnInit {
this.sf.setValue('/carOwner', res.name);
this.sf.setValue('/useNature', res.useCharacter);
this.sf.setValue('/carModel', res?.vehicleType);
this.sf.setValue('/carTotalLoad', res?.grossMass.slice(0, -2) % 1000);
} else {
this.sf.setValue('/curbWeight', res.unladenMass);
this.sf.setValue('/curbWeight', res.unladenMass.slice(0, -2) % 1000);
this.sf.setValue('/carLoad', res.approvedLoad.slice(0, -2) % 1000);
}
if(this.carNo === '') {
this.carNo = res.number
} else if(this.carNo && this.carNo !== res.number) {
this.service.msgSrv.warning('请上传同一认证车辆的相关证件')
if (this.carNo === '') {
this.carNo = res.number;
} else if (this.carNo && this.carNo !== res.number) {
this.service.msgSrv.warning('请上传同一认证车辆的相关证件');
}
}
});
@ -704,10 +727,10 @@ export class CarSettleCarauthComponent implements OnInit {
this.modal.close(true);
}
showExample() {
this.showCardFlag = !this.showCardFlag
this.showCardFlag = !this.showCardFlag;
}
showJopExample() {
this.showJopFlag = !this.showJopFlag
this.showJopFlag = !this.showJopFlag;
}
submitForm() {
const params: any = {
@ -715,20 +738,23 @@ export class CarSettleCarauthComponent implements OnInit {
...this.sf.value,
bindType: this.i.bindType
};
params.carFrontPhoto = this.detailData.carFrontPhoto
params.carProtocal = this.detailData.carProtocal
params.certificatePhotoFront = this.detailData.certificatePhotoFront
params.certificatePhotoBack = this.detailData.certificatePhotoBack
params.roadTransportPhoto = this.detailData.roadTransportPhoto
delete params.titleA
delete params.titleB
params.carFrontPhoto = this.detailData.carFrontPhoto;
params.carProtocal = this.detailData.carProtocal;
params.certificatePhotoFront = this.detailData.certificatePhotoFront;
params.certificatePhotoBack = this.detailData.certificatePhotoBack;
params.roadTransportPhoto = this.detailData.roadTransportPhoto;
delete params.titleA;
delete params.titleB;
console.log(params);
this.service.request(this.service.$api_saveUpdateShipperCar, params).subscribe((res: any) => {
if (res) {
this.service.msgSrv.success('添加成功')
this.modal.close(true)
this.service.msgSrv.success('添加成功');
this.modal.close(true);
}
})
});
}
view() {
window.open('http://www.mca.gov.cn/article/sj/xzqh/1980/')
}
}