Browse Source

这是汇率的修改

Hongxilin
donghaolin 5 months ago
parent
commit
903912ed55
  1. 58
      vue/gold-system/src/views/managerecharge/rate.vue

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

@ -1,6 +1,6 @@
<script setup>
import { ref, onMounted, computed, reactive } from "vue";
import { ElMessageBox } from "element-plus";
import { ElMessage, ElMessageBox } from "element-plus";
import axios from "axios";
import { createApp } from "vue";
import moment from "moment";
@ -98,10 +98,9 @@ const search = function () {
get();
};
//
const rateAdd = ref({
adminId: "1",
});
const rateAdd = ref({});
const addRate = async function () {
rateAdd.value.adminId = adminData.value.adminId;
try {
console.log("搜索参数", getObj.value);
// POST
@ -109,7 +108,9 @@ const addRate = async function () {
"http://192.168.8.93:10010/rates/add",
rateAdd.value
);
if (result.code == 0) {
ElMessage.error(result.msg);
}
//
console.log("请求成功", result);
get();
@ -162,6 +163,7 @@ const getEditData = async function (row) {
//
rateEdit.value = result.data;
rateEdit.value.adminId = adminData.value.adminId;
console.log("这是编辑的数值", rateEdit.value);
} catch (error) {
console.log("请求失败", error);
@ -347,6 +349,26 @@ const checkNumber = function () {
});
}
};
// =========================================================
//
//
const delConfirm = async function (row) {
try {
// POST
const result = await API.post(
"http://192.168.8.93:10010/rates/delete/ " + row.rateId,
{}
);
//
console.log("请求成功", result);
get();
} catch (error) {
console.log("请求失败", error);
//
}
};
</script>
<template>
@ -427,7 +449,7 @@ const checkNumber = function () {
<span v-if="scope.row.status === 1">
<div class="status">
<span class="green-dot"></span>
<span>进行</span>
<span>使用</span>
</div>
</span>
<span v-if="scope.row.status === 0">
@ -439,7 +461,7 @@ const checkNumber = function () {
<span v-if="scope.row.status === 2">
<div class="status">
<span class="grey-dot"></span>
<span>结束</span>
<span>过期</span>
</div>
</span>
</template>
@ -461,9 +483,24 @@ const checkNumber = function () {
"
>编辑</el-button
>
<el-button type="text" @click="deleteRate(scope.row)"
>删除</el-button
<el-popconfirm
title="确定将此条活动删除吗?"
@confirm="delConfirm"
>
<template #reference>
<el-button type="primary" text> 删除 </el-button>
</template>
<template #actions="{ confirm, cancel }">
<el-button size="small" @click="cancel">取消</el-button>
<el-button
type="primary"
size="small"
@click="confirm(scope.row)"
>
确定
</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
@ -698,4 +735,7 @@ p {
.pagination {
display: flex;
}
.status {
display: flex;
}
</style>
Loading…
Cancel
Save