Commit 44e496b1 by 李伟康

Merge branch 'master' into v3.5.0-0227

2 parents 29b20f31 d3f100d2
...@@ -29,18 +29,22 @@ ...@@ -29,18 +29,22 @@
</el-tabs> </el-tabs>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<el-button <!-- <template v-if="!hideStatus">
class="default-blue-btn" <el-button
:size="size" class="default-blue-btn"
type="default" :size="size"
@click="visibleImportDialog(true)" type="default"
>导入</el-button> @click="visibleImportDialog(true)"
<el-button >导入</el-button>
class="default-blue-btn" </template> -->
:size="size" <template v-if="!hideStatus">
type="default" <el-button
@click="handleExport" class="default-blue-btn"
>导出</el-button> :size="size"
type="default"
@click="handleExport"
>导出</el-button>
</template>
</div> </div>
</div> </div>
</div> </div>
...@@ -895,13 +899,13 @@ export default { ...@@ -895,13 +899,13 @@ export default {
fileName: '', fileName: '',
fileType: '' fileType: ''
}, },
showTable: false //显示隐藏表格 showTable: false, //显示隐藏表格
hideStatus: false
} }
}, },
mounted () { mounted () {
this.getCrowdfundingOrderConfig() this.getCrowdfundingOrderConfig()
this.getCrowdfundingParams()
// this.getCount() // this.getCount()
}, },
...@@ -1335,12 +1339,14 @@ export default { ...@@ -1335,12 +1339,14 @@ export default {
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'marketingStatusList' optionsName: 'marketingStatusList'
} }
] ],
hideStatus = false
try { try {
const res = await this.$apis.common.getCrowdfundingOrderConfig(), const res = await this.$apis.common.getCrowdfundingOrderConfig(),
filterTableList = ['customerPhone', 'otherInformation', 'shareStaffName', 'assignName', 'shareStaffPhone', 'verificationDate', 'vinNo', 'afterSaleStatus'], filterTableList = ['customerPhone', 'otherInformation', 'shareStaffName', 'assignName', 'shareStaffPhone', 'verificationDate', 'vinNo', 'afterSaleStatus'],
filterFormList = ['afterSaleStatuses', 'vin', 'shareStaffName', 'shareStaffSource', 'customerPhone', 'shareStaffPhone'] filterFormList = ['afterSaleStatuses', 'vin', 'shareStaffName', 'shareStaffSource', 'customerPhone', 'shareStaffPhone']
if (res == 1) { hideStatus = res == 1
if (hideStatus) {
for (let i = 0; i < tableColumns.length; i++) { for (let i = 0; i < tableColumns.length; i++) {
if (filterTableList.includes(tableColumns[i].prop)) { if (filterTableList.includes(tableColumns[i].prop)) {
tableColumns.splice(i, 1) tableColumns.splice(i, 1)
...@@ -1360,7 +1366,9 @@ export default { ...@@ -1360,7 +1366,9 @@ export default {
this.tableParams.tableColumns = tableColumns this.tableParams.tableColumns = tableColumns
this.searchFormData = searchFormData this.searchFormData = searchFormData
this.showTable = true this.showTable = true
this.hideStatus = hideStatus
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
this.getCrowdfundingParams()
}, },
getParams () { getParams () {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
...@@ -1731,7 +1739,8 @@ export default { ...@@ -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({ const merchant = await this.$apis.seckillActivity.getCrowdfundingParams({
parameterType: 2 parameterType: 2
}) })
...@@ -1744,7 +1753,8 @@ export default { ...@@ -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 () { async batchRefundOrder () {
......
<!-- 众筹分享弹窗 --> <!-- 众筹分享弹窗 -->
<template> <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 class="share-dialog">
<div> <div>
<img style="width: 220px; height: 310px;" :src="shareForm.posterUrl" /> <img
<el-button style="display: block;margin-top: 12px;margin-left: 65px;" :size="size" type="primary" @click="handleSaveImg(shareForm.posterUrl)">下载海报</el-button> 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> <div>
<div class="code"> <div class="code">
<div class="activity-code"> <div class="activity-code">
<div class="code-img"> <div class="code-img">
<img style="width: 146px; height: 146px;" :src="shareForm.qrCodeUrl" /> <img
style="width: 146px; height: 146px;"
:src="shareForm.qrCodeUrl"
/>
</div> </div>
<div> <div>
<p class="code-text">活动二维码</p> <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> </div>
<div class="activity-code" style="margin-top: 14px;"> <div
class="activity-code"
style="margin-top: 14px;"
v-if="!hideStatus"
>
<div class="code-img"> <div class="code-img">
<img style="width: 146px; height: 146px;" :src="shareForm.staffLoginQrCodeUrl" /> <img
style="width: 146px; height: 146px;"
:src="shareForm.staffLoginQrCodeUrl"
/>
</div> </div>
<div> <div>
<p class="code-text">员工注册码</p> <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> </div>
</div> </div>
...@@ -32,18 +67,39 @@ ...@@ -32,18 +67,39 @@
<div class="page-route"> <div class="page-route">
<div> <div>
<span class="share-txt">H5短链接:</span> <span class="share-txt">H5短链接:</span>
<span class="copy" @click="handleSaveTxt(shareForm.linkUrl)">复制</span> <span
<span class="copy" style="margin-left: 10px;width: 75px;" @click="handleSaveTxt(shareForm.originallinkUrl)">复制群发链接</span> class="copy"
@click="handleSaveTxt(shareForm.linkUrl)"
>复制</span>
<span
class="copy"
style="margin-left: 10px;width: 75px;"
@click="handleSaveTxt(shareForm.originallinkUrl)"
>复制群发链接</span>
</div> </div>
<p class="link" style="margin-bottom: 16px;">{{ shareForm.linkUrl }}</p> <p
<div> class="link"
<span class="share-txt">员工注册码链接:</span> style="margin-bottom: 16px;"
<span class="copy" @click="handleSaveTxt(shareForm.staffLoginLinkUrl)">复制</span> >{{ shareForm.linkUrl }}</p>
</div> <template v-if="!hideStatus">
<p class="link" style="margin-bottom: 16px;">{{ shareForm.staffLoginLinkUrl }}</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>
</template>
<div> <div>
<span class="share-txt">活动ID:</span> <span class="share-txt">活动ID:</span>
<span class="copy" @click="handleSaveTxt(shareForm.id)">复制</span> <span
class="copy"
@click="handleSaveTxt(shareForm.id)"
>复制</span>
</div> </div>
<p class="link">{{ shareForm.id }}</p> <p class="link">{{ shareForm.id }}</p>
</div> </div>
...@@ -53,7 +109,7 @@ ...@@ -53,7 +109,7 @@
<script> <script>
export default { export default {
name: 'crowdFundingShare', name: 'crowdFundingShare',
data() { data () {
return {} return {}
}, },
...@@ -64,14 +120,15 @@ export default { ...@@ -64,14 +120,15 @@ export default {
}, },
shareForm: { shareForm: {
type: Object, type: Object,
default: () => {} default: () => { }
} },
hideStatus: Boolean
}, },
mounted() {}, mounted () { },
methods: { methods: {
handleSaveImg(url, downloadTxt = '海报') { handleSaveImg (url, downloadTxt = '海报') {
var alink = document.createElement('a') var alink = document.createElement('a')
alink.href = url alink.href = url
alink.setAttribute('target', '_blank') alink.setAttribute('target', '_blank')
...@@ -79,7 +136,7 @@ export default { ...@@ -79,7 +136,7 @@ export default {
alink.click() alink.click()
alink.remove() alink.remove()
}, },
handleSaveTxt(txt) { handleSaveTxt (txt) {
this.$message({ this.$message({
message: '复制成功', message: '复制成功',
type: 'success', type: 'success',
...@@ -92,7 +149,7 @@ export default { ...@@ -92,7 +149,7 @@ export default {
document.execCommand('Copy') document.execCommand('Copy')
document.body.removeChild(input) document.body.removeChild(input)
}, },
handleShareClose() { handleShareClose () {
this.$emit('handleShareClose') this.$emit('handleShareClose')
} }
} }
......
...@@ -10,12 +10,14 @@ ...@@ -10,12 +10,14 @@
fn="新增众筹" fn="新增众筹"
mode="el-button" mode="el-button"
>新建众筹</GLButton> >新建众筹</GLButton>
<el-button <template v-if="!hideStatus">
:size="size" <el-button
type="default" :size="size"
class="default-blue-btn" type="default"
@click="handleJump" class="default-blue-btn"
>订单管理</el-button> @click="handleJump"
>订单管理</el-button>
</template>
</div> </div>
<div class="container"> <div class="container">
<GLCombiForm <GLCombiForm
...@@ -115,6 +117,7 @@ ...@@ -115,6 +117,7 @@
:isShareVisible="isShareVisible" :isShareVisible="isShareVisible"
:shareForm="shareForm" :shareForm="shareForm"
@handleShareClose="handleShareClose" @handleShareClose="handleShareClose"
:hideStatus="hideStatus"
></crowdFundingShare> ></crowdFundingShare>
</div> </div>
</template> </template>
...@@ -308,131 +311,7 @@ export default { ...@@ -308,131 +311,7 @@ export default {
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: true, tableOption: true,
tableColumns: [ 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
}
}
]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
baseData: { baseData: {
...@@ -478,8 +357,147 @@ export default { ...@@ -478,8 +357,147 @@ export default {
methods: { methods: {
async getCrowdfundingOrderConfig () { async getCrowdfundingOrderConfig () {
const res = await this.$apis.common.getCrowdfundingOrderConfig() let tableColumns = [
this.hideStatus = res == 1 // {
// 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) { __getRoutes (ctx) {
const { const {
......
...@@ -2033,7 +2033,8 @@ export default { ...@@ -2033,7 +2033,8 @@ export default {
{ {
label: '收款模式', label: '收款模式',
name: 'paymentModel', name: 'paymentModel',
addHtml: 'paymentModel' addHtml: 'paymentModel',
}, },
{ {
label: '常态化模式', label: '常态化模式',
...@@ -2222,6 +2223,7 @@ export default { ...@@ -2222,6 +2223,7 @@ export default {
} }
}, },
mounted () { mounted () {
this.getCrowdfundingOrderConfig()
this.getLiveList() this.getLiveList()
this.getVideoList() this.getVideoList()
this.setMinHeight('.crowd-config') this.setMinHeight('.crowd-config')
...@@ -2308,6 +2310,13 @@ export default { ...@@ -2308,6 +2310,13 @@ export default {
}, },
methods: { 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) { changeFormAttr (formName, attrName, labelList, attrValue) {
labelList.forEach(item => { labelList.forEach(item => {
let idx = this[formName].findIndex(k => k.label == 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!