Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
frontend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Schedules
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
h5-communicate
frontend
Commits
ce489afc
Commit
ce489afc
authored
Jul 20, 2020
by
熊成伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
64e1bcfb
Pipeline
#16373
passed with stages
in 1 minute and 8 seconds
Changes
8
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
103 additions
and
40 deletions
+103
-40
Process.jsx
src/pages/EventProcessing/Process.jsx
+29
-6
Adjunct.jsx
src/pages/EventProcessing/commponents/Adjunct.jsx
+4
-14
AddGood.jsx
src/pages/Work/components/AddGood.jsx
+26
-18
Goods.jsx
src/pages/Work/components/Goods.jsx
+0
-0
Meet.jsx
src/pages/Work/components/Meet.jsx
+0
-0
Normal.jsx
src/pages/Work/components/Normal.jsx
+0
-0
index.less
src/pages/Work/components/index.less
+42
-0
instance.js
src/utils/instance.js
+2
-2
No files found.
src/pages/EventProcessing/Process.jsx
View file @
ce489afc
...
@@ -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
d
ata=
{
adjunctData
}
/>
:
<
Skeleton
/>
}
{
resultLoading
?
<
Adjunct
d
ownload=
{
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
/>
}
...
...
src/pages/EventProcessing/commponents/Adjunct.jsx
View file @
ce489afc
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=
{
()
=>
download
File
(
item
.
UUID
)
}
/>
))
:
'无'
}
))
:
'无'
}
</
div
>
</
div
>
},
},
...
...
src/pages/Work/components/AddGood.jsx
View file @
ce489afc
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
(
</
Picker
>
<
DatePicker
key=
{
index
}
mode=
{
getMode
(
item
.
dateType
)
}
className=
"send-date-style"
{
...
getFieldProps
(
item
.
label
)}
>
<
InputItem
{
...
getFieldProps
('
amount
')}
placeholder=
{
`(库存剩余:${0})`
}
>
申请数量
</
InputItem
>
<
List
.
Item
arrow=
"horizontal"
>
{
item
.
label
}
</
List
.
Item
>
<
TextareaItem
</
DatePicker
>
title=
"内容"
)
placeholder=
"请输入内容"
}
else
if
(
item
.
data
)
{
{
...
getFieldProps
('
_mail_editor_text
')}
return
(
rows=
{
4
}
<
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
>
</
List
>
</
form
>
</
form
>
...
...
src/pages/Work/components/Goods.jsx
View file @
ce489afc
This diff is collapsed.
Click to expand it.
src/pages/Work/components/Meet.jsx
View file @
ce489afc
This diff is collapsed.
Click to expand it.
src/pages/Work/components/Normal.jsx
View file @
ce489afc
This diff is collapsed.
Click to expand it.
src/pages/Work/components/index.less
View file @
ce489afc
...
@@ -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;
}
src/utils/instance.js
View file @
ce489afc
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment