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 486c2b98
authored
Mar 28, 2022
by
wuwx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改代码格式,屏蔽业务类型
1 parent
7a0179d2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
91 deletions
src/config/env.development.js
src/setup/qiankun.js
src/views/couponManage/editCashCoupon.vue
src/views/productGroup/editProduct.vue
src/config/env.development.js
View file @
486c2b9
...
...
@@ -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/setup/qiankun.js
View file @
486c2b9
...
...
@@ -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
(
false
)
const
{
response
,
request
,
request2
,
sign
,
secret
,
sign_common
,
request_common
,
request_merchant
}
=
await
fetchConfig
(
false
)
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$globalState
=
globalState
...
...
src/views/couponManage/editCashCoupon.vue
View file @
486c2b9
...
...
@@ -33,28 +33,18 @@
<el-radio
v-model=
"editForm.useChannel"
label=
"1"
:disabled=
"apear != 'couponAdd'"
>
线上商品
</el-radio>
<el-radio
v-model=
"editForm.useChannel"
label=
"2"
:disabled=
"apear != 'couponAdd'"
>
到店核销
</el-radio>
</
template
>
<
template
slot=
"directionalFlagHtml"
v-if=
"editForm.useChannel != 1"
>
<
template
slot=
"directionalFlagHtml"
>
<div>
<el-radio
v-model=
"editForm.directionalFlag"
label=
"1"
:disabled=
"apear != 'couponAdd'"
>
所有客户可用
</el-radio>
<span
class=
"promptCopy"
>
创建成功后立即生效,所有小程序用户均可领用
</span>
<el-radio
v-model=
"editForm.directionalFlag"
label=
"1"
:disabled=
"apear != 'couponAdd'"
>
所有客户可用
</el-radio>
<span
class=
"promptCopy"
>
创建成功后立即生效,所有小程序用户均可领用
</span>
</div>
<div>
<el-radio
v-model=
"editForm.directionalFlag"
label=
"2"
:disabled=
"apear != 'couponAdd'"
>
定向礼包专用
</el-radio>
<span
class=
"promptCopy"
>
企微员工通过企微工作台定向礼包发送给客户
</span>
<el-radio
v-model=
"editForm.directionalFlag"
label=
"2"
:disabled=
"apear != 'couponAdd'"
>
定向礼包专用
</el-radio>
<span
class=
"promptCopy"
>
企微员工通过企微工作台定向礼包发送给客户
</span>
</div>
<div>
<el-radio
v-model=
"editForm.directionalFlag"
label=
"3"
:disabled=
"apear != 'couponAdd'"
>
关联商品可用
</el-radio>
<span
class=
"promptCopy"
>
关联商品,用户支付成功后才能进行核销使用
</span>
</div>
</
template
>
<
template
slot=
"directionalFlagHtml"
v-else
>
<div>
<el-radio
v-model=
"editForm.directionalFlag"
label=
"1"
:disabled=
"apear != 'couponAdd'"
>
所有客户可用
</el-radio>
<span
class=
"promptCopy"
>
创建成功后立即生效,所有小程序用户均可领用
</span>
</div>
<div>
<el-radio
v-model=
"editForm.directionalFlag"
label=
"2"
:disabled=
"apear != 'couponAdd'"
>
定向礼包专用
</el-radio>
<span
class=
"promptCopy"
>
企微员工通过企微工作台定向礼包发送给客户
</span>
<div
v-if=
"editForm.useChannel != 1"
>
<el-radio
v-model=
"editForm.directionalFlag"
label=
"3"
:disabled=
"apear != 'couponAdd'"
>
关联商品可用
</el-radio>
<span
class=
"promptCopy"
>
关联商品,用户支付成功后才能进行核销使用
</span>
</div>
</
template
>
<
template
slot=
"effectiveHtml"
>
...
...
@@ -133,7 +123,7 @@ export default {
data
()
{
return
{
defaultTime
:
[
'00:00:00'
,
'23:59:59'
],
// 选择日期后的默认时间
format
:
"yyyy-MM-dd HH:mm:ss"
,
// 日期显示格式
format
:
'yyyy-MM-dd HH:mm:ss'
,
// 日期显示格式
showSubmit
:
true
,
userDisable
:
false
,
size
:
'small'
,
...
...
@@ -362,7 +352,7 @@ export default {
'editForm.effectiveTime'
(
newValue
,
oldValue
)
{
if
(
newValue
&&
newValue
.
length
==
2
)
{
// this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
this
.
couponTime
=
newValue
[
0
]
+
' ~ '
+
newValue
[
1
]
this
.
couponTime
=
newValue
[
0
]
+
' ~ '
+
newValue
[
1
]
}
else
{
this
.
couponTime
=
''
}
...
...
@@ -375,17 +365,15 @@ export default {
'editForm.useChannel'
(
newValue
,
oldValue
)
{
let
goodHtmlIndex
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'goods'
)
let
proTableIndex
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
addHtml
==
'proTable'
)
this
.
editFormData
[
goodHtmlIndex
].
isHide
=
newValue
!=
1
this
.
editForm
.
directionalFlag
=
'1'
if
(
newValue
==
1
)
{
this
.
editForm
.
directionalFlag
=
'1'
this
.
editFormData
[
goodHtmlIndex
].
isHide
=
false
if
(
this
.
editForm
.
goodsRefList
.
length
)
{
this
.
editFormData
[
proTableIndex
].
isHide
=
false
}
}
else
{
this
.
editForm
.
directionalFlag
=
'1'
this
.
editForm
.
useBarriers
=
'1'
this
.
editForm
.
full
=
''
this
.
editFormData
[
goodHtmlIndex
].
isHide
=
true
this
.
editFormData
[
proTableIndex
].
isHide
=
true
}
},
...
...
@@ -439,9 +427,11 @@ export default {
methods
:
{
haveChange
()
{
let
oDateOne
=
new
Date
(
this
.
editForm
.
effectiveTime
[
0
]).
getTime
()
let
timeStamp
=
new
Date
().
getTime
()
if
(
oDateOne
<
timeStamp
)
this
.
editForm
.
effectiveTime
=
[]
let
oDateOne
=
new
Date
(
this
.
editForm
.
effectiveTime
[
0
]).
getTime
()
let
timeStamp
=
new
Date
().
getTime
()
if
(
oDateOne
<
timeStamp
)
{
this
.
editForm
.
effectiveTime
=
[]
}
},
// 编辑按钮
editMessage
()
{
...
...
src/views/productGroup/editProduct.vue
View file @
486c2b9
...
...
@@ -11,11 +11,11 @@
<div
v-for=
"(item, index) in externalFormList"
:key=
"index"
>
<p
class=
"edit-title"
>
{{
item
.
title
}}
</p>
<glsx-combi-form
class=
"edit-form-container m-b-60"
ref=
"editFormRef"
:labelWidth=
"labelWidth"
:isEdit=
"isEdit"
defaultWidth=
"320px"
:isBlock=
"true"
:formRef=
"item.editChildRef"
:formObj=
"editForm"
:formData=
"item.editFormData"
:formRules=
"item.editRule"
@
handleImgDelete=
"handleFormImgDelete"
>
<template
slot=
"businessType"
slot-scope=
"scope"
>
<
!--
<
template
slot=
"businessType"
slot-scope=
"scope"
>
<el-checkbox-group
v-model=
"editForm.businessType"
>
<el-checkbox
:disabled=
"routeInfo.addOrEdit == 3"
v-for=
"value in scope.scope.businessTypeList"
:key=
"value.businessType"
:label=
"value.businessType"
>
{{
value
.
businessTypeName
}}
</el-checkbox>
</el-checkbox-group>
</
template
>
</
template
>
-->
<
template
slot=
"describeBtn"
>
<el-button
:disabled=
"isDisabled"
type=
"default"
@
click=
"handleDescribeImgAdd"
>
+添加图片
</el-button>
<span
class=
"edit-tips m-l-20"
>
最多可添加10张图片
</span>
...
...
@@ -69,9 +69,9 @@
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</span>
</glsx-combi-form>
<GLTable
ref=
"coupon"
:hasNum=
"false"
:getListApi=
"getListApi"
:searchForm=
"
associationTableSearchForm"
:tableParams=
"associationTableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"associationBeforeSearchFn
"
@
setTableFinishFun=
"setTableFinishFun"
>
<GLTable
ref=
"coupon"
:hasNum=
"false"
:getListApi=
"getListApi"
:searchForm=
"
searchForm"
:tableParams=
"associationTableParams"
:pageConf=
"pageConf
"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"association"
slot-scope=
"scope"
class=
"association"
>
<el-radio
:label=
"scope.scope.id"
v-model=
"
r
adio"
@
change
.
native=
"getCurrentRow()"
></el-radio>
<el-radio
:label=
"scope.scope.id"
v-model=
"
associationR
adio"
@
change
.
native=
"getCurrentRow()"
></el-radio>
</div>
</GLTable>
<!-- 表格区域 end -->
...
...
@@ -291,12 +291,10 @@ export default {
data
()
{
return
{
dialogTableVisible
:
false
,
r
adio
:
''
,
associationR
adio
:
''
,
templateSelection
:
[],
associationList
:
[],
relatedDiscountType
:
''
,
// associationUseChannel:'',
// associationShow: false,
// 关联优惠券表格
searchForm
:
{
couponName
:
''
,
...
...
@@ -304,7 +302,6 @@ export default {
status
:
2
,
discountTypes
:
[
2
,
3
,
4
]
},
associationTableSearchForm
:
{
status
:
2
,
directionalFlag
:
3
},
// 搜索
searchFormData
:
[
{
...
...
@@ -554,18 +551,15 @@ export default {
})
}
},
{
label
:
'业务类型'
,
name
:
'businessType'
,
addHtml
:
'businessType'
,
optionId
:
'confId'
,
optionLabel
:
'confName'
,
isDisabled
:
false
,
businessTypeList
:
[]
// handleRadioChange: val => {
// this.handleTypeChange(val)
// }
},
// {
// label: '业务类型',
// name: 'businessType',
// addHtml: 'businessType',
// optionId: 'confId',
// optionLabel: 'confName',
// isDisabled: false,
// businessTypeList: []
// },
{
label
:
'商品分类'
,
name
:
'classifyIdList'
,
...
...
@@ -832,17 +826,13 @@ export default {
},
// 关联优惠券radio
'editForm.relatedCouponId'
(
newValue
,
oldValue
)
{
if
(
newValue
)
{
this
.
radio
=
newValue
}
else
{
this
.
radio
=
newValue
}
this
.
associationRadio
=
newValue
}
},
created
()
{
this
.
routeInfo
=
this
.
$route
.
query
this
.
businessGetBusinessTypeById
()
//
this.businessGetBusinessTypeById()
},
mounted
()
{
...
...
@@ -862,15 +852,15 @@ export default {
},
methods
:
{
businessGetBusinessTypeById
()
{
this
.
$apis
.
proManage
.
getBusinessTypeByIdApi
({}).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
var
idx
=
this
.
externalFormList
[
0
].
editFormData
.
findIndex
(
subItem
=>
subItem
.
name
==
'businessType'
)
this
.
externalFormList
[
0
].
editFormData
[
idx
].
businessTypeList
=
res
})
},
//业务类型请求
// businessGetBusinessTypeById() {
// this.$apis.proManage.getBusinessTypeByIdApi({}).then(res => {
// console.log('res', res)
// var idx = this.externalFormList[0].editFormData.findIndex(subItem => subItem.name == 'businessType')
// this.externalFormList[0].editFormData[idx].businessTypeList = res
// })
// },
del
()
{
this
.
associationShow
=
false
this
.
editForm
.
relatedCouponId
=
''
this
.
editForm
.
relatedCouponName
=
''
this
.
editForm
.
relatedDiscountType
=
''
...
...
@@ -878,21 +868,22 @@ export default {
},
associationConfirm
()
{
this
.
dialogTableVisible
=
false
this
.
associationShow
=
true
this
.
editForm
.
relatedUseChannel
=
''
this
.
editForm
.
relatedCouponId
=
this
.
associationList
[
0
].
id
this
.
editForm
.
relatedCouponName
=
this
.
associationList
[
0
].
couponName
this
.
editForm
.
relatedDiscountType
=
this
.
associationBaseData
.
discountTypeList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
discountType
).
confName
if
(
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
useChannel
))
this
.
editForm
.
relatedUseChannel
=
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
useChannel
).
confName
if
(
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
useChannel
))
{
this
.
editForm
.
relatedUseChannel
=
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
this
.
associationList
[
0
].
useChannel
).
confName
}
},
associationCancel
()
{
this
.
r
adio
=
this
.
editForm
.
relatedCouponId
this
.
associationR
adio
=
this
.
editForm
.
relatedCouponId
this
.
dialogTableVisible
=
false
},
getCurrentRow
()
{
//获取选中数据
// this.radio
let
inx
=
this
.
templateSelection
.
findIndex
(
value
=>
value
.
id
==
this
.
r
adio
)
let
inx
=
this
.
templateSelection
.
findIndex
(
value
=>
value
.
id
==
this
.
associationR
adio
)
this
.
associationList
.
pop
()
this
.
associationList
.
push
(
this
.
templateSelection
[
inx
])
},
...
...
@@ -1231,7 +1222,7 @@ export default {
// 获取商品信息
getInfo
()
{
this
.
$apis
.
proManage
.
getProInfoApi
({
id
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
//
console.log('res', res)
this
.
editForm
=
{
...
res
,
goodsVideo
:
res
.
goodsVideo
||
''
,
...
...
@@ -1250,7 +1241,9 @@ export default {
this
.
editForm
.
relatedCouponId
=
res
.
relatedCoupon
.
id
this
.
editForm
.
relatedCouponName
=
res
.
relatedCoupon
.
couponName
this
.
editForm
.
relatedDiscountType
=
this
.
associationBaseData
.
discountTypeList
.
find
(
item
=>
item
.
confId
==
res
.
relatedCoupon
.
discountType
).
confName
this
.
editForm
.
relatedUseChannel
=
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
res
.
relatedCoupon
.
useChannel
).
confName
if
(
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
res
.
relatedCoupon
.
useChannel
))
{
this
.
editForm
.
relatedUseChannel
=
this
.
associationBaseData
.
useChannelList
.
find
(
item
=>
item
.
confId
==
res
.
relatedCoupon
.
useChannel
).
confName
}
}
// 是否需要安装
this
.
editForm
.
install
=
this
.
editForm
.
install
||
'Y'
...
...
@@ -1392,18 +1385,18 @@ export default {
params
.
id
=
this
.
routeInfo
.
id
}
// 业务类型
params
.
businessTypeList
=
params
.
businessType
if
(
!
params
.
businessTypeList
)
{
delete
params
.
businessTypeList
}
else
{
var
idx
=
this
.
externalFormList
[
0
].
editFormData
.
findIndex
(
subItem
=>
subItem
.
name
==
'businessType'
)
var
list
=
this
.
externalFormList
[
0
].
editFormData
[
idx
].
businessTypeList
params
.
businessTypeList
=
[]
this
.
editForm
.
businessType
.
forEach
(
item
=>
{
console
.
log
(
item
)
params
.
businessTypeList
.
push
(
list
.
find
(
k
=>
k
.
businessType
==
item
))
})
}
//
params.businessTypeList = params.businessType
//
if (!params.businessTypeList) {
//
delete params.businessTypeList
//
} else {
//
var idx = this.externalFormList[0].editFormData.findIndex(subItem => subItem.name == 'businessType')
//
var list = this.externalFormList[0].editFormData[idx].businessTypeList
//
params.businessTypeList = []
//
this.editForm.businessType.forEach(item => {
//
console.log(item)
//
params.businessTypeList.push(list.find(k => k.businessType == item))
//
})
//
}
// 描述
params
.
goodsDescList
=
[]
this
.
editForm
.
descImgList
.
forEach
(
item
=>
{
...
...
@@ -1492,14 +1485,6 @@ export default {
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
return
params
},
// 关联优惠券请求
associationBeforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
associationTableSearchForm
=
this
.
getParams
()
// delete this.tableSearchForm.createDate
resolve
()
})
},
setTableFinishFun
()
{
let
num
=
0
let
pageSize
=
Number
(
this
.
$refs
.
coupon
[
0
].
page
.
pageSize
)
...
...
@@ -1513,7 +1498,6 @@ export default {
// console.log('this.$refs.coupon',this.$refs.coupon[0])
//接收到的数据为空
this
.
templateSelection
=
this
.
$refs
.
coupon
[
0
].
data
// this.$refs.coupon[0].data.length ? (this.$refs.coupon[0].tableHeightValues = '') : this.$refs.coupon[0].setTableHeightFun()
},
handleSearch
()
{
this
.
$refs
.
coupon
[
0
].
refreshTable
()
...
...
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