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
f7e0a42f
Commit
f7e0a42f
authored
Jun 16, 2022
by
chuan.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发货申请数据联调
parent
b82b57b1
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
272 additions
and
240 deletions
+272
-240
.eslintrc.js
.eslintrc.js
+5
-5
.prettierrc.js
.prettierrc.js
+1
-1
babel.config.js
babel.config.js
+7
-7
favicon.ico
public/favicon.ico
+0
-0
index.html
public/index.html
+1
-1
wly2.ico
public/wly2.ico
+0
-0
App.vue
src/App.vue
+1
-1
baseUrl.js
src/api/baseUrl.js
+1
-1
flowHander.js
src/api/flowHander.js
+113
-113
permission.js
src/permission.js
+72
-72
auth.js
src/utils/auth.js
+26
-26
InvoiceOccupancyDetail.vue
...views/invoice-occupancy-detail/InvoiceOccupancyDetail.vue
+1
-1
monthFlow.vue
src/views/month-flow/monthFlow.vue
+1
-0
planChangeFlow.vue
src/views/plan-change-flow/planChangeFlow.vue
+1
-0
ShipApproval.vue
src/views/ship-approval/ShipApproval.vue
+41
-12
vue.config.js
vue.config.js
+1
-0
No files found.
.eslintrc.js
View file @
f7e0a42f
module
.
exports
=
{
root
:
true
,
env
:
{
node
:
true
,
node
:
true
},
extends
:
[
"plugin:vue/vue3-essential"
,
"eslint:recommended"
,
"@vue/prettier"
],
extends
:
[
'plugin:vue/vue3-essential'
,
'eslint:recommended'
,
'@vue/prettier'
],
parserOptions
:
{
parser
:
"babel-eslint"
,
parser
:
'babel-eslint'
},
rules
:
{
'vue/max-attributes-per-line'
:
[
...
...
@@ -261,5 +261,5 @@ module.exports = {
'no-async-promise-executor'
:
'off'
,
'require-atomic-updates'
:
'off'
,
'no-prototype-builtins'
:
'off'
}
,
}
;
}
}
.prettierrc.js
View file @
f7e0a42f
...
...
@@ -28,4 +28,4 @@ module.exports = {
htmlWhitespaceSensitivity
:
'css'
,
// 换行符使用 lf
endOfLine
:
'lf'
}
;
}
babel.config.js
View file @
f7e0a42f
module
.
exports
=
{
presets
:
[
"@vue/cli-plugin-babel/preset"
],
"plugins"
:
[
presets
:
[
'@vue/cli-plugin-babel/preset'
],
plugins
:
[
[
"import"
,
'import'
,
{
"libraryName"
:
"vant"
,
"libraryDirectory"
:
"es"
,
"style"
:
true
libraryName
:
'vant'
,
libraryDirectory
:
'es'
,
style
:
true
}
]
]
}
;
}
public/favicon.ico
deleted
100644 → 0
View file @
b82b57b1
4.19 KB
public/index.html
View file @
f7e0a42f
...
...
@@ -13,7 +13,7 @@
<meta
name=
"screen-orientation"
content=
"portrait"
/>
<!-- QQ强制竖屏 -->
<meta
name=
"x5-orientation"
content=
"portrait"
/>
<link
rel=
"icon"
href=
"<%= BASE_URL %>
favicon
.ico"
/>
<link
rel=
"icon"
href=
"<%= BASE_URL %>
wly2
.ico"
/>
<title><
%=
htmlWebpackPlugin
.
options
.
title
%
></title>
</head>
<body
ontouchstart=
""
>
...
...
public/wly2.ico
0 → 100644
View file @
f7e0a42f
66.1 KB
src/App.vue
View file @
f7e0a42f
...
...
@@ -6,7 +6,7 @@
<
script
>
export
default
{
name
:
'
A
pp'
name
:
'
a
pp'
}
</
script
>
<
style
lang=
"scss"
>
...
...
src/api/baseUrl.js
View file @
f7e0a42f
// 默认url
export
const
BASE_API
=
function
()
{
export
const
BASE_API
=
function
()
{
return
process
.
env
.
NODE_ENV
===
'production'
?
'crm-app'
:
'huigou'
}
src/api/flowHander.js
View file @
f7e0a42f
import
request
from
'@/utils/request'
import
{
BASE_API
}
from
'@/api/baseUrl'
import
{
handleFormData
}
from
'@/utils/index'
export
function
handlerFlow
(
data
,
key
)
{
if
(
data
.
id
)
{
return
saveData
(
data
)
}
else
{
return
startProcessInstanceByKey
(
data
,
key
)
}
}
/**
* 保存业务数据
*/
export
function
saveData
(
data
)
{
return
request
({
url
:
BASE_API
()
+
'/workflow/saveBizData'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
data
:
handleFormData
(
data
)
})
}
/**
* 退回
*/
export
function
backToApplyActivity
(
data
)
{
return
request
({
url
:
BASE_API
()
+
'/workflow/backToApplyActivity'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
data
:
handleFormData
(
data
)
})
}
/**
* 任务列表
*/
export
function
taskExecutionFindByBizId
(
params
)
{
return
request
({
url
:
BASE_API
()
+
'/workflow/taskExecution/findByBizId'
,
method
:
'get'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
params
})
}
/**
* 启动流程
*/
export
function
startProcessInstanceByKey
(
data
,
key
)
{
data
.
processDefinitionKey
=
key
data
.
processAction
=
'save'
data
.
flowKind
=
'APPROVAL'
data
.
procUnitId
=
data
.
id
?
'APPROVE'
:
'APPLY'
return
request
({
url
:
BASE_API
()
+
'/workflow/startProcessInstanceByKey'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
data
:
handleFormData
(
data
)
})
}
/**
* 提交流程
*/
export
function
advance
(
data
)
{
data
.
procUnitId
=
'approve'
data
.
processAction
=
'advance'
return
request
({
url
:
BASE_API
()
+
'/workflow/advance'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
data
:
handleFormData
(
data
)
})
}
/**
* 页面离开
*/
export
function
editFlowTest
(
data
)
{
return
request
({
url
:
BASE_API
()
+
'/flowTest/editFlowTest'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
data
})
}
/**
* 流程轨迹
*/
export
function
queryApprovalHistoryByBizId
(
data
)
{
return
request
({
url
:
BASE_API
()
+
'/workflow/queryApprovalHistoryByBizId'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
data
:
handleFormData
(
data
)
})
}
import
request
from
'@/utils/request'
import
{
BASE_API
}
from
'@/api/baseUrl'
import
{
handleFormData
}
from
'@/utils/index'
export
function
handlerFlow
(
data
,
key
)
{
if
(
data
.
id
)
{
return
saveData
(
data
)
}
else
{
return
startProcessInstanceByKey
(
data
,
key
)
}
}
/**
* 保存业务数据
*/
export
function
saveData
(
data
)
{
return
request
({
url
:
BASE_API
()
+
'/workflow/saveBizData'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
data
:
handleFormData
(
data
)
})
}
/**
* 退回
*/
export
function
backToApplyActivity
(
data
)
{
return
request
({
url
:
BASE_API
()
+
'/workflow/backToApplyActivity'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
data
:
handleFormData
(
data
)
})
}
/**
* 任务列表
*/
export
function
taskExecutionFindByBizId
(
params
)
{
return
request
({
url
:
BASE_API
()
+
'/workflow/taskExecution/findByBizId'
,
method
:
'get'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
params
})
}
/**
* 启动流程
*/
export
function
startProcessInstanceByKey
(
data
,
key
)
{
data
.
processDefinitionKey
=
key
data
.
processAction
=
'save'
data
.
flowKind
=
'APPROVAL'
data
.
procUnitId
=
data
.
id
?
'APPROVE'
:
'APPLY'
return
request
({
url
:
BASE_API
()
+
'/workflow/startProcessInstanceByKey'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
data
:
handleFormData
(
data
)
})
}
/**
* 提交流程
*/
export
function
advance
(
data
)
{
data
.
procUnitId
=
'approve'
data
.
processAction
=
'advance'
return
request
({
url
:
BASE_API
()
+
'/workflow/advance'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
data
:
handleFormData
(
data
)
})
}
/**
* 页面离开
*/
export
function
editFlowTest
(
data
)
{
return
request
({
url
:
BASE_API
()
+
'/flowTest/editFlowTest'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
data
})
}
/**
* 流程轨迹
*/
export
function
queryApprovalHistoryByBizId
(
data
)
{
return
request
({
url
:
BASE_API
()
+
'/workflow/queryApprovalHistoryByBizId'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
data
:
handleFormData
(
data
)
})
}
src/permission.js
View file @
f7e0a42f
import
router
from
'./router'
import
store
from
'./store'
// import { getToken } from '@/utils/auth' // get token from cookie
// import { login } from '@/api/login'
// 过滤器白名单
const
whiteList
=
[
'/login'
]
// no redirect whitelist
// const hasToken = getToken()
router
.
beforeEach
(
async
to
=>
{
const
hasToken
=
store
.
getters
.
token
console
.
log
(
'to---'
,
to
,
hasToken
,
store
)
if
(
to
.
meta
.
title
)
{
document
.
title
=
to
.
meta
.
title
}
if
(
hasToken
)
{
return
true
}
else
{
try
{
if
(
whiteList
.
indexOf
(
to
.
path
)
!==
-
1
)
{
return
true
}
else
{
return
{
path
:
`/login`
,
query
:
{
...
to
.
query
}
}
}
}
catch
(
error
)
{
return
{
path
:
`/login`
,
query
:
{
...
to
.
query
}
}
}
}
// if (hasToken) {
// if (to.path.indexOf('delivery-plan-approve') !== -1) {
// return { replace: true, path: '/month-flow', query: { ...to.query } }
// } else {
// return { replace: true, path: '/month-flow', query: { ...to.query } }
// }
// } else {
// if (to.query?.taskToken) {
// login({ ...to.query })
// .then(async res => {
// if (res.status === 1) {
// await store.dispatch('setToken', res.data.token)
// store.commit('SET_USERINFO', res.data.operator || {})
// if (to.path.indexOf('delivery-plan-approve') !== -1) {
// return { path: '/month-flow', query: { ...to.query } }
// } else {
// return true
// }
// } else {
// return { path: `/login?redirect=${to.path}`, query: { ...to.query } }
// }
// })
// .catch(() => {
// return { path: `/login?redirect=${to.path}`, query: { ...to.query } }
// })
// } else {
// if (whiteList.indexOf(to.path) !== -1) {
// if (to.path.indexOf('delivery-plan-approve') !== -1) {
// return { path: '/month-flow', query: { ...to.query } }
// } else {
// return true
// }
// } else {
// if (to.path.indexOf('delivery-plan-approve') !== -1) {
// return '/month-flow'
// } else {
// return { path: `/login?redirect=${to.path}`, query: { ...to.query } }
// }
// }
// }
// }
})
import
router
from
'./router'
import
store
from
'./store'
// import { getToken } from '@/utils/auth' // get token from cookie
// import { login } from '@/api/login'
// 过滤器白名单
const
whiteList
=
[
'/login'
]
// no redirect whitelist
// const hasToken = getToken()
router
.
beforeEach
(
async
to
=>
{
const
hasToken
=
store
.
getters
.
token
console
.
log
(
'to---'
,
to
,
hasToken
,
store
)
if
(
to
.
meta
.
title
)
{
document
.
title
=
to
.
meta
.
title
}
if
(
hasToken
)
{
return
true
}
else
{
try
{
if
(
whiteList
.
indexOf
(
to
.
path
)
!==
-
1
)
{
return
true
}
else
{
return
{
path
:
`/login`
,
query
:
{
...
to
.
query
}
}
}
}
catch
(
error
)
{
return
{
path
:
`/login`
,
query
:
{
...
to
.
query
}
}
}
}
// if (hasToken) {
// if (to.path.indexOf('delivery-plan-approve') !== -1) {
// return { replace: true, path: '/month-flow', query: { ...to.query } }
// } else {
// return { replace: true, path: '/month-flow', query: { ...to.query } }
// }
// } else {
// if (to.query?.taskToken) {
// login({ ...to.query })
// .then(async res => {
// if (res.status === 1) {
// await store.dispatch('setToken', res.data.token)
// store.commit('SET_USERINFO', res.data.operator || {})
// if (to.path.indexOf('delivery-plan-approve') !== -1) {
// return { path: '/month-flow', query: { ...to.query } }
// } else {
// return true
// }
// } else {
// return { path: `/login?redirect=${to.path}`, query: { ...to.query } }
// }
// })
// .catch(() => {
// return { path: `/login?redirect=${to.path}`, query: { ...to.query } }
// })
// } else {
// if (whiteList.indexOf(to.path) !== -1) {
// if (to.path.indexOf('delivery-plan-approve') !== -1) {
// return { path: '/month-flow', query: { ...to.query } }
// } else {
// return true
// }
// } else {
// if (to.path.indexOf('delivery-plan-approve') !== -1) {
// return '/month-flow'
// } else {
// return { path: `/login?redirect=${to.path}`, query: { ...to.query } }
// }
// }
// }
// }
})
src/utils/auth.js
View file @
f7e0a42f
import
Cookies
from
'js-cookie'
// 是否需要前缀
const
HEADER_TOKEN_KEY
=
'X-Auth-Token'
/**
* 获取token
*/
const
getToken
=
function
()
{
return
Cookies
.
get
(
HEADER_TOKEN_KEY
)
}
/**
* 设置token
*/
const
setToken
=
function
(
token
)
{
return
Cookies
.
set
(
HEADER_TOKEN_KEY
,
token
)
}
/**
* 删除token
*/
const
clearToken
=
function
()
{
return
Cookies
.
remove
(
HEADER_TOKEN_KEY
)
}
export
{
HEADER_TOKEN_KEY
,
getToken
,
setToken
,
clearToken
}
import
Cookies
from
'js-cookie'
// 是否需要前缀
const
HEADER_TOKEN_KEY
=
'X-Auth-Token'
/**
* 获取token
*/
const
getToken
=
function
()
{
return
Cookies
.
get
(
HEADER_TOKEN_KEY
)
}
/**
* 设置token
*/
const
setToken
=
function
(
token
)
{
return
Cookies
.
set
(
HEADER_TOKEN_KEY
,
token
)
}
/**
* 删除token
*/
const
clearToken
=
function
()
{
return
Cookies
.
remove
(
HEADER_TOKEN_KEY
)
}
export
{
HEADER_TOKEN_KEY
,
getToken
,
setToken
,
clearToken
}
src/views/invoice-occupancy-detail/InvoiceOccupancyDetail.vue
View file @
f7e0a42f
...
...
@@ -7,7 +7,7 @@
<div
class=
"block"
v-for=
"(item, index) in sourceData"
:key=
"index"
>
<div
class=
"top-block"
>
<van-cell
title=
"开票客户"
:value=
"item.customer"
/>
<van-cell
title=
"发货计划类型"
:value=
"invoiceCondition.planType"
/>
<van-cell
title=
"发货计划类型"
:value=
"invoiceCondition.planType
TextView
"
/>
<van-cell
title=
"发票号"
:value=
"item.invoId"
/>
<van-cell
title=
"开票日期"
:value=
"item.invoiceDate"
/>
<van-cell
title=
"开票量"
:value=
"item.useQuantity"
/>
...
...
src/views/month-flow/monthFlow.vue
View file @
f7e0a42f
...
...
@@ -132,6 +132,7 @@ export default {
console
.
log
(
'22asssssss'
,
res
)
if
(
res
.
status
===
1
)
{
Toast
(
'提交成功'
)
window
.
close
()
}
}
},
...
...
src/views/plan-change-flow/planChangeFlow.vue
View file @
f7e0a42f
...
...
@@ -130,6 +130,7 @@ export default {
console
.
log
(
'22asssssss'
,
res
)
if
(
res
.
status
===
1
)
{
Toast
(
'提交成功'
)
window
.
close
()
}
}
},
...
...
src/views/ship-approval/ShipApproval.vue
View file @
f7e0a42f
...
...
@@ -7,11 +7,11 @@
<div
class=
"block"
>
<div
class=
"top-block"
>
<van-cell
title=
"发运单号"
:value=
"conditions.wantCode"
/>
<van-cell
title=
"发货计划类型"
:value=
"conditions.planType"
/>
<van-cell
title=
"制票类型"
:value=
"conditions.noticeSheetType"
/>
<van-cell
title=
"发货计划类型"
:value=
"conditions.planType
TextView
"
/>
<van-cell
title=
"制票类型"
:value=
"conditions.noticeSheetType
TextView
"
/>
<van-cell
title=
"开票客户"
:value=
"conditions.customerName"
/>
<van-cell
title=
"订单客户"
:value=
"conditions.billCustomer"
/>
<van-cell
title=
"渠道类型"
:value=
"conditions.channelsType"
/>
<van-cell
title=
"渠道类型"
:value=
"conditions.channelsType
TextView
"
/>
<van-cell
title=
"年度"
:value=
"conditions.quotasYear"
/>
</div>
<div
...
...
@@ -19,7 +19,7 @@
v-for=
"(item, index) in conditions.wantGoodsDetailList"
:key=
"index"
>
<van-cell
title=
"产品类别"
:value=
"item.brandBq"
/>
<van-cell
title=
"产品类别"
:value=
"item.brandBq
TextView
"
/>
<van-cell
title=
"产品描述"
:value=
"item.productDesc"
/>
<van-cell
title=
"未发货件数"
:value=
"item.undeliveredQuantity"
/>
<van-cell
title=
"本月计划剩余数"
:value=
"item.monthLeftQty"
/>
...
...
@@ -38,20 +38,22 @@
<div
class=
"block form-block"
>
<van-cell-group>
<van-field
v-if=
"
taskNode === 'base'
"
v-if=
"
isShowBase
"
v-model=
"form.baseAuditQuantity"
:required=
"taskNode === 'base'"
label=
"基地审批量"
placeholder=
""
/>
<van-field
v-
else-if=
"taskNode === 'warZone'
"
v-
if=
"isShowWarZone
"
v-model=
"form.warAuditQuantity"
label=
"战区审批量"
:required=
"taskNode === 'warZone'"
placeholder=
""
error-message=
""
/>
<van-field
v-
else-if=
"taskNode === 'work'
"
v-
if=
"isShowWork
"
v-model=
"form.salecenterAuditQuantity"
required
label=
"内勤审批量"
...
...
@@ -79,7 +81,7 @@
</div>
<div
class=
"block form-block"
>
<van-cell-group>
<van-field
v-model=
"conditions.isShunt"
label=
"是否分流"
placeholder=
""
/>
<van-field
v-model=
"conditions.isShunt
TextView
"
label=
"是否分流"
placeholder=
""
/>
<van-field
v-model=
"conditions.shuntDealer"
label=
"分流经销商"
...
...
@@ -87,7 +89,7 @@
error-message=
""
/>
<van-field
v-model=
"conditions.
shuntChannelsType
"
v-model=
"conditions.
noticeSheetTypeTextView
"
label=
"分流经渠道"
placeholder=
""
error-message=
""
...
...
@@ -127,7 +129,7 @@
error-message=
""
/>
<van-field
v-model=
"conditions.selfacceptance"
v-model=
"conditions.selfacceptance
TextView
"
label=
"是否自提"
placeholder=
""
error-message=
""
...
...
@@ -256,7 +258,16 @@ export default {
}
},
computed
:
{
...
mapGetters
[
'token'
]
...
mapGetters
[
'token'
],
isShowBase
()
{
return
this
.
taskNode
===
'base'
||
this
.
isShowWarZone
||
this
.
isShowWork
},
isShowWarZone
()
{
return
this
.
taskNode
===
'warZone'
||
this
.
isShowWork
},
isShowWork
()
{
return
this
.
taskNode
===
'work'
}
},
created
()
{
const
{
id
,
taskId
}
=
this
.
$route
.
query
...
...
@@ -277,6 +288,7 @@ export default {
},
checkDetail
()
{
this
.
invoiceCondition
.
planType
=
this
.
conditions
.
planType
this
.
invoiceCondition
.
planTypeTextView
=
this
.
conditions
.
planTypeTextView
this
.
invoiceOccupancyDetailShow
=
true
// this.$router.push({ name: 'InvoiceOccupancyDetail' })
},
...
...
@@ -285,9 +297,19 @@ export default {
},
initDetail
()
{
apiWantgoodsFindById
(
this
.
conditions
).
then
(
res
=>
{
console
.
log
(
res
.
data
)
res
.
data
.
pyear
+=
''
this
.
conditions
=
{
...
this
.
conditions
,
...
res
.
data
}
for
(
const
key
in
this
.
conditions
)
{
if
(
this
.
conditions
.
hasOwnProperty
(
key
))
{
if
(
key
===
'isShunt'
)
{
this
.
conditions
.
isShuntTextView
=
this
.
FormDictionaryForYesOrNot
(
this
.
conditions
[
key
])
}
else
if
(
key
===
'selfacceptance'
)
{
this
.
conditions
.
selfacceptanceTextView
=
this
.
FormDictionaryForYesOrNot
(
this
.
conditions
[
key
]
)
}
}
}
})
},
flowPath
()
{
...
...
@@ -313,6 +335,7 @@ export default {
console
.
log
(
'22asssssss'
,
res
)
if
(
res
.
status
===
1
)
{
Toast
(
'提交成功'
)
window
.
close
()
}
}
},
...
...
@@ -332,6 +355,12 @@ export default {
}
}
},
FormDictionaryForYesOrNot
(
val
)
{
return
{
0
:
'否'
,
1
:
'是'
}[
val
*
1
]
},
onClickLeft
()
{}
}
}
...
...
vue.config.js
View file @
f7e0a42f
...
...
@@ -2,6 +2,7 @@
const
path
=
require
(
'path'
)
module
.
exports
=
{
publicPath
:
process
.
env
.
NODE_ENV
===
'production'
?
'/qywx/'
:
''
,
css
:
{
loaderOptions
:
{
sass
:
{
...
...
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