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) => {
}
}, [basic]);
// const [blyj, setBlyj] = useState();
// console.log(blyj)
const [blyj, setBlyj] = useState();
const optionChange = val => {
// setBlyj(val)
setBlyj(val);
optionBlur()
setDisabled(!(val != null && val !== ''))
};
......@@ -145,6 +145,16 @@ const Process = (props) => {
window.scrollTo(0, document.body.scrollHeight);
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切换
const tabClick = (name) => {
......@@ -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 = () => {
blyjSubmit()
const BUTTON = [];
button.map(item => BUTTON.push(item.button));
const BUTTONS = BUTTON.concat(['取消']);
......@@ -176,8 +200,7 @@ const Process = (props) => {
wrapProps,
},
(buttonIndex) => {
buttonIndex < BUTTONS.length - 1 && subUrl(buttonIndex)
// console.log(buttonIndex)
buttonIndex > -1 && (buttonIndex < BUTTONS.length - 1) && subUrl(buttonIndex)
});
};
const subUrl = key => {
......@@ -242,7 +265,7 @@ const Process = (props) => {
{resultLoading ? <Basic data={basic} attachId={uuid} {...props}/> : <Skeleton/>}
<div id="event-adjunct"/>
<WhiteSpace/>
{resultLoading ? <Adjunct data={adjunctData}/> : <Skeleton/>}
{resultLoading ? <Adjunct download={download} data={adjunctData} tableId={tableId}/> : <Skeleton/>}
<div id="event-flow"/>
<WhiteSpace/>
{resultLoading ? <Flow data={flowData}/> : <Skeleton/>}
......
import React from 'react';
import List from '../../../components/List'
import AdjunctList from '../../../components/Adjunct'
import axiosRequest from "../../../utils/request";
const Adjunct = (props) => {
const {data} = props;
const {data, download} = props;
// const downlaod = (src) => {
// const iframe = document.createElement('iframe');
// iframe.style.display = 'none';
// iframe.src = "javascript: '<script>location.href=\"" + src + "\"<\/script>'";
// document.getElementsByTagName('body')[0].appendChild(iframe);
// }
const download = (uuid) => {
axiosRequest({
method: 'post',
url: '/idtAppServiceV6/oApp/downloadLargeFile',
body: {
uuid
},
}).then(res => {
})
const downloadFile = (uuid) => {
download(uuid,)
}
const listData = [
{title: '附件', line: data.length > 0, content:
<div>
{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>
},
......
import React from 'react';
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'
const Send = (props) => {
const {visible, onClose, addGoods} = props;
const {visible, onClose, addGoods, columns} = props;
const {getFieldProps, resetFields} = props.form;
const district = [
{label: '111', value: '111'}
];
const handleClose = () => {
resetFields();
onClose()
......@@ -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 (
<div>
......@@ -36,17 +38,23 @@ const Send = (props) => {
>
<form>
<List className="goods-form">
<InputItem {...getFieldProps('name')}>领取人</InputItem>
<Picker data={district} cols={1} {...getFieldProps('ggf1')}>
<List.Item arrow="horizontal">品名</List.Item>
</Picker>
<InputItem {...getFieldProps('amount')} placeholder={`(库存剩余:${0})`}>申请数量</InputItem>
<TextareaItem
title="内容"
placeholder="请输入内容"
{...getFieldProps('_mail_editor_text')}
rows={4}
/>
{columns && columns.length > 0 && columns.map((item, index) => {
if (item.type === 'DATE') {
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>
)
} else {
return <InputItem key={index}{...getFieldProps(item.label)}>{item.label}</InputItem>
}
})}
</List>
</form>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -129,6 +129,17 @@
.ml-40{
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{
width: 60px;
height: 29px;
......@@ -152,3 +163,34 @@
.footer-button.btn-disabled{
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) => {
.then(function (response) {
response = response.data || response.tree;
// console.log(!response || !(response.data || response.tree))
if (!response || !(response.data || response.tree)) {
// response.status === 'failure' && (window.location.href = '/login')
response.code === 'idt-jwt-500' && (window.location.href = '/login')
console.log('response出错, 无返回数据!', response);
Toast.fail(response.message)
// return false;
};
if (response.data && response.data.errorMessage) {
......@@ -83,6 +82,7 @@ export const createAPI = (baseURL) => {
} else {
return false;
}
})
.catch(error => {
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