Commit 61653abf by chengzhuoshen

前端暂存代码

parent 944e6f03
import Api from "~/service/Api"
import GitopnRequest from "../model/GitopnRequest"
export default {
methods: {
//组GitopnRequest
buildGitopnRequest() {
let gitopnRequest = new GitopnRequest().data;
gitopnRequest.transName = "GITOPN";
gitopnRequest.userId = window.sessionStorage.userId || 'ZL';
gitopnRequest.liaccvg = this.model.liaccv.liaccvg;
gitopnRequest.liaallg = this.model.liaall.liaallg;
gitopnRequest.setfog = this.model.setmod.setfog;
gitopnRequest.setfeg = this.model.setmod.setfeg;
gitopnRequest.setglg = this.model.setmod.setglg;
gitopnRequest.doceot = this.model.docpan.doceot;
gitopnRequest.gidgrp = this.model.gidgrp;
gitopnRequest.gitp = this.model.gitp;
return gitopnRequest;
},
// 提交
handleSubmit() {
console.log('提交', this.model)
......@@ -38,8 +54,18 @@ export default {
loading.close()
},
// 暂存
handleStash() {
console.log('暂存')
async handleStash() {
const loading = this.loading("正在暂存数据");
let gitopnRequest = this.buildGitopnRequest();
const rtnmsg = await Api.post(this.requestPrefix + "/txnHold", gitopnRequest);
if (rtnmsg.respCode === SUCCESS) {
this.$notify({
title: "成功",
message: "暂存成功",
type: "success",
});
}
loading.close();
},
// 点击获取按钮拉取当前key字段下的表单数据
queryFormData(key) {
......
export default class GitopnRequest {
constructor() {
this.data = {
transName: "",
userId: "",
liaccvg: [],
liaallg: [],
setfog: {},
setfeg: {},
setglg: {},
doceot: [],
spt: {},
gidgrp: {},
gitp: {}
}
}
}
\ 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