Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 621e2c52
authored
Apr 15, 2022
by
wuwx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
折扣券新增折扣,满减。会员核销记录新增跳转
1 parent
395d62cb
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
214 additions
and
18 deletions
src/config/env.development.js
src/config/index.js
src/setup/qiankun.js
src/views/couponManage/editCashCoupon.vue
src/views/couponManage/editDiscountCoupon.vue
src/views/couponManage/fileBox.vue
src/views/memberCenter/record.vue
src/config/env.development.js
View file @
621e2c5
...
...
@@ -18,9 +18,9 @@ module.exports = {
code_message_map
:
{}
},
request
:
{
baseURL
:
'http://scrm.test.glsx.com.cn/'
,
//
baseURL: 'http://scrm.test.glsx.com.cn/',
// baseURL: 'http://192.168.2.42:8064/',
//
baseURL: 'http://scrm.dev.glsx.com.cn/',
baseURL
:
'http://scrm.dev.glsx.com.cn/'
,
// 设置超时时间
timeout
:
180000
,
// 携带凭证
...
...
src/config/index.js
View file @
621e2c5
...
...
@@ -11,12 +11,12 @@
let
cfg
=
require
(
'./conf.js'
)
import
{
Http
}
from
'glsx-common'
let
timeout
=
30000
//超时时间
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
//
if (isEnv) {
//
let { request } = cfg
//
Object.assign(request, { timeout })
//
return Promise.resolve(cfg)
//
}
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
if
(
isEnv
)
{
let
{
request
}
=
cfg
Object
.
assign
(
request
,
{
timeout
})
return
Promise
.
resolve
(
cfg
)
}
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return
new
Http
().
get
(
'https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config'
)
...
...
src/setup/qiankun.js
View file @
621e2c5
...
...
@@ -15,7 +15,7 @@ Vue.use(ElementUI)
Vue
.
use
(
GLTable
)
Vue
.
use
(
GLFooter
)
export
async
function
bootstrap
({
history
,
common
,
messenger
,
globalState
,
routerBase
})
{
const
{
response
,
request
,
request2
,
sign
,
secret
,
sign_common
,
request_common
,
request_merchant
}
=
await
fetchConfig
(
fals
e
)
const
{
response
,
request
,
request2
,
sign
,
secret
,
sign_common
,
request_common
,
request_merchant
}
=
await
fetchConfig
(
tru
e
)
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$globalState
=
globalState
...
...
src/views/couponManage/editCashCoupon.vue
View file @
621e2c5
...
...
@@ -100,6 +100,7 @@
</GLTable>
</div>
<
template
slot=
"useDescriptionHtml"
>
<!--
<fileBox
@
change=
"writeChange"
ref=
"fileBox"
></fileBox>
-->
<el-input
type=
"textarea"
v-model=
"editForm.useDescription"
style=
"width: 320px"
:autosize=
"
{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="userDisable" />
</
template
>
<
template
slot=
"editHtml"
>
...
...
@@ -118,8 +119,12 @@
<
script
>
import
{
limitPrice
}
from
'@/common/constant'
import
fileBox
from
'./fileBox.vue'
export
default
{
name
:
'editCashCoupon'
,
components
:
{
// fileBox
},
data
()
{
return
{
defaultTime
:
[
'00:00:00'
,
'23:59:59'
],
// 选择日期后的默认时间
...
...
@@ -304,7 +309,6 @@ export default {
this
.
routeInfo
=
this
.
$route
.
params
// this.title = this.titleObj[this.routeInfo.addOrEdit]
this
.
getAllGoods
()
this
.
routeInfo
.
addOrEdit
!=
1
?
this
.
getInfo
()
:
''
var
id
=
this
.
routeInfo
.
id
var
addOrEdit
=
this
.
routeInfo
.
addOrEdit
if
(
id
)
{
...
...
@@ -431,6 +435,12 @@ export default {
},
methods
:
{
// 获取富文本框内容
// writeChange(val) {
// let reg = /(?<=(<p[^>]*?>)).*?(?=(<\/p>))/g
// this.editForm.useDescription = val.match(reg)
// console.log('this.editForm.useDescription', this.editForm.useDescription)
// },
haveChange
()
{
let
oDateOne
=
new
Date
(
this
.
editForm
.
effectiveTime
[
0
]).
getTime
()
let
timeStamp
=
new
Date
().
getTime
()
...
...
@@ -476,6 +486,7 @@ export default {
}
else
{
this
.
priceFlag
=
true
}
this
.
routeInfo
.
addOrEdit
!=
1
?
this
.
getInfo
()
:
''
})
},
...
...
src/views/couponManage/editDiscountCoupon.vue
View file @
621e2c5
<!-- 编辑折扣券 -->
<
template
>
<div
class=
"edit-share marketing p-t-20 edit-box"
>
<div
class=
"container edit-container"
style=
"
height: 630px;
position: relative"
>
<div
class=
"container edit-container"
style=
"position: relative"
>
<!--
<div
class=
"right_show"
>
<div
class=
"card-top"
></div>
<div
class=
"card-middle"
>
...
...
@@ -77,6 +77,16 @@
</el-radio>
</el-form-item>
</
template
>
<
template
slot=
"useLimitHtml"
>
<el-radio
v-model=
"editForm.useBarriers"
label=
"1"
:disabled=
"apear != 'couponAdd'"
>
无门槛
</el-radio>
<el-form-item
prop=
"full"
ref=
"full"
>
<el-radio
v-model=
"editForm.useBarriers"
label=
"2"
:disabled=
"apear != 'couponAdd'"
>
满
<el-input
v-model=
"editForm.full"
@
blur=
"loseFocus"
style=
"width: 100px; margin-left: 5px; margin-right: 5px"
:disabled=
"apear != 'couponAdd' || editForm.useBarriers != 2"
/>
元可用
</el-radio>
</el-form-item>
</
template
>
<
template
slot=
"useDescriptionHtml"
>
<el-input
type=
"textarea"
v-model=
"editForm.useDescription"
style=
"width: 320px"
:autosize=
"
{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="userDisable" />
</
template
>
...
...
@@ -141,9 +151,12 @@ export default {
editForm
:
{
couponName
:
''
,
effectiveType
:
'2'
,
useBarriers
:
'1'
,
full
:
''
,
effectiveTime
:
[],
effectiveDays
:
''
,
anticipatedCost
:
''
,
discountIntensity
:
''
,
directionalFlag
:
'1'
},
editRule
:
{
...
...
@@ -171,6 +184,18 @@ export default {
isDisabled
:
false
},
{
label
:
'优惠内容'
,
name
:
'discountIntensity'
,
width
:
'180px'
,
type
:
'input'
,
append
:
'折'
},
{
label
:
'使用限制'
,
name
:
'useBarriers'
,
addHtml
:
'useLimitHtml'
},
{
label
:
'发放数量'
,
name
:
'stock'
,
width
:
'180px'
,
...
...
@@ -226,9 +251,11 @@ export default {
const
couponNameIndex
=
this
.
editFormData
.
findIndex
(
val
=>
val
.
name
==
'couponName'
)
const
anticipatedCostIndex
=
this
.
editFormData
.
findIndex
(
val
=>
val
.
name
==
'anticipatedCost'
)
const
stockIndex
=
this
.
editFormData
.
findIndex
(
val
=>
val
.
name
==
'stock'
)
const
discountIndex
=
this
.
editFormData
.
findIndex
(
val
=>
val
.
name
==
'discountIntensity'
)
this
.
editFormData
[
couponNameIndex
].
isDisabled
=
this
.
isDisabled
this
.
editFormData
[
anticipatedCostIndex
].
isDisabled
=
this
.
isDisabled
this
.
editFormData
[
stockIndex
].
isDisabled
=
this
.
isDisabled
this
.
editFormData
[
discountIndex
].
isDisabled
=
this
.
isDisabled
this
.
userDisable
=
true
}
else
{
this
.
apear
=
'couponAdd'
...
...
@@ -252,6 +279,19 @@ export default {
},
'editForm.stock'
(
newValue
,
oldValue
)
{
this
.
editForm
.
stock
=
limitPrice
(
newValue
,
oldValue
,
6
,
0
,
1
)
if
(
newValue
)
{
if
(
this
.
editForm
.
discountIntensity
==
0
)
{
this
.
editForm
.
discountIntensity
=
''
}
}
},
'editForm.discountIntensity'
(
newValue
,
oldValue
)
{
this
.
editForm
.
discountIntensity
=
limitPrice
(
newValue
,
oldValue
,
1
,
2
,
0
,
9.99
)
},
'editForm.useBarriers'
(
newValue
,
oldValue
)
{
if
(
newValue
!=
2
)
{
this
.
$refs
[
'full'
].
resetField
()
}
},
'editForm.effectiveTime'
(
newValue
,
oldValue
)
{
if
(
newValue
&&
newValue
.
length
==
2
)
{
...
...
@@ -269,8 +309,15 @@ export default {
}
}
},
methods
:
{
loseFocus
()
{
if
(
this
.
editForm
.
useLimitPrice
<=
0
)
{
this
.
editForm
.
useLimitPrice
=
''
}
if
(
this
.
editForm
.
discountIntensity
==
0
)
{
this
.
editForm
.
discountIntensity
=
''
}
},
haveChange
()
{
let
oDateOne
=
new
Date
(
this
.
editForm
.
effectiveTime
[
0
]).
getTime
()
let
timeStamp
=
new
Date
().
getTime
()
...
...
@@ -290,10 +337,17 @@ export default {
getInfo
()
{
this
.
$apis
.
couponManage
.
getCouponDetailApi
({
couponId
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
editForm
=
this
.
$common
.
utils
.
deepClone
(
res
)
this
.
editForm
.
directionalFlag
=
this
.
editForm
.
directionalFlag
+
''
this
.
editForm
.
effectiveType
=
this
.
editForm
.
effectiveType
+
''
this
.
editForm
.
useBarriers
=
this
.
editForm
.
useBarriers
+
''
this
.
editForm
.
anticipatedCost
=
(
this
.
editForm
.
anticipatedCost
/
100
).
toFixed
(
2
)
this
.
editForm
.
discountIntensity
=
(
this
.
editForm
.
discountIntensity
/
100
).
toFixed
(
2
)
//使用限制,满多少元可用
if
(
this
.
editForm
.
useBarriers
==
2
)
{
this
.
editForm
.
full
=
this
.
editForm
.
full
}
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if
(
this
.
editForm
.
effectiveType
==
2
)
{
...
...
@@ -319,6 +373,9 @@ export default {
}
else
{
this
.
editRule
.
effectiveDays
[
0
].
required
=
false
}
if
(
this
.
editForm
.
discountIntensity
==
0
)
{
this
.
editForm
.
discountIntensity
=
''
}
},
getCouponInfoParams
()
{
...
...
@@ -348,9 +405,15 @@ export default {
obj
.
effectiveEndTime
=
d
[
1
]
}
}
//使用限制
obj
.
useBarriers
=
form
.
useBarriers
if
(
form
.
useBarriers
==
2
)
{
obj
.
full
=
form
.
full
}
//库存
obj
.
stock
=
form
.
stock
//折扣
obj
.
discountIntensity
=
form
.
discountIntensity
*
100
//类型(0:不限制次数,1:根据有效期限制多少次,2:根据间隔多少天限制多少次)
obj
.
useType
=
1
//有效期或者间隔天数使用次数
...
...
src/views/couponManage/fileBox.vue
0 → 100644
View file @
621e2c5
<
template
>
<div>
<div
id=
"div-demo"
></div>
</div>
</
template
>
<
script
>
import
E
from
'wangeditor'
export
default
{
name
:
'textBox'
,
data
()
{
return
{
editor
:
''
,
content
:
''
,
editorOption
:
{}
}
},
mounted
()
{
this
.
getEdit
()
},
methods
:
{
getEdit
()
{
const
_this
=
this
this
.
editor
=
new
E
(
'#div-demo'
)
// 配置菜单栏,删减菜单,调整顺序
this
.
editor
.
config
.
menus
=
[]
this
.
editor
.
config
.
uploadImgShowBase64
=
true
this
.
editor
.
config
.
showMenuTooltips
=
true
this
.
editor
.
config
.
menuTooltipPosition
=
'down'
this
.
editor
.
config
.
height
=
400
this
.
editor
.
config
.
width
=
500
this
.
editor
.
config
.
uploadVideoServer
=
'/api/upload-video'
this
.
editor
.
config
.
excludeMenus
=
[
'code'
,
'video'
]
this
.
editor
.
config
.
onchange
=
html
=>
{
// console.log(html);
this
.
content
=
html
// 绑定当前逐渐地值
this
.
$emit
(
'change'
,
this
.
content
)
// 将内容同步到父组件中
}
this
.
editor
.
config
.
customUploadImg
=
function
(
resultFiles
,
insertImgFn
)
{
var
file
=
resultFiles
[
0
]
var
reader
=
new
FileReader
()
// 默认1MB
const
limitSize
=
10
const
isLt
=
file
.
size
/
1024
/
1024
<
limitSize
if
(
!
isLt
)
{
_this
.
$message
.
error
(
'上传图片大小不能超过'
+
limitSize
+
'MB!'
)
return
true
}
reader
.
readAsDataURL
(
file
)
reader
.
onload
=
e
=>
{
const
imgFile
=
e
.
target
.
result
const
base64
=
file
.
name
.
split
(
'.'
)[
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
_this
.
$apis
.
common
.
pictureUpload
({
file
:
base64
}).
then
(
res
=>
{
if
(
res
)
{
// console.log(res)
insertImgFn
(
res
)
}
})
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
// 上传图片,返回结果,将图片插入到编辑器中
}
}
this
.
editor
.
config
.
onchangeTimeout
=
5000
this
.
editor
.
create
()
},
setEdit
(
html
)
{
this
.
$nextTick
(()
=>
{
this
.
editor
.
txt
.
html
(
html
)
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
#div-demo
{
margin
:
16px
300px
0
0
;
}
.el-form
.editor
{
margin-top
:
20px
;
}
.myQuillEditor
{
background-color
:
#fff
;
height
:
200px
;
}
</
style
>
<
style
>
.w-e-text-container
{
z-index
:
1
!important
;
height
:
70px
!important
;
}
.w-e-toolbar
{
z-index
:
2
!important
;
}
.w-e-text
{
width
:
220px
!important
;
}
</
style
>
src/views/memberCenter/record.vue
View file @
621e2c5
...
...
@@ -21,8 +21,8 @@
</el-form-item>
</el-row>
<el-row>
<el-form-item
size=
"small"
label=
"关联
订单号
"
>
<el-input
:size=
"size"
v-model=
"searchForm.orderCode"
placeholder=
"请输入关联
订单号
"
clearable
></el-input>
<el-form-item
size=
"small"
label=
"关联
信息
"
>
<el-input
:size=
"size"
v-model=
"searchForm.orderCode"
placeholder=
"请输入关联
信息
"
clearable
></el-input>
</el-form-item>
<el-form-item
size=
"small"
label=
"核销日期"
>
<!-- verificationTimeStart verificationTimeEnd -->
...
...
@@ -40,6 +40,10 @@
</el-form>
</div>
<GLTable
ref=
"memberRecordRef"
v-if=
"isReload"
:noDataImg=
"url"
@
setTableFinishFun=
"setTableFinishFun"
:searchForm=
"searchFormTable"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
>
<span
slot=
"orderCodeHtml"
slot-scope=
"scope"
>
<span
class=
"cursor-pointer"
@
click=
"couponNameHandleDetail(scope.scope)"
v-if=
"scope.scope.directionalGiftId"
>
{{
scope
.
scope
.
directionalGiftName
}}
</span>
<span
class=
"cursor-pointer"
@
click=
"orderCodeHandleDetail(scope.scope)"
v-else
>
{{
scope
.
scope
.
orderCode
}}
</span>
</span>
<span
slot=
"verificationTime"
slot-scope=
"scope"
>
<span>
{{
dateFormatFun
(
scope
.
scope
.
verificationTime
)
}}
</span>
</span>
...
...
@@ -125,15 +129,15 @@ export default {
},
{
label
:
'核销用户'
,
prop
:
'
userNam
e'
prop
:
'
phon
e'
},
{
label
:
'核销员'
,
prop
:
'verificationOperator'
},
{
label
:
'关联
订单号
'
,
prop
:
'orderCode
'
label
:
'关联
信息
'
,
addHtml
:
'orderCodeHtml
'
},
{
label
:
'核销日期'
,
...
...
@@ -153,6 +157,25 @@ export default {
}
},
methods
:
{
// 跳转到礼包领取详情页
couponNameHandleDetail
(
row
)
{
this
.
$router
.
push
({
path
:
'/giftBag/giftDetail'
,
query
:
{
id
:
row
.
id
}
})
},
// 跳转到订单详情页
orderCodeHandleDetail
(
row
)
{
this
.
$router
.
push
({
path
:
'/memberCenter/orderDetail'
,
query
:
{
id
:
row
.
id
,
detail
:
row
}
})
},
dateFormatFun
(
date
)
{
return
dateFormat
(
date
)
},
...
...
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