Commit a5be9559 by 李伟康

Merge branch 'master' into v3.5.0

2 parents fb046a46 5de550a1
......@@ -1023,8 +1023,8 @@ export default {
]
try {
const res = await this.$apis.common.getCrowdfundingOrderConfig(),
filterTableList = ['customerPhone', 'otherInformation', 'shareStaffName', 'assignName', 'shareStaffPhone', 'verificationDate', 'vinNo', 'afterSaleStatus'],
filterFormList = ['afterSaleStatuses', 'vin', 'shareStaffName', 'shareStaffSource', 'customerPhone', 'shareStaffPhone']
filterTableList = ['customerPhone', 'otherInformation', 'assignName', 'shareStaffPhone', 'verificationDate', 'vinNo', 'afterSaleStatus'],
filterFormList = ['afterSaleStatuses', 'vin', 'shareStaffSource', 'customerPhone', 'shareStaffPhone']
if (res == 1) {
for (let i = 0; i < tableColumns.length; i++) {
if (filterTableList.includes(tableColumns[i].prop)) {
......
......@@ -227,7 +227,7 @@ export default {
const res = await this.$apis.common.getCrowdfundingOrderConfig()
let hideStatus = res == 1
if (hideStatus) {
const filterFormList = ['customerPhone', 'shareStaffName', 'shareStaffTypeName', 'vin', 'shipAddress']
const filterFormList = ['customerPhone', 'shareStaffTypeName', 'vin', 'shipAddress']
for (let i = 0; i < detailFormData.length; i++) {
if (filterFormList.includes(detailFormData[i].name)) {
detailFormData.splice(i, 1)
......
<!-- 众筹分享弹窗 -->
<template>
<GLDialog title="分享" mode="mid" okText="关闭" :visible.sync="isShareVisible" :before-close="handleShareClose" :hasFooter="false">
<GLDialog
title="分享"
mode="mid"
okText="关闭"
:visible.sync="isShareVisible"
:before-close="handleShareClose"
:hasFooter="false"
>
<div class="share-dialog">
<div>
<img style="width: 220px; height: 310px;" :src="shareForm.posterUrl" />
<el-button style="display: block;margin-top: 12px;margin-left: 65px;" :size="size" type="primary" @click="handleSaveImg(shareForm.posterUrl)">下载海报</el-button>
<img
style="width: 220px; height: 310px;"
:src="shareForm.posterUrl"
/>
<el-button
style="display: block;margin-top: 12px;margin-left: 65px;"
:size="size"
type="primary"
@click="handleSaveImg(shareForm.posterUrl)"
>下载海报</el-button>
</div>
<div>
<div class="code">
<div class="activity-code">
<div class="code-img">
<img style="width: 146px; height: 146px;" :src="shareForm.qrCodeUrl" />
<div class="code">
<div class="activity-code">
<div class="code-img">
<img
style="width: 146px; height: 146px;"
:src="shareForm.qrCodeUrl"
/>
</div>
<div>
<p class="code-text">活动二维码</p>
<el-button
style="margin-top: 17px;"
:size="size"
type="primary"
@click="handleSaveImg(shareForm.qrCodeUrl, '活动二维码')"
>下载二维码</el-button>
</div>
</div>
<div>
<p class="code-text">活动二维码</p>
<el-button style="margin-top: 17px;" :size="size" type="primary" @click="handleSaveImg(shareForm.qrCodeUrl, '活动二维码')">下载二维码</el-button>
</div>
</div>
<div class="activity-code" style="margin-top: 14px;">
<div class="code-img">
<img style="width: 146px; height: 146px;" :src="shareForm.staffLoginQrCodeUrl" />
</div>
<div>
<p class="code-text">员工注册码</p>
<el-button style="margin-top: 17px;" :size="size" type="primary" @click="handleSaveImg(shareForm.staffLoginQrCodeUrl, '员工注册码')">下载注册码</el-button>
<div
class="activity-code"
style="margin-top: 14px;"
v-if="!hideStatus"
>
<div class="code-img">
<img
style="width: 146px; height: 146px;"
:src="shareForm.staffLoginQrCodeUrl"
/>
</div>
<div>
<p class="code-text">员工注册码</p>
<el-button
style="margin-top: 17px;"
:size="size"
type="primary"
@click="handleSaveImg(shareForm.staffLoginQrCodeUrl, '员工注册码')"
>下载注册码</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="page-route">
<div>
<span class="share-txt">H5短链接:</span>
<span class="copy" @click="handleSaveTxt(shareForm.linkUrl)">复制</span>
<span class="copy" style="margin-left: 10px;width: 75px;" @click="handleSaveTxt(shareForm.originallinkUrl)">复制群发链接</span>
<span
class="copy"
@click="handleSaveTxt(shareForm.linkUrl)"
>复制</span>
<span
class="copy"
style="margin-left: 10px;width: 75px;"
@click="handleSaveTxt(shareForm.originallinkUrl)"
>复制群发链接</span>
</div>
<p class="link" style="margin-bottom: 16px;">{{ shareForm.linkUrl }}</p>
<div>
<span class="share-txt">员工注册码链接:</span>
<span class="copy" @click="handleSaveTxt(shareForm.staffLoginLinkUrl)">复制</span>
</div>
<p class="link" style="margin-bottom: 16px;">{{ shareForm.staffLoginLinkUrl }}</p>
<p
class="link"
style="margin-bottom: 16px;"
>{{ shareForm.linkUrl }}</p>
<template v-if="!hideStatus">
<div>
<span class="share-txt">员工注册码链接:</span>
<span
class="copy"
@click="handleSaveTxt(shareForm.staffLoginLinkUrl)"
>复制</span>
</div>
<p
class="link"
style="margin-bottom: 16px;"
>{{ shareForm.staffLoginLinkUrl }}</p>
</template>
<div>
<span class="share-txt">活动ID:</span>
<span class="copy" @click="handleSaveTxt(shareForm.id)">复制</span>
<span
class="copy"
@click="handleSaveTxt(shareForm.id)"
>复制</span>
</div>
<p class="link">{{ shareForm.id }}</p>
</div>
......@@ -53,7 +109,7 @@
<script>
export default {
name: 'crowdFundingShare',
data() {
data () {
return {}
},
......@@ -68,10 +124,10 @@ export default {
}
},
mounted() { },
mounted () { },
methods: {
handleSaveImg(url, downloadTxt = '海报') {
handleSaveImg (url, downloadTxt = '海报') {
var alink = document.createElement('a')
alink.href = url
alink.setAttribute('target', '_blank')
......@@ -79,7 +135,7 @@ export default {
alink.click()
alink.remove()
},
handleSaveTxt(txt) {
handleSaveTxt (txt) {
this.$message({
message: '复制成功',
type: 'success',
......@@ -92,7 +148,7 @@ export default {
document.execCommand('Copy')
document.body.removeChild(input)
},
handleShareClose() {
handleShareClose () {
this.$emit('handleShareClose')
}
}
......@@ -104,13 +160,13 @@ export default {
}
.share-dialog .code {
height: 310px;
border-left: 1px dashed #DCDFE6;
border-left: 1px dashed #dcdfe6;
margin-left: 20px;
}
.share-dialog .code .code-img {
width: 146px;
height: 146px;
border: 1px solid #E8E8EA;
border: 1px solid #e8e8ea;
margin-left: 20px;
margin-right: 36px;
}
......@@ -125,14 +181,14 @@ export default {
}
.page-route {
margin-top: 20px;
background: #F4F6FC;
background: #f4f6fc;
padding: 20px;
}
.page-route .link {
width: 492px;
font-family: PingFangSC-Medium;
font-size: 14px;
color: #5850FF;
color: #5850ff;
line-height: 20px;
}
.page-route .share-txt {
......@@ -143,11 +199,11 @@ export default {
.page-route .copy {
width: 40px;
height: 20px;
background: #5850FF;
background: #5850ff;
border-radius: 2px;
font-family: PingFangSC-Regular;
font-size: 12px;
color: #FFFFFF;
color: #ffffff;
display: inline-block;
line-height: 20px;
text-align: center;
......
......@@ -115,6 +115,7 @@
:isShareVisible="isShareVisible"
:shareForm="shareForm"
@handleShareClose="handleShareClose"
:hideStatus="hideStatus"
></crowdFundingShare>
</div>
</template>
......@@ -291,110 +292,7 @@ export default {
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '活动名称',
prop: 'activityName',
width: 220
},
{
label: '浏览量(次)',
prop: 'viewAmount',
addHtml: 'linkText',
width: 140
},
{
label: '访客',
prop: 'fansAmount',
addHtml: 'linkText'
},
{
label: '分享',
prop: 'shareAmount',
addHtml: 'linkText'
},
{
label: '销量',
prop: 'saleAmount'
},
{
label: '门店',
prop: 'merchantName',
width: 220,
fixed: 'left'
},
{
label: '缩略图',
prop: 'activityImg',
addHtml: 'activityImg'
},
{
label: '收款模式',
prop: 'payMentModel',
width: 220,
formatter: cellValue => {
const model = {
1: '广联收定金和尾款',
2: '广联收定金门店收尾款',
3: '广联收定金门店收全款退定金',
4: '门店收定金和尾款',
5: '服务商收定金门店收尾款'
}
return model[cellValue.paymentModel] || '--'
}
},
{
label: '进账',
prop: 'income',
formatter: cellValue => {
return cellValue.income ? (cellValue.income / 100).toFixed(2) : '--'
}
},
{
label: '出账',
prop: 'expenditure',
formatter: cellValue => {
return cellValue.expenditure ? (cellValue.expenditure / 100).toFixed(2) : '--'
}
},
{
label: '盈利',
prop: 'profit',
formatter: cellValue => {
return cellValue.profit ? (cellValue.profit / 100).toFixed(2) : '--'
}
},
{
label: '秒杀价/元',
prop: 'activityPrice',
name: 'activityPrice',
width: 140,
addHtml: 'joinText'
},
{
label: '库存',
prop: 'goodsStock',
width: 110,
addHtml: 'joinText'
},
{
label: '创建日期',
name: 'createdDate',
width: 200,
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '活动状态',
name: 'activityStatus',
width: 110,
formatter: cellValue => {
return this.baseData.statusList.find(item => item.confId == cellValue.activityStatus).confName
}
}
]
tableColumns: []
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
baseData: {
......@@ -429,8 +327,147 @@ export default {
methods: {
async getCrowdfundingOrderConfig () {
const res = await this.$apis.common.getCrowdfundingOrderConfig()
this.hideStatus = res == 1
let tableColumns = [
// {
// label: '序号',
// // prop: 'activityImg',
// addHtml: 'tableNum',
// fixed: 'left',
// width: 70
// },
{
label: '浏览量(次)',
prop: 'viewAmount',
addHtml: 'linkText',
width: 140
},
{
label: '访客',
prop: 'fansAmount',
addHtml: 'linkText'
},
{
label: '分享',
prop: 'shareAmount',
addHtml: 'linkText'
},
{
label: '销量',
prop: 'saleAmount'
},
{
label: '活动名称',
prop: 'activityName',
width: 220,
fixed: 'left'
},
{
label: '门店',
prop: 'merchantName',
width: 220,
fixed: 'left'
},
{
label: '缩略图',
prop: 'activityImg',
addHtml: 'activityImg'
},
{
label: '收款模式',
prop: 'paymentModel',
width: 220,
formatter: cellValue => {
const model = {
1: '广联收定金和尾款',
2: '广联收定金门店收尾款',
3: '广联收定金门店收全款退定金',
4: '门店收定金和尾款',
5: '服务商收定金门店收尾款'
}
return model[cellValue.paymentModel] || '--'
}
},
{
label: '进账',
prop: 'income',
formatter: cellValue => {
return cellValue.income ? (cellValue.income / 100).toFixed(2) : '--'
}
},
{
label: '出账',
prop: 'expenditure',
formatter: cellValue => {
return cellValue.expenditure ? (cellValue.expenditure / 100).toFixed(2) : '--'
}
},
{
label: '盈利',
prop: 'profit',
formatter: cellValue => {
return cellValue.profit ? (cellValue.profit / 100).toFixed(2) : '--'
}
},
{
label: '退单数',
prop: 'chargebackNumber'
},
{
label: '核销数',
prop: 'verificationNumber'
},
{
label: '定金(元)',
name: 'activityPrice',
width: 140,
formatter: cellValue => {
return (cellValue.activityPrice / 100).toFixed(2)
}
},
{
label: '众筹价(元)',
name: 'crowdFundingPrice',
width: 140,
formatter: cellValue => {
return (cellValue.crowdFundingPrice / 100).toFixed(2)
}
},
{
label: '库存',
prop: 'goodsStock',
width: 110
},
{
label: '创建日期',
name: 'createdDate',
width: 200,
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
},
{
label: '活动状态',
name: 'activityStatus',
width: 110,
formatter: cellValue => {
return this.baseData.statusList.find(item => item.confId == cellValue.activityStatus).confName
}
}
]
const res = await this.$apis.common.getCrowdfundingOrderConfig(),
filterTableList = ['paymentModel'],
hideStatus = res == 1
if (hideStatus) {
for (let i = 0; i < tableColumns.length; i++) {
if (filterTableList.includes(tableColumns[i].prop)) {
tableColumns.splice(i, 1)
i--
}
}
}
this.hideStatus = hideStatus
this.tableParams.tableColumns = tableColumns
},
getParams () {
var params = JSON.parse(JSON.stringify(this.searchForm))
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!