Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-settings
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bf249212
authored
Mar 12, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
审批接口联调
1 parent
773e27dc
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
11 deletions
src/api/modules/approvalConfig.js
src/config/index.js
src/setup/single.js
src/views/approvalConfig/index.vue
src/api/modules/approvalConfig.js
0 → 100644
View file @
bf24921
/*
* @Author: your name
* @Date: 2022-03-12 11:08:25
* @LastEditTime: 2022-03-12 11:11:32
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\api\modules\approvalConfig.js
*/
import
{
http_config
}
from
'@/main'
/**
* 根据 门店ID获取门店审批模板
*/
const
getApproveDetail
=
params
=>
{
params
.
method
=
'scrm.api.coupon.directional.gift.approve.template.detail'
return
http_config
({
url
:
'/rop-scrm-coupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
/**
* 保存门店审批模板
*/
const
saveApprove
=
params
=>
{
params
.
method
=
'scrm.api.coupon.directional.gift.approve.template.save'
return
http_config
({
url
:
'/rop-scrm-coupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getApproveDetail
,
saveApprove
}
src/config/index.js
View file @
bf24921
...
@@ -3,21 +3,22 @@
...
@@ -3,21 +3,22 @@
* @version:
* @version:
* @Author: limin
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @Date: 2021-06-07 14:12:32
* @LastEditors:
limin
* @LastEditors:
Please set LastEditors
* @LastEditTime: 202
1-09-07 14:38:52
* @LastEditTime: 202
2-03-12 14:01:09
*/
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
// let request = require('@/http/request.js')
let
cfg
=
require
(
'./conf.js'
)
let
cfg
=
require
(
'./conf.js'
)
import
{
Http
}
from
'glsx-common'
import
{
Http
}
from
'glsx-common'
let
timeout
=
30000
//超时时间
let
timeout
=
30000
//超时时间
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
// if (isEnv) {
// if (isEnv) {
// let { request } = cfg
// let { request } = cfg
// Object.assign(request, { timeout })
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// return Promise.resolve(cfg)
// }
// }
return
new
Http
().
get
(
'https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config'
)
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
return
new
Http
().
get
(
' http://192.168.3.171:7300/mock/617ba1df1072f92988f05a14/account/config'
)
}
}
export
const
config
=
{
export
const
config
=
{
install
(
vue
,
cfg
)
{
install
(
vue
,
cfg
)
{
...
...
src/setup/single.js
View file @
bf24921
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
* @version: 1.0.0
* @version: 1.0.0
* @Author: limin
* @Author: limin
* @Date: 2021-09-23 19:02:23
* @Date: 2021-09-23 19:02:23
* @LastEditors:
limin
* @LastEditors:
Please set LastEditors
* @LastEditTime: 202
1-09-24 10:41:17
* @LastEditTime: 202
2-03-12 14:14:09
* @FilePath: \scrm\scrm-sub-blog\src\setup\single.js
* @FilePath: \scrm\scrm-sub-blog\src\setup\single.js
*/
*/
import
Vue
from
'vue'
import
Vue
from
'vue'
...
@@ -16,8 +16,9 @@ import render from './render'
...
@@ -16,8 +16,9 @@ import render from './render'
import
{
routes
}
from
'@/router'
import
{
routes
}
from
'@/router'
export
async
function
start
()
{
export
async
function
start
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
return
if
(
window
.
__POWERED_BY_QIANKUN__
)
return
const
{
response
,
request
,
sign
,
secret
}
=
await
fetchConfig
()
const
{
response
,
request
,
sign
,
secret
,
request_config
}
=
await
fetchConfig
()
Vue
.
prototype
.
$http
=
new
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
TGT
:
'scrm-base-61a28f77-294f-4510-aa1c-6a35cff86f25-rop'
}
})
Vue
.
prototype
.
$http
=
new
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
TGT
:
'scrm-base-61a28f77-294f-4510-aa1c-6a35cff86f25-rop'
}
})
Vue
.
prototype
.
$http_config
=
new
Http
({
response
,
request
:
request_config
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
'scrm-base-b336fe5b-0f08-4075-88af-283f6ec6c915-rop'
}
})
Vue
.
use
(
GLButton
,
{
permissions
:
[
'1-1-1-1'
,
'2-1-1-1'
,
'3-1-1-1'
]
})
Vue
.
use
(
GLButton
,
{
permissions
:
[
'1-1-1-1'
,
'2-1-1-1'
,
'3-1-1-1'
]
})
render
(
'/'
,
routes
)
render
(
'/'
,
routes
)
}
}
\ No newline at end of file
\ No newline at end of file
src/views/approvalConfig/index.vue
View file @
bf24921
<!--
<!--
* @Author: your name
* @Author: your name
* @Date: 2022-03-02 18:28:20
* @Date: 2022-03-02 18:28:20
* @LastEditTime: 2022-03-
03 21:40:03
* @LastEditTime: 2022-03-
12 14:18:52
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\approvalConfig\index.vue
* @FilePath: \scrm-micro-settings\src\views\approvalConfig\index.vue
...
@@ -48,8 +48,8 @@ export default {
...
@@ -48,8 +48,8 @@ export default {
return
{
return
{
input
:
''
,
input
:
''
,
config
:
{
config
:
{
input
:
'adfasd'
,
approveTemplateId
:
''
input1
:
'3'
//
input1: '3'
},
},
oldConfig
:
{},
oldConfig
:
{},
configList
:
[
configList
:
[
...
@@ -57,7 +57,7 @@ export default {
...
@@ -57,7 +57,7 @@ export default {
id
:
1
,
id
:
1
,
title
:
'定向礼包'
,
title
:
'定向礼包'
,
name
:
'审批模板ID:'
,
name
:
'审批模板ID:'
,
model
:
'
input
'
,
model
:
'
approveTemplateId
'
,
placeholder
:
'请将模板ID粘贴到此处,不填写则不调用审批'
,
placeholder
:
'请将模板ID粘贴到此处,不填写则不调用审批'
,
disabled
:
true
disabled
:
true
// },
// },
...
@@ -73,6 +73,9 @@ export default {
...
@@ -73,6 +73,9 @@ export default {
clientHeight
:
500
clientHeight
:
500
}
}
},
},
created
()
{
this
.
getApprove
()
},
mounted
()
{
mounted
()
{
this
.
oldConfig
=
util
.
deepClone
(
this
.
config
)
this
.
oldConfig
=
util
.
deepClone
(
this
.
config
)
this
.
clientHeight
=
document
.
documentElement
.
scrollHeight
-
140
this
.
clientHeight
=
document
.
documentElement
.
scrollHeight
-
140
...
@@ -86,6 +89,23 @@ export default {
...
@@ -86,6 +89,23 @@ export default {
submit
(
model
,
index
)
{
submit
(
model
,
index
)
{
this
.
oldConfig
[
model
]
=
this
.
config
[
model
]
this
.
oldConfig
[
model
]
=
this
.
config
[
model
]
this
.
configList
[
index
].
disabled
=
true
this
.
configList
[
index
].
disabled
=
true
const
params
=
{
merchantId
:
this
.
$globalState
.
session
.
merchantId
,
approveTemplateId
:
this
.
config
.
approveTemplateId
}
this
.
$apis
.
approvalConfig
.
saveApprove
(
params
).
then
(
res
=>
{
if
(
res
)
{
this
.
$message
({
type
:
'success'
,
message
:
'操作成功'
})
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
'操作失败'
})
}
})
},
},
// 取消
// 取消
cancel
(
model
,
index
)
{
cancel
(
model
,
index
)
{
...
@@ -95,6 +115,13 @@ export default {
...
@@ -95,6 +115,13 @@ export default {
// 调整环审批模板指引
// 调整环审批模板指引
jumpGuide
()
{
jumpGuide
()
{
this
.
$router
.
push
({
path
:
'/approvalConfig/createGuide'
})
this
.
$router
.
push
({
path
:
'/approvalConfig/createGuide'
})
},
getApprove
()
{
const
merchantId
=
this
.
$globalState
.
session
.
merchantId
// const merchantId = 44209572
this
.
$apis
.
approvalConfig
.
getApproveDetail
({
merchantId
}).
then
(
res
=>
{
this
.
config
.
approveTemplateId
=
res
})
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment