西安三号线添加设头码车车次编号限制
This commit is contained in:
parent
ae59cdac36
commit
5954a01554
@ -109,6 +109,14 @@ export default {
|
||||
}
|
||||
},
|
||||
data() {
|
||||
var validateTripNum = (rule, value, callback) => {
|
||||
const trip = Number.parseInt(value.substring(1));
|
||||
if (this.formModel.type === 'HEAD' && this.popClass === 'xian-01__systerm' && (trip < 701 || trip > 749)) {
|
||||
callback(new Error('头码车车次编号为701至749'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
trainList: [],
|
||||
serviceNumber:'',
|
||||
@ -131,7 +139,8 @@ export default {
|
||||
{ required: true, message: '请选择列车类型', trigger: 'change' }
|
||||
],
|
||||
tripNumber: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' },
|
||||
{ validator: validateTripNum, trigger: 'blur' }
|
||||
],
|
||||
destinationCode: [
|
||||
{ required: true, message: '请输入目的地号', trigger: 'blur' }
|
||||
|
Loading…
Reference in New Issue
Block a user