Commit 88866e57 by 李伟康

收款模式更改为可配置

1 parent 44ffc1e0
...@@ -297,134 +297,7 @@ export default { ...@@ -297,134 +297,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: '定金(元)',
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
}
}
]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
baseData: { baseData: {
...@@ -470,8 +343,147 @@ export default { ...@@ -470,8 +343,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 {
......
...@@ -966,7 +966,7 @@ ...@@ -966,7 +966,7 @@
:disabled="isDisabled" :disabled="isDisabled"
:label="4" :label="4"
>门店收定金和尾款</el-radio> >门店收定金和尾款</el-radio>
<el-radio <el-radio
:disabled="isDisabled" :disabled="isDisabled"
:label="5" :label="5"
>服务商收定金门店收尾款</el-radio> >服务商收定金门店收尾款</el-radio>
...@@ -1894,7 +1894,8 @@ export default { ...@@ -1894,7 +1894,8 @@ export default {
{ {
label: '收款模式', label: '收款模式',
name: 'paymentModel', name: 'paymentModel',
addHtml: 'paymentModel' addHtml: 'paymentModel',
} }
], ],
//直播配置 //直播配置
...@@ -2021,6 +2022,7 @@ export default { ...@@ -2021,6 +2022,7 @@ export default {
} }
}, },
mounted () { mounted () {
this.getCrowdfundingOrderConfig()
this.getLiveList() this.getLiveList()
this.setMinHeight('.crowd-config') this.setMinHeight('.crowd-config')
this.routeInfo = this.$route.query this.routeInfo = this.$route.query
...@@ -2031,7 +2033,7 @@ export default { ...@@ -2031,7 +2033,7 @@ export default {
// this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].forbidEdit() // this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].forbidEdit()
this.isDisabled = this.routeInfo.addOrEdit != 'add' this.isDisabled = this.routeInfo.addOrEdit != 'add'
this.editFormData.map(item => { this.editFormData.map(item => {
if (!['activityName', 'activityImg', 'promotion','orderEndDays'].includes(item.name)) this.changeFormAttr('editFormData', 'isDisabled', [item.label], true) if (!['activityName', 'activityImg', 'promotion', 'orderEndDays'].includes(item.name)) this.changeFormAttr('editFormData', 'isDisabled', [item.label], true)
}) })
this.changeFormAttr('configEditFormData', 'isDisabled', ['账户类型', '定金收款账户'], true) this.changeFormAttr('configEditFormData', 'isDisabled', ['账户类型', '定金收款账户'], true)
} }
...@@ -2109,6 +2111,10 @@ export default { ...@@ -2109,6 +2111,10 @@ export default {
}, },
methods: { methods: {
async getCrowdfundingOrderConfig () {
const res = await this.$apis.common.getCrowdfundingOrderConfig()
this.configEditFormData.find(item => item.name == 'paymentModel').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!