Commit bbed93db by 李伟康

门店版按照配置显示隐藏

1 parent 1ad5bb2d
...@@ -56,9 +56,8 @@ ...@@ -56,9 +56,8 @@
></el-tab-pane> ></el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<!-- 2023.03.17屏蔽,广汇不屏蔽 -->
<el-button <el-button
v-if="channelType == 2" v-if="configShow"
class="default-blue-btn" class="default-blue-btn"
:size="size" :size="size"
type="default" type="default"
...@@ -618,7 +617,7 @@ export default { ...@@ -618,7 +617,7 @@ export default {
], ],
}, },
showTable: false, showTable: false,
channelType: 1 configShow: false
} }
}, },
created () { created () {
...@@ -668,13 +667,12 @@ export default { ...@@ -668,13 +667,12 @@ export default {
addHtml: 'weChatName', addHtml: 'weChatName',
width: 210 width: 210
}, },
// 2023.03.17屏蔽,广汇不屏蔽 {
// { label: '推荐人',
// label: '推荐人', prop: 'shareStaffName',
// prop: 'shareStaffName', width: 210,
// width: 210, addHtml: 'shareStaffName'
// addHtml: 'shareStaffName' },
// },
{ {
label: '推荐人ID', label: '推荐人ID',
name: 'shareStaffId', name: 'shareStaffId',
...@@ -687,15 +685,14 @@ export default { ...@@ -687,15 +685,14 @@ export default {
width: 210, width: 210,
addHtml: 'assignName' addHtml: 'assignName'
}, },
// 2023.03.17屏蔽 ,广汇不屏蔽 {
// { label: '推荐人手机号',
// label: '推荐人手机号', prop: 'shareStaffPhone',
// prop: 'shareStaffPhone', width: 160,
// width: 160, formatter: cellValue => {
// formatter: cellValue => { return cellValue.shareStaffPhone || '-'
// return cellValue.shareStaffPhone || '-' }
// } },
// },
{ {
label: '订单时间', label: '订单时间',
prop: 'createdDate', prop: 'createdDate',
...@@ -957,14 +954,13 @@ export default { ...@@ -957,14 +954,13 @@ export default {
type: 'input', type: 'input',
maxlength: 50 maxlength: 50
}, },
// 2023.03.17屏蔽,广汇不屏蔽 {
// { label: '推荐人',
// label: '推荐人', name: 'shareStaffName',
// name: 'shareStaffName', labelWidth: 56,
// labelWidth: 56, type: 'input',
// type: 'input', maxlength: 100
// maxlength: 100 },
// },
{ {
label: '推荐人类型', label: '推荐人类型',
name: 'shareStaffSource', name: 'shareStaffSource',
...@@ -995,14 +991,13 @@ export default { ...@@ -995,14 +991,13 @@ export default {
type: 'input', type: 'input',
maxlength: 11 maxlength: 11
}, },
// 2023.03.17屏蔽,广汇不屏蔽 {
// { label: '推荐人手机号',
// label: '推荐人手机号', name: 'shareStaffPhone',
// name: 'shareStaffPhone', labelWidth: 56,
// labelWidth: 56, type: 'input',
// type: 'input', maxlength: 11
// maxlength: 11 },
// },
{ {
label: '测试单', label: '测试单',
name: 'orderType', name: 'orderType',
...@@ -1033,8 +1028,9 @@ export default { ...@@ -1033,8 +1028,9 @@ export default {
] ]
try { try {
const res = await this.$apis.common.getCrowdfundingOrderConfig(), const res = await this.$apis.common.getCrowdfundingOrderConfig(),
filterTableList = ['customerPhone', 'otherInformation', 'assignName', 'shareStaffPhone', 'verificationDate', 'vinNo', 'afterSaleStatus'], filterTableList = ['customerPhone', 'shareStaffName', 'otherInformation', 'assignName', 'shareStaffPhone', 'verificationDate', 'vinNo', 'afterSaleStatus'],
filterFormList = ['afterSaleStatuses', 'vin', 'shareStaffSource', 'customerPhone', 'shareStaffPhone'] filterFormList = ['afterSaleStatuses','shareStaffName', 'vin', 'shareStaffSource', 'customerPhone', 'shareStaffPhone']
this.configShow = res != 1
if (res == 1) { if (res == 1) {
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)) {
...@@ -1052,40 +1048,9 @@ export default { ...@@ -1052,40 +1048,9 @@ export default {
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} }
if (channelType == 2) {
tableColumns.splice(4, 0, {
label: '推荐人',
prop: 'shareStaffName',
width: 210,
addHtml: 'shareStaffName'
})
tableColumns.splice(7, 0, {
label: '推荐人手机号',
prop: 'shareStaffPhone',
width: 160,
formatter: cellValue => {
return cellValue.shareStaffPhone || '-'
}
})
searchFormData.splice(10, 0, {
label: '推荐人',
name: 'shareStaffName',
labelWidth: 56,
type: 'input',
maxlength: 100
})
searchFormData.splice(15, 0, {
label: '推荐人手机号',
name: 'shareStaffPhone',
labelWidth: 56,
type: 'input',
maxlength: 11
})
}
this.tableParams.tableColumns = tableColumns this.tableParams.tableColumns = tableColumns
this.searchFormData = searchFormData this.searchFormData = searchFormData
this.showTable = true this.showTable = true
this.channelType = channelType
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}, },
initParams () { initParams () {
......
...@@ -195,7 +195,7 @@ export default { ...@@ -195,7 +195,7 @@ export default {
{ confId: '2', confName: '企微' } { confId: '2', confName: '企微' }
] ]
}, },
hideStatus: false configShow: false
} }
}, },
...@@ -224,11 +224,10 @@ export default { ...@@ -224,11 +224,10 @@ export default {
label: '手机号码', label: '手机号码',
name: 'customerPhone' name: 'customerPhone'
}, },
// 2023.03.17屏蔽,广汇不屏蔽 {
// { label: '推荐人',
// label: '推荐人', name: 'shareStaffName'
// name: 'shareStaffName' },
// },
{ {
label: '推荐人ID', label: '推荐人ID',
name: 'shareStaffId' name: 'shareStaffId'
...@@ -287,11 +286,10 @@ export default { ...@@ -287,11 +286,10 @@ export default {
name: 'goodsName' name: 'goodsName'
} }
] ]
const res = await this.$apis.common.getCrowdfundingOrderConfig(), const res = await this.$apis.common.getCrowdfundingOrderConfig()
{ channelType } = this.$globalState.session let configShow = res != 1
let hideStatus = res == 1 if (!configShow) {
if (hideStatus) { const filterFormList = ['customerPhone','shareStaffName', 'shareStaffTypeName', 'vin', 'shipAddress']
const filterFormList = ['customerPhone', 'shareStaffTypeName', 'vin', 'shipAddress']
for (let i = 0; i < detailFormData.length; i++) { for (let i = 0; i < detailFormData.length; i++) {
if (filterFormList.includes(detailFormData[i].name)) { if (filterFormList.includes(detailFormData[i].name)) {
detailFormData.splice(i, 1) detailFormData.splice(i, 1)
...@@ -299,13 +297,7 @@ export default { ...@@ -299,13 +297,7 @@ export default {
} }
} }
} }
if (channelType == 2) { this.configShow = configShow
detailFormData.splice(4, 0, {
label: '推荐人',
name: 'shareStaffName'
})
}
this.hideStatus = hideStatus
this.detailFormData = detailFormData this.detailFormData = detailFormData
this.setMinHeight('.edit-box') this.setMinHeight('.edit-box')
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
...@@ -359,7 +351,7 @@ export default { ...@@ -359,7 +351,7 @@ export default {
this.detailFormData.splice(idx, 1) this.detailFormData.splice(idx, 1)
} }
// 其他信息 // 其他信息
if (!this.hideStatus) { if (this.configShow) {
var formDescribeObj = { var formDescribeObj = {
label: '其他信息', label: '其他信息',
name: 'formDescribe', name: 'formDescribe',
......
...@@ -29,9 +29,8 @@ ...@@ -29,9 +29,8 @@
<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>
<!-- 2023.03.17屏蔽,广汇不屏蔽 -->
<el-button <el-button
v-if="channelType == 2" v-if="configShow"
:size="size" :size="size"
class="default-blue-btn" class="default-blue-btn"
type="default" type="default"
...@@ -76,7 +75,7 @@ ...@@ -76,7 +75,7 @@
slot="linkText" slot="linkText"
slot-scope="scope" slot-scope="scope"
> >
<template v-if="scope.scope.incrementFlag == 'Y' || hideStatus"> <template v-if="scope.scope.incrementFlag == 'Y' || !configShow">
{{scope.scope[scope.prop] || 0 }} {{scope.scope[scope.prop] || 0 }}
</template> </template>
<template v-else> <template v-else>
...@@ -117,7 +116,7 @@ ...@@ -117,7 +116,7 @@
:isShareVisible="isShareVisible" :isShareVisible="isShareVisible"
:shareForm="shareForm" :shareForm="shareForm"
@handleShareClose="handleShareClose" @handleShareClose="handleShareClose"
:hideStatus="hideStatus" :hideStatus="!configShow"
></crowdFundingShare> ></crowdFundingShare>
</div> </div>
</template> </template>
...@@ -323,7 +322,7 @@ export default { ...@@ -323,7 +322,7 @@ export default {
} }
] ]
}, },
hideStatus: false configShow: false
} }
}, },
...@@ -467,8 +466,8 @@ export default { ...@@ -467,8 +466,8 @@ export default {
{ channelType } = this.$globalState.session { channelType } = this.$globalState.session
const res = await this.$apis.common.getCrowdfundingOrderConfig(), const res = await this.$apis.common.getCrowdfundingOrderConfig(),
filterTableList = ['paymentModel'], filterTableList = ['paymentModel'],
hideStatus = res == 1 configShow = res != 1
if (hideStatus) { if (!configShow) {
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)
...@@ -476,7 +475,7 @@ export default { ...@@ -476,7 +475,7 @@ export default {
} }
} }
} }
this.hideStatus = hideStatus this.configShow = configShow
this.channelType = channelType this.channelType = channelType
this.tableParams.tableColumns = tableColumns this.tableParams.tableColumns = tableColumns
}, },
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</div> </div>
</div> </div>
<!-- 可配置显示隐藏 👇 --> <!-- 可配置显示隐藏 👇 -->
<template v-if="showTable"> <template v-if="configShow">
<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">
...@@ -114,9 +114,8 @@ ...@@ -114,9 +114,8 @@
<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>
<!-- 2023.03.17屏蔽,广汇不屏蔽 -->
<el-button <el-button
v-if="channelType == 2" v-if="configShow"
:size="size" :size="size"
class="default-blue-btn" class="default-blue-btn"
type="default" type="default"
...@@ -179,9 +178,8 @@ ...@@ -179,9 +178,8 @@
单 单
</span> </span>
</span> </span>
<!-- 2023.03.17屏蔽,广汇不屏蔽 -->
<el-button <el-button
v-if="channelType == 2" v-if="configShow"
:size="size" :size="size"
class="default-blue-btn" class="default-blue-btn"
type="default" type="default"
...@@ -390,8 +388,7 @@ export default { ...@@ -390,8 +388,7 @@ export default {
dataBoard: {}, dataBoard: {},
activityId: '', activityId: '',
liveInfo: {}, liveInfo: {},
showTable: false, configShow: false
channelType: 1
} }
}, },
computed: { computed: {
...@@ -418,10 +415,8 @@ export default { ...@@ -418,10 +415,8 @@ export default {
methods: { methods: {
async getCrowdfundingOrderConfig () { async getCrowdfundingOrderConfig () {
const res = await this.$apis.common.getCrowdfundingOrderConfig(), const res = await this.$apis.common.getCrowdfundingOrderConfig()
{ channelType } = this.$globalState.session this.configShow = res != 1
this.channelType = channelType
this.showTable = res != 1
}, },
getLiveData () { getLiveData () {
this.$apis.seckillActivity this.$apis.seckillActivity
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!