-
充值时间:
+
消费时间:
-
-
+
+
-
+
@@ -352,7 +321,15 @@ onMounted(async function () {
prop="rechargeTotal"
label="消费金币总数"
width="180px"
- />
+ >
+
+ {{
+ scope.row.taskCoin +
+ scope.row.freeCoin +
+ scope.row.rechargeCoin
+ }}
+
+
-
+
-
-
-
-
-
- 删除
-
-
-
- 取消
-
- 确定
-
-
-
-
-
-
+
@@ -421,4 +410,9 @@ onMounted(async function () {
.head-card-btn {
margin-left: auto;
}
+.pagination {
+ display: flex;
+ margin-top: 20px;
+ margin-left: 33%;
+}
diff --git a/vue/gold-system/src/views/managerecharge/rate.vue b/vue/gold-system/src/views/managerecharge/rate.vue
index fe30b74..692bc06 100644
--- a/vue/gold-system/src/views/managerecharge/rate.vue
+++ b/vue/gold-system/src/views/managerecharge/rate.vue
@@ -3,6 +3,7 @@ import { ref, onMounted, computed, reactive } from "vue";
import { ElMessageBox } from "element-plus";
import axios from "axios";
import { createApp } from "vue";
+import moment from "moment";
const regeAdd = ref(false);
const regeEdit = ref(false);
@@ -14,9 +15,15 @@ const getObj = ref({
pageNum: 1,
pageSize: 5,
});
+const total = ref(0);
//分页总条目
-const get = async function () {
+const get = async function (val) {
try {
+ // 搜索参数页码赋值
+ if (typeof val === "number") {
+ getObj.value.pageNum = val;
+ }
+
console.log("搜索参数", getObj.value);
// 发送POST请求
const result = await axios.post("http://192.168.8.174:10010/rates/search", {
@@ -30,9 +37,9 @@ const get = async function () {
tableData.value = result.data.data.list;
console.log("tableData", tableData.value);
// 在这里可以根据需求进一步处理成功后的逻辑,比如更新UI显示成功消息等
- getObj.value.pageNum = result.data.data.pageNum;
- getObj.value.pageSize = result.data.data.pageSize;
- getObj.value.total = result.data.data.total;
+ // 存储分页总条目
+ total.value = result.data.data.total;
+ console.log("total", total.value);
} catch (error) {
console.log("请求失败", error);
// 在这里可以处理错误逻辑,比如显示错误提示等
@@ -40,7 +47,9 @@ const get = async function () {
};
// 添加方法
-const rateAdd = ref({});
+const rateAdd = ref({
+ adminId: "1",
+});
const addRate = async function () {
try {
console.log("搜索参数", getObj.value);
@@ -245,6 +254,34 @@ const rules = reactive({
{ validator: checkEndTime, trigger: "blur" },
],
});
+
+// 验证跳转输入框的数字是否合法
+const checkNumber = function () {
+ if (typeof parseInt(getObj.value.pageNum) === "number") {
+ console.log(
+ "总共有多少页" + Math.ceil(total.value / getObj.value.pageSize)
+ );
+ if (
+ getObj.value.pageNum > 0 &&
+ getObj.value.pageNum <= Math.ceil(total.value / getObj.value.pageSize)
+ ) {
+ console.log("输入的数字合法");
+ get();
+ } else {
+ //提示
+ ElMessage({
+ type: "error",
+ message: "请检查输入内容",
+ });
+ }
+ } else {
+ //提示
+ ElMessage({
+ type: "error",
+ message: "请检查输入内容",
+ });
+ }
+};
@@ -342,12 +379,42 @@ const rules = reactive({
@@ -553,4 +620,7 @@ p {
.el-card {
padding: 0px;
}
+.pagination {
+ display: flex;
+}
diff --git a/vue/gold-system/src/views/recharge/addRecharge.vue b/vue/gold-system/src/views/recharge/addRecharge.vue
index be474a1..ed43145 100644
--- a/vue/gold-system/src/views/recharge/addRecharge.vue
+++ b/vue/gold-system/src/views/recharge/addRecharge.vue
@@ -10,6 +10,7 @@ import { ElMessageBox } from "element-plus";
const addRecharge = ref({
rechargeVoucher: "",
rechargeWay: "客服充值",
+ adminId: "1",
});
// 这是添加充值信息的接口
const add = async function () {
@@ -88,8 +89,14 @@ const getUser = async function (jwcode) {
// 存储表格数据
user.value = result.data.data[0];
console.log("用户信息", user.value);
+ if (result.data.code === 0) {
+ ElMessage.error(result.data.msg);
+ } else {
+ ElMessage.success(result.data.msg);
+ }
} catch (error) {
console.log("请求失败", error);
+ ElMessage.error("查询失败,请检查精网号是否正确");
// 在这里可以处理错误逻辑,比如显示错误提示等
}
};
diff --git a/vue/gold-system/src/views/refund/addRefund.vue b/vue/gold-system/src/views/refund/addRefund.vue
index 0fc347e..f3bff30 100644
--- a/vue/gold-system/src/views/refund/addRefund.vue
+++ b/vue/gold-system/src/views/refund/addRefund.vue
@@ -7,13 +7,15 @@ import axios from "axios";
import { ElMessageBox } from "element-plus";
// 这是添加充值信息的表单
-const addRefund = ref({});
+const addRefund = ref({
+ adminId: "1",
+});
// 这是添加充值信息的接口
const add = async function () {
try {
// 发送POST请求
const result = await axios.post(
- "http://192.168.8.93:10010/recharge/recharge/add",
+ "http://192.168.8.174:10040/refund/add",
addRefund.value
);
@@ -33,7 +35,6 @@ const addBefore = () => {
.then(() => {
add();
console.log("添加成功");
- imageUrl.value = "";
addRefund.value = {};
})
.catch(() => {
@@ -83,42 +84,46 @@ const getUser = async function (jwcode) {
// 存储表格数据
user.value = result.data.data[0];
console.log("用户信息", user.value);
+ if (result.data.code === 0) {
+ ElMessage.error(result.data.msg);
+ } else {
+ ElMessage.success(result.data.msg);
+ }
} catch (error) {
console.log("请求失败", error);
+ ElMessage.error("查询失败,请检查精网号是否正确");
// 在这里可以处理错误逻辑,比如显示错误提示等
}
};
+const calculatedAllGold = computed(() => {
+ return (
+ addRefund.value.freeCoin +
+ addRefund.value.rechargeCoin +
+ addRefund.value.taskCoin
+ );
+});
-// 这是查询货币的接口
-const currency = ref([]);
-const getCurrency = async function () {
- try {
- // 发送POST请求
- const result = await axios.post(
- "http://192.168.8.174:10010/rates/search",
- {}
- );
-
- // 将响应结果存储到响应式数据中
- console.log("货币请求成功", result);
- // 存储表格数据
- currency.value = result.data.data;
- console.log("tableData", currency.value);
- // 在这里可以根据需求进一步处理成功后的逻辑,比如更新UI显示成功消息等
- } catch (error) {
- console.log("请求失败", error);
- // 在这里可以处理错误逻辑,比如显示错误提示等
- }
-};
-getCurrency();
-
-const calculatedFreeGold = computed(() => {
- return addRefund.value.paidGold * addRefund.value.activityId;
+watch(calculatedAllGold, (newVal) => {
+ addRefund.value.allCoin = newVal;
});
-watch(calculatedFreeGold, (newVal) => {
- addRefund.value.freeGold = newVal;
+const AAA = computed(() => {
+ return addRefund.value.jwcode;
});
+
+watch(AAA, (newVal) => {});
+
+// 退款类型选项
+const refundType = [
+ {
+ value: "退款商品",
+ label: "退款商品",
+ },
+ {
+ value: "退款金币",
+ label: "退款金币",
+ },
+];
@@ -147,10 +152,10 @@ watch(calculatedFreeGold, (newVal) => {
style="width: 300px"
>
@@ -198,7 +203,10 @@ watch(calculatedFreeGold, (newVal) => {
个
-
+
+
+ {{ taskCoin + freeCoin + rechargeCoin }}
+
@@ -248,25 +261,25 @@ onMounted(async function () {
- 活动名称:
+ 退款类型:
-
支付方式:
+
退款商品:
-
-
-
+
+
+
-
+
@@ -407,7 +425,11 @@ onMounted(async function () {
width="200px"
show-overflow-tooltip
/>
-
+
+
+ {{ moment(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") }}
+
+
取消
-
+
确定