Commit 4f04e5fc authored by 涂伟's avatar 涂伟

fix: '打印功能配置添加'

parent 6c983903
Pipeline #74453 passed with stages
import React, { useState, useEffect } from 'react';
import { CreateFlow } from '@/services/workflow/workflow';
import { Form, Modal, Input, notification, Select, Radio } from 'antd';
import { Form, Modal, Input, notification, Select, Radio, Switch } from 'antd';
const { Option } = Select;
const { TextArea } = Input;
const FlowModal = props => {
......@@ -410,11 +410,21 @@ const FlowModal = props => {
const onFinish = () => {
form.validateFields().then(validate => {
if (validate) {
let datas = JSON.parse(JSON.stringify(validate));
for (let key in datas) {
if(key === 'isPrint') {
if (datas[key] === false) {
datas[key] = 0;
} else if (datas[key] === true) {
datas[key] = 1;
}
}
}
let obj = {};
if (modalType === 'add') {
obj = { ...validate, CreateUser: sessionStorage.getItem('userName') };
obj = { ...datas, CreateUser: sessionStorage.getItem('userName') };
} else {
obj = { ...validate, CreateUser: sessionStorage.getItem('userName'), flowID: msg.FlowID };
obj = { ...datas, CreateUser: sessionStorage.getItem('userName'), flowID: msg.FlowID };
}
CreateFlow(obj)
.then(res => {
......@@ -467,7 +477,7 @@ const FlowModal = props => {
console.log(mkRslt(arrResult));
// form.setFieldsValue({ Code: mkRslt(arrResult) });
form.setFieldsValue({ Prefix: mkRslt(arrResult) });
setFlag(flag+1)
setFlag(flag + 1);
};
const checkCh = ch => {
......@@ -639,6 +649,12 @@ const FlowModal = props => {
</Radio>
</Radio.Group>
</Form.Item>
<Form.Item label="是否打印" name="isPrint">
<Switch checkedChildren="是" unCheckedChildren="否" />
</Form.Item>
<Form.Item label="打印模板" name="printTemp">
<Input placeholder="请输入打印模板" />
</Form.Item>
<Form.Item label="接口配置" name="InterfaceConfig">
<TextArea placeholder="请填写接口配置" />
</Form.Item>
......
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