提交 b02d0411 authored 作者: 钟是志's avatar 钟是志

28753 北电]求职创业补贴管理,审批页面按钮无反应

上级 78d1d3c1
...@@ -35,7 +35,7 @@ function giveKey(key, datas) { ...@@ -35,7 +35,7 @@ function giveKey(key, datas) {
} }
export async function countAllValues(datas, item) { export async function countAllValues(datas, item) {
console.log(datas); // console.log(datas);
if (item.setNull) { if (item.setNull) {
datas.allValues = JSON.stringify({}); datas.allValues = JSON.stringify({});
} else { } else {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* 2019年9月19日 * 2019年9月19日
* 查看详情页面 * 查看详情页面
*/ */
import React, { Component, Fragment, useRef } from 'react'; import React, { Component, Fragment, useEffect, useState } from 'react';
import { import {
Row, Row,
Col, Col,
...@@ -101,7 +101,7 @@ class DetailSplit extends Component { ...@@ -101,7 +101,7 @@ class DetailSplit extends Component {
* @function 同步加签函数 * @function 同步加签函数
* @param { function } func 打开加签弹框函数 * @param { function } func 打开加签弹框函数
*/ */
updateCountersignModal = func => { updateCountersignModal = (func) => {
this.setState({ this.setState({
countersignModal: func, countersignModal: func,
}); });
...@@ -135,20 +135,17 @@ class DetailSplit extends Component { ...@@ -135,20 +135,17 @@ class DetailSplit extends Component {
componentDidMount() { componentDidMount() {
this.getInit(); this.getInit();
if (this.props.onRef) { if (this.props.onRef) {
this.props.onRef(this); this.props.onRef(this);
} }
} }
// getInit2 = () => {
// console.log('getInit2');
// }
/** /**
* @function 默认请求 * @function 默认请求
*/ */
getInit = handleUser => { getInit = (handleUser) => {
const { dispatch } = this.props; const { dispatch, formPrepareData } = this.props;
const id = this.props.history.location.state && this.props.history.location.state.id; const id = this.props.history.location.state && this.props.history.location.state.id;
const code = this.props.history.location.state && this.props.history.location.state.code; const code = this.props.history.location.state && this.props.history.location.state.code;
const queryId = this.props.history.location.query && this.props.history.location.query.id; const queryId = this.props.history.location.query && this.props.history.location.query.id;
...@@ -161,24 +158,15 @@ class DetailSplit extends Component { ...@@ -161,24 +158,15 @@ class DetailSplit extends Component {
return; return;
} }
} }
const val = formPrepareData;
dispatch({ if (val) {
type: 'affair/getIdFormDetail',
payload: {
id: queryId ? queryId : id, // 审批表Id
code: code || null, // 表单值
handleUser: handleUser || null, // 处理人
taskId, // 多任务流程会使用到,后续改为必须传入
lite: true,
},
callback: val => {
if (this.props.changeData) { if (this.props.changeData) {
this.props.changeData(val); this.props.changeData(val);
} }
const checkListOptions = []; const checkListOptions = [];
const checkedConfimList = []; const checkedConfimList = [];
if (val.hisTaskForm.formKeys) { if (val.hisTaskForm.formKeys) {
val.hisTaskForm.formKeys.map(item => { val.hisTaskForm.formKeys.map((item) => {
checkListOptions.push({ checkListOptions.push({
label: item.taskName, label: item.taskName,
value: item.formKey, value: item.formKey,
...@@ -186,11 +174,11 @@ class DetailSplit extends Component { ...@@ -186,11 +174,11 @@ class DetailSplit extends Component {
}); });
} }
if (val && !val.taskInfo) { if (val && !val.taskInfo) {
permRequest('/UnifiedAppFormApi/getTaskInfos', { // 获取每一步的审核人. permRequest('/UnifiedAppFormApi/getTaskInfos', {
// 获取每一步的审核人.
id: queryId ? queryId : id, // 审批表Id id: queryId ? queryId : id, // 审批表Id
code: code || null, // 表单值 code: code || null, // 表单值
}) }).then((res) => {
.then(res => {
val.taskInfo = res.taskInfo; val.taskInfo = res.taskInfo;
this.setState( this.setState(
{ {
...@@ -219,13 +207,16 @@ class DetailSplit extends Component { ...@@ -219,13 +207,16 @@ class DetailSplit extends Component {
this.props.dispatch({ this.props.dispatch({
type: 'urge/GetMyBtn', type: 'urge/GetMyBtn',
payload: {}, payload: {},
callback: arr => { callback: (arr) => {
this.setState({ this.setState(
{
btnList: arr, btnList: arr,
radiovalue: val.formLevelId ? val.formLevelId : arr[arr.length - 1].id, radiovalue: val.formLevelId ? val.formLevelId : arr[arr.length - 1].id,
}, () => { },
() => {
// this.giveMessageTop(); // this.giveMessageTop();
}); },
);
}, },
}); });
} else { } else {
...@@ -233,18 +224,15 @@ class DetailSplit extends Component { ...@@ -233,18 +224,15 @@ class DetailSplit extends Component {
} }
}, },
); );
}); });
} }
}, }
});
dispatch({ dispatch({
type: 'emailorphone/GetLogo', type: 'emailorphone/GetLogo',
payload: { payload: {
configKeys: ['isCloseUserDetail', 'isCloseFlowPath', 'isAllPrint', 'closeAutoSign'], configKeys: ['isCloseUserDetail', 'isCloseFlowPath', 'isAllPrint', 'closeAutoSign'],
}, },
callback: val => { callback: (val) => {
const closeAutoSign = !!(val[3] && val[3].configValue === 'true'); const closeAutoSign = !!(val[3] && val[3].configValue === 'true');
this.setState({ this.setState({
isCloseUserDetail: !!(val[0] && val[0].configValue === 'true'), isCloseUserDetail: !!(val[0] && val[0].configValue === 'true'),
...@@ -259,7 +247,7 @@ class DetailSplit extends Component { ...@@ -259,7 +247,7 @@ class DetailSplit extends Component {
this.props.dispatch({ this.props.dispatch({
type: 'UserSetCenterApi/queryUserSet', type: 'UserSetCenterApi/queryUserSet',
payload: {}, payload: {},
callback: val => { callback: (val) => {
this.setState({ this.setState({
setData: val, setData: val,
}); });
...@@ -283,10 +271,8 @@ class DetailSplit extends Component { ...@@ -283,10 +271,8 @@ class DetailSplit extends Component {
}); });
} }
} }
}; };
/** /**
* @function 用户点击确认执行相应操作 * @function 用户点击确认执行相应操作
* @description: 注意 用户点击状态时在点击动态配置按钮时进行了保存,并在该函数中最终提交给后端 * @description: 注意 用户点击状态时在点击动态配置按钮时进行了保存,并在该函数中最终提交给后端
...@@ -298,16 +284,7 @@ class DetailSplit extends Component { ...@@ -298,16 +284,7 @@ class DetailSplit extends Component {
*/ */
affairOk = (oldkey, btnValue, value, checked, callback) => { affairOk = (oldkey, btnValue, value, checked, callback) => {
const { dispatch } = this.props; const { dispatch } = this.props;
const { const { radiovalue, isSecond, userInfo, setData, data, btns, taskId, code } = this.state;
radiovalue,
isSecond,
userInfo,
setData,
data,
btns,
taskId,
code,
} = this.state;
const { handleUser } = this.props.history.location.state; const { handleUser } = this.props.history.location.state;
const isCloseFlowPath = sessionStorage.getItem('isCloseFlowPath') const isCloseFlowPath = sessionStorage.getItem('isCloseFlowPath')
? JSON.parse(sessionStorage.getItem('isCloseFlowPath')) ? JSON.parse(sessionStorage.getItem('isCloseFlowPath'))
...@@ -316,12 +293,14 @@ class DetailSplit extends Component { ...@@ -316,12 +293,14 @@ class DetailSplit extends Component {
callback(); callback();
} }
let checkSumbitInfo = checkNeedFormValidateFieldsAndScroll({ // 检查是否必填表单值 let checkSumbitInfo = checkNeedFormValidateFieldsAndScroll({
// 检查是否必填表单值
btns, btns,
btnValue, btnValue,
}); });
let needWriteAuditInfo = checkNeedWriteAuditInfo({ // 检查是否必填审批理由 let needWriteAuditInfo = checkNeedWriteAuditInfo({
// 检查是否必填审批理由
btns, btns,
btnValue, btnValue,
}); });
...@@ -351,23 +330,23 @@ class DetailSplit extends Component { ...@@ -351,23 +330,23 @@ class DetailSplit extends Component {
handleUser, handleUser,
}; };
if (!checkSumbitInfo) { // 如果不需要校验 直接提交数据 if (!checkSumbitInfo) {
// 如果不需要校验 直接提交数据
const values = this.props.form.getFieldsValue(); const values = this.props.form.getFieldsValue();
argumentsSubmitValue.values = values; argumentsSubmitValue.values = values;
submitValues(argumentsSubmitValue); submitValues(argumentsSubmitValue);
} else { } else {
this.props.form.validateFieldsAndScroll((err, values) => { // 校验是否填了必填字段 this.props.form.validateFieldsAndScroll((err, values) => {
// 校验是否填了必填字段
if (!err) { if (!err) {
argumentsSubmitValue.values = values; argumentsSubmitValue.values = values;
submitValues(argumentsSubmitValue); submitValues(argumentsSubmitValue);
} }
}); });
} }
}; };
onChange = e => { onChange = (e) => {
this.setState({ this.setState({
radiovalue: e.target.value, radiovalue: e.target.value,
}); });
...@@ -377,7 +356,7 @@ class DetailSplit extends Component { ...@@ -377,7 +356,7 @@ class DetailSplit extends Component {
* @function 复选框状态函数 * @function 复选框状态函数
* @event change * @event change
*/ */
onCheckChange = checkedValues => { onCheckChange = (checkedValues) => {
this.setState({ this.setState({
checkedConfimList: checkedValues, checkedConfimList: checkedValues,
}); });
...@@ -394,15 +373,14 @@ class DetailSplit extends Component { ...@@ -394,15 +373,14 @@ class DetailSplit extends Component {
* @function 通过用户复选框选择拼装为对应打印页面 * @function 通过用户复选框选择拼装为对应打印页面
*/ */
changeTake = checked => { changeTake = (checked) => {
this.setState({ isTakeFlow: checked }); this.setState({ isTakeFlow: checked });
}; };
changePadding = value => { changePadding = (value) => {
this.setState({ paddingBottom: value }); this.setState({ paddingBottom: value });
}; };
render() { render() {
const { const {
stepFlow, stepFlow,
...@@ -462,29 +440,29 @@ class DetailSplit extends Component { ...@@ -462,29 +440,29 @@ class DetailSplit extends Component {
width: '100%', width: '100%',
display: 'flex', display: 'flex',
justifyContent: 'center', justifyContent: 'center',
}} }}>
>
<div style={{ width: '100%' }}> <div style={{ width: '100%' }}>
<div <div
className={styles.header} className={styles.header}
style={{ style={{
position: 'relative', position: 'relative',
}} }}>
>
{isCloseFlowPath ? null : ( // 关闭流程紧急度显示 {isCloseFlowPath ? null : ( // 关闭流程紧急度显示
<span <span
style={{ style={{
position: 'absolute', position: 'absolute',
left: 0, left: 0,
top: '30%', top: '30%',
}} }}>
>
{isSecond ? ( {isSecond ? (
<> <>
<span style={{ marginRight: 12 }}>{must}流程紧急度</span> <span style={{ marginRight: 12 }}>
{must}
流程紧急度
</span>
<Radio.Group onChange={this.onChange} value={radiovalue}> <Radio.Group onChange={this.onChange} value={radiovalue}>
{btnList.length > 0 {btnList.length > 0
? btnList.map(item => ( ? btnList.map((item) => (
<Radio key={item.id + Math.random()} value={item.id}> <Radio key={item.id + Math.random()} value={item.id}>
<span style={{ color: item.color }}>{item.name}</span> <span style={{ color: item.color }}>{item.name}</span>
</Radio> </Radio>
...@@ -499,8 +477,7 @@ class DetailSplit extends Component { ...@@ -499,8 +477,7 @@ class DetailSplit extends Component {
style={{ style={{
color: formColor || '', color: formColor || '',
marginLeft: 21, marginLeft: 21,
}} }}>
>
{formLevel || '暂无'} {formLevel || '暂无'}
</span> </span>
</> </>
...@@ -537,7 +514,7 @@ class DetailSplit extends Component { ...@@ -537,7 +514,7 @@ class DetailSplit extends Component {
表单间距: 表单间距:
<InputNumber <InputNumber
min={0} min={0}
size='small' size="small"
value={paddingBottom} value={paddingBottom}
onChange={this.changePadding} onChange={this.changePadding}
/> />
...@@ -552,9 +529,8 @@ class DetailSplit extends Component { ...@@ -552,9 +529,8 @@ class DetailSplit extends Component {
</div> </div>
</div> </div>
} }
okText='确定' okText="确定"
cancelText='取消' cancelText="取消">
>
{(data.isPrint == null || data.isPrint || isAllPrint) && showPrint !== false ? ( {(data.isPrint == null || data.isPrint || isAllPrint) && showPrint !== false ? (
<Button <Button
style={{ style={{
...@@ -562,8 +538,7 @@ class DetailSplit extends Component { ...@@ -562,8 +538,7 @@ class DetailSplit extends Component {
right: 200, right: 200,
top: '30%', top: '30%',
}} }}
type='primary' type="primary">
>
打印预览 打印预览
</Button> </Button>
) : ( ) : (
...@@ -577,8 +552,7 @@ class DetailSplit extends Component { ...@@ -577,8 +552,7 @@ class DetailSplit extends Component {
</div> </div>
</div> </div>
</div> </div>
{isLoading ? {isLoading ? (
(
<> <>
<Card style={{ width: '100%' }}> <Card style={{ width: '100%' }}>
{!isCloseUserDetail && ( {!isCloseUserDetail && (
...@@ -592,72 +566,71 @@ class DetailSplit extends Component { ...@@ -592,72 +566,71 @@ class DetailSplit extends Component {
data.userPhone || data.userPhone ||
data.userSchool) && ( data.userSchool) && (
<Row className={styles.row}> <Row className={styles.row}>
{data && data.code && ( {data &&
data.code && (
<Col <Col
style={{ style={{
marginBottom: 12, marginBottom: 12,
}} }}
span={8} span={8}>
>
<span className={styles.hea_title}>单号</span> <span className={styles.hea_title}>单号</span>
<span className={styles.hew_content}>{data.code}</span> <span className={styles.hew_content}>{data.code}</span>
</Col> </Col>
)} )}
{data && data.userName && ( {data &&
data.userName && (
<Col <Col
style={{ style={{
marginBottom: 12, marginBottom: 12,
}} }}
span={8} span={8}>
>
<span className={styles.hea_title}>用户姓名</span> <span className={styles.hea_title}>用户姓名</span>
<span className={styles.hew_content}>{data.userName}</span> <span className={styles.hew_content}>{data.userName}</span>
</Col> </Col>
)} )}
{data && data.userPosition && ( {data &&
data.userPosition && (
<Col <Col
style={{ style={{
marginBottom: 12, marginBottom: 12,
}} }}
span={8} span={8}>
>
<span className={styles.hea_title}>职位</span> <span className={styles.hea_title}>职位</span>
<span className={styles.hew_content}>{data.userPosition}</span> <span className={styles.hew_content}>{data.userPosition}</span>
</Col> </Col>
)} )}
{data && data.userSchool && ( {data &&
data.userSchool && (
<Col <Col
span={8} span={8}
style={{ style={{
marginBottom: 12, marginBottom: 12,
}} }}>
>
<span className={styles.hea_title}>学院/单位</span> <span className={styles.hea_title}>学院/单位</span>
<span className={styles.hew_content}>{data.userSchool}</span> <span className={styles.hew_content}>{data.userSchool}</span>
</Col> </Col>
)} )}
{data && data.userPhone && ( {data &&
data.userPhone && (
<Col <Col
span={8} span={8}
style={{ style={{
marginBottom: 12, marginBottom: 12,
}} }}>
>
<span className={styles.hea_title}>联系电话</span> <span className={styles.hea_title}>联系电话</span>
<span className={styles.hew_content}>{data.userPhone}</span> <span className={styles.hew_content}>{data.userPhone}</span>
</Col> </Col>
)} )}
{data && data.createTime && ( {data &&
data.createTime && (
<Col <Col
style={{ style={{
marginBottom: 12, marginBottom: 12,
}} }}
span={8} span={8}>
>
<span className={styles.hea_title}>申请时间</span> <span className={styles.hea_title}>申请时间</span>
<span className={styles.hew_content}> <span className={styles.hew_content}>
{moment(data.createTime) {moment(data.createTime).format('YYYY-MM-DD HH:mm')}
.format('YYYY-MM-DD HH:mm')}
</span> </span>
</Col> </Col>
)} )}
...@@ -667,38 +640,38 @@ class DetailSplit extends Component { ...@@ -667,38 +640,38 @@ class DetailSplit extends Component {
)} )}
<div <div
className={styles.HistoryFormList} className={styles.HistoryFormList}
id='card_table' id="card_table"
ref={el => (this.componentRef = el)} ref={(el) => (this.componentRef = el)}
style={{ padding: !isShowTitle ? '50px' : '' }} style={{ padding: !isShowTitle ? '50px' : '' }}>
> <HistoryFormList
<HistoryFormList data={data} data={data}
formKeys={hisTaskFormKeys?.formKeys} formKeys={hisTaskFormKeys?.formKeys}
isShowTitle={isShowTitle} isShowTitle={isShowTitle}
routerState={routerState} routerState={routerState}
formData={hisTaskFormKeys?.formData} formData={hisTaskFormKeys?.formData}
/> />
{isHandle === true && !!data.taskFormKey && ( {isHandle === true &&
!!data.taskFormKey && (
<> <>
{isShowTitle ? ( {isShowTitle ? (
<h3 <h3
style={{ style={{
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
}} }}>
> <SVG name="vertical" color="#999999" height="24" />
<SVG name='vertical' color='#999999' height='24' />
当前流程 当前流程
</h3> </h3>
) : ( ) : (
'' ''
)} )}
{isEmpty(data) === false ? ( {isEmpty(data) === false ? (
<GetZdyTable <ZdyTable
key={data.taskFormKey} key={data.taskFormKey}
postData={data} postData={data}
get='web' get="web"
obj={hisTaskFormKeys.formData} obj={hisTaskFormKeys.formData}
table='new' table="new"
form={this.props.form} form={this.props.form}
routerState={routerState} routerState={routerState}
/> />
...@@ -711,16 +684,15 @@ class DetailSplit extends Component { ...@@ -711,16 +684,15 @@ class DetailSplit extends Component {
</Card> </Card>
<Card style={{ width: '100%' }}> <Card style={{ width: '100%' }}>
<div className={styles.body_content} style={{ minHeight: '300px' }}> <div className={styles.body_content} style={{ minHeight: '300px' }}>
<div id={'btnsModalMountDiv'}></div> <div id={'btnsModalMountDiv'} />
<h3> <h3>
审批状态 <span onClick={this.examineFlow}>查看流程图</span> 审批状态 <span onClick={this.examineFlow}>查看流程图</span>
</h3> </h3>
<div <div
ref={el => (this.componentTwoRef = el)} ref={(el) => (this.componentTwoRef = el)}
style={{ style={{
padding: !isShowTitle ? '0 50px 50px 50px' : '', padding: !isShowTitle ? '0 50px 50px 50px' : '',
}} }}>
>
<Timeline> <Timeline>
{stepFlow !== '' && steps !== '' {stepFlow !== '' && steps !== ''
? stepFlow.map((item, index) => { ? stepFlow.map((item, index) => {
...@@ -732,39 +704,47 @@ class DetailSplit extends Component { ...@@ -732,39 +704,47 @@ class DetailSplit extends Component {
dot={ dot={
<Icon <Icon
type={ type={
['处理中', '待处理'].includes(item.status) ? 'clock-circle-o' : 'check-circle' ['处理中', '待处理'].includes(item.status)
? 'clock-circle-o'
: 'check-circle'
} }
style={{ fontSize: '16px' }} style={{ fontSize: '16px' }}
/> />
} }
className={styles.steps_step} className={styles.steps_step}
key={item.id} key={item.id}>
>
<p className={styles.steps_title}> <p className={styles.steps_title}>
{item.assignee} {item.assignee}
<span> <span>
{item.endTime {item.endTime
? moment(item.endTime) ? moment(item.endTime).format('YYYY-MM-DD HH:mm')
.format('YYYY-MM-DD HH:mm')
: '处理中'} : '处理中'}
</span> </span>
</p> </p>
{ {queryApiVersion() === '2.0' &&
queryApiVersion() === '2.0' && ['处理中', '待处理'].includes(item.status) && !!data.nextUsers && ( ['处理中', '待处理'].includes(item.status) &&
<p>审批人员: {data.nextUsers}</p> !!data.nextUsers && <p>审批人员: {data.nextUsers}</p>}
) {queryApiVersion() !== '2.0' &&
} ['处理中', '待处理'].includes(item.status) &&
{queryApiVersion() !== '2.0' && ['处理中', '待处理'].includes(item.status) && !!item.nextUsers && ( !!item.nextUsers && <p>审批人员: {item.nextUsers}</p>}
<p>审批人员: {item.nextUsers}</p> <p>
)} 审批流程:
<p>审批流程:{item.name}</p> {item.name}
<p className={styles.steps_body}>审批状态:{item.status}</p> </p>
<p className={styles.steps_body}>
审批状态:
{item.status}
</p>
{item.taskVariable?.reason ? ( {item.taskVariable?.reason ? (
<p>审批原因:{item.taskVariable?.reason}</p> <p>
审批原因:
{item.taskVariable?.reason}
</p>
) : ( ) : (
'' ''
)} )}
{item.childTaskModel && item.childTaskModel.length > 0 && ( {item.childTaskModel &&
item.childTaskModel.length > 0 && (
<ChildTaskModel data={item.childTaskModel} /> <ChildTaskModel data={item.childTaskModel} />
)} )}
...@@ -783,7 +763,7 @@ class DetailSplit extends Component { ...@@ -783,7 +763,7 @@ class DetailSplit extends Component {
? queryApiActionPath() + item.taskVariable?.sign ? queryApiActionPath() + item.taskVariable?.sign
: '' : ''
} }
alt='' alt=""
/> />
) : ( ) : (
'' ''
...@@ -802,32 +782,40 @@ class DetailSplit extends Component { ...@@ -802,32 +782,40 @@ class DetailSplit extends Component {
'' ''
) : ( ) : (
<Icon <Icon
type='check-circle' type="check-circle"
theme='twoTone' theme="twoTone"
twoToneColor='#52c41a' twoToneColor="#52c41a"
/> />
) )
} }
className={styles.steps_step} className={styles.steps_step}
key={item.id} key={item.id}>
>
<p className={styles.steps_title}> <p className={styles.steps_title}>
{item.assignee} {item.assignee}
<span> <span>
{item.endTime {item.endTime
? moment(item.endTime) ? moment(item.endTime).format('YYYY-MM-DD HH:mm')
.format('YYYY-MM-DD HH:mm')
: null} : null}
</span> </span>
</p> </p>
<p>审批流程:{item.name}</p> <p>
<p className={styles.steps_body}>审批状态:{item.status}</p> 审批流程:
{item.name}
</p>
<p className={styles.steps_body}>
审批状态:
{item.status}
</p>
{item.taskVariable?.reason ? ( {item.taskVariable?.reason ? (
<p>审批原因:{item.taskVariable.reason}</p> <p>
审批原因:
{item.taskVariable.reason}
</p>
) : ( ) : (
'' ''
)} )}
{item.childTaskModel && item.childTaskModel.length > 0 && ( {item.childTaskModel &&
item.childTaskModel.length > 0 && (
<ChildTaskModel data={item.childTaskModel} /> <ChildTaskModel data={item.childTaskModel} />
)} )}
{item.taskVariable?.sign ? ( {item.taskVariable?.sign ? (
...@@ -845,7 +833,7 @@ class DetailSplit extends Component { ...@@ -845,7 +833,7 @@ class DetailSplit extends Component {
? queryApiActionPath() + item.taskVariable?.sign ? queryApiActionPath() + item.taskVariable?.sign
: '' : ''
} }
alt='' alt=""
/> />
) : ( ) : (
'' ''
...@@ -890,8 +878,7 @@ class DetailSplit extends Component { ...@@ -890,8 +878,7 @@ class DetailSplit extends Component {
data, data,
); );
}} }}
type='primary' type="primary">
>
{data.isHandle && data.isOwner {data.isHandle && data.isOwner
? '转办' ? '转办'
: !data.isHandle && data.isOwner : !data.isHandle && data.isOwner
...@@ -909,8 +896,7 @@ class DetailSplit extends Component { ...@@ -909,8 +896,7 @@ class DetailSplit extends Component {
minWidth: 90, minWidth: 90,
}} }}
onClick={this.onClickCountersign} onClick={this.onClickCountersign}
type='primary' type="primary">
>
加签 加签
</Button> </Button>
)} )}
...@@ -921,13 +907,15 @@ class DetailSplit extends Component { ...@@ -921,13 +907,15 @@ class DetailSplit extends Component {
) : ( ) : (
'' ''
)} )}
{isTrunTo && data.isSecond !== true && !data.isHandle && data.isOwner && ( {isTrunTo &&
data.isSecond !== true &&
!data.isHandle &&
data.isOwner && (
<div <div
style={{ style={{
width: '100%', width: '100%',
textAlign: 'center', textAlign: 'center',
}} }}>
>
<Button <Button
style={{ style={{
minHeight: 32, minHeight: 32,
...@@ -937,8 +925,7 @@ class DetailSplit extends Component { ...@@ -937,8 +925,7 @@ class DetailSplit extends Component {
onClick={() => { onClick={() => {
this.showTrunToModel('撤回', data); this.showTrunToModel('撤回', data);
}} }}
type='primary' type="primary">
>
撤回 撤回
</Button> </Button>
</div> </div>
...@@ -953,13 +940,12 @@ class DetailSplit extends Component { ...@@ -953,13 +940,12 @@ class DetailSplit extends Component {
display: 'flex', display: 'flex',
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
}} }}>
> <Spin size="large" spinning={true} />
<Spin size='large' spinning={true} />
</div> </div>
)} )}
<PortalFlowExamineModal // 流程图 <PortalFlowExamineModal // 流程图
ref={node => (this.flowExamineModal = node)} ref={(node) => (this.flowExamineModal = node)}
affairId={id} affairId={id}
id={appId} id={appId}
code={code} code={code}
...@@ -984,13 +970,49 @@ class DetailSplit extends Component { ...@@ -984,13 +970,49 @@ class DetailSplit extends Component {
} }
} }
export default function Index(props) { function Index(props) {
return <DetailSplit {...props} />; const { dispatch, history } = props;
} const [prepare, setPrepare] = useState(false);
useEffect(() => {
const id = history.location.state && history.location.state.id;
const code = history.location.state && history.location.state.code;
const queryId = history.location.query && history.location.query.id;
const taskId = history.location.state && history.location.state.taskId;
if (!id && !code) {
if (queryId) {
} else {
openToast('error', '数据已过期', '当前页面数据已过期,请重新进入');
return;
}
}
message.info('正在加载数据,请等待。');
dispatch({
type: 'affair/getIdFormDetail',
payload: {
id: queryId ? queryId : id, // 审批表Id
code: code || null, // 表单值
handleUser: null, // 处理人
taskId, // 多任务流程会使用到,后续改为必须传入
lite: true,
},
callback: (val) => {
if (val) {
setPrepare(val);
}
},
});
}, []);
function GetZdyTable(props) { if (!prepare) {
const ZdyTableFormNew = Form.create( return <Spin size="large" spinning={true} />;
}
const DetailSplitFormNew = Form.create(
window.zdyTableTemplateWillMountProps?.formCreateOptions || undefined, window.zdyTableTemplateWillMountProps?.formCreateOptions || undefined,
)(ZdyTable); )(DetailSplit);
return <ZdyTableFormNew {...props}/> return <DetailSplitFormNew {...props} formPrepareData={prepare} />;
} }
export default connect(() => {
return {};
})(Index);
...@@ -19,6 +19,7 @@ import getActiveJson from '@/webPublic/one_stop_public/Table/getActiveJson'; ...@@ -19,6 +19,7 @@ import getActiveJson from '@/webPublic/one_stop_public/Table/getActiveJson';
export default class ZdyTable extends Component { export default class ZdyTable extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
console.log(props);
this.state = { this.state = {
objRealTime: {}, objRealTime: {},
isChange: false, isChange: false,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论