Commit e432c4c7 by fukai

修复新一波缺陷

parent 259a7303
const config = { const config = {
mt103:{ mt103:{
t111:{visible:true,value:'',read:false,required:true}, t111:{visible:true,value:'001',read:false,required:true},
t121:{visible:true,value:'',read:false,required:true}, t121:{visible:true,value:'',read:false,required:true},
title:'' title:''
}, },
mt202:{ mt202:{
t111:{visible:true,value:'',read:false,required:true}, t111:{visible:true,value:'001',read:false,required:true},
t121:{visible:true,value:'',read:false,required:true}, t121:{visible:true,value:'',read:false,required:true},
title:'' title:''
}, },
mt202cov:{ mt202cov:{
t111:{visible:true,value:'',read:false,required:true}, t111:{visible:true,value:'001',read:false,required:true},
t121:{visible:true,value:'',read:false,required:true}, t121:{visible:true,value:'',read:false,required:true},
title:'' title:''
}, },
...@@ -20,7 +20,7 @@ const config = { ...@@ -20,7 +20,7 @@ const config = {
// title:'' // title:''
// }, // },
mt199_fk:{ mt199_fk:{
t111:{visible:true,value:'001',read:true}, t111:{visible:true,value:'001',read:true,required:true},
t121:{visible:true,value:'',read:false,required:true}, t121:{visible:true,value:'',read:false,required:true},
title:'' title:''
}, },
...@@ -30,7 +30,7 @@ const config = { ...@@ -30,7 +30,7 @@ const config = {
// title:'' // title:''
// }, // },
mt299_fk:{ mt299_fk:{
t111:{visible:true,value:'001',read:true}, t111:{visible:true,value:'001',read:true,required:true},
t121:{visible:true,value:'',read:false,required:true}, t121:{visible:true,value:'',read:false,required:true},
title:'' title:''
}, },
...@@ -40,27 +40,27 @@ const config = { ...@@ -40,27 +40,27 @@ const config = {
// title:'' // title:''
// }, // },
mt192_zf:{ mt192_zf:{
t111:{visible:true,value:'002',read:true}, t111:{visible:true,value:'002',read:true,required:true},
t121:{visible:true,value:'',read:false,required:true}, t121:{visible:true,value:'',read:false,required:true},
title:'' title:''
}, },
mt192_fk:{ mt192_fk:{
t111:{visible:true,value:'002',read:true}, t111:{visible:true,value:'002',read:true,required:true},
t121:{visible:true,value:'',read:false,required:true}, t121:{visible:true,value:'',read:false,required:true},
title:'' title:''
}, },
mt199_zf:{ mt199_zf:{
t111:{visible:true,value:'002',read:true}, t111:{visible:true,value:'002',read:true,required:true},
t121:{visible:true,value:'',read:false,required:true}, t121:{visible:true,value:'',read:false,required:true},
title:'MT 199止付' title:'MT 199止付'
}, },
mt199_zffk:{ mt199_zffk:{
t111:{visible:true,value:'002',read:true}, t111:{visible:true,value:'002',read:true,required:true},
t121:{visible:true,value:'',read:false,required:true}, t121:{visible:true,value:'',read:false,required:true},
title:'MT 199止付反馈' title:'MT 199止付反馈'
}, },
mt196_zffk:{ mt196_zffk:{
t111:{visible:true,value:'002',read:true}, t111:{visible:true,value:'002',read:true,required:true},
t121:{visible:true,value:'',read:false,required:true}, t121:{visible:true,value:'',read:false,required:true},
title:'MT 196止付反馈' title:'MT 196止付反馈'
}, },
......
...@@ -484,7 +484,12 @@ function gpiValidate(mty,t111,tag,tno,value){ ...@@ -484,7 +484,12 @@ function gpiValidate(mty,t111,tag,tno,value){
)//校验状态码 )//校验状态码
{ {
let first = lines[0] let first = lines[0]
if(lines.length < 2)
{
msg = '至少为两行'
errors.s1 = msg
return msg
}
if(!/^\/[A-Z0-9]{4}\/([A-Z0-9]{4})?$/.test(first)) if(!/^\/[A-Z0-9]{4}\/([A-Z0-9]{4})?$/.test(first))
{ {
msg = '请在第一行填写正确的状态码——"/状态码/子状态码"' msg = '请在第一行填写正确的状态码——"/状态码/子状态码"'
...@@ -604,7 +609,7 @@ const PDCR = [ ...@@ -604,7 +609,7 @@ const PDCR = [
export function SwitchType(mty,t111,tag,value){ export function SwitchType(mty,t111,tag,value){
if(!t111) if(!t111 || t111 == 'NONE')
return return
if(t111 == '001') if(t111 == '001')
return 'fk' return 'fk'
...@@ -614,10 +619,12 @@ export function SwitchType(mty,t111,tag,value){ ...@@ -614,10 +619,12 @@ export function SwitchType(mty,t111,tag,value){
if(!mval) if(!mval)
return return
let lines = mval.split(/[\r\n]{1,2}/g) let lines = mval.split(/[\r\n]{1,2}/g)
console.log(value)
console.log(mval)
console.log(lines)
let first = lines[0] //判断第一行的码 let first = lines[0] //判断第一行的码
if(!/^\/[A-Z0-9]{4}\/([A-Z0-9]{4})?$/.test(first)) if(first.length < 5) //长度不够
{ {
return return
} }
......
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