Commit daeae339 by WF1020

litopn复核修改

parent 9540dfed
......@@ -21,13 +21,15 @@ export default {
...doctre,
async init() {
const params = {
spt: JSON.parse(localStorage.getItem('row_' + this.trnName))
spt: JSON.parse(localStorage.getItem('review_' + this.trnName))
}
const loading = this.loading();
const res = await Api.post('/service/litopn/init', {
...params,
transName: this.trnName,
userId: window.sessionStorage.userId || 'ZL',
});
loading.close();
if (!res.data) {
return
}
......@@ -157,5 +159,6 @@ export default {
handleChangePurpos() {
this.queryHndtypCodeTableList(this.root.trnName);
},
},
};
......@@ -133,9 +133,10 @@ export default {
this.$router.push({
// name: 'Review-new' + trnName.charAt(0).toUpperCase() + trnName.substring(1),
path: 'review-new/' + row['inifrm'].toLowerCase(),
query: { trn: row['inr'], operateId: 'operateId' },
query: { trn: row['inr'], operateId: operateId },
params: { prePageId: this.model.pageId },
});
localStorage.setItem(`review_${row.inifrm.toLowerCase()}`, JSON.stringify(row))
},
async onRelrow(idx) {
......@@ -144,20 +145,21 @@ export default {
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
const selIds = [idx + 1]; //rowno选中行
const selDst = 'trncorco.trnstm'; //列表对应后台模型中的stream
let params = { selDst: selDst, selIds: selIds };
let rtnmsg = await this.executeRule('relrow', params);
if (rtnmsg.respCode == SUCCESS) {
let params = {
transName: 'trnrel',
userId: window.sessionStorage.userId || 'ZL',
selirn: [this.$route.query.trn]
}
let rtnmsg = await Api.post('/service/trnrel/relrow', params);
if (rtnmsg.respCode === SUCCESS) {
let errorMsg = '';
let fieldErrorsFlag = JSON.stringify(rtnmsg.fieldErrors) == '{}';
let fieldErrorsFlag = !rtnmsg.data.fieldErrors;
if (!fieldErrorsFlag) {
let errorMsgkey = '';
let errorMsgVal = '';
for (const key in rtnmsg.fieldErrors) {
for (const key in rtnmsg.data.fieldErrors) {
errorMsgkey = key;
errorMsgVal = rtnmsg.fieldErrors[key];
errorMsgVal = rtnmsg.data.fieldErrors[key];
}
errorMsg = errorMsgkey + ':' + errorMsgVal;
this.$notify.error({
......@@ -170,27 +172,22 @@ export default {
message: '复核成功',
type: 'success',
});
// const that = this.root;
// that.executeRule("searow").then(res => {
// //TODO 处理数据逻辑
// that.$refs.inftrnps.stmData.data = res.data.trncorco_trnstm.rows;
// this.model.trncorco.trnstm = res.data.trncorco_trnstm;
// })
this.$store.dispatch('TagsView/delView', this.$route);
this.$router.history.push('/taskList', () => {
this.$store.commit('setTaskListTabVal', 'trnrel');
this.handleSearch();
// 刷新表格
this.$store.commit('setLoadingFreshReview', true);
});
}
} else {
let errorMsg = '';
let fieldErrorsFlag = JSON.stringify(rtnmsg.fieldErrors) == '{}';
let fieldErrorsFlag = !rtnmsg.data.fieldErrors;
if (!fieldErrorsFlag) {
let errorMsgkey = '';
let errorMsgVal = '';
for (const key in rtnmsg.fieldErrors) {
for (const key in rtnmsg.data.fieldErrors) {
errorMsgkey = key;
errorMsgVal = rtnmsg.fieldErrors[key];
errorMsgVal = rtnmsg.data.fieldErrors[key];
errorMsg = errorMsg + errorMsgkey + ':' + errorMsgVal + ';';
}
} else if (rtnmsg.respMsg) {
......@@ -211,15 +208,21 @@ export default {
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
const selIds = [idx + 1]; //rowno选中行
const selDst = 'trncorco.trnstm'; //列表对应后台模型中的stream
let params = { selDst: selDst, selIds: selIds };
let rtnmsg = await reprow(this.wrapper(params));
let params = {
trninr: this.$route.query.trn,
transName: 'trnrel',
userId: sessionStorage.getItem('userId') || 'ZL',
pageId: this.model.pageId || '1',
dflg: '',
relflg: '',
inidatfro: '',
inidattol: '',
};
let rtnmsg = await Api.post('/service/trnrel/reprow', params);
if (rtnmsg.respCode == SUCCESS) {
let errorMsg = '';
let fieldErrorsFlag = JSON.stringify(rtnmsg.fieldErrors) == '{}';
let fieldErrorsFlag =
!rtnmsg.fieldErrors || JSON.stringify(rtnmsg.fieldErrors) == '{}';
if (!fieldErrorsFlag) {
let errorMsgkey = '';
let errorMsgVal = '';
......@@ -241,12 +244,14 @@ export default {
this.$store.dispatch('TagsView/delView', this.$route);
this.$router.history.push('/taskList', () => {
this.$store.commit('setTaskListTabVal', 'trnrel');
this.handleSearch();
// 刷新表格
this.$store.commit('setLoadingFreshReview', true);
});
}
} else {
let errorMsg = '';
let fieldErrorsFlag = JSON.stringify(rtnmsg.fieldErrors) == '{}';
let fieldErrorsFlag =
!rtnmsg.fieldErrors || JSON.stringify(rtnmsg.fieldErrors) == '{}';
if (!fieldErrorsFlag) {
let errorMsgkey = '';
let errorMsgVal = '';
......
......@@ -178,5 +178,11 @@ export default {
}
loading.close();
},
async handlePass(data) {
this.$store.state.Transaction.operateFuns[data.operateId]["pass"]()
},
async handleRefuse(data) {
this.$store.state.Transaction.operateFuns[data.operateId]["refuse"]()
},
}
}
\ No newline at end of file
<template>
<ReviewWrapper>
<Litopn></Litopn>
</ReviewWrapper>
</template>
<script>
import Litopn from "~/business/litopn/views";
import { ReviewWrapper } from "~/components/gj-common.min.js";
export default {
name: "ReviewLitopn",
components: { ReviewWrapper, Litopn },
created() {},
mounted() {},
};
</script>
<style></style>
const Business = [
{ path: 'gitopn', component: () => import('~/review/gitopn/views'), name: 'gitopn', meta: { title: '复核-Gitopn' } },
{ path: 'litopn', component: () => import('~/review/ReviewLitopn.vue'), name: 'litopn', meta: { title: '复核-Litopn' } },
]
export default Business
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