Commit ce489afc authored by 熊成伟's avatar 熊成伟

debug

parent 64e1bcfb
Pipeline #16373 passed with stages
in 1 minute and 8 seconds
...@@ -129,10 +129,10 @@ const Process = (props) => { ...@@ -129,10 +129,10 @@ const Process = (props) => {
} }
}, [basic]); }, [basic]);
// const [blyj, setBlyj] = useState(); const [blyj, setBlyj] = useState();
// console.log(blyj)
const optionChange = val => { const optionChange = val => {
// setBlyj(val) setBlyj(val);
optionBlur()
setDisabled(!(val != null && val !== '')) setDisabled(!(val != null && val !== ''))
}; };
...@@ -145,6 +145,16 @@ const Process = (props) => { ...@@ -145,6 +145,16 @@ const Process = (props) => {
window.scrollTo(0, document.body.scrollHeight); window.scrollTo(0, document.body.scrollHeight);
optionBlur() optionBlur()
}; };
const download = (uuid, callback) => {
const developer = localStorage.getItem('developer');
axiosRequest({
method: 'post',
url: `/idtAppServiceV6/oApp/downloadLargeFile`,
body: {uuid, tableId, templateId, developer}
}).then(res => {
callback && callback()
});
}
//tab切换 //tab切换
const tabClick = (name) => { const tabClick = (name) => {
...@@ -165,7 +175,21 @@ const Process = (props) => { ...@@ -165,7 +175,21 @@ const Process = (props) => {
}; };
}; };
const blyjSubmit = () => {
axiosRequest({
method: 'post',
url: `/idtAppServiceV6/oApp/save`,
body: {
tableId,
dealInfo: JSON.stringify({BLYJ: blyj, flowTbId}),
params: JSON.stringify({UUID: uuid})}
}).then(res => {
console.log(res)
});
}
const showActionSheet = () => { const showActionSheet = () => {
blyjSubmit()
const BUTTON = []; const BUTTON = [];
button.map(item => BUTTON.push(item.button)); button.map(item => BUTTON.push(item.button));
const BUTTONS = BUTTON.concat(['取消']); const BUTTONS = BUTTON.concat(['取消']);
...@@ -176,8 +200,7 @@ const Process = (props) => { ...@@ -176,8 +200,7 @@ const Process = (props) => {
wrapProps, wrapProps,
}, },
(buttonIndex) => { (buttonIndex) => {
buttonIndex < BUTTONS.length - 1 && subUrl(buttonIndex) buttonIndex > -1 && (buttonIndex < BUTTONS.length - 1) && subUrl(buttonIndex)
// console.log(buttonIndex)
}); });
}; };
const subUrl = key => { const subUrl = key => {
...@@ -242,7 +265,7 @@ const Process = (props) => { ...@@ -242,7 +265,7 @@ const Process = (props) => {
{resultLoading ? <Basic data={basic} attachId={uuid} {...props}/> : <Skeleton/>} {resultLoading ? <Basic data={basic} attachId={uuid} {...props}/> : <Skeleton/>}
<div id="event-adjunct"/> <div id="event-adjunct"/>
<WhiteSpace/> <WhiteSpace/>
{resultLoading ? <Adjunct data={adjunctData}/> : <Skeleton/>} {resultLoading ? <Adjunct download={download} data={adjunctData} tableId={tableId}/> : <Skeleton/>}
<div id="event-flow"/> <div id="event-flow"/>
<WhiteSpace/> <WhiteSpace/>
{resultLoading ? <Flow data={flowData}/> : <Skeleton/>} {resultLoading ? <Flow data={flowData}/> : <Skeleton/>}
......
import React from 'react'; import React from 'react';
import List from '../../../components/List' import List from '../../../components/List'
import AdjunctList from '../../../components/Adjunct' import AdjunctList from '../../../components/Adjunct'
import axiosRequest from "../../../utils/request";
const Adjunct = (props) => { const Adjunct = (props) => {
const {data} = props; const {data, download} = props;
// const downlaod = (src) => { // const downlaod = (src) => {
// const iframe = document.createElement('iframe'); // const iframe = document.createElement('iframe');
// iframe.style.display = 'none'; // iframe.style.display = 'none';
// iframe.src = "javascript: '<script>location.href=\"" + src + "\"<\/script>'"; // iframe.src = "javascript: '<script>location.href=\"" + src + "\"<\/script>'";
// document.getElementsByTagName('body')[0].appendChild(iframe); // document.getElementsByTagName('body')[0].appendChild(iframe);
// } // }
const download = (uuid) => { const downloadFile = (uuid) => {
download(uuid,)
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/oApp/downloadLargeFile',
body: {
uuid
},
}).then(res => {
})
} }
const listData = [ const listData = [
{title: '附件', line: data.length > 0, content: {title: '附件', line: data.length > 0, content:
<div> <div>
{data.length > 0 ? data.map((item, index) => ( {data.length > 0 ? data.map((item, index) => (
<AdjunctList key={index} data={item} onClick={() => download(item.UUID)}/> <AdjunctList key={index} data={item} onClick={() => downloadFile(item.UUID)}/>
)) : '无'} )) : '无'}
</div> </div>
}, },
......
import React from 'react'; import React from 'react';
import { createForm } from 'rc-form'; import { createForm } from 'rc-form';
import {List, Picker, InputItem, Button, Modal, TextareaItem} from "antd-mobile"; import {List, Picker, InputItem, Button, Modal, DatePicker} from "antd-mobile";
import './index.less' import './index.less'
const Send = (props) => { const Send = (props) => {
const {visible, onClose, addGoods} = props; const {visible, onClose, addGoods, columns} = props;
const {getFieldProps, resetFields} = props.form; const {getFieldProps, resetFields} = props.form;
const district = [
{label: '111', value: '111'}
];
const handleClose = () => { const handleClose = () => {
resetFields(); resetFields();
onClose() onClose()
...@@ -23,7 +19,13 @@ const Send = (props) => { ...@@ -23,7 +19,13 @@ const Send = (props) => {
} }
}); });
} };
const getMode = val => {
const date = /^(\w{4})-(\w{2})-(\w{2})$/;
const time = /^(\w{2}):(\w{2}):(\w{2})$/;
return date.test(val) ? 'date' : (time.test(val) ? 'time' : 'datetime')
};
return ( return (
<div> <div>
...@@ -36,17 +38,23 @@ const Send = (props) => { ...@@ -36,17 +38,23 @@ const Send = (props) => {
> >
<form> <form>
<List className="goods-form"> <List className="goods-form">
<InputItem {...getFieldProps('name')}>领取人</InputItem> {columns && columns.length > 0 && columns.map((item, index) => {
<Picker data={district} cols={1} {...getFieldProps('ggf1')}> if (item.type === 'DATE') {
<List.Item arrow="horizontal">品名</List.Item> return (
<DatePicker key={index} mode={getMode(item.dateType)} className="send-date-style"{...getFieldProps(item.label)}>
<List.Item arrow="horizontal">{item.label}</List.Item>
</DatePicker>
)
}else if (item.data) {
return (
<Picker key={index} data={item.data} cols={1} {...getFieldProps(item.label)}>
<List.Item arrow="horizontal">{item.label}</List.Item>
</Picker> </Picker>
<InputItem {...getFieldProps('amount')} placeholder={`(库存剩余:${0})`}>申请数量</InputItem> )
<TextareaItem } else {
title="内容" return <InputItem key={index}{...getFieldProps(item.label)}>{item.label}</InputItem>
placeholder="请输入内容" }
{...getFieldProps('_mail_editor_text')} })}
rows={4}
/>
</List> </List>
</form> </form>
......
...@@ -7,6 +7,7 @@ import Upload from 'rc-upload'; ...@@ -7,6 +7,7 @@ import Upload from 'rc-upload';
import './index.less' import './index.less'
import moment from 'moment' import moment from 'moment'
import fileRequest from "../../../utils/fileRequest"; import fileRequest from "../../../utils/fileRequest";
import Skeleton from '../../../components/Skeleton'
import AddGood from "./AddGood"; import AddGood from "./AddGood";
...@@ -20,6 +21,7 @@ const Send = (props) => { ...@@ -20,6 +21,7 @@ const Send = (props) => {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [goodSubmit, setGoodSubmit] = useState(false); const [goodSubmit, setGoodSubmit] = useState(false);
const onSubmit = () => { const onSubmit = () => {
props.form.validateFields({ force: true }, (error) => { props.form.validateFields({ force: true }, (error) => {
if (!error) { if (!error) {
...@@ -44,23 +46,46 @@ const Send = (props) => { ...@@ -44,23 +46,46 @@ const Send = (props) => {
}, },
}).then(res => { }).then(res => {
setLoading(false); setLoading(false);
new Promise((resolve => { if (res.uuid){
setGoodSubmit(true);
getChildColumns(res.uuid);
upload2.length > 0 && new Promise((resolve => {
res.uuid && uploadFile(upload2, 'fj', res.uuid); res.uuid && uploadFile(upload2, 'fj', res.uuid);
resolve() resolve()
})).then(() => { })).then(() => {
if (name !== '办公用品采购') { Toast.success('新增成功');
res.uuid && Toast.success('新增成功'); })
props.history.goBack()
}else {
setGoodSubmit(true)
} }
})
}); });
} }
}); });
}; };
const [childData, setChildData] = useState([])
const getChildColumns = (uuid) => {
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/oApp/childDispatcher',
body: {
uuid,
returnJson: true,
templateId: submitData.templateId,
templatePath: 'cgwpxx_list'
},
}).then(res => {
const dataSource = res && res.elementList && res.elementList.map((item, index) => {
const group = {};
group.type = item.colType;
group.type === 'DATE' && (group.dateType = item.dateType);
group.label = item.showName.replace(/\s+/g,"");
item.dict && item.dict.data && item.dict.data.length > 0 && (group.data = item.dict.data.map(item => ({label: item.DISP_VALUE, value: item.REAL_VALUE})));
return group;
});
setChildData(dataSource)
})
}
const [upload2, setUpload2] = useState([]); const [upload2, setUpload2] = useState([]);
const uploaderProps2 = { const uploaderProps2 = {
...@@ -102,6 +127,7 @@ const Send = (props) => { ...@@ -102,6 +127,7 @@ const Send = (props) => {
const [formData, setFormData] = useState([]); const [formData, setFormData] = useState([]);
const [submitData, setSubmitData] = useState({}); const [submitData, setSubmitData] = useState({});
const [loading2, setLoading2] = useState(false)
useEffect(() => { useEffect(() => {
const menuParams = localStorage.getItem('menu'); const menuParams = localStorage.getItem('menu');
const menu = JSON.parse(menuParams); const menu = JSON.parse(menuParams);
...@@ -111,7 +137,8 @@ const Send = (props) => { ...@@ -111,7 +137,8 @@ const Send = (props) => {
url: `/idtAppServiceV6/oApp/dispatcher`, url: `/idtAppServiceV6/oApp/dispatcher`,
body: {operateId: menu[menuIndex].children[0].id, formType: 'form'} body: {operateId: menu[menuIndex].children[0].id, formType: 'form'}
}).then(res => { }).then(res => {
const dataSource = res.elementList.map((item, index) => { setLoading2(true)
const dataSource = res && res.elementList && res.elementList.map((item, index) => {
const group = {}; const group = {};
group.type = item.colType; group.type = item.colType;
group.type === 'DATE' && (group.dateType = item.dateType); group.type === 'DATE' && (group.dateType = item.dateType);
...@@ -119,7 +146,7 @@ const Send = (props) => { ...@@ -119,7 +146,7 @@ const Send = (props) => {
item.dict && item.dict.data && item.dict.data.length > 0 && (group.data = item.dict.data.map(item => ({label: item.DISP_VALUE, value: item.REAL_VALUE}))); item.dict && item.dict.data && item.dict.data.length > 0 && (group.data = item.dict.data.map(item => ({label: item.DISP_VALUE, value: item.REAL_VALUE})));
return group; return group;
}); });
setSubmitData(res.property) setSubmitData(res.property);
setFormData(dataSource) setFormData(dataSource)
}); });
}, []); }, []);
...@@ -133,17 +160,42 @@ const Send = (props) => { ...@@ -133,17 +160,42 @@ const Send = (props) => {
const [goods, setGoods] = useState([]); const [goods, setGoods] = useState([]);
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
const [sGood, setSGood] = useState([]); const [sGood, setSGood] = useState([]);
const checkGood = (index, checked) => { const checkGood = (id, checked) => {
const newData = [...sGood]; const newData = JSON.parse(JSON.stringify(sGood));
const Index = sGood.findIndex(item => item.id === index); const Index = sGood.findIndex(item => item.id === id);
checked ? newData.push(goods[index]) : newData.splice(Index, 1); const lIndex = goods.findIndex(item => item.id === id);
checked ? newData.push(goods[lIndex]) : newData.splice(Index, 1);
setSGood(newData) setSGood(newData)
}; };
const addGoods = (values) => { const addGoods = (values) => {
const newGood = [...goods, values]; const keys = Object.keys(values);
const newGoods = newGood.map((item, index) => ({...item, id: index, checked: false})); keys.map(item => {
setGoods(newGoods) !values[item] && (delete values[item]);
Array.isArray(values[item]) && values[item].length === 1 && (values[item] = values[item][0]);
values[item] instanceof Date && ( values[item] = moment(values[item]).format("YYYY-MM-DD HH:mm:ss"))
return null;
});
axiosRequest({
method: 'post',
url: `/idtAppServiceV6/oApp/singleSave`,
body: {
params: JSON.stringify(values),
tableId: submitData.tableId,
}
}).then(res => {
if (res.uuid) {
const newGood = [...goods, {...values, id: res.uuid, checked: false}];
setGoods(newGood)
}
})
}; };
// const saveGoods = () => {
// const subData = JSON.parse(JSON.stringify(goods));
// subData.map(item => {delete item.id; delete item.checked});
//
// }
const selectAll = (checked) => { const selectAll = (checked) => {
setSGood(checked ? goods : []) setSGood(checked ? goods : [])
}; };
...@@ -153,9 +205,21 @@ const Send = (props) => { ...@@ -153,9 +205,21 @@ const Send = (props) => {
{ text: '确认', { text: '确认',
onPress: () =>{ onPress: () =>{
const ids = sGood.map(item => item.id); const ids = sGood.map(item => item.id);
const result = goods.filter(item => ids.indexOf(item.id) < 0);
setGoods(result); axiosRequest({
setSGood([]); method: 'post',
url: `/idtAppServiceV6/oApp/delete`,
body: {
uuids: JSON.stringify(ids),
tableId: submitData.tableId,
}
}).then(res => {
console.log(res)
})
// const result = goods.filter(item => ids.indexOf(item.id) < 0);
// setGoods(result);
// setSGood([]);
} }
}, },
]) ])
...@@ -168,13 +232,16 @@ const Send = (props) => { ...@@ -168,13 +232,16 @@ const Send = (props) => {
newGoods[index].checked = !newGoods[index].checked; newGoods[index].checked = !newGoods[index].checked;
setGoods(newGoods) setGoods(newGoods)
}; };
return ( return (
<div> <div>
<AddGood <AddGood
columns={childData}
visible={visible} visible={visible}
onClose={() => setVisible(false)} onClose={() => setVisible(false)}
addGoods={addGoods} addGoods={addGoods}
/> />
{loading2 ? (
<form> <form>
<List className="send-content"> <List className="send-content">
{formData.length > 0 && ( {formData.length > 0 && (
...@@ -207,9 +274,15 @@ const Send = (props) => { ...@@ -207,9 +274,15 @@ const Send = (props) => {
<a className="auto-upload">上传附件 +</a> <a className="auto-upload">上传附件 +</a>
</Upload> </Upload>
<WhiteSpace/> <WhiteSpace/>
{!goodSubmit && (
<WingBlank> <WingBlank>
<Button onClick={onSubmit} loading={loading} type="primary">保存并添加办公用品</Button> <Button onClick={onSubmit} loading={loading} type="primary">保存并添加办公用品</Button>
</WingBlank> </WingBlank>
)}
{goodSubmit && (
<div>
<WhiteSpace/>
<List.Item extra={ <List.Item extra={
<div className="good-btn-content"> <div className="good-btn-content">
<div className="good-btn mr-12 c-primary" onClick={() => setVisible(true)}>添加</div> <div className="good-btn mr-12 c-primary" onClick={() => setVisible(true)}>添加</div>
...@@ -219,27 +292,29 @@ const Send = (props) => { ...@@ -219,27 +292,29 @@ const Send = (props) => {
<WhiteSpace/> <WhiteSpace/>
{goods.length > 0 && (<Item onChange={(val) => selectAll(val.target.checked)}>全选</Item>)} {goods.length > 0 && (<Item onChange={(val) => selectAll(val.target.checked)}>全选</Item>)}
{goods.length > 0 && goods.map((item, index) => ( {goods.length > 0 && goods.map((item, index) => (
<AgreeItem className="mt-10" key={index} checked={sGood.findIndex(item => item.id === index) > -1} onChange={(val) => checkGood(index, val.target.checked)}> <AgreeItem className="mt-10" key={index} checked={sGood.findIndex(child => child.id === item.id) > -1} onChange={(val) => checkGood(item.id, val.target.checked)}>
<div className="good-item-box" onClick={(e) => getGoodInfo(index, e)}> <div className="good-item-box" onClick={(e) => getGoodInfo(index, e)}>
<div className="good-item-content"> <div className="good-item-content">
品名:{item.name || ''} {childData[0].label}{item[childData[0].label] || ''}
<img src="/img/rarrow.png" alt="" className={`icon18 ${item.checked ? 'icon-checked' : 'icon-unchecked'}`}/> <img src="/img/rarrow.png" alt="" className={`icon18 ${item.checked ? 'icon-checked' : 'icon-unchecked'}`}/>
</div> </div>
{item.checked && ( {item.checked && childData.map((item3, index3) => index3 !== 0 && (
<div> <div key={index3} className="good-item-content">{item3.label}{item[item3.label] || ''}</div>
<div className="good-item-content">领取人:{item.name || ''}</div> ))}
<div className="good-item-content">申请数量:{item.name || ''}</div>
<div className="good-item-content">实际发放数量:{item.name || ''}</div>
</div>
)}
</div> </div>
</AgreeItem> </AgreeItem>
))} ))}
<WhiteSpace/> <WhiteSpace/>
</div> </div>
)} )}
<WhiteSpace/>
</div>
)}
</List> </List>
</form> </form>
) : <Skeleton/>}
</div> </div>
); );
}; };
......
...@@ -9,6 +9,7 @@ import moment from 'moment' ...@@ -9,6 +9,7 @@ import moment from 'moment'
import fileRequest from "../../../utils/fileRequest"; import fileRequest from "../../../utils/fileRequest";
import MeetInfo from './MeetInfo' import MeetInfo from './MeetInfo'
import PeopleInfo from './PeopleInfo' import PeopleInfo from './PeopleInfo'
import Skeleton from '../../../components/Skeleton'
const Send = (props) => { const Send = (props) => {
const {name} = props.match.params; const {name} = props.match.params;
...@@ -108,6 +109,7 @@ const Send = (props) => { ...@@ -108,6 +109,7 @@ const Send = (props) => {
const [formData, setFormData] = useState([]); const [formData, setFormData] = useState([]);
const [submitData, setSubmitData] = useState({}); const [submitData, setSubmitData] = useState({});
const [loading2, setLoading2] = useState(false)
useEffect(() => { useEffect(() => {
const menuParams = localStorage.getItem('menu'); const menuParams = localStorage.getItem('menu');
const menu = JSON.parse(menuParams); const menu = JSON.parse(menuParams);
...@@ -117,6 +119,7 @@ const Send = (props) => { ...@@ -117,6 +119,7 @@ const Send = (props) => {
url: `/idtAppServiceV6/oApp/dispatcher`, url: `/idtAppServiceV6/oApp/dispatcher`,
body: {operateId: menu[menuIndex].children[0].id, formType: 'form'} body: {operateId: menu[menuIndex].children[0].id, formType: 'form'}
}).then(res => { }).then(res => {
setLoading2(true);
const dataSource = res.elementList.map((item, index) => { const dataSource = res.elementList.map((item, index) => {
const group = {}; const group = {};
group.type = item.colType; group.type = item.colType;
...@@ -166,6 +169,7 @@ const Send = (props) => { ...@@ -166,6 +169,7 @@ const Send = (props) => {
peopleData={sP} peopleData={sP}
onSelect={setSP} onSelect={setSP}
/> />
{loading2 ? (
<form> <form>
<List className="send-content"> <List className="send-content">
{formData.length > 0 && ( {formData.length > 0 && (
...@@ -240,6 +244,8 @@ const Send = (props) => { ...@@ -240,6 +244,8 @@ const Send = (props) => {
)} )}
</form> </form>
) : <Skeleton/>}
</div> </div>
); );
}; };
......
...@@ -10,11 +10,13 @@ import fileRequest from "../../../utils/fileRequest"; ...@@ -10,11 +10,13 @@ import fileRequest from "../../../utils/fileRequest";
import MeetInfo from './MeetInfo' import MeetInfo from './MeetInfo'
import PeopleInfo from './PeopleInfo' import PeopleInfo from './PeopleInfo'
import AddGood from "./AddGood"; import AddGood from "./AddGood";
import Skeleton from '../../../components/Skeleton'
const alert = Modal.alert; const alert = Modal.alert;
const Item = Checkbox.CheckboxItem; const Item = Checkbox.CheckboxItem;
const AgreeItem = Checkbox.AgreeItem; const AgreeItem = Checkbox.AgreeItem;
const Send = (props) => { const Send = (props) => {
const {name} = props.match.params; const {name} = props.match.params;
const {getFieldProps} = props.form; const {getFieldProps} = props.form;
...@@ -33,6 +35,8 @@ const Send = (props) => { ...@@ -33,6 +35,8 @@ const Send = (props) => {
return null; return null;
}); });
name === '会议申请' && (values['会议地点'] = HYSDD); name === '会议申请' && (values['会议地点'] = HYSDD);
// name === '收文管理' && (values['文号'] = HYSDD);
// name === '发文管理' && (values['编号'] = HYSDD);
setLoading(true); setLoading(true);
axiosRequest({ axiosRequest({
method: 'post', method: 'post',
...@@ -119,15 +123,20 @@ const Send = (props) => { ...@@ -119,15 +123,20 @@ const Send = (props) => {
const [formData, setFormData] = useState([]); const [formData, setFormData] = useState([]);
const [submitData, setSubmitData] = useState({}); const [submitData, setSubmitData] = useState({});
const [numberData, setNumberData] = useState([]);
const [numberList, setNumberList] = useState([]);
const [loading2, setLoading2] = useState(false);
useEffect(() => { useEffect(() => {
const menuParams = localStorage.getItem('menu'); const menuParams = localStorage.getItem('menu');
const menu = JSON.parse(menuParams); const menu = JSON.parse(menuParams);
const menuIndex = menu.findIndex(item => item.text === name); const menuIndex = menu.findIndex(item => item.text === name);
menuIndex > -1 && menu[menuIndex].children.length > 0 && axiosRequest({ menuIndex > -1 && menu[menuIndex].children.length > 0 && axiosRequest({
method: 'post', method: 'post',
url: `/idtAppServiceV6/oApp/dispatcher`, url: `/idtAppServiceV6/oApp/dispatcher`,
body: {operateId: menu[menuIndex].children[0].id, formType: 'form'} body: {operateId: menu[menuIndex].children[0].id, formType: 'form'}
}).then(res => { }).then(res => {
setLoading2(true)
const dataSource = res.elementList.map((item, index) => { const dataSource = res.elementList.map((item, index) => {
const group = {}; const group = {};
group.type = item.colType; group.type = item.colType;
...@@ -136,7 +145,12 @@ const Send = (props) => { ...@@ -136,7 +145,12 @@ const Send = (props) => {
item.dict && item.dict.data && item.dict.data.length > 0 && (group.data = item.dict.data.map(item => ({label: item.DISP_VALUE, value: item.REAL_VALUE}))); item.dict && item.dict.data && item.dict.data.length > 0 && (group.data = item.dict.data.map(item => ({label: item.DISP_VALUE, value: item.REAL_VALUE})));
return group; return group;
}); });
setSubmitData(res.property) const numberIndex = dataSource.findIndex(item =>
name === '收文管理' ? (item.label === '来文机关或部门') : (item.label === '发文机关代字')
);
const list = numberIndex > -1 && (dataSource[numberIndex].data.map(item => ({label: item.label, value: item.label,})));
setNumberData(list || []);
setSubmitData(res.property);
setFormData(dataSource) setFormData(dataSource)
}); });
}, []); }, []);
...@@ -199,6 +213,26 @@ const Send = (props) => { ...@@ -199,6 +213,26 @@ const Send = (props) => {
newGoods[index].checked = !newGoods[index].checked; newGoods[index].checked = !newGoods[index].checked;
setGoods(newGoods) setGoods(newGoods)
}; };
const checkTitle = () => {
fileRequest({
method: 'post',
url: '/idtAppServiceV6/control/getList',
body: {
script: 'oa_fwgl_jyFwwhbh',
args: JSON.stringify([numberList[0], numberList[1]]),
keys: JSON.stringify([numberList[2]])
}
}).then((res) => {
Toast.success('校验成功');
});
};
const saveNumber = (number1, number2, number3) => {
const result = [...numberList];
number1 && (result[0] = number1);
number2 && (result[1] = number2);
number3 && (result[2] = number3);
setNumberList(result)
};
return ( return (
<div> <div>
...@@ -216,6 +250,7 @@ const Send = (props) => { ...@@ -216,6 +250,7 @@ const Send = (props) => {
onClose={() => setVisible(false)} onClose={() => setVisible(false)}
addGoods={addGoods} addGoods={addGoods}
/> />
{loading2 ? (
<form> <form>
<List className="send-content"> <List className="send-content">
{formData.length > 0 && ( {formData.length > 0 && (
...@@ -235,22 +270,49 @@ const Send = (props) => { ...@@ -235,22 +270,49 @@ const Send = (props) => {
) )
}else if (item.label === '会议地点') { }else if (item.label === '会议地点') {
return ( return (
<List.Item className="auto-flex" extra={ <List.Item key={index} className="auto-flex" extra={
<div className="pos-aline"> <div className="pos-aline">
<div className="meet-select-btn" onClick={getPlace}>选择会议地点</div> <div className="meet-select-btn" onClick={getPlace}>选择会议地点</div>
<div id="room-number" className="ml-40 room-num">{HYSDD}</div> <div className="ml-40 room-num">{HYSDD}</div>
</div> </div>
}>会议地点</List.Item> }>会议地点</List.Item>
) )
} else if (item.label === '参会人员') { } else if (item.label === '参会人员') {
return ( return (
<List.Item className="auto-flex" extra={ <List.Item key={index} className="auto-flex" extra={
<div> <div>
<div className="meet-select-btn" onClick={getPerson}>选择参会人员</div> <div className="meet-select-btn" onClick={getPerson}>选择参会人员</div>
</div> </div>
}>参会人员</List.Item> }>参会人员</List.Item>
) )
} else { } else if (name=== '收文管理' && item.label.indexOf('文号') > -1) {
return (
<List.Item key={index} className="line-number">
文号
<div className="pos-aline">
<Picker value={[numberList[0]]} data={numberData} cols={1} onChange={val => saveNumber(val[0])}>
<List.Item className="room-num-2"/>
</Picker>
<div className="pos-aline">[ <input className="room-num-2" onChange={(val) => saveNumber(null, val.target.value)}/> ]</div>
<input className="room-num-2" onChange={(val) => saveNumber(null, null, val.target.value)}/>
<Button className="org-btn" size="small" onClick={checkTitle}>校验</Button>
</div>
</List.Item>
)
} else if (name=== '发文管理' && item.label.indexOf('编号') > -1) {
return (
<List.Item key={index}>
编号
<div className="pos-aline">
<Picker value={[numberList[0]]} data={numberData} cols={1} onChange={val => saveNumber(val[0])}>
<List.Item className="room-num-2"/>
</Picker>
<div className="pos-aline">[ <input className="room-num-2" onChange={(val) => saveNumber(null, val.target.value)}/> ]</div>
<input className="room-num-2" onChange={(val) => saveNumber(null, null, val.target.value)}/>
</div>
</List.Item>
)
}else {
return <InputItem key={index}{...getFieldProps(item.label)}>{item.label}</InputItem> return <InputItem key={index}{...getFieldProps(item.label)}>{item.label}</InputItem>
} }
})} })}
...@@ -323,6 +385,8 @@ const Send = (props) => { ...@@ -323,6 +385,8 @@ const Send = (props) => {
)} )}
</form> </form>
) : (<Skeleton/>)}
</div> </div>
); );
}; };
......
...@@ -129,6 +129,17 @@ ...@@ -129,6 +129,17 @@
.ml-40{ .ml-40{
margin-left: 30px; margin-left: 30px;
} }
.room-num-2{
width: 60px;
height: 29px;
border:0 solid rgba(38, 104, 255, 0.2);
border-radius:6px;
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 249, 249, 1);
text-align: center;
}
.room-num{ .room-num{
width: 60px; width: 60px;
height: 29px; height: 29px;
...@@ -152,3 +163,34 @@ ...@@ -152,3 +163,34 @@
.footer-button.btn-disabled{ .footer-button.btn-disabled{
background: rgba(151, 151, 151, 1) !important; background: rgba(151, 151, 151, 1) !important;
} }
.room-num-2 .am-list-extra, .room-num-2 .am-list-line{
min-width: 80px !important;
text-align: center !important;
padding: 0 !important;
height: 29px !important;
line-height: 29px !important;
}
.room-num-2 .am-list-line:after{
display: none !important;
}
.room-num-2.am-list-item{
min-width: 80px !important;
height: 29px !important;
line-height: 29px !important;
min-height: 29px !important;
}
.am-list-item.room-num-2.am-list-item-middle{
min-width: 80px !important;
padding: 0 !important;
}
.line-number .am-list-content{
display: flex;
flex-direction: column !important;
justify-content: flex-start !important;
align-items: flex-start;
}
.org-btn{
margin-left: 20px;
background: rgba(239, 154, 54, 1);
color: #ffffff;
}
...@@ -50,12 +50,11 @@ export const createAPI = (baseURL) => { ...@@ -50,12 +50,11 @@ export const createAPI = (baseURL) => {
.then(function (response) { .then(function (response) {
response = response.data || response.tree; response = response.data || response.tree;
// console.log(!response || !(response.data || response.tree))
if (!response || !(response.data || response.tree)) { if (!response || !(response.data || response.tree)) {
// response.status === 'failure' && (window.location.href = '/login') // response.status === 'failure' && (window.location.href = '/login')
response.code === 'idt-jwt-500' && (window.location.href = '/login') response.code === 'idt-jwt-500' && (window.location.href = '/login')
console.log('response出错, 无返回数据!', response); console.log('response出错, 无返回数据!', response);
Toast.fail(response.message)
// return false; // return false;
}; };
if (response.data && response.data.errorMessage) { if (response.data && response.data.errorMessage) {
...@@ -83,6 +82,7 @@ export const createAPI = (baseURL) => { ...@@ -83,6 +82,7 @@ export const createAPI = (baseURL) => {
} else { } else {
return false; return false;
} }
}) })
.catch(error => { .catch(error => {
if (error.response) { if (error.response) {
......
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