Commit 44e496b1 by 李伟康

Merge branch 'master' into v3.5.0-0227

2 parents 29b20f31 d3f100d2
......@@ -29,18 +29,22 @@
</el-tabs>
</div>
<div class="btn-group">
<el-button
class="default-blue-btn"
:size="size"
type="default"
@click="visibleImportDialog(true)"
>导入</el-button>
<el-button
class="default-blue-btn"
:size="size"
type="default"
@click="handleExport"
>导出</el-button>
<!-- <template v-if="!hideStatus">
<el-button
class="default-blue-btn"
:size="size"
type="default"
@click="visibleImportDialog(true)"
>导入</el-button>
</template> -->
<template v-if="!hideStatus">
<el-button
class="default-blue-btn"
:size="size"
type="default"
@click="handleExport"
>导出</el-button>
</template>
</div>
</div>
</div>
......@@ -895,13 +899,13 @@ export default {
fileName: '',
fileType: ''
},
showTable: false //显示隐藏表格
showTable: false, //显示隐藏表格
hideStatus: false
}
},
mounted () {
this.getCrowdfundingOrderConfig()
this.getCrowdfundingParams()
// this.getCount()
},
......@@ -1335,12 +1339,14 @@ export default {
optionLabel: 'confName',
optionsName: 'marketingStatusList'
}
]
],
hideStatus = false
try {
const res = await this.$apis.common.getCrowdfundingOrderConfig(),
filterTableList = ['customerPhone', 'otherInformation', 'shareStaffName', 'assignName', 'shareStaffPhone', 'verificationDate', 'vinNo', 'afterSaleStatus'],
filterFormList = ['afterSaleStatuses', 'vin', 'shareStaffName', 'shareStaffSource', 'customerPhone', 'shareStaffPhone']
if (res == 1) {
hideStatus = res == 1
if (hideStatus) {
for (let i = 0; i < tableColumns.length; i++) {
if (filterTableList.includes(tableColumns[i].prop)) {
tableColumns.splice(i, 1)
......@@ -1360,7 +1366,9 @@ export default {
this.tableParams.tableColumns = tableColumns
this.searchFormData = searchFormData
this.showTable = true
this.hideStatus = hideStatus
this.getOptionsList('searchFormData')
this.getCrowdfundingParams()
},
getParams () {
var params = JSON.parse(JSON.stringify(this.searchForm))
......@@ -1731,7 +1739,8 @@ export default {
})
})
}
this.$set(this.searchFormData[11], 'optionList', this.$common.utils.deepClone(activityNameList))
const activityNamesIndex = this.searchFormData.findIndex(e => e.name == 'activityNames')
this.$set(this.searchFormData[activityNamesIndex], 'optionList', this.$common.utils.deepClone(activityNameList))
const merchant = await this.$apis.seckillActivity.getCrowdfundingParams({
parameterType: 2
})
......@@ -1744,7 +1753,8 @@ export default {
})
})
}
this.$set(this.searchFormData[3], 'optionList', this.$common.utils.deepClone(merchantNameList))
const merchantNamesIndex = this.searchFormData.findIndex(e => e.name == 'merchantNames')
this.$set(this.searchFormData[merchantNamesIndex], 'optionList', this.$common.utils.deepClone(merchantNameList))
},
async batchRefundOrder () {
......
<!-- 众筹分享弹窗 -->
<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" />
<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>
<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="activity-code"
style="margin-top: 14px;"
v-if="!hideStatus"
>
<div class="code-img">
<img style="width: 146px; height: 146px;" :src="shareForm.staffLoginQrCodeUrl" />
<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>
<el-button
style="margin-top: 17px;"
:size="size"
type="primary"
@click="handleSaveImg(shareForm.staffLoginQrCodeUrl, '员工注册码')"
>下载注册码</el-button>
</div>
</div>
</div>
......@@ -32,18 +67,39 @@
<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 {}
},
......@@ -64,14 +120,15 @@ export default {
},
shareForm: {
type: Object,
default: () => {}
}
default: () => { }
},
hideStatus: Boolean
},
mounted() {},
mounted () { },
methods: {
handleSaveImg(url, downloadTxt = '海报') {
handleSaveImg (url, downloadTxt = '海报') {
var alink = document.createElement('a')
alink.href = url
alink.setAttribute('target', '_blank')
......@@ -79,7 +136,7 @@ export default {
alink.click()
alink.remove()
},
handleSaveTxt(txt) {
handleSaveTxt (txt) {
this.$message({
message: '复制成功',
type: 'success',
......@@ -92,7 +149,7 @@ export default {
document.execCommand('Copy')
document.body.removeChild(input)
},
handleShareClose() {
handleShareClose () {
this.$emit('handleShareClose')
}
}
......
......@@ -10,12 +10,14 @@
fn="新增众筹"
mode="el-button"
>新建众筹</GLButton>
<el-button
:size="size"
type="default"
class="default-blue-btn"
@click="handleJump"
>订单管理</el-button>
<template v-if="!hideStatus">
<el-button
:size="size"
type="default"
class="default-blue-btn"
@click="handleJump"
>订单管理</el-button>
</template>
</div>
<div class="container">
<GLCombiForm
......@@ -115,6 +117,7 @@
:isShareVisible="isShareVisible"
:shareForm="shareForm"
@handleShareClose="handleShareClose"
:hideStatus="hideStatus"
></crowdFundingShare>
</div>
</template>
......@@ -308,131 +311,7 @@ export default {
tableParams: {
listName: 'list',
tableOption: true,
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: '定金/元',
prop: 'activityPrice',
width: 140,
addHtml: 'joinText'
},
{
label: '众筹价/元',
prop: 'crowdFundingPrice',
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: {
......@@ -478,8 +357,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
},
__getRoutes (ctx) {
const {
......
......@@ -2033,7 +2033,8 @@ export default {
{
label: '收款模式',
name: 'paymentModel',
addHtml: 'paymentModel'
addHtml: 'paymentModel',
},
{
label: '常态化模式',
......@@ -2222,6 +2223,7 @@ export default {
}
},
mounted () {
this.getCrowdfundingOrderConfig()
this.getLiveList()
this.getVideoList()
this.setMinHeight('.crowd-config')
......@@ -2308,6 +2310,13 @@ export default {
},
methods: {
async getCrowdfundingOrderConfig () {
const res = await this.$apis.common.getCrowdfundingOrderConfig(),
filterList = ['paymentModel','employeeRegistrationLinkFlag']
this.configEditFormData.map(e =>{
if(filterList.includes(e.name)) e.isHide = res == 1
})
},
changeFormAttr (formName, attrName, labelList, attrValue) {
labelList.forEach(item => {
let idx = this[formName].findIndex(k => k.label == item)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!