Commit a3801eed by Wuyuqiu

申报交易检核、提交公共完善

parent 2804b00e
......@@ -4,13 +4,44 @@ export default {
methods: {
// 表单提交
async handleSubmit(rulePath) {
// let result;
// if(rulePath==""){
// result = await this.save();
// }else{
// result = await this.executeRule(rulePath);
// }
let result = await this.save();
let result;
if(rulePath){
result = await this.executeRule(rulePath);
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", 'bopsel')
//修改待复核界面刷新状态为需要刷新
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",
});
}
}else{
result = await this.save();
if (result.respCode == SUCCESS && Object.keys(result.fieldErrors).length == 0) {
this.$notify({
title: "成功",
......@@ -43,6 +74,8 @@ export default {
});
}
}
},
async handleConfirm() {
......@@ -118,13 +151,14 @@ export default {
},
// 表单校验
async handleCheck(rulePath) {
// let result;
// if(rulePath==""){
// result = await this.checkAll();
// }else{
// result = await this.executeRule(rulePath);
// }
let result = await this.checkAll();
let result;
if(rulePath){
result = await this.executeRule(rulePath);
}else{
result = await this.checkAll();
}
// let result = await this.checkAll();
if (result.respCode == SUCCESS) {
const fieldErrors = result.fieldErrors;
this.updateModel(result.data);
......
......@@ -31,8 +31,8 @@
</c-tabs>
</el-form>
<c-function-btn
:handleSubmit="handleSubmit"
:handleCheck="handleCheck"
:handleSubmit="handleSubmit.bind(this,'bopbut.sav')"
:handleCheck="handleCheck.bind(this,'bopbut.chk')"
:handleStash="handleStash"
>
<!-- ('bopbut.chk') -->
......
......@@ -165,7 +165,7 @@
v-model="model.recgrp.bas.issdate"
style="width: 100%"
placeholder="请选择开证日期"
:disabled="!(model.recgrp.bas.methods!='L'&&model.recgrp.bas.methods!='G')"
:disabled="!(model.recgrp.bas.methods=='L'||model.recgrp.bas.methods=='G')"
></c-date-picker>
</el-form-item>
</c-col>
......@@ -176,7 +176,7 @@
v-model="model.recgrp.bas.lcbgno"
maxlength="20"
placeholder="请输入信用证/保函编号"
disabled
:disabled="!(model.recgrp.bas.methods=='L'||model.recgrp.bas.methods=='G')"
></c-input>
</el-form-item>
</c-col>
......@@ -297,7 +297,7 @@
<c-input
v-model="model.recgrp.bas.tenor"
placeholder="请输入期限"
disabled
:disabled="!(model.recgrp.bas.methods=='L'||model.recgrp.bas.methods=='G')"
></c-input>
</el-form-item>
</c-col>
......
......@@ -31,8 +31,8 @@
</c-tabs>
</el-form>
<c-function-btn
:handleSubmit="handleSubmit"
:handleCheck="handleCheck"
:handleSubmit="handleSubmit.bind(this,'bopbut.sav')"
:handleCheck="handleCheck.bind(this,'bopbut.chk')"
:handleStash="handleStash"
>
</c-function-btn>
......
......@@ -35,8 +35,8 @@
</c-tabs>
</el-form>
<c-function-btn
:handleSubmit="handleSubmit"
:handleCheck="handleCheck"
:handleSubmit="handleSubmit.bind(this,'bopbut.sav')"
:handleCheck="handleCheck.bind(this,'bopbut.chk')"
:handleStash="handleStash"
>
</c-function-btn>
......
......@@ -39,8 +39,8 @@
</c-tabs>
</el-form>
<c-function-btn
:handleSubmit="handleSubmit"
:handleCheck="handleCheck"
:handleSubmit="handleSubmit.bind(this,'bopbut.sav')"
:handleCheck="handleCheck.bind(this,'bopbut.chk')"
:handleStash="handleStash"
>
</c-function-btn>
......
......@@ -35,8 +35,8 @@
</c-tabs>
</el-form>
<c-function-btn
:handleSubmit="handleSubmit"
:handleCheck="handleCheck"
:handleSubmit="handleSubmit.bind(this,'bopbut.sav')"
:handleCheck="handleCheck.bind(this,'bopbut.chk')"
:handleStash="handleStash"
>
</c-function-btn>
......
......@@ -35,8 +35,8 @@
</c-tabs>
</el-form>
<c-function-btn
:handleSubmit="handleSubmit"
:handleCheck="handleCheck"
:handleSubmit="handleSubmit.bind(this,'bopbut.sav')"
:handleCheck="handleCheck.bind(this,'bopbut.chk')"
:handleStash="handleStash"
>
</c-function-btn>
......
......@@ -35,8 +35,8 @@
</c-tabs>
</el-form>
<c-function-btn
:handleSubmit="handleSubmit"
:handleCheck="handleCheck"
:handleSubmit="handleSubmit.bind(this,'bopbut.sav')"
:handleCheck="handleCheck.bind(this,'bopbut.chk')"
:handleStash="handleStash"
>
</c-function-btn>
......
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