hongxilin 5 months ago
parent
commit
221b5ba465
  1. 17
      vue/gold-system/src/views/consume/addConsume.vue
  2. 1
      vue/gold-system/src/views/consume/allConsume.vue
  3. 2
      vue/gold-system/src/views/managerecharge/activity.vue
  4. 1
      vue/gold-system/src/views/managerecharge/rate.vue
  5. 404
      vue/gold-system/src/views/recharge/addRecharge.vue
  6. 946
      vue/gold-system/src/views/recharge/adminRecharge.vue
  7. 10
      vue/gold-system/src/views/recharge/allRecharge.vue
  8. 17
      vue/gold-system/src/views/refund/addRefund.vue
  9. 54
      vue/gold-system/src/views/refund/allRefund.vue
  10. 38
      vue/gold-system/src/views/usergold/index.vue

17
vue/gold-system/src/views/consume/addConsume.vue

@ -334,12 +334,15 @@ function calculateCoins() {
</el-form>
<!-- 客户信息栏 -->
<el-card style="float: right" class="customer-info">
<el-form :model="user" label-width="auto" label-position="left">
<el-text size="large" style="margin-left: 20px; font-weight: bold"
>客户信息</el-text
>
<el-row style="margin-top: 20px; display: flex">
<el-card style="width: 850px; float: right" class="customer-info">
<el-form
:model="user"
label-width="auto"
style="max-width: 1000px"
label-position="left"
>
<el-text size="large" style="margin-left: 20px">客户信息</el-text>
<el-row style="margin-top: 20px">
<el-col :span="10">
<el-form-item label="姓名:">
<p>{{ user.name }}</p>
@ -356,7 +359,7 @@ function calculateCoins() {
</el-form-item>
</el-col>
<el-col :span="14">
<el-form-item label="当前金币总数">
<el-form-item label="当前金币总数" style="width: 500px">
<span style="color: #2fa1ff; margin-right: 5px" v-if="user.buyJb">{{
user.buyJb + user.free6 + user.free12 + user.coreJb
}}</span>

1
vue/gold-system/src/views/consume/allConsume.vue

@ -445,6 +445,5 @@ getGoods();
.pagination {
display: flex;
margin-top: 20px;
margin-left: 33%;
}
</style>

2
vue/gold-system/src/views/managerecharge/activity.vue

@ -394,7 +394,7 @@ onMounted(async function () {
</div>
<!-- 分页 -->
<div class="pagination">
<div class="pagination" style="margin-top: 20px">
<el-pagination
background
:page-size="getObj.pageSize"

1
vue/gold-system/src/views/managerecharge/rate.vue

@ -600,7 +600,6 @@ p {
.pagination {
margin-top: 20px;
margin-left: 33%;
}
.box-card {

404
vue/gold-system/src/views/recharge/addRecharge.vue

@ -466,60 +466,59 @@ const closeBatchRechargeVisible = function () {
//
const batchInit = function () {
openBatchRechargeVisible();
}
//
};
//
const addLine = function () {
batchData.value.unshift({
line: ++i.value,
showInput: true,
});
}
//
};
//
const handleSelectionChangebatch = function (val) {
console.log("val===", val);
batchDelObj.value = val;
}
//
};
//
const batchDel = function () {
ElMessageBox.confirm(
'确认批量删除吗?',
'批量删除',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
ElMessageBox.confirm("确认批量删除吗?", "批量删除", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
console.log("batchDel===", batchDelObj.value);
batchData.value = batchData.value.filter(itemA => { return !batchDelObj.value.some(itemB => itemB.line == itemA.line) })
batchData.value = batchData.value.filter((itemA) => {
return !batchDelObj.value.some((itemB) => itemB.line == itemA.line);
});
console.log("batchData===", batchData.value);
ElMessage({
type: 'success',
message: '操作成功',
})
type: "success",
message: "操作成功",
});
})
.catch(() => {
ElMessage({
type: 'info',
message: '操作撤销',
})
})
}
//
type: "info",
message: "操作撤销",
});
});
};
//
const del = function (row) {
console.log("row===", row);
delObj.value.line = row.line;
}
};
const delConfirm = function () {
batchData.value = batchData.value.filter(item => item.line != delObj.value.line)
batchData.value = batchData.value.filter(
(item) => item.line != delObj.value.line
);
console.log("batchData===", batchData.value);
}
//
};
//
const reset = function (row) {
resetObj.value.line = row.line;
}
};
const resetConfirm = function () {
for (let i = 0; i < batchData.value.length; i++) {
if (batchData.value[i].line == resetObj.value.line) {
@ -529,36 +528,30 @@ const resetConfirm = function () {
break;
}
}
}
//
};
//
const cancelBatch = function () {
ElMessageBox.confirm(
'确认取消吗?此操作将不会保存任何数据。',
'确认取消',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
ElMessageBox.confirm("确认取消吗?此操作将不会保存任何数据。", "确认取消", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
batchData.value = [
{ line: 1, showInput: true }
];
batchData.value = [{ line: 1, showInput: true }];
closeBatchRechargeVisible();
ElMessage({
type: 'success',
message: '操作成功',
})
type: "success",
message: "操作成功",
});
})
.catch(() => {
ElMessage({
type: 'info',
message: '操作撤销',
})
})
}
//
type: "info",
message: "操作撤销",
});
});
};
//
const calculatedRowFreeGold = function (row) {
console.log("row===", row);
let ratio = 0;
@ -578,9 +571,9 @@ const calculatedRowFreeGold = function (row) {
batchData.value[i].freeGold = Math.ceil(paidGold / ratio);
}
break;
};
}
}
}
};
const calculatedRowRechargeGold = computed(() => {
if (!addRecharge.value.rateId == 0) {
@ -597,13 +590,13 @@ const calculatedRowRechargeGold = computed(() => {
watch(calculatedRowRechargeGold, (newVal) => {
addRecharge.value.rechargeGold = Number(newVal);
});
//
//
const batchAdd = function () {
console.log("batchData===", batchData.value);
if (batchData.value.length == 0) {
ElMessage({
type: 'error',
message: '至少需要输入一条数据!',
type: "error",
message: "至少需要输入一条数据!",
});
return;
}
@ -611,15 +604,23 @@ const batchAdd = function () {
batchData.value[i].adminId = adminData.value.adminId;
batchData.value[i].area = adminData.value.area;
batchData.value[i].rechargeWay = "客服充值";
if (batchData.value[i].jwcode == "" || batchData.value[i].jwcode == null
|| batchData.value[i].activityId == "" || batchData.value[i].activityId == null
|| batchData.value[i].paidGold == "" || batchData.value[i].paidGold == null
|| batchData.value[i].rechargeGold == "" || batchData.value[i].rechargeGold == null
|| batchData.value[i].payWay == "" || batchData.value[i].payWay == null
|| batchData.value[i].rechargeTime == "" || batchData.value[i].rechargeTime == null) {
if (
batchData.value[i].jwcode == "" ||
batchData.value[i].jwcode == null ||
batchData.value[i].activityId == "" ||
batchData.value[i].activityId == null ||
batchData.value[i].paidGold == "" ||
batchData.value[i].paidGold == null ||
batchData.value[i].rechargeGold == "" ||
batchData.value[i].rechargeGold == null ||
batchData.value[i].payWay == "" ||
batchData.value[i].payWay == null ||
batchData.value[i].rechargeTime == "" ||
batchData.value[i].rechargeTime == null
) {
ElMessage({
type: 'error',
message: '信息不能为空!请检查输入内容!',
type: "error",
message: "信息不能为空!请检查输入内容!",
});
return;
}
@ -627,29 +628,49 @@ const batchAdd = function () {
console.log("batchData===", batchData.value);
ElMessage({
type: 'success',
message: '添加成功!',
})
type: "success",
message: "添加成功!",
});
closeBatchRechargeVisible();
}
};
</script>
<template>
<div style="display: flex;">
<div style="margin-right: 20px;">新增充值</div>
<div style="display: flex">
<div style="margin-right: 20px">新增充值</div>
<el-button type="primary" plain @click="batchInit()">批量充值</el-button>
</div>
<el-form :model="addRecharge" ref="Ref" :rules="rules" label-width="auto" style="max-width: 600px" class="add-form">
<el-form
:model="addRecharge"
ref="Ref"
:rules="rules"
label-width="auto"
style="max-width: 600px"
class="add-form"
>
<el-form-item prop="jwcode" label="精网号">
<el-input v-model="addRecharge.jwcode" style="width: 220px" />
<el-button type="primary" @click="getUser(addRecharge.jwcode)" style="margin-left: 20px">查询</el-button>
<el-button
type="primary"
@click="getUser(addRecharge.jwcode)"
style="margin-left: 20px"
>查询</el-button
>
</el-form-item>
<el-form-item prop="activityId" label="活动名称">
<el-select v-model="addRecharge.activityId" placeholder="请选择" style="width: 300px">
<el-option v-for="item in activity" :key="item.value" :label="item.activityName" :value="item.activityId" />
<el-select
v-model="addRecharge.activityId"
placeholder="请选择"
style="width: 300px"
>
<el-option
v-for="item in activity"
:key="item.value"
:label="item.activityName"
:value="item.activityId"
/>
</el-select>
</el-form-item>
<el-form-item prop="paidGold" label="充值金币">
@ -660,25 +681,64 @@ const batchAdd = function () {
<p></p>
</el-form-item>
<el-form-item prop="rechargeGold" label="充值金额">
<el-select prop="rechargeGold" v-model="addRecharge.rateId" placeholder="货币名称"
style="width: 95px; margin-right: 5px">
<el-option v-for="item in currency" :key="item.value" :label="item.currency" :value="item.exchangeRate" />
<el-select
prop="rechargeGold"
v-model="addRecharge.rateId"
placeholder="货币名称"
style="width: 95px; margin-right: 5px"
>
<el-option
v-for="item in currency"
:key="item.value"
:label="item.currency"
:value="item.exchangeRate"
/>
</el-select>
<el-input disabled v-model="addRecharge.rechargeGold" style="width: 200px" />
<el-input
disabled
v-model="addRecharge.rechargeGold"
style="width: 200px"
/>
</el-form-item>
<el-form-item prop="payWay" label="收款方式">
<el-select v-model="addRecharge.payWay" placeholder="请选择" style="width: 300px">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
<el-select
v-model="addRecharge.payWay"
placeholder="请选择"
style="width: 300px"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item prop="rechargeTime" label="交款时间">
<el-date-picker v-model="addRecharge.rechargeTime" type="date" style="width: 300px" />
<el-date-picker
v-model="addRecharge.rechargeTime"
type="date"
style="width: 300px"
/>
</el-form-item>
<el-form-item prop="rechargeVoucher" label="交款凭证" style="margin-bottom: 5px">
<el-upload class="avatar-uploader" :show-file-list="false" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<el-form-item
prop="rechargeVoucher"
label="交款凭证"
style="margin-bottom: 5px"
>
<el-upload
class="avatar-uploader"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
style="width: 100px; height: 115px"
>
<img v-if="imageUrl" :src="imageUrl" class="avatar" />
<el-icon v-else class="avatar-uploader-icon">
<el-icon
v-else
class="avatar-uploader-icon"
style="width: 100px; height: 100px"
>
<Plus />
</el-icon>
</el-upload>
@ -687,22 +747,40 @@ const batchAdd = function () {
</p>
</el-form-item>
<el-form-item prop="remark" label="备注">
<el-input v-model="addRecharge.remark" style="width: 300px" :rows="2" maxlength="100" show-word-limit
type="textarea" />
<el-input
v-model="addRecharge.remark"
style="width: 300px"
:rows="2"
maxlength="100"
show-word-limit
type="textarea"
/>
</el-form-item>
<el-form-item prop="submitter" label="提交人">
<el-input style="width: 300px" :value="adminData.name" disabled placeholder="提交人姓名" />
<el-input
style="width: 300px"
:value="adminData.name"
disabled
placeholder="提交人姓名"
/>
</el-form-item>
<el-button @click="deleteRecharge" style="margin-left: 280px">重置</el-button>
<el-button @click="deleteRecharge" style="margin-left: 280px"
>重置</el-button
>
<el-button type="primary" @click="addBefore"> 提交 </el-button>
</el-form>
<!-- 客户信息栏 -->
<el-card style="width: 700px; float: right" class="customer-info">
<el-form :model="user" label-width="auto" style="max-width: 600px" label-position="left">
<el-card style="width: 1200px; float: right" class="customer-info">
<el-form
:model="user"
label-width="auto"
style="max-width: 1000px"
label-position="left"
>
<el-text size="large" style="margin-left: 20px">客户信息</el-text>
<el-row style="margin-top: 20px">
<el-col :span="12">
<el-col :span="10">
<el-form-item label="姓名:">
<p>{{ user.name }}</p>
</el-form-item>
@ -718,7 +796,7 @@ const batchAdd = function () {
</el-form-item>
</el-col>
<el-col :span="14">
<el-form-item label="当前金币总数">
<el-form-item label="当前金币总数" style="width: 500px">
<span style="color: #2fa1ff; margin-right: 5px" v-if="user.buyJb">{{
user.buyJb + user.free6 + user.free12 + user.coreJb
}}</span>
@ -769,14 +847,32 @@ const batchAdd = function () {
</el-form>
</el-card>
<el-dialog v-model="batchRechargeVisible" title="批量充值" width="1800px" style="height: 700px;">
<el-dialog
v-model="batchRechargeVisible"
title="批量充值"
width="1800px"
style="height: 700px"
>
<el-row style="margin-bottom: 10px">
<el-button type="primary" @click="addLine()" style="margin-right: auto">新增一行</el-button>
<el-button type="danger" plain @click="batchDel()" style="margin-right: 10px; width: 130px;">批量删除</el-button>
<el-button type="primary" @click="addLine()" style="margin-right: auto"
>新增一行</el-button
>
<el-button
type="danger"
plain
@click="batchDel()"
style="margin-right: 10px; width: 130px"
>批量删除</el-button
>
</el-row>
<el-row>
<el-table :data="batchData" border max-height="540px" style="height: 540px;"
@selection-change="handleSelectionChangebatch">
<el-table
:data="batchData"
border
max-height="540px"
style="height: 540px"
@selection-change="handleSelectionChangebatch"
>
<el-table-column type="selection" width="50px" />
<el-table-column property="index" label="序号" width="55px">
<template #default="scope">
@ -785,15 +881,31 @@ const batchAdd = function () {
</el-table-column>
<el-table-column property="jwcode" label="精网号" width="150px">
<template #default="scope">
<input type="number" v-if="scope.row.showInput" v-model="scope.row.jwcode" style="width: 110px;" />
<input
type="number"
v-if="scope.row.showInput"
v-model="scope.row.jwcode"
style="width: 110px"
/>
<span v-else>{{ scope.row.jwcode }}</span>
</template>
</el-table-column>
<el-table-column property="activityName" label="活动名称" width="150px">
<template #default="scope">
<el-select v-if="scope.row.showInput" filterable clearable v-model="scope.row.activityId"
placeholder="请选择活动名称" @change="calculatedRowFreeGold(scope.row)">
<el-option v-for="item in activity" :key="item.value" :label="item.activityName" :value="item.activityId">
<el-select
v-if="scope.row.showInput"
filterable
clearable
v-model="scope.row.activityId"
placeholder="请选择活动名称"
@change="calculatedRowFreeGold(scope.row)"
>
<el-option
v-for="item in activity"
:key="item.value"
:label="item.activityName"
:value="item.activityId"
>
</el-option>
</el-select>
<span v-else>{{ scope.row.activityName }}</span>
@ -801,7 +913,11 @@ const batchAdd = function () {
</el-table-column>
<el-table-column property="paidGold" label="充值金币" width="110px">
<template #default="scope">
<input v-if="scope.row.showInput" v-model="scope.row.paidGold" style="width: 70px;" />
<input
v-if="scope.row.showInput"
v-model="scope.row.paidGold"
style="width: 70px"
/>
<span v-else>{{ scope.row.paidGold }}</span>
</template>
</el-table-column>
@ -812,8 +928,19 @@ const batchAdd = function () {
</el-table-column>
<el-table-column property="rechargeGold" label="充值金额">
<template #default="scope">
<el-select v-if="scope.row.showInput" filterable clearable v-model="scope.row.rateId" placeholder="请选择币种">
<el-option v-for="item in currency" :key="item.value" :label="item.currency" :value="item.exchangeRate">
<el-select
v-if="scope.row.showInput"
filterable
clearable
v-model="scope.row.rateId"
placeholder="请选择币种"
>
<el-option
v-for="item in currency"
:key="item.value"
:label="item.currency"
:value="item.exchangeRate"
>
</el-option>
</el-select>
<span v-else>{{ scope.row.rateId }}</span>
@ -826,8 +953,19 @@ const batchAdd = function () {
</el-table-column>
<el-table-column property="payWay" label="收款方式" width="130px">
<template #default="scope">
<el-select v-if="scope.row.showInput" filterable clearable v-model="scope.row.payWay" placeholder="请选择收款方式">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
<el-select
v-if="scope.row.showInput"
filterable
clearable
v-model="scope.row.payWay"
placeholder="请选择收款方式"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<span v-else>{{ scope.row.payWay }}</span>
@ -835,10 +973,17 @@ const batchAdd = function () {
</el-table-column>
<el-table-column property="rechargeTime" label="交款时间" width="150px">
<template #default="scope">
<el-date-picker v-if="scope.row.showInput" type="date" v-model="scope.row.rechargeTime"
style="width: 120px;" placeholder="请选择交款时间">
<el-date-picker
v-if="scope.row.showInput"
type="date"
v-model="scope.row.rechargeTime"
style="width: 120px"
placeholder="请选择交款时间"
>
</el-date-picker>
<span v-else>{{ moment(scope.row.rechargeTime).format("YYYY-MM-DD HH:mm:ss") }}</span>
<span v-else>{{
moment(scope.row.rechargeTime).format("YYYY-MM-DD HH:mm:ss")
}}</span>
</template>
</el-table-column>
<el-table-column property="rechargeVoucher" label="充值凭证">
@ -854,18 +999,31 @@ const batchAdd = function () {
</el-table-column>
<el-table-column property="remark" label="备注" width="130px">
<template #default="scope">
<textarea v-if="scope.row.showInput" v-model="scope.row.remark" style="max-width: 90px;" rows="1"
cols="12"></textarea>
<textarea
v-if="scope.row.showInput"
v-model="scope.row.remark"
style="max-width: 90px"
rows="1"
cols="12"
></textarea>
<span v-else>{{ scope.row.remark }}</span>
</template>
</el-table-column>
<el-table-column property="submitter" label="提交人">
<el-input :value="adminData.name" disabled />
</el-table-column>
<el-table-column fixed="right" prop="operation" label="操作" width="150px">
<el-table-column
fixed="right"
prop="operation"
label="操作"
width="150px"
>
<template #default="scope">
<div style="display: flex;">
<el-popconfirm title="确定将此条信息删除吗?" @confirm="delConfirm">
<div style="display: flex">
<el-popconfirm
title="确定将此条信息删除吗?"
@confirm="delConfirm"
>
<template #reference>
<el-button type="danger" text @click="del(scope.row)">
删除
@ -878,7 +1036,10 @@ const batchAdd = function () {
</el-button>
</template>
</el-popconfirm>
<el-popconfirm title="确定将此条信息重置吗?" @confirm="resetConfirm">
<el-popconfirm
title="确定将此条信息重置吗?"
@confirm="resetConfirm"
>
<template #reference>
<el-button type="primary" text @click="reset(scope.row)">
重置
@ -891,10 +1052,8 @@ const batchAdd = function () {
</el-button>
</template>
</el-popconfirm>
</div>
</template>
</el-table-column>
</el-table>
</el-row>
@ -905,7 +1064,6 @@ const batchAdd = function () {
</div>
</el-row>
</el-dialog>
</template>
<style scoped>

946
vue/gold-system/src/views/recharge/adminRecharge.vue
File diff suppressed because it is too large
View File

10
vue/gold-system/src/views/recharge/allRecharge.vue

@ -389,7 +389,7 @@ onMounted(async function () {
<div>
<el-table :data="tableData" :height="tableHeight" style="width: 100%">
<el-table-column prop="username" label="姓名" width="100px" />
<el-table-column prop="jwcode" label="精网号" width="150px" />
<el-table-column prop="jwcode" label="精网号" width="130px" />
<el-table-column prop="area" label="所属地区" width="100px" />
<el-table-column
prop="activityName"
@ -397,9 +397,9 @@ onMounted(async function () {
width="150px"
/>
<el-table-column
prop="rechargeGold"
label="充值金额"
width="100px"
prop="paidGold"
label="充值金额(新币)"
width="120px"
/>
<el-table-column
prop="rechargeWay"
@ -471,7 +471,7 @@ onMounted(async function () {
</div>
<!-- 分页 -->
<div class="pagination">
<div class="pagination" style="margin-top: 20px">
<el-pagination
background
:page-size="getObj.pageSize"

17
vue/gold-system/src/views/refund/addRefund.vue

@ -379,12 +379,15 @@ const handleSelectionChange = (value) => {
</el-form>
<!-- 客户信息栏 -->
<el-card style="float: right" class="customer-info">
<el-form :model="user" label-width="auto" label-position="left">
<el-text size="large" style="margin-left: 20px; font-weight: bold"
>客户信息</el-text
>
<el-row style="margin-top: 20px; display: flex">
<el-card style="width: 850px; float: right" class="customer-info">
<el-form
:model="user"
label-width="auto"
style="max-width: 1000px"
label-position="left"
>
<el-text size="large" style="margin-left: 20px">客户信息</el-text>
<el-row style="margin-top: 20px">
<el-col :span="10">
<el-form-item label="姓名:">
<p>{{ user.name }}</p>
@ -401,7 +404,7 @@ const handleSelectionChange = (value) => {
</el-form-item>
</el-col>
<el-col :span="14">
<el-form-item label="当前金币总数">
<el-form-item label="当前金币总数" style="width: 500px">
<span style="color: #2fa1ff; margin-right: 5px" v-if="user.buyJb">{{
user.buyJb + user.free6 + user.free12 + user.coreJb
}}</span>

54
vue/gold-system/src/views/refund/allRefund.vue

@ -14,7 +14,7 @@ const detail = ref({});
//
const getObj = ref({
pageNum: 1,
pageSize: 10,
pageSize: 5,
});
//
const total = ref(100);
@ -487,14 +487,46 @@ getGoods();
</div>
<!-- 分页 -->
<el-pagination
background
layout="prev, pager, next"
:total="total"
:page-size="getObj.pageSize"
:current-page="getObj.pageNum"
@current-change="get"
/>
<div class="pagination">
<el-pagination
background
:page-size="getObj.pageSize"
layout="slot"
:total="total"
>
<div>{{ total }},每页</div>
<el-select
v-model="getObj.pageSize"
class="page-size"
@change="get()"
style="width: 80px"
>
<el-option
v-for="item in [5, 6, 7, 8, 9, 10]"
:key="item"
:label="item"
:value="item"
></el-option>
</el-select>
<div></div>
</el-pagination>
<el-pagination
background
layout="prev, pager, next, slot"
:page-size="getObj.pageSize"
:total="total"
:current-page="getObj.pageNum"
@current-change="get"
>
<div>跳至</div>
<el-input
v-model="getObj.pageNum"
style="width: 40px"
@change="checkNumber"
/>
<div></div>
</el-pagination>
</div>
</el-card>
</el-col>
</el-row>
@ -516,4 +548,8 @@ getGoods();
.head-card-btn {
margin-left: auto;
}
.pagination {
display: flex;
margin-top: 20px;
}
</style>

38
vue/gold-system/src/views/usergold/index.vue

@ -2,6 +2,7 @@
import { ref, onMounted, reactive, computed } from "vue";
import ElementPlus from "element-plus";
import axios from "axios";
import moment from "moment";
import { ta } from "element-plus/es/locales.mjs";
import API from "../../api/index.js";
@ -46,7 +47,7 @@ const updateType = [
//
const tableHeight = computed(function () {
return getObj.value.pageSize * 50 + "px";
return (getObj.value.pageSize + 2) * 38 + "px";
});
//
@ -93,7 +94,7 @@ const get = async function (val) {
rechargeCoin.value = 0;
freeCoin.value = 0;
taskCoin.value = 0;
for(let i=0;i<tableAllData.value.length;i++){
for (let i = 0; i < tableAllData.value.length; i++) {
rechargeCoin.value += tableAllData.value[i].rechargeCoin;
freeCoin.value += tableAllData.value[i].freeCoin;
taskCoin.value += tableAllData.value[i].taskCoin;
@ -264,10 +265,10 @@ onMounted(async function () {
</div>
<div>
<el-table :data="tableData" :height="tableHeight" style="width: 100%">
<el-table-column prop="uname" label="姓名" />
<el-table-column prop="jwcode" label="精网号" />
<el-table-column prop="area" label="所属地区" />
<el-table-column prop="gold" label="更新数量">
<el-table-column prop="uname" label="姓名" width="130" />
<el-table-column prop="jwcode" label="精网号" width="170" />
<el-table-column prop="area" label="所属地区" width="170" />
<el-table-column prop="gold" label="更新数量" width="160">
<template #default="scope">
<span>{{
scope.row.rechargeCoin +
@ -276,18 +277,29 @@ onMounted(async function () {
}}</span>
</template>
</el-table-column>
<el-table-column prop="updateType" label="更新类型" />
<el-table-column prop="freeCoin" label="免费金币" />
<el-table-column prop="rechargeCoin" label="充值金币" />
<el-table-column prop="taskCoin" label="任务金币" />
<el-table-column prop="name" label="提交人" />
<el-table-column prop="createTime" label="更新时间" />
<el-table-column prop="updateType" label="更新类型" width="150" />
<el-table-column prop="freeCoin" label="免费金币" width="130" />
<el-table-column prop="rechargeCoin" label="充值金币" width="150" />
<el-table-column prop="taskCoin" label="任务金币" width="130" />
<el-table-column prop="name" label="提交人" width="150" />
<el-table-column
prop="createTime"
label="更新时间"
width="210"
show-overflow-tooltip
>
<template #default="scope">
<span>{{
moment(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss")
}}</span>
</template>
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<!-- 分页 -->
<div class="pagination">
<div class="pagination" style="margin-top: 20px">
<el-pagination
background
:page-size="getObj.pageSize"

Loading…
Cancel
Save