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
d8731c9f
Commit
d8731c9f
authored
Nov 27, 2022
by
xiangzj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
402ade04
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
14 deletions
+51
-14
main.js
src/main.js
+2
-2
getters.js
src/store/getters.js
+2
-1
mutations.js
src/store/mutations.js
+4
-1
state.js
src/store/state.js
+2
-1
Login.vue
src/views/Login.vue
+3
-0
ShipApproval.vue
src/views/ship-approval/ShipApproval.vue
+37
-8
vue.config.js
vue.config.js
+1
-1
No files found.
src/main.js
View file @
d8731c9f
...
@@ -5,7 +5,7 @@ import router from './router'
...
@@ -5,7 +5,7 @@ import router from './router'
import
'./permission'
import
'./permission'
import
'./assets/styles/reset.css'
import
'./assets/styles/reset.css'
import
App
from
'./App.vue'
import
App
from
'./App.vue'
import
*
as
Vconsole
from
'vconsole'
//
import * as Vconsole from 'vconsole'
import
{
import
{
Button
,
Button
,
...
@@ -22,7 +22,7 @@ import {
...
@@ -22,7 +22,7 @@ import {
Toast
Toast
}
from
'vant'
}
from
'vant'
new
Vconsole
()
//
new Vconsole()
const
app
=
createApp
(
App
)
const
app
=
createApp
(
App
)
app
.
use
(
store
)
app
.
use
(
store
)
...
...
src/store/getters.js
View file @
d8731c9f
const
getters
=
{
const
getters
=
{
userInfo
:
state
=>
state
.
userInfo
,
userInfo
:
state
=>
state
.
userInfo
,
token
:
state
=>
state
.
token
token
:
state
=>
state
.
token
,
userId
:
state
=>
state
.
userId
}
}
export
default
getters
export
default
getters
src/store/mutations.js
View file @
d8731c9f
...
@@ -41,7 +41,10 @@ const mutations = {
...
@@ -41,7 +41,10 @@ const mutations = {
},
},
SET_TOKEN
:
(
state
,
token
)
=>
{
SET_TOKEN
:
(
state
,
token
)
=>
{
state
.
token
=
token
state
.
token
=
token
}
},
SET_USERID
(
state
,
userId
)
{
state
.
userId
=
userId
},
}
}
export
default
mutations
export
default
mutations
src/store/state.js
View file @
d8731c9f
...
@@ -7,7 +7,8 @@ const state = {
...
@@ -7,7 +7,8 @@ const state = {
clientWidth
:
''
,
clientWidth
:
''
,
clientHeight
:
''
,
clientHeight
:
''
,
userInfo
:
{},
userInfo
:
{},
token
:
getToken
()
token
:
getToken
(),
userId
:
''
}
}
export
default
state
export
default
state
src/views/Login.vue
View file @
d8731c9f
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
login
}
from
'@/api/login'
import
{
login
}
from
'@/api/login'
import
Cookies
from
'js-cookie'
// import { getQueryObject } from '@/utils/index'
// import { getQueryObject } from '@/utils/index'
export
default
{
export
default
{
...
@@ -34,6 +35,8 @@ export default {
...
@@ -34,6 +35,8 @@ export default {
taskToken
:
this
.
urlObj
.
taskToken
taskToken
:
this
.
urlObj
.
taskToken
}).
then
(
resp
=>
{
}).
then
(
resp
=>
{
const
{
token
,
operator
}
=
resp
.
data
const
{
token
,
operator
}
=
resp
.
data
this
.
$store
.
commit
(
'SET_USERID'
,
operator
.
userId
)
Cookies
.
set
(
'HEADER_USERID_KEY'
,
operator
.
userId
)
this
.
$store
.
commit
(
'SET_USERINFO'
,
operator
)
this
.
$store
.
commit
(
'SET_USERINFO'
,
operator
)
this
.
$store
.
dispatch
(
'setToken'
,
token
).
then
(()
=>
{
this
.
$store
.
dispatch
(
'setToken'
,
token
).
then
(()
=>
{
console
.
log
(
'333'
,
this
.
$route
,
this
.
$store
,
this
.
$store
.
getters
.
token
)
console
.
log
(
'333'
,
this
.
$route
,
this
.
$store
,
this
.
$store
.
getters
.
token
)
...
...
src/views/ship-approval/ShipApproval.vue
View file @
d8731c9f
...
@@ -189,18 +189,19 @@
...
@@ -189,18 +189,19 @@
<div
class=
"approval-block"
>
<div
class=
"approval-block"
>
<span
class=
"title"
>
审批结果
</span>
<span
class=
"title"
>
审批结果
</span>
<van-field
<van-field
:disabled=
"!flag"
v-model=
"pickerVal"
v-model=
"pickerVal"
is-link
is-link
readonly
readonly
label=
""
label=
""
placeholder=
""
placeholder=
""
@
click=
"
showPicker = true
"
@
click=
"
handlePicker
"
/>
/>
</div>
</div>
<div
class=
"remark-block"
>
<div
class=
"remark-block"
>
<span
class=
"title"
>
审批意见
</span>
<span
class=
"title"
>
审批意见
</span>
<textarea
<textarea
:disabled=
"
isReadonly
"
:disabled=
"
!flag
"
v-model=
"conditions.handleOpinion"
v-model=
"conditions.handleOpinion"
class=
"text"
class=
"text"
type=
"textarea"
type=
"textarea"
...
@@ -215,7 +216,8 @@
...
@@ -215,7 +216,8 @@
<div
class=
"bottom"
>
<div
class=
"bottom"
>
<!-- <van-button plain type="primary">确认</van-button> -->
<!-- <van-button plain type="primary">确认</van-button> -->
<van-button
plain
:disabled=
"isReadonly"
type=
"primary"
@
click=
"submit('1')"
>
确认
</van-button>
<van-button
v-if=
"pickerVal === '同意'"
plain
:disabled=
"!flag"
type=
"primary"
@
click=
"submit('1')"
>
确认
</van-button>
<van-button
v-else
plain
:disabled=
"!flag"
type=
"primary"
@
click=
"submit('2')"
>
退回
</van-button>
</div>
</div>
<van-popup
v-model:show=
"showPicker"
round
position=
"bottom"
>
<van-popup
v-model:show=
"showPicker"
round
position=
"bottom"
>
...
@@ -236,8 +238,9 @@
...
@@ -236,8 +238,9 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Cookies
from
'js-cookie'
import
{
apiWantgoodsFindById
}
from
'@/api/monthPlan.js'
import
{
apiWantgoodsFindById
}
from
'@/api/monthPlan.js'
import
{
queryApprovalHistoryByBizId
,
advance
}
from
'@/api/flowHander'
import
{
queryApprovalHistoryByBizId
,
advance
,
backToApplyActivity
}
from
'@/api/flowHander'
import
{
Toast
}
from
'vant'
import
{
Toast
}
from
'vant'
import
{
mapGetters
}
from
'vuex'
import
{
mapGetters
}
from
'vuex'
import
InvoiceOccupancyDetail
from
'../invoice-occupancy-detail/InvoiceOccupancyDetail'
import
InvoiceOccupancyDetail
from
'../invoice-occupancy-detail/InvoiceOccupancyDetail'
...
@@ -276,7 +279,8 @@ export default {
...
@@ -276,7 +279,8 @@ export default {
subProcUnitId
:
''
,
subProcUnitId
:
''
,
procUnitHandlerId
:
''
,
procUnitHandlerId
:
''
,
groupId
:
''
groupId
:
''
}
},
flag
:
false
}
}
},
},
computed
:
{
computed
:
{
...
@@ -305,6 +309,9 @@ export default {
...
@@ -305,6 +309,9 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
handlePicker
()
{
this
.
showPicker
=
this
.
flag
},
onConfirm
(
value
,
index
)
{
onConfirm
(
value
,
index
)
{
this
.
pickerVal
=
value
this
.
pickerVal
=
value
this
.
pickerValIndex
=
index
this
.
pickerValIndex
=
index
...
@@ -347,6 +354,9 @@ export default {
...
@@ -347,6 +354,9 @@ export default {
this
.
tablePathData
=
res
.
data
.
Rows
this
.
tablePathData
=
res
.
data
.
Rows
this
.
stepActive
=
this
.
tablePathData
.
length
this
.
stepActive
=
this
.
tablePathData
.
length
this
.
selectSelfTask
(
res
.
data
.
Rows
)
this
.
selectSelfTask
(
res
.
data
.
Rows
)
this
.
flag
=
res
.
data
.
Rows
.
some
(
item
=>
{
return
item
.
executorPersonId
===
Cookies
.
get
(
'HEADER_USERID_KEY'
)
&&
item
.
statusId
===
'ready'
&&
item
.
id
===
this
.
conditions
.
taskId
});
}
}
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
...
@@ -361,8 +371,27 @@ export default {
...
@@ -361,8 +371,27 @@ export default {
params
.
currentHandleId
=
this
.
taskNode
.
procUnitHandlerId
params
.
currentHandleId
=
this
.
taskNode
.
procUnitHandlerId
params
.
currentHandleGroupId
=
this
.
taskNode
.
groupId
params
.
currentHandleGroupId
=
this
.
taskNode
.
groupId
params
.
taskId
=
this
.
$route
.
query
.
taskId
params
.
taskId
=
this
.
$route
.
query
.
taskId
if
(
handleResult
-
2
===
0
){
const
toast
=
Toast
.
loading
({
message
:
'提交中...'
,
forbidClick
:
true
})
try
{
const
res
=
await
backToApplyActivity
(
params
)
toast
.
clear
()
if
(
res
.
status
===
1
)
{
Toast
(
'退回成功'
)
window
.
opener
=
null
window
.
open
(
''
,
'_self'
,
''
)
window
.
close
()
}
}
catch
(
error
)
{
toast
.
clear
()
}
return
}
if
(
this
.
isShowBase
&&
this
.
taskNode
.
subProcUnitId
===
'base'
)
{
if
(
this
.
isShowBase
&&
this
.
taskNode
.
subProcUnitId
===
'base'
)
{
if
(
this
.
form
.
baseAuditQuantity
-
0
<=
0
)
{
if
(
this
.
form
.
baseAuditQuantity
-
0
<=
0
||
!
Number
(
this
.
form
.
baseAuditQuantity
)
)
{
Toast
(
'请正确填写基地审批量'
)
Toast
(
'请正确填写基地审批量'
)
return
return
}
else
if
(
this
.
form
.
baseAuditQuantity
-
0
>
params
.
wantGoodsDetailList
[
0
].
wantQuantity
-
0
)
{
}
else
if
(
this
.
form
.
baseAuditQuantity
-
0
>
params
.
wantGoodsDetailList
[
0
].
wantQuantity
-
0
)
{
...
@@ -371,7 +400,7 @@ export default {
...
@@ -371,7 +400,7 @@ export default {
}
}
}
}
if
(
this
.
isShowWarZone
&&
this
.
taskNode
.
subProcUnitId
===
'warZone'
)
{
if
(
this
.
isShowWarZone
&&
this
.
taskNode
.
subProcUnitId
===
'warZone'
)
{
if
(
this
.
form
.
warAuditQuantity
-
0
<=
0
)
{
if
(
this
.
form
.
warAuditQuantity
-
0
<=
0
||
!
Number
(
this
.
form
.
warAuditQuantity
)
)
{
Toast
(
'请正确填写战区审批量'
)
Toast
(
'请正确填写战区审批量'
)
return
return
}
else
if
(
this
.
form
.
warAuditQuantity
-
0
>
this
.
form
.
baseAuditQuantity
-
0
)
{
}
else
if
(
this
.
form
.
warAuditQuantity
-
0
>
this
.
form
.
baseAuditQuantity
-
0
)
{
...
@@ -380,7 +409,7 @@ export default {
...
@@ -380,7 +409,7 @@ export default {
}
}
}
}
if
(
this
.
isShowWork
&&
!
this
.
form
.
salecenterAuditQuantity
)
{
if
(
this
.
isShowWork
&&
!
this
.
form
.
salecenterAuditQuantity
)
{
if
(
this
.
form
.
salecenterAuditQuantity
-
0
<=
0
)
{
if
(
this
.
form
.
salecenterAuditQuantity
-
0
<=
0
||
!
Number
(
this
.
form
.
salecenterAuditQuantity
)
)
{
Toast
(
'请正确填写内勤审批量'
)
Toast
(
'请正确填写内勤审批量'
)
return
return
}
else
if
(
this
.
form
.
salecenterAuditQuantity
-
0
>
this
.
form
.
warAuditQuantity
-
0
)
{
}
else
if
(
this
.
form
.
salecenterAuditQuantity
-
0
>
this
.
form
.
warAuditQuantity
-
0
)
{
...
...
vue.config.js
View file @
d8731c9f
...
@@ -17,7 +17,7 @@ module.exports = {
...
@@ -17,7 +17,7 @@ module.exports = {
devServer
:
{
devServer
:
{
proxy
:
{
proxy
:
{
'/huigou'
:
{
'/huigou'
:
{
target
:
'http://10.0.135.
139
'
,
target
:
'http://10.0.135.
61
'
,
// target: 'http://10.2.7.85',
// target: 'http://10.2.7.85',
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
pathRewrite
:
{
...
...
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