|
@@ -26,17 +26,17 @@
|
|
<el-table-column label="序号" align="center" width="60">
|
|
<el-table-column label="序号" align="center" width="60">
|
|
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
|
|
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="time" label="报表数据日期" align="center" width="200" />
|
|
|
|
- <el-table-column prop="title" label="报表名称" align="center" />
|
|
|
|
- <el-table-column prop="endTime" label="添加时间" align="center" width="200">
|
|
|
|
|
|
+ <el-table-column prop="reportDate" label="报表数据日期" align="center" width="200" />
|
|
|
|
+ <el-table-column prop="reportName" label="报表名称" align="center" />
|
|
|
|
+ <el-table-column prop="addTime" label="添加时间" align="center" width="200">
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
- {{ row.endTime ? row.endTime : '---' }}
|
|
|
|
|
|
+ {{ row.addTime ? row.addTime : '---' }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="操作" align="center">
|
|
<el-table-column label="操作" align="center">
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
- <el-button type="primary" size="mini" style="margin: 2px" @click="handleUpdate('edit', row)"> 编辑</el-button>
|
|
|
|
<el-button type="primary" size="mini" style="margin: 2px" @click="handleSitting(row)">生成报表</el-button>
|
|
<el-button type="primary" size="mini" style="margin: 2px" @click="handleSitting(row)">生成报表</el-button>
|
|
|
|
+ <el-button type="primary" size="mini" style="margin: 2px" @click="handleUpdate('edit', row)"> 编辑</el-button>
|
|
<el-button type="success" size="mini" style="margin: 2px" @click="handlePreview(row)">预览</el-button>
|
|
<el-button type="success" size="mini" style="margin: 2px" @click="handlePreview(row)">预览</el-button>
|
|
<el-button type="danger" size="mini" style="margin: 2px" @click="handleDeleteTag(row)">删除</el-button>
|
|
<el-button type="danger" size="mini" style="margin: 2px" @click="handleDeleteTag(row)">删除</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -102,15 +102,13 @@ export default {
|
|
},
|
|
},
|
|
// 生成报表
|
|
// 生成报表
|
|
handleSitting(row) {
|
|
handleSitting(row) {
|
|
- this.renewCustome.id = row.id
|
|
|
|
- this.renewCustome.followUpStatus = row.followUpStatus
|
|
|
|
- this.updateVisible()
|
|
|
|
|
|
+ this.updateVisible({ id: row.id })
|
|
},
|
|
},
|
|
// 调用生成报表API
|
|
// 调用生成报表API
|
|
async updateVisible(params) {
|
|
async updateVisible(params) {
|
|
try {
|
|
try {
|
|
await updateVisible(params)
|
|
await updateVisible(params)
|
|
- this.$message.success('操作成功')
|
|
|
|
|
|
+ this.$message.success('报表生成成功')
|
|
this.getList()
|
|
this.getList()
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.log(error)
|
|
console.log(error)
|
|
@@ -124,16 +122,16 @@ export default {
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
})
|
|
})
|
|
- this.deleteMarketReport(row)
|
|
|
|
|
|
+ this.deleteMarketReport({ id: row.id })
|
|
} catch (error) {
|
|
} catch (error) {
|
|
this.$message.info('已取消删除操作')
|
|
this.$message.info('已取消删除操作')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 调用删除报备
|
|
// 调用删除报备
|
|
- async deleteMarketReport(row) {
|
|
|
|
|
|
+ async deleteMarketReport(params) {
|
|
try {
|
|
try {
|
|
- await deleteMarketReport(row.reportId)
|
|
|
|
- this.$message.success('操作成功')
|
|
|
|
|
|
+ await deleteMarketReport(params)
|
|
|
|
+ this.$message.success('报表删除成功')
|
|
this.getList()
|
|
this.getList()
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.log(error)
|
|
console.log(error)
|
|
@@ -154,12 +152,12 @@ export default {
|
|
if (type === 'add') {
|
|
if (type === 'add') {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: '/user/customer/market-edit',
|
|
path: '/user/customer/market-edit',
|
|
- query: { type: type }
|
|
|
|
|
|
+ query: { marketId: this.listQuery.marketId, type: type, shopName: this.$route.query.shopName }
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: '/user/customer/market-edit',
|
|
path: '/user/customer/market-edit',
|
|
- query: { type: type, id: row.id }
|
|
|
|
|
|
+ query: { marketId: this.listQuery.marketId, type: type, id: row.id, shopName: this.$route.query.shopName }
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|