-
充值时间:
+
消费时间:
-
-
+
+
-
+
@@ -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 c537a39..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: "请检查输入内容",
+ });
+ }
+};
@@ -304,7 +341,11 @@ const rules = reactive({
style="width: 100%"
>
-
+
+
+ {{ scope.row.exchangeRate }} :1新币
+
+
@@ -338,12 +379,42 @@ const rules = reactive({
@@ -549,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 8cf7fa7..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 () {
@@ -61,7 +62,7 @@ const checkEndTime = function (rule, value, callback) {
}
};
const rules = reactive({
- homilyId: [{ required: true, message: "请输入精网号", trigger: "blur" }],
+ jwcode: [{ required: true, message: "请输入精网号", trigger: "blur" }],
activityId: [{ required: true, message: "请选择活动名称", trigger: "blur" }],
paidGold: [{ required: true, message: "请输入充值金币", trigger: "blur" }],
rechargeGold: [
@@ -76,11 +77,11 @@ const rules = reactive({
// 查找客户信息的方法
const user = ref({});
-const getUser = async function (homilyId) {
+const getUser = async function (jwcode) {
try {
// 发送POST请求
const result = await axios.post("http://192.168.8.93:10020/recharge/user", {
- homilyId: homilyId,
+ jwcode: jwcode,
});
// 将响应结果存储到响应式数据中
@@ -88,8 +89,14 @@ const getUser = async function (homilyId) {
// 存储表格数据
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("查询失败,请检查精网号是否正确");
// 在这里可以处理错误逻辑,比如显示错误提示等
}
};
@@ -200,11 +207,11 @@ watch(calculatedFreeGold, calculatedRechargeGold, (newVal) => {
label-width="auto"
style="max-width: 600px"
>
-
-
+
+
查询
@@ -342,7 +349,7 @@ watch(calculatedFreeGold, calculatedRechargeGold, (newVal) => {
- {{ user.homilyId }}
+ {{ user.jwcode }}
diff --git a/vue/gold-system/src/views/refund/addRefund.vue b/vue/gold-system/src/views/refund/addRefund.vue
index 91eb28c..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(() => {
@@ -58,7 +59,7 @@ const checkEndTime = function (rule, value, callback) {
}
};
const rules = reactive({
- homilyId: [{ required: true, message: "请输入精网号", trigger: "blur" }],
+ jwcode: [{ required: true, message: "请输入精网号", trigger: "blur" }],
refundType: [{ required: true, message: "请选择退款类型", trigger: "blur" }],
refundGoods: [{ required: true, message: "请选择退款商品", trigger: "blur" }],
taskCoin: [{ required: true, message: "请输入任务金币", trigger: "blur" }],
@@ -71,11 +72,11 @@ const rules = reactive({
// 查找客户信息的方法
const user = ref({});
-const getUser = async function (homilyId) {
+const getUser = async function (jwcode) {
try {
// 发送POST请求
const result = await axios.post("http://192.168.8.93:10020/recharge/user", {
- homilyId: homilyId,
+ jwcode: jwcode,
});
// 将响应结果存储到响应式数据中
@@ -83,42 +84,46 @@ const getUser = async function (homilyId) {
// 存储表格数据
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: "退款金币",
+ },
+];
@@ -131,11 +136,11 @@ watch(calculatedFreeGold, (newVal) => {
label-width="auto"
style="max-width: 750px"
>
-
-
+
+
查询
@@ -147,10 +152,10 @@ watch(calculatedFreeGold, (newVal) => {
style="width: 300px"
>
@@ -198,7 +203,10 @@ watch(calculatedFreeGold, (newVal) => {
个
-
+
+
+ {{ taskCoin + freeCoin + rechargeCoin }}
+
{
- {{ user.homilyId }}
+ {{ user.jwcode }}
diff --git a/vue/gold-system/src/views/refund/allRefund.vue b/vue/gold-system/src/views/refund/allRefund.vue
index 3a504ba..67fea13 100644
--- a/vue/gold-system/src/views/refund/allRefund.vue
+++ b/vue/gold-system/src/views/refund/allRefund.vue
@@ -3,6 +3,7 @@ import { ref, onMounted, reactive, computed } from "vue";
import ElementPlus from "element-plus";
import { AiFillRead } from "vue-icons-plus/ai";
import axios from "axios";
+import moment from "moment";
// 变量
// 充值明细表格
const tableData = ref([]);
@@ -28,27 +29,15 @@ const area = ref([]);
//标签页默认高亮选项
const activeName = ref("all");
-// 支付方式选项
-const payWay = [
+// 退款类型
+const consumeType = [
{
- value: "微信",
- label: "微信",
+ value: "退商品",
+ label: "退商品",
},
{
- value: "支付宝",
- label: "支付宝",
- },
- {
- value: "银联",
- label: "银联",
- },
- {
- value: "信用卡",
- label: "信用卡",
- },
- {
- value: "借记卡",
- label: "借记卡",
+ value: "退金币",
+ label: "退金币",
},
];
@@ -98,8 +87,8 @@ const get = async function (val) {
};
// 重置
const reset = function () {
- rechargeVo.value.activityId = "";
- rechargeVo.value.payWay = "";
+ rechargeVo.value.goods = "";
+ rechargeVo.value.consumeType = "";
rechargeVo.value.area = "";
rechargeVo.value.startDate = "";
rechargeVo.value.endDate = "";
@@ -239,6 +228,30 @@ onMounted(async function () {
getActivity();
await getArea();
});
+//删除气泡
+const delObj = ref({});
+const del = function (row) {
+ delObj.value.detailId = row.detailId;
+ console.log("delObj", delObj.value);
+};
+// 删除按钮的气泡弹出框确认按钮
+const delConfirm = async function () {
+ try {
+ console.log("delObj", delObj.value);
+ // 发送POST请求
+ const result = await axios.post(
+ "http://192.168.8.174:10040/refund/softDelete",
+ delObj.value
+ );
+ // 将响应结果存储到响应式数据中
+ console.log("请求成功", result);
+ // 刷新表格数据
+ get();
+ } catch (error) {
+ console.log("请求失败", error);
+ // 在这里可以处理错误逻辑,比如显示错误提示等
+ }
+};
@@ -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") }}
+
+
取消
-
+
确定