Commit bb49c303 by 前端

Merge branch 'v3.13.3' into 'master'

V3.13.3

See merge request !12
2 parents 3e0cad58 34288f7c
......@@ -15,6 +15,11 @@
"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": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
......@@ -1888,51 +1893,6 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"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": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
......@@ -1941,28 +1901,6 @@
"requires": {
"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 @@
}
},
"glsx-components": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/glsx-components/-/glsx-components-1.5.2.tgz",
"integrity": "sha512-5/LaPu0B1uT7Kzl6oyIqyFT/NXIz2w7HNstiRtHaUQN1waSrPPPtzRRwywJg6CSSL+p994NaqPRnX696NAYzKg==",
"version": "1.5.7",
"resolved": "https://registry.npmjs.org/glsx-components/-/glsx-components-1.5.7.tgz",
"integrity": "sha512-WEWt1Ev7uf8VgILrEr15ZHxOreqWEVEY2WRP5EmZKzYKTVF/7dQU/oI84+Xo4vSmlz7ltblaATyrwm1U1LDnHg==",
"requires": {
"@amap/amap-jsapi-loader": "^1.0.1",
"core-js": "^3.6.5",
"element-ui": "^2.15.6",
"glsx-common": "^1.4.9",
"vue": "^2.6.11",
"vue-amap": "^0.5.10",
"vuedraggable": "^2.24.3"
},
"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": {
"version": "1.4.9",
"resolved": "https://registry.npmjs.org/glsx-common/-/glsx-common-1.4.9.tgz",
......@@ -6524,16 +6472,6 @@
"md5": "^2.3.0",
"qs": "^6.10.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 @@
"integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==",
"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": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
......@@ -13254,6 +13207,14 @@
"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": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/vue-cli-plugin-element/-/vue-cli-plugin-element-1.0.1.tgz",
......@@ -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": {
"version": "3.6.5",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz",
......
......@@ -15,7 +15,7 @@
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^2.0.4",
"glsx-components": "^1.2.5",
"glsx-components": "^1.5.7",
"vod-js-sdk-v6": "^1.5.0",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-19 13:46:20
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -32,12 +32,12 @@ export default {
async createBig(info, logoInfo, titleStyle, subTitleStyle) {
console.log(info)
this.loading = true
const { backgroundImage, detailImage, merchantLog, marketingTitle, marketingSubtitle } = info
const { backgroundImage, merchantLogo, marketingTitle, marketingSubtitle } = info
if (!backgroundImage) return
try {
const res = await Promise.all([this.getImgInfo(backgroundImage), this.getImgInfo(detailImage), this.getImgInfo(merchantLog)])
const h = (res[0].dh / res[0].dw) * WIDTH + (res[1].dh / res[1].dw) * WIDTH
this.logoInfo = { url: merchantLog, ...logoInfo }
const res = await Promise.all([this.getImgInfo(backgroundImage), this.getImgInfo(merchantLogo)])
const h = (res[0].dh / res[0].dw) * WIDTH
this.logoInfo = { url: merchantLogo, ...logoInfo }
const drawfun = new Drawing(document.getElementById('canvasId'), {
width: WIDTH,
height: h
......@@ -48,17 +48,12 @@ export default {
x: 0,
y: 0,
width: WIDTH,
height: (res[0].dh / res[0].dw) * WIDTH
},
{
url: detailImage,
x: 0,
y: (res[0].dh / res[0].dw) * WIDTH,
width: WIDTH,
height: (res[1].dh / res[1].dw) * WIDTH
},
{ ...this.logoInfo }
].filter(item => item.url)
height: h
}
]
if (info.merchantLogo) {
imageList.push({ ...logoInfo, url: info.merchantLogo })
}
const styles = [titleStyle, subTitleStyle]
for (const style of styles) {
style.x = parseInt(style.x * RATIO)
......@@ -92,7 +87,7 @@ export default {
})
})
}
console.log(title, textList)
console.log(imageList, 'imageList')
const canvasBase64 = await drawfun.begin({
imageList,
textList
......@@ -104,22 +99,25 @@ export default {
console.log(e)
}
},
async createMain(h, url, draggableList) {
async createMain(info, draggableList) {
const style1 = draggableList[0]
const style2 = draggableList[1]
const drawfun = new Drawing(document.getElementById('canvasId'), {
width: WIDTH,
height: h
height: info.backgroundHeight
})
const imageList = [
{
url,
url: info.backgroundImage,
x: 0,
y: 0,
width: WIDTH,
height: h
height: info.backgroundHeight
}
]
if (info.merchantLogo) {
imageList.push({ ...info.logoInfo, url: info.merchantLogo })
}
const textList = [
{ 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 }
......
......@@ -21,6 +21,8 @@ export default {
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'packageCode',
checkSelectKey: 'packageCode',
checkSelectVal: '',
// 多选ref的名称
mutiSelectName: 'list',
tableColumns: [
......@@ -42,6 +44,9 @@ export default {
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'packageCode',
checkSelectKey: 'id',
checkSelectVal: '',
checkSelectable: null,
// 多选ref的名称
mutiSelectName: 'list',
tableColumns: [
......@@ -81,7 +86,7 @@ export default {
goodsTableParams: {
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'packageCode',
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: 'list',
tableColumns: [
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-12-13 09:23:57
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-13 20:56:07
* @LastEditTime: 2023-07-19 17:32:17
* @FilePath: \scrm-micro-link\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -20,13 +20,14 @@ let instance = null
Vue.use(ElementUI)
Vue.use(GLTable)
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.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$message = message
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_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 } })
......
......@@ -2,13 +2,13 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 17:13:33
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import apis from '@/api'
const subscribeData = { 5: '保险', 2: '定保', 9: '售后众筹' }
const subscribeData = { 5: '续保', 2: '定保', 9: '售后众筹' }
export default {
namespaced: true,
......@@ -46,10 +46,6 @@ export default {
},
// 设置活动信息
SET_ACTIVITY_INFO(state, data) {
if (data.activityBigImg) {
data.backgroundImage = data.activityBigImg
data.merchantAddress = data.activityAddressDetailName
}
state.activityInfo = Object.assign({}, data)
},
SET_KET_WORDs(state, data) {
......@@ -87,12 +83,8 @@ export default {
},
getTemplateInfo({ state }, data) {
apis.marketing.calendarDetail({ id: data }).then(res => {
const { title, subTitle, startTime, endTime, backgroundImg, captionImg, codeId, couponItemList = [], subTitleStyle, titleStyle } = res || {}
if (couponItemList && couponItemList.length)
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'] })
const { title, subTitle, startTime, endTime, backgroundImg, captionImg, codeId, subTitleStyle, titleStyle } = res || {}
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'] })
})
},
//活动模板详情
......
......@@ -184,7 +184,7 @@ export default {
//用车权益
getCarList() {
var params = {
...this.searchForm,
isChecked: 1,
merchantId: this.merchantId
}
this.loading = true
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-29 21:24:27
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -13,7 +13,7 @@
<el-button :size="size" icon="el-icon-plus" @click="modelVisible = true">选择模板</el-button>
</div>
<div slot="marketingTitle" class="input-slot">
<el-input placeholder="请输入营销主题" v-model="editForm.marketingTitle" style="width:400px" maxlength="12" show-word-limit></el-input>
<el-input placeholder="请输入营销主题" v-model="editForm.marketingTitle" style="width:400px" maxlength="10" show-word-limit></el-input>
<label @click="getGPTitle(1)" v-if="GPTList">ChatGPT重新生成</label>
<label v-else class="disabled-label">ChatGPT重新生成</label>
</div>
......@@ -58,7 +58,7 @@ export default {
activityTime: [],
backgroundImage: '',
detailImage: '',
merchantLog: ''
merchantLogo: ''
},
editFormData: [
{
......@@ -71,7 +71,7 @@ export default {
name: 'marketingTitle',
addHtml: 'marketingTitle',
type: 'input',
maxlength: 12
maxlength: 10
},
{
label: '营销副标题',
......@@ -165,14 +165,14 @@ export default {
},
{
label: '门店Logo',
name: 'merchantLog',
name: 'merchantLogo',
type: 'upload',
width: '320px',
mark: '建议尺寸:最大1M,尺寸216*60',
style: 'color: #999999;',
limitSize: 5,
maxPhotoNum: 1,
suffixSlot: 'merchantLog',
suffixSlot: 'merchantLogo',
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
......@@ -278,7 +278,7 @@ export default {
activityTime: [],
backgroundImage: '',
detailImage: '',
merchantLog: '',
merchantLogo: '',
merchantname: this.merchantInfo.merchantName,
merchantAddress: this.merchantInfo.merchantAddress
}
......@@ -300,13 +300,17 @@ export default {
return
}
console.log(888)
this.editForm = Object.assign({ merchantLog: '' }, info)
this.editForm = Object.assign({ merchantLogo: '' }, info)
if (info.activityName) {
this.$set(this.editForm, 'marketingTitle', info.activityName)
}
if (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) {
this.$set(this.editForm, 'activityTime', [info.starttime.replace(/-/g, '/'), info.endtime.replace(/-/g, '/')])
}
......@@ -326,7 +330,7 @@ export default {
...info,
merchantname: this.merchantInfo.merchantName,
merchantAddress: this.merchantInfo.merchantAddress,
merchantLog: '',
merchantLogo: '',
mainColor: ''
}
console.log(this.editForm, 9)
......@@ -343,8 +347,11 @@ export default {
param.starttime = d[0]
param.endtime = d[1]
}
param.mainImage = param.backgroundImage
delete param.createdTime
delete param.activityPrice
delete param.giftId
delete param.serviceMerchantPackageConfigDTOS
return param
},
handleSave() {
......
......@@ -2,7 +2,7 @@
<div>
<glsx-combi-form class="edit-form-container" :isBlock="true" ref="editFormRef" formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<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">
<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>
......@@ -36,6 +36,7 @@
<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-border" :style="{ left: (serviceIndex == 7 ? 0 : serviceIndex - 1) * 88 + 2 + 'px' }"></div>
<div class="service-tip">(仅支持引用无限库存券)</div>
<div class="tab-right">
<div class="refresh-btn" @click="getList">
<i class="el-icon-refresh-right"></i>
......@@ -67,7 +68,7 @@
</div>
</glsx-combi-form>
<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>
</div>
<GLDialog class="qr-dialog" title="保存礼包" mode="mid" :visible.sync="giftVisible" @onOk="handleConfirm" @onCancel="giftVisible = false">
......@@ -97,6 +98,7 @@ export default {
data() {
return {
isInit: this.$route.query.addOrEdit == 'add',
isGhPackage: false,
giftValue: '',
editForm: {
giftList: 1,
......@@ -128,7 +130,6 @@ export default {
},
watch: {
subscribe(val) {
console.log(val, 999999)
if (val) this.getGiftList(val)
},
// 'editForm.activityPrice'(newValue, oldValue) {
......@@ -149,6 +150,9 @@ export default {
activityInfo: {
handler(val) {
const info = this.$common.utils.deepClone(val)
if (this.routerInfo.addOrEdit == 'add') {
return
}
this.init()
this.$nextTick(() => {
if (info.serviceMerchantPackageConfigDTOS) this.selectedCarList = info.serviceMerchantPackageConfigDTOS
......@@ -165,11 +169,15 @@ export default {
if (info.activityPrice) {
this.editForm.activityPrice = info.activityPrice / 100
}
this.giftValue = info.giftId || ''
if (this.giftValue && info.ghExclusiveFlag == 2) {
this.getModel()
}
setTimeout(() => {
if (this.routerInfo.addOrEdit == 'edit') {
this.handleSaveGift()
}
}, 1000)
}, 0)
this.getList()
})
......@@ -194,11 +202,18 @@ export default {
this.goodsList = []
this.selectedGoodsList = []
this.totalPrice = 0
this.editForm.activityPrice = ''
this.$refs['carRef'].$refs['listMutiTable'].clearSelection()
this.$refs['goodsRef' + this.goodsIndex][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) {
const { merchantId } = this
let params = {
......@@ -213,13 +228,9 @@ export default {
this.totalPrice = 0
for (let i = 0; i < this.selectedCarList.length; i++) {
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.$message.error('输入用车权益价格')
return
}
this.totalPrice = this.totalPrice + parseFloat(this.selectedCarList[i].packageAmount)
this.totalPrice = this.totalPrice + parseFloat(this.selectedCarList[i].packageAmount || 0)
}
},
handleSaveGift() {
......@@ -234,7 +245,7 @@ export default {
}
this.totalPrice = 0
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) }))
const selectedGoodsList = [...this.selectedGoodsList, ...this.selectedServiceList].map(item => {
......@@ -257,7 +268,10 @@ export default {
params.equityServices = equityServices.join(',')
params.activityPrice = (this.editForm.activityPrice * 100).toFixed(0)
params.superMarketingCouponRelRequestList = selectedGoodsList || []
console.log(params)
params.giftId = this.giftValue
if (this.giftValue) {
this.handleSave()
}
this.SET_STEP(3)
this.setProcess({
1: {
......@@ -266,10 +280,15 @@ export default {
})
},
handleSave() {
this.giftVisible = true
this.giftName = ''
if (this.giftValue) {
const giftList = this.giftList.find(item => this.giftValue == item.id)
this.handleConfirm(giftList)
} else {
this.giftVisible = true
this.giftName = ''
}
},
handleConfirm() {
handleConfirm(res) {
const { merchantId, selectedServiceList, selectedGoodsList, subscribe, giftName } = this
const selectedCarList = this.selectedCarList.filter(item => item.packageAmount)
const couponIds = [...selectedServiceList, ...selectedGoodsList].map(item => {
......@@ -277,8 +296,9 @@ export default {
})
const equities = {}
this.totalPrice = 0
if (selectedCarList.length == 0) {
this.$message.error('输入用车权益价格')
console.log(selectedCarList.length + selectedServiceList.length + selectedGoodsList.length)
if (selectedCarList.length + selectedServiceList.length + selectedGoodsList.length == 0) {
this.$message.error('权益服务、平台优惠、门店优惠券至少选一项')
return
}
for (let i = 0; i < selectedCarList.length; i++) {
......@@ -293,6 +313,10 @@ export default {
couponIds: JSON.stringify(couponIds),
equities: JSON.stringify(equities)
}
if (res && res.id) {
params.id = res.id
params.name = res.name
}
this.$apis.giftBag.packageAdd(params).then(res => {
if (res) {
this.giftVisible = false
......@@ -421,7 +445,7 @@ export default {
equities = JSON.parse(res.equities)
}
var params = {
...this.searchForm,
isChecked: 1,
merchantId: this.merchantId
}
this.loading = true
......@@ -429,7 +453,7 @@ export default {
.equityMerchant(params)
.then(res => {
this.loading = false
const packageConfigs = res.packageConfigs || []
const packageConfigs = (res.packageConfigs || []).filter(item => item.isChecked == 1)
if (this.isInit) {
this.selectedCarList = []
}
......@@ -450,14 +474,14 @@ export default {
this.isInit = false
this.selectedCarList.forEach(s => {
if (p.packageCode == s.packageCode) {
p.packageAmount = s.packageAmount
p.packageAmount = s.packageAmount || 0
}
})
this.calcCarValue()
})
console.log(this.selectedCarList)
this.carList = packageConfigs
this.selectedPreExisting(this.selectedCarList, this.carList, 'packageCode', this.$refs['carRef'])
this.validGh()
})
.finally(() => {
this.loading = false
......@@ -527,6 +551,7 @@ export default {
// this.fnCallBack = true
this.$refs['serviceRef' + this.serviceIndex][0].tableTotal = res.total
this.selectedPreExisting(this.selectedServiceList, this.serviceList, 'id', this.$refs['serviceRef' + this.serviceIndex][0])
this.validGh()
})
.finally(() => {
this.loading = false
......@@ -543,14 +568,13 @@ export default {
let activityCoupon = res.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.selectedServiceList = activityCoupon.filter(i => i.discountType != 8)
}
activityCoupon.forEach(item => {
item.id = item.couponId
item.denomination = item.couponAnticipatedCost
})
this.selectedGoodsList = activityCoupon.filter(i => i.discountType == 8)
this.selectedServiceList = activityCoupon.filter(i => i.discountType != 8)
console.log(this.selectedGoodsList, this.selectedServiceList)
this.getList()
})
})
......@@ -559,6 +583,9 @@ export default {
this.giftVisible = false
},
tabClick(index) {
if ((index == 1 || index == 3) && this.activityInfo.ghExclusiveFlag == 2) {
this.$message.error('不可以修改用车权益/门店服务')
}
this.currentIndex = index
}
},
......@@ -566,6 +593,7 @@ export default {
this.setProcess({
1: false
})
if (this.routerInfo.addOrEdit == 'edit') this.SET_STEP(3)
}
}
</script>
......@@ -635,10 +663,16 @@ export default {
background: #ffffff;
transition: all 0.5s;
}
.service-tip {
position: absolute;
right: -160px;
top: 3px;
color: #999;
}
.tab-right {
display: flex;
position: absolute;
right: -30vw;
right: -25vw;
top: 0px;
.refresh-btn {
cursor: pointer;
......
......@@ -4,14 +4,17 @@
<div class="task-item" v-for="item in taskList" :key="item.batchNo">
<div class="task-title">
<label>营销任务{{ taskList.length == 1 ? '' : item.batchNo }}</label>
<div class="task-operate" v-show="item.expand" @click="handleExpand(item)">
收起
<i class="el-icon-arrow-up"></i>
</div>
<div class="task-operate" v-show="!item.expand" @click="handleExpand(item)">
展开
<i class="el-icon-arrow-down"></i>
</div>
<template v-if="item.excelUrl">
<div class="task-operate" v-show="item.expand" @click="handleExpand(item)">
收起
<i class="el-icon-arrow-up"></i>
</div>
<div class="task-operate" v-show="!item.expand" @click="handleExpand(item)">
展开
<i class="el-icon-arrow-down"></i>
</div>
</template>
</div>
<div class="task-box">
<template v-if="item.isFinish">
......@@ -52,7 +55,7 @@
<label>导入文档:</label>
<span>成功导入客户数</span>
</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-num-item flex-column-center">
<label>分配方式:</label>
......@@ -114,7 +117,7 @@
</el-select>
</el-form-item>
<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>
</div>
......@@ -123,10 +126,6 @@
</template>
<script>
const config = Object.freeze({
talkId: '',
messageContent: '【广汇汽车】诚邀您参与{0},请尽快点击链接参与,谨防错过哦! {1} 谨防错过退订回T。'
})
const taskData = { tableData: [], expand: true, assignType: 0, customerNumTotal: 0, lastFollowStaffList: [], staffList: [], excelUrl: '', isFinish: false }
import { mapActions, mapState, mapMutations } from 'vuex'
export default {
......@@ -143,7 +142,14 @@ export default {
},
isQrcodeVisible: false,
configVisible: false,
configForm: config,
config: {
talkId: '',
messageContent: this.$messageModel
},
configForm: {
talkId: '',
messageContent: this.$messageModel
},
tableData: [],
roobList: []
}
......@@ -292,8 +298,8 @@ export default {
this.roobList = res.list || []
this.$nextTick(() => {
this.configForm = {
talkId: row.row.talkId ? row.row.talkId : config.talkId,
messageContent: row.row.messageContent ? row.row.messageContent : config.messageContent
talkId: row.row.talkId ? row.row.talkId : this.config.talkId,
messageContent: row.row.messageContent ? row.row.messageContent : this.config.messageContent
}
})
})
......@@ -353,7 +359,7 @@ export default {
merchantId: i.merchantNo,
staffPhone: i.staffPhone,
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,
talkId: i.talkId,
createdBy: i.createdBy
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -13,34 +13,43 @@
<img src="@/assets/seckillActivity/phone.png" class="review-phone" />
<div class="review-title_top">{{ detail.marketingTitle || detail.activityName }}</div>
<div class="review-content">
<div class="review-main" v-if="backgroundHeight" :style="{ height: backgroundHeight + 'px' }">
<template v-for="item in draggableList">
<vue-draggable-resizable
:customId="item.customId"
:key="item.customId"
v-if="item.type == 'text'"
:w="item.width"
:h="item.height"
:x="item.x"
:y="item.y"
:style="{
'font-size': item.size + 'px',
'font-family': item.font,
color: item.color
}"
class="img_cl"
parent=".review-main"
@dragging="onDrag"
@resizing="onResize"
@activated="onActivated"
>
{{ item.content }}
</vue-draggable-resizable>
</template>
<div class="review-bg-img">
<img :src="detail.backgroundImage" v-if="detail.backgroundImage" />
<template v-if="backgroundHeight">
<div class="review-main" :style="{ height: backgroundHeight + 'px' }">
<template v-for="item in draggableList">
<vue-draggable-resizable
:customId="item.customId"
:key="item.customId"
:resizable="false"
v-if="item.type == 'text'"
:w="item.width"
:h="item.height"
:x="item.x"
:y="item.y"
:style="{
'font-size': item.size + 'px',
'font-family': item.font,
color: item.color
}"
class="img_cl"
parent=".review-main"
@dragging="onDrag"
@resizing="onResize"
@activated="onActivated"
>
{{ item.content }}
</vue-draggable-resizable>
</template>
<div class="review-bg-img">
<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 class="review-main-img">
<img :src="detail.detailImage" v-if="detail.detailImage" />
</div>
</template>
<div class="review-main" v-else>
<div class="review-bg-img">
<img :src="detail.activityBigImg" v-if="detail.activityBigImg" />
......@@ -128,7 +137,7 @@
<img :src="detail.detailImage" v-if="detail.detailImage" />
</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.merchantLog" v-if="detail.merchantLog" />
<img :src="detail.merchantLogo" v-if="detail.merchantLogo" />
</div>
</template>
</div>
......@@ -404,7 +413,9 @@ export default {
handler(val) {
const info = this.$common.utils.deepClone(val)
if (this.routerInfo.addOrEdit == 'edit') {
this.showActivity(info)
info.marketingTitle = info.activityName
info.marketingSubtitle = info.subTitle
this.validActivity(info)
}
},
deep: true,
......@@ -414,11 +425,7 @@ export default {
handler(val) {
const detail = { ...this.detail, ...val[2] }
detail.activityPrice = val[1].activityPrice
if (this.routerInfo.addOrEdit == 'edit') {
this.showActivity(detail)
} else {
this.validActivity(detail)
}
this.validActivity(detail)
},
deep: true,
immediate: true
......@@ -441,6 +448,7 @@ export default {
},
validActivity(detail) {
this.detail = detail
console.log(this.detail, 99)
this.detailCoupon = this.$common.utils.deepClone(this.packageList)
this.$nextTick(async () => {
this.isFestival = false
......@@ -449,7 +457,7 @@ export default {
if (RENEWAL.includes(this.detail.codeId)) {
this.modelNum = this.detail.codeId
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 style2 = JSON.parse(this.detail.subTitleStyle)
const styles = [style1, style2]
......@@ -459,8 +467,26 @@ export default {
style.size = parseInt(style.size * 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[1], { content: this.detail.marketingSubtitle, ...style2, color: style2.style.color, font: style2.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, 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)) {
const style1 = JSON.parse(this.detail.titleStyle)
......@@ -497,10 +523,14 @@ export default {
})
})
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) {
return (val / 100).toFixed(2).replace(/\.[0]+$/, '')
},
......
......@@ -12,17 +12,38 @@
<div class="case-container-title">预览营销方案</div>
<phoneView ref="viewForm"></phoneView>
</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>
</template>
<script>
const RENEWAL = [1, 2, 3, 4, 5, 6, 7, 8]
const FESTIVAL = [9, 10]
const WIDTH = 244
const RATIO = 375 / WIDTH
import { mapState, mapMutations } from 'vuex'
import phoneView from './PhoneView'
import draw from '@/mixins/draw'
import marketing from '@/mixins/marketing'
import { downloadIamge } from '@/common/constant'
import { cloneText } from '@/utils/index'
export default {
mixins: [draw, marketing],
components: {
......@@ -30,6 +51,17 @@ export default {
},
data() {
return {
isQrcodeVisible: false,
loadingCode: false,
linkCode: [
{ title: '活动二维码', name: 'qrCodeUrl' },
{ title: '注册二维码', name: 'staffLoginQrCodeUrl' }
],
linkValue: [
{ title: '注册链接', name: 'staffLoginLinkUrl' },
{ title: '活动链接', name: 'linkUrl' }
],
linkInfo: {},
showPhone: false,
loading: false,
caseList: [
......@@ -43,6 +75,7 @@ export default {
process: {
handler(val) {
for (let k in val) {
console.log(val[k])
this.caseList[k].isFinish = val[k] ? true : false
}
},
......@@ -61,11 +94,34 @@ export default {
immediate: true
}
},
beforeDestroy() {
this.init()
},
methods: {
...mapMutations('marketing', ['SET_INIT']),
init() {
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() {
let params = { merchantId: this.$globalState.session.merchantId }
......@@ -79,21 +135,37 @@ export default {
this.loading = true
const {
backgroundHeight,
detail: { backgroundImage, titleStyle, subTitleStyle },
logoInfo,
detail: { backgroundImage, detailImage, merchantLogo, titleStyle, subTitleStyle },
draggableList
} = this.$refs.viewForm
let url = backgroundImage
if (RENEWAL.includes(params.codeId) && this.routerInfo.addOrEdit != 'edit') {
url = await this.createMain(backgroundHeight, backgroundImage, draggableList) //合并主图、文字
if (RENEWAL.includes(params.codeId)) {
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') {
url = await this.createBig(this.$refs.viewForm.detail, this.logoInfo, JSON.parse(titleStyle), JSON.parse(subTitleStyle)) //合并主图、背景图、logo、文字
if (FESTIVAL.includes(params.codeId)) {
url = await this.createBig(this.$refs.viewForm.detail, logoInfo, JSON.parse(titleStyle), JSON.parse(subTitleStyle)) //合并主图、背景图、logo、文字
}
let origin = 'createSuperMarketing'
if (params.id && this.routerInfo.addOrEdit == 'edit') {
origin = 'updateApi'
params.activityName = params.marketingTitle
params.activityAddressDetailName = params.merchantAddress
params = { ...params, ...this.addProperties(params) }
params.activityBigImg = url
params = this.deleteKeys(params, ['activityActionReport', 'couponList', 'superMarketingCouponRelRequestList'])
params.startTime = params.starttime.replace(/\//g, '-')
params.endTime = params.endtime.replace(/\//g, '-')
......@@ -101,13 +173,15 @@ export default {
if (params.codeId) delete params.activityDetail
params.subscribe = this.subscribe
params.bigImage = url
if (!params.serviceMerchantPackageConfigDTOS) {
delete params.serviceMerchantPackageConfigDTOS
}
this.$apis.marketing[origin](params)
.then(res => {
if (res) {
this.loading = false
this.init()
this.getDetail(res.id ? res.id : res)
this.$message.success('操作成功')
if (params.id) this.$router.push('/activityLink/index')
}
})
.finally(() => {
......@@ -139,6 +213,49 @@ export default {
background: #ffffff;
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 {
width: 279px;
height: 170px;
......
......@@ -203,20 +203,25 @@ export default {
align-items: center;
position: relative;
z-index: 1;
&:last-child {
.scene-item-box {
width: calc(100% - 80px);
}
}
&-box {
z-index: 1;
cursor: pointer;
width: calc(100% - 30px);
height: 0;
padding-bottom: 50%;
padding-bottom: 50%;
padding-bottom: 80%;
background-image: url('../../../assets/marketing/scence-bg.png');
background-size: 100% 100%;
padding-left: 8%;
padding-right: 8%;
padding-left: 12%;
padding-right: 12%;
font-size: 1vw;
.scene-item-icon {
text-align: center;
margin-top: 0.5vw;
margin-top: 2vw;
img {
width: 1.7vw;
vertical-align: middle;
......
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-07-06 11:45:15
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-17 18:21:24
* @LastEditTime: 2023-07-18 16:36:52
* @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
-->
......@@ -48,15 +48,7 @@ export default {
})
},
handleConfirm() {
this.$confirm('是否覆盖营销礼包的内容?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$emit('handleSure', this.selectObj)
})
.catch(() => {})
this.$emit('handleSure', this.selectObj)
},
handleModelClose() {
this.$emit('handleClose')
......
......@@ -140,7 +140,7 @@ export default {
this.$apis.giftBag
.equityMerchant(params)
.then(res => {
this.EquityList = res.packageConfigs
this.EquityList = (res.packageConfigs || []).filter(item => item.isChecked == 1)
this.$refs.equityRef.tableHeightValues = '52vh'
this.recoverySelected()
})
......
......@@ -2121,6 +2121,9 @@ export default {
})
param.couponCreateRequests = couponLists.concat(selectedGoodsList) || []
const equityServices = this.selectedEquityList.map(i => i.packageCode)
if(!param.serviceMerchantPackageConfigDTOS) {
delete param.serviceMerchantPackageConfigDTOS
}
param.equityServices = equityServices.join(',')
delete param.couponList
// 标杆门店总产值/元(已结束战报)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!