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

30240 [需求]【贵建学工打印】打印的样表需要按照发的原件调整  完成

上级 beac2f5a
......@@ -47,7 +47,7 @@ import {
queryApiActionPath,
queryFileUrl,
} from '@/webPublic/one_stop_public/utils/queryConfig';
import { isJSON } from '@/webPublic/zyd_public/utils/utils';
import { getIsGui_Jian, isJSON } from '@/webPublic/zyd_public/utils/utils';
import HistoryFormList from '@/webPublic/one_stop_public/DetailForAudit/HistoryFormList';
@connect()
......@@ -137,6 +137,17 @@ class DetailSplit extends Component {
this.flowExamineModal.showModal(...ags);
};
goPrintDiy = () => {
router.push({
pathname: '/xg/grade/help/PKSRD/DiyPrint',
state: {
},
query: {
code: this.state.code,
},
});
};
componentDidMount() {
this.getInit();
......@@ -389,7 +400,9 @@ class DetailSplit extends Component {
const code = e.currentTarget.dataset.codeId;
let url = window.location.href.split('#')[0];
if (code) {
window.open(url + '#' + this.props.history.location.pathname + '?code=' + code + '&showAll=false');
window.open(
url + '#' + this.props.history.location.pathname + '?code=' + code + '&showAll=false',
);
}
};
......@@ -445,10 +458,10 @@ class DetailSplit extends Component {
};
// console.log(data, isAllPrint);
// let formV = this.props.form.getFieldsValue();
// if(formV?.LiPGpLRKXXm && formV?.LiPGpLRKXXm['41073']){
// console.log(formV?.LiPGpLRKXXm['41073']);
// }
// let formV = this.props.form.getFieldsValue();
// if(formV?.LiPGpLRKXXm && formV?.LiPGpLRKXXm['41073']){
// console.log(formV?.LiPGpLRKXXm['41073']);
// }
return (
<Fragment>
<div
......@@ -456,7 +469,7 @@ class DetailSplit extends Component {
width: '100%',
display: 'flex',
justifyContent: 'center',
minHeight: '50px',
minHeight: '50px',
}}>
<div style={{ width: '100%' }}>
<div
......@@ -466,11 +479,13 @@ class DetailSplit extends Component {
}}>
{isCloseFlowPath ? null : ( // 关闭流程紧急度显示
<span
style={{
// position: 'absolute',
// left: 0,
// top: '30%',
}}>
style={
{
// position: 'absolute',
// left: 0,
// top: '30%',
}
}>
{isSecond ? (
<>
<span style={{ marginRight: 12 }}>
......@@ -503,69 +518,83 @@ class DetailSplit extends Component {
)}
{data.appName ? data.appName : '当前表单'}
{(isEnd || isAllPrint) && showPrint !== false ? (
<>
<Popconfirm
onConfirm={() => {
if (!checkedConfimList || !checkedConfimList.length) {
message.warning('请选择需要打印的表单');
return false;
}
if (domainName) {
window.open(
`${domainName}/protal/printRouter?id=${data.id}&list=${JSON.stringify(
checkedConfimList,
)}&padding=${paddingBottom}&isTakeFlow=${isTakeFlow}&token=${getToken()}`,
);
} else {
openToast('warning', '未配置域名地址,请联系管理员');
}
}}
title={
<div>
<div>
是否带流程:
<Switch checked={isTakeFlow} onChange={this.changeTake} />
</div>
{(isEnd || isAllPrint) &&
showPrint !== false &&
appId !== '1328230407929331712' && (
<>
<Popconfirm
onConfirm={() => {
if (!checkedConfimList || !checkedConfimList.length) {
message.warning('请选择需要打印的表单');
return false;
}
if (domainName) {
window.open(
`${domainName}/protal/printRouter?id=${data.id}&list=${JSON.stringify(
checkedConfimList,
)}&padding=${paddingBottom}&isTakeFlow=${isTakeFlow}&token=${getToken()}`,
);
} else {
openToast('warning', '未配置域名地址,请联系管理员');
}
}}
title={
<div>
表单间距:
<InputNumber
min={0}
size="small"
value={paddingBottom}
onChange={this.changePadding}
/>
</div>
<div className={styles.history_form_title}>请选择需要打印的表单</div>
<div className={styles.history_form_body_div}>
<Checkbox.Group
options={checkListOptions}
onChange={this.onCheckChange}
defaultValue={checkedConfimList}
/>
<div>
是否带流程:
<Switch checked={isTakeFlow} onChange={this.changeTake} />
</div>
<div>
表单间距:
<InputNumber
min={0}
size="small"
value={paddingBottom}
onChange={this.changePadding}
/>
</div>
<div className={styles.history_form_title}>请选择需要打印的表单</div>
<div className={styles.history_form_body_div}>
<Checkbox.Group
options={checkListOptions}
onChange={this.onCheckChange}
defaultValue={checkedConfimList}
/>
</div>
</div>
</div>
}
okText="确定"
cancelText="取消">
{(data.isPrint == null || data.isPrint || isAllPrint) && showPrint !== false ? (
<Button
style={{
position: 'absolute',
right: 200,
top: '30%',
}}
type="primary">
打印预览
</Button>
) : (
''
)}
</Popconfirm>
</>
) : (
''
)}
}
okText="确定"
cancelText="取消">
{(data.isPrint == null || data.isPrint || isAllPrint) &&
showPrint !== false ? (
<Button
style={{
position: 'absolute',
right: 200,
top: '30%',
}}
type="primary">
打印预览
</Button>
) : (
''
)}
</Popconfirm>
</>
)}
{appId === '1328230407929331712' &&
getIsGui_Jian() && (
<Button
onClick={this.goPrintDiy}
style={{
position: 'absolute',
right: 200,
top: '30%',
}}
type="primary">
打印预览
</Button>
)}
</div>
</div>
</div>
......@@ -1006,8 +1035,8 @@ function Index(props) {
const getFormDetailData = () => {
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 queryCode = history.location.query && history.location.query.code;
const queryId = history.location.query && history.location.query.id;
const queryCode = history.location.query && history.location.query.code;
const taskId = history.location.state && history.location.state.taskId;
if (!id && !code) {
if (queryId) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论