Commit 83057ab6 by liushikai
parents 08c1d73e 5829de52
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
height: { height: {
type: Number, type: Number,
require: false, require: false,
default: 275 default: 250
} }
}, },
data() { data() {
......
<template> <template>
<div @click="handleClick" :id="id" :class="{'c-highlight-content': true, 'highlight': highlight, 'change-light': highlightChanges}"> <div @click="handleClick" :id="id" :class="{'c-highlight-content': true, 'highlight': highlight, 'change-light': highlightChanges}">
<slot></slot> <slot></slot>
</div> </div>
</template> </template>
<script> <script>
......
<template> <template>
<div class="c-page-container"> <div class="c-page-container">
<!-- <div class="title"> <!-- <div class="title" v-if="showTitle">
<i class="el-icon-location" style="color: #409eff;"></i> <i class="el-icon-location" style="color: #409eff;"></i>
<span>{{ title }}</span> <span>{{ title }}</span>
</div> --> </div> -->
...@@ -13,6 +13,11 @@ ...@@ -13,6 +13,11 @@
<script> <script>
export default { export default {
props: ["title"], props: ["title"],
computed: {
// showTitle() {
// return this.$route.path.startsWith('/review');
// }
}
}; };
</script> </script>
<style scoped> <style scoped>
......
...@@ -15,6 +15,12 @@ const DisplayRouter = BusRouter.map(route => { ...@@ -15,6 +15,12 @@ const DisplayRouter = BusRouter.map(route => {
return newRoute; return newRoute;
}) })
const ReviewRouter = BusRouter.map(route => {
const newRoute = Object.assign({}, route)
newRoute.name = newRoute.name + 'Review'
return newRoute;
})
/** /**
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
* *
...@@ -45,13 +51,14 @@ export const routes = [ ...@@ -45,13 +51,14 @@ export const routes = [
component: Layout, component: Layout,
redirect: "/home", redirect: "/home",
children: [ children: [
{ path: 'home', component: () => import('~/views/Home'), name: 'Home', meta: { title: '首页', icon: 'el-icon-s-home', affix: true} }, { path: 'home', component: () => import('~/views/Home'), name: 'Home', meta: { title: '首页', icon: 'el-icon-s-home', affix: true } },
{ path: 'taskList', component: () => import('~/views/TaskList'), name: 'TaskList', meta: { title: '任务列表', icon: 'el-icon-s-claim', affix: true} }, { path: 'taskList', component: () => import('~/views/TaskList'), name: 'TaskList', meta: { title: '任务列表', icon: 'el-icon-s-claim', affix: true } },
], ],
}, },
{ path: "/display", component: Display, children: DisplayRouter }, { path: "/review", component: Layout, children: ReviewRouter },
{ path: "/business", component: Layout, children: BusRouter }, { path: "/business", component: Layout, children: BusRouter },
{ path: "/login", component: Login }, { path: "/display", component: Display, children: DisplayRouter },
{ path: "/login", component: Login, name: "Login" },
{ path: "/docpan", component: () => import("../views/Docpan"), children: DocRouter }, { path: "/docpan", component: () => import("../views/Docpan"), children: DocRouter },
]; ];
......
...@@ -77,10 +77,10 @@ const BusRouter = [ ...@@ -77,10 +77,10 @@ const BusRouter = [
{ path: 'ditame', component: Ditame, name: 'Ditame', meta: { title: '信用证修改' } }, { path: 'ditame', component: Ditame, name: 'Ditame', meta: { title: '信用证修改' } },
{ path: 'ditcan', component: Ditcan, name: 'Ditcan', meta: { title: '信用证注销' } }, { path: 'ditcan', component: Ditcan, name: 'Ditcan', meta: { title: '信用证注销' } },
{ path: 'ditsel', component: Ditsel, name: 'Ditsel', meta: { title: '信用证查询' } }, { path: 'ditsel', component: Ditsel, name: 'Ditsel', meta: { title: '信用证查询' } },
{ path: 'ditopn', component: Ditopn, name: 'Ditopn', meta: { title: (tag) => { return tag.path.startsWith("/review") ? "复核:" : '买方信用证开立' } } },
{ path: 'infdid', component: Infdid, name: 'Infdid', meta: { title: '信用证查询' } }, { path: 'infdid', component: Infdid, name: 'Infdid', meta: { title: '信用证查询' } },
{ path: 'ditopn', component: Ditopn, name: 'Ditopn', meta: { title: '买方信用证开立' } },
// 例 // 例
{ path: 'ditopn/:inr', component: Ditopn, name: 'DitopnInr', meta: { title: (params) => { return '买方信用证开立-' + params.inr } } }, { path: 'ditopn/:inr', component: Ditopn, name: 'DitopnInr', meta: { title: (tag) => { return '买方信用证开立-' + tag.params.inr } } },
{ path: 'office', component: Office, name: 'Office', meta: { title: 'Office' } }, { path: 'office', component: Office, name: 'Office', meta: { title: 'Office' } },
{ path: 'sptsel', component: Sptsel, name: 'Sptsel', meta: { title: '待办任务' } }, { path: 'sptsel', component: Sptsel, name: 'Sptsel', meta: { title: '待办任务' } },
{ path: 'sptbrk', component: Sptbrk, name: 'Sptbrk', meta: { title: '草稿箱' } }, { path: 'sptbrk', component: Sptbrk, name: 'Sptbrk', meta: { title: '草稿箱' } },
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<script> <script>
export default { export default {
name: "Business",
created: () => { created: () => {
console.log("进入业务交易界面"); console.log("进入业务交易界面");
}, },
...@@ -27,8 +28,7 @@ export default { ...@@ -27,8 +28,7 @@ export default {
<style> <style>
#business_container { #business_container {
/* height: 100%; */ /* height: 100%; */
height: calc(100% - 36px);
position: absolute;
width: 100%; width: 100%;
flex: 1;
} }
</style> </style>
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
import businessContainer from "../Business" import businessContainer from "../Business"
import { mapMutations } from 'vuex' import { mapMutations } from 'vuex'
export default { export default {
name: "Display",
components:{ components:{
businessContainer //复用业务容器 businessContainer //复用业务容器
}, },
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
:class="tag.meta.icon" :class="tag.meta.icon"
></span> ></span>
{{ {{
typeof tag.title === "function" ? tag.title(tag.params) : tag.title typeof tag.title === "function" ? tag.title(tag) : tag.title
}} }}
<span <span
v-if="!isAffix(tag)" v-if="!isAffix(tag)"
......
...@@ -14,7 +14,11 @@ ...@@ -14,7 +14,11 @@
<el-main class="m-app-main"> <el-main class="m-app-main">
<tagViews></tagViews> <tagViews></tagViews>
<div style="height: 2px"></div> <div style="height: 2px"></div>
<business style="background-color: var(--bgcolor)"></business> <keep-alive>
<component v-bind:is="activeComponentName"></component>
</keep-alive>
<!-- <business v-if="activeComponentName === 'Business'"></business>
<review v-if="activeComponentName === 'Review'"></review> -->
<toolbars></toolbars> <toolbars></toolbars>
</el-main> </el-main>
</el-container> </el-container>
...@@ -24,23 +28,33 @@ ...@@ -24,23 +28,33 @@
<script> <script>
import headerCom from "./Header"; import headerCom from "./Header";
import sideMenu from "./SideMenu"; import sideMenu from "./SideMenu";
import tagViews from "./components/TagsView" import tagViews from "./components/TagsView";
import business from "../Business"; import business from "../Business";
import toolbars from "~/components/Toolbars" import review from "../Review";
import toolbars from "~/components/Toolbars";
export default { export default {
components: { headerCom, sideMenu, tagViews, business, toolbars } name: "Layout",
components: { headerCom, sideMenu, tagViews, business, review, toolbars },
computed: {
activeComponentName() {
return this.$route.path.startsWith("/review") ? "review" : "business"
}
}
}; };
</script> </script>
<style> <style>
.m-app-main { .m-app-main {
background-color: var(--bgcolor);
padding: 0; padding: 0;
position: relative; position: relative;
height: 100%; height: 100%;
/* padding-bottom: 68px; */
box-sizing: border-box; box-sizing: border-box;
margin-right: 10px; margin-right: 10px;
flex: 1;
display: flex;
flex-direction: column;
} }
.el-aside { .el-aside {
height: 100%; height: 100%;
......
<template>
<div>
<el-radio-group v-model="model">
<el-radio v-for="item in nodelist" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group>
<p v-if="errShow" style="color: red">{{errMsg}}</p>
</div>
</template>
<script>
import Request from '~/utils/request'
export default {
props: ['txSriNo'],
data: function () {
return {
nodelist: [],
model: '',
errShow: false,
errMsg: ''
}
},
mounted: function () {
console.log('mounted')
this.getList()
},
// watch: {
// 'dialogVisible': function() {
// // if (this.dialogVisible && this.nodelist.length == 0 && this.txSriNo) {
// // this.getList()
// // }
// if (!this.dialogVisible) {
// this.errShow = false
// this.errMsg = ''
// }
// }
// },
methods: {
getList: function () {
Request.get('/v1/pm/process/taskBackQry/'+ this.txSriNo).then(res => {
if (res.code == '000000' && res.data && res.data.length > 0) {
this.nodelist = []
res.data.forEach(item => {
if (item.taskName && item.returnNodeNo) {
this.nodelist.push(
{
label: item.taskName || item.taskDesc || '',
value: item.returnNodeNo || item.taskId || ''
}
)
}
return
})
}
})
},
check: function () {
if (this.model) {
this.errShow = false
this.errMsg = ''
return this.model
} else {
this.errShow = true
this.errMsg = '请选择需要打回的节点'
return false
}
}
}
}
</script>
\ No newline at end of file
export const TaskFlagStatusMap = {
'3': { // 未完成详情
showStart: false,
showSubmit: false,
showCheck: false,
showSave: false,
showRefuse: false,
showAccRefuse: false,
showPass: false,
showReSubmit: false,
showReAcc: false,
showCheckAcc: false,
showEdit: false
},
'4': { // 已完成详情
showStart: false,
showSubmit: false,
showCheck: false,
showSave: false,
showRefuse: false,
showAccRefuse: false,
showPass: false,
showReSubmit: false,
showReAcc: false,
showCheckAcc: false,
showEdit: false
},
'5': { // 草稿箱进入
showStart: true,
showSubmit: false,
showCheck: true,
showSave: true,
showPass: false,
showRefuse: false,
showAccRefuse: false,
showReSubmit: false,
showReAcc: false,
showCheckAcc: false,
showEdit: false
}
}
export const ProcessStatusMap = {
'0': { // 受理中心经办
showStart: false,
showSubmit: true,
showCheck: true,
showSave: true,
showPass: false,
showRefuse: false,
showAccRefuse: false,
// showReSubmit: false,
showReAcc: false,
showCheckAcc: false,
showEdit: true
},
'1': { // 复核
showStart: false,
showSubmit: false,
showCheck: false,
showSave: false,
showPass: true,
showRefuse: true,
showAccRefuse: false,
// showReSubmit: false,
showReAcc: false,
showCheckAcc: false,
showEdit: false
},
'2': { // 单证中心经办
showStart: false,
showSubmit: true,
showCheck: true,
showSave: false,
showPass: false,
showRefuse: true,
showAccRefuse: false,
// showReSubmit: false,
showReAcc: false,
showCheckAcc: false,
showEdit: true
},
'3': { // 受理中心经办 打回
showStart: false,
showSubmit: true,
showCheck: true,
showSave: false,
showPass: false,
showRefuse: false,
showAccRefuse: false,
// showReSubmit: false,
showReAcc: false,
showCheckAcc: false,
showEdit: true
},
'4': { // 单证中心经办 打回
showStart: false,
showSubmit: true,
showCheck: true,
showSave: false,
showPass: false,
showRefuse: true,
showAccRefuse: false,
// showReSubmit: false,
showReAcc: false,
showCheckAcc: false,
showEdit: true
},
'5': { // 人工确认
showStart: false,
showSubmit: false,
showCheck: false,
showSave: false,
showPass: false,
showRefuse: false,
showAccRefuse: true,
// showReSubmit: true,
showReAcc: true,
showCheckAcc: true,
showEdit: false
}
}
export const NoSaveList = [
'public/refMessage/EleMessageReg'
]
\ No newline at end of file
<template>
<div :class="{'m-review': true, 'm-review-no-error': notShowError}">
<div class="m-review-main">
<div class="m-review-content" style="width:50%">
<businessContainer ref="business"></businessContainer>
</div>
<div class="m-review-control" v-if="process !== '0'">
<el-tabs v-model="activeName">
<el-tab-pane label="复核意见" name="remark">
<div class="m-review-control-detail">
<el-input v-model="remark" type="textarea" :rows="25" :disabled="process == '3'" :maxlength="200"></el-input>
</div>
</el-tab-pane>
<el-tab-pane label="历史复核意见" name="history">
<c-content class="m-review-control-detail" :height="180">
<el-timeline>
<el-timeline-item v-for="(item, index) in historyRemark" :key="index" :timestamp="item.date" placement="top">
<div>
<span>{{item.role}}</span>
</div>
<p>复核意见: {{item.remark || '无'}}</p>
</el-timeline-item>
</el-timeline>
</c-content>
</el-tab-pane>
<!-- <el-tab-pane v-if="warning !== ''" label="提示信息" name="warning">
<div class="m-review-control-detail m-review-control-warning">
{{warning}}
</div>
</el-tab-pane> -->
</el-tabs>
</div>
</div>
<div class="m-review-action">
<el-button v-if="show.showEdit && commitFlag ==1" type="primary" size="small" @click="handleEdit" :disabled="showMode=='normal'">编辑</el-button>
<el-button v-if="show.showStart" type="primary" size="small" @click="handleStart" :loading="$store.state.Status.loading.start">提交</el-button>
<el-button v-if="show.showSubmit" type="primary" size="small" @click="handleSubmit" :loading="$store.state.Status.loading.submit">提交</el-button>
<el-button v-if="show.showCheck" size="small" @click="handleCheck" :loading="$store.state.Status.loading.check">检核</el-button>
<el-button v-if="show.showSave && !fromDeclare && !noSave" size="small" @click="handleSave" :loading="$store.state.Status.loading.save">暂存</el-button>
<el-button v-if="show.showPass" type="primary" size="small" @click="handlePass" :loading="$store.state.Status.loading.pass">通过</el-button>
<el-button v-if="show.showReAcc" type="primary" size="small" @click="handleReAcc" :loading="loading.reacc">提交</el-button>
<el-button v-if="show.showRefuse" type="primary" size="small" @click="handleRefuse" :loading="$store.state.Status.loading.refuse">打回</el-button>
<!-- 人工确认打回 -->
<el-button v-if="show.showAccRefuse" type="primary" size="small" @click="handleAccRefuse" :loading="loading.accRefuse">打回</el-button>
<!-- <el-button v-if="show.showReSubmit" type="primary" size="small" @click="handleReSubmit">再经办</el-button> -->
<!-- <el-button v-if="show.showCheckAcc" type="primary" size="small" @click="handleCheckAcc" :loading="loading.checkacc">勾兑</el-button> -->
<el-button size="small" v-if="showCancel" @click="handleCancel">删除</el-button>
<el-button size="small" @click="goBack">返回</el-button>
</div>
<!-- <el-dialog
title="请选择打回节点"
:visible.sync="dialogVisible"
@close="handleDialogClose"
>
<m-refuse-node ref="refuseNode" :txSriNo='txSriNo' :dialogVisible="dialogVisible"></m-refuse-node>
<div slot="footer" class="dialog-footer">
<el-button @click="handleDialogClose" size="small">取消</el-button>
<el-button type="primary" @click="handleRefuseSure" size="small"
>确定</el-button>
</div>
</el-dialog> -->
</div>
</template>
<script>
// import {
// cancelTodo
// } from "~/service/public/taskList";
import businessContainer from "../Business";
import { mapMutations } from "vuex";
// import { listTodo, isRevise, todoOpend } from "~/service/public/taskList";
// import { postReFinish, postReRefuse } from "~/service/public/reFinish";
import { TaskFlagStatusMap, ProcessStatusMap, NoSaveList } from "./btnStatusConfig"
import RefuseNode from './RefuseNode'
import {
datetimeFormat
} from "~/utils/format"
// import refresh from '~/mixin/refresh'
import Request from "~/utils/request";
export default {
name: "Review",
components: {
businessContainer, //复用业务容器
'm-refuse-node': RefuseNode
},
// mixins:[refresh],
data: function() {
return {
activeName: "remark",
historyRemark: [],
process: '0', // 0 经办 1 复核 2 经办 + 复核 3 受理中心经办更正 4-单证中心经办更正
commitFlag: 0, // 0 是第一次提交 1 非第一次
busiTempInfoSriNo: '',
// warning: '提示信息',
taskFlag: '0', // 任务标识 1-由待办任务列表进入 2-由未完成任务 修改列表进入 3-未完成 详情 4- 由已完成交易列表进入 5-由草稿箱进入
taskId: '',
txSriNo: '',
reqSource: '03',
showMode: "normal",
isSearchOrigin: false,
show: {
showStart: false,
showSubmit: false,
showCheck: false,
showSave: false,
handlePass: false,
showRefuse: false,
// showReSubmit: false,
showReAcc: false,
showCheckAcc: false,
showAccRefuse: false
},
noSave: false,
fromDeclare: false,
showCancel: false,
loading: {
reacc: false,
checkacc: false,
accRefuse: false,
},
key: 0,
oldTips: [], // 经办更正需要保留复核打回时的tips,用于经办更正撤回时使用
oldChanges: [], //经办更正撤回需要保留上次的changes, 提交的时候将这次的和上次的合并
notShowError: false, // 默认展示表单报错信息,进入详情时不展示报错信息
dialogVisible: false, // 打回时选择退回节点的选择框
indexCount: 0,
};
},
computed: {
remark: {
get: function () {
return this.$store.state.Status.remark
},
set: function (newValue) {
this.$store.commit('setRemark', newValue)
}
}
},
mounted: function() {
this.init()
},
watch: {
$route: function (to, from) {
this.init()
}
},
methods: {
async init () {
this.reset()
this.getRouteParams()
this.setDisplayMode()
this.getHistoryRemark()
this.updateShow()
this.handleOpend()
this.remark = ''
console.log("进入复核界面");
let child = this.$refs["business"].$children[0];
while (child.$children.length > 0 && !child.loadData) {
child = child.$children[0];
}
if (child && child.loadData && !this.isSearchOrigin) {
let data = await child.loadData({busiTempInfoSriNo: this.busiTempInfoSriNo})
console.log(data);
if ((this.process == '1' || this.process == '2') && data && typeof data.changes != "undefined" && data.changes != null ) {
// 具有复核功能的页面才展示changes
this.$store.commit('setHighlightChanges', data.changes)
}
// 经办展示 tips
if ((this.process == '0' || this.process == '3' || this.process == '2' || this.process == '4') &&
this.taskFlag == '1' && data && data.tips && data.tips.length > 0) {
// 具有经办功能的页面才展示 tips
this.$store.commit('setHighlights', data.tips)
}
// 经办更正 撤回修改
if ((this.process == '3' || this.process == '4') && this.taskFlag == '1' && data) {
// 经办更正正常展示 tips,但是在经办撤回的时候展示 oldTips
if (data.oldTips && data.oldTips.length > 0) {
this.$store.commit('setHighlights', data.oldTips)
this.oldTips = data.oldTips
} else if (data.tips && data.tips.length > 0) {
this.$store.commit('setHighlights', data.tips)
this.oldTips = data.tips
}
if(data.changes && data.changes.length > 0) {
this.oldChanges = data.changes
this.$store.commit('setHighlightChanges', data.changes)
}
}
// 只有经办更正需要展示复核意见
if (data && data.remark && this.taskFlag == '1' && (this.process == '3' || this.process == '4')) {
this.remark = data.remark
}
// debugger
if (data && data.historyRemark && this.$route.path.indexOf('declare') !== -1) {
// 申报页面通过loaddata获取历史复核意见
// this.historyRemark = data.historyRemark
let tempmark = []
// debugger
data.historyRemark.forEach(item => {
if((item.remark !== null) && (item.remark !== '')) {
let temp = {
role: item.role,
date: item.date,
remark: item.remark || ''
}
tempmark.push(temp)
}
});
this.historyRemark = tempmark
}
}
if (child && child.searchOrigin && this.isSearchOrigin) {
await child.searchOrigin()
}
},
getRouteParams () {
if (this.$route.query.routeParams) {
this.process = this.$route.query.routeParams.process || '0'
this.commitFlag = this.$route.query.routeParams.commitFlag || 0
this.taskFlag = this.$route.query.routeParams.taskFlag || '1'
this.isSearchOrigin = this.$route.query.routeParams.fromInfo == '1' || false
this.taskId = this.$route.query.routeParams.taskId || ''
this.txSriNo = this.$route.query.routeParams.txSriNo || ''
this.busiTempInfoSriNo = this.$route.query.routeParams.busiTempInfoSriNo || ''
this.reqSource = this.$route.query.routeParams.reqSource || '03'
}
this.fromDeclare = this.$route.path.indexOf('declare') !== -1
this.noSave = NoSaveList.some(item => {
return this.$route.path.indexOf(item) !== -1
})
if (this.taskFlag == '4' || this.taskFlag == '3') {
// 进入详情后,不展示表单校验的报错
this.notShowError = true
}
},
setDisplayMode () {
if (!this.canEdit()) {
this.$store.commit("setMode", "display");
this.showMode = 'display'
}
},
getHistoryRemark() {
if (this.process !== '0' && this.txSriNo && this.$route.path.indexOf('declare') == -1) {
// 获取历史复核意见, 申报页面不获取历史复核页面
let params = {
current: 0,
data: {
txSriNo: this.txSriNo
},
orders: [{asc: true, column: "allo_time"}],
size: 0
}
listTodo(params).then(res => {
if (res.code == '000000' && res.data && res.data.length > 0) {
// this.historyRemark = res.data.map(item => {
// return {
// role: item.taskDealTellerName || item.taskDealTellerNo,
// date: (item.finishTime && datetimeFormat(item.finishTime.substring(0, 14))) || '',
// remark: item.remark || ''
// }
// })
res.data.forEach(item => {
if(!((item.stepCode == '0' || item.stepCode == '1') && (item.taskDealInstType == '1' || item.taskDealInstType == '2'))) {
if(item.remark) {
let temp = {
role: item.taskDealTellerName || item.taskDealTellerNo,
date: (item.finishTime && datetimeFormat(item.finishTime.substring(0, 14))) || '',
remark: item.remark || ''
}
this.historyRemark.push(temp)
}
}
});
}
console.log(res)
}).catch(err => {})
}
},
updateShow () {
// 根据流程和来源判断按钮的展示和隐藏
// if (this.taskFlag == '3' || this.taskFlag == '4') {
// this.showMode = 'display'
// }
if (this.taskFlag =='3' || this.taskFlag == '4' || this.taskFlag == '5') {
// 未完成详情和已完成进入
this.show = TaskFlagStatusMap[this.taskFlag] ||{
showStart: false,
showSubmit: false,
showCheck: false,
showSave: false,
handlePass: false,
showRefuse: false,
showAccRefuse: false,
// showReSubmit: false,
showReAcc: false,
showCheckAcc: false,
showEdit: false
}
// 从草稿箱进入需要判断 reqSource == '03' 从经办发起调 start 接口 否则调 submit 接口
if (this.taskFlag == '5' && (this.reqSource !== '03' || this.process !== '0')) {
this.show.showStart = false
this.show.showSubmit = true
}
} else {
this.show = ProcessStatusMap[this.process] || {
showStart: false,
showSubmit: false,
showCheck: false,
showSave: false,
handlePass: false,
showRefuse: false,
showAccRefuse: false,
// showReSubmit: false,
showReAcc: false,
showCheckAcc: false,
showEdit: false
}
}
if (this.taskFlag == '1') {
// 仅有一手经办有删除按钮
if (this.process == '0' || this.process == '3') {
this.showCancel = true
}
if (this.$route.path.indexOf('public/aml-approve') !== -1 || this.fromDeclare) {
// 反洗钱复核 申报 不能删除交易
this.showCancel = false
}
}
//结售汇不需要暂存按钮(特判)
if (this.$route.query && this.$route.query.routeParams && this.$route.query.routeParams.txCode && this.$route.query.routeParams.txCode == '010319') {
this.show.showSave = false
}
},
handleOpend () {
if (this.taskId) {
todoOpend(this.taskId)
}
},
async handlePass() {
console.log(this.remark)
let data = {}
if (this.process == '1' || this.process == '2' || this.process == '4') {
// 复核通过需要传递参数:复核意见和tips
// 通过 - 清空tips
data = {
remark: this.remark,
tips: [] //this.$store.state.Status.highlights
}
}
// 接口
let child = this.$refs["business"].$children[0];
while (child.$children.length > 0 && !child.handlePass) {
child = child.$children[0];
}
if (child && child.handlePass) {
await child.handlePass(data);
}
},
async handleRefuse() {
if (this.remark.trim() == '') {
this.$message.error('请填写复核意见')
return
}
if (this.fromDeclare) {
// 单独处理,不选择打回节点
let data = {
remark: this.remark,
tips: this.$store.state.Status.highlights,
};
console.log(data);
// 接口
let child = this.$refs["business"].$children[0];
while (child.$children.length > 0 && !child.handleRefuse) {
child = child.$children[0];
}
if (child && child.handleRefuse) {
child.handleRefuse(data);
}
return;
}
const randomKey = this.indexCount + Math.floor(Math.random() * 100).toString()
const h = this.$createElement
let node = h('m-refuse-node', {
props: {
txSriNo: this.txSriNo
},
key: randomKey,
ref: 'refuseNode'
}, [])
this.$msgbox({
title: '请选择需要打回的节点',
message: node,
showCancelButton: false,
confirmButtonText: '确定',
cancelButtonText: '取消',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
if (this.$refs.refuseNode) {
let taskDefKey = this.$refs.refuseNode.check()
if (taskDefKey) {
let data = {
remark: this.remark,
tips: this.$store.state.Status.highlights,
taskDefKey: taskDefKey
};
console.log(data);
// 接口
let child = this.$refs["business"].$children[0];
while (child.$children.length > 0 && !child.handleRefuse) {
child = child.$children[0];
}
if (child && child.handleRefuse) {
child.handleRefuse(data);
}
done()
}
}
} else {
done()
}
}
})
},
async handleSubmit() {
let data = {}
if (this.process == '1' || this.process == '2' || this.process == '4') {
// 复核通过需要传递参数:复核意见
// 提交 - 清空 tips
data = {
remark: this.remark,
tips: [] //this.$store.state.Status.highlights
}
}
if ((this.process == '3' || this.process == '4') && this.oldTips.length > 0) {
data.oldTips = this.oldTips
}
if ((this.process == '3' || this.process == '4') && this.oldChanges.length > 0) {
data.oldChanges = this.oldChanges
}
let child = this.$refs["business"].$children[0];
while (child.$children.length > 0 && !child.handleSubmit) {
child = child.$children[0];
}
if (this.taskFlag == '2' || this.taskFlag == '3') {
// 已完成列表进来和未完成列表进来需要判断是否可以提交
if (this.taskId) {
isRevise({
data: {taskId: this.taskId}
}).then(async res => {
if (res.data === true) {
if (child && child.handleSubmit) {
await child.handleSubmit(data);
}
}
}).catch(error => {})
}
} else {
if (child && child.handleSubmit) {
await child.handleSubmit(data);
}
}
},
async handleStart() {
let child = this.$refs["business"].$children[0];
while (child.$children.length > 0 && !child.handleStart) {
child = child.$children[0];
}
if (child && child.handleStart) {
await child.handleStart();
}
return
// this.handleSubmit()
},
async handleCheck() {
let child = this.$refs["business"].$children[0];
while (child.$children.length > 0 && !child.handleCheck) {
child = child.$children[0];
}
if (child && child.handleCheck) {
await child.handleCheck();
}
},
async handleSave() {
let child = this.$refs["business"].$children[0];
while (child.$children.length > 0 && !child.handleSave) {
child = child.$children[0];
}
if (child && child.handleSave) {
await child.handleSave();
}
},
// handleCancel() {
// let child = this.$refs["business"].$children[0];
// while (child.$children.length > 0 && !child.handleCancel) {
// child = child.$children[0];
// }
// if (child && child.handleCancel) {
// child.handleCancel();
// }
// },
// handleReSubmit() {
// this.$store.commit("setMode", "normal");
// this.show = {
// showStart: false,
// showSubmit: true,
// showCheck: true,
// showSave: false,
// showPass: false,
// showRefuse: false,
// // showReSubmit: false,
// showReAcc: false,
// showCheckAcc: false,
// }
// },
handleReAcc() {
let child = this.$refs["business"].$children[0];
let header
while (child.$children.length > 0 && !child.genRequestHead) {
child = child.$children[0];
}
if (child && child.genRequestHead) {
header = child.genRequestHead();
}
this.loading.reacc = true
if (header) {
header.taskStatus = 1
postReFinish({head: header}).then(res => {
if (res.code == '000000') {
this.$message.success('重新记账成功')
this.$router.push('/business/home')
}
this.loading.reacc = false
}).catch(err => {
this.loading.reacc = false
})
}
},
handleCheckAcc() {
let child = this.$refs["business"].$children[0];
let header
while (child.$children.length > 0 && !child.genRequestHead) {
child = child.$children[0];
}
if (child && child.genRequestHead) {
header = child.genRequestHead();
}
if (header) {
header.taskStatus = 4
postReFinish({head: header}).then(res => {
if (res.code == '000000') {
this.$message.success('勾兑成功')
this.$router.push('/business/home')
}
})
}
},
handleAccRefuse() {
// 人工确认中的打回
// this.dialogVisible = true
const randomKey = this.indexCount + Math.floor(Math.random() * 100).toString()
const h = this.$createElement
let node = h('m-refuse-node', {
props: {
txSriNo: this.txSriNo
},
key: randomKey,
ref: 'refuseNode'
}, [])
this.$msgbox({
title: '请选择需要打回的节点',
message: node,
showCancelButton: false,
confirmButtonText: '确定',
cancelButtonText: '取消',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
if (this.$refs.refuseNode) {
let taskDefKey = this.$refs.refuseNode.check()
if (taskDefKey) {
let child = this.$refs["business"].$children[0];
let header
while (child.$children.length > 0 && !child.genRequestHead) {
child = child.$children[0];
}
if (child && child.genRequestHead) {
header = child.genRequestHead();
}
if (header) {
header.taskStatus = 2
header.taskDefKey = taskDefKey
header.remark = this.remark || ''
postReRefuse({head: header}).then(res => {
if (res.code == '000000') {
this.$message.success('操作成功')
this.$router.push('/business/home')
this.dialogVisible = false
done()
}
})
}
}
}
} else {
done()
}
}
})
},
// handleDialogClose () {
// this.dialogVisible = false
// },
// handleRefuseSure () {
// debugger
// let taskDefKey = this.$refs.refuseNode.check()
// if (taskDefKey) {
// // 人工确认 打回
// let child = this.$refs["business"].$children[0];
// let header
// while (child.$children.length > 0 && !child.genRequestHead) {
// child = child.$children[0];
// }
// if (child && child.genRequestHead) {
// header = child.genRequestHead();
// }
// if (header) {
// header.taskStatus = 2
// header.taskDefKey = taskDefKey
// postReRefuse({head: header}).then(res => {
// if (res.code == '000000') {
// this.$message.success('操作成功')
// this.$router.push('/business/home')
// this.dialogVisible = false
// }
// })
// }
// }
// },
handleCancel() {
//删除该交易
this.$confirm('此操作将删除该交易,是否继续', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// 交易流水号
if (this.$route.query && this.$route.query.routeParams && this.$route.query.routeParams.txSriNo) {
cancelTodo(this.$route.query.routeParams.txSriNo).then(res => {
if (res.code == '000000') {
this.$message({
type: 'success',
message: '删除成功'
})
this.exit()
}
})
} else {
this.$message('此交易不存在交易流水号')
}
}).catch(() => {
})
},
goBack () {
//回到待办列表
this.$confirm('确认退出?', '', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
if (this.fromDeclare) {
let getid = this.$route.query.key;
Request.get("/v1/declare/releaseLock/" + getid);
}
let child = this.$refs["business"].$children[0];
while (child.$children.length > 0 && !child.handleExit) {
child = child.$children[0];
}
if (child && child.handleExit) {
child.handleExit();
}
this.exit()
}).catch(() => {})
},
canEdit() {
if (this.process == '1' || this.taskFlag == '3' || this.taskFlag == '4' || this.process == '5') {
return false
}
// 非第一次经办,默认进入不可编辑,出现编辑按钮,点击后方可编辑
if (this.commitFlag == 1) {
return false
}
return true
},
exit() {
this.$store.dispatch("TagsView/delView", this.$route);
if (this.$route.query && this.$route.query.routeParams) {
setTimeout(() => {
this.$router.back()
}, 500)
} else {
setTimeout(() => {
this.$router.push('/business/home')
}, 500)
}
},
reset() {
this.$store.commit('setHighlightChanges', [])
this.$store.commit('setHighlights', [])
this.$store.commit("setMode", "normal")
this.showMode = "normal"
this.remark = ''
this.$store.commit('setStartLoading', false)
this.$store.commit('setSubmitLoading', false)
this.$store.commit('setPassLoading', false)
this.$store.commit('setRefuseLoading', false)
this.$store.commit('setCheckLoading', false)
this.$store.commit('setSaveLoading', false)
this.loading.reacc = false
this.loading.checkacc = false
},
handleEdit() {
this.showMode = "normal"
this.$store.commit("setMode", "normal")
}
},
beforeDestroy: function() {
// 如果跳转还是 review 页面则不执行 reset 方法,因为destroy调用在下次 create 之后
if (this.$route.path.indexOf('review') == -1) {
this.reset()
}
}
};
</script>
<style>
.m-review .eContainer-func {
display: none;
}
.m-review {
width: 100%;
height: 100%;
overflow: hidden;
position: static;
/* padding-bottom: 62px; */
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.m-review-main {
flex: 1;
display: flex;
/* height: 100%; */
display: -webkit-flex;
flex-direction: row;
justify-content: space-around;
}
.m-review .business_container{
position: static;
}
.m-review-content {
height: 100%;
flex: auto;
position: static;
}
.m-review-control {
box-sizing: border-box;
border-left: 1px solid #efefef;
padding: 0 20px;
height: 100%;
width: 250px;
flex: initial;
}
.m-review-control-detail ul {
padding: 0;
}
.m-review-control-detail .el-timeline-item {
padding-right: 20px;
}
.m-review-action {
/* position: fixed; */
/* bottom: 0; */
width: 100%;
/* height: 32px; */
text-align: center;
padding: 10px;
background: #fff;
border-top: 1px solid #efefef;
z-index: 10;
}
.m-review-control-warning {
font-size: 14px;
}
.m-review .highlight-change-formitem {
border: 1px solid #E6A23C;
}
.m-review .highlight-formitem {
border: 1px solid red;
}
.m-review .el-form-item {
box-sizing: border-box;
}
.m-review.m-review-no-error .el-form-item__error {
display: none;
}
</style>
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