|
@@ -5,16 +5,12 @@ import { Button } from "@antmjs/vantui";
|
5
|
5
|
import { postTaIssue, postIssueAssigned } from "@/services/taissue";
|
6
|
6
|
import { warn } from "@/utils/message";
|
7
|
7
|
import { useModel } from "@/store";
|
8
|
|
-import {
|
9
|
|
- ROLE_INSPECTOR
|
10
|
|
-} from "@/utils/user";
|
|
8
|
+import { ROLE_INSPECTOR } from "@/utils/user";
|
11
|
9
|
export default (props) => {
|
12
|
10
|
const { formData } = props;
|
13
|
11
|
const { duty } = useModel("user");
|
14
|
12
|
const [loading, setLoading] = React.useState(false);
|
15
|
13
|
|
16
|
|
- console.log(ROLE_INSPECTOR == duty);
|
17
|
|
-
|
18
|
14
|
function jump() {
|
19
|
15
|
return Taro.navigateBack({
|
20
|
16
|
delta: 1,
|
|
@@ -46,15 +42,13 @@ export default (props) => {
|
46
|
42
|
postTaIssue(formData)
|
47
|
43
|
.then((res) => {
|
48
|
44
|
const data = { ...res, ...formData };
|
49
|
|
- console.log(data);
|
50
|
|
- ROLE_INSPECTOR == duty
|
|
45
|
+ formData.orgId
|
51
|
46
|
? postIssueAssigned({ ...data, nextOrg: formData.orgId })
|
52
|
47
|
.then(() => {
|
53
|
48
|
setLoading(false);
|
54
|
|
- jump();//跳转
|
|
49
|
+ jump(); //跳转
|
55
|
50
|
})
|
56
|
51
|
.catch((e) => {
|
57
|
|
- console.log(e);
|
58
|
52
|
setLoading(false);
|
59
|
53
|
})
|
60
|
54
|
: jump();
|