Commit 000c604b by 李少勇

格式化event文件

parent c20f1ead
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);
}, },
// 检核 // 检核
async 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 loading = this.loading('正在校验数据');
const rtnmsg = await Api.post(this.requestPrefix + "/checkAll", { const rtnmsg = await Api.post(this.requestPrefix + '/checkAll', {
...this.model, ...this.model,
transName: this.trnName, transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL' userId: window.sessionStorage.userId || 'ZL',
}) });
if (rtnmsg.respCode === SUCCESS) { if (rtnmsg.respCode === SUCCESS) {
this.updateValueSet(rtnmsg.codeSet) this.updateValueSet(rtnmsg.codeSet);
} }
if (rtnmsg.respCode === SUCCESS) { if (rtnmsg.respCode === SUCCESS) {
const fieldErrors = rtnmsg.fieldErrors; const fieldErrors = rtnmsg.fieldErrors;
this.updateModel(rtnmsg.data); this.updateModel(rtnmsg.data);
if (fieldErrors && Object.keys(fieldErrors).length === 0) { if (fieldErrors && Object.keys(fieldErrors).length === 0) {
// 清除之前的校验状态 // 清除之前的校验状态
this.getRoot().$refs.modelForm.clearValidate(); this.getRoot().$refs.modelForm.clearValidate();
this.$notify({ this.$notify({
title: "成功", title: '成功',
message: "校验成功", message: '校验成功',
type: "success", type: 'success',
}); });
return return;
} }
} }
loading.close() 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',
tbl: 'LG' tbl: 'LG',
} };
const loading = this.loading() const loading = this.loading();
let res = await Api.post('/service/gitopn/getOwnRef', params) let res = await Api.post('/service/gitopn/getOwnRef', params);
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
loading.close() loading.close();
this.model.gidgrp.rec.ownref = res.data this.model.gidgrp.rec.ownref = res.data;
} }
}, },
// 获取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,
extkey: this.model.gidgrp[type.toLowerCase()].pts.extkey extkey: this.model.gidgrp[type.toLowerCase()].pts.extkey,
} };
let res = await Api.post('/service/ptspta/list', params) let res = await Api.post('/service/ptspta/list', params);
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
this.root.$refs['etyDialog'].show = true this.root.$refs['etyDialog'].show = true;
this.root.promptData.data = res.data.ptaInfos this.root.promptData.data = res.data.ptaInfos;
this.root.promptData.type = type this.root.promptData.type = type;
} }
}, },
// 选中gitopn弹框表格的行数据 // 选中gitopn弹框表格的行数据
async selectGridEtyPromptData(row) { async selectGridEtyPromptData(row) {
let params = { let params = {
...row ...row,
} };
let res = await Api.post('/service/ptspta/fetch', params) let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
this.$set(this.model.gidgrp, row.role.toLowerCase(), res.data) this.$set(this.model.gidgrp, row.role.toLowerCase(), res.data);
} }
}, },
// 业务信息=》基本信息=》支出目的 // 业务信息=》基本信息=》支出目的
purposChange(key, value) { purposChange(key, value) {
this.handleChangeForm(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,
},
gidgrp: {
rec: {
purpos: this.model.gidgrp.rec.purpos
}
},
transName: trnName.toUpperCase()
}
let res = await Api.post('/service/gitopn/initHndtyp', params)
if (res.respCode == SUCCESS) {
this.$set(this.codes, 'voHndtyp', res.data)
}
}, },
// 是否SWIFT格式修改--联动保函开立类型 gidgrp: {
handleChangeSwiftflg() { rec: {
this.queryHndtypCodeTableList(this.root.trnName) purpos: this.model.gidgrp.rec.purpos,
},
}, },
// 支出目的修改--联动保函开立类型 transName: trnName.toUpperCase(),
handleChangePurpos() { };
this.queryHndtypCodeTableList(this.root.trnName) let res = await Api.post('/service/gitopn/initHndtyp', params);
} if (res.respCode == SUCCESS) {
this.$set(this.codes, 'voHndtyp', res.data);
}
},
// 是否SWIFT格式修改--联动保函开立类型
handleChangeSwiftflg() {
this.queryHndtypCodeTableList(this.root.trnName);
},
// 支出目的修改--联动保函开立类型
handleChangePurpos() {
this.queryHndtypCodeTableList(this.root.trnName);
}, },
} },
\ No newline at end of file };
import Api from "~/service/Api" import Api from '~/service/Api';
export default { export default {
methods: { methods: {
async handleSearch() { async handleSearch() {
let opndatfrom = this.model.infcon.opndatfrom; let opndatfrom = this.model.infcon.opndatfrom;
if(!opndatfrom || opndatfrom == ''){ if (!opndatfrom || opndatfrom == '') {
this.$notify.error({ title: '错误', message: '查询开始日期必输!' }); this.$notify.error({ title: '错误', message: '查询开始日期必输!' });
return; return;
} }
let opndatto = this.model.infcon.opndatto; let opndatto = this.model.infcon.opndatto;
if(!opndatto || opndatto == ''){ if (!opndatto || opndatto == '') {
this.$notify.error({ title: '错误', message: '查询结束日期必输!' }); this.$notify.error({ title: '错误', message: '查询结束日期必输!' });
return; return;
} }
let params = { let params = {
...this.model.infcon, ...this.model.infcon,
fenlishi: this.model.fenlishi, fenlishi: this.model.fenlishi,
seapurpos: this.model.seapurpos, seapurpos: this.model.seapurpos,
seagtyp: this.model.seagtyp, seagtyp: this.model.seagtyp,
fromflg: this.model.fromflg, fromflg: this.model.fromflg,
cmtflg: this.model.cmtflg, cmtflg: this.model.cmtflg,
fingua: this.model.fingua, fingua: this.model.fingua,
} };
let rtnmsg = await Api.post('/service/infgid', params) let rtnmsg = await Api.post('/service/infgid', params);
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
this.stmData.data = []; this.stmData.data = [];
this.stmData.data = rtnmsg.data; this.stmData.data = rtnmsg.data;
} } else {
else { this.$notify.error({ title: '错误', message: '服务请求失败!' });
this.$notify.error({ title: '错误', message: '服务请求失败!' }); }
} },
}, async handleReset() {
async handleReset() { this.model.infcon.seaownref = '';
this.model.infcon.seaownref = "" this.model.infcon.opndatfrom = new Date();
this.model.infcon.opndatfrom = new Date(); this.model.infcon.opndatto = new Date();
this.model.infcon.opndatto = new Date(); this.isGuarantee = '';
this.isGuarantee = ""; this.model.infcon.nam = '';
this.model.infcon.nam = ""; this.model.infcon.pty.extkey = '';
this.model.infcon.pty.extkey = ""; this.model.infcon.seapty = '';
this.model.infcon.seapty = ""; this.model.infcon.searef = '';
this.model.infcon.searef = ""; this.model.infcon.pty.nam = '';
this.model.infcon.pty.nam = ""; this.model.infcon.searol = '';
this.model.infcon.searol = ""; this.model.infcon.usr.extkey = '';
this.model.infcon.usr.extkey = ""; this.model.infcon.seasta = '';
this.model.infcon.seasta = ""; this.model.infcon.seacur = '';
this.model.infcon.seacur = ""; this.model.infcon.seaamtfr = '';
this.model.infcon.seaamtfr = ""; this.model.infcon.seaamtto = '';
this.model.infcon.seaamtto = ""; this.model.seagtyp = '';
this.model.seagtyp = ""; this.model.infcon.relflg = '';
this.model.infcon.relflg = ""; this.model.infcon.hndtyp = '';
this.model.infcon.hndtyp = ""; this.model.infcon.cxmflg = '';
this.model.infcon.cxmflg = ""; this.model.seapurpos = '';
this.model.seapurpos = ""; this.model.seahndtyp = '';
this.model.seahndtyp = ""; this.model.infcon.segtyp = '';
this.model.infcon.segtyp = ""; this.model.fromflg = '';
this.model.fromflg = ""; this.model.fenlishi = '';
this.model.fenlishi = ""; this.model.cmtflg = '';
this.model.cmtflg = ""; this.model.fingua = '';
this.model.fingua = ""; },
}, },
} };
}
\ 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