Commit d9a9ec14 by denyu

添加校验大于开证日期

parent 883643dc
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,6 +8,7 @@
"build": "rimraf dist && webpack -p --progress --hide-modules"
},
"dependencies": {
"async-validator": "^3.5.2",
"axios": "^0.19.2",
"cluster": "^0.7.7",
"element-ui": "^2.13.2",
......
......@@ -541,8 +541,17 @@ function checkDidgrpBenPtsDihdigN1004() {
* source:ditopn.@0107.script
*
*/
function checkDidgrpRecShpdatN100() {
}
function checkDidgrpRecShpdatN100(rule, value, callback) {
var a = new Date(value)
var b =new Date(this.model.didgrp.rec.opndat)
if (a.getTime()<b.getTime()) {
return callback(new Error('日期必须大于开证日期'));
}
}
// function checkDidgrpRecShpdatN100() {
// }
/**
* source:ditopn.@0002.script
*
......@@ -735,8 +744,16 @@ function checkDidgrpAdvPtsDihdigN1003() {
* source:ditopn.@0003.script
*
*/
function checkDidgrpRecExpdatN100() {
}
function checkDidgrpRecExpdatN100(rule, value, callback) {
var a = new Date(value)
var b =new Date(this.model.didgrp.rec.opndat)
if (a.getTime()<b.getTime()) {
return callback(new Error('日期必须大于开证日期'));
}
}
/**
* source:ptsget.@0009.script
* ditp.benp.ptsget
......
......@@ -117,6 +117,7 @@ import Limitbody from "./Limitbody"
import Coninfp from "./Coninfp"
import Ccvpan from "./Ccvpan"
export default {
components:{
"m-ovwp" : Ovwp,
......@@ -142,12 +143,28 @@ export default {
},
data(){
// var checkDate = (rule, value, callback) => {
// var a = new Date(value)
// var b =new Date(this.model.didgrp.rec.opndat)
// if (a.getTime()<b.getTime()) {
// return callback(new Error('日期必须大于开证日期'));
// }
//
// };
return {
trnName:"ditopn",
model:new Ditopn().data,
checkRules: Check,
defaultRules: Default,
pattern: Pattern,
// rules: {
// "didgrp.rec.shpdat":[
// { validator: checkDate, trigger: 'blur' }
// ],
// "didgrp.rec.expdat":[
// { validator: checkDate, trigger: 'blur' }
// ],
// },
rules:null,
codes:{
cur:CodeTable.cur,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment