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 655daf5a..95133f57 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
@@ -1,6 +1,6 @@
import { Component, OnInit, ViewChild } from '@angular/core';
-import { NgForm } from '@angular/forms';
-import { ActivatedRoute, Router } from '@angular/router';
+import { FormBuilder, FormGroup, Validators, FormControl, NgForm } from '@angular/forms';
+import { Router } from '@angular/router';
import {
SFComponent,
SFSchema,
@@ -9,7 +9,6 @@ import {
SFTextareaWidgetSchema,
SFUISchema
} from '@delon/form';
-import { SettingsService, _HttpClient } from '@delon/theme';
import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
@@ -20,7 +19,6 @@ import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-f
import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component';
import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component';
import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component';
-import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import { SupplyManagementQrcodePageComponent } from '../qrcode-page/qrcode-page.component';
@Component({
selector: 'app-publish-goods-bulk-publish',
@@ -28,7 +26,7 @@ import { SupplyManagementQrcodePageComponent } from '../qrcode-page/qrcode-page.
styleUrls: ['./bulk-release-publish.component.less']
})
export class SupplyManagementBulkReleasePublishComponent implements OnInit {
- @ViewChild('ngForm')
+ validateForm1: FormGroup;
ngForm!: NgForm;
sf1data: any; // 货源单设置回显
sf3data: any; // 货源单设置回显
@@ -50,6 +48,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
maxFreight: 9999999
}
shipperName = '';
+ patternStr = `^((13[0-9])|(14[0-1,4-9])|(15([0-3,5-9]))|(17[0-8])|(18[0-9])|(19[0-3,5-9])|(16[2,5,6,7]))\\d{8}$`;
// // 单位
startInfo: any[] = [];
endInfo: any[] = [];
@@ -57,16 +56,21 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
totalTime = 0.0; //路程总时间
freightTypeOptions: any;
constructor(
- private http: _HttpClient,
+ fb: FormBuilder,
private modalService: NzModalService,
- private settingSrv: SettingsService,
private service: SupplyManagementService,
private router: Router,
- private route: ActivatedRoute,
private amapService: AmapService,
public shipperSrv: ShipperBaseService
) {
-
+ this.validateForm1 = fb.group({
+ loadAddress0: [null, [Validators.required]],
+ loadName0: [null, [Validators.required]],
+ loadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]],
+ unloadAddress0: [null, [Validators.required]],
+ unloadName0: [null, [Validators.required]],
+ unloadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]]
+ });
}
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
schema1: SFSchema = {};
@@ -231,13 +235,34 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
initSF3() {
this.schema3 = {
properties: {
- goodsTypeId: {
+ goodsTips: {
+ type: 'string',
+ title: '',
+ ui: {
+ widget: 'custom',
+ class: 'goods_Tips_item',
+ // visibleIf: {
+ // goodsTypeName: (value: any) => value && value === '其它'
+ // }
+ }
+ },
+ goodsName: {
type: 'string',
title: '货物名称',
+ ui: {
+ // hidden: true,
+ // visibleIf: {
+ // goodsTypeName: (value: any) => value && value !== '其它'
+ // }
+ }
+ },
+ goodsTypeId: {
+ type: 'string',
+ title: '',
ui: {
widget: 'select',
placeholder: '请选择',
- errors: { required: '请选择货物类型' },
+ errors: { required: '请选择货物名称' },
asyncData: () =>
this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe(
map((data: any) => {
@@ -259,44 +284,8 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
hidden: true
}
},
- goodsNameId: {
- type: 'string',
- title: '',
- ui: {
- widget: 'select',
- placeholder: '请选择',
- errors: { required: '请填写货物名称' },
- change: (value: any, data: any) => {
- this.sf3.setValue('/goodsName', data.label);
- },
- visibleIf: {
- goodsTypeName: (value: any) => value && value !== '其它'
- }
- }
- },
- goodsName: {
- type: 'string',
- title: '',
- ui: {
- hidden: true,
- visibleIf: {
- goodsTypeName: (value: any) => value && value !== '其它'
- }
- }
- },
- goodsName1: {
- type: 'string',
- title: '',
- maxLength: 20,
- ui: {
- errors: { required: '请填写货物名称' },
- visibleIf: {
- goodsTypeName: (value: any) => value && value === '其它'
- }
- }
- }
},
- required: ['goodsTypeId', 'goodsName', 'goodsNameId','goodsName1']
+ required: ['goodsTypeId', 'goodsName', ]
};
this.ui3 = {
'*': {
@@ -620,10 +609,6 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
// 货物信息
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']
}
diff --git a/src/app/routes/supply-management/components/choose-famifiar/add/add.component.ts b/src/app/routes/supply-management/components/choose-famifiar/add/add.component.ts
index 383d919d..ed4315a7 100644
--- a/src/app/routes/supply-management/components/choose-famifiar/add/add.component.ts
+++ b/src/app/routes/supply-management/components/choose-famifiar/add/add.component.ts
@@ -1,9 +1,5 @@
-import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core';
-import { ActivatedRoute } from '@angular/router';
-import { SFComponent, SFSchema, SFSchemaEnumType, SFUISchema } from '@delon/form';
-import { _HttpClient } from '@delon/theme';
-import { NzModalRef } from 'ng-zorro-antd/modal';
-import { map } from 'rxjs/operators';
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
@Component({
selector: 'app-choose-famifiar-add',
@@ -16,7 +12,7 @@ export class PublishchooseFamifiarAddComponent implements OnInit {
i: any;
- constructor(public http: _HttpClient, private cdr: ChangeDetectorRef, private route: ActivatedRoute) {}
+ constructor() {}
ngOnInit(): void {
this.initSF();
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 3b5ada90..4486fca5 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
@@ -1,10 +1,8 @@
import { Component, Input, OnInit, ViewChild } from '@angular/core';
-import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STComponent, STData } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper } from '@delon/theme';
import { EAEnvironmentService } from '@shared';
-import { 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';
import { SupplyManagementService } from '../../services/supply-management.service';
@@ -39,9 +37,6 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
constructor(
private modal: NzModalRef,
- public router: Router,
- public ar: ActivatedRoute,
- private drawerService: NzDrawerService,
public service: SupplyManagementService,
private modalService: NzModalService,
private modalHelper: ModalHelper,
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 67562dea..e618d25a 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
@@ -8,12 +8,9 @@
* @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';
-import { _HttpClient } from '@delon/theme';
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { NzModalRef } from 'ng-zorro-antd/modal';
-import { map } from 'rxjs/operators';
@Component({
selector: 'app-choose-famifiar-set-captain',
@@ -26,7 +23,7 @@ export class PublishchooseFamifiarSetCaptainComponent implements OnInit {
i: any;
- constructor(public http: _HttpClient, private cdr: ChangeDetectorRef, private route: ActivatedRoute, private modal: NzModalRef,) {}
+ constructor( private modal: NzModalRef,) {}
ngOnInit(): void {
this.initSF();
diff --git a/src/app/routes/supply-management/components/onecar-publish/address-list/address-list.component.ts b/src/app/routes/supply-management/components/onecar-publish/address-list/address-list.component.ts
index 9dcc4ec0..c8def574 100644
--- a/src/app/routes/supply-management/components/onecar-publish/address-list/address-list.component.ts
+++ b/src/app/routes/supply-management/components/onecar-publish/address-list/address-list.component.ts
@@ -10,11 +10,8 @@
*/
import { Component, OnInit, ViewChild } from '@angular/core';
-import { ActivatedRoute, Router } from '@angular/router';
import { STChange, STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { processSingleSort } from '@shared';
-import { NzDrawerService } from 'ng-zorro-antd/drawer';
-import { NzModalService } from 'ng-zorro-antd/modal';
import { SupplyManagementService } from '../../../services/supply-management.service';
@Component({
selector: 'app-publish-address-list',
@@ -30,11 +27,7 @@ export class PublishAddressListComponent implements OnInit {
spuStatus = '1'; // '1'客户地址,'2'收回单地址
constructor(
- public router: Router,
- public ar: ActivatedRoute,
- private drawerService: NzDrawerService,
public service: SupplyManagementService,
- private modalService: NzModalService
) {}
/**
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 9efffd38..3e81a823 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
@@ -3,9 +3,8 @@ 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';
+import { ActivatedRoute } from '@angular/router';
import {
- SFCheckboxWidgetSchema,
SFComponent,
SFNumberWidgetSchema,
SFSchema,
@@ -14,7 +13,6 @@ import {
SFTextareaWidgetSchema,
SFUISchema
} from '@delon/form';
-import { _HttpClient } from '@delon/theme';
import { AmapPoiPickerComponent, AmapService, EACacheService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
@@ -43,6 +41,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
intervalDays: 999,
maxTimes: 5
};
+ patternStr = `^((13[0-9])|(14[0-1,4-9])|(15([0-3,5-9]))|(17[0-8])|(18[0-9])|(19[0-3,5-9])|(16[2,5,6,7]))\\d{8}$`;
sf1data: any; // 货源单设置回显
sf3data: any; // 货源单设置回显
sf4data: any; // 货源单设置回显
@@ -66,9 +65,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
envCache: any;
enterpriseProjectIds: any;
constructor(
- private http: _HttpClient,
fb: FormBuilder,
- private router: Router,
private route: ActivatedRoute,
private modalService: NzModalService,
public service: SupplyManagementService,
@@ -78,7 +75,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
) {
this.validateForm1 = fb.group({
loadingTime: [null, [Validators.required]],
- unloadingTime: [null, [Validators.required]]
+ unloadingTime: [null, [Validators.required]],
});
this.envCache = this.eaCacheSrv.get(cacheConf.env);
}
@@ -267,13 +264,23 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
// }
}
},
+ goodsName: {
+ type: 'string',
+ title: '货物名称',
+ ui: {
+ // hidden: true,
+ // visibleIf: {
+ // goodsTypeName: (value: any) => value && value !== '其它'
+ // }
+ }
+ },
goodsTypeId: {
type: 'string',
- title: '货物类型',
+ title: '',
ui: {
widget: 'select',
placeholder: '请选择',
- errors: { required: '请选择货物类型' },
+ errors: { required: '请选择货物名称' },
asyncData: () =>
this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe(
map((data: any) => {
@@ -295,47 +302,38 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
hidden: true
}
},
- goodsNameId: {
- type: 'string',
- title: '',
- ui: {
- widget: 'select',
- placeholder: '请选择',
- errors: { required: '请填写货物类型' },
- change: (_value: any, data: any) => {
- this.sf3.setValue('/goodsName', data.label);
- },
- visibleIf: {
- goodsTypeName: (value: any) => value && value !== '其它'
- }
- }
- },
- goodsName: {
- type: 'string',
- title: '',
- ui: {
- hidden: true,
- visibleIf: {
- goodsTypeName: (value: any) => value && value !== '其它'
- }
- }
- },
- goodsName1: {
- type: 'string',
- title: '',
- maxLength: 20,
- ui: {
- errors: { required: '请填写货物类型' },
- visibleIf: {
- goodsTypeName: (value: any) => value && value === '其它'
- },
- blur: (value: any) => {
- this.checkGoodsName();
- }
- }
- }
+
+ // goodsName1: {
+ // type: 'string',
+ // title: '',
+ // maxLength: 20,
+ // ui: {
+ // errors: { required: '请填写货物名称' },
+ // visibleIf: {
+ // goodsTypeName: (value: any) => value && value === '其它'
+ // },
+ // blur: (value: any) => {
+ // this.checkGoodsName();
+ // }
+ // }
+ // },
+ // goodsNameId: {
+ // type: 'string',
+ // title: '',
+ // ui: {
+ // widget: 'select',
+ // placeholder: '请选择',
+ // errors: { required: '请填写货物名称' },
+ // change: (value: any, data: any) => {
+ // // this.sf3.setValue('/goodsName', data.label);
+ // },
+ // visibleIf: {
+ // goodsTypeName: (value: any) => value && value !== '其它'
+ // }
+ // }
+ // },
},
- required: ['goodsTypeId', 'goodsName', 'goodsNameId', 'goodsName1']
+ required: ['goodsTypeId', 'goodsName', ]
};
this.ui3 = {
'*': {
@@ -806,7 +804,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
});
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, Validators.pattern('^[0-9]*$')]));
+ this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, [Validators.required, Validators.pattern(this.patternStr)]));
}
}
@@ -862,7 +860,7 @@ 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, Validators.pattern('^[0-9]*$')])
+ new FormControl(null, [Validators.required, Validators.pattern(this.patternStr)])
);
}
}
@@ -1016,10 +1014,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
// 货物信息
const sf3Values = { ...this.sf3.value };
- if (sf3Values.goodsTypeName === '其它') {
- sf3Values.goodsName = sf3Values.goodsName1;
- delete sf3Values.goodsName1;
- }
+ console.log(sf3Values);
+
if (this.sf4.value.carModel.includes('999')) {
this.sf4.value.carModel = ['999'];
}
@@ -1370,6 +1366,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.sf7.setValue('/toPay', this.sf7data.toPay);
this.sf7.setValue('/receiptPay', this.sf7data.receiptPay);
this.payChange();
+ // console.log('88888');
+
+ // this.validateForm1.reset();
+ // for (const key in this.validateForm1.controls) {
+ // if (this.validateForm1.controls.hasOwnProperty(key)) {
+ // this.validateForm1.controls[key].markAsPristine();
+ // this.validateForm1.controls[key].updateValueAndValidity();
+ // }
+ // }
}
// 选择地址
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 a457bfcd..e2bc4dd8 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
@@ -1,10 +1,8 @@
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,
SFNumberWidgetSchema,
SFSchema,
@@ -13,7 +11,6 @@ import {
SFTextareaWidgetSchema,
SFUISchema
} from '@delon/form';
-import { SettingsService, _HttpClient } from '@delon/theme';
import { EACacheService, ShipperBaseService } from '@shared';
import format from 'date-fns/format';
import { NzModalService } from 'ng-zorro-antd/modal';
@@ -52,14 +49,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
totalTime = 0.0; //路程总时间
currentRate = 0; //实时计算的费率
shipperName = '';
+ patternStr = `^((13[0-9])|(14[0-1,4-9])|(15([0-3,5-9]))|(17[0-8])|(18[0-9])|(19[0-3,5-9])|(16[2,5,6,7]))\\d{8}$`;
constructor(
- private http: _HttpClient,
fb: FormBuilder,
private modalService: NzModalService,
- private settingSrv: SettingsService,
public service: SupplyManagementService,
- private router: Router,
- private route: ActivatedRoute,
private eaCacheSrv: EACacheService,
private amapService: AmapService,
public shipperSrv: ShipperBaseService
@@ -67,10 +61,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
this.validateForm1 = fb.group({
loadAddress0: [null, [Validators.required]],
loadName0: [null, [Validators.required]],
- loadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]],
+ loadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]],
unloadAddress0: [null, [Validators.required]],
unloadName0: [null, [Validators.required]],
- unloadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]],
+ unloadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]],
loadingTime: [null, [Validators.required]],
unloadingTime: [null, [Validators.required]]
});
@@ -257,13 +251,23 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
// }
}
},
+ goodsName: {
+ type: 'string',
+ title: '货物名称',
+ ui: {
+ // hidden: true,
+ // visibleIf: {
+ // goodsTypeName: (value: any) => value && value !== '其它'
+ // }
+ }
+ },
goodsTypeId: {
type: 'string',
- title: '货物类型',
+ title: '',
ui: {
widget: 'select',
placeholder: '请选择',
- errors: { required: '请选择货物类型' },
+ errors: { required: '请选择货物名称' },
asyncData: () =>
this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe(
map((data: any) => {
@@ -285,47 +289,38 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
hidden: true
}
},
- goodsNameId: {
- type: 'string',
- title: '',
- ui: {
- widget: 'select',
- placeholder: '请选择',
- errors: { required: '请填写货物类型' },
- change: (value: any, data: any) => {
- this.sf3.setValue('/goodsName', data.label);
- },
- visibleIf: {
- goodsTypeName: (value: any) => value && value !== '其它'
- }
- }
- },
- goodsName: {
- type: 'string',
- title: '',
- ui: {
- hidden: true,
- visibleIf: {
- goodsTypeName: (value: any) => value && value !== '其它'
- }
- }
- },
- goodsName1: {
- type: 'string',
- title: '',
- maxLength: 20,
- ui: {
- errors: { required: '请填写货物类型' },
- visibleIf: {
- goodsTypeName: (value: any) => value && value === '其它'
- },
- blur: (value: any) => {
- this.checkGoodsName();
- }
- }
- }
+
+ // goodsName1: {
+ // type: 'string',
+ // title: '',
+ // maxLength: 20,
+ // ui: {
+ // errors: { required: '请填写货物名称' },
+ // visibleIf: {
+ // goodsTypeName: (value: any) => value && value === '其它'
+ // },
+ // blur: (value: any) => {
+ // this.checkGoodsName();
+ // }
+ // }
+ // },
+ // goodsNameId: {
+ // type: 'string',
+ // title: '',
+ // ui: {
+ // widget: 'select',
+ // placeholder: '请选择',
+ // errors: { required: '请填写货物名称' },
+ // change: (value: any, data: any) => {
+ // // this.sf3.setValue('/goodsName', data.label);
+ // },
+ // visibleIf: {
+ // goodsTypeName: (value: any) => value && value !== '其它'
+ // }
+ // }
+ // },
},
- required: ['goodsTypeId', 'goodsName', 'goodsNameId', 'goodsName1']
+ required: ['goodsTypeId', 'goodsName', ]
};
this.ui3 = {
'*': {
@@ -609,7 +604,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
receiptUserPhone: {
type: 'string',
title: '联系电话',
- format: 'mobile',
maxLength: 11,
ui: {
errors: {
@@ -836,7 +830,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
});
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, Validators.pattern('^[0-9]*$')]));
+ this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, [Validators.required, Validators.pattern(this.patternStr)]));
}
}
// 添加 删除发货卸货地址
@@ -865,7 +859,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(
`unloadPhone${controlId}`,
- new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])
+ new FormControl(null, [Validators.required, Validators.pattern(this.patternStr)])
);
}
}
@@ -985,10 +979,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
// 货物信息
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'];
}
@@ -1027,19 +1017,18 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
insurancePackagedGoods: this.sf4.value.insurancePackagedGoods,
goodsValue: this.sf4.value.goodsValue
};
- console.log(params);
- // const modalRef = this.modalService.create({
- // nzTitle: '运输协议',
- // nzContent: TranAgreementComponent,
- // nzWidth: 900,
- // nzFooter: null,
- // nzComponentParams: { object: params, shipperName: this.shipperName, type: 'onecar' }
- // });
- // modalRef.afterClose.subscribe(result => {
- // if (result) {
- // this.submit(submitType, params);
- // }
- // });
+ const modalRef = this.modalService.create({
+ nzTitle: '运输协议',
+ nzContent: TranAgreementComponent,
+ nzWidth: 900,
+ nzFooter: null,
+ nzComponentParams: { object: params, shipperName: this.shipperName, type: 'onecar' }
+ });
+ modalRef.afterClose.subscribe(result => {
+ if (result) {
+ this.submit(submitType, params);
+ }
+ });
}
// 提交
submit(submitType?: string, params?: any): void {
@@ -1294,7 +1283,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
this.service.request(this.service.$api_checkGoodsName, name).subscribe(res => {
if (res === false) {
const modalRef = this.modalService.error({
- nzTitle: '货物类型含有违禁词,请重新输入!',
+ nzTitle: '货物名称含有违禁词,请重新输入!',
});
modalRef.afterClose.subscribe(result => {
// this.sf3.setValue('/goodsName1', null);
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 9935181c..cfb99849 100644
--- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts
+++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts
@@ -2,12 +2,10 @@ import { ActivatedRoute, Router } from '@angular/router';
import { Component, OnInit, ViewChild, OnChanges } from '@angular/core';
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
-import { ModalHelper, _HttpClient } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal';
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 { of } from 'rxjs';
import { SearchDrawerService, ShipperBaseService } from '@shared';
import { SupplyManagementImportSupplyComponent } from '../../model/import-supply/import-supply.component';
@@ -44,7 +42,6 @@ export class SupplyManagementVehicleComponent extends BasicTableComponent implem
public service: SupplyManagementService,
private modal: NzModalService,
private router: Router,
- private ar: ActivatedRoute,
public shipperSrv: ShipperBaseService,
public searchDrawerService: SearchDrawerService
) {
diff --git a/src/app/routes/sys-setting/components/note-management/note-management.component.ts b/src/app/routes/sys-setting/components/note-management/note-management.component.ts
index 2bc9b0c5..937eec29 100644
--- a/src/app/routes/sys-setting/components/note-management/note-management.component.ts
+++ b/src/app/routes/sys-setting/components/note-management/note-management.component.ts
@@ -9,10 +9,8 @@
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Component, OnInit, ViewChild } from '@angular/core';
-import { ActivatedRoute } from '@angular/router';
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema } from '@delon/form';
-import { NzModalService } from 'ng-zorro-antd/modal';
import { SystemService } from '../../services/system.service';
@Component({
@@ -20,7 +18,7 @@ import { SystemService } from '../../services/system.service';
templateUrl: './note-management.component.html',
styleUrls: ['../../../commom/less/box.less']
})
-export class NoTeManagementComponent implements OnInit {
+export class NoTeManagementComponent {
@ViewChild('st', { static: true })
st!: STComponent;
@ViewChild('sf', { static: false })
@@ -52,11 +50,9 @@ export class NoTeManagementComponent implements OnInit {
},
];
- constructor(public service: SystemService, private nzModalService: NzModalService, private route: ActivatedRoute) {
+ constructor(public service: SystemService) {
}
- ngOnInit(): void {}
-
beforeReq = (requestOptions: STRequestOptions) => {
if (this.sf) {
Object.assign(requestOptions.body, { ...this.sf?.value });
diff --git a/src/app/routes/sys-setting/components/role-management/edit/edit.component.html b/src/app/routes/sys-setting/components/role-management/edit/edit.component.html
index 976a3f03..3b79e2e3 100644
--- a/src/app/routes/sys-setting/components/role-management/edit/edit.component.html
+++ b/src/app/routes/sys-setting/components/role-management/edit/edit.component.html
@@ -19,10 +19,10 @@
diff --git a/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts b/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts
index 75be4b4c..7cc254f2 100644
--- a/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts
+++ b/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts
@@ -202,7 +202,7 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent
{ title: '证件类型', index: 'sfzjlx', className: 'text-center', width: '200px' },
{ title: '证件号码', index: 'sfzjhm', className: 'text-center', width: '200px' },
{ title: '联系电话', index: 'lxdh', className: 'text-center', width: '200px' },
- { title: '国家(地区)', index: ' gjdq', className: 'text-center', width: '200px' },
+ { title: '国家(地区)', index: 'gjdq', className: 'text-center', width: '200px' },
{ title: '所属行业', index: 'hy', className: 'text-center', width: '200px' },
{ title: '征收项目', index: 'zsxm', className: 'text-center', width: '200px' },
{ title: '征收品目', index: 'zsmp', className: 'text-center', width: '200px' },
diff --git a/src/app/routes/ticket-management/components/billing-order/billing-order.component.html b/src/app/routes/ticket-management/components/billing-order/billing-order.component.html
index f23247bb..c4db52cd 100644
--- a/src/app/routes/ticket-management/components/billing-order/billing-order.component.html
+++ b/src/app/routes/ticket-management/components/billing-order/billing-order.component.html
@@ -31,7 +31,7 @@