Commit 3c50e5db by 郭旭

前端校验修改

parent 8ca0b4ab
import Api from "~/service/Api" import Api from "~/service/Api"
export default { export default {
methods: { methods: {
// 提交 // 提交
handleSubmit () { handleSubmit() {
console.log('提交', this.model) console.log('提交', this.model)
}, },
// 检核 // 检核
handleCheck () { async handleCheck() {
this.$refs['modelForm'].validate((valid) => { // this.$refs['modelForm'].validate((valid) => {
console.log('valid', valid) // console.log('valid', valid)
// })
const loading = this.loading("正在校验数据")
const rtnmsg = await Api.post(this.requestPrefix + "/checkAll", {
...this.model,
transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL'
}) })
console.log(111) if (rtnmsg.respCode === SUCCESS) {
this.updateValueSet(rtnmsg.codeSet)
}
if (rtnmsg.respCode === SUCCESS) {
const fieldErrors = rtnmsg.fieldErrors;
this.updateModel(rtnmsg.data);
if (fieldErrors && Object.keys(fieldErrors).length === 0) {
// 清除之前的校验状态
this.getRoot().$refs.modelForm.clearValidate();
this.$notify({
title: "成功",
message: "校验成功",
type: "success",
});
return
}
}
loading.close()
}, },
// 暂存 // 暂存
handleStash () { handleStash() {
console.log('暂存') console.log('暂存')
}, },
// 点击获取按钮拉取当前key字段下的表单数据 // 点击获取按钮拉取当前key字段下的表单数据
queryFormData (key) { queryFormData(key) {
console.log(key) console.log(key)
}, },
// 业务信息=》基本信息=》保函编号-----获取保函编号 // 业务信息=》基本信息=》保函编号-----获取保函编号
async queryOwnref () { async queryOwnref() {
let params = { let params = {
ptainr: this.model.gidgrp.apl.pts.ptainr, ptainr: this.model.gidgrp.apl.pts.ptainr,
businessType: 'LG', businessType: 'LG',
...@@ -35,7 +60,7 @@ export default { ...@@ -35,7 +60,7 @@ export default {
} }
}, },
// 获取gitopn弹框表格数据 // 获取gitopn弹框表格数据
async queryGridEtyPromptDialogData (type, ptytyp) { async queryGridEtyPromptDialogData(type, ptytyp) {
let params = { let params = {
userId: window.sessionStorage.userId || 'ZL', userId: window.sessionStorage.userId || 'ZL',
ptytyp: ptytyp, ptytyp: ptytyp,
...@@ -49,7 +74,7 @@ export default { ...@@ -49,7 +74,7 @@ export default {
} }
}, },
// 选中gitopn弹框表格的行数据 // 选中gitopn弹框表格的行数据
async selectGridEtyPromptData (row) { async selectGridEtyPromptData(row) {
let params = { let params = {
...row ...row
} }
...@@ -59,11 +84,11 @@ export default { ...@@ -59,11 +84,11 @@ export default {
} }
}, },
// 业务信息=》基本信息=》支出目的 // 业务信息=》基本信息=》支出目的
purposChange (key, value) { purposChange(key, value) {
console.log(key, value) this.handleChangeForm(key, value)
}, },
// 初始化保函开立类型码表下拉列表 // 初始化保函开立类型码表下拉列表
async queryHndtypCodeTableList (trnName) { async queryHndtypCodeTableList(trnName) {
let params = { let params = {
gitp: { gitp: {
swiftflg: this.model.gitp.swiftflg swiftflg: this.model.gitp.swiftflg
...@@ -73,7 +98,7 @@ export default { ...@@ -73,7 +98,7 @@ export default {
purpos: this.model.gidgrp.rec.purpos purpos: this.model.gidgrp.rec.purpos
} }
}, },
transName : trnName.toUpperCase() transName: trnName.toUpperCase()
} }
let res = await Api.post('/service/gitopn/initHndtyp', params) let res = await Api.post('/service/gitopn/initHndtyp', params)
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
...@@ -81,11 +106,11 @@ export default { ...@@ -81,11 +106,11 @@ export default {
} }
}, },
// 是否SWIFT格式修改--联动保函开立类型 // 是否SWIFT格式修改--联动保函开立类型
handleChangeSwiftflg () { handleChangeSwiftflg() {
this.queryHndtypCodeTableList(this.root.trnName) this.queryHndtypCodeTableList(this.root.trnName)
}, },
// 支出目的修改--联动保函开立类型 // 支出目的修改--联动保函开立类型
handleChangePurpos () { handleChangePurpos() {
this.queryHndtypCodeTableList(this.root.trnName) this.queryHndtypCodeTableList(this.root.trnName)
} }
}, },
......
...@@ -14,7 +14,7 @@ export default class Gitopn{ ...@@ -14,7 +14,7 @@ export default class Gitopn{
prepermodflg: '', // Modify Document and Presentation Instructions .gitp.prepermodflg prepermodflg: '', // Modify Document and Presentation Instructions .gitp.prepermodflg
chkpreper: '', // Allow * .gitp.chkpreper chkpreper: '', // Allow * .gitp.chkpreper
covgodsrvmodflg: '', // Modify Object of Contract .gitp.covgodsrvmodflg covgodsrvmodflg: '', // Modify Object of Contract .gitp.covgodsrvmodflg
indirectswiadd:{}, // InDirect Swift Add .gitp.indirectswiadd indirectswiadd:'', // InDirect Swift Add .gitp.indirectswiadd
gidtxtmodflg: '', // Modify Guarantee Text .gitp.gidtxtmodflg gidtxtmodflg: '', // Modify Guarantee Text .gitp.gidtxtmodflg
chkgidtxt: '', // Allow * .gitp.chkgidtxt chkgidtxt: '', // Allow * .gitp.chkgidtxt
prepercmodflg: '', // Modify Document and Presentation Instructions .gitp.prepercmodflg prepercmodflg: '', // Modify Document and Presentation Instructions .gitp.prepercmodflg
...@@ -37,6 +37,7 @@ export default class Gitopn{ ...@@ -37,6 +37,7 @@ export default class Gitopn{
}, },
gidgrp:{ gidgrp:{
rec:{ rec:{
branchinr: '00000047',
ownref: '', // Reference .gidgrp.rec.ownref ownref: '', // Reference .gidgrp.rec.ownref
purposin: '', // Incoming Purpose .gidgrp.rec.purposin purposin: '', // Incoming Purpose .gidgrp.rec.purposin
purpos: '', // Outgoing Purpose .gidgrp.rec.purpos purpos: '', // Outgoing Purpose .gidgrp.rec.purpos
...@@ -160,6 +161,7 @@ export default class Gitopn{ ...@@ -160,6 +161,7 @@ export default class Gitopn{
gidcxm:{ gidcxm:{
warran: '', // 被保证人 .gidgrp.gidcxm.warran warran: '', // 被保证人 .gidgrp.gidcxm.warran
cxmflg: '', // 是否显示查询码 .gidgrp.gidcxm.cxmflg cxmflg: '', // 是否显示查询码 .gidgrp.gidcxm.cxmflg
benefi: '', // 受益人名称 .gidgrp.gidcxm.benefi
}, },
ben:{ ben:{
pts:new Pts().data, pts:new Pts().data,
...@@ -185,10 +187,6 @@ export default class Gitopn{ ...@@ -185,10 +187,6 @@ export default class Gitopn{
avc:{ avc:{
pts:new Pts().data, pts:new Pts().data,
}, },
gidcxm:{
benefi: '', // 受益人名称 .gidgrp.gidcxm.benefi
warran: '', // 被保证人 .gidgrp.gidcxm.warran
},
cnr:{ cnr:{
pts:new Pts().data, pts:new Pts().data,
}, },
......
...@@ -22,7 +22,7 @@ export default { ...@@ -22,7 +22,7 @@ export default {
methods: { methods: {
getTrnType() { getTrnType() {
const type = this.root ? this.root.trnType : this.trnType const type = this.root ? this.root.trnType : this.trnType
return type ? type : 'business' return type ? type : 'service'
} }
} }
} }
\ No newline at end of file
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