Commit da620b0d by jianglong

LITOPN添加确认按钮

parent 0d8a5afa
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<template> <template>
<div class="m-Btn-eContainer" v-if="!buttonHide && ((!isReview && !funcBtnHide) || showSetBtn)"> <div class="m-Btn-eContainer" v-if="!buttonHide && ((!isReview && !funcBtnHide) || showSetBtn)">
<div class="m-funcBtn-eContainer" v-if="!isReview && !buttonHide && !funcBtnHide"> <div class="m-funcBtn-eContainer" v-if="!isReview && !buttonHide && !funcBtnHide">
<el-button type="primary" size="small" @click="confirm" :loading="$store.state.Status.loading.confirm">{{ $t('buttons.confirm') }}</el-button>
<el-button type="primary" size="small" @click="start" :loading="$store.state.Status.loading.submit">{{ $t('buttons.submit') }}</el-button> <el-button type="primary" size="small" @click="start" :loading="$store.state.Status.loading.submit">{{ $t('buttons.submit') }}</el-button>
<el-button size="small" @click="check" :loading="$store.state.Status.loading.check">{{ $t('buttons.check') }}</el-button> <el-button size="small" @click="check" :loading="$store.state.Status.loading.check">{{ $t('buttons.check') }}</el-button>
<el-button size="small" @click="save" :loading="$store.state.Status.loading.stash">{{ $t('buttons.stash') }}</el-button> <el-button size="small" @click="save" :loading="$store.state.Status.loading.stash">{{ $t('buttons.stash') }}</el-button>
...@@ -45,7 +46,7 @@ ...@@ -45,7 +46,7 @@
export default { export default {
// 如果需要制裁信息按钮则给组件传 showAml 方法,如果不需要则不传 // 如果需要制裁信息按钮则给组件传 showAml 方法,如果不需要则不传
props: ["handleSubmit", "handleCheck", "handleStash", "handleExit", "hideFuncBtn"], props: ["handleSubmit", "handleCheck", "handleStash", "handleExit", "hideFuncBtn", "handleConfirm"],
data: function() { data: function() {
return { return {
isReview: false, isReview: false,
...@@ -90,6 +91,9 @@ export default { ...@@ -90,6 +91,9 @@ export default {
save: async function() { save: async function() {
this.handleStash && (await this.handleStash()); this.handleStash && (await this.handleStash());
}, },
confirm: async function() {
this.handleConfirm && (await this.handleConfirm());
},
handleCancel: function() { handleCancel: function() {
this.$confirm("确认退出?", "", { this.$confirm("确认退出?", "", {
confirmButtonText: "确认", confirmButtonText: "确认",
......
...@@ -34,6 +34,7 @@ export default { ...@@ -34,6 +34,7 @@ export default {
update: "Update", update: "Update",
details: "Details", details: "Details",
submit: "Submit", submit: "Submit",
confirm:"Confirm",
check: "Check", check: "Check",
stash: "Stash", stash: "Stash",
quit: "Quit", quit: "Quit",
......
...@@ -26,6 +26,7 @@ export default { ...@@ -26,6 +26,7 @@ export default {
}, },
buttons: { buttons: {
confirm:"确认",
save: "保存", save: "保存",
add: "添加", add: "添加",
delete: "删除", delete: "删除",
......
...@@ -89,6 +89,14 @@ export default { ...@@ -89,6 +89,14 @@ export default {
loading.close() loading.close()
return rtnmsg return rtnmsg
}, },
async confirm(params) {
const loading = this.loading("正在保存交易")
let rtnmsg = await Api.post(this.requestPrefix + "/confirmData", this.wrapper(params))
loading.close()
return rtnmsg
},
async executeCheck(rulePath, params) { async executeCheck(rulePath, params) {
const loading = this.loading("校验进行中") const loading = this.loading("校验进行中")
let rtnmsg = await Api.post(this.requestPrefix + "/executeCheck/" + rulePath, this.wrapper(params)) let rtnmsg = await Api.post(this.requestPrefix + "/executeCheck/" + rulePath, this.wrapper(params))
......
...@@ -38,6 +38,43 @@ export default { ...@@ -38,6 +38,43 @@ export default {
} }
}, },
async handleConfirm() {
let result = await this.confirm();
if (result.respCode == SUCCESS && Object.keys(result.fieldErrors).length == 0) {
this.$notify({
title: "成功",
message: "保存成功",
type: "success",
});
this.$store.dispatch("TagsView/delView", this.$route)
this.$router.history.push("/taskList", () => {
this.$store.commit("setTaskListTabVal", 'sptrel')
//修改待复核界面刷新状态为需要刷新
this.$store.commit("setLoadingFreshReview", true)
});
}else if(result.fieldErrors && Object.keys(result.fieldErrors).length > 0 ){
const tab = this.showBackendErrors(result.fieldErrors)
if (tab) {
// tab切换之后,需出发tab-click的事件
this.tabClick(tab);
}
this.$notify({
title: "错误",
message: "检核失败!",
type: "error",
});
}
else{
this.$notify({
title: "失败",
message: "确认失败",
type: "error",
});
}
},
// 表单暂存 // 表单暂存
async handleStash() { async handleStash() {
// 汇入汇款交易必须输入收款人信息才能暂存 // 汇入汇款交易必须输入收款人信息才能暂存
......
...@@ -19,6 +19,7 @@ const Status = { ...@@ -19,6 +19,7 @@ const Status = {
activeName: undefined activeName: undefined
}, },
loading: { loading: {
confirm: false,
// 提交 // 提交
submit: false, submit: false,
// 校验 // 校验
...@@ -90,6 +91,9 @@ const Status = { ...@@ -90,6 +91,9 @@ const Status = {
setLoadingSubmit(state, value) { setLoadingSubmit(state, value) {
state.loading.submit = value; state.loading.submit = value;
}, },
setLoadingConfirm(state, value) {
state.loading.confirm = value;
},
setLoadingCheck(state, value) { setLoadingCheck(state, value) {
state.loading.check = value; state.loading.check = value;
}, },
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<c-page title="进口信用证开立"> <c-page title="进口信用证开立">
<div class="eContainer"> <div class="eContainer">
<c-function-btn <c-function-btn
:handleConfirm="handleConfirm"
:handleSubmit="handleSubmit" :handleSubmit="handleSubmit"
:handleCheck="handleCheck" :handleCheck="handleCheck"
:handleStash="handleStash" :handleStash="handleStash"
......
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