Commit 65ea12aa by 李伟康

Merge branch 'v3.24.0' of http://192.168.3.233:8090/saas/outbound into v3.24.0

2 parents bf50b5f9 6a4f4096
Showing 32 changed files with 1911 additions and 464 deletions
...@@ -1135,7 +1135,7 @@ ...@@ -1135,7 +1135,7 @@
}, },
"@babel/runtime-corejs3": { "@babel/runtime-corejs3": {
"version": "7.23.7", "version": "7.23.7",
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.23.7.tgz", "resolved": "https://registry.npmmirror.com/@babel/runtime-corejs3/-/runtime-corejs3-7.23.7.tgz",
"integrity": "sha512-ER55qzLREVA5YxeyQ3Qu48tgsF2ZrFjFjUS6V6wF0cikSw+goBJgB9PBRM1T6+Ah4iiM+sxmfS/Sy/jdzFfhiQ==", "integrity": "sha512-ER55qzLREVA5YxeyQ3Qu48tgsF2ZrFjFjUS6V6wF0cikSw+goBJgB9PBRM1T6+Ah4iiM+sxmfS/Sy/jdzFfhiQ==",
"requires": { "requires": {
"core-js-pure": "^3.30.2", "core-js-pure": "^3.30.2",
...@@ -1144,7 +1144,7 @@ ...@@ -1144,7 +1144,7 @@
"dependencies": { "dependencies": {
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.14.1", "version": "0.14.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
"integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="
} }
} }
...@@ -1859,6 +1859,75 @@ ...@@ -1859,6 +1859,75 @@
"webpack-chain": "^6.4.0", "webpack-chain": "^6.4.0",
"webpack-dev-server": "^3.11.0", "webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.2.2" "webpack-merge": "^4.2.2"
},
"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-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"
}
}
} }
}, },
"@vue/cli-shared-utils": { "@vue/cli-shared-utils": {
...@@ -2734,6 +2803,11 @@ ...@@ -2734,6 +2803,11 @@
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
}, },
"bignumber.js": {
"version": "9.1.2",
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz",
"integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug=="
},
"binary-extensions": { "binary-extensions": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
...@@ -4026,7 +4100,7 @@ ...@@ -4026,7 +4100,7 @@
}, },
"core-js-pure": { "core-js-pure": {
"version": "3.35.0", "version": "3.35.0",
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.35.0.tgz", "resolved": "https://registry.npmmirror.com/core-js-pure/-/core-js-pure-3.35.0.tgz",
"integrity": "sha512-f+eRYmkou59uh7BPcyJ8MC76DiGhspj1KMxVIcF24tzP8NA9HVa1uC7BTW2tgx7E1QVCzDzsgp7kArrzhlz8Ew==" "integrity": "sha512-f+eRYmkou59uh7BPcyJ8MC76DiGhspj1KMxVIcF24tzP8NA9HVa1uC7BTW2tgx7E1QVCzDzsgp7kArrzhlz8Ew=="
}, },
"core-util-is": { "core-util-is": {
...@@ -12698,75 +12772,6 @@ ...@@ -12698,75 +12772,6 @@
} }
} }
}, },
"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.5.4", "version": "3.5.4",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.4.tgz", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.4.tgz",
...@@ -12841,7 +12846,7 @@ ...@@ -12841,7 +12846,7 @@
}, },
"wangeditor": { "wangeditor": {
"version": "4.7.15", "version": "4.7.15",
"resolved": "https://registry.npmjs.org/wangeditor/-/wangeditor-4.7.15.tgz", "resolved": "https://registry.npmmirror.com/wangeditor/-/wangeditor-4.7.15.tgz",
"integrity": "sha512-aPTdREd8BxXVyJ5MI+LU83FQ7u1EPd341iXIorRNYSOvoimNoZ4nPg+yn3FGbB93/owEa6buLw8wdhYnMCJQLg==", "integrity": "sha512-aPTdREd8BxXVyJ5MI+LU83FQ7u1EPd341iXIorRNYSOvoimNoZ4nPg+yn3FGbB93/owEa6buLw8wdhYnMCJQLg==",
"requires": { "requires": {
"@babel/runtime": "^7.11.2", "@babel/runtime": "^7.11.2",
...@@ -12851,7 +12856,7 @@ ...@@ -12851,7 +12856,7 @@
"dependencies": { "dependencies": {
"tslib": { "tslib": {
"version": "2.6.2", "version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.6.2.tgz",
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
} }
} }
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"bignumber.js": "^9.1.1",
"china-area-data": "^5.0.1", "china-area-data": "^5.0.1",
"core-js": "^3.4.4", "core-js": "^3.4.4",
"dayjs": "^1.10.7", "dayjs": "^1.10.7",
......
import { http } from '@/main' import { http } from '@/main'
const url = '/rop-scrm-marketing/router' const url = '/rop-scrm-marketing/router'
export default { export default {
/**获取红包配置列表 */ /**获取红包配置列表 */
getRedEnvelopeConfigList (params) { getRedEnvelopeConfigList(params) {
params.method = 'marketing.api.activityRedEnvelope.page' params.method = 'marketing.api.activityRedEnvelope.page'
return http({ return http({
url, url,
...@@ -11,7 +10,7 @@ export default { ...@@ -11,7 +10,7 @@ export default {
}) })
}, },
/**获取红包活动列表 */ /**获取红包活动列表 */
getRedEnvelopeActivityList (params) { getRedEnvelopeActivityList(params) {
params.method = 'marketing.api.activityRedEnvelope.merchant.list' params.method = 'marketing.api.activityRedEnvelope.merchant.list'
return http({ return http({
url, url,
...@@ -20,7 +19,7 @@ export default { ...@@ -20,7 +19,7 @@ export default {
}, },
/**获取所属渠道列表 */ /**获取所属渠道列表 */
getRedEnvelopeMerchantList (params) { getRedEnvelopeMerchantList(params) {
params.method = 'scrm.api.carlife.merchant.listWithPageByCurMerchant' params.method = 'scrm.api.carlife.merchant.listWithPageByCurMerchant'
params.pageSize = params.pageSize || 50 params.pageSize = params.pageSize || 50
return http({ return http({
...@@ -28,9 +27,26 @@ export default { ...@@ -28,9 +27,26 @@ export default {
data: params data: params
}) })
}, },
/*获取模板 */
getRedEnvelopeTemplateList(params) {
params.method = 'marketing.api.self.red.envelope.template.page'
params.pageSize = params.pageSize || 10000
return http({
url,
data: params
})
},
//获取优惠券
getCouponList(params) {
params.method = 'scrm.api.coupon.equity.list.merchant'
params.pageSize = params.pageSize || 1000
return http({
url: '/rop-scrm-coupon/router',
data: params
})
},
/**查询红包活动详情 */ /**查询红包活动详情 */
getRedEnvelopeActivityDetail (params) { getRedEnvelopeActivityDetail(params) {
params.method = 'marketing.api.activityRedEnvelope.findOne' params.method = 'marketing.api.activityRedEnvelope.findOne'
return http({ return http({
url, url,
...@@ -39,7 +55,7 @@ export default { ...@@ -39,7 +55,7 @@ export default {
}, },
/** 新建红包活动接口 */ /** 新建红包活动接口 */
createActivityRedEnvelope (params) { createActivityRedEnvelope(params) {
params.method = 'marketing.api.activityRedEnvelope.create' params.method = 'marketing.api.activityRedEnvelope.create'
return http({ return http({
url, url,
...@@ -48,7 +64,7 @@ export default { ...@@ -48,7 +64,7 @@ export default {
}, },
/** 更新红包活动 */ /** 更新红包活动 */
updateActivityRedEnvelope (params) { updateActivityRedEnvelope(params) {
params.method = 'marketing.api.activityRedEnvelope.update' params.method = 'marketing.api.activityRedEnvelope.update'
return http({ return http({
url, url,
...@@ -59,7 +75,7 @@ export default { ...@@ -59,7 +75,7 @@ export default {
* /新建活动文件校验上传文件接口 * /新建活动文件校验上传文件接口
*/ */
createCheckFile (params) { createCheckFile(params) {
params.method = 'marketing.api.activityRedEnvelope.createCheckFile' params.method = 'marketing.api.activityRedEnvelope.createCheckFile'
return http({ return http({
url, url,
...@@ -71,7 +87,7 @@ export default { ...@@ -71,7 +87,7 @@ export default {
* /编辑活动文件校验上传文件接口 * /编辑活动文件校验上传文件接口
*/ */
updateCheckFile (params) { updateCheckFile(params) {
params.method = 'marketing.api.activityRedEnvelope.updateCheckFile' params.method = 'marketing.api.activityRedEnvelope.updateCheckFile'
return http({ return http({
url, url,
...@@ -80,7 +96,7 @@ export default { ...@@ -80,7 +96,7 @@ export default {
}, },
/** 红包配置列表导出 */ /** 红包配置列表导出 */
exportActivityRedEnvelope (params) { exportActivityRedEnvelope(params) {
params.method = 'marketing.api.activityRedEnvelope.export' params.method = 'marketing.api.activityRedEnvelope.export'
return http({ return http({
url, url,
...@@ -89,7 +105,7 @@ export default { ...@@ -89,7 +105,7 @@ export default {
}, },
/** 查询红包链接详情 */ /** 查询红包链接详情 */
getActivityRedEnvelopeLinkDetailPage (params) { getActivityRedEnvelopeLinkDetailPage(params) {
params.method = 'marketing.api.activityRedEnvelope.linkDetailPage' params.method = 'marketing.api.activityRedEnvelope.linkDetailPage'
return http({ return http({
url, url,
...@@ -97,10 +113,9 @@ export default { ...@@ -97,10 +113,9 @@ export default {
}) })
}, },
/**获取红包记录列表 */ /**获取红包记录列表 */
getRedEnvelopeRecordList (params) { getRedEnvelopeRecordList(params) {
params.method = 'marketing.api.activityRedEnvelope.record.page' params.method = 'marketing.api.activityRedEnvelope.record.page'
return http({ return http({
url, url,
...@@ -110,7 +125,7 @@ export default { ...@@ -110,7 +125,7 @@ export default {
/** /**
* /校验中奖记录导入 * /校验中奖记录导入
*/ */
checkImport (params) { checkImport(params) {
params.method = 'marketing.api.activityRedEnvelope.winningRecord.checkImport' params.method = 'marketing.api.activityRedEnvelope.winningRecord.checkImport'
return http({ return http({
url, url,
...@@ -118,7 +133,7 @@ export default { ...@@ -118,7 +133,7 @@ export default {
}) })
}, },
/** 导入中奖记录 */ /** 导入中奖记录 */
importRedEnvelopeRecord (params) { importRedEnvelopeRecord(params) {
params.method = 'marketing.api.activityRedEnvelope.winningRecord.import' params.method = 'marketing.api.activityRedEnvelope.winningRecord.import'
return http({ return http({
url, url,
...@@ -128,7 +143,7 @@ export default { ...@@ -128,7 +143,7 @@ export default {
// 提现记录分页列表 // 提现记录分页列表
getRedEnvelopeWithdraw (params) { getRedEnvelopeWithdraw(params) {
params.method = 'marketing.api.activityRedEnvelope.cash.out.record.page' params.method = 'marketing.api.activityRedEnvelope.cash.out.record.page'
return http({ return http({
url, url,
...@@ -136,14 +151,14 @@ export default { ...@@ -136,14 +151,14 @@ export default {
}) })
}, },
exportRedEnvelopeWithdraw (params) { exportRedEnvelopeWithdraw(params) {
params.method = 'marketing.api.activityRedEnvelope.cash.out.record.export' params.method = 'marketing.api.activityRedEnvelope.cash.out.record.export'
return http({ return http({
url, url,
data: params data: params
}) })
}, },
exportRedEnvelopeRecord (params) { exportRedEnvelopeRecord(params) {
params.method = 'marketing.api.activityRedEnvelope.record.export' params.method = 'marketing.api.activityRedEnvelope.record.export'
return http({ return http({
url, url,
...@@ -152,7 +167,7 @@ export default { ...@@ -152,7 +167,7 @@ export default {
}, },
// 获取白名单列表 // 获取白名单列表
getWhiteListPage(params){ getWhiteListPage(params) {
params.method = 'marketing.api.activityRedEnvelope.whiteList.page' params.method = 'marketing.api.activityRedEnvelope.whiteList.page'
return http({ return http({
url, url,
...@@ -160,7 +175,7 @@ export default { ...@@ -160,7 +175,7 @@ export default {
}) })
}, },
// 校验红包活动白名单导入 // 校验红包活动白名单导入
checkImportWhiteList(params){ checkImportWhiteList(params) {
params.method = 'marketing.api.activityRedEnvelope.whiteList.checkImport' params.method = 'marketing.api.activityRedEnvelope.whiteList.checkImport'
return http({ return http({
url, url,
...@@ -168,7 +183,7 @@ export default { ...@@ -168,7 +183,7 @@ export default {
}) })
}, },
// 红包活动白名单导入 // 红包活动白名单导入
whiteListImport(params){ whiteListImport(params) {
params.method = 'marketing.api.activityRedEnvelope.whiteList.import' params.method = 'marketing.api.activityRedEnvelope.whiteList.import'
return http({ return http({
url, url,
...@@ -176,7 +191,7 @@ export default { ...@@ -176,7 +191,7 @@ export default {
}) })
}, },
whiteListDelete(params){ whiteListDelete(params) {
params.method = 'marketing.api.activityRedEnvelope.whiteList.delete' params.method = 'marketing.api.activityRedEnvelope.whiteList.delete'
return http({ return http({
url, url,
...@@ -185,7 +200,7 @@ export default { ...@@ -185,7 +200,7 @@ export default {
}, },
// 展示记录列表 // 展示记录列表
displayListApi(params){ displayListApi(params) {
params.method = 'marketing.api.activityRedEnvelope.show.record.page' params.method = 'marketing.api.activityRedEnvelope.show.record.page'
return http({ return http({
url, url,
...@@ -194,7 +209,7 @@ export default { ...@@ -194,7 +209,7 @@ export default {
}, },
// 展示记录导出 // 展示记录导出
displayExportApi(params){ displayExportApi(params) {
params.method = 'marketing.api.activityRedEnvelope.show.record.export' params.method = 'marketing.api.activityRedEnvelope.show.record.export'
return http({ return http({
url, url,
...@@ -202,7 +217,7 @@ export default { ...@@ -202,7 +217,7 @@ export default {
}) })
}, },
// 抽奖记录列表 // 抽奖记录列表
drawListApi(params){ drawListApi(params) {
params.method = 'marketing.api.activityRedEnvelope.lottery.draw.record.page' params.method = 'marketing.api.activityRedEnvelope.lottery.draw.record.page'
return http({ return http({
url, url,
...@@ -211,7 +226,7 @@ export default { ...@@ -211,7 +226,7 @@ export default {
}, },
// 导出红包抽奖记录 // 导出红包抽奖记录
drawExportApi(params){ drawExportApi(params) {
params.method = 'marketing.api.activityRedEnvelope.lottery.draw.record.export' params.method = 'marketing.api.activityRedEnvelope.lottery.draw.record.export'
return http({ return http({
url, url,
...@@ -219,7 +234,7 @@ export default { ...@@ -219,7 +234,7 @@ export default {
}) })
}, },
// 中奖记录列表 // 中奖记录列表
winningListApi(params){ winningListApi(params) {
params.method = 'marketing.api.activityRedEnvelope.winning.record.page' params.method = 'marketing.api.activityRedEnvelope.winning.record.page'
return http({ return http({
url, url,
...@@ -227,7 +242,7 @@ export default { ...@@ -227,7 +242,7 @@ export default {
}) })
}, },
// 导出中奖记录列表 // 导出中奖记录列表
winningExportApi(params){ winningExportApi(params) {
params.method = 'marketing.api.activityRedEnvelope.winning.record.export' params.method = 'marketing.api.activityRedEnvelope.winning.record.export'
return http({ return http({
url, url,
...@@ -235,7 +250,7 @@ export default { ...@@ -235,7 +250,7 @@ export default {
}) })
}, },
// 实物奖品核销列表 // 实物奖品核销列表
winningGoodsApi(params){ winningGoodsApi(params) {
params.method = 'marketing.api.activityRedEnvelope.winning.goods.record.page' params.method = 'marketing.api.activityRedEnvelope.winning.goods.record.page'
return http({ return http({
url, url,
...@@ -243,12 +258,58 @@ export default { ...@@ -243,12 +258,58 @@ export default {
}) })
}, },
// 实物奖品核销导出 // 实物奖品核销导出
winningGoodsExportApi(params){ winningGoodsExportApi(params) {
params.method = 'marketing.api.activityRedEnvelope.winning.goods.record.export' params.method = 'marketing.api.activityRedEnvelope.winning.goods.record.export'
return http({ return http({
url, url,
data: params data: params
}) })
}, },
}
// 快递到家地址信息查询
queryExpressInformation(params){
params.method = 'marketing.api.self.red.envelope.customer.write.detail.query'
return http({
url,
data: params
})
},
// 新建活动模板
newActivityTemplate(params){
params.method = 'marketing.api.self.red.envelope.template.save'
return http({
url,
data: params,
returnAll:true
})
},
// 快递到家地址信息配置列表
expressConfigList(params){
params.method = 'marketing.api.self.red.envelope.customer.write.config.list'
return http({
url,
data: params
})
},
// 活动模板管理列表、
activeTmpManageList(params){
params.method = 'marketing.api.self.red.envelope.template.page'
return http({
url,
data: params
})
},
// 商品核销发货
goodsAreWrittenOffAndShipped(params){
params.method = 'marketing.api.self.red.envelope.send.out.goods'
return http({
url,
data: params,
returnAll:true
})
}
}
...@@ -136,4 +136,30 @@ img{ ...@@ -136,4 +136,30 @@ img{
color: #666666; color: #666666;
max-width: 80%; max-width: 80%;
} }
}
\ No newline at end of file \ No newline at end of file
}
.table_circular_flex{
display: flex;
align-items: center;
.table_circular{
width: 6px;
height: 6px;
border-radius: 4px;
margin-right: 8px;
}
.circular_green{
background: #2CCA74;
}
.circular_gray{
background: #999999;
}
.circular_red{
background: #EB4E4E;
}
.circular_blue{
background: #5850FF;
}
.circular_yellow{
background: #F8B757;
}
}
// 新值,旧值,整数部分位数,小数部分位数,最小值,最大值,规则 // 新值,旧值,整数部分位数,小数部分位数,最小值,最大值,规则
function limitPrice (newValue, oldValue, intergerDigit, pointDigit, minValue, maxValue, regRule) { function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, maxValue, regRule) {
/* eslint-disable */ /* eslint-disable */
var reg = { var reg = {
priceReg: /^\d[\d\.]*$/, priceReg: /^\d[\d\.]*$/,
...@@ -76,14 +76,15 @@ const statusList = [ ...@@ -76,14 +76,15 @@ const statusList = [
} }
] ]
//会员订单类型字典 //会员订单类型字典
const orderTypesList = [{ const orderTypesList = [
confId: 1, {
confName: '套餐' confId: 1,
}, confName: '套餐'
{ },
confId: 2, {
confName: '会员卡' confId: 2,
} confName: '会员卡'
}
] ]
const orderStatusList = [ const orderStatusList = [
// 2: '待收货', // 2: '待收货',
...@@ -110,45 +111,48 @@ const orderStatusList = [ ...@@ -110,45 +111,48 @@ const orderStatusList = [
{ {
confId: 6, confId: 6,
confName: '已退款' confName: '已退款'
}, }
] ]
const serviceStatusList = [{ const serviceStatusList = [
confId: 1, {
confName: '未生效' confId: 1,
}, confName: '未生效'
{ },
confId: 2, {
confName: '生效中' confId: 2,
}, confName: '生效中'
{ },
confId: 3, {
confName: '已失效' confId: 3,
} confName: '已失效'
}
] ]
const memberTypeList = [{ const memberTypeList = [
confId: 1, {
confName: '正式会员' confId: 1,
}, confName: '正式会员'
{ },
confId: 2, {
confName: '试用会员' confId: 2,
} confName: '试用会员'
}
] ]
const stateList = [{ const stateList = [
confId: 0, {
confName: '待上架' confId: 0,
}, confName: '待上架'
{ },
confId: 1, {
confName: '在售中' confId: 1,
}, confName: '在售中'
{ },
confId: 2, {
confName: '已下架' confId: 2,
}, confName: '已下架'
}
] ]
function getExplorer () { function getExplorer() {
var ua = navigator.userAgent.toLocaleLowerCase() var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null var browserType = null
if (ua.match(/msie/) != null || ua.match(/trident/) != null) { if (ua.match(/msie/) != null || ua.match(/trident/) != null) {
...@@ -173,7 +177,7 @@ function getExplorer () { ...@@ -173,7 +177,7 @@ function getExplorer () {
return browserType return browserType
} }
function exportFn (url) { function exportFn(url) {
let browserType = getExplorer() let browserType = getExplorer()
if (browserType == 'QQ') { if (browserType == 'QQ') {
window.open(url) window.open(url)
...@@ -200,7 +204,7 @@ const transformData = (data, childrenDepth) => { ...@@ -200,7 +204,7 @@ const transformData = (data, childrenDepth) => {
for (let i = 0; i < childrenDepth; i++) { for (let i = 0; i < childrenDepth; i++) {
const label = levels[i], const label = levels[i],
value = label, value = label,
existingOption = currentLevel && currentLevel.find((option) => option.label === label) existingOption = currentLevel && currentLevel.find(option => option.label === label)
if (existingOption) { if (existingOption) {
if (i === childrenDepth - 1) continue if (i === childrenDepth - 1) continue
if (existingOption.children) currentLevel = existingOption.children if (existingOption.children) currentLevel = existingOption.children
...@@ -217,7 +221,7 @@ const transformData = (data, childrenDepth) => { ...@@ -217,7 +221,7 @@ const transformData = (data, childrenDepth) => {
}) })
return result return result
} }
const checkSpace = (rule, value, callback,target ) => { const checkSpace = (rule, value, callback, target) => {
const { field, message } = rule const { field, message } = rule
if (!value) callback(new Error(message)) if (!value) callback(new Error(message))
else if (!value.trim()) callback(new Error(rule.message)) else if (!value.trim()) callback(new Error(rule.message))
...@@ -226,20 +230,11 @@ const checkSpace = (rule, value, callback,target ) => { ...@@ -226,20 +230,11 @@ const checkSpace = (rule, value, callback,target ) => {
callback() callback()
} }
} }
export {
limitPrice,
orderManageStatusList,
orderSourceList,
deliveryTypeList,
statusList,
serviceStatusList,
memberTypeList,
stateList,
orderTypesList,
orderStatusList,
exportFn,
getExplorer,
activityStatusList,
transformData,
checkSpace
}
\ No newline at end of file \ No newline at end of file
const awardType = [
{ confId: 0, confName: '红包' },
{ confId: 1, confName: '实物' },
{ confId: 2, confName: '优惠券' },
{ confId: 3, confName: '谢谢惠顾' }
]
export { awardType,limitPrice, orderManageStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, exportFn, getExplorer, activityStatusList, transformData, checkSpace }
<template> <template>
<el-cascader placeholder="请选择省市区" clearable :props="areaProps" v-model="selectedArea" <el-cascader ref="cascader" placeholder="请选择省市区" clearable :props="areaProps" v-model="selectedArea"
@change="handleAreaChange" @change="handleAreaChange"
:options="areaList"></el-cascader> :options="areaList"></el-cascader>
</template> </template>
<script> <script>
...@@ -40,6 +40,9 @@ export default { ...@@ -40,6 +40,9 @@ export default {
handleAreaChange(value) { handleAreaChange(value) {
this.$emit('update:selectedArea', value); this.$emit('update:selectedArea', value);
}, },
clearSelectedArea() {
this.$refs.cascader.handleClear();
},
formatAreaData(data, level) { formatAreaData(data, level) {
return Object.keys(data).map(key => { return Object.keys(data).map(key => {
let item = { let item = {
...@@ -56,6 +59,9 @@ export default { ...@@ -56,6 +59,9 @@ export default {
watch: { watch: {
selectedArea(newVal) { selectedArea(newVal) {
this.localSelectedArea = newVal; this.localSelectedArea = newVal;
if (this.localSelectedArea.length === 3){
this.$refs.cascader.toggleDropDownVisible()
}
}, },
} }
} }
......
<template>
<div>
<div id="div-demo"></div>
</div>
</template>
<script>
import E from 'wangeditor'
export default {
name: 'textBox',
data() {
return {
editor: '',
content: '',
editorOption: {}
}
},
props: {
excludeMenus: {
type: Array,
default: () => ['code']
},
boxHeight:{
type: Number,
default: 240
}
},
mounted() {
this.getEdit()
},
methods: {
handleEditorClick(e) {
const target = e.target;
console.log(target.nodeName)
if (target.nodeName === 'VIDEO') {
// 视频被点击,移动光标到视频后面
// const range = document.createRange();
// const selection = window.getSelection();
// range.setStartAfter(target); // 设置范围的起点为视频元素之后
// range.collapse(true); // 折叠范围
// selection.removeAllRanges(); // 清除所有范围
// selection.addRange(range); // 添加新范围
}
},
getEdit() {
const _this = this
this.editor = new E('#div-demo')
this.editor.config.uploadImgShowBase64 = true
this.editor.config.showMenuTooltips = true
this.editor.config.menuTooltipPosition = 'down'
this.editor.config.height = this.boxHeight
this.editor.config.width = 500
this.editor.config.excludeMenus = this.excludeMenus
this.editor.config.pasteIgnoreImg = true
// this.editor.config.uploadImgHooks = {
// before: (xhr, editer, files) => {
// if(files[0].name === 'image.png') {
// return {
// prevent: true,
// msg: '请您将截图以上传图片的方式显示在文本框中!'
// }
// }
// }
// }
this.editor.config.onchange = html => {
// console.log(html);
this.content = html // 绑定当前逐渐地值
this.$emit('change', this.content) // 将内容同步到父组件中
}
this.editor.config.onfocus = () => {
this.$emit('focus')
}
// 上传图片
this.editor.config.customUploadImg = function(resultFiles, insertImgFn) {
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
_this.$message.error('上传图片大小不能超过' + limitSize + 'MB!')
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
_this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
// console.log(res)
insertImgFn(res)
}
})
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
// 上传图片,返回结果,将图片插入到编辑器中
}
}
// 上传视频
this.editor.config.customUploadVideo = function(resultFiles, insertVideoFn) {
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
_this.$message.error('上传视频大小不能超过' + limitSize + 'MB!')
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
const videoFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + videoFile.split(',')[1]
_this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
// console.log(res)
insertVideoFn(res)
}
})
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
// 上传图片,返回结果,将图片插入到编辑器中
}
}
this.editor.config.onchangeTimeout = 5000
this.editor.create()
// 绑定点击事件处理器
this.editor.$textElem.on('click', this.handleEditorClick)
},
setEdit(html) {
this.$nextTick(() => {
this.editor.txt.html(html)
})
},
forbidEdit() {
// this.editor.$textElem.attr('contenteditable', false)
this.editor.disable()
}
}
}
</script>
<style lang="scss" scoped>
#div-demo {
// margin: 16px 300px 0 0;
}
.el-form .editor {
margin-top: 20px;
}
.myQuillEditor {
background-color: #fff;
height: 200px;
}
</style>
<style>
.w-e-text-container {
z-index: 1 !important;
}
.w-e-toolbar {
z-index: 2 !important;
}
</style>
...@@ -14,13 +14,13 @@ import { Http } from 'glsx-common' ...@@ -14,13 +14,13 @@ import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function (common) { export const fetchConfig = function (common) {
// if (isEnv) { // if (isEnv) {
// let { request } = cfg // let { request } = cfg
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // // }
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/62ecda0909756a6f4f85cf9a/outbound/config') // return new Http().get('https://oss-config.dev.glsx.com.cn/mock/62ecda0909756a6f4f85cf9a/outbound/config')
let params = { moduleName: 'outbound', mockUrl: 'https://oss-config.test.glsx.com.cn/mock/62fe2a36abac6ff6ac239d3c/outbound/config', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } } let params = { moduleName: 'outbound', mockUrl: 'https://oss-config.test.glsx.com.cn/mock/62fe2a36abac6ff6ac239d3c/outbound/config',httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
console.log(common.utils.getConfig(params)) // console.log(common.utils.getConfig(params))
return common.utils.getConfig(params) return common.utils.getConfig(params)
} }
export const config = { export const config = {
......
<template>
<div class="new-tmp">
<h2>新建活动模版</h2>
<hr/>
<div class="activity-wrap">
<div class="activity-content"><glsx-combi-form
ref="formRef"
:isEdit="true"
:isBlock="true"
:formObj="configForm"
:formData="formData"
:formRules="rule"
>
<template #merchantId>
<el-select
v-model="configForm.merchantId"
placeholder="请选择"
filterable
remote
:remote-method="remoteMethod"
v-reachbottom="onReachBottom"
@focus="selectFocus"
:loading="loading"
:disabled="disabled"
@change="change"
>
<el-option
v-for="item in merchantObj.data"
:key="item.confId"
:label="item.confName"
:value="item.confId"
></el-option>
<template v-if="merchantObj.nothing">
<div class="select-nothing">到底了!</div>
</template>
</el-select>
</template>
<template #pageTheme>
<div class="page-theme">
<el-form-item label="第一行" prop="theme1" >
<el-input v-model="configForm.theme1" maxlength="5" show-word-limit></el-input>
</el-form-item>
<el-form-item label="第二行" prop="theme2" >
<el-input v-model="configForm.theme2" maxlength="5" show-word-limit></el-input>
</el-form-item>
</div>
</template>
<p
slot="cardCover"
class="cover-tips"
>建议格式:高度88px,png</p>
<template #activityRuleDes>
<textBox style="width:45vw" @change="writeChange" ref="textBox" @forbid="forbidEdit"></textBox>
</template>
<template #physicalWinningCfg>
<div class="physical-winning">
<el-form-item
label="活动形式:"
prop="exchangeType"
class="m-t-20"
>
<el-radio-group
v-model="configForm.exchangeType"
class="fit-width radio"
>
<el-radio :label="0">快递到家</el-radio>
<el-radio :label="1">到店核销</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="填写信息:" prop="describeId" v-if="configForm.exchangeType == 0">
<el-checkbox-group v-model="configForm.describeId">
<el-checkbox v-for="(item,index) in expressList" :key="index" :label="item"><span>{{ item.describeMsg }}</span></el-checkbox>
</el-checkbox-group>
</el-form-item>
</div>
</template>
</glsx-combi-form></div>
<div class="redEnvelope-bg">
<img v-if="configForm.logo" :src="configForm.logo">
<p v-html="configForm.theme1"></p>
<p class="p2" v-html="configForm.theme2"></p>
</div>
</div>
<GLFooter>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSave">确定</el-button>
</GLFooter>
</div>
</template>
<script type="text/ecmascript-6">
import {getMerchantListMixin} from '@/mixins'
import textBox from '@/components/text-box'
export default {
name: 'add',
mixins: [getMerchantListMixin],
props: {
disabled: Boolean
},
components: {
textBox
},
data() {
return {
merchantObj: {
nothing: false,
data: [],
currentPage: 1,
name: '',
loading: false,
total: 0
},
expressList:[],
configForm: {
templateName: '',
merchantId: '',
activityType: '0',
theme1:'',
theme2:'',
logo: '',
merchantName: '',
pageTheme:'11',
exchangeType: '',
ruleDescribe:'',
describeId: [],
},
rule: {
templateName: [{required: true, message: '请输入模板名称', trigger: 'change'}],
merchantId: [{required: true, message: '请选择所属渠道', trigger: 'change'}],
activityType: [{required: true, message: '请选择活动形式', trigger: 'change'}],
logo: [{required: true, message: '请上传卡片封面', trigger: 'change'}],
pageTheme: [{required: true, message: '请输入页面主题'}],
exchangeType: [{required: true, message: '请选择活动形式', trigger: 'change'}],
describeId: [{required: true, message: '请选择填写信息', trigger: 'change'}]
},
formData: [
{
label: '模板名称',
name: 'templateName',
type: 'input',
maxlength: 25,
showLimit:true
},
{
label: '所属渠道',
type: 'select',
name: 'merchantId',
addHtml: 'merchantId'
},
{
label: '活动形式',
name: 'activityType',
type: 'radio',
optionList: [
{text: '随机红包', id: '0'}
],
optionId: 'id',
optionLabel: 'text',
},
{
label: '页面主题',
name: 'pageTheme',
addHtml: 'pageTheme'
},
{
label: 'logo图片',
name: 'logo',
type: 'upload',
width: '320px',
limitSize: 10,
maxPhotoNum: 1,
suffixSlot: 'cardCover',
handleUpload: async (e, file, targetItem) => {
let loading = this.$loading({
target: document.querySelector('.activity-img'),
})
try {
const imgFile = e.target.result,
arrBase64 = imgFile.split(',')[1],
str = file.name.split('.'),
base64 = str.at(-1) + '@' + arrBase64,
res = await this.$apis.common.pictureUpload({file: base64, fileType: 'image'})
if (res) {
this.configForm[targetItem.name] = res
this.formRef().validateField(targetItem.name)
loading.close()
} else throw '上传失败'
} catch (error) {
loading.close()
this.$message(error)
}
}
},
{
label: '活动规则描述',
addHtml: 'activityRuleDes'
},
{
label: '实物中奖配置',
addHtml: 'physicalWinningCfg'
}
],
}
},
watch: {},
mounted() {
sessionStorage.setItem('returnFromAddPage', 'ActiveTemplateManagement')
this.getExpressInfo()
},
methods: {
getExpressInfo(){
this.$apis.redenvelope.expressConfigList({}
).then(res => {
this.expressList = res.map(item => ({'describeMsg':item.describeMsg,'describeId':item.describeId}))
})
},
validateForm() {
return new Promise((resolve, reject) => {
this.formRef().validate((valid) => {
if (valid) {
resolve();
} else {
// reject(new Error('缺少必填内容'));
}
});
});
},
writeChange(val) {
this.configForm.ruleDescribe = val
},
change(id) {
this.configForm.merchantName = ''
if (id) {
this.configForm.merchantName = this.merchantObj.data.find(e => e.confId == id).confName
}
},
formRef() {
return this.$refs.formRef.$refs.formRef
},
handleCancel() {
this.$router.back()
},
handleSave() {
this.validateForm().then(() => {
const {describeId,pageTheme,...params} = this.configForm
if (!params.theme1 && !params.theme2) return this.$message.error('请填写页面主题');
params.writeInfoList = [...describeId]
this.$apis.redenvelope.newActivityTemplate(params).then(res => {
if (res.code == 0){
this.$message.success('新建活动模板成功');
this.handleCancel()
}else{
this.$message.error(res.message);
}
})
}).catch(error => {
this.$message.error(error.message);
});
}
},
}
</script>
<style scoped lang="scss">
.new-tmp{
background: #fff;
h2{
padding: 10px 0 0 16px;
}
.activity-wrap{
display: flex;
.cover-tips{
position: absolute;
color: #999999;
left: 90px;
top: 60px;
}
.activity-content {
width: 70%;
padding: 20px;
.page-theme{
.el-form-item{
display: flex;
width: 340px;
/deep/.el-form-item__label{
margin-right: 8px;
}
}
}
.physical-winning {
background: #F9F9F9;
width: 400px;
padding: 10px;
.el-form-item{
/deep/.el-form-item__label{
width: auto;
}
}
}
}
.redEnvelope-bg{
position: relative;
width: 500px;
height: 800px;
background-image: url("./../../../../assets/redEnvelope-bg.png");
background-repeat: no-repeat;
img{
position: absolute;
width: 98px;
height: 33px;
top: 55px;
left:28px;
}
p{
position: absolute;
font-family: SourceHanSansCN-Heavy;
font-weight: 900;
font-size: 35.5px;
letter-spacing: 0;
text-align: center;
background: linear-gradient(to bottom, #FFFFFF, #FFD58E); /* 设置背景渐变 */
-webkit-background-clip: text; /* Safari/Chrome */
-webkit-text-fill-color: transparent; /* Safari/Chrome */
color: transparent; /* Firefox/Opera */
text-shadow: 0 1px 3px #ffe9e9de;
top: 100px;
left: 45px;
}
.p2{
top: 150px;
}
}
}
}
</style>
// dataImportMixin.js
import * as dayjs from 'dayjs';
import url from '@/assets/empty.png'
export default {
data() {
return {
url,
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count'},
searchForm: {
selectedArea:[]
},
searchFormData: [
{
label: '模板名称',
name: 'templateName',
type: 'input',
maxlength: 100
},
{
label: '所属渠道',
name: 'merchantName',
type: 'input',
maxlength: 100
}
],
getListApi: this.$apis.redenvelope.activeTmpManageList,
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '模板名称',
prop: 'templateName',
minWidth: 100
},
{
label: '所属渠道',
prop: 'merchantName',
minWidth: 100
},
{
label: '活动形式',
prop: 'activityType',
formatter: cell => {
return {0: '随机红包', 1: '九宫格', 2: '翻牌', 3: '大转盘'}[cell.activityType]
}
},
{
label: '创建时间',
minWidth: 100,
prop:'createdTime'
}
]
},
tableSearchForm: {}
}
},
methods: {
},
};
<template> <template>
<div>ActiveTemplateManagement</div> <div class="container">
<div class="sticky">
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
>
</GLCombiForm>
<div class="sticky-btns">
<div class="btns">
<el-button
type="default"
plain
@click="AddActivityTpl"
>新建
</el-button>
</div>
</div>
</div>
<div class="tabelList">
<div class="table-title">活动模板</div>
<GLTable
ref="listRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:noDataImg="url"
:tableParams="tableParams"
:pageConf="pageConf"
>
<span
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
:beforeSearchFn="beforeSearchFn"
></GLTableButton>
</span>
</GLTable>
</div>
</div>
</template> </template>
<script> <script type='text/ecmascript-6'>
import dataImportMixin from "./dataImportMixin";
import repeatMethods from "../common/repeatMethods";
export default { export default {
name: "ActiveTemplateManagement" name: 'DisplayRecord',
mixins: [dataImportMixin,repeatMethods],
data() {
return {
}
},
mounted() {
},
methods: {
AddActivityTpl(){
this.$router.push({
path: '/redEnvelope/components/ActiveTemplateManagement/add',
})
}
}
} }
</script> </script>
<style scoped> <style scoped lang='scss'>
@import "../common/style.scss";
</style> </style>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
@handleRest="handleReset" @handleRest="handleReset"
> >
<div slot="regionSlot"> <div slot="regionSlot">
<regionCascader :checkStrictly="true" @update:selectedArea="val => searchForm.selectedArea = val"></regionCascader> <regionCascader ref="regionCascader" :selectedArea="searchForm.selectedArea" :checkStrictly="true" @update:selectedArea="val => searchForm.selectedArea = val"></regionCascader>
</div> </div>
</GLCombiForm> </GLCombiForm>
<div class="sticky-btns"> <div class="sticky-btns">
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
:noDataImg="url" :noDataImg="url"
:tableParams="tableParams" :tableParams="tableParams"
:pageConf="pageConf" :pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
> >
<span <span
slot="auth-button" slot="auth-button"
...@@ -70,7 +69,10 @@ export default { ...@@ -70,7 +69,10 @@ export default {
methods: { methods: {
getParams() { getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
this.handleProvinceParams(params)
this.updateParams(params, 'showTime', 'showTime', 'startShowTime', 'endShowTime'); this.updateParams(params, 'showTime', 'showTime', 'startShowTime', 'endShowTime');
return params return params
}, },
} }
...@@ -78,43 +80,5 @@ export default { ...@@ -78,43 +80,5 @@ export default {
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.container { @import "../common/style.scss";
height: 100%;
background-color: #fff;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 20px;
.table-title {
font-weight: 700;
font-size: 16px;
color: #333333;
padding-bottom: 18px;
}
.sticky {
position: relative;
z-index: 2;
&-btns {
position: absolute;
right: 0;
bottom: -23px;
overflow: hidden;
.el-button + .el-button {
margin-left: 8px;
}
.btns {
transition: all 0.25s;
.el-button {
padding: 8px 15px;
min-width: 60px;
}
}
}
}
}
</style> </style>
...@@ -35,9 +35,15 @@ export default { ...@@ -35,9 +35,15 @@ export default {
}, },
{ {
label: '状态', label: '状态',
name: 'activityName', name: 'status',
type: 'input', type: 'select',
maxlength: 100 optionList: [
{ text: '全部', id: '' },
{ text: '中奖', id: '0' },
{ text: '未中奖', id: '1' },
],
optionId: 'id',
optionLabel: 'text'
}, },
{ {
label: '抽奖时间', label: '抽奖时间',
...@@ -103,7 +109,8 @@ export default { ...@@ -103,7 +109,8 @@ export default {
}, },
{ {
label: '状态', label: '状态',
prop:'statusStr' minWidth: 150,
addHtml:'statusStr'
}, },
{ {
label: '抽奖时间', label: '抽奖时间',
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
@handleRest="handleReset" @handleRest="handleReset"
> >
<div slot="regionSlot"> <div slot="regionSlot">
<regionCascader :checkStrictly="true" @update:selectedArea="val => searchForm.selectedArea = val"></regionCascader> <regionCascader ref="regionCascader" :selectedArea="searchForm.selectedArea" :checkStrictly="true" @update:selectedArea="val => searchForm.selectedArea = val"></regionCascader>
</div> </div>
</GLCombiForm> </GLCombiForm>
<div class="sticky-btns"> <div class="sticky-btns">
...@@ -32,6 +32,14 @@ ...@@ -32,6 +32,14 @@
:tableParams="tableParams" :tableParams="tableParams"
:pageConf="pageConf" :pageConf="pageConf"
> >
<template slot="statusStr" slot-scope="scope">
<div class="table_circular_flex">
<div :class="['table_circular',colorFee[scope.scope.statusStr]]">
</div>
<span>{{scope.scope.statusStr}}</span>
</div>
</template>
<span <span
slot="auth-button" slot="auth-button"
slot-scope="scope" slot-scope="scope"
...@@ -52,7 +60,10 @@ ...@@ -52,7 +60,10 @@
import regionCascader from "@/components/regionCascader"; import regionCascader from "@/components/regionCascader";
import dataImportMixin from "./dataImportMixin"; import dataImportMixin from "./dataImportMixin";
import repeatMethods from "../common/repeatMethods"; import repeatMethods from "../common/repeatMethods";
const STAGE_COLOR = Object.freeze({
'中奖':'circular_green',
'未中奖':'circular_gray'
})
export default { export default {
name: 'DisplayRecord', name: 'DisplayRecord',
mixins: [dataImportMixin,repeatMethods], mixins: [dataImportMixin,repeatMethods],
...@@ -61,6 +72,7 @@ export default { ...@@ -61,6 +72,7 @@ export default {
}, },
data() { data() {
return { return {
colorFee : STAGE_COLOR
} }
}, },
mounted() { mounted() {
...@@ -68,6 +80,7 @@ export default { ...@@ -68,6 +80,7 @@ export default {
methods: { methods: {
getParams() { getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
this.handleProvinceParams(params)
this.updateParams(params, 'openTime', 'openTime', 'startOpenTime', 'endOpenTime'); this.updateParams(params, 'openTime', 'openTime', 'startOpenTime', 'endOpenTime');
return params return params
}, },
...@@ -76,43 +89,5 @@ export default { ...@@ -76,43 +89,5 @@ export default {
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.container { @import "../common/style.scss";
height: 100%;
background-color: #fff;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 20px;
.table-title {
font-weight: 700;
font-size: 16px;
color: #333333;
padding-bottom: 18px;
}
.sticky {
position: relative;
z-index: 2;
&-btns {
position: absolute;
right: 0;
bottom: -23px;
overflow: hidden;
.el-button + .el-button {
margin-left: 8px;
}
.btns {
transition: all 0.25s;
.el-button {
padding: 8px 15px;
min-width: 60px;
}
}
}
}
}
</style> </style>
<template>
<GLDialog
mode="mid"
class="muti"
:title="cancelObj.title"
:before-close="handleClose"
@onOk="handleConfirm"
@onCancel="handleClose"
:visible.sync="cancelObj.show"
append-to-body
>
<el-form :model="form" ref="form" label-width="120px">
<!-- 基本信息 -->
<div v-for="(section, index) in cancelObj.infoSections" :key="index" class="form-section">
<h3 class="section-title">{{ section.title }}</h3>
<el-row :gutter="20">
<el-col v-for="(item, index) in section.items" :key="index" :span="12">
<div class="info-field">
<span class="label">{{ item.label }}:</span>
<span class="value">{{ item.value }}</span>
</div>
</el-col>
</el-row>
</div>
<!-- 快递信息 -->
<div class="form-section">
<h3 class="section-title">核销信息</h3>
<el-form-item label="核销码" prop="cancelNumber" :rules="[{ required: true, message: '核销码不能为空', trigger: 'blur' }]">
<el-input v-model="form.cancelNumber"></el-input>
</el-form-item>
</div>
</el-form>
</GLDialog>
</template>
<script>
import {afterRangePickerOptions} from "../../RedEnvelopeConfig/edit";
export default {
name: "CancelAfterVerification",
props: {
cancelObj: {
type: Object,
default: () => { }
},
},
data () {
return {
afterRangePickerOptions,
formItemWidth: 'width: 284px;',
size: 'small',
disabled: false,
form: {
cancelNumber: '',
}
}
},
methods:{
handleConfirm(){
this.validateForm().then(() => {
this.$emit('submit', {
...this.form,id:this.cancelObj.id
});
this.handleClose();
}).catch(error => {
this.$message.error(error.message);
});
},
validateForm() {
return new Promise((resolve, reject) => {
this.$refs.form.validate((valid) => {
if (valid) {
resolve();
} else {
reject(new Error('请填写核销码'));
}
});
});
},
handleClose(){
this.$emit('update:cancelObj', {show:false});
this.form = {
cancelNumber : ''
}
}
}
}
</script>
<style scoped lang="scss">
.info-field {
margin-bottom: 10px;
line-height: 16px;
font-size: 14px;
padding: 10px 40px;
border-radius: 4px;
.label {
color: #666666;
}
.value {
//margin-left: 8px;
}
}
</style>
<template>
<el-drawer
:title="title"
:visible.sync="visible"
:size="drawerSize"
direction="rtl"
class="drawer-form"
@close="closeDrawer"
>
<el-form :model="form" ref="form" label-width="120px">
<!-- 基本信息 -->
<div v-for="(section, index) in infoSections" :key="index" class="form-section">
<h3 class="section-title">{{ section.title }}</h3>
<el-row :gutter="20">
<el-col v-for="(item, index) in section.items" :key="index" :span="12">
<div class="info-field">
<span class="label">{{ item.label }}:</span>
<span class="value">{{ item.value }}</span>
</div>
</el-col>
</el-row>
</div>
<!-- 快递信息 -->
<div class="form-section">
<h3 class="section-title">快递信息</h3>
<el-form-item label="物流公司" prop="logisticsCompany" :rules="[{ required: true, message: '物流公司不能为空', trigger: 'blur' }]">
<el-input v-model="form.logisticsCompany" maxlength="50" show-word-limit></el-input>
</el-form-item>
<el-form-item label="物流单号" prop="logisticsOrderNo" :rules="[{ required: true, message: '物流单号不能为空', trigger: 'blur' }]">
<el-input v-model="form.logisticsOrderNo" maxlength="50" show-word-limit></el-input>
</el-form-item>
</div>
</el-form>
<!-- 底部按钮 -->
<div class="drawer-footer">
<el-button size="small" @click="closeDrawer">取消</el-button>
<el-button size="small" type="primary" @click="submitForm">发货</el-button>
</div>
</el-drawer>
</template>
<script>
export default {
props: {
title: {
type: String,
default: '详细信息'
},
visible: {
type: Boolean,
required: true
},
drawerSize: {
type: String,
default: '50%'
},
goodsObj:{
type: Object,
default: () => {}
},
infoSections: Array // 传入的数据结构数组
},
data() {
return {
form: {
logisticsCompany: '',
logisticsOrderNo: '',
}
};
},
methods: {
closeDrawer() {
this.$emit('update:visible', false);
this.form = {
logisticsCompany: '',
logisticsOrderNo: ''
}
},
validateForm() {
return new Promise((resolve, reject) => {
this.$refs.form.validate((valid) => {
if (valid) {
resolve();
} else {
reject(new Error('请填写完整的快递信息'));
}
});
});
},
submitForm() {
this.validateForm().then(() => {
this.$emit('submit', {...this.form,...this.goodsObj});
this.closeDrawer();
}).catch(error => {
this.$message.error(error.message);
});
}
}
};
</script>
<style lang="scss" scoped>
.drawer-form {
/deep/.el-drawer__body{
padding: 16px;
}
.form-section {
margin-bottom: 20px;
.section-title {
margin-bottom: 10px;
color: #333;
font-size: 16px;
font-weight: bold;
}
.info-field {
margin-bottom: 10px;
line-height: 16px;
font-size: 14px;
padding: 10px 40px;
border-radius: 4px;
.label {
color: #666666;
}
.value {
//margin-left: 8px;
}
}
}
.drawer-footer {
position: fixed;
bottom: 8px;
right: 8px;
.el-button {
margin-left: 8px;
}
}
}
</style>
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
type: 'select', type: 'select',
optionList: [ optionList: [
{ text: '全部', id: '' }, { text: '全部', id: '' },
{ text: '代发货', id: '0' }, { text: '待发货', id: '0' },
{ text: '已发货', id: '1' }, { text: '已发货', id: '1' },
{ text: '待核销', id: '2' }, { text: '待核销', id: '2' },
{ text: '已核销', id: '3' } { text: '已核销', id: '3' }
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
getListApi: this.$apis.redenvelope.winningGoodsApi, getListApi: this.$apis.redenvelope.winningGoodsApi,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: false, tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '手机号', label: '手机号',
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
{ {
label: '奖品名称', label: '奖品名称',
minWidth: 100, minWidth: 100,
prop: 'activityName', prop: 'prizeName',
}, },
{ {
label: '核销类型', label: '核销类型',
...@@ -126,11 +126,89 @@ export default { ...@@ -126,11 +126,89 @@ export default {
}, },
] ]
}, },
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: '发货',
attrs: {
type: 'text',
},
condition: row => row.statusStr == '待发货',
listeners: {
click: row => this.handleDeliverGoods(row)
}
},
{
type: 'el-button',
name: '核销',
attrs: {
type: 'text',
},
condition: row => row.statusStr == '待核销',
listeners: {
click: row => this.cancelAfterVerification(row)
}
}
],
tableSearchForm: {} tableSearchForm: {}
} }
}, },
methods: { methods: {
// 更新发货/核销展示的数据
updateInfoSections(row, title) {
let sectionIndex = this.infoSections.findIndex(item => item.title === title);
if (sectionIndex !== -1) {
this.infoSections[sectionIndex].items = this.infoSections[sectionIndex].items.map(item => ({
...item,
value: item.key && row.hasOwnProperty(item.key) ? row[item.key] : '-'
}));
}
return sectionIndex
},
// 列表发货处理
async handleDeliverGoods(row) {
await this.getExpressInfo(row)
this.goodsObj ={id:row.awardInfoId}
this.updateInfoSections(row, '基本信息');
this.isDrawerVisible = true;
},
// 通过接口获取快递到家信息
async getExpressInfo(row) {
try {
const receiveGoodsIndex = this.infoSections.findIndex(item => item.title === '收货信息');
if (receiveGoodsIndex === -1) {
// 如果找不到收货信息的索引,可能需要处理或提示
return;
}
const params = { awardInfoId: row.awardInfoId };
const res = await this.$apis.redenvelope.queryExpressInformation(params);
res.writeDetailList.forEach(expressItem => {
const infoItem = this.infoSections[receiveGoodsIndex].items.find(info => info.label === expressItem.describeMsg);
if (infoItem) {
infoItem.value = expressItem.detail || '-';
}
});
} catch (error) {
// 异常处理逻辑,例如显示错误消息
this.$message.error('获取快递信息失败');
}
},
// 列表核销处理
cancelAfterVerification(row){
let basicInfoIndex = this.updateInfoSections(row, '基本信息');
this.cancelObj = {
show: true,
title: '核销',
id: row.awardInfoId || '',
infoSections:[this.infoSections[basicInfoIndex]]
}
}
}, },
}; };
...@@ -41,24 +41,125 @@ ...@@ -41,24 +41,125 @@
</span> </span>
</GLTable> </GLTable>
</div> </div>
<DeliverGoods :title="'发货'"
:visible.sync="isDrawerVisible"
:infoSections="infoSections"
:goodsObj = "goodsObj"
@submit="handleShipping"></DeliverGoods>
<CancelAfterVerification ref="afterVerification" :cancelObj.sync="cancelObj" @submit="handleCancel"></CancelAfterVerification>
<GLDialog
title="提示"
:has-footer="false"
:visible.sync="tipsObj.show"
mode="small"
>
<template #default>
<div class="over-box">
<div :class="tipsObj.iconType"></div>
<div class="tips">{{ tipsObj.text }}</div>
</div>
</template>
</GLDialog>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import dataImportMixin from "./dataImportMixin"; import dataImportMixin from "./dataImportMixin";
import repeatMethods from "../common/repeatMethods"; import repeatMethods from "../common/repeatMethods";
import DeliverGoods from "./cpns/DeliverGoods";
import CancelAfterVerification from "./cpns/CancelAfterVerification";
export default { export default {
name: 'DisplayRecord', name: 'DisplayRecord',
mixins: [dataImportMixin,repeatMethods], mixins: [dataImportMixin,repeatMethods],
components:{ components:{
DeliverGoods,
CancelAfterVerification
}, },
data() { data() {
return { return {
tipsObj:{
show:false,
text:'',
iconType:'el-icon-success'
},
goodsObj:{},
isDrawerVisible:false,
infoSections: [
{
title: '基本信息',
items: [
{ label: '活动名称', value: '',key:'activityName' },
{ label: '客户手机号', value: '',key:'userPhone'},
{ label: '微信昵称', value: '',key:'wechatName' },
{ label: '奖品名称', value: '',key:'prizeName' },
]
},
{
title: '收货信息',
items: [
{ label: '收件人', value: '',key:'' },
{ label: '联系电话', value: '',key:'' },
{ label: '身份证', value: '',key:'' },
{ label: '收货地址', value: '',key:'' },
{ label: '小区名称', value: '',key:'' },
{ label: '楼栋', value: '',key:'' },
{ label: '房号', value: '',key:'' }
]
},
],
cancelObj:{}
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
async handleOperation(form, operationType) {
const { id, logisticsOrderNo, logisticsCompany, cancelNumber } = form;
const params = operationType === 'shipping' ? {
awardInfoId: id,
logisticsOrderNo,
logisticsCompany
} : {
awardInfoId: id,
code: cancelNumber
};
try {
const res = await this.$apis.redenvelope.goodsAreWrittenOffAndShipped(params);
if (res.code == 0 && res.data == true) {
this.tipsObj = {
show:true,
iconType:'el-icon-success',
text: operationType === 'shipping' ? '发货成功' : '核销成功'
}
if (operationType === 'shipping') {
this.isDrawerVisible = false;
} else {
this.$refs.afterVerification.handleClose();
}
this.handleSearch();
} else {
this.tipsObj = {
show:true,
iconType:'el-icon-error',
text: res.message
}
}
} catch (error) {
this.$message.error('操作失败');
}
},
handleShipping(form) {
this.handleOperation(form, 'shipping');
},
handleCancel(form) {
this.handleOperation(form, 'cancel');
},
getParams() { getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
this.updateParams(params, 'exchangeTime', 'exchangeTime', 'startExchangeTime', 'endExchangeTime'); this.updateParams(params, 'exchangeTime', 'exchangeTime', 'startExchangeTime', 'endExchangeTime');
...@@ -69,43 +170,20 @@ export default { ...@@ -69,43 +170,20 @@ export default {
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.container { @import "../common/style.scss";
height: 100%; .over-box{
background-color: #fff; .el-icon-success {
-webkit-box-sizing: border-box; font-size: 48px;
box-sizing: border-box; color: #67c23a;
padding: 20px;
.table-title {
font-weight: 700;
font-size: 16px;
color: #333333;
padding-bottom: 18px;
} }
.el-icon-error {
.sticky { font-size: 48px;
position: relative; color: #EB4E4E;
z-index: 2; }
.tips{
&-btns { color: #333333;
position: absolute; font-size: 16px;
right: 0; font-weight: 600;
bottom: -23px;
overflow: hidden;
.el-button + .el-button {
margin-left: 8px;
}
.btns {
transition: all 0.25s;
.el-button {
padding: 8px 15px;
min-width: 60px;
}
}
}
} }
} }
</style> </style>
<template>
<div class="add-wrap">
<div class="container gl-form-page">
<el-form ref="configRef" label-width="154px" :rules="configRules" :model="configForm">
<el-form-item label="活动名称:" prop="activityName" class="m-t-20">
<el-input :size="size" v-model="configForm.activityName" placeholder="请输入" maxlength="25" :disabled="disabled"></el-input>
</el-form-item>
<el-form-item label="所属渠道:" prop="merchantId" class="m-t-20">
<el-select :size="size" v-model="configForm.merchantId" placeholder="请选择" :disabled="disabled" filterable remote :remote-method="remoteMethod" v-reachbottom="onReachBottom" @focus="selectFocus" :loading="loading">
<el-option v-for="item in merchantObj.data" :key="item.confId" :label="item.confName" :value="item.confId"></el-option>
<template v-if="merchantObj.nothing">
<div class="nothing">到底了!</div>
</template>
</el-select>
</el-form-item>
<el-form-item label="活动时间:" prop="activityTime" class="m-t-20">
<el-date-picker :size="size" v-model="configForm.activityTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="afterRangePickerOptions"></el-date-picker>
</el-form-item>
<el-form-item label="活动形式:" prop="activityType" class="m-t-20">
<el-radio-group :size="size" v-model="configForm.activityType" style="width: 400px" :disabled="disabled">
<el-radio :label="0">随机红包</el-radio>
<el-radio :label="1">九宫格</el-radio>
<el-radio :label="2">翻牌</el-radio>
<el-radio :label="3">大转盘</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="导入链接:" prop="exportUrl" class="m-t-20">
<div class="activity-link">
<div class="upload-btn">
<el-button size="small">
<i class="el-icon-plus"></i>
上传文件
</el-button>
<input type="file" style="opacity: 0" ref="file" accept="*" @change="uploadFile" />
</div>
<a href="https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/红包链接.xlsx" target="_blank">下载导入模板</a>
<template v-if="configForm.exportUrl">
<div class="file-info flex">
{{ fileName }}
<div class="el-icon-success"></div>
</div>
</template>
<template v-if="fileError">
<div class="file-info flex error">
<a :href="fileError" target="_blank">下载失败列表</a>
<div class="el-icon-error"></div>
</div>
</template>
</div>
</el-form-item>
</el-form>
</div>
<GLFooter>
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleConfirm">提交</el-button>
</GLFooter>
</div>
</template>
<script type='text/ecmascript-6'>
export const afterRangePickerOptions = {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate() - 1))
if (date < yesterday) {
return true
}
return false
}
}
import commonFun from '../common/fun.js'
import * as dayjs from 'dayjs'
import { getMerchantListMixin } from '@/mixins'
export default {
mixins: [getMerchantListMixin],
name: '',
props: {
editObj: {
type: Object,
default: () => {}
}
},
data() {
return {
id: this.$route.query.id,
afterRangePickerOptions,
disabled: false,
configForm: {
activityName: '',
merchantId: '',
activityTime: '',
activityType: 0,
exportUrl: ''
},
configRules: {
activityName: [
{
required: true,
message: '请输入活动名称',
trigger: 'blur'
}
],
merchantId: [
{
required: true,
message: '请选择所属渠道',
trigger: 'blur'
}
],
activityTime: [
{
required: true,
message: '请输入活动时间',
trigger: 'blur'
}
],
activityType: [
{
required: true
}
],
exportUrl: [
{
required: true,
message: '请导入链接'
}
]
},
fileName: '',
fileError: ''
}
},
created() {
if (this.id) this.getRedEnvelopeActivityDetail()
},
methods: {
async getRedEnvelopeActivityDetail() {
let { id } = this
try {
const { configForm } = this,
res = await this.$apis.redenvelope.getRedEnvelopeActivityDetail({ id }),
merchantId = String(res.merchantId)
this.configForm = {
...configForm,
activityName: res.activityName,
activityType: res.activityType,
merchantId,
activityTime: [dayjs(res.activityStartTime).toDate(), dayjs(res.activityEndTime).toDate()],
id
}
this.merchantObj.data = [
{
confId: merchantId,
confName: res.merchantName
}
]
this.disabled = true
this.configRules.exportUrl[0].required = false
} catch (error) {
this.$message.error(error)
}
},
handleClose() {
// this.configForm = this.$options.data.call(this).configForm
// this.disabled = false
// this.fileError = ''
// this.$refs.configRef.resetFields()
// this.merchantObj.data = []
// this.$emit('update:editObj', {})
this.$router.push('/redEnvelope/index')
},
handleConfirm() {
this.$refs.configRef.validate(async valid => {
if (valid) {
try {
const { configForm, merchantObj } = this
let params = this.$common.utils.deepClone(configForm),
targetName = params.id ? 'updateActivityRedEnvelope' : 'createActivityRedEnvelope'
params.sourceType = 1
params.activityStartTime = dayjs(params.activityTime[0]).format('YYYY-MM-DD')
params.activityEndTime = dayjs(params.activityTime[1]).format('YYYY-MM-DD')
params.merchantName = merchantObj.data.find(e => e.confId == params.merchantId).confName
delete params.activityTime
console.log(JSON.parse(JSON.stringify(params)))
const res = await this.$apis.redenvelope[targetName](params)
if (res) {
this.$message({
message: params.id ? '编辑成功' : '创建成功',
type: 'success'
})
this.handleClose()
} else throw params.id ? '编辑失败' : '创建失败'
} catch (error) {
this.$message.error(error)
}
}
})
},
async uploadFile(e) {
const { id } = this.configForm,
target = id ? 'updateCheckFile' : 'createCheckFile'
try {
const { url, name } = await commonFun.uploadFile(e, this),
params = { exportUrl: url }
if (id) params.id = id
this.$refs.file.value = ''
const res = await this.$apis.redenvelope[target](params)
if (res) {
if (res.totalCount == 0 || res.failCount > 0) {
this.fileError = res.errorUrl
this.$message.error('红包链接导入失败')
this.configForm.exportUrl = ''
return
}
this.$message({
message: '导入成功',
type: 'success'
})
this.fileError = ''
this.configForm.exportUrl = url
this.fileName = name
}
} catch (error) {
console.log(error)
if (error) this.$message.error(error)
this.$refs.file.value = ''
}
}
}
}
</script>
<style scoped lang='scss'>
.container {
padding: 32px 20px;
background: #ffffff;
border-radius: 0 4px 4px 4px;
margin: 16px;
}
.activity-link {
display: flex;
width: 500px;
.upload-btn {
position: relative;
width: 110px;
height: 32px;
.el-button--small {
width: 100%;
height: 100%;
}
input {
cursor: pointer;
position: absolute;
height: 100%;
width: 100%;
top: 0px;
left: 0px;
font-size: 0px;
}
}
a,
.error {
margin-left: 8px;
color: #5850ff;
font-size: 14px;
cursor: pointer;
}
.file-info {
margin-left: 8px;
.el-icon-success {
margin-left: 8px;
color: #67c23a;
}
.el-icon-error {
margin-left: 8px;
color: red;
}
}
}
.nothing {
font-size: 14px;
padding: 0 20px;
white-space: nowrap;
color: #606266;
height: 34px;
line-height: 34px;
text-align: center;
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div>
<div class="tabs">
<GLTabs v-model="currentComponent" :tabPaneList="tabPaneList" @tab-click="handleClick"></GLTabs>
<component :is="currentComponent" ref="componentRef"></component>
</div>
</div>
</template>
<script>
export default {
components: {
FreeInnovate: () => import('./FreeAdd.vue'),
OffshoreProcurement: () => import('./OffAdd.vue')
},
data() {
return {
currentComponent: '',
sourceType: this.$route.query.sourceType,
tabPaneList: [
{
label: '自研红包',
name: 'FreeInnovate'
},
{
label: '外采红包',
name: 'OffshoreProcurement'
}
]
}
},
created() {
this.currentComponent = this.sourceType == 1 ? 'OffshoreProcurement' : 'FreeInnovate';
this.handleClick()
},
methods: {
handleClick(e) {
if(this.sourceType){
this.tabPaneList[0].disabled=true
this.currentComponent='OffshoreProcurement'
}
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="container"> <div class="container">
<div class="sticky"> <div class="sticky">
<GLCombiForm <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
<div class="sticky-btns"> <div class="sticky-btns">
<div class="btns"> <div class="btns">
<el-button <el-button type="default" plain @click="showEditFun">新建</el-button>
type="default" <el-button type="default" @click="handleExport">导出</el-button>
plain
@click="showEditFun"
>新建</el-button>
<el-button
type="default"
@click="handleExport"
>导出</el-button>
</div> </div>
</div> </div>
</div> </div>
<div class="tabelList"> <div class="tabelList">
<div class="table-title">红包配置列表</div> <div class="table-title">红包配置列表</div>
<GLTable <GLTable ref="listRef" :getListApi="getListApi" :searchForm="tableSearchForm" :noDataImg="url" :tableParams="tableParams" :pageConf="pageConf">
ref="listRef" <span slot="auth-button" slot-scope="scope">
:getListApi="getListApi" <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
:searchForm="tableSearchForm"
:noDataImg="url"
:tableParams="tableParams"
:pageConf="pageConf"
>
<span
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -50,7 +22,6 @@ ...@@ -50,7 +22,6 @@
<transition name="fade"> <transition name="fade">
<whiteList v-if="whiteListObj.show" :whiteListObj.sync="whiteListObj" :key="whiteListKey"></whiteList> <whiteList v-if="whiteListObj.show" :whiteListObj.sync="whiteListObj" :key="whiteListKey"></whiteList>
</transition> </transition>
</div> </div>
</template> </template>
...@@ -60,12 +31,12 @@ import * as dayjs from 'dayjs' ...@@ -60,12 +31,12 @@ import * as dayjs from 'dayjs'
import linkDetail from './linkDetail.vue' import linkDetail from './linkDetail.vue'
import edit from './edit.vue' import edit from './edit.vue'
import whiteList from './whiteList' import whiteList from './whiteList'
import {exportFn, activityStatusList} from '@/common/constant' import { exportFn, activityStatusList } from '@/common/constant'
export default { export default {
components: {linkDetail, edit, whiteList}, components: { linkDetail, edit, whiteList },
name: 'RedEnvelopeConfig', name: 'RedEnvelopeConfig',
data () { data() {
return { return {
url, url,
whiteListKey: 0, whiteListKey: 0,
...@@ -110,11 +81,11 @@ export default { ...@@ -110,11 +81,11 @@ export default {
optionList: [ optionList: [
{ text: '全部', id: '' }, { text: '全部', id: '' },
{ text: '外采', id: '1' }, { text: '外采', id: '1' },
{ text: '自研', id: '0' }, { text: '自研', id: '0' }
], ],
optionId: 'id', optionId: 'id',
optionLabel: 'text' optionLabel: 'text'
}, }
], ],
getListApi: this.$apis.redenvelope.getRedEnvelopeConfigList, getListApi: this.$apis.redenvelope.getRedEnvelopeConfigList,
tableParams: { tableParams: {
...@@ -136,14 +107,7 @@ export default { ...@@ -136,14 +107,7 @@ export default {
prop: 'questionCount', prop: 'questionCount',
minWidth: 100, minWidth: 100,
formatter: cell => { formatter: cell => {
return cell.activityStartTime ? `${dayjs(cell.activityStartTime).format('YYYY/MM/DD')}-${dayjs(cell.activityEndTime).format('YYYY/MM/DD')} `: '' return cell.activityStartTime ? `${dayjs(cell.activityStartTime).format('YYYY/MM/DD')}-${dayjs(cell.activityEndTime).format('YYYY/MM/DD')} ` : ''
}
},
{
label: '创建类型',
minWidth: 100,
formatter:cell => {
return {'0':'自研','1':'外采'}[cell.createdSource]
} }
}, },
{ {
...@@ -152,16 +116,21 @@ export default { ...@@ -152,16 +116,21 @@ export default {
minWidth: 100 minWidth: 100
}, },
{ {
label: '创建类型',
minWidth: 100,
formatter: cell => {
return { 0: '自研', 1: '外采' }[cell.sourceType]
}
},
{
label: '红包链接总数', label: '红包链接总数',
prop: 'amount', prop: 'amount',
minWidth: 150 minWidth: 150
}, },
{ {
label: '已用总数', label: '已用总数',
prop: 'usedAmount', prop: 'usedAmount',
minWidth: 100 minWidth: 100
}, },
{ {
label: '可用总数', label: '可用总数',
...@@ -172,7 +141,7 @@ export default { ...@@ -172,7 +141,7 @@ export default {
label: '状态', label: '状态',
prop: 'activityStatusStr', prop: 'activityStatusStr',
minWidth: 100 minWidth: 100
}, }
] ]
}, },
// 表格按钮 // 表格按钮
...@@ -181,7 +150,10 @@ export default { ...@@ -181,7 +150,10 @@ export default {
type: 'el-button', type: 'el-button',
name: '编辑', name: '编辑',
attrs: { attrs: {
type: 'text', type: 'text'
},
condition: row => {
return row.sourceType == 1
}, },
listeners: { listeners: {
click: row => this.showEditFun(row) click: row => this.showEditFun(row)
...@@ -191,7 +163,7 @@ export default { ...@@ -191,7 +163,7 @@ export default {
type: 'el-button', type: 'el-button',
name: '链接详情', name: '链接详情',
attrs: { attrs: {
type: 'text', type: 'text'
}, },
listeners: { listeners: {
click: row => this.jumpDetail(row) click: row => this.jumpDetail(row)
...@@ -201,7 +173,7 @@ export default { ...@@ -201,7 +173,7 @@ export default {
type: 'el-button', type: 'el-button',
name: '白名单', name: '白名单',
attrs: { attrs: {
type: 'text', type: 'text'
}, },
listeners: { listeners: {
click: row => this.whiteList(row) click: row => this.whiteList(row)
...@@ -214,11 +186,9 @@ export default { ...@@ -214,11 +186,9 @@ export default {
tableSearchForm: {} tableSearchForm: {}
} }
}, },
mounted () { mounted() {},
},
methods: { methods: {
getParams () { getParams() {
const searchForm = JSON.parse(JSON.stringify(this.searchForm)) const searchForm = JSON.parse(JSON.stringify(this.searchForm))
if (searchForm.activityTime) { if (searchForm.activityTime) {
searchForm.activityStartTime = dayjs(this.searchForm.activityTime[0]).format('YYYY-MM-DD') searchForm.activityStartTime = dayjs(this.searchForm.activityTime[0]).format('YYYY-MM-DD')
...@@ -227,50 +197,60 @@ export default { ...@@ -227,50 +197,60 @@ export default {
delete searchForm.activityTime delete searchForm.activityTime
return searchForm return searchForm
}, },
handleSearch () { handleSearch() {
this.tableSearchForm = this.getParams() this.tableSearchForm = this.getParams()
this.$refs.listRef.refreshTable() this.$refs.listRef.refreshTable()
}, },
handleReset () { handleReset() {
this.searchForm = this.$options.data.call(this).searchForm this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch() this.handleSearch()
}, },
jumpDetail (e) { jumpDetail(e) {
this.linkDetailObj = { this.linkDetailObj = {
show: true, show: true,
id: e.id id: e.id
} }
}, },
whiteList(e) { whiteList(e) {
this.whiteListKey++; // 更改key值,强制Vue重新渲染whiteList组件 this.whiteListKey++ // 更改key值,强制Vue重新渲染whiteList组件
setTimeout(() => { setTimeout(() => {
this.whiteListObj = { this.whiteListObj = {
show: true, show: true,
id: e.id id: e.id
}; }
}, ); // 延迟100毫秒,您可以根据需要调整这个值 }) // 延迟100毫秒,您可以根据需要调整这个值
},
showEditFun (e) {
this.editObj = {
show: true,
title: e.id ? '编辑' : '新建',
id: e.id || ''
}
}, },
handleExport () { showEditFun(e) {
this.$apis.redenvelope.exportActivityRedEnvelope({ // this.editObj = {
...this.getParams(), // show: true,
...this.$refs.listRef.page // title: e.id ? '编辑' : '新建',
}).then(res => { // id: e.id || ''
exportFn(res) // }
this.$router.push({
path: `/redEnvelope/components/RedEnvelopeConfig/add`,
query:{
id:e.id,
sourceType:e.sourceType
}
}) })
}, },
handleExport() {
this.$apis.redenvelope
.exportActivityRedEnvelope({
...this.getParams(),
...this.$refs.listRef.page
})
.then(res => {
exportFn(res)
})
}
} }
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.fade-enter-active, .fade-leave-active { .fade-enter-active,
.fade-leave-active {
transition: opacity 0.1s; transition: opacity 0.1s;
} }
.fade-enter, .fade-leave-to /* .fade-leave-active in <2.1.8 */ { .fade-enter, .fade-leave-to /* .fade-leave-active in <2.1.8 */ {
......
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
}, },
{ {
label: '来源', label: '用途',
prop: 'bindingSourceStr', prop: 'bindingSourceStr',
minWidth: 100 minWidth: 100
}, },
......
...@@ -185,6 +185,11 @@ export default { ...@@ -185,6 +185,11 @@ export default {
minWidth: 100 minWidth: 100
}, },
{ {
label: '奖品名称',
prop: 'thirdPrizeName',
minWidth: 100
},
{
label: '中奖金额', label: '中奖金额',
prop: 'thirdPrizeMoney', prop: 'thirdPrizeMoney',
minWidth: 100 minWidth: 100
...@@ -212,7 +217,7 @@ export default { ...@@ -212,7 +217,7 @@ export default {
exportFn(res) exportFn(res)
}) })
}, },
getParams() { getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
this.updateParams(params, 'showTime', 'showTime', 'startShowTime', 'endShowTime'); this.updateParams(params, 'showTime', 'showTime', 'startShowTime', 'endShowTime');
......
...@@ -40,6 +40,14 @@ ...@@ -40,6 +40,14 @@
:tableParams="tableParams" :tableParams="tableParams"
:pageConf="pageConf" :pageConf="pageConf"
> >
<template slot="thirdCashOutStatus" slot-scope="scope">
<div class="table_circular_flex">
<div :class="['table_circular',colorFee[scope.scope.thirdCashOutStatus]]">
</div>
<span>{{scope.scope.thirdCashOutStatus}}</span>
</div>
</template>
<span <span
slot="auth-button" slot="auth-button"
slot-scope="scope" slot-scope="scope"
...@@ -62,6 +70,13 @@ import * as dayjs from 'dayjs' ...@@ -62,6 +70,13 @@ import * as dayjs from 'dayjs'
import importRecord from './importRecord.vue' import importRecord from './importRecord.vue'
import {exportFn} from '@/common/constant' import {exportFn} from '@/common/constant'
import inputNumRange from '@/components/inputNumRange' import inputNumRange from '@/components/inputNumRange'
const STAGE_COLOR = Object.freeze({
'提现成功':'circular_green',
'补发成功':'circular_green',
'发放中':'circular_blue',
'提现失败':'circular_red',
'补发失败':'circular_gray',
})
export default { export default {
name: 'RedEnvelopeWithdraw', name: 'RedEnvelopeWithdraw',
...@@ -69,6 +84,7 @@ export default { ...@@ -69,6 +84,7 @@ export default {
data() { data() {
return { return {
url, url,
colorFee : STAGE_COLOR,
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'}, pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
searchForm: {}, searchForm: {},
searchFormData: [ searchFormData: [
...@@ -203,8 +219,8 @@ export default { ...@@ -203,8 +219,8 @@ export default {
}, },
{ {
label: '提现状态', label: '提现状态',
minWidth: 100, minWidth: 150,
prop: 'thirdCashOutStatus' addHtml: 'thirdCashOutStatus'
}, },
{ {
label: '提现时间', label: '提现时间',
......
...@@ -8,6 +8,7 @@ export default { ...@@ -8,6 +8,7 @@ export default {
url, url,
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'}, pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
searchForm: { searchForm: {
selectedArea:[]
}, },
searchFormData: [ searchFormData: [
{ {
...@@ -48,6 +49,10 @@ export default { ...@@ -48,6 +49,10 @@ export default {
maxlength: 11 maxlength: 11
}, },
{ {
label: '省市区',
addHtml:'regionSlot'
},
{
label: '金额', label: '金额',
addHtml:'priceSlot' addHtml:'priceSlot'
}, },
...@@ -119,6 +124,11 @@ export default { ...@@ -119,6 +124,11 @@ export default {
} }
}, },
{ {
label: '奖品名称',
minWidth: 150,
prop:'prizeName'
},
{
label: '金额/元', label: '金额/元',
prop: 'amount', prop: 'amount',
minWidth: 100 minWidth: 100
...@@ -145,8 +155,8 @@ export default { ...@@ -145,8 +155,8 @@ export default {
}, },
{ {
label: '状态', label: '状态',
minWidth: 100, minWidth: 150,
prop:'statusStr' addHtml:'statusStr'
}, },
{ {
label: '中奖时间', label: '中奖时间',
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
<div slot="priceSlot"> <div slot="priceSlot">
<inputNumRange :formData="searchForm" :keyObj="{from: 'startAmount', to:'endAmount'}"></inputNumRange> <inputNumRange :formData="searchForm" :keyObj="{from: 'startAmount', to:'endAmount'}"></inputNumRange>
</div> </div>
<div slot="regionSlot">
<regionCascader ref="regionCascader" :selectedArea="searchForm.selectedArea" :checkStrictly="true" @update:selectedArea="val => searchForm.selectedArea = val"></regionCascader>
</div>
</GLCombiForm> </GLCombiForm>
<div class="sticky-btns"> <div class="sticky-btns">
<div class="btns"> <div class="btns">
...@@ -32,6 +35,14 @@ ...@@ -32,6 +35,14 @@
:tableParams="tableParams" :tableParams="tableParams"
:pageConf="pageConf" :pageConf="pageConf"
> >
<template slot="statusStr" slot-scope="scope">
<div class="table_circular_flex">
<div :class="['table_circular',colorFee[scope.scope.statusStr]]">
</div>
<span>{{scope.scope.statusStr}}</span>
</div>
</template>
<span <span
slot="auth-button" slot="auth-button"
slot-scope="scope" slot-scope="scope"
...@@ -51,15 +62,28 @@ ...@@ -51,15 +62,28 @@
import dataImportMixin from "./dataImportMixin"; import dataImportMixin from "./dataImportMixin";
import repeatMethods from "../common/repeatMethods"; import repeatMethods from "../common/repeatMethods";
import inputNumRange from "@/components/inputNumRange"; import inputNumRange from "@/components/inputNumRange";
import regionCascader from "@/components/regionCascader";
const STAGE_COLOR = Object.freeze({
'已领取':'circular_green',
'发放中':'circular_blue',
'待核销':'circular_yellow',
'发放成功':'circular_green',
'已核销':'circular_green',
'领取失败':'circular_red',
'发放失败':'circular_red',
})
export default { export default {
name: 'DisplayRecord', name: 'DisplayRecord',
mixins: [dataImportMixin, repeatMethods], mixins: [dataImportMixin, repeatMethods],
components: { components: {
inputNumRange inputNumRange,
regionCascader
}, },
data() { data() {
return {} return {
colorFee : STAGE_COLOR
}
}, },
mounted() { mounted() {
}, },
...@@ -68,6 +92,7 @@ export default { ...@@ -68,6 +92,7 @@ export default {
let params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
params.startAmount = params.startAmount ? params.startAmount * 100 : '' params.startAmount = params.startAmount ? params.startAmount * 100 : ''
params.endAmount = params.endAmount ? params.endAmount * 100 : '' params.endAmount = params.endAmount ? params.endAmount * 100 : ''
this.handleProvinceParams(params)
this.updateParams(params, 'winTime', 'winTime', 'startWinTime', 'startWinTime'); this.updateParams(params, 'winTime', 'winTime', 'startWinTime', 'startWinTime');
return params return params
} }
...@@ -76,43 +101,5 @@ export default { ...@@ -76,43 +101,5 @@ export default {
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.container { @import "../common/style.scss";
height: 100%;
background-color: #fff;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 20px;
.table-title {
font-weight: 700;
font-size: 16px;
color: #333333;
padding-bottom: 18px;
}
.sticky {
position: relative;
z-index: 2;
&-btns {
position: absolute;
right: 0;
bottom: -23px;
overflow: hidden;
.el-button + .el-button {
margin-left: 8px;
}
.btns {
transition: all 0.25s;
.el-button {
padding: 8px 15px;
min-width: 60px;
}
}
}
}
}
</style> </style>
...@@ -8,6 +8,7 @@ export default { ...@@ -8,6 +8,7 @@ export default {
}, },
handleReset() { handleReset() {
this.searchForm = this.$options.data.call(this).searchForm this.searchForm = this.$options.data.call(this).searchForm
this.searchForm.hasOwnProperty('selectedArea') && this.$set(this.searchForm, 'selectedArea', []);
this.handleSearch() this.handleSearch()
}, },
handleExport(apiName) { handleExport(apiName) {
...@@ -16,29 +17,25 @@ export default { ...@@ -16,29 +17,25 @@ export default {
exportFn(res) exportFn(res)
}) })
}, },
beforeSearchFn() {
return new Promise((resolve) => {
const { selectedArea } = this.searchForm;
// 清除旧的省市区 ID
this.searchForm.provincesId = '';
this.searchForm.cityId = '';
this.searchForm.districtsId = '';
// 根据 selectedArea 的长度设置相应的 ID
if (selectedArea) {
[this.searchForm.provincesId, this.searchForm.cityId, this.searchForm.districtsId] = selectedArea;
}
delete this.searchForm.selectedArea;
resolve();
});
},
getParams() { getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
return params return params
}, },
handleProvinceParams(params){
const { selectedArea } = params;
// 只有当 selectedArea 存在时,才更新省市区 ID
if (selectedArea && selectedArea.length > 0) {
params.provincesId = selectedArea[0] || '';
params.cityId = selectedArea[1] || '';
params.districtsId = selectedArea[2] || '';
}
// 删除 selectedArea 属性
delete params.selectedArea;
return params
},
updateParams(params, paramKey, formKey, beginKey, endKey) { updateParams(params, paramKey, formKey, beginKey, endKey) {
if (params[paramKey]) { if (params[paramKey]) {
params[beginKey] = this.searchForm[formKey][0]; params[beginKey] = this.searchForm[formKey][0];
......
.container {
height: 100%;
background-color: #fff;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 20px;
.table-title {
font-weight: 700;
font-size: 16px;
color: #333333;
padding-bottom: 18px;
}
.sticky {
position: relative;
z-index: 2;
&-btns {
position: absolute;
right: 0;
bottom: -23px;
overflow: hidden;
.el-button + .el-button {
margin-left: 8px;
}
.btns {
transition: all 0.25s;
.el-button {
padding: 8px 15px;
min-width: 60px;
}
}
}
}
}
...@@ -18,14 +18,6 @@ ...@@ -18,14 +18,6 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
// import RedEnvelopeConfig from './components/RedEnvelopeConfig/index.vue'
// import RedEnvelopeRecord from './components/RedEnvelopeRecord/index.vue'
// import RedEnvelopeWithdraw from "./components/RedEnvelopeWithdraw/index.vue";
// import DisplayRecord from "./components/DisplayRecord/index.vue";
// import DrawRecord from "./components/DrawRecord/index.vue";
// import WinningRecord from "./components/WinningRecord/index.vue";
// import PhysicalPrizeWriteOff from "./components/PhysicalPrizeWriteOff/index.vue";
// import ActiveTemplateManagement from "./components/ActiveTemplateManagement/index.vue";
export default { export default {
// 按需加载子组件 // 按需加载子组件
components: { components: {
...@@ -48,10 +40,6 @@ export default { ...@@ -48,10 +40,6 @@ export default {
name: 'RedEnvelopeConfig' name: 'RedEnvelopeConfig'
}, },
{ {
label: '提现记录',
name: 'RedEnvelopeWithdraw'
},
{
label: '展示记录', label: '展示记录',
name:'DisplayRecord' name:'DisplayRecord'
}, },
...@@ -64,6 +52,10 @@ export default { ...@@ -64,6 +52,10 @@ export default {
name:'WinningRecord' name:'WinningRecord'
}, },
{ {
label: '提现记录',
name: 'RedEnvelopeWithdraw'
},
{
label: '实物奖品核销', label: '实物奖品核销',
name:'PhysicalPrizeWriteOff' name:'PhysicalPrizeWriteOff'
}, },
...@@ -79,6 +71,13 @@ export default { ...@@ -79,6 +71,13 @@ export default {
} }
}, },
mounted () { mounted () {
// 检查sessionStorage
const returnFromAddPage = sessionStorage.getItem('returnFromAddPage');
if (returnFromAddPage) {
this.currentComponent = returnFromAddPage;
// 可选:清除sessionStorage中的项
sessionStorage.removeItem('returnFromAddPage');
}
}, },
methods: { methods: {
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!