Commit ef3812d4 by liuliufashi

updater

parent d35dd5bb
......@@ -31,6 +31,9 @@
<template v-if="column.key === 'price'">
<div>{{ record.price / 100 }}</div>
</template>
<template v-if="column.key === 'sellamount'">
<div>{{ record.sellamount / 100 }}</div>
</template>
<template v-if="column.key === 'status'">
<div v-if="record.status === 0" style="color: rgb(12, 191, 33);">正常</div>
<div v-else style="color: #f56c6c;">已下架</div>
......@@ -186,12 +189,12 @@ const columns = [
dataIndex: "sellcount",
},
{
title: "默认金额",
title: "默认单价(元)",
key: "price",
dataIndex: "price",
},
{
title: "已售金额",
title: "已售金额(元)",
key: "sellamount",
dataIndex: "sellamount",
},
......
<template>
<div>
<div style="display: flex;margin-bottom: 20px;">
<a-input-search v-model:value="value" placeholder="请输入订单号" style="width: 200px" @search="onSearchOrd" />
</div>
<div>
<div style="display: flex;margin-bottom: 20px;">
<a-input-search v-model:value="value" placeholder="请输入订单号" style="width: 200px" @search="onSearchOrd" />
</div>
<a-table :columns="columns" :data-source="list" @change="tableChange" :pagination="pagination" :scroll="{ y: 'calc(100vh - 300px)' }">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'amount'">
<div v-if="record.amount">
<div>{{ record.amount/100 }}</div>
</div>
</template>
<template v-if="column.key === 'nickname'">
<div v-if="record.nickname">
<div>{{ record.nickname }}</div>
</div>
<div v-else>
~
</div>
</template>
<template v-if="column.key === 'creator'">
<div v-if="record.creator">
<div>{{ record.creator }}</div>
</div>
<div v-else>
~
</div>
</template>
<template v-if="column.key === 'headimgurl'">
<div v-if="record.headimgurl">
<a-image :width="50" :src="record.headimgurl" />
</div>
<div v-else>
~
</div>
</template>
<a-table :columns="columns" :data-source="list" @change="tableChange" :pagination="pagination"
:scroll="{ y: 'calc(100vh - 300px)' }">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'amount'">
<div v-if="record.amount">
<div>{{ record.amount / 100 }}</div>
</div>
</template>
<template v-if="column.key === 'nickname'">
<div v-if="record.nickname">
<div>{{ record.nickname }}</div>
</div>
<div v-else>
~
</div>
</template>
<template v-if="column.key === 'creator'">
<div v-if="record.creator">
<div>{{ record.creator }}</div>
</div>
<div v-else>
~
</div>
</template>
<template v-if="column.key === 'headimgurl'">
<div v-if="record.headimgurl">
<a-image :width="50" :src="record.headimgurl" />
</div>
<div v-else>
~
</div>
</template>
<template v-if="column.key === 'status'">
<div v-if="record.status === 0" style="color: rgb(245, 108, 108);">
未支付
</div>
<div v-else style="color: rgb(12, 191, 33);">
已支付
</div>
<div v-if="record.status === 0" style="color: rgb(245, 108, 108);">
未支付
</div>
<div v-else style="color: rgb(12, 191, 33);">
已支付
</div>
</template>
<template v-if="column.key === 'paytype'">
<div v-if="record.paytype === 1">
微信
</div>
<div v-else-if="record.paytype === 2">
支付宝
</div>
<div v-else>
未知
</div>
</template>
</template>
</template>
</a-table>
</a-table>
</div>
</template>
<script lang="ts" setup>
......@@ -53,22 +65,31 @@ import { onMounted, ref, defineExpose } from 'vue';
import { onFindPayInfo, onFindPayOrderid } from '@/api/index'
import { getUid } from '@/utils/userInfo'
const columns = [
{
title: '订单号',
dataIndex: 'id',
key: 'id',
},
{
title: '商品名',
dataIndex: 'subject',
key: 'subject',
},
{
title: '金额',
{
title: '金额(元)',
dataIndex: 'amount',
key: 'amount',
},
{
title: '订单号',
dataIndex: 'id',
key: 'id',
},
title: '订单时间',
dataIndex: 'updatetime',
key: 'updatetime',
},
{
title: '头像',
dataIndex: 'headimgurl',
key: 'headimgurl',
},
{
title: '昵称',
dataIndex: 'nickname',
......@@ -79,21 +100,19 @@ const columns = [
dataIndex: 'creator',
key: 'creator',
},
{
title: '头像',
dataIndex: 'headimgurl',
key: 'headimgurl',
title: '支付渠道',
dataIndex: 'paytype',
key: 'paytype',
},
{
{
title: '状态',
dataIndex: 'status',
key: 'status',
},
{
title: '订单时间',
dataIndex: 'updatetime',
key: 'updatetime',
},
];
let list = ref<any>([])
let value = ref<any>('')
......@@ -134,20 +153,20 @@ const onSearch = async () => {
}
}
}
const onSearchOrd =async()=>{
const onSearchOrd = async () => {
const uid = getUid()
const prarms= {
orderid:value.value,
const prarms = {
orderid: value.value,
uid
}
const data:any = await onFindPayOrderid(prarms)
const data: any = await onFindPayOrderid(prarms)
if (data.state === 1) {
list.value = [data.data]
pagination.value.total = data.data.count
list.value = [data.data]
pagination.value.total = data.data.count
}
}
const tableChange = async (e:any) => {
const tableChange = async (e: any) => {
const uid = getUid()
const prarms: any = {
page: e.current,
......
......@@ -40,7 +40,7 @@
</a-checkbox>
<div style="margin-left:20px;">收款账户</div>
<div style="margin-left:20px;color: black;" v-if="listValue[index] &&listValue[index].paytype == 1">{{listValue[index].name}}</div>
<div style="margin-left:20px;color: black;" v-else-if="listValue[index] &&listValue[index].paytype == 2">{{listValue[index].payname}}</div>
<div style="margin-left:20px;color: black;" v-else-if="listValue[index] &&listValue[index].paytype == 2">{{listValue[index].name}}</div>
<div style="margin-left:20px;color: black;" v-else>默认</div>
<div style="margin-left:20px;color: rgb(15, 64, 245);cursor: pointer;" @click="onSet(item.label)">设置</div>
</div>
......@@ -86,7 +86,7 @@
<a-radio-group v-model:value="modalvalue">
<div v-for="item in list" :itemkey="item.id">
<a-radio v-if="item.paytype == 1" :value="item.id" :lable="item.id" @change="onChangeRadioName(item)">{{item.name}}</a-radio>
<a-radio v-else-if="item.paytype == 2" :value="item.id" :lable="item.id" @change="onChangeRadioName(item)">{{item.name}}</a-radio>
<a-radio v-else-if="item.paytype == 2" :value="item.id" :lable="item.id" @change="onChangeRadioName(item)">{{item}}</a-radio>
</div>
</a-radio-group>
</a-modal>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment