|
@@ -74,7 +74,7 @@
|
|
</a-form>
|
|
</a-form>
|
|
<div class="table-operator">
|
|
<div class="table-operator">
|
|
<a-button type="primary" class="button-error">批量标记已发</a-button>
|
|
<a-button type="primary" class="button-error">批量标记已发</a-button>
|
|
- <span>已选2项</span>
|
|
|
|
|
|
+ <span v-if="totalChoose">已选{{ totalChoose }}项</span>
|
|
</div>
|
|
</div>
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
<a-alert type="info" style="margin-bottom:10px">
|
|
<div slot="message">
|
|
<div slot="message">
|
|
@@ -99,11 +99,16 @@
|
|
:defaultLoadData="false"
|
|
:defaultLoadData="false"
|
|
bordered>
|
|
bordered>
|
|
<template slot="orderNo" slot-scope="text, record">
|
|
<template slot="orderNo" slot-scope="text, record">
|
|
- <a @click="viewDetail(record)">{{ record.id }}</a>
|
|
|
|
|
|
+ <a @click="viewDetail(record)">{{ record.orderNo }}</a>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot="rewardStatus" slot-scope="text, record">
|
|
|
|
+ <span v-if="record.rewardStatus=='un_paid'" style="color: #ffaa00;">{{ text }}</span>
|
|
|
|
+ <span v-else-if="record.rewardStatus=='paid'" style="color: #55aa00;">{{ text }}</span>
|
|
</template>
|
|
</template>
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
- <a-button size="small" type="link" class="button-info" @click="handlePublish(record)">标记已发</a-button>
|
|
|
|
- <a-button size="small" type="link" class="button-error" @click="handleDelete(record)">删除</a-button>
|
|
|
|
|
|
+ <a-button v-if="record.rewardStatus=='un_paid'" size="small" type="link" class="button-info" @click="handlePublish(record)">标记已发</a-button>
|
|
|
|
+ <a-button v-if="record.rewardStatus=='un_paid'" size="small" type="link" class="button-error" @click="handleDelete(record)">删除</a-button>
|
|
|
|
+ <span v-if="record.rewardStatus!='un_paid'">--</span>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-spin>
|
|
</a-spin>
|
|
@@ -114,7 +119,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
-import { getShelfList } from '@/api/shelf.js'
|
|
|
|
|
|
+import { rewardOrderQueryPage, rewardOrderCancel, cancelRewardBatch, exportRewardOrder, rewardOrderGiveReward, rewardOrderGiveRewardBatch } from '@/api/rewardOrder.js'
|
|
import dealerList from '@/views/common/dealerList.vue'
|
|
import dealerList from '@/views/common/dealerList.vue'
|
|
import storeList from '@/views/common/storeList.vue'
|
|
import storeList from '@/views/common/storeList.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
@@ -137,27 +142,27 @@ export default {
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '60px', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '60px', align: 'center' },
|
|
- { title: '活动名称', dataIndex: 'shelfName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '货架名称', dataIndex: 'dealerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
|
|
+ { title: '活动名称', dataIndex: 'rewardRuleName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '货架名称', dataIndex: 'shelfName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '配件经销商', dataIndex: 'dealerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '配件经销商', dataIndex: 'dealerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '汽车修理厂', dataIndex: 'storeName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '汽车修理厂', dataIndex: 'storeName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
- { title: '员工姓名', dataIndex: 'createDate', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '员工手机号码', dataIndex: 'dealerName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '员工姓名', dataIndex: 'userName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '员工手机号码', dataIndex: 'userMobile', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '订单编号', dataIndex: 'orderNo', scopedSlots: { customRender: 'orderNo' }, width: '130px', align: 'center' },
|
|
{ title: '订单编号', dataIndex: 'orderNo', scopedSlots: { customRender: 'orderNo' }, width: '130px', align: 'center' },
|
|
- { title: '订单类型', dataIndex: 'shelfPlaceNum', width: '80px', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
|
|
|
|
+ { title: '订单类型', dataIndex: 'orderTypeDictValue', width: '80px', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
{ title: '订单状态', dataIndex: 'shelfPlaceNum', width: '80px', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
{ title: '订单状态', dataIndex: 'shelfPlaceNum', width: '80px', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
- { title: '下单时间', dataIndex: 'createDate', width: '150px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '下单时间', dataIndex: 'orderDate', width: '150px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: 'VIN', dataIndex: 'settleTypeDictValue', width: '140px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: 'VIN', dataIndex: 'settleTypeDictValue', width: '140px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '车型', dataIndex: 'storeName', width: '120px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '车型', dataIndex: 'storeName', width: '120px', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '本单红包金额小计', dataIndex: 'shelfPlaceNum', width: '80px', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
|
|
- { title: '红包发放状态', dataIndex: 'shelfPlaceNum', width: '100px', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
|
|
- { title: '红包发放时间', dataIndex: 'createDate', width: '150px', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
|
|
- { title: '操作', width: '120px', align: 'left', scopedSlots: { customRender: 'action' }, fixed: 'right' }
|
|
|
|
|
|
+ { title: '本单红包金额小计', dataIndex: 'totalRewardAmount', width: '80px', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
|
|
+ { title: '红包发放状态', dataIndex: 'rewardStatusDictValue', width: '100px', align: 'center', scopedSlots: { customRender: 'rewardStatus' } },
|
|
|
|
+ { title: '红包发放时间', dataIndex: 'rewardRatioTimes', width: '150px', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
|
|
+ { title: '操作', width: '120px', align: 'center', scopedSlots: { customRender: 'action' }, fixed: 'right' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- return getShelfList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
|
|
+ return rewardOrderQueryPage(Object.assign(parameter, this.queryParam)).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
@@ -174,6 +179,11 @@ export default {
|
|
rowSelectionInfo: null
|
|
rowSelectionInfo: null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ computed: {
|
|
|
|
+ totalChoose () {
|
|
|
|
+ return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys && this.rowSelectionInfo.selectedRowKeys.length
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
// 表格选中项
|
|
// 表格选中项
|
|
rowSelectionFun (obj) {
|
|
rowSelectionFun (obj) {
|
|
@@ -207,6 +217,14 @@ export default {
|
|
},
|
|
},
|
|
// 标记发布
|
|
// 标记发布
|
|
handlePublish (row) {
|
|
handlePublish (row) {
|
|
|
|
+ this.spinning = true
|
|
|
|
+ rewardOrderGiveReward({ id: row.id }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.$message.success(res.message)
|
|
|
|
+ this.$refs.table.refresh()
|
|
|
|
+ }
|
|
|
|
+ this.spinning = false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 详情
|
|
// 详情
|
|
viewDetail (row) {
|
|
viewDetail (row) {
|
|
@@ -222,7 +240,7 @@ export default {
|
|
centered: true,
|
|
centered: true,
|
|
onOk () {
|
|
onOk () {
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
- productAudit({ sn: row.productSn }).then(res => {
|
|
|
|
|
|
+ rewardOrderCancel({ id: row.id }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
_this.$message.success(res.message)
|
|
_this.$message.success(res.message)
|
|
_this.$refs.table.refresh()
|
|
_this.$refs.table.refresh()
|