积分超市

This commit is contained in:
yanran200730
2023-04-13 18:01:02 +08:00
parent 62c927746b
commit 483a4d585f
13 changed files with 614 additions and 2633 deletions

View File

@@ -0,0 +1,133 @@
<template>
<ai-detail class="AppDynamicDetail">
<template slot="title">
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title>
</template>
<template slot="content">
<ai-card title="基本信息">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="订单编号" :value="info.serialNumber"></ai-info-item>
<ai-info-item label="订单状态" :value="dict.getLabel('integralSGOStatus', info.status)"></ai-info-item>
<ai-info-item label="兑换人" :value="info.integralUserName"></ai-info-item>
<ai-info-item label="创建时间" :value="info.createTime"></ai-info-item>
<ai-info-item label="备注" :value="info.remarks" isLine></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="操作信息" v-if="info.status === '1'">
<template #content>
<ai-wrapper
label-width="120px">
<ai-info-item label="核销人" :value="info.examineUserName"></ai-info-item>
<ai-info-item label="时间" :value="info.examineTime"></ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="商品信息">
<template #content>
<ai-table
:isShowPagination="false"
:tableData="[info]"
:col-configs="colConfigs"
@getList="getList">
<el-table-column
label="商品"
slot="goods"
align="left"
width="250">
<template v-slot="{ row }">
<div class="goods">
<ai-uploader
:disabled="true"
:instance="instance"
:value="[{url: row.goodsPicUrl}]"
:limit="1">
</ai-uploader>
<p>{{ row.goodsTitle }}</p>
</div>
</template>
</el-table-column>
</ai-table>
</template>
</ai-card>
</template>
</ai-detail>
</template>
<script>
export default {
name: 'GirdDetail',
props: {
instance: Function,
dict: Object,
params: Object
},
data () {
return {
info: {},
id: '',
colConfigs: [
{ prop: 'goodsSerialNumber', label: '商品ID', align: 'left' },
{ slot: 'goods' },
{ prop: 'goodsType', label: '商品类型', align: 'center', format: v => this.dict.getLabel('integralSGType', v) },
{ prop: 'integralPrice', label: '兑换所需积分', align: 'center' },
{ prop: 'payMoney', label: '兑换后补差价金额', align: 'center' },
{ prop: 'quantity', label: '数量', align: 'center' },
{ prop: 'usedIntegral', label: '消耗积分', align: 'center' }
]
}
},
created () {
if (this.params && this.params.id) {
this.id = this.params.id
this.getInfo(this.params.id)
}
},
methods: {
getInfo (id) {
this.instance.post(`/app/appintegralsupermarketorder/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) {
this.info = {
...res.data
}
}
})
},
cancel (isRefresh) {
this.$emit('change', {
type: 'GirdList',
isRefresh: !!isRefresh
})
}
}
}
</script>
<style scoped lang="scss">
.AppDynamicDetail {
.files {
display: flex;
align-items: center;
flex-wrap: wrap;
.file-item {
width: 240px;
height: 240px;
margin: 0 20px 20px 0;
img, video {
width: 100%;
height: 100%;
object-fit: cover;
}
}
}
}
</style>