Commit 3915f045 by zhengxiaokui

bdtudp

parents ae29b1bf 0d7ea4d0
......@@ -63,7 +63,11 @@ export default {
this.getVM().$refs.modelForm.clearValidate()
const fields = this.getVM().$refs.modelForm.fields
const fieldErrors = result.fieldErrors;
Utils.positioningErrorMsg(fieldErrors, fields)
const tab = Utils.positioningErrorMsg(fieldErrors, fields);
if(tab) {
// tab切换之后,需出发tab-click的事件
this.getVM().tabClick(tab);
}
}
},
exit(){
......
......@@ -15,8 +15,8 @@ export default {
save(params) {
return Api.post(this.declareParams.trnName + "saveData", this.wrapper(params))
},
exeuteCheck(rulePath, params) {
return Api.post(this.declareParams.trnName + "/executeCheck/" + rulePath, this.wrapper(params))
executeCheck(rulePath,params){
return Api.post(this.declareParams.trnName+"/executeCheck/"+rulePath, this.wrapper(params))
},
executeDefault(rulePath, params) {
return Api.post(this.declareParams.trnName + "/executeDefault/" + rulePath, this.wrapper(params))
......
......@@ -152,7 +152,7 @@ function checkDidgrpAplPtsYouzbmN100(rule, value, callback) {
*/
function checkAmeadvrmkN100(rule, value, callback) {
const that = this;
that.exeuteCheck("ameadvrmk").then(res => {
that.executeCheck("ameadvrmk").then(res => {
callback()
})
}
......@@ -169,7 +169,7 @@ function checkLiaallLimmodOwnrefN100(rule, value, callback) {
*/
function checkDidgrpRecExpplcN900(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.rec.expplc").then(res => {
that.executeCheck("didgrp.rec.expplc").then(res => {
//TODO
callback()
})
......@@ -194,7 +194,7 @@ function checkDidgrpAdvPtsBanknoN100(rule, value, callback) {
*/
function checkDidgrpRecTratypN100(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.rec.tratyp").then(res => {
that.executeCheck("didgrp.rec.tratyp").then(res => {
//TODO
callback()
})
......@@ -247,7 +247,7 @@ function checkDidgrpRecSdsrfsN100(rule, value, callback) {
*/
function checkDidgrpIssPtsYouzbmN1001(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.iss.pts.youzbm").then(res => {
that.executeCheck("didgrp.iss.pts.youzbm").then(res => {
//TODO
callback()
})
......@@ -293,7 +293,7 @@ function checkDidgrpRecShptoN100(rule, value, callback) {
*/
function checkDidgrpBenNamelcN100(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.ben.namelc").then(res => {
that.executeCheck("didgrp.ben.namelc").then(res => {
//TODO
callback()
})
......@@ -311,7 +311,7 @@ function checkDidgrpCmbPtsBanknoN100(rule, value, callback) {
*/
function checkDidgrpRecShpparN100(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.rec.shppar").then(res => {
that.executeCheck("didgrp.rec.shppar").then(res => {
//TODO
callback()
})
......@@ -336,7 +336,7 @@ function checkDidgrpRmbAdrelcN100(rule, value, callback) {
*/
function checkDidgrpAplPtsExtkeyN950(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.apl.pts.extkey").then(res => {
that.executeCheck("didgrp.apl.pts.extkey").then(res => {
//TODO
callback()
})
......@@ -431,7 +431,7 @@ function checkDidgrpRmbPtsBanknoN100(rule, value, callback) {
*/
function checkDidgrpBenAdrelcN100(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.ben.adrelc").then(res => {
that.executeCheck("didgrp.ben.adrelc").then(res => {
//TODO
callback()
})
......@@ -456,7 +456,7 @@ function checkDidgrpAplPtsDihdigN100(rule, value, callback) {
*/
function checkDidgrpRecConnoN100(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.rec.conno").then(res => {
that.executeCheck("didgrp.rec.conno").then(res => {
//TODO
callback()
})
......@@ -562,7 +562,7 @@ function checkDidgrpIssPtsBanknoN100(rule, value, callback) {
*/
function checkDidgrpBlkLcrgodN100(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.blk.lcrgod").then(res => {
that.executeCheck("didgrp.blk.lcrgod").then(res => {
that.model.didgrp.blk.lcrgod = res.data.didgrp_blk_lcrgod;
callback()
})
......@@ -593,7 +593,7 @@ function checkDidgrpRecIdcodeN100(rule, value, callback) {
*/
function checkDidgrpRecFenctgN100(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.rec.fenctg").then(res => {
that.executeCheck("didgrp.rec.fenctg").then(res => {
//TODO
callback()
})
......@@ -666,7 +666,7 @@ function checkDidgrpCbsNom1CurN100(rule, value, callback) {
*/
function checkDidgrpIssPtsDihdigN1001(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.iss.pts.dihdig").then(res => {
that.executeCheck("didgrp.iss.pts.dihdig").then(res => {
//TODO
callback()
})
......@@ -677,7 +677,7 @@ function checkDidgrpIssPtsDihdigN1001(rule, value, callback) {
*/
function checkDidgrpAplNamelcN100(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.apl.namelc").then(res => {
that.executeCheck("didgrp.apl.namelc").then(res => {
//TODO
callback()
})
......@@ -709,7 +709,7 @@ function checkMtabutConinfConexedatN100(rule, value, callback) {
*/
function checkDidgrpAdvPtsYouzbmN1003(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.adv.pts.youzbm").then(res => {
that.executeCheck("didgrp.adv.pts.youzbm").then(res => {
//TODO
callback()
})
......@@ -769,7 +769,7 @@ function checkDidgrpRecOpndatN950(rule, value, callback) {
*/
function checkDidgrpRecAvbbyN100(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.rec.avbby").then(res => {
that.executeCheck("didgrp.rec.avbby").then(res => {
//TODO
if (res.respCode == SUCCESS){
Utils.copyValueFromVO(that.model, res.data);
......@@ -823,7 +823,7 @@ function checkDidgrpApcPtsDihdigN1002(rule, value, callback) {
*/
function checkDidgrpAdvPtsExtkeyN100(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.adv.pts.extkey").then(res => {
that.executeCheck("didgrp.adv.pts.extkey").then(res => {
//TODO
callback()
})
......@@ -869,7 +869,7 @@ function checkSetmodDocamtN15000(rule, value, callback) {
*/
function checkDidgrpAdvPtsDihdigN1003(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.adv.pts.dihdig").then(res => {
that.executeCheck("didgrp.adv.pts.dihdig").then(res => {
//TODO
callback()
})
......@@ -894,7 +894,7 @@ function checkDidgrpRecExpdatN100(rule, value, callback) {
*/
function checkDidgrpBenPtsExtkeyN950(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.ben.pts.extkey").then(res => {
that.executeCheck("didgrp.ben.pts.extkey").then(res => {
//TODO
callback()
})
......@@ -933,7 +933,7 @@ function checkDidgrpRecAvbwthN900(rule, value, callback) {
*/
function checkDidgrpBlkLcrdocN100(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.blk.lcrdoc").then(res => {
that.executeCheck("didgrp.blk.lcrdoc").then(res => {
that.model.didgrp.blk.lcrdoc = res.data.didgrp_blk_lcrdoc;
callback()
})
......@@ -957,7 +957,7 @@ function checkDidgrpBlkLcrdocN1001(rule, value, callback) {
*/
function checkDidgrpRecTenmaxdayN1000(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.rec.tenmaxday").then(res => {
that.executeCheck("didgrp.rec.tenmaxday").then(res => {
//TODO
Utils.copyValueFromVO(this.model, res.data)
callback()
......@@ -997,7 +997,7 @@ function checkDidgrpBlkPreperN100(rule, value, callback) {
*/
function checkDidgrpAplAdrelcN100(rule, value, callback) {
const that = this;
that.exeuteCheck("didgrp.apl.adrelc").then(res => {
that.executeCheck("didgrp.apl.adrelc").then(res => {
callback()
})
}
......@@ -1035,7 +1035,7 @@ function checkDidgrpBlkAdlcndN100(rule, value, callback) {
*/
function checkLitameadvN100(rule, value, callback) {
const that = this;
that.exeuteCheck("litameadv").then(res => {
that.executeCheck("litameadv").then(res => {
callback()
})
this.model.ameadvrmk = ""
......
......@@ -152,10 +152,11 @@ export default class Utils {
static positioningErrorMsg(fieldErrors, formFields) {
let firstErrorItem = null
// 顺序
for (let i = 0; i < formFields.length; i++) {
const field = formFields[i];
for (const key in fieldErrors) {
if (Object.hasOwnProperty.call(fieldErrors, key)) {
if (Object.hasOwnProperty.call(fieldErrors, key)) {
if (field.prop === key) {
const fieldError = fieldErrors[key];
field.validateState = 'error';
......@@ -168,8 +169,8 @@ export default class Utils {
}
}
}
let firstErrorTab = null
if (firstErrorItem) {
let firstErrorTab = null
let parentVC = firstErrorItem
while(!firstErrorTab) {
const tag = parentVC.$vnode.tag
......@@ -199,6 +200,7 @@ export default class Utils {
})
}, 0)
}
return firstErrorTab;
}
static defaultFunction(rule, value, callback){
......@@ -214,7 +216,7 @@ export default class Utils {
static reflectCheck(key){
return async function(rule, value, callback){
//调用具体的check
const res = await this.exeuteCheck(key)
const res = await this.executeCheck(key)
// if (res.respCode == SUCCESS){
// }
......
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