666
This commit is contained in:
@ -20,6 +20,7 @@ import { of } from 'rxjs';
|
|||||||
import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component';
|
import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component';
|
||||||
import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component';
|
import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component';
|
||||||
import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component';
|
import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component';
|
||||||
|
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-publish-goods-bulk-publish',
|
selector: 'app-publish-goods-bulk-publish',
|
||||||
templateUrl: './bulk-publish.component.html',
|
templateUrl: './bulk-publish.component.html',
|
||||||
@ -141,12 +142,26 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
deadlineTime: {
|
deadlineTime: {
|
||||||
title: '截至日期',
|
title: '截止日期',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
format: 'date-time',
|
format: 'date-time',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
format: 'yyyy-MM-dd HH:mm:ss'
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
|
disabledDate: (current: Date): boolean => {
|
||||||
|
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) <new Date()){
|
||||||
|
return [{ keyword: 'validTime', message: '截止日期需大于当前时间' }];
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dispatchPhone: {
|
dispatchPhone: {
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-f
|
|||||||
import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component';
|
import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component';
|
||||||
import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component';
|
import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component';
|
||||||
import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component';
|
import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component';
|
||||||
|
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-publish-goods-bulk-publish',
|
selector: 'app-publish-goods-bulk-publish',
|
||||||
templateUrl: './bulk-release-publish.component.html',
|
templateUrl: './bulk-release-publish.component.html',
|
||||||
@ -161,12 +162,26 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
deadlineTime: {
|
deadlineTime: {
|
||||||
title: '截至日期',
|
title: '截止日期',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
format: 'date-time',
|
format: 'date-time',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
format: 'yyyy-MM-dd HH:mm:ss'
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
|
disabledDate: (current: Date): boolean => {
|
||||||
|
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) <new Date()){
|
||||||
|
return [{ keyword: 'validTime', message: '截止日期需大于当前时间' }];
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dispatchPhone: {
|
dispatchPhone: {
|
||||||
|
|||||||
Reference in New Issue
Block a user