Commit 277d4f50 by 前端

Merge branch 'Saas+v4.14.0_1223' into 'master'

Saas+v4.14.0 1223

See merge request !22
2 parents 3c1d6708 4aff5013
{ {
"name": "scrm-micro-activity-center", "name": "activityCenter",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
...@@ -1125,11 +1125,26 @@ ...@@ -1125,11 +1125,26 @@
"version": "7.19.4", "version": "7.19.4",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.4.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.4.tgz",
"integrity": "sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==", "integrity": "sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==",
"dev": true,
"requires": { "requires": {
"regenerator-runtime": "^0.13.4" "regenerator-runtime": "^0.13.4"
} }
}, },
"@babel/runtime-corejs3": {
"version": "7.20.6",
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.20.6.tgz",
"integrity": "sha512-tqeujPiuEfcH067mx+7otTQWROVMKHXEaOQcAeNV5dDdbPWvPcFA8/W9LXw2NfjNmOetqLl03dfnG2WALPlsRQ==",
"requires": {
"core-js-pure": "^3.25.1",
"regenerator-runtime": "^0.13.11"
},
"dependencies": {
"regenerator-runtime": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
}
}
},
"@babel/template": { "@babel/template": {
"version": "7.18.10", "version": "7.18.10",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz",
...@@ -1840,6 +1855,75 @@ ...@@ -1840,6 +1855,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": {
...@@ -3960,6 +4044,11 @@ ...@@ -3960,6 +4044,11 @@
"browserslist": "^4.21.4" "browserslist": "^4.21.4"
} }
}, },
"core-js-pure": {
"version": "3.26.1",
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.26.1.tgz",
"integrity": "sha512-VVXcDpp/xJ21KdULRq/lXdLzQAtX7+37LzpyfFM973il0tWSsDEoyzG38G14AjTpK9VTfiNM9jnFauq/CpaWGQ=="
},
"core-util-is": { "core-util-is": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
...@@ -10028,8 +10117,7 @@ ...@@ -10028,8 +10117,7 @@
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.13.9", "version": "0.13.9",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
"dev": true
}, },
"regenerator-transform": { "regenerator-transform": {
"version": "0.15.0", "version": "0.15.0",
...@@ -12585,75 +12673,6 @@ ...@@ -12585,75 +12673,6 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/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.npmmirror.com/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.npmmirror.com/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.npmmirror.com/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.npmmirror.com/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.npmmirror.com/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.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": { "vue-router": {
"version": "3.6.5", "version": "3.6.5",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz",
...@@ -12726,6 +12745,23 @@ ...@@ -12726,6 +12745,23 @@
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz", "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
"integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==" "integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw=="
}, },
"wangeditor": {
"version": "4.7.15",
"resolved": "https://registry.npmjs.org/wangeditor/-/wangeditor-4.7.15.tgz",
"integrity": "sha512-aPTdREd8BxXVyJ5MI+LU83FQ7u1EPd341iXIorRNYSOvoimNoZ4nPg+yn3FGbB93/owEa6buLw8wdhYnMCJQLg==",
"requires": {
"@babel/runtime": "^7.11.2",
"@babel/runtime-corejs3": "^7.11.2",
"tslib": "^2.1.0"
},
"dependencies": {
"tslib": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
}
}
},
"watchpack": { "watchpack": {
"version": "1.7.5", "version": "1.7.5",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz",
......
import { http } from '@/main'
const defaultPath = 'entmicro.api.payment.'
const url = '/rop-scrm-entmicro/router'
// 获取支付商户列表数据
const getListApi = params => {
params.method = `${defaultPath}pageListPayment`
return http({
url: url,
method: 'POST',
data: params,
sign: true
})
}
// 获取所属商户数据
const getBusinessListApi = params => {
params.method = `${defaultPath}listMerchant`
return http({
url: url,
method: 'POST',
data: params,
sign: true
})
}
// 创建支付商户账号
const creatPayMerchantApi = params => {
params.method = `${defaultPath}createPayment`
return http({
url: url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 删除支付商户账号
const delPayMerchantApi = params => {
params.method = `${defaultPath}deleteById`
return http({
url: url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 生成收款测试公众号码
const creatBizQrcodeApi = params => {
params.method = `${defaultPath}createBizQrCode`
return http({
url: url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 生成收款测试微信小程序码
const createWeappQrcodeApi = params => {
params.method = `${defaultPath}createWeappQrcode`
return http({
url: url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 上传证书
const uploadCertApi = params => {
params.method = `${defaultPath}uploadCert`
return http({
url: url,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 获取应用Id列表
const getlistAppInfoApi = params => {
params.method = `${defaultPath}listAppInfo`
return http({
url: url,
method: 'POST',
data: params,
sign: true
})
}
export default {
getListApi,
getBusinessListApi,
creatPayMerchantApi,
delPayMerchantApi,
creatBizQrcodeApi,
createWeappQrcodeApi,
uploadCertApi,
getlistAppInfoApi
}
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
getList() { getList() {
var params = { var params = {
goodsStatus: 1, goodsStatus: 1,
// goodsSource: 1, isActivityUsing: 1,
goodsSources: [1, 3], goodsSources: [1, 3],
pageNum: 1, pageNum: 1,
pageSize: 100000, pageSize: 100000,
......
...@@ -56,6 +56,19 @@ const staticRoutes = Object.freeze([ ...@@ -56,6 +56,19 @@ const staticRoutes = Object.freeze([
path: '/seckillActivity/dataBoard', path: '/seckillActivity/dataBoard',
component: resolve => require([`@/views/seckillActivity/dataBoard.vue`], resolve), component: resolve => require([`@/views/seckillActivity/dataBoard.vue`], resolve),
meta: {} meta: {}
},
// 支付商户管理
{
name: '支付商户管理',
path: '/payMerchantsManage/index',
component: resolve => require([`@/views/payMerchantsManage/index.vue`], resolve),
meta: {}
},
{
name: '新增支付商户',
path: '/payMerchantsManage/addPayMerchant',
component: resolve => require([`@/views/payMerchantsManage/addPayMerchant.vue`], resolve),
meta: {}
} }
]) ])
export default staticRoutes export default staticRoutes
...@@ -17,6 +17,7 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -17,6 +17,7 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$merchantId = merchantId Vue.prototype.$merchantId = merchantId
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$request = request
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$message = message Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
......
...@@ -406,6 +406,15 @@ export default { ...@@ -406,6 +406,15 @@ export default {
optionsName: 'testSheetTypeList' optionsName: 'testSheetTypeList'
}, },
{ {
label: '线下订单',
name: 'isOffline',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'isOffSheetTypeList'
},
{
label: '业务场景', label: '业务场景',
name: 'businessType', name: 'businessType',
type: 'select', type: 'select',
...@@ -523,7 +532,7 @@ export default { ...@@ -523,7 +532,7 @@ export default {
fn: '退款' fn: '退款'
}, },
condition: row => { condition: row => {
return row.orderSource == 4 && [2, 6, 21].includes(+row.orderStatus) return row.orderSource == 4 && [2, 6, 21].includes(+row.orderStatus)&&row.isOffline!=0
}, },
listeners: { listeners: {
click: row => { click: row => {
...@@ -706,6 +715,14 @@ export default { ...@@ -706,6 +715,14 @@ export default {
} }
}, },
{ {
label: '线下订单',
prop: 'isOffline',
width: 120,
formatter: cellValue => {
return cellValue.isOffline == 1 ? '否' : cellValue.isOffline == 0 ? '是' : '-'
}
},
{
label: '商品名称', label: '商品名称',
prop: '', prop: '',
width: '120', width: '120',
...@@ -806,6 +823,10 @@ export default { ...@@ -806,6 +823,10 @@ export default {
{ confId: '0', confName: '否' }, { confId: '0', confName: '否' },
{ confId: '1', confName: '是' } { confId: '1', confName: '是' }
], ],
isOffSheetTypeList: [
{ confId: '0', confName: '是' },
{ confId: '1', confName: '否' }
],
businessTypeList: utils.deepClone(businessType) businessTypeList: utils.deepClone(businessType)
} }
} }
......
<!-- 新增支付商户 -->
<template>
<div class="payMerchants marketing edit-box">
<!-- 基本信息 -->
<div class="container edit-container">
<p class="edit-title" id="basic">基本信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="affiliationMerchant" slot-scope="scope">
<el-select style="width: 432px" remote reserve-keyword :remote-method="remoteMethod" v-model="editForm[scope.scope.name]" @visible-change="visibleChange" placeholder="请选择所属商户" @change="changeSelect" filterable>
<el-option v-for="(subItem, subIndex) in merchantsList" :key="subIndex" :label="subItem['merchantName']" :value="subItem['merchantNo']"></el-option>
</el-select>
</template>
<template slot="applyIds" slot-scope="scope">
<el-checkbox-group v-model="editForm.applyIds">
<el-checkbox v-for="value in scope.scope.applyIdsList" :key="value.appType" :label="value.appType">{{ value.appName }}</el-checkbox>
</el-checkbox-group>
</template>
</glsx-combi-form>
</div>
<!-- 配置信息 -->
<div class="container edit-container crowd-config">
<p class="edit-title" id="config">配置信息</p>
<glsx-combi-form class="edit-form-container" ref="configEditFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="configEditFormData" :formRules="editRule">
<template slot="certificateFile" slot-scope="scope">
<div class="upload-box">
<p class="tips-text m-t-10">
请上传从微信支付平台获取的两个PEM格式的证书文件,如何获取证书串、密钥和证书文件,点击
<el-button style="padding: 0" @click="goLinkPage" type="text">查看操作指引</el-button>
</p>
<div class="upload-file-content">
<div>
<el-upload action="" drag class="upload-file" accept=".PEM, .pem" :show-file-list="false" :http-request="handleCertificateUpload" :before-upload="e => handleCertificateBeforeUpload(e, scope.scope, 1)" :file-list="fileKeyList">
<i class="el-icon-upload"></i>
<div class="el-upload__text">
<div>
将文件拖到此处,或
<el-button type="text" style="padding: 0">点击上传</el-button>
</div>
<div class="tips-upload">请上传后缀为_key.pem的证书</div>
</div>
</el-upload>
<div class="file-list-box" v-for="(item, index) in fileKeyList" :key="index">
<div class="file-name-box">{{ item.name }}</div>
<i class="el-icon-delete" @click="delFile(1)"></i>
</div>
</div>
<div>
<el-upload action="" drag class="upload-file" accept=".PEM, .pem" :show-file-list="false" :http-request="handleCertificateUpload" :before-upload="e => handleCertificateBeforeUpload(e, scope.scope, 2)" :file-list="fileCertList">
<i class="el-icon-upload"></i>
<div class="el-upload__text">
<div>
将文件拖到此处,或
<el-button type="text" style="padding: 0">点击上传</el-button>
</div>
<div class="tips-upload">请上传后缀为_cert.pem的证书</div>
</div>
</el-upload>
<div class="file-list-box" v-for="(item, index) in fileCertList" :key="index">
<div class="file-name-box">{{ item.name }}</div>
<i class="el-icon-delete" @click="delFile(2)"></i>
</div>
</div>
</div>
</div>
</template>
</glsx-combi-form>
</div>
<GLFooter>
<el-button @click="handleCancel" size="medium">取消</el-button>
<el-button type="primary" @click="handleConfirm" size="medium" :loading="loading">保存</el-button>
</GLFooter>
<!-- 支付测试弹窗 -->
<collectionTest :isShowTestDialog="isShowTestDialog" :dialogData="dialogData" @handleDialogClose="handleDialogClose"></collectionTest>
</div>
</template>
<script>
import collectionTest from './components/collectionTestDialog'
export default {
components: {
collectionTest
},
name: 'addPayMerchant',
data() {
var validatorFileList = (rule, value, cb) => {
if (!this.fileCertList.length || !this.fileKeyList.length) {
cb(new Error('请上传证书文件'))
} else {
cb()
}
}
return {
editForm: {
payMerchantAccount: '',
payMerchantName: '',
merchantType: '0',
affiliationMerchant: '',
applyIds: [],
certificateString: '',
secretKey: ''
},
editRule: {
payMerchantAccount: [{ required: true, message: '请输入微信支付商户号', trigger: 'change' }],
merchantType: [{ required: true, message: '请选择所属商户类型', trigger: 'change' }],
affiliationMerchant: [{ required: true, message: '请输入所属商户', trigger: 'change' }],
applyIds: [{ required: true, message: '请选择应用ID', trigger: 'change' }],
certificateString: [{ required: true, message: '请输入证书串', trigger: 'change' }],
secretKey: [{ required: true, message: '请输入密钥', trigger: 'change' }],
certificateFile: [{ required: true, validator: validatorFileList, trigger: 'change' }]
},
editFormData: [
{
label: '微信支付商户号',
name: 'payMerchantAccount',
type: 'input',
isDisabled: false
},
{
label: '微信支付商户名',
name: 'payMerchantName',
type: 'input',
isDisabled: false
},
{
label: '所属商户类型',
name: 'merchantType',
type: 'radio',
width: '320px',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
{
confId: '0',
confName: '广联'
},
{
confId: '1',
confName: '服务商'
},
{
confId: '2',
confName: '流量方'
}
],
isDisabled: false,
handleRadioChange: (value, targetItem) => {
this.changeRadio(value)
}
},
{
label: '所属商户',
name: 'affiliationMerchant',
addHtml: 'affiliationMerchant',
isHide: true
},
{
label: '应用ID',
name: 'applyIds',
addHtml: 'applyIds',
optionId: 'appType',
optionLabel: 'appName',
isDisabled: false,
applyIdsList: []
}
],
editStatus: false,
configEditFormData: [
{
label: '证书串',
name: 'certificateString',
type: 'input',
isDisabled: false
},
{
label: '密钥',
name: 'secretKey',
type: 'input',
isDisabled: false
},
{
label: '证书文件',
name: 'certificateFile',
addHtml: 'certificateFile'
}
],
fileCertList: [],
fileKeyList: [],
editChildRef: 'editChildRef',
isShowTestDialog: false,
dialogData: [],
jumpH5Path: '',
merchantsList: [],
queryMerchantName: ''
}
},
mounted() {
// 获取应用id
this.$apis.payMerchantManage.getlistAppInfoApi({}).then(res => {
this.editFormData.find(v => v.name == 'applyIds').applyIdsList = res
})
if (process.env.NODE_ENV == 'development') {
// 本地打开修改dj-scrm-wx-work-main-xxx
this.jumpH5Path = `${this.$request.baseURL}/dj-scrm-wx-work-main-zxw/#/testPayMerchant/index`
} else {
this.jumpH5Path = `${window.location.origin}/scrm-wx-merchant-activity/#/testPayMerchant/index`
}
},
watch: {
editForm: {
handler(val) {
this.editStatus = true
},
deep: true
}
},
methods: {
remoteMethod(query) {
this.queryMerchantName = query
this.getMerchantsList(this.editForm['merchantType']) // 请求接口
},
changeRadio(value) {
this.merchantsList = []
this.queryMerchantName = ''
this.editForm.affiliationMerchant = ''
this.editFormData[3].isHide = !(value == '1' || value == '2')
if (value == '0') return
this.getMerchantsList(value)
},
getMerchantsList(value) {
this.$apis.payMerchantManage
.getBusinessListApi({
// 商户类型,2-流量方,7-服务商
merchantType: value == '1' ? 7 : value == '2' ? 2 : '',
currentPage: 1,
pageSize: 200,
merchantName: this.queryMerchantName
})
.then(res => {
this.merchantsList = res
})
},
changeSelect(val) {
this.editForm.merchantName = this.merchantsList.find(v => v.merchantNo == val).merchantName
},
visibleChange(data) {
// 获取焦点重新渲染下拉框数据
if (data) this.queryMerchantName = ''
},
handleConfirm() {
let validList = []
var validFlag = true
var flag = true
this.$nextTick(() => {
this.$refs.editFormRef.$refs[this.editChildRef].validate((valid, errorObj) => {
validList = [
{ valid: !valid, errorObj: errorObj },
{ valid: !flag, errorObj: { goodsId: '' } }
]
this.$refs.configEditFormRef.$refs[this.editChildRef].validate((configValid, configErrorObj) => {
validList.push({ valid: !configValid, errorObj: configErrorObj })
if (this.checkValid(validList)) {
if (!this.fileCertList.length || !this.fileKeyList.length) {
validFlag = true
}
} else {
validFlag = false
}
validFlag && this.confirmEvent()
})
})
})
},
confirmEvent() {
let params = {
merchantNo: this.editForm.affiliationMerchant,
merchantName: this.editForm.merchantName,
mchId: this.editForm.payMerchantAccount,
mchName: this.editForm.payMerchantName,
mchBelong: this.editForm.merchantType,
appTypes: this.editForm.applyIds.join(','),
merchantSerialNo: this.editForm.certificateString,
apiKey: this.editForm.secretKey,
apiclientKeyPemPath: this.fileKeyList[0]?.url,
apiclientCertPemPath: this.fileCertList[0]?.url
}
this.$apis.payMerchantManage.creatPayMerchantApi(params).then(res => {
if (res.code == '0') {
this.secondConfirm('提示', '<p style="text-align: center;font-size:16px;font-weight: blod;">保存成功</p><p style="font-size:14px; color: #666;">为确保完成正常收款,请继续进行收款测试</p>', res.data)
} else {
this.$message({
message: res.message,
type: 'error'
})
}
})
},
secondConfirm(title, txt, data) {
this.$confirm(txt, title, {
confirmButtonText: '收款测试',
dangerouslyUseHTMLString: true,
iconClass: 'el-icon-warning',
showCancelButton: false,
distinguishCancelAndClose: true,
closeOnClickModal: false,
customClass: 'confirmDialog',
callback: action => {
if (action == 'confirm') {
this.dialogData = []
// 获取收款测试码
let fetchArr = []
let tilteList = this.editFormData.find(v => v.name == 'applyIds').applyIdsList
this.editForm.applyIds.forEach(val => {
if (val == 'MINIAPP') {
let itemTitle = tilteList.find(v => val == v.appType).appName
fetchArr.push(this.getWeappQrcode(data['MINIAPP'].payMannerId, itemTitle))
}
if (val == 'BIZ') {
let itemTitle = tilteList.find(v => val == v.appType).appName
fetchArr.push(this.getBizQrcode(data['BIZ'].payMannerId, itemTitle))
}
})
return new Promise(resolve => {
Promise.all(fetchArr).then(() => {
this.isShowTestDialog = !this.isShowTestDialog
resolve()
})
})
}
if (action == 'close') {
this.goback()
}
}
})
},
cancelJump() {
this.$router.push({
path: '/seckillActivity/index'
})
},
handleCancel() {
if (this.editStatus) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.goback()
})
.catch(() => {})
} else {
this.goback()
}
},
handleTestConfirm() {
this.isShowTestDialog = !this.isShowTestDialog
},
handleConfirmDialogClose() {
this.goback()
},
goback() {
this.$router.go(-1)
},
handleDialogClose() {
this.dialogData = []
this.isShowTestDialog = !this.isShowTestDialog
this.goback()
},
checkValid(validList) {
for (let i = 0; i < validList.length; i++) {
let item = validList[i]
if (item.valid) {
this.whereToGo(Object.keys(item.errorObj)[0])
return false
}
}
return true
},
whereToGo(id) {
document.getElementById(id).scrollIntoView()
},
// 获取微信小程序收款测试码
getWeappQrcode(payMannerId, itemTitle) {
return new Promise((resolve, reject) => {
this.$apis.payMerchantManage
.createWeappQrcodeApi({
appId: 'wxe10067a63c1856ac',
qrcodeType: 'QR_WXA_UNLIMIT',
path: 'pages/crowdfunding/testPayMerchant/testPayMerchant',
scene: `${payMannerId},1`,
channelName: 'DJ'
})
.then(res => {
if (res.code == '0') {
this.dialogData.push({
title: itemTitle,
url: res.data
})
resolve()
} else {
this.$message.error(res.message)
resolve()
}
})
})
},
// 获取公众号收款测试码
getBizQrcode(payMannerId, itemTitle) {
return new Promise((resolve, reject) => {
this.$apis.payMerchantManage
.creatBizQrcodeApi({
payMannerId: payMannerId,
path: this.jumpH5Path
})
.then(res => {
if (res.code == '0') {
this.dialogData.push({
title: itemTitle,
url: res.data
})
resolve()
} else {
this.$message.error(res.message)
resolve()
}
})
})
},
handleCertificateUpload() {},
handleCertificateBeforeUpload(file, targetItem, num) {
this.certificateUpload(file, targetItem, num)
},
// 上传文件
certificateUpload(e, targetItem, num) {
var reader = new FileReader()
var file = e
if (file.name.indexOf('.pem') == -1) {
return this.$message.error('上传的文件格式不对!')
}
// 默认1MB
const limitSize = 1
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
this.$message.error('上传的文件大小不能超过' + limitSize + 'MB!')
this.fileList = []
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.loading = true
this.$apis.payMerchantManage.uploadCertApi({ file: base64 }).then(res => {
if (res.code == '0') {
if (num == 1) {
if (this.fileKeyList.length > 1) this.fileKeyList = []
this.fileKeyList.push({
name: file.name,
url: res.data
})
this.$refs.configEditFormRef.$refs[this.editChildRef].validateField("certificateFile")
}
if (num == 2) {
if (this.fileCertList.length > 1) this.fileCertList = []
this.fileCertList.push({
name: file.name,
url: res.data
})
this.$refs.configEditFormRef.$refs[this.editChildRef].validateField("certificateFile")
}
} else {
this.$message.error(res.message)
}
this.loading = false
})
}
},
// 删除证书文件
delFile(num) {
if (num == 1) {
this.fileKeyList.splice(0, 1)
} else {
this.fileCertList.splice(0, 1)
}
},
// 跳转操作指引
goLinkPage() {
window.open('https://img02.glsx.com.cn/weapp/resource/saas/scrm/pdf/获取证书、密钥操作指引.pdf')
}
}
}
</script>
<style lang="scss" scoped>
.upload-file {
margin: 12px 68px 0 0;
width: 300px;
height: 160px;
border: 1px;
}
.upload-file-content {
display: flex;
justify-content: space-between;
}
.upload-box {
width: 800px;
margin-top: -5px;
}
.tips-text {
font-size: 14px;
color: #999999;
height: 22px;
line-height: 22px;
}
.file-name-box {
display: inline-block;
width: 320px;
height: 24px;
margin-top: 8px;
line-height: 24px;
background: #f5f7fa;
border-radius: 4px;
padding: 0 12px;
margin-right: 10px;
}
</style>
<style lang="scss">
.confirmDialog {
.el-message-box__content {
.el-message-box__container {
.el-message-box__status.el-icon-warning {
color: var(--primaryColor, #5850ff);
}
.el-message-box__message {
padding: 95px 0 0 0;
}
}
}
.el-message-box__btns button:first-child {
color: #fff;
background-color: var(--primaryColor, #5850ff);
border-color: var(--primaryColor, #5850ff);
opacity: 1;
}
.el-message-box__btns button:first-child:hover {
opacity: 0.7;
}
// .el-message-box__btns {
// .el-button--primary {
// color: #fff;
// background-color: var(--primaryColor, #5850ff);
// border-color: var(--primaryColor, #5850ff);
// }
// }
}
.el-upload {
width: 100%;
height: 100%;
background: #f7f7f7;
border: 1px dashed #e5e5e5;
border-radius: 4px;
}
.el-upload-dragger {
border: none;
background: transparent;
height: 100%;
width: 100%;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
.el-icon-upload {
margin: 0;
}
.el-upload__text {
font-weight: bold;
.tips-upload {
font-size: 14px;
color: #999999;
font-weight: 400;
}
}
}
</style>
<template>
<GLDialog title="收款测试" mode="mid" okText="关闭" :visible.sync="isShowTestDialog" :close-on-click-modal="false" :close-on-press-escape="false" :before-close="handleDialogClose" :hasFooter="false">
<div class="dialog-look">
<div class="qrcode-box" v-for="(item, index) in dialogData" :key="index">
<div class="qrcode-tiltle">{{ item.title }}</div>
<div class="qrcode-tips">请扫码完成支付</div>
<img class="qrcode-img" :src="item.url" alt="" />
</div>
</div>
</GLDialog>
</template>
<script>
export default {
name: 'collection-test-dialog',
props: {
dialogData: {
type: Array,
default: () => []
},
isShowTestDialog: {
type: Boolean,
default: false
}
},
data() {
return {}
},
methods: {
handleDialogClose() {
this.$emit('handleDialogClose')
}
}
}
</script>
<style lang="scss" scoped>
.dialog-look {
padding: 24px 40px 48px 40px;
display: flex;
align-items: center;
justify-content: center;
.qrcode-box {
display: flex;
flex-flow: column;
align-items: center;
margin: 0 20px;
.qrcode-tiltle {
font-size: 16px;
color: #333;
}
.qrcode-tips {
font-size: 14px;
color: #666;
margin: 8px;
}
.qrcode-img {
width: 118px;
height: 118px;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<!-- 支付商户管理 -->
<template>
<div class="marketing">
<div class="m-b-20">
<GLButton :size="size" class="default-blue-btn el-icon-plus" type="default" @click="addPayMerchant()" fn="新增支付商户" mode="el-button">新增支付商户</GLButton>
</div>
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="activity" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<span slot="testFlag" slot-scope="scope">
<span :class="{ circleStatusGray: scope.scope.testFlag === 0, circleStatusGreen: scope.scope.testFlag === 1 }"></span>
<span>{{ scope.scope.testFlag == '1' ? '已生效' : '待生效' }}</span>
</span>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<collectionTest :isShowTestDialog="isShowTestDialog" :dialogData="dialogData" @handleDialogClose="handleDialogClose"></collectionTest>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import collectionTest from './components/collectionTestDialog'
export default {
name: 'activity',
components: {
collectionTest
},
data() {
return {
size: 'small',
url: url,
downForm: {
id: '',
offReason: '',
goodsStatus: 0
},
shareForm: {},
searchForm: {
merchantId: '',
merchantName: '',
mchId: '',
mchName: '',
appId: '',
testFlag: ''
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '微信支付商户号',
name: 'mchId',
type: 'input',
width: '215px',
maxlength: 20
},
{
label: '微信支付商户名',
name: 'mchName',
type: 'input',
width: '215px',
maxlength: 20
},
{
label: '应用ID',
name: 'appId',
type: 'select',
width: '215px',
optionList: [],
optionId: 'appId',
optionLabel: 'appName',
optionsName: 'applyTypes'
},
{
label: '所属商户',
name: 'merchantName',
type: 'input',
width: '215px',
maxlength: 20
},
{
label: '商户号',
name: 'merchantId',
type: 'input',
width: '215px'
},
{
label: '状态',
name: 'testFlag',
type: 'select',
width: '215px',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'statusList'
}
],
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '收款测试',
attrs: {
type: 'text',
fn: '收款测试'
},
listeners: {
click: this.collectionTest
},
condition: row => {
return row.testFlag == '0' && row.appType
}
},
{
type: 'GLButton',
name: '删除',
attrs: {
type: 'text',
fn: '删除'
},
condition: row => {
return row.testFlag == '0'
},
listeners: {
click: this.del
}
}
],
// 表格
getListApi: this.$apis.payMerchantManage.getListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '微信支付商户号',
prop: 'mchId',
width: 220
},
{
label: '微信支付商户名',
prop: 'mchName',
width: 140
},
{
label: '应用ID',
prop: 'appPrincipal'
},
{
label: '所属商户',
prop: 'merchantName'
},
{
label: '商户号',
prop: 'merchantId'
},
{
label: '所属商户类型',
prop: 'mchBelong',
formatter: cellValue => {
return this.mchBelongList.find(item => item.confId == cellValue.mchBelong)?.confName
}
},
{
label: '创建人',
prop: 'createdBy'
},
{
label: '创建日期',
name: 'createdDate',
width: 200,
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '状态',
name: 'testFlag',
addHtml: 'testFlag'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
baseData: {
statusList: [
{
confId: '0',
confName: '待生效 '
},
{
confId: '1',
confName: '已生效'
}
],
applyTypes: []
},
isShowTestDialog: false,
dialogData: [],
jumpH5Path: '',
mchBelongList: [
{
confId: '0',
confName: '广联'
},
{
confId: '1',
confName: '服务商'
},
{
confId: '2',
confName: '流量方'
}
]
}
},
mounted() {
// 获取应用ID列表
this.$apis.payMerchantManage.getlistAppInfoApi({}).then(res => {
this.baseData.applyTypes = res
this.getOptionsList('searchFormData', true)
})
if (process.env.NODE_ENV == 'development') {
// 本地打开修改dj-scrm-wx-work-main-xxx
this.jumpH5Path = `${this.$request.baseURL}/dj-scrm-wx-work-main-zxw/#/testPayMerchant/index`
} else {
this.jumpH5Path = `${window.location.origin}/scrm-wx-merchant-activity/#/testPayMerchant/index`
}
},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.$apis[apiModule][apiName](apiParams).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
fn && fn()
this.handleSearch()
}
})
}
}
})
},
// 收款测试
collectionTest(row) {
let fetchArr = []
row.appType?.split(',').forEach(val => {
if (val == 'MINIAPP') {
fetchArr.push(this.getWeappQrcode(row))
}
if (val == 'BIZ') {
fetchArr.push(this.getBizQrcode(row))
}
})
return new Promise(resolve => {
Promise.all(fetchArr).then(() => {
this.isShowTestDialog = !this.isShowTestDialog
resolve()
})
})
},
// 获取微信小程序收款测试码
getWeappQrcode(row) {
return new Promise((resolve, reject) => {
this.$apis.payMerchantManage
.createWeappQrcodeApi({
appId: 'wxe10067a63c1856ac',
qrcodeType: 'QR_WXA_UNLIMIT',
path: 'pages/crowdfunding/testPayMerchant/testPayMerchant',
scene: `${row.payMannerId},1`,
channelName: 'DJ'
})
.then(res => {
if (res.code == '0') {
this.dialogData.push({
title: row.appPrincipal,
url: res.data
})
resolve()
} else {
this.$message.error(res.message)
reject()
}
})
})
},
// 获取公众号收款测试码
getBizQrcode(row) {
return new Promise(resolve => {
this.$apis.payMerchantManage
.creatBizQrcodeApi({
payMannerId: row.payMannerId,
path: this.jumpH5Path
})
.then(res => {
if (res.code == '0') {
this.dialogData.push({
title: row.appPrincipal,
url: res.data
})
resolve()
} else {
this.$message.error(res.message)
}
})
})
},
handleDialogClose() {
this.dialogData = []
this.isShowTestDialog = !this.isShowTestDialog
},
//删除
del(row) {
var params = {}
params.payMannerId = row.payMannerId
this.secondConfirm('删除', '确定删除此支付商户?', 'payMerchantManage', 'delPayMerchantApi', params)
},
//新增支付商户
addPayMerchant() {
this.$router.push('/payMerchantsManage/addPayMerchant')
},
getOptionsList(formName, hasAll = false) {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
},
handleSearch() {
this.$refs.activity.refreshTable()
},
handleReset() {
this.searchForm = {
merchantId: '',
merchantName: '',
mchId: '',
mchName: '',
appId: '',
testFlag: ''
}
this.handleSearch()
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun()
}
}
}
</script>
<style scoped></style>
...@@ -3,34 +3,21 @@ ...@@ -3,34 +3,21 @@
<div class="data-board-box"> <div class="data-board-box">
<p class="edit-title">数据看板</p> <p class="edit-title">数据看板</p>
<div class="p-20"> <div class="p-20">
<GLCombiForm ref="dataRef" <GLCombiForm ref="dataRef" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch"></GLCombiForm>
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"></GLCombiForm>
<div class="data-view"> <div class="data-view">
<template v-for="(item, index) in dataList"> <template v-for="(item, index) in dataList">
<div :key="index" <div :key="index" class="item">
class="item">
<div class="name"> <div class="name">
{{ item.name }} {{ item.name }}
<el-popover class="tips" <el-popover class="tips" placement="top" width="260" trigger="hover" :content="item.tips">
placement="top" <img slot="reference" class="tips-icon" src="@/components/glsx-combi-form/images/icon-tip.png" />
width="260"
trigger="hover"
:content="item.tips">
<img slot="reference"
class="tips-icon"
src="@/components/glsx-combi-form/images/icon-tip.png" />
</el-popover> </el-popover>
</div> </div>
<div class="value">{{ dataBoard[item.key] || 0 }}</div> <div class="value">{{ dataBoard[item.key] || 0 }}</div>
<template v-if="item.half"> <template v-if="item.half">
<div class="half"> <div class="half">
日环比: 日环比:
<div <div :class="['icon', { up: dataBoard[item.half] > 0 }, { down: dataBoard[item.half] < 0 }]"></div>
:class="['icon', { up: dataBoard[item.half] > 0 }, { down: dataBoard[item.half] < 0 }]">
</div>
<span class="num">{{ Math.abs(dataBoard[item.half]).toFixed(2) || 0 }}%</span> <span class="num">{{ Math.abs(dataBoard[item.half]).toFixed(2) || 0 }}%</span>
</div> </div>
</template> </template>
...@@ -42,40 +29,17 @@ ...@@ -42,40 +29,17 @@
<div class="data-board-box"> <div class="data-board-box">
<p class="edit-title">员工排行榜</p> <p class="edit-title">员工排行榜</p>
<div class="p-20"> <div class="p-20">
<GLCombiForm ref="rankRef" <GLCombiForm ref="rankRef" :rowNumber="1" :formObj="searchRankForm" :formData="searchFormRankData" @handleOk="handleSearchRank"></GLCombiForm>
:rowNumber="1"
:formObj="searchRankForm"
:formData="searchFormRankData"
@handleOk="handleSearchRank"></GLCombiForm>
<div class="flex m-b-10 w-100-percent"> <div class="flex m-b-10 w-100-percent">
<span class="table-title"></span> <span class="table-title"></span>
<el-button :size="size" <el-button :size="size" class="default-blue-btn" type="default" @click="handleExport('rank')">导出</el-button>
class="default-blue-btn"
type="default"
@click="handleExport('rank')">导出</el-button>
</div> </div>
<GLTable ref="dataTableRef" <GLTable ref="dataTableRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" :hasNum="false">
:getListApi="getListApi" <div slot="shareName" class="flex-align" slot-scope="scope">
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
:hasNum="false">
<div slot="shareName"
class="flex-align"
slot-scope="scope">
<template v-if="scope.scope.shareAvatar"> <template v-if="scope.scope.shareAvatar">
<el-popover placement="top" <el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
width="160" <img class="table-popover-img" :src="scope.scope.shareAvatar" />
trigger="hover" <img class="img-36 pointer" slot="reference" :src="scope.scope.shareAvatar" />
popper-class="table-popover-block">
<img class="table-popover-img"
:src="scope.scope.shareAvatar" />
<img class="img-36 pointer"
slot="reference"
:src="scope.scope.shareAvatar" />
</el-popover> </el-popover>
</template> </template>
<span class="m-l-10">{{ scope.scope.shareName }}</span> <span class="m-l-10">{{ scope.scope.shareName }}</span>
...@@ -89,32 +53,20 @@ ...@@ -89,32 +53,20 @@
<div class="p-20"> <div class="p-20">
<div class="flex m-b-10 w-100-percent"> <div class="flex m-b-10 w-100-percent">
<span class="table-title">数据列表</span> <span class="table-title">数据列表</span>
<el-button :size="size" <el-button :size="size" class="default-blue-btn" type="default" @click="handleExport('dailyOrders')">导出</el-button>
class="default-blue-btn"
type="default"
@click="handleExport('dailyOrders')">导出</el-button>
</div> </div>
<el-table v-if="DailyOrderQuantityList.length" <el-table v-if="DailyOrderQuantityList.length" :data="DailyOrderQuantityListFormat" style="width: 100%">
:data="DailyOrderQuantityListFormat" <el-table-column :formatter="formatterHeader" label=""></el-table-column>
style="width: 100%">
<el-table-column :formatter="formatterHeader"
label=""></el-table-column>
<!-- width="140px" --> <!-- width="140px" -->
<el-table-column v-for="(item, index) in DailyOrderQuantityList" <el-table-column v-for="(item, index) in DailyOrderQuantityList" :key="index" :prop="item" :label="item.day">
:key="index"
:prop="item"
:label="item.day">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.$index ? item.currentOrderQuantity : item.specificDate }}</span> <span>{{ scope.$index ? item.currentOrderQuantity : item.specificDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :formatter="formatterEnd" <el-table-column :formatter="formatterEnd" fixed="right" label="总计"></el-table-column>
fixed="right"
label="总计"></el-table-column>
</el-table> </el-table>
<div v-else> <div v-else>
<img src="url" <img src="url" alt="" />
alt="" />
</div> </div>
</div> </div>
</div> </div>
...@@ -140,34 +92,19 @@ ...@@ -140,34 +92,19 @@
单 单
</span> </span>
</span> </span>
<el-button :size="size" <el-button :size="size" class="default-blue-btn" type="default" @click="handleExport('liveData')">导出</el-button>
class="default-blue-btn"
type="default"
@click="handleExport('liveData')">导出</el-button>
</div> </div>
<!-- :searchForm="tableSearchForm" --> <!-- :searchForm="tableSearchForm" -->
<GLTable ref="dataTableRefDetailPage" <GLTable ref="dataTableRefDetailPage" :getListApi="getLiveDetailPage" :noDataImg="url" :tableParams="liveTableParams" :searchForm="LiveTableSearchForm" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
:getListApi="getLiveDetailPage" <div slot="weChatName" class="flex-align" slot-scope="scope">
:noDataImg="url" <img v-if="scope.scope.avatar" class="img-36 pointer img-circle" :src="scope.scope.avatar" />
:tableParams="liveTableParams"
:searchForm="LiveTableSearchForm"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn">
<div slot="weChatName"
class="flex-align"
slot-scope="scope">
<img v-if="scope.scope.avatar"
class="img-36 pointer img-circle"
:src="scope.scope.avatar" />
<span class="m-l-10">{{ scope.scope.nickname }}</span> <span class="m-l-10">{{ scope.scope.nickname }}</span>
<span v-if="!scope.scope.avatar && !scope.scope.nickname">-</span> <span v-if="!scope.scope.avatar && !scope.scope.nickname">-</span>
</div> </div>
<!-- <div slot="orderStatus" <div slot="orderStatus" slot-scope="scope">
slot-scope="scope"> <span :class="['table-circle', 'm-r-8', scope.scope.orderStatus == '已下单' ? 'back-green' : 'back-grey']"></span>
<span <span>{{ scope.scope.orderStatus ? scope.scope.orderStatus : '-' }}</span>
:class="['table-circle', 'm-r-8', [2, 10, 22].includes(scope.scope.orderStatus) ? 'back-green' : [9].includes(scope.scope.orderStatus) ? 'back-blue' : [1, 21, 6].includes(scope.scope.orderStatus) ? 'back-orange' : 'back-grey']"></span> </div>
<span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span>
</div> -->
</GLTable> </GLTable>
</div> </div>
</div> </div>
...@@ -180,13 +117,13 @@ import { downLoadFile, orderManageStatusList } from '@/common/constant' ...@@ -180,13 +117,13 @@ import { downLoadFile, orderManageStatusList } from '@/common/constant'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
const dataList = [ const dataList = [
{ name: '新增浏览量', key: 'browseCount', tips: '统计时间内,新增页面被浏览的次数(一人多次访问计为多次)', half: 'browseRingRatio' }, { name: '新增浏览量', key: 'browseCount', tips: '统计时间内,新增页面被浏览的次数(一人多次访问计为多次)', half: 'browseRingRatio' },
{ name: '新增访客数', key: 'fansCount', tips: '统计时间内访问页面的人数(一人多次访问计为一次)', half: 'fansRingRatio' }, { name: '新增访客数', key: 'fansCount', tips: '统计时间内访问页面的人数(一人多次访问计为一次)', half: 'fansRingRatio' },
{ name: '新增订单数', key: 'orderCount', tips: '统计时间内,新增订单数(只记录已付款的订单)', half: 'orderRingRatio' }, { name: '新增订单数', key: 'orderCount', tips: '统计时间内,新增订单数(只记录已付款的订单)', half: 'orderRingRatio' },
{ name: '累计浏览量', key: 'totalBrowseCount', tips: '页面被浏览的总次数(一人多次访问计为多次)' }, { name: '累计浏览量', key: 'totalBrowseCount', tips: '页面被浏览的总次数(一人多次访问计为多次)' },
{ name: '累计访客数', key: 'totalFansCount', tips: '访问页面的总人数(一人多次访问计为一次)' }, { name: '累计访客数', key: 'totalFansCount', tips: '访问页面的总人数(一人多次访问计为一次)' },
{ name: '累计订单数', key: 'totalOrderCount', tips: '累计订单总数(只记录已付款的订单)' } { name: '累计订单数', key: 'totalOrderCount', tips: '累计订单总数(只记录已付款的订单)' }
], ],
optionList = [ optionList = [
{ confId: '1', confName: '转发次数' }, { confId: '1', confName: '转发次数' },
{ confId: '2', confName: '访客总数' }, { confId: '2', confName: '访客总数' },
...@@ -332,7 +269,7 @@ export default { ...@@ -332,7 +269,7 @@ export default {
{ {
label: '订单状态', label: '订单状态',
prop: 'orderStatus', prop: 'orderStatus',
// addHtml: 'orderStatus', addHtml: 'orderStatus',
width: 160 width: 160
} }
] ]
...@@ -374,7 +311,7 @@ export default { ...@@ -374,7 +311,7 @@ export default {
...result ...result
} }
}) })
.catch(err => { }) .catch(err => {})
}, },
getDataBoardApi() { getDataBoardApi() {
// { activityId } = this.$route.query, // { activityId } = this.$route.query,
...@@ -436,7 +373,7 @@ export default { ...@@ -436,7 +373,7 @@ export default {
if (name == 'liveData') { if (name == 'liveData') {
this.$apis.seckillActivity.liveroomDetailexport({ activityId: this.activityId, currentPage: 1, pageSize: 100000 }).then(result => { this.$apis.seckillActivity.liveroomDetailexport({ activityId: this.activityId, currentPage: 1, pageSize: 100000 }).then(result => {
console.log(result) console.log(result)
// downLoadFile(result) downLoadFile(result)
}) })
} }
}, },
......
...@@ -944,7 +944,7 @@ export default { ...@@ -944,7 +944,7 @@ export default {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (!this.editForm.crowdFundingPrice) return callback(new Error('请先填写众筹价')) if (!this.editForm.crowdFundingPrice) return callback(new Error('请先填写众筹价'))
if (value > Number(this.editForm.crowdFundingPrice)) return callback(new Error('定金不能大于众筹价格')) if (value > Number(this.editForm.crowdFundingPrice)) return callback(new Error('定金不能大于众筹价格'))
return value > +(this.selectedProInfo.retailPrice / 100).toFixed(2) ? callback(new Error('秒杀价必须小于零售价')) : callback() return value > +(this.selectedProInfo.retailPrice / 100).toFixed(2) ? callback(new Error('定金必须小于等于零售价')) : callback()
}, },
trigger: 'change' trigger: 'change'
} }
...@@ -956,7 +956,7 @@ export default { ...@@ -956,7 +956,7 @@ export default {
if (value < +this.editForm.activityPrice) { if (value < +this.editForm.activityPrice) {
return callback(new Error('众筹价需要大于定金')) return callback(new Error('众筹价需要大于定金'))
} }
return value >= +(this.selectedProInfo.retailPrice / 100).toFixed(2) ? callback(new Error('秒杀价必须小于零售价')) : callback() return value > +(this.selectedProInfo.retailPrice / 100).toFixed(2) ? callback(new Error('众筹价必须小于等于零售价')) : callback()
}, },
trigger: 'change' trigger: 'change'
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!