Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
weChatFlowApprove
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
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘川
weChatFlowApprove
Commits
ec3c7ac4
Commit
ec3c7ac4
authored
Jun 20, 2022
by
chuan.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审批重复提交优化
parent
379164d2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
104 additions
and
36 deletions
+104
-36
request.js
src/utils/request.js
+5
-3
monthFlow.vue
src/views/month-flow/monthFlow.vue
+35
-13
PlanChangeFlow.vue
src/views/plan-change-flow/PlanChangeFlow.vue
+35
-11
ShipApproval.vue
src/views/ship-approval/ShipApproval.vue
+29
-9
No files found.
src/utils/request.js
View file @
ec3c7ac4
...
...
@@ -95,13 +95,15 @@ service.interceptors.response.use(
return
dataAxios
},
async
error
=>
{
// const { data
} = error.response
console
.
error
(
'error: '
,
error
)
// for debug
if
(
`
${
error
}
`
.
indexOf
(
'401'
)
!==
-
1
)
{
const
{
statusText
,
status
}
=
error
.
response
console
.
error
(
'error: '
,
error
.
response
)
// for debug
if
(
status
===
40
1
)
{
Toast
(
`登录用户失效,请重新登录`
)
await
store
.
dispatch
(
'resetToken'
)
router
.
replace
(
'/login'
)
return
}
else
if
(
status
===
500
)
{
Toast
(
statusText
)
}
return
Promise
.
reject
(
error
)
...
...
src/views/month-flow/monthFlow.vue
View file @
ec3c7ac4
...
...
@@ -15,6 +15,7 @@
@
click=
"exportMonthPlanOrder"
:icon=
"downloadIcon"
type=
"primary"
:disabled=
"isReadonly"
>
发货计划下载
</van-button>
...
...
@@ -55,14 +56,20 @@
</van-collapse>
<div
class=
"remark-block"
>
<span
class=
"title"
>
意见
</span>
<textarea
v-model=
"conditions.handleOpinion"
class=
"text"
type=
"textarea"
rows=
"2"
/>
<textarea
:disabled=
"isReadonly"
v-model=
"conditions.handleOpinion"
class=
"text"
type=
"textarea"
rows=
"2"
/>
</div>
</div>
</div>
<p
class=
"bottom-block"
></p>
<div
class=
"bottom"
>
<van-button
plain
@
click=
"refuse"
type=
"primary"
>
驳回
</van-button>
<van-button
plain
@
click=
"submit('1')"
type=
"primary"
>
通过
</van-button>
<van-button
plain
:disabled=
"isReadonly"
@
click=
"refuse"
type=
"primary"
>
驳回
</van-button>
<van-button
plain
:disabled=
"isReadonly"
@
click=
"submit('1')"
type=
"primary"
>
通过
</van-button>
</div>
</div>
</template>
...
...
@@ -94,7 +101,10 @@ export default {
}
},
computed
:
{
...
mapGetters
[
'token'
]
...
mapGetters
[
'token'
],
isReadonly
()
{
return
false
}
},
created
()
{
const
{
id
,
taskId
}
=
this
.
$route
.
query
...
...
@@ -109,8 +119,6 @@ export default {
methods
:
{
initDetail
()
{
apiMonthplanFindById
(
this
.
conditions
).
then
(
res
=>
{
console
.
log
(
res
.
data
)
res
.
data
.
pyear
+=
''
this
.
conditions
=
{
...
this
.
conditions
,
...
res
.
data
}
})
},
...
...
@@ -132,13 +140,21 @@ export default {
params
.
currentHandleGroupId
=
this
.
taskNode
.
groupId
params
.
taskId
=
this
.
$route
.
query
.
taskId
if
(
this
.
conditions
.
id
)
{
const
res
=
await
advance
(
params
)
console
.
log
(
'22asssssss'
,
res
)
if
(
res
.
status
===
1
)
{
Toast
(
'提交成功'
)
window
.
opener
=
null
window
.
open
(
''
,
'_self'
,
''
)
window
.
close
()
const
toast
=
Toast
.
loading
({
message
:
'提交中...'
,
forbidClick
:
true
})
try
{
const
res
=
await
advance
(
params
)
toast
.
clear
()
if
(
res
.
status
===
1
)
{
Toast
(
'提交成功'
)
window
.
opener
=
null
window
.
open
(
''
,
'_self'
,
''
)
window
.
close
()
}
}
catch
(
error
)
{
toast
.
clear
()
}
}
},
...
...
@@ -152,11 +168,17 @@ export default {
bizId
:
this
.
conditions
.
bizId
,
type
:
this
.
$route
.
query
.
type
}
const
toast
=
Toast
.
loading
({
message
:
'导出中...'
,
forbidClick
:
true
})
const
res
=
await
apiExportMonthPlanOrder
(
params
)
try
{
toast
.
clear
()
const
{
data
,
name
,
type
}
=
res
download
(
data
,
name
,
type
)
}
catch
(
error
)
{
toast
.
clear
()
Toast
(
'下载异常'
)
}
},
...
...
src/views/plan-change-flow/PlanChangeFlow.vue
View file @
ec3c7ac4
...
...
@@ -14,6 +14,7 @@
@
click=
"exportMonthPlanOrder"
:icon=
"downloadIcon"
type=
"primary"
:disabled=
"isReadonly"
>
变更发货计划下载
</van-button>
...
...
@@ -54,14 +55,20 @@
</van-collapse>
<div
class=
"remark-block"
>
<span
class=
"title"
>
意见
</span>
<textarea
v-model=
"conditions.handleOpinion"
class=
"text"
type=
"textarea"
rows=
"2"
/>
<textarea
:disabled=
"isReadonly"
v-model=
"conditions.handleOpinion"
class=
"text"
type=
"textarea"
rows=
"2"
/>
</div>
</div>
</div>
<p
class=
"bottom-block"
></p>
<div
class=
"bottom"
>
<van-button
plain
@
click=
"refuse"
type=
"primary"
>
驳回
</van-button>
<van-button
plain
@
click=
"submit('1')"
type=
"primary"
>
通过
</van-button>
<van-button
plain
:disabled=
"isReadonly"
@
click=
"refuse"
type=
"primary"
>
驳回
</van-button>
<van-button
plain
:disabled=
"isReadonly"
@
click=
"submit('1')"
type=
"primary"
>
通过
</van-button>
</div>
</div>
</template>
...
...
@@ -93,7 +100,10 @@ export default {
}
},
computed
:
{
...
mapGetters
[
'token'
]
...
mapGetters
[
'token'
],
isReadonly
()
{
return
false
}
},
created
()
{
const
{
id
,
taskId
}
=
this
.
$route
.
query
...
...
@@ -133,13 +143,21 @@ export default {
params
.
currentHandleGroupId
=
this
.
taskNode
.
groupId
params
.
taskId
=
this
.
$route
.
query
.
taskId
if
(
this
.
conditions
.
id
)
{
const
res
=
await
advance
(
params
)
console
.
log
(
'22asssssss'
,
res
)
if
(
res
.
status
===
1
)
{
Toast
(
'提交成功'
)
window
.
opener
=
null
window
.
open
(
''
,
'_self'
,
''
)
window
.
close
()
const
toast
=
Toast
.
loading
({
message
:
'提交中...'
,
forbidClick
:
true
})
try
{
const
res
=
await
advance
(
params
)
toast
.
clear
()
if
(
res
.
status
===
1
)
{
Toast
(
'提交成功'
)
window
.
opener
=
null
window
.
open
(
''
,
'_self'
,
''
)
window
.
close
()
}
}
catch
(
error
)
{
toast
.
clear
()
}
}
},
...
...
@@ -153,11 +171,17 @@ export default {
bizId
:
this
.
conditions
.
bizId
,
type
:
this
.
$route
.
query
.
type
}
const
toast
=
Toast
.
loading
({
message
:
'导出中...'
,
forbidClick
:
true
})
const
res
=
await
apiExportMonthPlanAdjuseOrder
(
params
)
try
{
toast
.
clear
()
const
{
data
,
name
,
type
}
=
res
download
(
data
,
name
,
type
)
}
catch
(
error
)
{
toast
.
clear
()
Toast
(
'下载异常'
)
}
},
...
...
src/views/ship-approval/ShipApproval.vue
View file @
ec3c7ac4
...
...
@@ -43,6 +43,7 @@
:required=
"taskNode.subProcUnitId === 'base'"
label=
"基地审批量"
placeholder=
""
:disabled=
"isReadonly"
/>
<van-field
v-if=
"isShowWarZone"
...
...
@@ -51,6 +52,7 @@
:required=
"taskNode.subProcUnitId === 'warZone'"
placeholder=
""
error-message=
""
:disabled=
"isReadonly"
/>
<van-field
v-if=
"isShowWork"
...
...
@@ -59,6 +61,7 @@
label=
"内勤审批量"
placeholder=
""
error-message=
""
:disabled=
"isReadonly"
/>
</van-cell-group>
</div>
...
...
@@ -187,7 +190,13 @@
</div>
<div
class=
"remark-block"
>
<span
class=
"title"
>
审批意见
</span>
<textarea
v-model=
"conditions.handleOpinion"
class=
"text"
type=
"textarea"
rows=
"2"
/>
<textarea
:disabled=
"isReadonly"
v-model=
"conditions.handleOpinion"
class=
"text"
type=
"textarea"
rows=
"2"
/>
</div>
</div>
...
...
@@ -197,7 +206,7 @@
<div
class=
"bottom"
>
<!-- <van-button plain type="primary">确认</van-button> -->
<van-button
plain
type=
"primary"
@
click=
"submit('1')"
>
确认
</van-button>
<van-button
plain
:disabled=
"isReadonly"
type=
"primary"
@
click=
"submit('1')"
>
确认
</van-button>
</div>
<van-popup
v-model:show=
"showPicker"
round
position=
"bottom"
>
...
...
@@ -271,6 +280,9 @@ export default {
},
isShowWork
()
{
return
this
.
taskNode
.
subProcUnitId
===
'work'
},
isReadonly
()
{
return
false
}
},
created
()
{
...
...
@@ -335,13 +347,21 @@ export default {
params
.
currentHandleGroupId
=
this
.
taskNode
.
groupId
params
.
taskId
=
this
.
$route
.
query
.
taskId
if
(
this
.
conditions
.
id
)
{
const
res
=
await
advance
(
params
)
console
.
log
(
'22asssssss'
,
res
)
if
(
res
.
status
===
1
)
{
Toast
(
'提交成功'
)
window
.
opener
=
null
window
.
open
(
''
,
'_self'
,
''
)
window
.
close
()
const
toast
=
Toast
.
loading
({
message
:
'提交中...'
,
forbidClick
:
true
})
try
{
const
res
=
await
advance
(
params
)
toast
.
clear
()
if
(
res
.
status
===
1
)
{
Toast
(
'提交成功'
)
window
.
opener
=
null
window
.
open
(
''
,
'_self'
,
''
)
window
.
close
()
}
}
catch
(
error
)
{
toast
.
clear
()
}
}
},
...
...
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