hongxilin 5 months ago
parent
commit
343ae3d579
  1. 7
      vue/gold-system/src/views/consume/allConsume.vue
  2. 27
      vue/gold-system/src/views/managerecharge/rate.vue
  3. 16
      vue/gold-system/src/views/recharge/addRecharge.vue
  4. 6
      vue/gold-system/src/views/recharge/adminRecharge.vue
  5. 6
      vue/gold-system/src/views/recharge/allRecharge.vue

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

@ -374,12 +374,7 @@ getGoods();
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column prop="adminName" label="提交人" width="120px" /> <el-table-column prop="adminName" label="提交人" width="120px" />
<el-table-column
prop="createTime"
label="消费时间"
width="180px"
sortable
/>
<el-table-column prop="createTime" label="消费时间" width="180px" />
</el-table> </el-table>
</div> </div>

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

@ -240,6 +240,14 @@ function formatDate(value) {
const seconds = date.getSeconds().toString().padStart(2, "0"); const seconds = date.getSeconds().toString().padStart(2, "0");
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
} }
function formatDateTwe(value) {
if (!value) return "";
const date = new Date(value);
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, "0");
const day = date.getDate().toString().padStart(2, "0");
return `${year}-${month}-${day}`;
}
// //
const tableHeight = computed(function () { const tableHeight = computed(function () {
@ -382,25 +390,32 @@ const checkNumber = function () {
:height="tableHeight" :height="tableHeight"
style="width: 100%" style="width: 100%"
> >
<el-table-column prop="currency" label="货币名称" :span="3" />
<el-table-column prop="exchangeRate" label="汇率" :span="3">
<el-table-column prop="currency" label="货币名称" :span="2" />
<el-table-column prop="exchangeRate" label="汇率" :span="2">
<template #default="scope"> <template #default="scope">
<p>{{ scope.row.exchangeRate }} 1新币</p> <p>{{ scope.row.exchangeRate }} 1新币</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="添加时间" :span="5">
<el-table-column prop="createTime" label="添加时间" :span="3">
<template #default="scope"> <template #default="scope">
<span>{{ formatDate(scope.row.createTime) }}</span> <span>{{ formatDate(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="updateTime" label="更新时间" :span="5">
<!-- <el-table-column prop="updateTime" label="更新时间" :span="3">
<template #default="scope"> <template #default="scope">
<span>{{ formatDate(scope.row.updateTime) }}</span> <span>{{ formatDate(scope.row.updateTime) }}</span>
</template> </template>
</el-table-column> -->
<el-table-column prop="adminName" label="提交人" :span="1" />
<el-table-column prop="startTime" label="持续时间" :span="10">
<template #default="scope">
<span>{{ formatDateTwe(scope.row.startTime) }}</span>
<span>---</span>
<span>{{ formatDateTwe(scope.row.endTime) }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="adminName" label="更新人" :span="4" />
<el-table-column label="操作" :span="4">
<el-table-column label="操作" :span="3">
<template #default="scope"> <template #default="scope">
<el-button <el-button
type="text" type="text"

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

@ -401,13 +401,17 @@ const getActivityById = async function (row) {
console.log("请求失败", error); console.log("请求失败", error);
} }
}; };
const handleSelectionChange = (row) => {
getActivityById(row);
};
function handleActivityChange(value) {
//
console.log("选中的值:", value);
getActivityById(value);
console.log("看看", addRecharge.value);
}
const calculatedFreeGold = computed(() => { const calculatedFreeGold = computed(() => {
if (!addRecharge.value.activityId == 0) { if (!addRecharge.value.activityId == 0) {
const paidGold = Number(addRecharge.value.paidGold) || 0; const paidGold = Number(addRecharge.value.paidGold) || 0;
const activityId = Number(addRecharge.value.rechargeRatio) || 1; // 0 const activityId = Number(addRecharge.value.rechargeRatio) || 1; // 0
console.log("看看有没拿到", addRecharge.value);
return Math.ceil(paidGold / activityId); return Math.ceil(paidGold / activityId);
} }
}); });
@ -479,6 +483,7 @@ const addLine = function () {
const handleSelectionChangebatch = function (val) { const handleSelectionChangebatch = function (val) {
console.log("val===", val); console.log("val===", val);
batchDelObj.value = val; batchDelObj.value = val;
console.log("大傻春");
}; };
// //
const batchDel = function () { const batchDel = function () {
@ -665,6 +670,7 @@ const batchAdd = function () {
v-model="addRecharge.activityId" v-model="addRecharge.activityId"
placeholder="请选择" placeholder="请选择"
style="width: 300px" style="width: 300px"
@change="handleActivityChange"
> >
<el-option <el-option
v-for="item in activity" v-for="item in activity"
@ -788,7 +794,6 @@ const batchAdd = function () {
label-width="auto" label-width="auto"
style="max-width: 1200px" style="max-width: 1200px"
label-position="left" label-position="left"
width="1000px"
> >
<el-text size="large" style="margin-left: 20px">客户信息</el-text> <el-text size="large" style="margin-left: 20px">客户信息</el-text>
<el-row style="margin-top: 20px"> <el-row style="margin-top: 20px">
@ -910,7 +915,8 @@ const batchAdd = function () {
clearable clearable
v-model="scope.row.activityId" v-model="scope.row.activityId"
placeholder="请选择活动名称" placeholder="请选择活动名称"
@change="calculatedRowFreeGold(scope.row)"
@change="handleSelectionChange"
>
> >
<el-option <el-option
v-for="item in activity" v-for="item in activity"

6
vue/gold-system/src/views/recharge/adminRecharge.vue

@ -434,11 +434,7 @@ onMounted(async function () {
label="活动名称" label="活动名称"
width="150px" width="150px"
/> />
<el-table-column
prop="paidGold"
label="充值金额(新币)"
width="120px"
/>
<el-table-column prop="paidGold" label="充值金额" width="120px" />
<el-table-column prop="paidGold" label="充值金币" width="100px" /> <el-table-column prop="paidGold" label="充值金币" width="100px" />
<el-table-column prop="freeGold" label="免费金币" width="100px" /> <el-table-column prop="freeGold" label="免费金币" width="100px" />
<el-table-column <el-table-column

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

@ -402,11 +402,7 @@ onMounted(async function () {
label="活动名称" label="活动名称"
width="150px" width="150px"
/> />
<el-table-column
prop="paidGold"
label="充值金额(新币)"
width="120px"
/>
<el-table-column prop="paidGold" label="充值金额" width="120px" />
<el-table-column <el-table-column
prop="rechargeWay" prop="rechargeWay"
label="充值方式" label="充值方式"

Loading…
Cancel
Save