|
@@ -21,21 +21,23 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<template #receiveInfo="{ item }">
|
|
<template #receiveInfo="{ item }">
|
|
- <div class="ellipsis" style="max-width: 200px;">
|
|
|
|
|
|
+ <div class="ellipsis" style="max-width: 180px;">
|
|
{{ orderReceiveInfo(item) }}
|
|
{{ orderReceiveInfo(item) }}
|
|
<v-tooltip activator="parent" location="top">{{ orderReceiveInfo(item) }}</v-tooltip>
|
|
<v-tooltip activator="parent" location="top">{{ orderReceiveInfo(item) }}</v-tooltip>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<template #deliverInfo="{ item }">
|
|
<template #deliverInfo="{ item }">
|
|
- <div class="ellipsis" style="max-width: 200px;">
|
|
|
|
|
|
+ <div class="ellipsis" style="max-width: 150px;">
|
|
{{ item.record.deliverInfo ? JSON.parse(item.record.deliverInfo).name + '-' + JSON.parse(item.record.deliverInfo).no : ''}}
|
|
{{ item.record.deliverInfo ? JSON.parse(item.record.deliverInfo).name + '-' + JSON.parse(item.record.deliverInfo).no : ''}}
|
|
<v-tooltip activator="parent" location="top">{{ item.record.deliverInfo ? JSON.parse(item.record.deliverInfo).name + '-' + JSON.parse(item.record.deliverInfo).no : ''}}</v-tooltip>
|
|
<v-tooltip activator="parent" location="top">{{ item.record.deliverInfo ? JSON.parse(item.record.deliverInfo).name + '-' + JSON.parse(item.record.deliverInfo).no : ''}}</v-tooltip>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<template #actions="{ item }">
|
|
<template #actions="{ item }">
|
|
- <v-btn v-if="!item.record.isReceive && !item.record.receiveInfo" color="primary" @click.stop="handleReceive(item)" variant="outlined">领取</v-btn>
|
|
|
|
- <span v-else-if="item.record.deliverInfo" class="color-success">已发货</span>
|
|
|
|
- <span v-else class="color-warning">等待发货</span>
|
|
|
|
|
|
+ <div v-if="!item.record.isReceive && !item.record.receiveInfo">
|
|
|
|
+ <v-btn color="primary" @click.stop="handleReceive(item)" variant="text">领取</v-btn>
|
|
|
|
+ <v-btn color="error" @click.stop="handleGiveUp(item)" variant="text">放弃</v-btn>
|
|
|
|
+ </div>
|
|
|
|
+ <span v-else class="color-666">{{ item.record.deliverInfo ? '已发货' : '等待发货' }}</span>
|
|
</template>
|
|
</template>
|
|
</CtTable>
|
|
</CtTable>
|
|
|
|
|
|
@@ -51,8 +53,9 @@ defineOptions({ name: 'mall-user-prize-index' })
|
|
import { ref, computed } from 'vue'
|
|
import { ref, computed } from 'vue'
|
|
import SelectAddress from '@/views/recruit/personal/PersonalCenter/shippingAddress/index.vue'
|
|
import SelectAddress from '@/views/recruit/personal/PersonalCenter/shippingAddress/index.vue'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
-import { getLuckLotteryRecordPage, luckyLotteryRecordReceive } from '@/api/mall/prize'
|
|
|
|
|
|
+import { getLuckLotteryRecordPage, luckyLotteryRecordReceive, luckyLotteryRecordGiveUp } from '@/api/mall/prize'
|
|
import { timesTampChange } from '@/utils/date'
|
|
import { timesTampChange } from '@/utils/date'
|
|
|
|
+import Confirm from '@/plugins/confirm'
|
|
|
|
|
|
const queryParams = ref({
|
|
const queryParams = ref({
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
@@ -107,6 +110,15 @@ const handleSubmit = async () => {
|
|
Snackbar.success('领取成功,待商家发货')
|
|
Snackbar.success('领取成功,待商家发货')
|
|
getLuckLotteryRecordList()
|
|
getLuckLotteryRecordList()
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// 放弃领取
|
|
|
|
+const handleGiveUp = async (item) => {
|
|
|
|
+ Confirm('系统提示', `是否确定放弃领取${item.prize.name}?`).then(async () => {
|
|
|
|
+ await luckyLotteryRecordGiveUp(item.record.id)
|
|
|
|
+ Snackbar.success('放弃成功')
|
|
|
|
+ getLuckLotteryRecordList()
|
|
|
|
+ })
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|