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
b82b57b1
Commit
b82b57b1
authored
Jun 16, 2022
by
chuan.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
月度计划调整审批联调 发货申请联调
parent
e8013f8d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
504 additions
and
148 deletions
+504
-148
README.md
README.md
+11
-0
applyForGoods.js
src/api/applyForGoods.js
+0
-14
monthPlan.js
src/api/monthPlan.js
+62
-0
index.js
src/utils/index.js
+22
-0
request.js
src/utils/request.js
+7
-3
Login.vue
src/views/Login.vue
+6
-2
InvoiceOccupancyDetail.vue
...views/invoice-occupancy-detail/InvoiceOccupancyDetail.vue
+20
-20
monthFlow.vue
src/views/month-flow/monthFlow.vue
+46
-9
planChangeFlow.vue
src/views/plan-change-flow/planChangeFlow.vue
+108
-29
ShipApproval.vue
src/views/ship-approval/ShipApproval.vue
+222
-71
No files found.
README.md
View file @
b82b57b1
# oghash-template
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn serve
```
### Compiles and minifies for production
```
yarn build
```
### Lints and fixes files
```
yarn lint
```
### Customize configuration
See
[
Configuration Reference
](
https://cli.vuejs.org/config/
)
.
## 流程审批节点
1.
base(基地)
2.
warZone(战区)
3.
work(内勤)
src/api/applyForGoods.js
deleted
100644 → 0
View file @
e8013f8d
import
request
from
'@/utils/request'
import
{
BASE_API
}
from
'@/api/baseUrl'
/**
* 月度计划编制
* 根据id查询月度计划申请
* @param {*} params
*/
export
function
apiMonthplanFindById
({
id
})
{
return
request
({
url
:
BASE_API
()
+
'/monthplan/findById?id='
+
id
,
method
:
'post'
})
}
src/api/monthPlan.js
0 → 100644
View file @
b82b57b1
import
request
from
'@/utils/request'
import
{
BASE_API
}
from
'@/api/baseUrl'
/**
* 月度计划编制
* 根据id查询月度计划申请
* @param {*} params
*/
export
function
apiMonthplanFindById
({
id
})
{
return
request
({
url
:
BASE_API
()
+
'/monthplan/findById?id='
+
id
,
method
:
'post'
})
}
/**
* 发货计划导出表单到excel
* @param {*} params
*/
export
function
apiExportMonthPlanOrder
(
data
)
{
return
request
({
url
:
BASE_API
()
+
`/monthplan/exportMonthPlanOrder`
,
method
:
'get'
,
params
:
data
})
}
/**
* 月度计划编制
* 根据id查询月计划发货申请
* @param {*} params
*/
export
function
apiMonthplanAdjustFindById
({
id
})
{
return
request
({
url
:
BASE_API
()
+
'/monthplanadjuseimport/findById?id='
+
id
,
method
:
'post'
})
}
/**
* 发货计划调整导出表单到excel
* @param {*} params
*/
export
function
apiExportMonthPlanAdjuseOrder
(
data
)
{
return
request
({
url
:
BASE_API
()
+
`/monthplanadjuse/exportMonthPlanAdjuseOrder`
,
method
:
'get'
,
params
:
data
})
}
/**
* 月度计划编制
* 创建要货申请-根据id查询要货申请
* @param {*} params
*/
export
function
apiWantgoodsFindById
({
id
})
{
return
request
({
url
:
BASE_API
()
+
'/wantgoods/findById?id='
+
id
,
method
:
'post'
})
}
src/utils/index.js
View file @
b82b57b1
...
...
@@ -41,3 +41,25 @@ export function handleFormData(data) {
return
formData
}
/**
* 下载
*/
export
function
download
(
data
,
fileName
,
responseType
=
'application/octet-stream'
)
{
const
blob
=
data
instanceof
Blob
?
data
:
new
Blob
([
data
],
{
type
:
responseType
})
if
(
'download'
in
document
.
createElement
(
'a'
))
{
// 非IE下载
const
url
=
window
.
URL
.
createObjectURL
(
blob
)
const
link
=
document
.
createElement
(
'a'
)
link
.
style
.
display
=
'none'
link
.
href
=
url
link
.
setAttribute
(
'download'
,
fileName
)
document
.
body
.
appendChild
(
link
)
link
.
click
()
window
.
URL
.
revokeObjectURL
(
link
.
href
)
document
.
body
.
removeChild
(
link
)
}
else
{
// IE10+下载
navigator
.
msSaveBlob
(
blob
,
fileName
)
}
}
src/utils/request.js
View file @
b82b57b1
...
...
@@ -56,8 +56,12 @@ service.interceptors.response.use(
* You can also judge the status by HTTP Status Code
*/
async
response
=>
{
// console.log('22', response, typeof response.data)
// stream形式
if
(
response
.
data
instanceof
Blob
)
{
if
(
response
.
data
instanceof
Blob
||
response
.
headers
[
'content-type'
].
indexOf
(
'octet-stream'
)
!==
-
1
)
{
return
{
data
:
response
.
data
,
type
:
response
.
headers
[
'content-type'
],
...
...
@@ -84,9 +88,9 @@ service.interceptors.response.use(
router
.
replace
(
'/login'
)
return
}
if
(
status
===
2
)
{
if
(
status
===
'2'
)
{
Toast
(
message
||
msg
)
return
return
dataAxios
}
return
dataAxios
},
...
...
src/views/Login.vue
View file @
b82b57b1
...
...
@@ -20,7 +20,9 @@ export default {
if
(
this
.
$store
.
getters
.
token
)
{
if
(
!
redirectedFrom
)
return
this
.
$router
.
back
()
if
(
redirectedFrom
.
path
.
indexOf
(
'delivery-plan-approve'
)
!==
-
1
)
{
this
.
$router
.
push
({
name
:
'MonthFlow'
,
query
:
{
...
this
.
urlObj
}
})
this
.
$router
.
push
({
name
:
'MonthFlow'
,
query
:
{
...
this
.
urlObj
}})
}
else
{
this
.
$router
.
push
({
path
:
redirectedFrom
.
path
,
query
:
{
...
this
.
urlObj
}})
}
}
else
{
this
.
handleLogin
()
...
...
@@ -38,7 +40,9 @@ export default {
const
{
redirectedFrom
}
=
this
.
$route
if
(
!
redirectedFrom
)
return
this
.
$router
.
back
()
if
(
redirectedFrom
.
path
.
indexOf
(
'delivery-plan-approve'
)
!==
-
1
)
{
this
.
$router
.
push
({
name
:
'MonthFlow'
,
query
:
{
...
this
.
urlObj
}
})
this
.
$router
.
push
({
name
:
'MonthFlow'
,
query
:
{
...
this
.
urlObj
}})
}
else
{
this
.
$router
.
push
({
path
:
redirectedFrom
.
path
,
query
:
{
...
this
.
urlObj
}})
}
})
})
...
...
src/views/invoice-occupancy-detail/InvoiceOccupancyDetail.vue
View file @
b82b57b1
...
...
@@ -4,26 +4,16 @@
<div
class=
"header-bg"
><img
class=
"header-bg-img"
src=
"@/assets/images/nav_bg@3x.png"
/></div>
<div
class=
"main"
>
<div
class=
"list-wrapper"
>
<div
class=
"block"
>
<div
class=
"block"
v-for=
"(item, index) in sourceData"
:key=
"index"
>
<div
class=
"top-block"
>
<van-cell
title=
"开票客户"
value=
"步步高有限公司"
/>
<van-cell
title=
"发货计划类型"
value=
"新品五粮液6X6X6 500ML"
/>
<van-cell
title=
"发票号"
value=
"0090000578(计划内)"
/>
<van-cell
title=
"开票日期"
value=
"步步高商贸有限公司"
/>
<van-cell
title=
"开票量"
value=
"配额酒制票通知单(计划内)"
/>
<van-cell
title=
"本次占用量"
value=
"专卖店渠道"
/>
<van-cell
title=
"剩余量"
value=
"2022"
/>
</div>
</div>
<div
class=
"block"
>
<div
class=
"top-block"
>
<van-cell
title=
"开票客户"
value=
"步步高有限公司"
/>
<van-cell
title=
"发货计划类型"
value=
"新品五粮液6X6X6 500ML"
/>
<van-cell
title=
"发票号"
value=
"0090000578(计划内)"
/>
<van-cell
title=
"开票日期"
value=
"步步高商贸有限公司"
/>
<van-cell
title=
"开票量"
value=
"配额酒制票通知单(计划内)"
/>
<van-cell
title=
"本次占用量"
value=
"专卖店渠道"
/>
<van-cell
title=
"剩余量"
value=
"2022"
/>
<van-cell
title=
"开票客户"
:value=
"item.customer"
/>
<van-cell
title=
"发货计划类型"
:value=
"invoiceCondition.planType"
/>
<van-cell
title=
"发票号"
:value=
"item.invoId"
/>
<van-cell
title=
"开票日期"
:value=
"item.invoiceDate"
/>
<van-cell
title=
"开票量"
:value=
"item.useQuantity"
/>
<van-cell
title=
"本次占用量"
:value=
"item.occupyQty"
/>
<van-cell
title=
"已使用量"
:value=
"item.occupyQty"
/>
<van-cell
title=
"剩余量"
value=
"??"
/>
</div>
</div>
</div>
...
...
@@ -32,12 +22,22 @@
</
template
>
<
script
>
export
default
{
props
:
{
sourceData
:
{
type
:
Array
,
default
:
()
=>
[]
},
invoiceCondition
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{}
},
methods
:
{
onClickLeft
()
{
this
.
$
router
.
go
(
-
1
)
this
.
$
emit
(
'close'
)
}
}
}
...
...
src/views/month-flow/monthFlow.vue
View file @
b82b57b1
...
...
@@ -10,18 +10,23 @@
<van-cell
title=
"计划年度"
:value=
"conditions.pyear"
/>
<van-cell
title=
"备注"
:value=
"conditions.remark"
/>
</div>
<van-button
class=
"download-btn"
:icon=
"downloadIcon"
type=
"primary"
>
<van-button
class=
"download-btn"
@
click=
"exportMonthPlanOrder"
:icon=
"downloadIcon"
type=
"primary"
>
发货计划下载
</van-button>
<van-collapse
class=
"step-block"
v-model=
"activeNames"
:border=
"false"
>
<van-collapse-item
title=
"审批"
name=
"1"
:border=
"false"
>
<van-steps
direction=
"vertical"
:active=
"
1
"
:active=
"
stepActive
"
active-color=
"#FF1D32"
inactive-color=
"#999"
>
<van-step
v-for=
"(item, index) in tablePathData"
:key=
"i
tem.id
"
>
<van-step
v-for=
"(item, index) in tablePathData"
:key=
"i
ndex
"
>
<template
#
active-icon
>
<span
class=
"active-dot"
>
{{
index
+
1
}}
</span>
</
template
>
...
...
@@ -34,7 +39,7 @@
<p
class=
"step-title"
>
{{ item.statusName }}
</p>
<p
class=
"step-title2"
>
{{ item.handler }}
</p>
</van-step>
<van-step>
<van-step
class=
"last-step"
>
<
template
#
active-icon
>
<span
class=
"active-dot"
></span>
</
template
>
...
...
@@ -57,19 +62,22 @@
<p
class=
"bottom-block"
></p>
<div
class=
"bottom"
>
<van-button
plain
@
click=
"refuse"
type=
"primary"
>
驳回
</van-button>
<van-button
plain
@
click=
"submit"
type=
"primary"
>
通过
</van-button>
<van-button
plain
@
click=
"submit
('1')
"
type=
"primary"
>
通过
</van-button>
</div>
</div>
</template>
<
script
>
import
{
apiMonthplanFindById
}
from
'@/api/applyForGood
s'
import
{
apiMonthplanFindById
,
apiExportMonthPlanOrder
}
from
'@/api/monthPlan.j
s'
import
{
queryApprovalHistoryByBizId
,
advance
}
from
'@/api/flowHander'
import
{
download
}
from
'@/utils/index'
import
{
Toast
}
from
'vant'
import
{
mapGetters
}
from
'vuex'
export
default
{
data
()
{
return
{
activeNames
:
[
'1'
],
stepActive
:
'1'
,
downloadIcon
:
require
(
'@/assets/images/download@3x.png'
),
conditions
:
{
id
:
''
,
...
...
@@ -81,6 +89,9 @@ export default {
tablePathData
:
[]
}
},
computed
:
{
...
mapGetters
[
'token'
]
},
created
()
{
const
{
id
,
taskId
}
=
this
.
$route
.
query
if
(
id
)
{
...
...
@@ -105,18 +116,20 @@ export default {
.
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
tablePathData
=
res
.
data
.
Rows
this
.
stepActive
=
this
.
tablePathData
.
length
}
})
.
catch
(()
=>
{})
},
async
submit
()
{
this
.
conditions
.
handleResult
=
'1'
async
submit
(
handleResult
)
{
this
.
conditions
.
handleResult
=
handleResult
const
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
conditions
))
params
.
currentHandleId
=
''
params
.
currentHandleGroupId
=
''
params
.
taskId
=
this
.
$route
.
query
.
taskId
if
(
this
.
conditions
.
id
)
{
const
res
=
await
advance
(
params
)
console
.
log
(
'22asssssss'
,
res
)
if
(
res
.
status
===
1
)
{
Toast
(
'提交成功'
)
}
...
...
@@ -124,7 +137,21 @@ export default {
},
refuse
()
{
this
.
conditions
.
handleResult
=
'2'
this
.
submit
()
this
.
submit
(
'2'
)
},
// 导出
async
exportMonthPlanOrder
()
{
const
params
=
{
bizId
:
this
.
conditions
.
bizId
,
type
:
this
.
$route
.
query
.
type
}
const
res
=
await
apiExportMonthPlanOrder
(
params
)
try
{
const
{
data
,
name
,
type
}
=
res
download
(
data
,
name
,
type
)
}
catch
(
error
)
{
Toast
(
'下载异常'
)
}
},
initCustome
()
{},
onClickLeft
()
{}
...
...
@@ -255,6 +282,16 @@ export default {
border-radius
:
50%
;
}
}
.last-step
{
.van-step__circle-container
{
.active-dot
{
width
:
10px
;
height
:
10px
;
line-height
:
10px
;
background
:
#e5e5e5
;
}
}
}
}
}
}
...
...
src/views/plan-change-flow/planChangeFlow.vue
View file @
b82b57b1
...
...
@@ -5,48 +5,40 @@
<div
class=
"main"
>
<div
class=
"list-wrapper"
>
<div
class=
"top-block"
>
<van-cell
title=
"申请时间"
value=
"2022.06.22 17:05:28
"
/>
<van-cell
title=
"录入人"
value=
"苏州新川商贸公司
"
/>
<van-cell
title=
"
备注"
value=
"共15家客户,应市场变化调整发货计划
"
/>
<van-cell
title=
"申请时间"
:value=
"conditions.createdDate
"
/>
<van-cell
title=
"录入人"
:value=
"conditions.createdByName
"
/>
<van-cell
title=
"
计划年度"
:value=
"conditions.pyear
"
/>
</div>
<van-button
class=
"download-btn"
:icon=
"downloadIcon"
type=
"primary"
>
<van-button
class=
"download-btn"
@
click=
"exportMonthPlanOrder"
:icon=
"downloadIcon"
type=
"primary"
>
变更发货计划下载
</van-button>
<van-collapse
class=
"step-block"
v-model=
"activeNames"
:border=
"false"
>
<van-collapse-item
title=
"审批"
name=
"1"
:border=
"false"
>
<van-steps
direction=
"vertical"
:active=
"
1
"
:active=
"
stepActive
"
active-color=
"#FF1D32"
inactive-color=
"#999"
>
<van-step>
<template
#
active-icon
>
<span
class=
"active-dot"
>
1
</span>
</
template
>
<
template
#
inactive-icon
>
<span
class=
"inactive-dot"
>
1
</span>
</
template
>
<
template
#
finish-icon
>
<span
class=
"active-dot"
>
1
</span>
</
template
>
<p
class=
"step-title"
>
同意
</p>
<p
class=
"step-title2"
>
战总 四川战区
</p>
</van-step>
<van-step>
<van-step
v-for=
"(item, index) in tablePathData"
:key=
"index"
>
<template
#
active-icon
>
<span
class=
"active-dot"
>
2
</span>
<span
class=
"active-dot"
>
{{
index
+
1
}}
</span>
</
template
>
<
template
#
inactive-icon
>
<span
class=
"inactive-dot"
>
2
</span>
<span
class=
"inactive-dot"
>
{{
index
+
1
}}
</span>
</
template
>
<
template
#
finish-icon
>
<span
class=
"active-dot"
>
2
</span>
<span
class=
"active-dot"
>
{{
index
+
1
}}
</span>
</
template
>
<p
class=
"step-title"
>
同意
</p>
<p
class=
"step-title2"
>
战总 四川战区
</p>
<p
class=
"step-title"
>
{{ item.statusName }}
</p>
<p
class=
"step-title2"
>
{{ item.handler }}
</p>
</van-step>
<van-step>
<van-step
class=
"last-step"
>
<
template
#
active-icon
>
<span
class=
"active-dot"
></span>
</
template
>
...
...
@@ -62,26 +54,103 @@
</van-collapse>
<div
class=
"remark-block"
>
<span
class=
"title"
>
意见
</span>
<textarea
class=
"text"
type=
"textarea"
rows=
"2"
/>
<textarea
v-model=
"conditions.handleOpinion"
class=
"text"
type=
"textarea"
rows=
"2"
/>
</div>
</div>
</div>
<p
class=
"bottom-block"
></p>
<div
class=
"bottom"
>
<van-button
plain
type=
"primary"
>
驳回
</van-button>
<van-button
plain
type=
"primary"
>
通过
</van-button>
<van-button
plain
@
click=
"refuse"
type=
"primary"
>
驳回
</van-button>
<van-button
plain
@
click=
"submit('1')"
type=
"primary"
>
通过
</van-button>
</div>
</div>
</template>
<
script
>
import
{
apiMonthplanAdjustFindById
,
apiExportMonthPlanAdjuseOrder
}
from
'@/api/monthPlan.js'
import
{
queryApprovalHistoryByBizId
,
advance
}
from
'@/api/flowHander'
import
{
download
}
from
'@/utils/index'
import
{
Toast
}
from
'vant'
import
{
mapGetters
}
from
'vuex'
export
default
{
data
()
{
return
{
activeNames
:
[
'1'
],
downloadIcon
:
require
(
'@/assets/images/download@3x.png'
)
stepActive
:
'0'
,
downloadIcon
:
require
(
'@/assets/images/download@3x.png'
),
conditions
:
{
id
:
''
,
bizId
:
''
,
taskId
:
''
,
handleOpinion
:
''
,
handleResult
:
'1'
},
tablePathData
:
[]
}
},
computed
:
{
...
mapGetters
[
'token'
]
},
created
()
{
const
{
id
,
taskId
}
=
this
.
$route
.
query
if
(
id
)
{
this
.
conditions
.
id
=
id
this
.
conditions
.
bizId
=
id
this
.
conditions
.
taskId
=
taskId
this
.
initDetail
()
this
.
flowPath
()
}
},
methods
:
{
initDetail
()
{
apiMonthplanAdjustFindById
(
this
.
conditions
).
then
(
res
=>
{
console
.
log
(
res
.
data
)
res
.
data
.
pyear
+=
''
this
.
conditions
=
{
...
this
.
conditions
,
...
res
.
data
}
})
},
flowPath
()
{
queryApprovalHistoryByBizId
({
bizId
:
this
.
conditions
.
id
})
.
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
tablePathData
=
res
.
data
.
Rows
this
.
stepActive
=
this
.
tablePathData
.
length
}
})
.
catch
(()
=>
{})
},
async
submit
(
handleResult
)
{
this
.
conditions
.
handleResult
=
handleResult
const
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
conditions
))
params
.
currentHandleId
=
''
params
.
currentHandleGroupId
=
''
params
.
taskId
=
this
.
$route
.
query
.
taskId
if
(
this
.
conditions
.
id
)
{
const
res
=
await
advance
(
params
)
console
.
log
(
'22asssssss'
,
res
)
if
(
res
.
status
===
1
)
{
Toast
(
'提交成功'
)
}
}
},
refuse
()
{
this
.
conditions
.
handleResult
=
'2'
this
.
submit
(
'2'
)
},
// 导出
async
exportMonthPlanOrder
()
{
const
params
=
{
bizId
:
this
.
conditions
.
bizId
,
type
:
this
.
$route
.
query
.
type
}
const
res
=
await
apiExportMonthPlanAdjuseOrder
(
params
)
try
{
const
{
data
,
name
,
type
}
=
res
download
(
data
,
name
,
type
)
}
catch
(
error
)
{
Toast
(
'下载异常'
)
}
},
onClickLeft
()
{}
}
}
...
...
@@ -210,6 +279,16 @@ export default {
border-radius
:
50%
;
}
}
.last-step
{
.van-step__circle-container
{
.active-dot
{
width
:
10px
;
height
:
10px
;
line-height
:
10px
;
background
:
#e5e5e5
;
}
}
}
}
}
}
...
...
src/views/ship-approval/ShipApproval.vue
View file @
b82b57b1
This diff is collapsed.
Click to expand it.
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