Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-link
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 bb49c303
authored
Jul 21, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v3.13.3' into 'master'
V3.13.3 See merge request
!12
2 parents
3e0cad58
34288f7c
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
416 additions
and
1235 deletions
package-lock.json
package.json
src/mixins/draw.js
src/mixins/gift.js
src/setup/qiankun.js
src/store/modules/marketing.js
src/views/activityLink/components/AddGift.vue
src/views/activityLink/components/GPTAnalysis.vue
src/views/activityLink/components/MarketingContent.vue
src/views/activityLink/components/MarketingGift.vue
src/views/activityLink/components/MarketingTask.vue
src/views/activityLink/components/PhoneView.vue
src/views/activityLink/components/Process.vue
src/views/activityLink/components/Scene.vue
src/views/activityLink/components/SelectInsure.vue
src/views/activityLink/components/selectEquityDialog.vue
src/views/activityLink/editActivity.vue
package-lock.json
View file @
bb49c30
...
@@ -15,6 +15,11 @@
...
@@ -15,6 +15,11 @@
"js-message"
:
"1.0.7"
"js-message"
:
"1.0.7"
}
}
},
},
"@amap/amap-jsapi-loader"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz"
,
"integrity"
:
"sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw=="
},
"@ampproject/remapping"
:
{
"@ampproject/remapping"
:
{
"version"
:
"2.2.0"
,
"version"
:
"2.2.0"
,
"resolved"
:
"https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz"
,
...
@@ -1888,51 +1893,6 @@
...
@@ -1888,51 +1893,6 @@
"integrity"
:
"sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A=="
,
"integrity"
:
"sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A=="
,
"dev"
:
true
"dev"
:
true
},
},
"ansi-styles"
:
{
"version"
:
"4.3.0"
,
"resolved"
:
"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz"
,
"integrity"
:
"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-convert"
:
"^2.0.1"
}
},
"chalk"
:
{
"version"
:
"4.1.2"
,
"resolved"
:
"https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz"
,
"integrity"
:
"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-name"
:
"~1.1.4"
}
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
,
"integrity"
:
"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
,
"dev"
:
true
,
"optional"
:
true
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz"
,
"integrity"
:
"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
,
"dev"
:
true
,
"optional"
:
true
},
"ssri"
:
{
"ssri"
:
{
"version"
:
"8.0.1"
,
"version"
:
"8.0.1"
,
"resolved"
:
"https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz"
,
...
@@ -1941,28 +1901,6 @@
...
@@ -1941,28 +1901,6 @@
"requires"
:
{
"requires"
:
{
"minipass"
:
"^3.1.1"
"minipass"
:
"^3.1.1"
}
}
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"
,
"integrity"
:
"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
},
"vue-loader-v16"
:
{
"version"
:
"npm:vue-loader@16.8.3"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz"
,
"integrity"
:
"sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"loader-utils"
:
"^2.0.0"
}
}
}
}
}
},
},
...
@@ -6504,17 +6442,27 @@
...
@@ -6504,17 +6442,27 @@
}
}
},
},
"glsx-components"
:
{
"glsx-components"
:
{
"version"
:
"1.5.
2
"
,
"version"
:
"1.5.
7
"
,
"resolved"
:
"https://registry.npmjs.org/glsx-components/-/glsx-components-1.5.
2
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/glsx-components/-/glsx-components-1.5.
7
.tgz"
,
"integrity"
:
"sha512-
5/LaPu0B1uT7Kzl6oyIqyFT/NXIz2w7HNstiRtHaUQN1waSrPPPtzRRwywJg6CSSL+p994NaqPRnX696NAYzK
g=="
,
"integrity"
:
"sha512-
WEWt1Ev7uf8VgILrEr15ZHxOreqWEVEY2WRP5EmZKzYKTVF/7dQU/oI84+Xo4vSmlz7ltblaATyrwm1U1LDnH
g=="
,
"requires"
:
{
"requires"
:
{
"@amap/amap-jsapi-loader"
:
"^1.0.1"
,
"core-js"
:
"^3.6.5"
,
"core-js"
:
"^3.6.5"
,
"element-ui"
:
"^2.15.6"
,
"element-ui"
:
"^2.15.6"
,
"glsx-common"
:
"^1.4.9"
,
"glsx-common"
:
"^1.4.9"
,
"vue"
:
"^2.6.11"
,
"vue"
:
"^2.6.11"
,
"vue-amap"
:
"^0.5.10"
,
"vuedraggable"
:
"^2.24.3"
"vuedraggable"
:
"^2.24.3"
},
},
"dependencies"
:
{
"dependencies"
:
{
"axios"
:
{
"version"
:
"0.21.4"
,
"resolved"
:
"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz"
,
"integrity"
:
"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg=="
,
"requires"
:
{
"follow-redirects"
:
"^1.14.0"
}
},
"glsx-common"
:
{
"glsx-common"
:
{
"version"
:
"1.4.9"
,
"version"
:
"1.4.9"
,
"resolved"
:
"https://registry.npmjs.org/glsx-common/-/glsx-common-1.4.9.tgz"
,
"resolved"
:
"https://registry.npmjs.org/glsx-common/-/glsx-common-1.4.9.tgz"
,
...
@@ -6524,16 +6472,6 @@
...
@@ -6524,16 +6472,6 @@
"md5"
:
"^2.3.0"
,
"md5"
:
"^2.3.0"
,
"qs"
:
"^6.10.1"
,
"qs"
:
"^6.10.1"
,
"sha1"
:
"^1.1.1"
"sha1"
:
"^1.1.1"
},
"dependencies"
:
{
"axios"
:
{
"version"
:
"0.21.4"
,
"resolved"
:
"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz"
,
"integrity"
:
"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg=="
,
"requires"
:
{
"follow-redirects"
:
"^1.14.0"
}
}
}
}
}
}
}
}
...
@@ -13050,6 +12988,21 @@
...
@@ -13050,6 +12988,21 @@
"integrity"
:
"sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA=="
,
"integrity"
:
"sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA=="
,
"dev"
:
true
"dev"
:
true
},
},
"uppercamelcase"
:
{
"version"
:
"1.1.0"
,
"resolved"
:
"https://registry.npmjs.org/uppercamelcase/-/uppercamelcase-1.1.0.tgz"
,
"integrity"
:
"sha512-C7YEMvhgrvTEKEEVqA7LXNID/1TvvIwYZqNIKLquS6y/MGSkRQAav9LnTTILlC1RqUM8eTVBOe1U/fnB652PRA=="
,
"requires"
:
{
"camelcase"
:
"^1.2.1"
},
"dependencies"
:
{
"camelcase"
:
{
"version"
:
"1.2.1"
,
"resolved"
:
"https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz"
,
"integrity"
:
"sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g=="
}
}
},
"uri-js"
:
{
"uri-js"
:
{
"version"
:
"4.4.1"
,
"version"
:
"4.4.1"
,
"resolved"
:
"https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz"
,
...
@@ -13254,6 +13207,14 @@
...
@@ -13254,6 +13207,14 @@
"csstype"
:
"^3.1.0"
"csstype"
:
"^3.1.0"
}
}
},
},
"vue-amap"
:
{
"version"
:
"0.5.10"
,
"resolved"
:
"https://registry.npmjs.org/vue-amap/-/vue-amap-0.5.10.tgz"
,
"integrity"
:
"sha512-9ViNCev1vx32+zZ5RvF/TmUZNbwL9QrdA2/OnD2GlXMfQBkJy7D08Vb7379t6guqnopDPtWJ8K6gg72h9+4GUg=="
,
"requires"
:
{
"uppercamelcase"
:
"^1.1.0"
}
},
"vue-cli-plugin-element"
:
{
"vue-cli-plugin-element"
:
{
"version"
:
"1.0.1"
,
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmjs.org/vue-cli-plugin-element/-/vue-cli-plugin-element-1.0.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/vue-cli-plugin-element/-/vue-cli-plugin-element-1.0.1.tgz"
,
...
@@ -13334,6 +13295,75 @@
...
@@ -13334,6 +13295,75 @@
}
}
}
}
},
},
"vue-loader-v16"
:
{
"version"
:
"npm:vue-loader@16.8.3"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz"
,
"integrity"
:
"sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"loader-utils"
:
"^2.0.0"
},
"dependencies"
:
{
"ansi-styles"
:
{
"version"
:
"4.3.0"
,
"resolved"
:
"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz"
,
"integrity"
:
"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-convert"
:
"^2.0.1"
}
},
"chalk"
:
{
"version"
:
"4.1.2"
,
"resolved"
:
"https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz"
,
"integrity"
:
"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-name"
:
"~1.1.4"
}
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
,
"integrity"
:
"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
,
"dev"
:
true
,
"optional"
:
true
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz"
,
"integrity"
:
"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
,
"dev"
:
true
,
"optional"
:
true
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"
,
"integrity"
:
"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
}
}
},
"vue-router"
:
{
"vue-router"
:
{
"version"
:
"3.6.5"
,
"version"
:
"3.6.5"
,
"resolved"
:
"https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz"
,
"resolved"
:
"https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz"
,
...
...
package.json
View file @
bb49c30
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
"el-tree-transfer"
:
"^2.2.6"
,
"el-tree-transfer"
:
"^2.2.6"
,
"element-ui"
:
"^2.4.5"
,
"element-ui"
:
"^2.4.5"
,
"glsx-common"
:
"^2.0.4"
,
"glsx-common"
:
"^2.0.4"
,
"glsx-components"
:
"^1.
2.5
"
,
"glsx-components"
:
"^1.
5.7
"
,
"vod-js-sdk-v6"
:
"^1.5.0"
,
"vod-js-sdk-v6"
:
"^1.5.0"
,
"vue"
:
"^2.6.10"
,
"vue"
:
"^2.6.10"
,
"vue-router"
:
"^3.1.3"
,
"vue-router"
:
"^3.1.3"
,
...
...
src/mixins/draw.js
View file @
bb49c30
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-19 13:46:20
* @Date: 2023-05-19 13:46:20
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-
14 21:38:37
* @LastEditTime: 2023-07-
20 17:40:13
* @FilePath: \scrm-micro-home\src\mixins\gpt.js
* @FilePath: \scrm-micro-home\src\mixins\gpt.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -32,12 +32,12 @@ export default {
...
@@ -32,12 +32,12 @@ export default {
async
createBig
(
info
,
logoInfo
,
titleStyle
,
subTitleStyle
)
{
async
createBig
(
info
,
logoInfo
,
titleStyle
,
subTitleStyle
)
{
console
.
log
(
info
)
console
.
log
(
info
)
this
.
loading
=
true
this
.
loading
=
true
const
{
backgroundImage
,
detailImage
,
merchantLog
,
marketingTitle
,
marketingSubtitle
}
=
info
const
{
backgroundImage
,
merchantLogo
,
marketingTitle
,
marketingSubtitle
}
=
info
if
(
!
backgroundImage
)
return
if
(
!
backgroundImage
)
return
try
{
try
{
const
res
=
await
Promise
.
all
([
this
.
getImgInfo
(
backgroundImage
),
this
.
getImgInfo
(
detailImage
),
this
.
getImgInfo
(
merchantLog
)])
const
res
=
await
Promise
.
all
([
this
.
getImgInfo
(
backgroundImage
),
this
.
getImgInfo
(
merchantLogo
)])
const
h
=
(
res
[
0
].
dh
/
res
[
0
].
dw
)
*
WIDTH
+
(
res
[
1
].
dh
/
res
[
1
].
dw
)
*
WIDTH
const
h
=
(
res
[
0
].
dh
/
res
[
0
].
dw
)
*
WIDTH
this
.
logoInfo
=
{
url
:
merchantLog
,
...
logoInfo
}
this
.
logoInfo
=
{
url
:
merchantLog
o
,
...
logoInfo
}
const
drawfun
=
new
Drawing
(
document
.
getElementById
(
'canvasId'
),
{
const
drawfun
=
new
Drawing
(
document
.
getElementById
(
'canvasId'
),
{
width
:
WIDTH
,
width
:
WIDTH
,
height
:
h
height
:
h
...
@@ -48,17 +48,12 @@ export default {
...
@@ -48,17 +48,12 @@ export default {
x
:
0
,
x
:
0
,
y
:
0
,
y
:
0
,
width
:
WIDTH
,
width
:
WIDTH
,
height
:
(
res
[
0
].
dh
/
res
[
0
].
dw
)
*
WIDTH
height
:
h
},
}
{
]
url
:
detailImage
,
if
(
info
.
merchantLogo
)
{
x
:
0
,
imageList
.
push
({
...
logoInfo
,
url
:
info
.
merchantLogo
})
y
:
(
res
[
0
].
dh
/
res
[
0
].
dw
)
*
WIDTH
,
}
width
:
WIDTH
,
height
:
(
res
[
1
].
dh
/
res
[
1
].
dw
)
*
WIDTH
},
{
...
this
.
logoInfo
}
].
filter
(
item
=>
item
.
url
)
const
styles
=
[
titleStyle
,
subTitleStyle
]
const
styles
=
[
titleStyle
,
subTitleStyle
]
for
(
const
style
of
styles
)
{
for
(
const
style
of
styles
)
{
style
.
x
=
parseInt
(
style
.
x
*
RATIO
)
style
.
x
=
parseInt
(
style
.
x
*
RATIO
)
...
@@ -92,7 +87,7 @@ export default {
...
@@ -92,7 +87,7 @@ export default {
})
})
})
})
}
}
console
.
log
(
title
,
textList
)
console
.
log
(
imageList
,
'imageList'
)
const
canvasBase64
=
await
drawfun
.
begin
({
const
canvasBase64
=
await
drawfun
.
begin
({
imageList
,
imageList
,
textList
textList
...
@@ -104,22 +99,25 @@ export default {
...
@@ -104,22 +99,25 @@ export default {
console
.
log
(
e
)
console
.
log
(
e
)
}
}
},
},
async
createMain
(
h
,
url
,
draggableList
)
{
async
createMain
(
info
,
draggableList
)
{
const
style1
=
draggableList
[
0
]
const
style1
=
draggableList
[
0
]
const
style2
=
draggableList
[
1
]
const
style2
=
draggableList
[
1
]
const
drawfun
=
new
Drawing
(
document
.
getElementById
(
'canvasId'
),
{
const
drawfun
=
new
Drawing
(
document
.
getElementById
(
'canvasId'
),
{
width
:
WIDTH
,
width
:
WIDTH
,
height
:
h
height
:
info
.
backgroundHeight
})
})
const
imageList
=
[
const
imageList
=
[
{
{
url
,
url
:
info
.
backgroundImage
,
x
:
0
,
x
:
0
,
y
:
0
,
y
:
0
,
width
:
WIDTH
,
width
:
WIDTH
,
height
:
h
height
:
info
.
backgroundHeight
}
}
]
]
if
(
info
.
merchantLogo
)
{
imageList
.
push
({
...
info
.
logoInfo
,
url
:
info
.
merchantLogo
})
}
const
textList
=
[
const
textList
=
[
{
x
:
style1
.
x
,
y
:
style1
.
y
,
fontSize
:
style1
.
size
,
width
:
style1
.
width
,
text
:
style1
.
content
,
color
:
style1
.
color
,
font
:
style1
.
font
},
{
x
:
style1
.
x
,
y
:
style1
.
y
,
fontSize
:
style1
.
size
,
width
:
style1
.
width
,
text
:
style1
.
content
,
color
:
style1
.
color
,
font
:
style1
.
font
},
{
x
:
style2
.
x
,
y
:
style2
.
y
,
fontSize
:
style2
.
size
,
width
:
style2
.
width
,
text
:
style2
.
content
,
color
:
style2
.
color
,
font
:
style2
.
font
}
{
x
:
style2
.
x
,
y
:
style2
.
y
,
fontSize
:
style2
.
size
,
width
:
style2
.
width
,
text
:
style2
.
content
,
color
:
style2
.
color
,
font
:
style2
.
font
}
...
...
src/mixins/gift.js
View file @
bb49c30
...
@@ -21,6 +21,8 @@ export default {
...
@@ -21,6 +21,8 @@ export default {
listName
:
'list'
,
listName
:
'list'
,
// 行数据的key
// 行数据的key
mutiSelectUniqueKey
:
'packageCode'
,
mutiSelectUniqueKey
:
'packageCode'
,
checkSelectKey
:
'packageCode'
,
checkSelectVal
:
''
,
// 多选ref的名称
// 多选ref的名称
mutiSelectName
:
'list'
,
mutiSelectName
:
'list'
,
tableColumns
:
[
tableColumns
:
[
...
@@ -42,6 +44,9 @@ export default {
...
@@ -42,6 +44,9 @@ export default {
listName
:
'list'
,
listName
:
'list'
,
// 行数据的key
// 行数据的key
mutiSelectUniqueKey
:
'packageCode'
,
mutiSelectUniqueKey
:
'packageCode'
,
checkSelectKey
:
'id'
,
checkSelectVal
:
''
,
checkSelectable
:
null
,
// 多选ref的名称
// 多选ref的名称
mutiSelectName
:
'list'
,
mutiSelectName
:
'list'
,
tableColumns
:
[
tableColumns
:
[
...
@@ -81,7 +86,7 @@ export default {
...
@@ -81,7 +86,7 @@ export default {
goodsTableParams
:
{
goodsTableParams
:
{
listName
:
'list'
,
listName
:
'list'
,
// 行数据的key
// 行数据的key
mutiSelectUniqueKey
:
'
packageCode
'
,
mutiSelectUniqueKey
:
'
id
'
,
// 多选ref的名称
// 多选ref的名称
mutiSelectName
:
'list'
,
mutiSelectName
:
'list'
,
tableColumns
:
[
tableColumns
:
[
...
...
src/setup/qiankun.js
View file @
bb49c30
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 09:23:57
* @Date: 2022-12-13 09:23:57
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-1
3 20:56:0
7
* @LastEditTime: 2023-07-1
9 17:32:1
7
* @FilePath: \scrm-micro-link\src\setup\qiankun.js
* @FilePath: \scrm-micro-link\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -20,13 +20,14 @@ let instance = null
...
@@ -20,13 +20,14 @@ let instance = null
Vue
.
use
(
ElementUI
)
Vue
.
use
(
ElementUI
)
Vue
.
use
(
GLTable
)
Vue
.
use
(
GLTable
)
export
async
function
bootstrap
({
history
,
common
,
messenger
,
globalState
})
{
export
async
function
bootstrap
({
history
,
common
,
messenger
,
globalState
})
{
const
{
response
,
request
,
sign
,
secret
,
sign_common
,
request_common
,
request_gpt
,
request_merchant
}
=
await
fetchConfig
(
common
)
const
{
response
,
request
,
sign
,
secret
,
sign_common
,
request_common
,
request_gpt
,
request_merchant
,
messageModel
}
=
await
fetchConfig
(
common
)
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$globalState
=
globalState
Vue
.
prototype
.
$globalState
=
globalState
Vue
.
prototype
.
$common
=
common
Vue
.
prototype
.
$common
=
common
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
$messageBox
=
messageBox
Vue
.
prototype
.
$messageBox
=
messageBox
Vue
.
prototype
.
$messageModel
=
messageModel
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_merchant
=
new
common
.
Http
({
response
,
request
:
request_merchant
,
sign
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_merchant
=
new
common
.
Http
({
response
,
request
:
request_merchant
,
sign
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
signWay
:
'md5'
,
request
:
request_common
,
sign
:
sign_common
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
signWay
:
'md5'
,
request
:
request_common
,
sign
:
sign_common
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
...
...
src/store/modules/marketing.js
View file @
bb49c30
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 17:13:33
* @Date: 2023-05-16 17:13:33
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-
17 15:39:18
* @LastEditTime: 2023-07-
20 15:58:33
* @FilePath: \scrm-micro-home\src\store\modules\marketing.js
* @FilePath: \scrm-micro-home\src\store\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
import
apis
from
'@/api'
import
apis
from
'@/api'
const
subscribeData
=
{
5
:
'
保险
'
,
2
:
'定保'
,
9
:
'售后众筹'
}
const
subscribeData
=
{
5
:
'
续保
'
,
2
:
'定保'
,
9
:
'售后众筹'
}
export
default
{
export
default
{
namespaced
:
true
,
namespaced
:
true
,
...
@@ -46,10 +46,6 @@ export default {
...
@@ -46,10 +46,6 @@ export default {
},
},
// 设置活动信息
// 设置活动信息
SET_ACTIVITY_INFO
(
state
,
data
)
{
SET_ACTIVITY_INFO
(
state
,
data
)
{
if
(
data
.
activityBigImg
)
{
data
.
backgroundImage
=
data
.
activityBigImg
data
.
merchantAddress
=
data
.
activityAddressDetailName
}
state
.
activityInfo
=
Object
.
assign
({},
data
)
state
.
activityInfo
=
Object
.
assign
({},
data
)
},
},
SET_KET_WORDs
(
state
,
data
)
{
SET_KET_WORDs
(
state
,
data
)
{
...
@@ -87,12 +83,8 @@ export default {
...
@@ -87,12 +83,8 @@ export default {
},
},
getTemplateInfo
({
state
},
data
)
{
getTemplateInfo
({
state
},
data
)
{
apis
.
marketing
.
calendarDetail
({
id
:
data
}).
then
(
res
=>
{
apis
.
marketing
.
calendarDetail
({
id
:
data
}).
then
(
res
=>
{
const
{
title
,
subTitle
,
startTime
,
endTime
,
backgroundImg
,
captionImg
,
codeId
,
couponItemList
=
[],
subTitleStyle
,
titleStyle
}
=
res
||
{}
const
{
title
,
subTitle
,
startTime
,
endTime
,
backgroundImg
,
captionImg
,
codeId
,
subTitleStyle
,
titleStyle
}
=
res
||
{}
if
(
couponItemList
&&
couponItemList
.
length
)
state
.
activityInfo
=
Object
.
assign
({},
{
titleStyle
,
subTitleStyle
,
codeId
,
marketingTitle
:
title
,
marketingSubtitle
:
subTitle
,
backgroundImage
:
backgroundImg
,
detailImage
:
captionImg
,
couponItemList
:
true
,
activityTime
:
[
startTime
+
' 00:00:00'
,
endTime
+
' 00:00:00'
]
})
couponItemList
.
forEach
(
item
=>
{
item
.
id
=
item
.
couponId
})
state
.
activityInfo
=
Object
.
assign
({},
{
titleStyle
,
subTitleStyle
,
codeId
,
marketingTitle
:
title
,
marketingSubtitle
:
subTitle
,
backgroundImage
:
backgroundImg
,
detailImage
:
captionImg
,
couponItemList
,
activityTime
:
[
startTime
+
' 00:00:00'
,
endTime
+
' 00:00:00'
]
})
})
})
},
},
//活动模板详情
//活动模板详情
...
...
src/views/activityLink/components/AddGift.vue
View file @
bb49c30
...
@@ -184,7 +184,7 @@ export default {
...
@@ -184,7 +184,7 @@ export default {
//用车权益
//用车权益
getCarList
()
{
getCarList
()
{
var
params
=
{
var
params
=
{
...
this
.
searchForm
,
isChecked
:
1
,
merchantId
:
this
.
merchantId
merchantId
:
this
.
merchantId
}
}
this
.
loading
=
true
this
.
loading
=
true
...
...
src/views/activityLink/components/GPTAnalysis.vue
deleted
100644 → 0
View file @
3e0cad5
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 10:23:52
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-06-29 14:58:15
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\GPTAnalysis.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<div>
<div
class=
"main-box"
v-loading=
"loading"
>
<div
class=
"main-title"
>
本次营销模型解析
</div>
<div
class=
"inport-result"
v-if=
"importNum"
>
本次导入客户解析:客户数:
<span>
{{
importNum
}}
人
</span>
正在匹配中…
<span>
重新导入
<input
type=
"file"
style=
"opacity: 0"
ref=
"file"
accept=
"*"
@
change=
"uploadFile"
/>
</span>
</div>
<div
class=
"inport-result"
v-else
>
待导入客户数据后解析
<span>
导入
<input
type=
"file"
style=
"opacity: 0"
ref=
"file"
accept=
"*"
@
change=
"uploadFile"
/>
</span>
</div>
<glsx-combi-form
class=
"edit-form-container"
:isBlock=
"true"
ref=
"editFormRef"
formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<div
slot=
"marketingTitle"
class=
"input-slot"
>
<el-input
placeholder=
"请输入营销主题"
v-model=
"editForm.marketingTitle"
style=
"width:400px"
maxlength=
"12"
show-word-limit
></el-input>
<label
@
click=
"getGPTitle(1)"
v-if=
"GPTList"
>
ChatGPT重新生成
</label>
<label
v-else
class=
"disabled-label"
>
ChatGPT重新生成
</label>
</div>
<div
slot=
"marketingSubtitle"
class=
"input-slot"
>
<el-input
placeholder=
"请输入副主题"
v-model=
"editForm.marketingSubtitle"
style=
"width:400px"
maxlength=
"20"
show-word-limit
></el-input>
<label
@
click=
"getGPTitle(2)"
v-if=
"GPTList"
>
ChatGPT重新生成
</label>
<label
v-else
class=
"disabled-label"
>
ChatGPT重新生成
</label>
</div>
<template
slot=
"activityTimeHtml"
>
<div
class=
"activity-time-container"
>
<el-date-picker
v-model=
"editForm.activityTime"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy/MM/dd HH:mm:ss"
:default-time=
"['00:00:00', '23:59:59']"
@
change=
"e => handleTimeChange(e, scope.scope)"
></el-date-picker>
</div>
</
template
>
<div
slot=
"selectGiftBtn"
>
<el-button
type=
"default"
class=
"el-icon-plus"
@
click=
"handleGiftAdd"
>
选择服务
</el-button>
</div>
<div
class=
"gift-panel"
slot=
"superMarketingCouponRelRequestListBlock"
style=
"width: 700px"
:style=
"{ 'margin-left': defaultLabelWidth }"
v-show=
"editForm.superMarketingCouponRelRequestList && editForm.superMarketingCouponRelRequestList.length != 0"
>
<div
class=
"gift-block"
>
<div
v-for=
"(item, index) in orderShow"
:key=
"index"
>
<div
class=
"gift-box"
v-show=
"couponObj[item].list.length"
>
<!-- <div class="gift-label">{{ couponObj[item].label }}:</div> -->
<img
class=
"server-type"
:src=
"require(`@/assets/coupon/icon-${item}.png`)"
/>
<div
class=
"gift-content"
>
<div
class=
"gift-item"
v-for=
"(subItem, subIndex) in couponObj[item].list"
:key=
"subIndex"
>
<span
:class=
"['circle', subItem.status == '3' ? ' grey' : '']"
></span>
<p
:class=
"['gift-coupon-name', subItem.status == '3' ? ' txt-grey' : '']"
>
{{ subItem.couponName }} × {{ subItem.couponAmount }}
</p>
<p
v-show=
"subItem.status == '3'"
class=
"gift-tips"
>
已失效
</p>
<i
class=
"el-icon-delete"
style=
"color: #c6c6c6"
@
click=
"handleGiftDelete(item, subIndex)"
></i>
</div>
</div>
</div>
</div>
</div>
</div>
<div
slot=
"selectGoodsBtn"
>
<div
class=
"play-panel"
>
<div
class=
"card-panel"
>
<el-tabs
type=
"card"
v-model=
"editForm.couponTemplateId"
@
tab-click=
"changeCouponTemplate"
>
<el-tab-pane
:label=
"item.name"
:name=
"item.id"
v-for=
"item in couponTemplateList"
:key=
"item.id"
></el-tab-pane>
</el-tabs>
<div
class=
"chose-panel"
v-loading=
"goodsLoading"
>
<el-button
type=
"default"
class=
"el-icon-plus select-btn"
@
click=
"handleGoodsAdd"
>
选择福利券
</el-button>
<div
style=
"width: 40vw"
v-if=
"selectedGoodsList && selectedGoodsList.length"
>
<div
class=
"goods-panel"
>
<el-table
:data=
"selectedGoodsList"
border
style=
"width: 100%;overflow:auto"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"70"
></el-table-column>
<el-table-column
prop=
"brandName"
label=
"品牌"
></el-table-column>
<el-table-column
prop=
"goodsName"
label=
"商户名称"
></el-table-column>
<el-table-column
prop=
"couponAmount"
label=
"数量"
></el-table-column>
<el-table-column
prop=
"denomination"
label=
"劵面额"
>
<
template
slot-scope=
"scope"
>
{{
(
scope
.
row
.
denomination
/
100
).
toFixed
(
2
)
}}
元
</
template
>
</el-table-column>
<el-table-column
prop=
"effectiveDays"
label=
"有效期"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
effectiveDays
}}
天
</
template
>
</el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
status
==
1
?
'未生效'
:
scope
.
row
.
status
==
2
?
'生效中'
:
scope
.
row
.
status
==
3
?
'已失效'
:
''
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"handleDeleteGoods(scope.row)"
type=
"text"
size=
"small"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
</div>
</div>
</div>
</div>
<div
slot=
"selectEquityBtn"
>
<el-button
type=
"default"
class=
"el-icon-plus"
@
click=
"handleEquityAdd"
>
选择服务
</el-button>
</div>
<div
class=
"gift-panel"
slot=
"equityListBlock"
style=
"width: 700px"
:style=
"{ 'margin-left': defaultLabelWidth }"
v-show=
"selectedEquityList.length"
>
<div
class=
"gift-block"
>
<div
class=
"gift-title"
>
本次权益服务选择共
<span
class=
"price"
>
{{ selectedEquityList.length }}
</span>
项
</div>
<div
class=
"gift-box"
v-show=
"selectedEquityList.length"
>
<!-- <div class="gift-label">{{ couponObj[item].label }}:</div> -->
<img
class=
"server-type"
:src=
"require(`@/assets/coupon/equity.png`)"
/>
<div
class=
"gift-content"
>
<div
class=
"gift-item"
v-for=
"(subItem, subIndex) in selectedEquityList"
:key=
"subIndex"
>
<span
class=
"circle"
></span>
<p
:class=
"['gift-coupon-name']"
>
{{ subitem.packageName }}
</p>
<i
class=
"el-icon-delete"
style=
"color: #c6c6c6"
@
click=
"handleEquityDelete(subIndex)"
></i>
</div>
</div>
</div>
</div>
</div>
</glsx-combi-form>
</div>
<GLFooter>
<el-button
@
click=
"handleCancel"
size=
"medium"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm"
size=
"medium"
>
保存方案
</el-button>
</GLFooter>
<select-emp-dialog
v-if=
"isSelectEmpVisible"
:isSelectEmpVisible=
"isSelectEmpVisible"
:importNum=
"importNum"
@
handleEmpConfirm=
"handleEmpConfirm"
></select-emp-dialog>
<select-gift-dialog
v-if=
"isSelectGiftVisible"
:isSelectGiftVisible=
"isSelectGiftVisible"
:selectedGiftList=
"selectedMealList"
@
handleGiftConfirm=
"handleGiftConfirm"
@
handleGiftClose=
"handleGiftClose"
></select-gift-dialog>
<select-goods-dialog
v-if=
"isSelectGoodsVisible"
:isSelectGoodsVisible=
"isSelectGoodsVisible"
:selectedGoodsLists=
"selectedGoodsList"
@
handleGoodsConfirm=
"handleGoodsConfirm"
@
handleGoodsClose=
"handleGoodsClose"
></select-goods-dialog>
<select-equity-dialog
v-if=
"isSelectEquityVisible"
:isSelectEquityVisible=
"isSelectEquityVisible"
:selectedEquityLists=
"selectedEquityList"
@
handleEquityConfirm=
"handleEquityConfirm"
@
handleEquityClose=
"handleEquityClose"
></select-equity-dialog>
</div>
</template>
<
script
>
const
couponObj
=
{
// 折扣券
discount
:
{
label
:
'折扣券'
,
discountType
:
2
,
list
:
[],
logo
:
require
(
'@/assets/coupon/icon-discount.png'
)
},
// 代金券
cash
:
{
label
:
'代金券'
,
discountType
:
3
,
list
:
[],
logo
:
require
(
'@/assets/coupon/icon-cash.png'
)
},
// 兑换券
exchange
:
{
label
:
'兑换券'
,
discountType
:
4
,
list
:
[],
logo
:
require
(
'@/assets/coupon/icon-exchange.png'
)
},
// 会员服务
service
:
{
label
:
'会员服务'
,
discountType
:
7
,
list
:
[],
logo
:
require
(
'@/assets/coupon/icon-service.png'
)
}
}
const
goodsObj
=
{
// 卡券
card
:
{
label
:
'卡券'
,
appearance
:
1
,
list
:
[]
},
// 直充
recharge
:
{
label
:
'直充'
,
appearance
:
2
,
list
:
[]
}
}
const
numToCoupon
=
{
2
:
'discount'
,
3
:
'cash'
,
4
:
'exchange'
,
7
:
'service'
}
const
numToGoods
=
{
1
:
'card'
,
2
:
'recharge'
}
const
orderShow
=
[
'service'
,
'cash'
,
'discount'
,
'exchange'
]
import
selectGiftDialog
from
'./selectGiftDialog'
import
selectGoodsDialog
from
'./selectGoodsDialog'
import
selectEquityDialog
from
'./selectEquityDialog'
import
selectEmpDialog
from
'./selectEquityDialog'
import
getUploadImgColor
from
'@/utils/color'
import
{
mapState
,
mapActions
,
mapMutations
}
from
'vuex'
import
gpt
from
'@/mixins/gpt'
import
draw
from
'@/mixins/draw'
import
util
from
'@/utils/index'
export
default
{
mixins
:
[
gpt
,
draw
],
name
:
'analysis'
,
data
()
{
return
{
editChildRef
:
'editChildRef'
,
logoInfo
:
''
,
importNum
:
0
,
couponTemplateList
:
[],
orderShow
,
choseItemList
:
[],
selectedMealList
:
[],
selectedGoodsList
:
[],
selectedEquityList
:
[],
goodsLoading
:
false
,
loading
:
false
,
couponObj
:
JSON
.
parse
(
JSON
.
stringify
(
couponObj
)),
goodsObj
:
JSON
.
parse
(
JSON
.
stringify
(
goodsObj
)),
numToCoupon
,
numToGoods
,
isSelectGiftVisible
:
false
,
isSelectGoodsVisible
:
false
,
isSelectEquityVisible
:
false
,
isSelectEmpVisible
:
false
,
editForm
:
{
marketingTitle
:
''
,
marketingSubtitle
:
''
,
activityTime
:
[],
superMarketingCouponRelRequestList
:
[],
backgroundImage
:
''
,
detailImage
:
''
,
merchantLog
:
''
},
editFormData
:
[
{
label
:
'营销标题'
,
name
:
'marketingTitle'
,
addHtml
:
'marketingTitle'
,
type
:
'input'
,
maxlength
:
12
},
{
label
:
'营销副标题'
,
name
:
'marketingSubtitle'
,
addHtml
:
'marketingSubtitle'
,
type
:
'input'
,
maxlength
:
20
},
{
label
:
'活动时间'
,
name
:
'activityTime'
,
addHtml
:
'activityTimeHtml'
,
isHide
:
false
},
{
label
:
'主题背景图'
,
name
:
'backgroundImage'
,
type
:
'upload'
,
width
:
'320px'
,
mark
:
'建议尺寸:最大5M,宽度750px,长度≤600px'
,
style
:
'color: #999999;'
,
limitSize
:
5
,
maxPhotoNum
:
1
,
suffixSlot
:
'backgroundImage'
,
handleUpload
:
(
e
,
file
,
targetItem
)
=>
{
const
imgFile
=
e
.
target
.
result
const
base64
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
this
.
loading
=
true
this
.
$apis
.
common
.
pictureUpload
({
file
:
base64
,
fileType
:
'image'
})
.
then
(
res
=>
{
this
.
editForm
[
targetItem
.
name
]
=
res
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validateField
(
targetItem
.
name
)
})
.
finally
(()
=>
{
this
.
loading
=
false
})
}
},
{
label
:
'内容图'
,
name
:
'detailImage'
,
type
:
'upload'
,
width
:
'320px'
,
mark
:
'建议尺寸:最大10M,宽度750px,长度不限'
,
style
:
'color: #999999;'
,
limitSize
:
5
,
maxPhotoNum
:
1
,
suffixSlot
:
'detailImage'
,
handleUpload
:
(
e
,
file
,
targetItem
)
=>
{
const
imgFile
=
e
.
target
.
result
const
base64
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
this
.
loading
=
true
this
.
$apis
.
common
.
pictureUpload
({
file
:
base64
,
fileType
:
'image'
})
.
then
(
res
=>
{
this
.
editForm
[
targetItem
.
name
]
=
res
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validateField
(
targetItem
.
name
)
})
.
finally
(()
=>
{
this
.
loading
=
false
})
}
},
{
label
:
'权益服务'
,
name
:
'equityList'
,
addHtml
:
'selectEquityBtn'
,
isHide
:
true
},
{
label
:
''
,
name
:
'equityListBlock'
,
addHtml
:
'equityListBlock'
,
isHide
:
true
},
{
label
:
'平台优惠'
,
name
:
'goodsList'
,
addHtml
:
'selectGoodsBtn'
},
{
label
:
'门店优惠券'
,
name
:
'superMarketingCouponRelRequestList'
,
addHtml
:
'selectGiftBtn'
},
{
label
:
''
,
name
:
'superMarketingCouponRelRequestListBlock'
,
addHtml
:
'superMarketingCouponRelRequestListBlock'
},
{
label
:
'活动参与价格/元'
,
name
:
'activityPrice'
,
type
:
'input'
},
{
label
:
'库存'
,
name
:
'goodsStock'
,
type
:
'InputNumber'
,
min
:
0
},
{
label
:
'门店名称'
,
name
:
'merchantname'
,
type
:
'input'
},
{
label
:
'门店地址'
,
name
:
'merchantAddress'
,
type
:
'map'
,
isReadonly
:
false
,
provinceView
:
false
,
attrObj
:
{
provinceName
:
'activityAddressProvinceName'
,
provinceCode
:
'activityAddressProvinceCode'
,
cityName
:
'activityAddressCityName'
,
cityCode
:
'activityAddressCityCode'
,
lat
:
'activityAddressLat'
,
lng
:
'activityAddressLng'
,
fullAddress
:
'merchantAddress'
}
},
{
label
:
'服务热线'
,
name
:
'serviceHotline'
,
type
:
'input'
},
{
label
:
'门店Logo'
,
name
:
'merchantLog'
,
type
:
'upload'
,
width
:
'320px'
,
mark
:
'建议尺寸:最大1M,尺寸216*60'
,
style
:
'color: #999999;'
,
limitSize
:
5
,
maxPhotoNum
:
1
,
suffixSlot
:
'merchantLog'
,
handleUpload
:
(
e
,
file
,
targetItem
)
=>
{
const
imgFile
=
e
.
target
.
result
const
base64
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
this
.
loading
=
true
this
.
$apis
.
common
.
pictureUpload
({
file
:
base64
,
fileType
:
'image'
})
.
then
(
res
=>
{
this
.
editForm
[
targetItem
.
name
]
=
res
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validateField
(
targetItem
.
name
)
})
.
finally
(()
=>
{
this
.
loading
=
false
})
}
}
],
editRule
:
{
marketingTitle
:
[{
required
:
true
,
message
:
'请输入营销标题'
,
trigger
:
'input'
}],
marketingSubtitle
:
[{
required
:
true
,
message
:
'请输入营销副标题'
,
trigger
:
'input'
}],
activityTime
:
[{
required
:
true
,
message
:
'请选择活动时间'
,
trigger
:
'input'
}],
backgroundImage
:
[{
required
:
true
,
message
:
'请选择主题背景图'
,
trigger
:
'change'
}],
detailImage
:
[{
required
:
true
,
message
:
'请选择内容图'
,
trigger
:
'change'
}],
activityPrice
:
[{
required
:
true
,
message
:
'请输入活动参与价格/元:'
,
trigger
:
'input'
}],
goodsStock
:
[{
required
:
true
,
message
:
'请输入库存'
,
trigger
:
'input'
}],
merchantname
:
[{
required
:
true
,
message
:
'请输入门店名称'
,
trigger
:
'input'
}],
merchantAddress
:
[{
required
:
true
,
message
:
'请选择门店地址'
,
trigger
:
'input'
}],
serviceHotline
:
[{
required
:
true
,
message
:
'请输入服务热线'
,
trigger
:
'input'
}]
}
}
},
componentsName
:
'analysis'
,
computed
:
{
...
mapState
(
'marketing'
,
[
'activityInfo'
,
'GPTList'
,
'merchantInfo'
,
'keywords'
]),
mergeStr
()
{
const
{
backgroundImage
,
detailImage
,
merchantLog
,
mainColor
,
logoInfo
,
marketingTitle
,
marketingSubtitle
,
templateId
}
=
this
.
editForm
return
[
backgroundImage
,
detailImage
,
merchantLog
,
mainColor
,
logoInfo
,
marketingTitle
,
marketingSubtitle
,
templateId
]
}
},
watch
:
{
activityInfo
(
val
)
{
val
&&
this
.
confirmMsg
(
val
)
},
mergeStr
(
val
)
{
console
.
log
(
val
,
999999999999
)
this
.
setMergeImg
(
val
)
},
merchantInfo
()
{
Object
.
assign
(
this
.
editForm
,
{
merchantname
:
this
.
merchantInfo
.
merchantName
,
merchantAddress
:
this
.
merchantInfo
.
merchantAddress
,
merchantId
:
this
.
merchantInfo
.
merchantNo
})
},
'editForm.activityPrice'
(
newValue
,
oldValue
)
{
this
.
editForm
.
activityPrice
=
util
.
limitPrice
(
newValue
,
oldValue
,
6
,
2
,
0
)
},
'editForm.detailImage'
(
newValue
,
oldValue
)
{
getUploadImgColor
(
newValue
,
color
=>
{
this
.
editForm
.
mainColor
=
color
})
}
},
components
:
{
selectGiftDialog
,
selectGoodsDialog
,
selectEquityDialog
,
selectEmpDialog
},
methods
:
{
...
mapActions
(
'marketing'
,
[
'setActivityInfo'
,
'setSchemeListData'
,
'setMergeImg'
]),
...
mapMutations
(
'marketing'
,
[
'SET_GPT_LIST'
,
'SET_COVER'
]),
//获取优惠券模板
couponTemplate
()
{
this
.
$apis
.
giftBag
.
couponTemplate
({
pageSize
:
10000
,
pageNum
:
1
}).
then
(
res
=>
{
this
.
couponTemplateList
=
res
.
list
||
[]
})
},
uploadFile
(
e
)
{
const
file
=
e
.
srcElement
.
files
[
0
]
let
AllImgExt
=
'.xls|.xlsx'
//文件格式判断
let
extName
=
file
.
name
.
substring
(
file
.
name
.
lastIndexOf
(
'.'
)).
toLowerCase
()
if
(
AllImgExt
.
indexOf
(
extName
)
===
-
1
)
{
this
.
$message
.
error
(
'上传格式不正确'
)
return
false
}
const
reader
=
new
FileReader
()
reader
.
readAsDataURL
(
file
)
reader
.
onload
=
event
=>
{
const
imgFile
=
event
.
target
.
result
const
arrBase64
=
imgFile
.
split
(
','
)
const
fileName
=
file
.
name
.
split
(
'.'
)
//fileUrl: 文件名 + @ + base64拼接
const
fileUrl
=
fileName
.
pop
()
+
'@'
+
arrBase64
[
1
]
//this.$apis.common.pictureUpload 调用接口api
this
.
$apis
.
common
.
pictureUpload
({
file
:
fileUrl
}).
then
(
res
=>
{
this
.
exportUrl
=
res
this
.
$refs
.
file
.
value
=
''
this
.
handleSaveImport
()
})
}
},
handleSaveImport
()
{
const
{
exportUrl
}
=
this
this
.
$apis
.
activity
.
exportCustomer
({
exportUrl
}).
then
(
res
=>
{
this
.
importNum
=
res
||
0
})
},
changeCouponTemplate
(
tab
,
event
)
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
clearValidate
(
'goodsList'
)
const
templateId
=
tab
.
name
this
.
editForm
.
couponTemplateId
=
templateId
this
.
editForm
.
couponTemplateName
=
tab
.
label
this
.
couponTemplateDetails
(
templateId
)
},
//获取优惠券模板详情
couponTemplateDetails
(
templateId
)
{
this
.
goodsLoading
=
true
this
.
$apis
.
giftBag
.
couponTemplateDetails
({
templateId
,
pageSize
:
10000
,
pageNum
:
1
}).
then
(
res
=>
{
this
.
selectedGoodsList
=
res
.
list
||
[]
this
.
selectedGoodsList
.
forEach
(
item
=>
(
item
.
id
=
item
.
couponId
))
this
.
goodsLoading
=
false
})
},
//获取图片宽度高度
getImgWH
(
src
)
{
return
new
Promise
(
resolve
=>
{
if
(
!
src
)
{
resolve
({
dw
:
0
,
dh
:
0
,
src
})
}
const
img
=
new
Image
()
img
.
src
=
src
img
.
onload
=
()
=>
{
resolve
({
dw
:
img
.
width
,
dh
:
img
.
height
,
src
})
}
})
},
uploadImg
(
imgFile
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
base64
=
'png'
+
'@'
+
imgFile
.
split
(
','
)[
1
]
this
.
$apis
.
common
.
pictureUpload
({
file
:
base64
,
fileType
:
'image'
}).
then
(
res
=>
{
this
.
editForm
.
bigImage
=
res
resolve
()
})
})
},
//选择门店优惠券
handleGiftAdd
()
{
this
.
selectedMealList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
couponObj
))
this
.
handleGiftClose
()
},
//选择商品优惠券
handleGoodsAdd
()
{
this
.
handleGoodsClose
()
},
//选择权益
handleEquityAdd
()
{
this
.
handleEquityClose
()
},
handleGiftClose
()
{
this
.
isSelectGiftVisible
=
!
this
.
isSelectGiftVisible
},
handleGoodsClose
()
{
this
.
isSelectGoodsVisible
=
!
this
.
isSelectGoodsVisible
console
.
log
(
this
.
isSelectGoodsVisible
)
},
handleEquityClose
()
{
this
.
isSelectEquityVisible
=
!
this
.
isSelectEquityVisible
},
handleEmpClose
()
{
this
.
isSelectEmpVisible
=
!
this
.
isSelectEmpVisible
},
handleEmpConfirm
(
selectedData
)
{
this
.
editForm
.
followStaff
=
selectedData
.
staffId
this
.
handleEmpClose
()
this
.
createCanvas
()
},
handleEquityConfirm
(
selectedData
)
{
this
.
selectedEquityList
=
selectedData
this
.
handleEquityClose
()
},
handleGiftConfirm
(
selectedData
)
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
clearValidate
(
'superMarketingCouponRelRequestList'
)
this
.
handleGiftClose
()
this
.
couponObj
=
selectedData
this
.
recoveryTotalPrice
()
this
.
recoveryGiftList
()
},
setNameHide
(
formName
,
name
,
status
)
{
name
.
forEach
(
i
=>
{
var
idx
=
this
[
formName
].
findIndex
(
item
=>
item
.
name
==
i
)
this
[
formName
][
idx
].
isHide
=
status
})
},
handleGoodsConfirm
(
selectedData
)
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
clearValidate
(
'goodsList'
)
this
.
selectedGoodsList
=
selectedData
||
[]
// this.setNameHide('goodsListBlock')
this
.
handleGoodsClose
()
},
handleDeleteGoods
(
row
)
{
const
index
=
this
.
selectedGoodsList
.
findIndex
(
k
=>
k
.
id
==
row
.
id
)
this
.
selectedGoodsList
.
splice
(
index
,
1
)
// this.setNameHide('goodsListBlock')
},
handleEquityDelete
(
idx
)
{
this
.
selectedEquityList
.
splice
(
idx
,
1
)
},
// 礼包
recoveryGiftList
()
{
this
.
editForm
.
superMarketingCouponRelRequestList
=
[]
this
.
orderShow
.
forEach
(
item
=>
{
this
.
couponObj
[
item
].
list
.
forEach
(
k
=>
{
this
.
editForm
.
superMarketingCouponRelRequestList
.
push
(
k
)
})
})
},
handleGiftDelete
(
attr
,
idx
)
{
this
.
couponObj
[
attr
].
list
.
splice
(
idx
,
1
)
this
.
recoveryTotalPrice
()
this
.
recoveryGiftList
()
},
recoveryCoupon
()
{
this
.
orderShow
.
forEach
(
item
=>
{
this
.
couponObj
[
item
].
list
=
[]
})
this
.
editForm
.
superMarketingCouponRelRequestList
.
forEach
(
item
=>
{
console
.
log
(
this
.
numToCoupon
[
item
.
discountType
])
if
(
this
.
numToCoupon
[
item
.
discountType
])
{
this
.
couponObj
[
this
.
numToCoupon
[
item
.
discountType
]].
list
.
push
(
item
)
}
})
},
// 计算预估成本
recoveryTotalPrice
()
{
this
.
totalEstimatedCost
=
0
this
.
maxStock
=
9999
this
.
orderShow
.
forEach
(
item
=>
{
this
.
couponObj
[
item
].
list
.
forEach
(
subItem
=>
{
let
mult
if
(
!
subItem
.
residueAmount
)
{
mult
=
9999
}
else
{
mult
=
Math
.
floor
(
subItem
.
residueAmount
/
subItem
.
couponAmount
)
}
this
.
maxStock
=
this
.
maxStock
<
mult
?
this
.
maxStock
:
mult
// 失效券不加入预估成本
if
(
subItem
.
status
!=
'3'
)
{
this
.
totalEstimatedCost
=
this
.
totalEstimatedCost
+
parseInt
(
subItem
.
couponAnticipatedCost
||
0
)
*
parseInt
(
subItem
.
couponAmount
)
}
})
})
this
.
totalEstimatedCost
=
(
this
.
totalEstimatedCost
/
100
).
toFixed
(
2
)
if
(
this
.
editForm
.
goodsStock
>
this
.
maxStock
)
this
.
editForm
.
goodsStock
=
this
.
maxStock
},
changeFormAttr
(
formName
,
attrName
,
labelList
,
attrValue
)
{
labelList
.
forEach
(
item
=>
{
let
idx
=
this
[
formName
].
findIndex
(
k
=>
k
.
label
==
item
)
if
(
this
[
formName
][
idx
])
{
this
[
formName
][
idx
][
attrName
]
=
attrValue
}
})
},
getViewParams
()
{
const
prams
=
this
.
getCouponInfoParams
()
console
.
log
(
prams
)
return
{
...
prams
,
selectedEquityList
:
this
.
selectedEquityList
,
couponList
:
this
.
editForm
.
superMarketingCouponRelRequestList
,
selectedGoodsList
:
this
.
selectedGoodsList
}
},
getCouponInfoParams
()
{
var
param
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
param
.
activityPrice
=
(
param
.
activityPrice
*
100
).
toFixed
(
0
)
//存的分,需乘100
const
d
=
param
.
activityTime
if
(
d
&&
d
.
length
>
0
)
{
param
.
starttime
=
d
[
0
]
param
.
endtime
=
d
[
1
]
}
const
couponList
=
this
.
$common
.
utils
.
deepClone
(
param
.
superMarketingCouponRelRequestList
)
||
[]
const
couponLists
=
couponList
.
map
(
item
=>
{
return
{
couponId
:
item
.
couponId
?
item
.
couponId
:
item
.
id
,
couponAmount
:
item
.
couponAmount
,
couponAnticipatedCost
:
item
.
couponAnticipatedCost
}
})
const
selectedGoodsList
=
this
.
selectedGoodsList
.
map
(
item
=>
{
return
{
couponId
:
item
.
id
,
couponAmount
:
item
.
couponAmount
,
couponAnticipatedCost
:
item
.
denomination
}
})
const
equityServices
=
this
.
selectedEquityList
.
map
(
i
=>
i
.
packageCode
)
param
.
equityServices
=
equityServices
.
join
(
','
)
param
.
importCustomersUrl
=
this
.
exportUrl
param
.
superMarketingCouponRelRequestList
=
couponLists
.
concat
(
selectedGoodsList
)
||
[]
delete
param
.
createdTime
delete
param
.
activityCouponBaseInfoDTOS
return
param
},
handleCancel
()
{
this
.
$router
.
push
(
'/home/index'
)
},
handleConfirm
()
{
if
(
this
.
selectedGoodsList
.
length
+
this
.
editForm
.
superMarketingCouponRelRequestList
.
length
+
this
.
selectedGoodsList
.
length
==
0
)
{
this
.
$message
.
error
(
'权益服务、平台优惠、门店优惠券至少选一项'
)
return
}
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
importNum
)
{
this
.
isSelectEmpVisible
=
true
}
else
{
this
.
createCanvas
()
}
}
})
},
addOrUpdate
()
{
this
.
loading
=
true
var
params
=
this
.
getCouponInfoParams
()
this
.
$apis
.
activity
.
createSuperMarketing
(
params
)
.
then
(
res
=>
{
if
(
res
)
{
this
.
init
()
this
.
$message
.
success
(
'操作成功'
)
}
})
.
finally
(()
=>
{
this
.
loading
=
false
})
},
getTemplateInfo
(
type
)
{
if
(
type
!=
'chatgpt'
)
{
this
.
SET_GPT_LIST
()
}
const
{
id
}
=
this
.
activityInfo
this
.
$apis
.
activity
.
getCalendarDatail
({
id
}).
then
(
res
=>
{
const
{
title
,
subTitle
,
startTime
,
endTime
,
couponItemList
,
backgroundImg
,
captionImg
}
=
this
.
$common
.
utils
.
deepClone
(
res
.
data
||
{})
this
.
editForm
.
templateId
=
id
this
.
editForm
.
marketingTitle
=
title
this
.
editForm
.
marketingSubtitle
=
subTitle
this
.
editForm
.
backgroundImage
=
backgroundImg
this
.
editForm
.
detailImage
=
captionImg
this
.
editForm
.
activityTime
=
[
startTime
+
' 00:00:00'
,
endTime
+
' 00:00:00'
]
this
.
selectedGoodsList
=
couponItemList
this
.
selectedGoodsList
.
forEach
(
item
=>
{
item
.
id
=
item
.
couponId
})
})
},
// isGetList =true 创建成功初始化
init
(
isGetList
=
true
)
{
this
.
SET_GPT_LIST
()
isGetList
&&
this
.
setSchemeListData
({
merchantId
:
this
.
editForm
.
merchantId
,
pageSize
:
5
,
currentPage
:
1
})
this
.
editForm
=
this
.
initValue
()
this
.
selectedGoodsList
=
[]
this
.
selectedEquityList
=
[]
this
.
exportUrl
=
''
this
.
importNum
=
0
},
initValue
()
{
return
{
mainColor
:
''
,
activityPrice
:
''
,
marketingTitle
:
''
,
bigImage
:
''
,
marketingSubtitle
:
''
,
activityTime
:
[],
superMarketingCouponRelRequestList
:
[],
backgroundImage
:
''
,
detailImage
:
''
,
merchantLog
:
''
,
merchantname
:
this
.
merchantInfo
.
merchantName
,
merchantAddress
:
this
.
merchantInfo
.
merchantAddress
,
merchantId
:
this
.
merchantInfo
.
merchantNo
}
},
getInfo
()
{
this
.
loading
=
true
this
.
SET_GPT_LIST
()
let
{
id
,
subscribe
}
=
this
.
activityInfo
,
param
=
{
activityId
:
id
},
activityAPi
=
'findActivityInfo'
if
(
subscribe
!=
8
)
{
param
=
{
id
}
activityAPi
=
'activityDetail'
}
this
.
$apis
.
activity
[
activityAPi
](
param
)
.
then
(
res
=>
{
var
info
=
res
this
.
editForm
=
this
.
$common
.
utils
.
deepClone
(
res
)
this
.
activityInfo
=
info
if
(
info
.
activityName
)
{
this
.
$set
(
this
.
editForm
,
'marketingTitle'
,
info
.
activityName
)
}
if
(
info
.
starttime
)
{
this
.
$set
(
this
.
editForm
,
'activityTime'
,
[
info
.
starttime
.
replace
(
/-/g
,
'/'
),
info
.
endtime
.
replace
(
/-/g
,
'/'
)])
}
if
(
info
.
startTime
)
{
this
.
$set
(
this
.
editForm
,
'activityTime'
,
[
info
.
startTime
.
replace
(
/-/g
,
'/'
),
info
.
endTime
.
replace
(
/-/g
,
'/'
)])
}
if
(
info
.
merchantName
)
{
this
.
$set
(
this
.
editForm
,
'merchantname'
,
info
.
merchantName
)
this
.
editForm
=
Object
.
assign
(
this
.
initValue
(),
this
.
editForm
)
}
// 地图
if
(
info
.
activityAddressProvinceName
||
info
.
activityAddressCityName
)
{
this
.
$refs
.
editFormRef
.
$refs
.
provinceForm
[
0
].
init
(
info
.
activityAddressProvinceName
,
info
.
activityAddressCityName
)
}
if
(
info
.
activityPrice
)
{
this
.
$set
(
this
.
editForm
,
'activityPrice'
,
info
.
activityPrice
/
100
)
}
if
(
info
.
serviceMerchantPackageConfigDTOList
&&
info
.
serviceMerchantPackageConfigDTOList
.
length
)
{
this
.
selectedEquityList
=
info
.
serviceMerchantPackageConfigDTOList
.
map
(
item
=>
{
return
{
packageCode
:
item
.
packageCode
,
packageName
:
item
.
packageName
}
})
}
let
activityCoupon
=
this
.
editForm
.
activityCouponBaseInfoDTOS
||
this
.
editForm
.
couponList
if
(
activityCoupon
&&
activityCoupon
.
length
)
{
activityCoupon
.
forEach
(
item
=>
{
item
.
id
=
item
.
couponId
item
.
denomination
=
item
.
couponAnticipatedCost
})
this
.
selectedGoodsList
=
activityCoupon
.
filter
(
i
=>
i
.
discountType
==
8
)
this
.
editForm
.
superMarketingCouponRelRequestList
=
activityCoupon
.
filter
(
i
=>
i
.
discountType
!=
8
)
this
.
recoveryCoupon
()
this
.
recoveryTotalPrice
()
}
else
{
this
.
editForm
.
superMarketingCouponRelRequestList
=
[]
}
})
.
finally
(()
=>
{
this
.
loading
=
false
})
},
confirmMsg
(
val
)
{
this
.
$confirm
(
'新建营销方案,将放弃保存当前正在创建中的方案,是否新建营销方案?'
,
'提示'
,
{
// distinguishCancelAndClose: true,
confirmButtonText
:
'是'
,
cancelButtonText
:
'否'
,
type
:
'warning'
})
.
then
(()
=>
{
if
(
!
val
.
id
)
{
return
this
.
init
(
false
)
}
val
.
type
==
'programme'
?
this
.
getInfo
()
:
this
.
getTemplateInfo
(
val
.
type
)
this
.
setActivityInfo
()
})
.
catch
(()
=>
{
this
.
setActivityInfo
()
})
},
// 未开通不显示
equityMerchant
()
{
var
params
=
{
merchantId
:
this
.
$globalState
.
session
.
merchantId
}
this
.
$apis
.
giftBag
.
equityMerchant
(
params
).
then
(
res
=>
{
if
(
res
.
packageConfigs
&&
res
.
packageConfigs
)
{
this
.
setNameHide
(
'editFormData'
,
[
'equityList'
,
'equityListBlock'
],
false
)
}
})
}
},
mounted
()
{
this
.
couponTemplate
()
this
.
init
(
false
)
this
.
equityMerchant
()
}
}
</
script
>
<
style
lang=
"scss"
>
.container
{
overflow
:
auto
;
height
:
calc
(
100vh
-
80px
);
margin-top
:
10px
;
}
.main-head
{
background
:
#fff
;
}
.main-box
{
background
:
#fff
;
margin
:
10px
0px
20px
;
.main-title
{
font-weight
:
600
;
font-size
:
16px
;
color
:
#333333
;
padding
:
15px
30px
;
line-height
:
28px
;
border-bottom
:
1px
solid
#f0f1f7
;
}
.inport-result
{
margin
:
10px
;
line-height
:
22px
;
background
:
#ffefda
;
border-radius
:
4px
;
padding
:
9px
16px
;
font-size
:
14px
;
color
:
#333333
;
span
{
color
:
#5850ff
;
margin-right
:
20px
;
&:last-child
{
cursor
:
pointer
;
position
:
relative
;
input
{
cursor
:
pointer
;
position
:
absolute
;
top
:
0px
;
left
:
0px
;
width
:
100%
;
height
:
100%
;
font-size
:
0px
;
}
}
}
}
.edit-form-container
{
padding
:
8px
50px
;
.input-slot
{
label
{
color
:
#5850ff
;
font-size
:
14px
;
margin-left
:
10px
;
cursor
:
pointer
;
&.disabled-label
{
color
:
#999999
;
cursor
:
no-drop
;
}
}
}
}
.gift-panel
{
.gift-block
{
width
:
602px
;
border-radius
:
4px
;
border
:
1px
solid
#e5e5e5
;
.gift-title
{
padding
:
10px
;
background-color
:
#f4f6fc
;
border-bottom
:
1px
solid
#e5e5e5
;
.price
{
font-size
:
18px
;
}
}
.gift-box
{
display
:
flex
;
padding
:
10px
0
10px
10px
;
img
{
width
:
58px
;
height
:
22px
;
}
.gift-logo
{
width
:
58px
;
height
:
22px
;
margin-right
:
12px
;
}
.gift-label
{
width
:
70px
;
color
:
#999999
;
text-align
:
right
;
}
.gift-content
{
width
:
calc
(
100%
-
70px
);
border-bottom
:
1px
solid
#e5e5e5
;
line-height
:
22px
;
padding-left
:
10px
;
.gift-item
{
display
:
inline-block
;
width
:
50%
;
.gift-coupon-name
{
display
:
inline-block
;
margin
:
0
5px
0
7px
;
}
.gift-tips
{
display
:
inline-block
;
font-size
:
12px
;
height
:
18px
;
line-height
:
18px
;
color
:
#999999
;
background-color
:
#eeeded
;
margin-right
:
7px
;
}
}
}
.gift-content
:last-child
{
border-bottom
:
0px
;
}
}
}
.gift-input
{
font-size
:
14px
;
color
:
#333333
;
margin
:
10px
0px
;
.el-input
{
width
:
136px
;
}
}
.gift-tips
{
font-size
:
14px
;
color
:
#999999
;
}
}
.play-panel
{
.card-panel
{
width
:
36vw
;
.el-tabs__nav
{
border
:
none
;
}
.el-tabs__header
{
margin
:
0
;
}
.el-tabs__item
{
background
:
#fafafa
;
border
:
1px
solid
#e5e5e5
;
border-radius
:
4px
4px
0
0
;
border-right
:
1px
solid
#e5e5e5
;
border-top
:
1px
solid
#e5e5e5
;
border-left
:
1px
solid
#e5e5e5
!important
;
border-bottom
:
none
;
margin-right
:
1px
;
width
:
auto
;
&.is-active
{
color
:
#5850ff
;
background
:
#fff
;
font-weight
:
600
;
}
}
}
.choseRow
{
display
:
flex
;
height
:
auto
;
.choseItem
{
display
:
inline-block
;
cursor
:
pointer
;
line-height
:
40px
;
height
:
40px
;
background
:
#fafafa
;
border-radius
:
4px
4px
0
0
;
border
:
1px
solid
#e5e5e5
;
border-bottom
:
none
;
margin-right
:
1px
;
padding
:
0
20px
;
&.active
{
color
:
#5850ff
;
background
:
#fff
;
font-weight
:
600
;
}
}
}
.chose-panel
{
.select-btn
{
margin-bottom
:
10px
;
}
.waiting-box
{
width
:
278px
;
height
:
278px
;
margin
:
15px
auto
0
;
}
padding
:
20px
;
width
:
40vw
;
min-height
:
296px
;
background
:
#ffffff
;
border
:
1px
solid
#e5e5e5
;
border-radius
:
0
4px
4px
4px
;
}
}
}
</
style
>
src/views/activityLink/components/MarketingContent.vue
View file @
bb49c30
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-29 21:24:27
* @Date: 2023-06-29 21:24:27
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-
17 19:02:23
* @LastEditTime: 2023-07-
20 18:23:30
* @FilePath: \scrm-micro-link\src\views\activityLink\components\MarketingContent.vue
* @FilePath: \scrm-micro-link\src\views\activityLink\components\MarketingContent.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<el-button
:size=
"size"
icon=
"el-icon-plus"
@
click=
"modelVisible = true"
>
选择模板
</el-button>
<el-button
:size=
"size"
icon=
"el-icon-plus"
@
click=
"modelVisible = true"
>
选择模板
</el-button>
</div>
</div>
<div
slot=
"marketingTitle"
class=
"input-slot"
>
<div
slot=
"marketingTitle"
class=
"input-slot"
>
<el-input
placeholder=
"请输入营销主题"
v-model=
"editForm.marketingTitle"
style=
"width:400px"
maxlength=
"1
2
"
show-word-limit
></el-input>
<el-input
placeholder=
"请输入营销主题"
v-model=
"editForm.marketingTitle"
style=
"width:400px"
maxlength=
"1
0
"
show-word-limit
></el-input>
<label
@
click=
"getGPTitle(1)"
v-if=
"GPTList"
>
ChatGPT重新生成
</label>
<label
@
click=
"getGPTitle(1)"
v-if=
"GPTList"
>
ChatGPT重新生成
</label>
<label
v-else
class=
"disabled-label"
>
ChatGPT重新生成
</label>
<label
v-else
class=
"disabled-label"
>
ChatGPT重新生成
</label>
</div>
</div>
...
@@ -58,7 +58,7 @@ export default {
...
@@ -58,7 +58,7 @@ export default {
activityTime
:
[],
activityTime
:
[],
backgroundImage
:
''
,
backgroundImage
:
''
,
detailImage
:
''
,
detailImage
:
''
,
merchantLog
:
''
merchantLog
o
:
''
},
},
editFormData
:
[
editFormData
:
[
{
{
...
@@ -71,7 +71,7 @@ export default {
...
@@ -71,7 +71,7 @@ export default {
name
:
'marketingTitle'
,
name
:
'marketingTitle'
,
addHtml
:
'marketingTitle'
,
addHtml
:
'marketingTitle'
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
1
2
maxlength
:
1
0
},
},
{
{
label
:
'营销副标题'
,
label
:
'营销副标题'
,
...
@@ -165,14 +165,14 @@ export default {
...
@@ -165,14 +165,14 @@ export default {
},
},
{
{
label
:
'门店Logo'
,
label
:
'门店Logo'
,
name
:
'merchantLog'
,
name
:
'merchantLog
o
'
,
type
:
'upload'
,
type
:
'upload'
,
width
:
'320px'
,
width
:
'320px'
,
mark
:
'建议尺寸:最大1M,尺寸216*60'
,
mark
:
'建议尺寸:最大1M,尺寸216*60'
,
style
:
'color: #999999;'
,
style
:
'color: #999999;'
,
limitSize
:
5
,
limitSize
:
5
,
maxPhotoNum
:
1
,
maxPhotoNum
:
1
,
suffixSlot
:
'merchantLog'
,
suffixSlot
:
'merchantLog
o
'
,
handleUpload
:
(
e
,
file
,
targetItem
)
=>
{
handleUpload
:
(
e
,
file
,
targetItem
)
=>
{
const
imgFile
=
e
.
target
.
result
const
imgFile
=
e
.
target
.
result
const
base64
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
const
base64
=
file
.
name
.
split
(
'.'
)[
file
.
name
.
split
(
'.'
).
length
-
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
...
@@ -278,7 +278,7 @@ export default {
...
@@ -278,7 +278,7 @@ export default {
activityTime
:
[],
activityTime
:
[],
backgroundImage
:
''
,
backgroundImage
:
''
,
detailImage
:
''
,
detailImage
:
''
,
merchantLog
:
''
,
merchantLog
o
:
''
,
merchantname
:
this
.
merchantInfo
.
merchantName
,
merchantname
:
this
.
merchantInfo
.
merchantName
,
merchantAddress
:
this
.
merchantInfo
.
merchantAddress
merchantAddress
:
this
.
merchantInfo
.
merchantAddress
}
}
...
@@ -300,13 +300,17 @@ export default {
...
@@ -300,13 +300,17 @@ export default {
return
return
}
}
console
.
log
(
888
)
console
.
log
(
888
)
this
.
editForm
=
Object
.
assign
({
merchantLog
:
''
},
info
)
this
.
editForm
=
Object
.
assign
({
merchantLog
o
:
''
},
info
)
if
(
info
.
activityName
)
{
if
(
info
.
activityName
)
{
this
.
$set
(
this
.
editForm
,
'marketingTitle'
,
info
.
activityName
)
this
.
$set
(
this
.
editForm
,
'marketingTitle'
,
info
.
activityName
)
}
}
if
(
info
.
subTitle
)
{
if
(
info
.
subTitle
)
{
this
.
$set
(
this
.
editForm
,
'marketingSubtitle'
,
info
.
subTitle
)
this
.
$set
(
this
.
editForm
,
'marketingSubtitle'
,
info
.
subTitle
)
}
}
if
(
info
.
mainImage
||
info
.
activityBigImg
)
{
this
.
$set
(
this
.
editForm
,
'backgroundImage'
,
info
.
mainImage
||
info
.
activityBigImg
)
}
this
.
editForm
.
merchantAddress
=
info
.
activityAddressDetailName
if
(
info
.
starttime
)
{
if
(
info
.
starttime
)
{
this
.
$set
(
this
.
editForm
,
'activityTime'
,
[
info
.
starttime
.
replace
(
/-/g
,
'/'
),
info
.
endtime
.
replace
(
/-/g
,
'/'
)])
this
.
$set
(
this
.
editForm
,
'activityTime'
,
[
info
.
starttime
.
replace
(
/-/g
,
'/'
),
info
.
endtime
.
replace
(
/-/g
,
'/'
)])
}
}
...
@@ -326,7 +330,7 @@ export default {
...
@@ -326,7 +330,7 @@ export default {
...
info
,
...
info
,
merchantname
:
this
.
merchantInfo
.
merchantName
,
merchantname
:
this
.
merchantInfo
.
merchantName
,
merchantAddress
:
this
.
merchantInfo
.
merchantAddress
,
merchantAddress
:
this
.
merchantInfo
.
merchantAddress
,
merchantLog
:
''
,
merchantLog
o
:
''
,
mainColor
:
''
mainColor
:
''
}
}
console
.
log
(
this
.
editForm
,
9
)
console
.
log
(
this
.
editForm
,
9
)
...
@@ -343,8 +347,11 @@ export default {
...
@@ -343,8 +347,11 @@ export default {
param
.
starttime
=
d
[
0
]
param
.
starttime
=
d
[
0
]
param
.
endtime
=
d
[
1
]
param
.
endtime
=
d
[
1
]
}
}
param
.
mainImage
=
param
.
backgroundImage
delete
param
.
createdTime
delete
param
.
createdTime
delete
param
.
activityPrice
delete
param
.
activityPrice
delete
param
.
giftId
delete
param
.
serviceMerchantPackageConfigDTOS
return
param
return
param
},
},
handleSave
()
{
handleSave
()
{
...
...
src/views/activityLink/components/MarketingGift.vue
View file @
bb49c30
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div>
<div>
<glsx-combi-form
class=
"edit-form-container"
:isBlock=
"true"
ref=
"editFormRef"
formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<glsx-combi-form
class=
"edit-form-container"
:isBlock=
"true"
ref=
"editFormRef"
formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<div
slot=
"selectGiftBtn"
>
<div
slot=
"selectGiftBtn"
>
<el-radio
label=
""
v-model=
"giftValue"
>
自定义礼包
</el-radio>
<el-radio
label=
""
v-model=
"giftValue"
v-if=
"!isGhPackage"
>
自定义礼包
</el-radio>
<div
class=
"gift-container"
>
<div
class=
"gift-container"
>
<el-radio-group
v-model=
"giftValue"
@
change=
"getModel"
>
<el-radio-group
v-model=
"giftValue"
@
change=
"getModel"
>
<el-radio
:label=
"item.id"
v-for=
"item in giftList"
:key=
"item.id"
>
{{
item
.
name
}}
(成本:
{{
item
.
totalEquityPrice
||
0
}}
)
</el-radio>
<el-radio
:label=
"item.id"
v-for=
"item in giftList"
:key=
"item.id"
>
{{
item
.
name
}}
(成本:
{{
item
.
totalEquityPrice
||
0
}}
)
</el-radio>
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
<div
class=
"service-tab"
>
<div
class=
"service-tab"
>
<div
class=
"tab-item"
:class=
"{ active: serviceIndex == item.type }"
v-for=
"(item, index) in serviceTabList"
:key=
"index"
@
click=
"serviceIndex = item.type"
>
{{ item.label }}
</div>
<div
class=
"tab-item"
:class=
"{ active: serviceIndex == item.type }"
v-for=
"(item, index) in serviceTabList"
:key=
"index"
@
click=
"serviceIndex = item.type"
>
{{ item.label }}
</div>
<div
class=
"tab-border"
:style=
"{ left: (serviceIndex == 7 ? 0 : serviceIndex - 1) * 88 + 2 + 'px' }"
></div>
<div
class=
"tab-border"
:style=
"{ left: (serviceIndex == 7 ? 0 : serviceIndex - 1) * 88 + 2 + 'px' }"
></div>
<div
class=
"service-tip"
>
(仅支持引用无限库存券)
</div>
<div
class=
"tab-right"
>
<div
class=
"tab-right"
>
<div
class=
"refresh-btn"
@
click=
"getList"
>
<div
class=
"refresh-btn"
@
click=
"getList"
>
<i
class=
"el-icon-refresh-right"
></i>
<i
class=
"el-icon-refresh-right"
></i>
...
@@ -67,7 +68,7 @@
...
@@ -67,7 +68,7 @@
</div>
</div>
</glsx-combi-form>
</glsx-combi-form>
<div
class=
"gift-footer"
>
<div
class=
"gift-footer"
>
<el-button
@
click=
"handleSave"
size=
"medium"
>
保存为套餐
</el-button>
<el-button
@
click=
"handleSave"
size=
"medium"
v-if=
"!isGhPackage"
>
保存为套餐
</el-button>
<el-button
type=
"primary"
@
click=
"handleSaveGift"
size=
"medium"
>
保存为礼包
</el-button>
<el-button
type=
"primary"
@
click=
"handleSaveGift"
size=
"medium"
>
保存为礼包
</el-button>
</div>
</div>
<GLDialog
class=
"qr-dialog"
title=
"保存礼包"
mode=
"mid"
:visible
.
sync=
"giftVisible"
@
onOk=
"handleConfirm"
@
onCancel=
"giftVisible = false"
>
<GLDialog
class=
"qr-dialog"
title=
"保存礼包"
mode=
"mid"
:visible
.
sync=
"giftVisible"
@
onOk=
"handleConfirm"
@
onCancel=
"giftVisible = false"
>
...
@@ -97,6 +98,7 @@ export default {
...
@@ -97,6 +98,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
isInit
:
this
.
$route
.
query
.
addOrEdit
==
'add'
,
isInit
:
this
.
$route
.
query
.
addOrEdit
==
'add'
,
isGhPackage
:
false
,
giftValue
:
''
,
giftValue
:
''
,
editForm
:
{
editForm
:
{
giftList
:
1
,
giftList
:
1
,
...
@@ -128,7 +130,6 @@ export default {
...
@@ -128,7 +130,6 @@ export default {
},
},
watch
:
{
watch
:
{
subscribe
(
val
)
{
subscribe
(
val
)
{
console
.
log
(
val
,
999999
)
if
(
val
)
this
.
getGiftList
(
val
)
if
(
val
)
this
.
getGiftList
(
val
)
},
},
// 'editForm.activityPrice'(newValue, oldValue) {
// 'editForm.activityPrice'(newValue, oldValue) {
...
@@ -149,6 +150,9 @@ export default {
...
@@ -149,6 +150,9 @@ export default {
activityInfo
:
{
activityInfo
:
{
handler
(
val
)
{
handler
(
val
)
{
const
info
=
this
.
$common
.
utils
.
deepClone
(
val
)
const
info
=
this
.
$common
.
utils
.
deepClone
(
val
)
if
(
this
.
routerInfo
.
addOrEdit
==
'add'
)
{
return
}
this
.
init
()
this
.
init
()
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
if
(
info
.
serviceMerchantPackageConfigDTOS
)
this
.
selectedCarList
=
info
.
serviceMerchantPackageConfigDTOS
if
(
info
.
serviceMerchantPackageConfigDTOS
)
this
.
selectedCarList
=
info
.
serviceMerchantPackageConfigDTOS
...
@@ -165,11 +169,15 @@ export default {
...
@@ -165,11 +169,15 @@ export default {
if
(
info
.
activityPrice
)
{
if
(
info
.
activityPrice
)
{
this
.
editForm
.
activityPrice
=
info
.
activityPrice
/
100
this
.
editForm
.
activityPrice
=
info
.
activityPrice
/
100
}
}
this
.
giftValue
=
info
.
giftId
||
''
if
(
this
.
giftValue
&&
info
.
ghExclusiveFlag
==
2
)
{
this
.
getModel
()
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
this
.
routerInfo
.
addOrEdit
==
'edit'
)
{
if
(
this
.
routerInfo
.
addOrEdit
==
'edit'
)
{
this
.
handleSaveGift
()
this
.
handleSaveGift
()
}
}
},
100
0
)
},
0
)
this
.
getList
()
this
.
getList
()
})
})
...
@@ -194,11 +202,18 @@ export default {
...
@@ -194,11 +202,18 @@ export default {
this
.
goodsList
=
[]
this
.
goodsList
=
[]
this
.
selectedGoodsList
=
[]
this
.
selectedGoodsList
=
[]
this
.
totalPrice
=
0
this
.
totalPrice
=
0
this
.
editForm
.
activityPrice
=
''
this
.
$refs
[
'carRef'
].
$refs
[
'listMutiTable'
].
clearSelection
()
this
.
$refs
[
'carRef'
].
$refs
[
'listMutiTable'
].
clearSelection
()
this
.
$refs
[
'goodsRef'
+
this
.
goodsIndex
][
0
].
$refs
[
'listMutiTable'
].
clearSelection
()
this
.
$refs
[
'goodsRef'
+
this
.
goodsIndex
][
0
].
$refs
[
'listMutiTable'
].
clearSelection
()
this
.
$refs
[
'serviceRef'
+
this
.
serviceIndex
][
0
].
$refs
[
'listMutiTable'
].
clearSelection
()
this
.
$refs
[
'serviceRef'
+
this
.
serviceIndex
][
0
].
$refs
[
'listMutiTable'
].
clearSelection
()
},
},
validGh
()
{
if
(
this
.
activityInfo
.
ghExclusiveFlag
!=
2
)
return
this
.
isGhPackage
=
true
const
carList
=
this
.
carList
.
map
(
item
=>
item
.
packageCode
)
const
serviceList
=
this
.
serviceList
.
map
(
item
=>
item
.
id
)
if
(
this
.
currentIndex
==
1
)
this
.
carTableParams
.
checkSelectVal
=
carList
if
(
this
.
currentIndex
==
3
)
this
.
serviceTableParams
.
checkSelectVal
=
serviceList
},
getGiftList
(
val
)
{
getGiftList
(
val
)
{
const
{
merchantId
}
=
this
const
{
merchantId
}
=
this
let
params
=
{
let
params
=
{
...
@@ -213,13 +228,9 @@ export default {
...
@@ -213,13 +228,9 @@ export default {
this
.
totalPrice
=
0
this
.
totalPrice
=
0
for
(
let
i
=
0
;
i
<
this
.
selectedCarList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
selectedCarList
.
length
;
i
++
)
{
if
(
scope
&&
scope
.
packageCode
==
this
.
selectedCarList
[
i
].
packageCode
)
{
if
(
scope
&&
scope
.
packageCode
==
this
.
selectedCarList
[
i
].
packageCode
)
{
this
.
selectedCarList
[
i
].
packageAmount
=
scope
.
packageAmount
this
.
selectedCarList
[
i
].
packageAmount
=
scope
.
packageAmount
||
0
}
}
if
(
!
this
.
selectedCarList
[
i
].
packageAmount
)
{
this
.
totalPrice
=
this
.
totalPrice
+
parseFloat
(
this
.
selectedCarList
[
i
].
packageAmount
||
0
)
this
.
$message
.
error
(
'输入用车权益价格'
)
return
}
this
.
totalPrice
=
this
.
totalPrice
+
parseFloat
(
this
.
selectedCarList
[
i
].
packageAmount
)
}
}
},
},
handleSaveGift
()
{
handleSaveGift
()
{
...
@@ -234,7 +245,7 @@ export default {
...
@@ -234,7 +245,7 @@ export default {
}
}
this
.
totalPrice
=
0
this
.
totalPrice
=
0
for
(
let
i
=
0
;
i
<
selectedCarList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
selectedCarList
.
length
;
i
++
)
{
this
.
totalPrice
=
this
.
totalPrice
+
parseFloat
(
selectedCarList
[
i
].
packageAmount
)
this
.
totalPrice
=
this
.
totalPrice
+
parseFloat
(
selectedCarList
[
i
].
packageAmount
||
0
)
}
}
this
.
setPackage
(
Object
.
assign
({},
{
selectedServiceList
:
this
.
$common
.
utils
.
deepClone
(
this
.
selectedServiceList
),
selectedCarList
:
this
.
$common
.
utils
.
deepClone
(
this
.
selectedCarList
),
selectedGoodsList
:
this
.
$common
.
utils
.
deepClone
(
this
.
selectedGoodsList
)
}))
this
.
setPackage
(
Object
.
assign
({},
{
selectedServiceList
:
this
.
$common
.
utils
.
deepClone
(
this
.
selectedServiceList
),
selectedCarList
:
this
.
$common
.
utils
.
deepClone
(
this
.
selectedCarList
),
selectedGoodsList
:
this
.
$common
.
utils
.
deepClone
(
this
.
selectedGoodsList
)
}))
const
selectedGoodsList
=
[...
this
.
selectedGoodsList
,
...
this
.
selectedServiceList
].
map
(
item
=>
{
const
selectedGoodsList
=
[...
this
.
selectedGoodsList
,
...
this
.
selectedServiceList
].
map
(
item
=>
{
...
@@ -257,7 +268,10 @@ export default {
...
@@ -257,7 +268,10 @@ export default {
params
.
equityServices
=
equityServices
.
join
(
','
)
params
.
equityServices
=
equityServices
.
join
(
','
)
params
.
activityPrice
=
(
this
.
editForm
.
activityPrice
*
100
).
toFixed
(
0
)
params
.
activityPrice
=
(
this
.
editForm
.
activityPrice
*
100
).
toFixed
(
0
)
params
.
superMarketingCouponRelRequestList
=
selectedGoodsList
||
[]
params
.
superMarketingCouponRelRequestList
=
selectedGoodsList
||
[]
console
.
log
(
params
)
params
.
giftId
=
this
.
giftValue
if
(
this
.
giftValue
)
{
this
.
handleSave
()
}
this
.
SET_STEP
(
3
)
this
.
SET_STEP
(
3
)
this
.
setProcess
({
this
.
setProcess
({
1
:
{
1
:
{
...
@@ -266,10 +280,15 @@ export default {
...
@@ -266,10 +280,15 @@ export default {
})
})
},
},
handleSave
()
{
handleSave
()
{
if
(
this
.
giftValue
)
{
const
giftList
=
this
.
giftList
.
find
(
item
=>
this
.
giftValue
==
item
.
id
)
this
.
handleConfirm
(
giftList
)
}
else
{
this
.
giftVisible
=
true
this
.
giftVisible
=
true
this
.
giftName
=
''
this
.
giftName
=
''
}
},
},
handleConfirm
()
{
handleConfirm
(
res
)
{
const
{
merchantId
,
selectedServiceList
,
selectedGoodsList
,
subscribe
,
giftName
}
=
this
const
{
merchantId
,
selectedServiceList
,
selectedGoodsList
,
subscribe
,
giftName
}
=
this
const
selectedCarList
=
this
.
selectedCarList
.
filter
(
item
=>
item
.
packageAmount
)
const
selectedCarList
=
this
.
selectedCarList
.
filter
(
item
=>
item
.
packageAmount
)
const
couponIds
=
[...
selectedServiceList
,
...
selectedGoodsList
].
map
(
item
=>
{
const
couponIds
=
[...
selectedServiceList
,
...
selectedGoodsList
].
map
(
item
=>
{
...
@@ -277,8 +296,9 @@ export default {
...
@@ -277,8 +296,9 @@ export default {
})
})
const
equities
=
{}
const
equities
=
{}
this
.
totalPrice
=
0
this
.
totalPrice
=
0
if
(
selectedCarList
.
length
==
0
)
{
console
.
log
(
selectedCarList
.
length
+
selectedServiceList
.
length
+
selectedGoodsList
.
length
)
this
.
$message
.
error
(
'输入用车权益价格'
)
if
(
selectedCarList
.
length
+
selectedServiceList
.
length
+
selectedGoodsList
.
length
==
0
)
{
this
.
$message
.
error
(
'权益服务、平台优惠、门店优惠券至少选一项'
)
return
return
}
}
for
(
let
i
=
0
;
i
<
selectedCarList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
selectedCarList
.
length
;
i
++
)
{
...
@@ -293,6 +313,10 @@ export default {
...
@@ -293,6 +313,10 @@ export default {
couponIds
:
JSON
.
stringify
(
couponIds
),
couponIds
:
JSON
.
stringify
(
couponIds
),
equities
:
JSON
.
stringify
(
equities
)
equities
:
JSON
.
stringify
(
equities
)
}
}
if
(
res
&&
res
.
id
)
{
params
.
id
=
res
.
id
params
.
name
=
res
.
name
}
this
.
$apis
.
giftBag
.
packageAdd
(
params
).
then
(
res
=>
{
this
.
$apis
.
giftBag
.
packageAdd
(
params
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
giftVisible
=
false
this
.
giftVisible
=
false
...
@@ -421,7 +445,7 @@ export default {
...
@@ -421,7 +445,7 @@ export default {
equities
=
JSON
.
parse
(
res
.
equities
)
equities
=
JSON
.
parse
(
res
.
equities
)
}
}
var
params
=
{
var
params
=
{
...
this
.
searchForm
,
isChecked
:
1
,
merchantId
:
this
.
merchantId
merchantId
:
this
.
merchantId
}
}
this
.
loading
=
true
this
.
loading
=
true
...
@@ -429,7 +453,7 @@ export default {
...
@@ -429,7 +453,7 @@ export default {
.
equityMerchant
(
params
)
.
equityMerchant
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
loading
=
false
this
.
loading
=
false
const
packageConfigs
=
res
.
packageConfigs
||
[]
const
packageConfigs
=
(
res
.
packageConfigs
||
[]).
filter
(
item
=>
item
.
isChecked
==
1
)
if
(
this
.
isInit
)
{
if
(
this
.
isInit
)
{
this
.
selectedCarList
=
[]
this
.
selectedCarList
=
[]
}
}
...
@@ -450,14 +474,14 @@ export default {
...
@@ -450,14 +474,14 @@ export default {
this
.
isInit
=
false
this
.
isInit
=
false
this
.
selectedCarList
.
forEach
(
s
=>
{
this
.
selectedCarList
.
forEach
(
s
=>
{
if
(
p
.
packageCode
==
s
.
packageCode
)
{
if
(
p
.
packageCode
==
s
.
packageCode
)
{
p
.
packageAmount
=
s
.
packageAmount
p
.
packageAmount
=
s
.
packageAmount
||
0
}
}
})
})
this
.
calcCarValue
()
this
.
calcCarValue
()
})
})
console
.
log
(
this
.
selectedCarList
)
this
.
carList
=
packageConfigs
this
.
carList
=
packageConfigs
this
.
selectedPreExisting
(
this
.
selectedCarList
,
this
.
carList
,
'packageCode'
,
this
.
$refs
[
'carRef'
])
this
.
selectedPreExisting
(
this
.
selectedCarList
,
this
.
carList
,
'packageCode'
,
this
.
$refs
[
'carRef'
])
this
.
validGh
()
})
})
.
finally
(()
=>
{
.
finally
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
...
@@ -527,6 +551,7 @@ export default {
...
@@ -527,6 +551,7 @@ export default {
// this.fnCallBack = true
// this.fnCallBack = true
this
.
$refs
[
'serviceRef'
+
this
.
serviceIndex
][
0
].
tableTotal
=
res
.
total
this
.
$refs
[
'serviceRef'
+
this
.
serviceIndex
][
0
].
tableTotal
=
res
.
total
this
.
selectedPreExisting
(
this
.
selectedServiceList
,
this
.
serviceList
,
'id'
,
this
.
$refs
[
'serviceRef'
+
this
.
serviceIndex
][
0
])
this
.
selectedPreExisting
(
this
.
selectedServiceList
,
this
.
serviceList
,
'id'
,
this
.
$refs
[
'serviceRef'
+
this
.
serviceIndex
][
0
])
this
.
validGh
()
})
})
.
finally
(()
=>
{
.
finally
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
...
@@ -543,14 +568,13 @@ export default {
...
@@ -543,14 +568,13 @@ export default {
let
activityCoupon
=
res
.
couponList
||
[]
let
activityCoupon
=
res
.
couponList
||
[]
if
(
activityCoupon
&&
activityCoupon
.
length
)
{
activityCoupon
.
forEach
(
item
=>
{
activityCoupon
.
forEach
(
item
=>
{
item
.
id
=
item
.
couponId
item
.
id
=
item
.
couponId
item
.
denomination
=
item
.
couponAnticipatedCost
item
.
denomination
=
item
.
couponAnticipatedCost
})
})
this
.
selectedGoodsList
=
activityCoupon
.
filter
(
i
=>
i
.
discountType
==
8
)
this
.
selectedGoodsList
=
activityCoupon
.
filter
(
i
=>
i
.
discountType
==
8
)
this
.
selectedServiceList
=
activityCoupon
.
filter
(
i
=>
i
.
discountType
!=
8
)
this
.
selectedServiceList
=
activityCoupon
.
filter
(
i
=>
i
.
discountType
!=
8
)
}
console
.
log
(
this
.
selectedGoodsList
,
this
.
selectedServiceList
)
this
.
getList
()
this
.
getList
()
})
})
})
})
...
@@ -559,6 +583,9 @@ export default {
...
@@ -559,6 +583,9 @@ export default {
this
.
giftVisible
=
false
this
.
giftVisible
=
false
},
},
tabClick
(
index
)
{
tabClick
(
index
)
{
if
((
index
==
1
||
index
==
3
)
&&
this
.
activityInfo
.
ghExclusiveFlag
==
2
)
{
this
.
$message
.
error
(
'不可以修改用车权益/门店服务'
)
}
this
.
currentIndex
=
index
this
.
currentIndex
=
index
}
}
},
},
...
@@ -566,6 +593,7 @@ export default {
...
@@ -566,6 +593,7 @@ export default {
this
.
setProcess
({
this
.
setProcess
({
1
:
false
1
:
false
})
})
if
(
this
.
routerInfo
.
addOrEdit
==
'edit'
)
this
.
SET_STEP
(
3
)
}
}
}
}
</
script
>
</
script
>
...
@@ -635,10 +663,16 @@ export default {
...
@@ -635,10 +663,16 @@ export default {
background
:
#ffffff
;
background
:
#ffffff
;
transition
:
all
0.5s
;
transition
:
all
0.5s
;
}
}
.service-tip
{
position
:
absolute
;
right
:
-160px
;
top
:
3px
;
color
:
#999
;
}
.tab-right
{
.tab-right
{
display
:
flex
;
display
:
flex
;
position
:
absolute
;
position
:
absolute
;
right
:
-
30
vw
;
right
:
-
25
vw
;
top
:
0px
;
top
:
0px
;
.refresh-btn
{
.refresh-btn
{
cursor
:
pointer
;
cursor
:
pointer
;
...
...
src/views/activityLink/components/MarketingTask.vue
View file @
bb49c30
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
<div
class=
"task-item"
v-for=
"item in taskList"
:key=
"item.batchNo"
>
<div
class=
"task-item"
v-for=
"item in taskList"
:key=
"item.batchNo"
>
<div
class=
"task-title"
>
<div
class=
"task-title"
>
<label>
营销任务
{{
taskList
.
length
==
1
?
''
:
item
.
batchNo
}}
</label>
<label>
营销任务
{{
taskList
.
length
==
1
?
''
:
item
.
batchNo
}}
</label>
<template
v-if=
"item.excelUrl"
>
<div
class=
"task-operate"
v-show=
"item.expand"
@
click=
"handleExpand(item)"
>
<div
class=
"task-operate"
v-show=
"item.expand"
@
click=
"handleExpand(item)"
>
收起
收起
<i
class=
"el-icon-arrow-up"
></i>
<i
class=
"el-icon-arrow-up"
></i>
...
@@ -12,6 +14,7 @@
...
@@ -12,6 +14,7 @@
展开
展开
<i
class=
"el-icon-arrow-down"
></i>
<i
class=
"el-icon-arrow-down"
></i>
</div>
</div>
</
template
>
</div>
</div>
<div
class=
"task-box"
>
<div
class=
"task-box"
>
<
template
v-if=
"item.isFinish"
>
<
template
v-if=
"item.isFinish"
>
...
@@ -52,7 +55,7 @@
...
@@ -52,7 +55,7 @@
<label>
导入文档:
</label>
<label>
导入文档:
</label>
<span>
成功导入客户数
</span>
<span>
成功导入客户数
</span>
</div>
</div>
<div
class=
"task-box-desc"
:style=
"
{ height: item.expand ? 'auto' : '0px' }">
<div
class=
"task-box-desc"
:style=
"
{ height: item.expand ? 'auto' : '0px' }"
v-show="item.excelUrl"
>
<div
class=
"task-box-num"
>
成功导入客户数
</div>
<div
class=
"task-box-num"
>
成功导入客户数
</div>
<div
class=
"task-num-item flex-column-center"
>
<div
class=
"task-num-item flex-column-center"
>
<label>
分配方式:
</label>
<label>
分配方式:
</label>
...
@@ -114,7 +117,7 @@
...
@@ -114,7 +117,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"营销短信:"
:size=
"size"
>
<el-form-item
label=
"营销短信:"
:size=
"size"
>
<el-input
v-model=
"configForm.messageContent"
type=
"textarea"
:disabled=
"true"
></el-input>
<el-input
v-model=
"configForm.messageContent"
type=
"textarea"
:disabled=
"true"
rows=
"3"
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -123,10 +126,6 @@
...
@@ -123,10 +126,6 @@
</template>
</template>
<
script
>
<
script
>
const
config
=
Object
.
freeze
({
talkId
:
''
,
messageContent
:
'【广汇汽车】诚邀您参与{0},请尽快点击链接参与,谨防错过哦! {1} 谨防错过退订回T。'
})
const
taskData
=
{
tableData
:
[],
expand
:
true
,
assignType
:
0
,
customerNumTotal
:
0
,
lastFollowStaffList
:
[],
staffList
:
[],
excelUrl
:
''
,
isFinish
:
false
}
const
taskData
=
{
tableData
:
[],
expand
:
true
,
assignType
:
0
,
customerNumTotal
:
0
,
lastFollowStaffList
:
[],
staffList
:
[],
excelUrl
:
''
,
isFinish
:
false
}
import
{
mapActions
,
mapState
,
mapMutations
}
from
'vuex'
import
{
mapActions
,
mapState
,
mapMutations
}
from
'vuex'
export
default
{
export
default
{
...
@@ -143,7 +142,14 @@ export default {
...
@@ -143,7 +142,14 @@ export default {
},
},
isQrcodeVisible
:
false
,
isQrcodeVisible
:
false
,
configVisible
:
false
,
configVisible
:
false
,
configForm
:
config
,
config
:
{
talkId
:
''
,
messageContent
:
this
.
$messageModel
},
configForm
:
{
talkId
:
''
,
messageContent
:
this
.
$messageModel
},
tableData
:
[],
tableData
:
[],
roobList
:
[]
roobList
:
[]
}
}
...
@@ -292,8 +298,8 @@ export default {
...
@@ -292,8 +298,8 @@ export default {
this
.
roobList
=
res
.
list
||
[]
this
.
roobList
=
res
.
list
||
[]
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
configForm
=
{
this
.
configForm
=
{
talkId
:
row
.
row
.
talkId
?
row
.
row
.
talkId
:
config
.
talkId
,
talkId
:
row
.
row
.
talkId
?
row
.
row
.
talkId
:
this
.
config
.
talkId
,
messageContent
:
row
.
row
.
messageContent
?
row
.
row
.
messageContent
:
config
.
messageContent
messageContent
:
row
.
row
.
messageContent
?
row
.
row
.
messageContent
:
this
.
config
.
messageContent
}
}
})
})
})
})
...
@@ -353,7 +359,7 @@ export default {
...
@@ -353,7 +359,7 @@ export default {
merchantId
:
i
.
merchantNo
,
merchantId
:
i
.
merchantNo
,
staffPhone
:
i
.
staffPhone
,
staffPhone
:
i
.
staffPhone
,
staffName
:
i
.
staffName
,
staffName
:
i
.
staffName
,
messageContent
:
i
.
messageContent
?
i
.
messageContent
.
replace
(
/
广汇汽车/
,
this
.
$globalState
.
session
.
merchantName
)
:
''
,
messageContent
:
i
.
messageContent
?
i
.
messageContent
.
replace
(
/
^【
\S
+
?
】/
,
`【
${
this
.
$globalState
.
session
.
merchantName
}
】`
)
:
''
,
registerStatus
:
i
.
registerStatus
,
registerStatus
:
i
.
registerStatus
,
talkId
:
i
.
talkId
,
talkId
:
i
.
talkId
,
createdBy
:
i
.
createdBy
createdBy
:
i
.
createdBy
...
...
src/views/activityLink/components/PhoneView.vue
View file @
bb49c30
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32
* @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-
17 17:47:36
* @LastEditTime: 2023-07-
20 17:47:39
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -13,11 +13,13 @@
...
@@ -13,11 +13,13 @@
<img
src=
"@/assets/seckillActivity/phone.png"
class=
"review-phone"
/>
<img
src=
"@/assets/seckillActivity/phone.png"
class=
"review-phone"
/>
<div
class=
"review-title_top"
>
{{
detail
.
marketingTitle
||
detail
.
activityName
}}
</div>
<div
class=
"review-title_top"
>
{{
detail
.
marketingTitle
||
detail
.
activityName
}}
</div>
<div
class=
"review-content"
>
<div
class=
"review-content"
>
<div
class=
"review-main"
v-if=
"backgroundHeight"
:style=
"
{ height: backgroundHeight + 'px' }">
<template
v-if=
"backgroundHeight"
>
<div
class=
"review-main"
:style=
"
{ height: backgroundHeight + 'px' }">
<template
v-for=
"item in draggableList"
>
<template
v-for=
"item in draggableList"
>
<vue-draggable-resizable
<vue-draggable-resizable
:customId=
"item.customId"
:customId=
"item.customId"
:key=
"item.customId"
:key=
"item.customId"
:resizable=
"false"
v-if=
"item.type == 'text'"
v-if=
"item.type == 'text'"
:w=
"item.width"
:w=
"item.width"
:h=
"item.height"
:h=
"item.height"
...
@@ -38,9 +40,16 @@
...
@@ -38,9 +40,16 @@
</vue-draggable-resizable>
</vue-draggable-resizable>
</
template
>
</
template
>
<div
class=
"review-bg-img"
>
<div
class=
"review-bg-img"
>
<img
:src=
"detail.backgroundImage"
v-if=
"detail.backgroundImage"
/>
<img
:src=
"detail.backgroundImage || detail.mainImage"
v-if=
"detail.backgroundImage || detail.mainImage"
/>
</div>
<div
class=
"review-logo-img"
:style=
"{ height: logoInfo.height + 'px', width: logoInfo.width + 'px', top: logoInfo.y + 'px', left: logoInfo.x + 'px' }"
>
<img
:src=
"detail.merchantLogo"
v-if=
"detail.merchantLogo"
/>
</div>
</div>
</div>
</div>
<div
class=
"review-main-img"
>
<img
:src=
"detail.detailImage"
v-if=
"detail.detailImage"
/>
</div>
</template>
<div
class=
"review-main"
v-else
>
<div
class=
"review-main"
v-else
>
<div
class=
"review-bg-img"
>
<div
class=
"review-bg-img"
>
<img
:src=
"detail.activityBigImg"
v-if=
"detail.activityBigImg"
/>
<img
:src=
"detail.activityBigImg"
v-if=
"detail.activityBigImg"
/>
...
@@ -128,7 +137,7 @@
...
@@ -128,7 +137,7 @@
<img
:src=
"detail.detailImage"
v-if=
"detail.detailImage"
/>
<img
:src=
"detail.detailImage"
v-if=
"detail.detailImage"
/>
</div>
</div>
<div
class=
"review-logo-img"
:style=
"
{ height: logoInfo.height + 'px', width: logoInfo.width + 'px', top: logoInfo.y + 'px', left: logoInfo.x + 'px' }">
<div
class=
"review-logo-img"
:style=
"
{ height: logoInfo.height + 'px', width: logoInfo.width + 'px', top: logoInfo.y + 'px', left: logoInfo.x + 'px' }">
<img
:src=
"detail.merchantLog
"
v-if=
"detail.merchantLog
"
/>
<img
:src=
"detail.merchantLog
o"
v-if=
"detail.merchantLogo
"
/>
</div>
</div>
</
template
>
</
template
>
</div>
</div>
...
@@ -404,7 +413,9 @@ export default {
...
@@ -404,7 +413,9 @@ export default {
handler
(
val
)
{
handler
(
val
)
{
const
info
=
this
.
$common
.
utils
.
deepClone
(
val
)
const
info
=
this
.
$common
.
utils
.
deepClone
(
val
)
if
(
this
.
routerInfo
.
addOrEdit
==
'edit'
)
{
if
(
this
.
routerInfo
.
addOrEdit
==
'edit'
)
{
this
.
showActivity
(
info
)
info
.
marketingTitle
=
info
.
activityName
info
.
marketingSubtitle
=
info
.
subTitle
this
.
validActivity
(
info
)
}
}
},
},
deep
:
true
,
deep
:
true
,
...
@@ -414,11 +425,7 @@ export default {
...
@@ -414,11 +425,7 @@ export default {
handler
(
val
)
{
handler
(
val
)
{
const
detail
=
{
...
this
.
detail
,
...
val
[
2
]
}
const
detail
=
{
...
this
.
detail
,
...
val
[
2
]
}
detail
.
activityPrice
=
val
[
1
].
activityPrice
detail
.
activityPrice
=
val
[
1
].
activityPrice
if
(
this
.
routerInfo
.
addOrEdit
==
'edit'
)
{
this
.
showActivity
(
detail
)
}
else
{
this
.
validActivity
(
detail
)
this
.
validActivity
(
detail
)
}
},
},
deep
:
true
,
deep
:
true
,
immediate
:
true
immediate
:
true
...
@@ -441,6 +448,7 @@ export default {
...
@@ -441,6 +448,7 @@ export default {
},
},
validActivity
(
detail
)
{
validActivity
(
detail
)
{
this
.
detail
=
detail
this
.
detail
=
detail
console
.
log
(
this
.
detail
,
99
)
this
.
detailCoupon
=
this
.
$common
.
utils
.
deepClone
(
this
.
packageList
)
this
.
detailCoupon
=
this
.
$common
.
utils
.
deepClone
(
this
.
packageList
)
this
.
$nextTick
(
async
()
=>
{
this
.
$nextTick
(
async
()
=>
{
this
.
isFestival
=
false
this
.
isFestival
=
false
...
@@ -449,7 +457,7 @@ export default {
...
@@ -449,7 +457,7 @@ export default {
if
(
RENEWAL
.
includes
(
this
.
detail
.
codeId
))
{
if
(
RENEWAL
.
includes
(
this
.
detail
.
codeId
))
{
this
.
modelNum
=
this
.
detail
.
codeId
this
.
modelNum
=
this
.
detail
.
codeId
this
.
isRenewal
=
true
this
.
isRenewal
=
true
this
.
backgroundHeight
=
await
this
.
getImgH
(
this
.
detail
.
backgroundImage
)
this
.
backgroundHeight
=
await
this
.
getImgH
(
this
.
detail
.
backgroundImage
||
this
.
detail
.
mainImage
)
const
style1
=
JSON
.
parse
(
this
.
detail
.
titleStyle
)
const
style1
=
JSON
.
parse
(
this
.
detail
.
titleStyle
)
const
style2
=
JSON
.
parse
(
this
.
detail
.
subTitleStyle
)
const
style2
=
JSON
.
parse
(
this
.
detail
.
subTitleStyle
)
const
styles
=
[
style1
,
style2
]
const
styles
=
[
style1
,
style2
]
...
@@ -459,8 +467,26 @@ export default {
...
@@ -459,8 +467,26 @@ export default {
style
.
size
=
parseInt
(
style
.
size
*
RATIO
)
style
.
size
=
parseInt
(
style
.
size
*
RATIO
)
style
.
width
=
parseInt
(
style
.
width
*
RATIO
)
style
.
width
=
parseInt
(
style
.
width
*
RATIO
)
}
}
Object
.
assign
(
this
.
draggableList
[
0
],
{
content
:
this
.
detail
.
marketingTitle
,
...
style1
,
color
:
style1
.
style
.
color
,
font
:
style1
.
font
})
Object
.
assign
(
this
.
draggableList
[
0
],
{
content
:
this
.
detail
.
marketingTitle
,
...
style1
,
width
:
this
.
detail
.
marketingTitle
.
length
*
(
style1
.
size
+
0.5
),
color
:
style1
.
style
.
color
,
font
:
style1
.
font
,
height
:
'auto'
})
Object
.
assign
(
this
.
draggableList
[
1
],
{
content
:
this
.
detail
.
marketingSubtitle
,
...
style2
,
color
:
style2
.
style
.
color
,
font
:
style2
.
font
})
Object
.
assign
(
this
.
draggableList
[
1
],
{
content
:
this
.
detail
.
marketingSubtitle
,
...
style2
,
width
:
this
.
detail
.
marketingSubtitle
.
length
*
(
style2
.
size
+
0.5
),
color
:
style2
.
style
.
color
,
font
:
style2
.
font
,
height
:
'auto'
})
setTimeout
(()
=>
{
const
textDom
=
document
.
querySelectorAll
(
'.img_cl'
)
textDom
.
forEach
(
item
=>
{
let
fontSize
=
this
.
getPropSize
(
item
,
'font-size'
)
let
height
=
this
.
getPropSize
(
item
,
'height'
)
let
content
=
item
.
textContent
.
trim
()
let
len
=
parseInt
(
content
.
length
)
if
(
height
>
fontSize
+
5
)
{
fontSize
-=
len
}
if
(
content
==
this
.
detail
.
marketingTitle
)
{
Object
.
assign
(
this
.
draggableList
[
0
],
{
size
:
fontSize
,
height
:
'auto'
,
width
:
content
.
length
*
(
fontSize
+
0.5
)
})
}
if
(
content
==
this
.
detail
.
marketingSubtitle
)
{
Object
.
assign
(
this
.
draggableList
[
1
],
{
size
:
fontSize
,
height
:
'auto'
,
width
:
content
.
length
*
(
fontSize
+
0.5
)
})
}
})
},
300
)
}
}
if
(
FESTIVAL
.
includes
(
this
.
detail
.
codeId
))
{
if
(
FESTIVAL
.
includes
(
this
.
detail
.
codeId
))
{
const
style1
=
JSON
.
parse
(
this
.
detail
.
titleStyle
)
const
style1
=
JSON
.
parse
(
this
.
detail
.
titleStyle
)
...
@@ -497,10 +523,14 @@ export default {
...
@@ -497,10 +523,14 @@ export default {
})
})
})
})
this
.
isFestival
=
true
this
.
isFestival
=
true
this
.
logoInfo
=
await
this
.
getImgWH
(
this
.
detail
.
merchantLog
)
}
}
if
(
this
.
detail
.
merchantLogo
)
this
.
logoInfo
=
await
this
.
getImgWH
(
this
.
detail
.
merchantLogo
)
console
.
log
(
this
.
detail
)
})
})
},
},
getPropSize
(
dom
,
prop
)
{
return
+
window
.
getComputedStyle
(
dom
)[
prop
].
match
(
/
\d
+/
)[
0
]
},
formatPrice
(
val
)
{
formatPrice
(
val
)
{
return
(
val
/
100
).
toFixed
(
2
).
replace
(
/
\.[
0
]
+$/
,
''
)
return
(
val
/
100
).
toFixed
(
2
).
replace
(
/
\.[
0
]
+$/
,
''
)
},
},
...
...
src/views/activityLink/components/Process.vue
View file @
bb49c30
...
@@ -12,17 +12,38 @@
...
@@ -12,17 +12,38 @@
<div
class=
"case-container-title"
>
预览营销方案
</div>
<div
class=
"case-container-title"
>
预览营销方案
</div>
<phoneView
ref=
"viewForm"
></phoneView>
<phoneView
ref=
"viewForm"
></phoneView>
</div>
</div>
<GLDialog
class=
"qr-dialog"
title=
"活动链接"
mode=
"mid"
:hasFooter=
"false"
:before-close=
"handleClose"
:visible
.
sync=
"isQrcodeVisible"
@
onOk=
"handleCancelConfirm"
>
<div
class=
"qrcode-body-link"
v-loading=
"loadingCode"
>
<div
class=
"flex"
>
<div
class=
"link-item"
v-for=
"(item, index) in linkCode"
:key=
"index"
>
<div
class=
"link-item-l"
>
<div
class=
"link-title"
>
{{
item
.
title
}}
</div>
<div
class=
"link-save"
><el-button
:size=
"size"
type=
"primary"
@
click=
"downloadIamge(linkInfo[item.name])"
>
保存图片
</el-button></div>
</div>
<div
class=
"link-item-r"
><el-image
:src=
"linkInfo[item.name]"
alt=
""
></el-image></div>
</div>
</div>
<div
class=
"link-address-box"
v-for=
"(item, index) in linkValue"
:key=
"index"
>
<div
class=
"link-address-title"
>
{{
item
.
title
}}
</div>
<div
class=
"link-address"
>
{{
linkInfo
[
item
.
name
]
}}
</div>
<div
class=
"link-clone"
><el-button
:size=
"size"
type=
"primary"
@
click=
"cloneText(linkInfo[item.name])"
>
复制链接
</el-button></div>
</div>
</div>
</GLDialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
const
RENEWAL
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
]
const
RENEWAL
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
]
const
FESTIVAL
=
[
9
,
10
]
const
FESTIVAL
=
[
9
,
10
]
const
WIDTH
=
244
const
RATIO
=
375
/
WIDTH
import
{
mapState
,
mapMutations
}
from
'vuex'
import
{
mapState
,
mapMutations
}
from
'vuex'
import
phoneView
from
'./PhoneView'
import
phoneView
from
'./PhoneView'
import
draw
from
'@/mixins/draw'
import
draw
from
'@/mixins/draw'
import
marketing
from
'@/mixins/marketing'
import
marketing
from
'@/mixins/marketing'
import
{
downloadIamge
}
from
'@/common/constant'
import
{
cloneText
}
from
'@/utils/index'
export
default
{
export
default
{
mixins
:
[
draw
,
marketing
],
mixins
:
[
draw
,
marketing
],
components
:
{
components
:
{
...
@@ -30,6 +51,17 @@ export default {
...
@@ -30,6 +51,17 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
isQrcodeVisible
:
false
,
loadingCode
:
false
,
linkCode
:
[
{
title
:
'活动二维码'
,
name
:
'qrCodeUrl'
},
{
title
:
'注册二维码'
,
name
:
'staffLoginQrCodeUrl'
}
],
linkValue
:
[
{
title
:
'注册链接'
,
name
:
'staffLoginLinkUrl'
},
{
title
:
'活动链接'
,
name
:
'linkUrl'
}
],
linkInfo
:
{},
showPhone
:
false
,
showPhone
:
false
,
loading
:
false
,
loading
:
false
,
caseList
:
[
caseList
:
[
...
@@ -43,6 +75,7 @@ export default {
...
@@ -43,6 +75,7 @@ export default {
process
:
{
process
:
{
handler
(
val
)
{
handler
(
val
)
{
for
(
let
k
in
val
)
{
for
(
let
k
in
val
)
{
console
.
log
(
val
[
k
])
this
.
caseList
[
k
].
isFinish
=
val
[
k
]
?
true
:
false
this
.
caseList
[
k
].
isFinish
=
val
[
k
]
?
true
:
false
}
}
},
},
...
@@ -61,11 +94,34 @@ export default {
...
@@ -61,11 +94,34 @@ export default {
immediate
:
true
immediate
:
true
}
}
},
},
beforeDestroy
()
{
this
.
init
()
},
methods
:
{
methods
:
{
...
mapMutations
(
'marketing'
,
[
'SET_INIT'
]),
...
mapMutations
(
'marketing'
,
[
'SET_INIT'
]),
init
()
{
init
()
{
this
.
SET_INIT
(
true
)
this
.
SET_INIT
(
true
)
},
},
downloadIamge
(
url
)
{
downloadIamge
(
url
)
},
cloneText
(
text
)
{
cloneText
(
text
)
},
getDetail
(
id
)
{
this
.
isQrcodeVisible
=
true
this
.
loadingCode
=
true
this
.
$apis
.
activity
.
getShared
({
id
}).
then
(
res
=>
{
if
(
res
)
{
this
.
linkInfo
=
res
}
this
.
loadingCode
=
false
})
},
handleClose
()
{
this
.
isQrcodeVisible
=
false
this
.
$router
.
push
(
'/activityLink/index'
)
},
//执行营销方案
//执行营销方案
async
handleSave
()
{
async
handleSave
()
{
let
params
=
{
merchantId
:
this
.
$globalState
.
session
.
merchantId
}
let
params
=
{
merchantId
:
this
.
$globalState
.
session
.
merchantId
}
...
@@ -79,21 +135,37 @@ export default {
...
@@ -79,21 +135,37 @@ export default {
this
.
loading
=
true
this
.
loading
=
true
const
{
const
{
backgroundHeight
,
backgroundHeight
,
detail
:
{
backgroundImage
,
titleStyle
,
subTitleStyle
},
logoInfo
,
detail
:
{
backgroundImage
,
detailImage
,
merchantLogo
,
titleStyle
,
subTitleStyle
},
draggableList
draggableList
}
=
this
.
$refs
.
viewForm
}
=
this
.
$refs
.
viewForm
let
url
=
backgroundImage
let
url
=
backgroundImage
if
(
RENEWAL
.
includes
(
params
.
codeId
)
&&
this
.
routerInfo
.
addOrEdit
!=
'edit'
)
{
if
(
RENEWAL
.
includes
(
params
.
codeId
))
{
url
=
await
this
.
createMain
(
backgroundHeight
,
backgroundImage
,
draggableList
)
//合并主图、文字
url
=
await
this
.
createMain
({
backgroundHeight
,
logoInfo
,
backgroundImage
,
detailImage
,
merchantLogo
},
draggableList
)
//合并主图、文字
const
style1
=
draggableList
[
0
]
const
style2
=
draggableList
[
1
]
const
titleStyle
=
JSON
.
parse
(
params
.
titleStyle
)
const
subTitleStyle
=
JSON
.
parse
(
params
.
subTitleStyle
)
const
styles
=
[
style1
,
style2
]
for
(
const
style
of
styles
)
{
style
.
x
=
parseInt
(
style
.
x
*
RATIO
)
style
.
y
=
parseInt
(
style
.
y
*
RATIO
)
style
.
size
=
parseInt
(
style
.
size
*
RATIO
)
style
.
width
=
parseInt
(
style
.
width
*
RATIO
)
}
params
.
titleStyle
=
JSON
.
stringify
(
Object
.
assign
(
titleStyle
,
{
x
:
style1
.
x
,
y
:
style1
.
y
,
size
:
style1
.
size
,
width
:
style1
.
width
}))
params
.
subTitleStyle
=
JSON
.
stringify
(
Object
.
assign
(
subTitleStyle
,
{
x
:
style2
.
x
,
y
:
style2
.
y
,
size
:
style2
.
size
,
width
:
style2
.
width
}))
}
}
if
(
FESTIVAL
.
includes
(
params
.
codeId
)
&&
this
.
routerInfo
.
addOrEdit
!=
'edit'
)
{
if
(
FESTIVAL
.
includes
(
params
.
codeId
))
{
url
=
await
this
.
createBig
(
this
.
$refs
.
viewForm
.
detail
,
this
.
logoInfo
,
JSON
.
parse
(
titleStyle
),
JSON
.
parse
(
subTitleStyle
))
//合并主图、背景图、logo、文字
url
=
await
this
.
createBig
(
this
.
$refs
.
viewForm
.
detail
,
logoInfo
,
JSON
.
parse
(
titleStyle
),
JSON
.
parse
(
subTitleStyle
))
//合并主图、背景图、logo、文字
}
}
let
origin
=
'createSuperMarketing'
let
origin
=
'createSuperMarketing'
if
(
params
.
id
&&
this
.
routerInfo
.
addOrEdit
==
'edit'
)
{
if
(
params
.
id
&&
this
.
routerInfo
.
addOrEdit
==
'edit'
)
{
origin
=
'updateApi'
origin
=
'updateApi'
params
.
activityName
=
params
.
marketingTitle
params
.
activityName
=
params
.
marketingTitle
params
.
activityAddressDetailName
=
params
.
merchantAddress
params
=
{
...
params
,
...
this
.
addProperties
(
params
)
}
params
=
{
...
params
,
...
this
.
addProperties
(
params
)
}
params
.
activityBigImg
=
url
params
=
this
.
deleteKeys
(
params
,
[
'activityActionReport'
,
'couponList'
,
'superMarketingCouponRelRequestList'
])
params
=
this
.
deleteKeys
(
params
,
[
'activityActionReport'
,
'couponList'
,
'superMarketingCouponRelRequestList'
])
params
.
startTime
=
params
.
starttime
.
replace
(
/
\/
/g
,
'-'
)
params
.
startTime
=
params
.
starttime
.
replace
(
/
\/
/g
,
'-'
)
params
.
endTime
=
params
.
endtime
.
replace
(
/
\/
/g
,
'-'
)
params
.
endTime
=
params
.
endtime
.
replace
(
/
\/
/g
,
'-'
)
...
@@ -101,13 +173,15 @@ export default {
...
@@ -101,13 +173,15 @@ export default {
if
(
params
.
codeId
)
delete
params
.
activityDetail
if
(
params
.
codeId
)
delete
params
.
activityDetail
params
.
subscribe
=
this
.
subscribe
params
.
subscribe
=
this
.
subscribe
params
.
bigImage
=
url
params
.
bigImage
=
url
if
(
!
params
.
serviceMerchantPackageConfigDTOS
)
{
delete
params
.
serviceMerchantPackageConfigDTOS
}
this
.
$apis
.
marketing
[
origin
](
params
)
this
.
$apis
.
marketing
[
origin
](
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
loading
=
false
this
.
loading
=
false
this
.
init
(
)
this
.
getDetail
(
res
.
id
?
res
.
id
:
res
)
this
.
$message
.
success
(
'操作成功'
)
this
.
$message
.
success
(
'操作成功'
)
if
(
params
.
id
)
this
.
$router
.
push
(
'/activityLink/index'
)
}
}
})
})
.
finally
(()
=>
{
.
finally
(()
=>
{
...
@@ -139,6 +213,49 @@ export default {
...
@@ -139,6 +213,49 @@ export default {
background
:
#ffffff
;
background
:
#ffffff
;
padding-top
:
10px
;
padding-top
:
10px
;
}
}
.qrcode-body-link
{
.link-address-box
{
background
:
#f8f8f8
;
border-radius
:
2px
;
padding
:
20px
;
position
:
relative
;
margin-top
:
20px
;
.link-address-title
{
font-size
:
14px
;
color
:
#333333
;
margin-bottom
:
10px
;
}
.link-address
{
font-size
:
14px
;
color
:
#999999
;
}
.link-clone
{
position
:
absolute
;
top
:
20px
;
right
:
20px
;
}
}
.flex
{
gap
:
10px
;
.link-item
{
background
:
#f8f8f8
;
border-radius
:
2px
;
padding
:
20px
;
flex
:
1
;
display
:
flex
;
justify-content
:
space-between
;
.link-item-l
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
}
.link-item-r
{
width
:
120px
;
height
:
120px
;
}
}
}
}
.case-step
{
.case-step
{
width
:
279px
;
width
:
279px
;
height
:
170px
;
height
:
170px
;
...
...
src/views/activityLink/components/Scene.vue
View file @
bb49c30
...
@@ -203,20 +203,25 @@ export default {
...
@@ -203,20 +203,25 @@ export default {
align-items
:
center
;
align-items
:
center
;
position
:
relative
;
position
:
relative
;
z-index
:
1
;
z-index
:
1
;
&:last-child
{
.scene-item-box
{
width
:
calc
(
100%
-
80px
);
}
}
&
-box
{
&
-box
{
z-index
:
1
;
z-index
:
1
;
cursor
:
pointer
;
cursor
:
pointer
;
width
:
calc
(
100%
-
30px
);
width
:
calc
(
100%
-
30px
);
height
:
0
;
height
:
0
;
padding-bottom
:
50%
;
padding-bottom
:
80%
;
padding-bottom
:
50%
;
background-image
:
url('../../../assets/marketing/scence-bg.png')
;
background-image
:
url('../../../assets/marketing/scence-bg.png')
;
background-size
:
100%
100%
;
background-size
:
100%
100%
;
padding-left
:
8%
;
padding-left
:
12%
;
padding-right
:
8%
;
padding-right
:
12%
;
font-size
:
1vw
;
.scene-item-icon
{
.scene-item-icon
{
text-align
:
center
;
text-align
:
center
;
margin-top
:
0.5
vw
;
margin-top
:
2
vw
;
img
{
img
{
width
:
1.7vw
;
width
:
1.7vw
;
vertical-align
:
middle
;
vertical-align
:
middle
;
...
...
src/views/activityLink/components/SelectInsure.vue
View file @
bb49c30
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-07-06 11:45:15
* @Date: 2023-07-06 11:45:15
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-1
7 18:21:24
* @LastEditTime: 2023-07-1
8 16:36:52
* @FilePath: \scrm-micro-link\src\views\activityLink\components\SelectInsure.vue
* @FilePath: \scrm-micro-link\src\views\activityLink\components\SelectInsure.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -48,15 +48,7 @@ export default {
...
@@ -48,15 +48,7 @@ export default {
})
})
},
},
handleConfirm
()
{
handleConfirm
()
{
this
.
$confirm
(
'是否覆盖营销礼包的内容?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
this
.
$emit
(
'handleSure'
,
this
.
selectObj
)
this
.
$emit
(
'handleSure'
,
this
.
selectObj
)
})
.
catch
(()
=>
{})
},
},
handleModelClose
()
{
handleModelClose
()
{
this
.
$emit
(
'handleClose'
)
this
.
$emit
(
'handleClose'
)
...
...
src/views/activityLink/components/selectEquityDialog.vue
View file @
bb49c30
...
@@ -140,7 +140,7 @@ export default {
...
@@ -140,7 +140,7 @@ export default {
this
.
$apis
.
giftBag
this
.
$apis
.
giftBag
.
equityMerchant
(
params
)
.
equityMerchant
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
EquityList
=
res
.
packageConfigs
this
.
EquityList
=
(
res
.
packageConfigs
||
[]).
filter
(
item
=>
item
.
isChecked
==
1
)
this
.
$refs
.
equityRef
.
tableHeightValues
=
'52vh'
this
.
$refs
.
equityRef
.
tableHeightValues
=
'52vh'
this
.
recoverySelected
()
this
.
recoverySelected
()
})
})
...
...
src/views/activityLink/editActivity.vue
View file @
bb49c30
...
@@ -2121,6 +2121,9 @@ export default {
...
@@ -2121,6 +2121,9 @@ export default {
})
})
param
.
couponCreateRequests
=
couponLists
.
concat
(
selectedGoodsList
)
||
[]
param
.
couponCreateRequests
=
couponLists
.
concat
(
selectedGoodsList
)
||
[]
const
equityServices
=
this
.
selectedEquityList
.
map
(
i
=>
i
.
packageCode
)
const
equityServices
=
this
.
selectedEquityList
.
map
(
i
=>
i
.
packageCode
)
if
(
!
param
.
serviceMerchantPackageConfigDTOS
)
{
delete
param
.
serviceMerchantPackageConfigDTOS
}
param
.
equityServices
=
equityServices
.
join
(
','
)
param
.
equityServices
=
equityServices
.
join
(
','
)
delete
param
.
couponList
delete
param
.
couponList
// 标杆门店总产值/元(已结束战报)
// 标杆门店总产值/元(已结束战报)
...
...
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