|
@@ -16,7 +16,7 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="5">
|
|
<a-col :span="5">
|
|
<a-form-item label="奖品" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
<a-form-item label="奖品" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
- <a-input id="winRecord-customerMobile" allowClear v-model="queryParam.customerMobile" placeholder="请输入奖品名称" />
|
|
|
|
|
|
+ <a-input id="winRecord-prizeDesc" allowClear v-model="queryParam.prizeDesc" placeholder="请输入奖品名称" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="5">
|
|
<a-col :span="5">
|
|
@@ -27,10 +27,10 @@
|
|
<a-col :span="4">
|
|
<a-col :span="4">
|
|
<a-form-item label="状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
<a-form-item label="状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
<v-select
|
|
<v-select
|
|
- v-model="queryParam.orderState"
|
|
|
|
|
|
+ v-model="queryParam.state"
|
|
ref="orderState"
|
|
ref="orderState"
|
|
- id="winRecord-status"
|
|
|
|
- code="ORDER_STATE"
|
|
|
|
|
|
+ id="winRecord-state"
|
|
|
|
+ code="PRIZE_WIN_STATE"
|
|
placeholder="请选择状态"
|
|
placeholder="请选择状态"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -55,21 +55,23 @@
|
|
type="rocket"
|
|
type="rocket"
|
|
id="winRecord-sendGood"
|
|
id="winRecord-sendGood"
|
|
title="发货"
|
|
title="发货"
|
|
|
|
+ v-if="record.prizeType=='GOODS'&&record.state=='WAIT_SEND_EXPRESS'"
|
|
class="actionBtn icon-blues"
|
|
class="actionBtn icon-blues"
|
|
@click="sendGood(record)" />
|
|
@click="sendGood(record)" />
|
|
<a-icon
|
|
<a-icon
|
|
type="eye"
|
|
type="eye"
|
|
id="winRecord-handleView"
|
|
id="winRecord-handleView"
|
|
title="详情"
|
|
title="详情"
|
|
|
|
+ v-if="record.prizeType=='GOODS'"
|
|
class="actionBtn icon-green"
|
|
class="actionBtn icon-green"
|
|
@click="handleView(record)" />
|
|
@click="handleView(record)" />
|
|
|
|
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
<!-- 发货 -->
|
|
<!-- 发货 -->
|
|
- <GoodsLogistics :openModal="openModal" @submit="handleSubmit" @close="openModal=false" />
|
|
|
|
|
|
+ <GoodsLogistics :openModal="openModal" :itemId="itemId" @submit="handleSubmit" @close="openModal=false" />
|
|
<!-- 发货详情 -->
|
|
<!-- 发货详情 -->
|
|
- <GoodsLogisticsDetail :openModal="openDetailModal" @close="openDetailModal=false" />
|
|
|
|
|
|
+ <GoodsLogisticsDetail :openModal="openDetailModal" :itemId="itemId" @close="openDetailModal=false" />
|
|
</a-card>
|
|
</a-card>
|
|
|
|
|
|
</template>
|
|
</template>
|
|
@@ -80,7 +82,7 @@ import GoodsLogistics from './GoodsLogistics.vue'
|
|
import GoodsLogisticsDetail from './GoodsLogisticsDetail.vue'
|
|
import GoodsLogisticsDetail from './GoodsLogisticsDetail.vue'
|
|
import getDate from '@/libs/getDate.js'
|
|
import getDate from '@/libs/getDate.js'
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
-import { orderList } from '@/api/order'
|
|
|
|
|
|
+import { getLuckyWinList, sendExpress } from '@/api/luckyDraw.js'
|
|
export default {
|
|
export default {
|
|
name: 'WinRecord',
|
|
name: 'WinRecord',
|
|
components: { STable, VSelect, GoodsLogistics, GoodsLogisticsDetail },
|
|
components: { STable, VSelect, GoodsLogistics, GoodsLogisticsDetail },
|
|
@@ -96,32 +98,34 @@ export default {
|
|
queryParam: {
|
|
queryParam: {
|
|
beginDate: null, // 开始时间
|
|
beginDate: null, // 开始时间
|
|
endDate: null, // 结束时间
|
|
endDate: null, // 结束时间
|
|
- customerMobile: '', // 用户手机
|
|
|
|
- orderSn: '', // 订单编号
|
|
|
|
- orderState: null // 订单状态
|
|
|
|
|
|
+ prizeDesc: '', // 奖品
|
|
|
|
+ customerMobile: '', // 用户
|
|
|
|
+ state: '' // 状态
|
|
},
|
|
},
|
|
|
|
+ itemId: '', // 发货列id
|
|
|
|
+ luckyDrawWinNo: '', // 中奖奖品编码
|
|
loading: false, // 导出loading
|
|
loading: false, // 导出loading
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
- { title: '中奖时间', dataIndex: 'orderTime', width: 200, align: 'center' },
|
|
|
|
- { title: '活动名称', dataIndex: 'customerMobiles', align: 'center' },
|
|
|
|
- { title: '奖品', dataIndex: 'orderSn', width: 200, align: 'center' },
|
|
|
|
|
|
+ { title: '中奖时间', dataIndex: 'winTime', width: 200, align: 'center' },
|
|
|
|
+ { title: '活动名称', dataIndex: 'activeName', width: 200, align: 'center' },
|
|
|
|
+ { title: '奖品', dataIndex: 'prizeDesc', width: 200, align: 'center' },
|
|
{ title: '中奖用户', dataIndex: 'customerMobile', width: 200, align: 'center' },
|
|
{ title: '中奖用户', dataIndex: 'customerMobile', width: 200, align: 'center' },
|
|
- { title: '状态', dataIndex: 'orderStateDictValue', width: 200, align: 'center' },
|
|
|
|
|
|
+ { title: '状态', dataIndex: 'stateDictValue', width: 200, align: 'center' },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
const searchData = Object.assign(parameter, this.queryParam)
|
|
const searchData = Object.assign(parameter, this.queryParam)
|
|
if (this.time && this.time.length) {
|
|
if (this.time && this.time.length) {
|
|
- searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
|
|
|
|
- searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD')
|
|
|
|
|
|
+ searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
|
|
|
|
+ searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
|
|
} else {
|
|
} else {
|
|
searchData.beginDate = ''
|
|
searchData.beginDate = ''
|
|
searchData.endDate = ''
|
|
searchData.endDate = ''
|
|
}
|
|
}
|
|
- return orderList(searchData).then(res => {
|
|
|
|
|
|
+ return getLuckyWinList(searchData).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
const no = (res.data.pageNo - 1) * res.data.pageSize
|
|
const no = (res.data.pageNo - 1) * res.data.pageSize
|
|
for (let i = 0; i < res.data.list.length; i++) {
|
|
for (let i = 0; i < res.data.list.length; i++) {
|
|
@@ -163,21 +167,33 @@ export default {
|
|
moment(getDate.getToday().endtime, this.dateFormat)
|
|
moment(getDate.getToday().endtime, this.dateFormat)
|
|
]
|
|
]
|
|
this.queryParam.customerMobile = ''
|
|
this.queryParam.customerMobile = ''
|
|
- this.queryParam.orderSn = ''
|
|
|
|
- this.queryParam.orderState = null
|
|
|
|
|
|
+ this.queryParam.prizeDesc = ''
|
|
|
|
+ this.queryParam.state = ''
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
// 查看物流详情
|
|
// 查看物流详情
|
|
handleView (row) {
|
|
handleView (row) {
|
|
|
|
+ this.itemId = row.id
|
|
this.openDetailModal = true
|
|
this.openDetailModal = true
|
|
},
|
|
},
|
|
// 发货
|
|
// 发货
|
|
- sendGood () {
|
|
|
|
|
|
+ sendGood (row) {
|
|
|
|
+ this.itemId = row.id
|
|
|
|
+ this.luckyDrawWinNo = row.luckyDrawWinNo
|
|
this.openModal = true
|
|
this.openModal = true
|
|
},
|
|
},
|
|
// 提交发货
|
|
// 提交发货
|
|
- handleSubmit () {
|
|
|
|
-
|
|
|
|
|
|
+ handleSubmit (data) {
|
|
|
|
+ console.log(data, 'ppppppp')
|
|
|
|
+ const params = data
|
|
|
|
+ params.luckyDrawWinNo = this.luckyDrawWinNo
|
|
|
|
+ sendExpress(params).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.openModal = false
|
|
|
|
+ this.$message.success(res.message)
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|