Commit 3c50e5db by 郭旭

前端校验修改

parent 8ca0b4ab
import Api from "~/service/Api"
export default {
methods: {
// 提交
handleSubmit () {
handleSubmit() {
console.log('提交', this.model)
},
// 检核
handleCheck () {
this.$refs['modelForm'].validate((valid) => {
console.log('valid', valid)
async handleCheck() {
// this.$refs['modelForm'].validate((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('暂存')
},
// 点击获取按钮拉取当前key字段下的表单数据
queryFormData (key) {
queryFormData(key) {
console.log(key)
},
// 业务信息=》基本信息=》保函编号-----获取保函编号
async queryOwnref () {
async queryOwnref() {
let params = {
ptainr: this.model.gidgrp.apl.pts.ptainr,
businessType: 'LG',
......@@ -35,9 +60,9 @@ export default {
}
},
// 获取gitopn弹框表格数据
async queryGridEtyPromptDialogData (type, ptytyp) {
async queryGridEtyPromptDialogData(type, ptytyp) {
let params = {
userId: window.sessionStorage.userId || 'ZL',
userId: window.sessionStorage.userId || 'ZL',
ptytyp: ptytyp,
extkey: this.model.gidgrp[type.toLowerCase()].pts.extkey
}
......@@ -49,7 +74,7 @@ export default {
}
},
// 选中gitopn弹框表格的行数据
async selectGridEtyPromptData (row) {
async selectGridEtyPromptData(row) {
let params = {
...row
}
......@@ -59,11 +84,11 @@ export default {
}
},
// 业务信息=》基本信息=》支出目的
purposChange (key, value) {
console.log(key, value)
purposChange(key, value) {
this.handleChangeForm(key, value)
},
// 初始化保函开立类型码表下拉列表
async queryHndtypCodeTableList (trnName) {
async queryHndtypCodeTableList(trnName) {
let params = {
gitp: {
swiftflg: this.model.gitp.swiftflg
......@@ -73,7 +98,7 @@ export default {
purpos: this.model.gidgrp.rec.purpos
}
},
transName : trnName.toUpperCase()
transName: trnName.toUpperCase()
}
let res = await Api.post('/service/gitopn/initHndtyp', params)
if (res.respCode == SUCCESS) {
......@@ -81,11 +106,11 @@ export default {
}
},
// 是否SWIFT格式修改--联动保函开立类型
handleChangeSwiftflg () {
handleChangeSwiftflg() {
this.queryHndtypCodeTableList(this.root.trnName)
},
// 支出目的修改--联动保函开立类型
handleChangePurpos () {
handleChangePurpos() {
this.queryHndtypCodeTableList(this.root.trnName)
}
},
......
......@@ -14,7 +14,7 @@ export default class Gitopn{
prepermodflg: '', // Modify Document and Presentation Instructions .gitp.prepermodflg
chkpreper: '', // Allow * .gitp.chkpreper
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
chkgidtxt: '', // Allow * .gitp.chkgidtxt
prepercmodflg: '', // Modify Document and Presentation Instructions .gitp.prepercmodflg
......@@ -37,6 +37,7 @@ export default class Gitopn{
},
gidgrp:{
rec:{
branchinr: '00000047',
ownref: '', // Reference .gidgrp.rec.ownref
purposin: '', // Incoming Purpose .gidgrp.rec.purposin
purpos: '', // Outgoing Purpose .gidgrp.rec.purpos
......@@ -160,6 +161,7 @@ export default class Gitopn{
gidcxm:{
warran: '', // 被保证人 .gidgrp.gidcxm.warran
cxmflg: '', // 是否显示查询码 .gidgrp.gidcxm.cxmflg
benefi: '', // 受益人名称 .gidgrp.gidcxm.benefi
},
ben:{
pts:new Pts().data,
......@@ -185,10 +187,6 @@ export default class Gitopn{
avc:{
pts:new Pts().data,
},
gidcxm:{
benefi: '', // 受益人名称 .gidgrp.gidcxm.benefi
warran: '', // 被保证人 .gidgrp.gidcxm.warran
},
cnr:{
pts:new Pts().data,
},
......
......@@ -22,7 +22,7 @@ export default {
methods: {
getTrnType() {
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