|
|
@@ -452,6 +452,16 @@ class Approval extends Component {
|
|
|
<div className={disagreeAble ? 'menuItem' : 'displayNone'}
|
|
|
onClick={this.approvalDisagree}>不同意
|
|
|
</div>
|
|
|
+ {/*<div className={disagreeAble ? '' : 'displayNone'}
|
|
|
+ style={{
|
|
|
+ background: '#cccccc',
|
|
|
+ width: '1px',
|
|
|
+ height: '24px',
|
|
|
+ }}></div>
|
|
|
+
|
|
|
+ <div className={approvalStatus === 0 ? 'menuItem' : 'displayNone'}
|
|
|
+ onClick={this.loadNextProcess}>下一条
|
|
|
+ </div>*/}
|
|
|
</div>
|
|
|
</div>
|
|
|
}
|
|
|
@@ -688,11 +698,7 @@ class Approval extends Component {
|
|
|
'_noc': 1,
|
|
|
// 'sessionId': mSessionId,
|
|
|
// 'sessionUser': mEmcode,
|
|
|
- }, {
|
|
|
- // 'Cookie': 'JSESSIONID=' + mSessionId,
|
|
|
- // "Content-Type": "application/json; charset=UTF-8"
|
|
|
}).then((response) => {
|
|
|
- console.log('response', response)
|
|
|
try {
|
|
|
let result = response
|
|
|
let infoObject = result.info
|
|
|
@@ -819,7 +825,6 @@ class Approval extends Component {
|
|
|
// 'Cookie': 'JSESSIONID=' + mSessionId
|
|
|
}).then((response) => {
|
|
|
let result = response
|
|
|
- console.log('form', result)
|
|
|
let datas = result.datas
|
|
|
if (!isObjNull(datas)) {
|
|
|
|
|
|
@@ -1852,6 +1857,7 @@ class Approval extends Component {
|
|
|
saveReceiveState({ listData })()
|
|
|
}
|
|
|
}
|
|
|
+ this.loadNextProcess()
|
|
|
}).catch(error => {
|
|
|
Toast.hide()
|
|
|
if (typeof error === 'string') {
|
|
|
@@ -1961,6 +1967,7 @@ class Approval extends Component {
|
|
|
saveReceiveState({ listData })()
|
|
|
}
|
|
|
}
|
|
|
+ this.loadNextProcess()
|
|
|
}).catch(error => {
|
|
|
Toast.hide()
|
|
|
if (typeof error === 'string') {
|
|
|
@@ -1995,33 +2002,30 @@ class Approval extends Component {
|
|
|
_center: 0,
|
|
|
_noc: 1,
|
|
|
}).then(response => {
|
|
|
+ Toast.hide()
|
|
|
if (response.result == true) {
|
|
|
let nextnode = response.nextnode
|
|
|
- // if (!isObjEmpty(nextnode)) {
|
|
|
- // mNodeId = nextnode
|
|
|
- // message.success('处理人变更成功')
|
|
|
- // message.success('正在自动跳转下一条')
|
|
|
- // this.initPageState()
|
|
|
- // this.getCurrentNode()
|
|
|
- // } else {
|
|
|
- Toast.hide()
|
|
|
- message.success('处理人变更成功')
|
|
|
- this.setState({
|
|
|
- approvalStatus: 4,
|
|
|
- })
|
|
|
- if (mType == 0) {
|
|
|
- let { homeState: { receiveState: { tabIndex, itemIndex, listData } } } = this.props
|
|
|
- if (tabIndex == 0 && !isObjEmpty(listData) && listData.length >
|
|
|
- itemIndex) {
|
|
|
- listData.splice(itemIndex, 1)
|
|
|
- saveReceiveState({ listData })()
|
|
|
+ if (!isObjEmpty(nextnode)) {
|
|
|
+ mNodeId = nextnode
|
|
|
+ message.success('处理人变更成功')
|
|
|
+ this.toNextNode()
|
|
|
+ } else {
|
|
|
+ message.success('处理人变更成功')
|
|
|
+ this.setState({
|
|
|
+ approvalStatus: 4,
|
|
|
+ })
|
|
|
+ if (mType == 0) {
|
|
|
+ let { homeState: { receiveState: { tabIndex, itemIndex, listData } } } = this.props
|
|
|
+ if (tabIndex == 0 && !isObjEmpty(listData) && listData.length >
|
|
|
+ itemIndex) {
|
|
|
+ listData.splice(itemIndex, 1)
|
|
|
+ saveReceiveState({ listData })()
|
|
|
+ }
|
|
|
+ this.props.history.goBack()
|
|
|
}
|
|
|
- this.props.history.goBack()
|
|
|
+ message.warn('没有下一条待审批单据')
|
|
|
}
|
|
|
- // message.warn('没有下一条数据')
|
|
|
- // }
|
|
|
} else {
|
|
|
- Toast.hide()
|
|
|
message.error('变更处理人失败')
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
@@ -2042,6 +2046,55 @@ class Approval extends Component {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 跳转下一条审批数据
|
|
|
+ */
|
|
|
+ toNextNode () {
|
|
|
+ message.loading('跳转下一条审批单据', 1)
|
|
|
+ this.props.history.replace('/approval/%7B%22' +
|
|
|
+ 'master%22%3A%22' + mMaster
|
|
|
+ + '%22%2C%22nodeId%22%3A' + mNodeId
|
|
|
+ + (mType === undefined ? '' : ('%2C%22type%22%3A' + mType))
|
|
|
+ + '%2C%22baseUrl%22%3A%22' + encodeURIComponent(mBaseUrl)
|
|
|
+ + '%22%7D')
|
|
|
+ this.initPageState()
|
|
|
+ this.getCurrentNode()
|
|
|
+ saveReceiveState({
|
|
|
+ scrollTop: 0,
|
|
|
+ listData: [],
|
|
|
+ hasMore1: true,
|
|
|
+ pageIndex: 1,
|
|
|
+ })()
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取下一条审批数据
|
|
|
+ */
|
|
|
+ loadNextProcess = () => {
|
|
|
+ Toast.loading('正在获取下一条审批数据', 0)
|
|
|
+ fetchPost(mBaseUrl + '/common/getNextProcess.action', {
|
|
|
+ taskId: mNodeId,
|
|
|
+ master: mMaster,
|
|
|
+ _noc: 1,
|
|
|
+ }).then(response => {
|
|
|
+ Toast.hide()
|
|
|
+ let nextNode = response.nodeId
|
|
|
+ if (!isObjEmpty(nextNode)) {
|
|
|
+ mNodeId = nextNode
|
|
|
+ this.toNextNode()
|
|
|
+ } else {
|
|
|
+ message.warn('没有下一条待审批单据')
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ Toast.hide()
|
|
|
+ if (typeof error === 'string') {
|
|
|
+ message.error(error)
|
|
|
+ } else {
|
|
|
+ message.error('审批单据获取失败')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
inputAllInput = () => {
|
|
|
const { mainList, detailList } = this.state
|
|
|
|