diff --git a/vue/gold-system/src/views/managerecharge/rate.vue b/vue/gold-system/src/views/managerecharge/rate.vue index 35367f8..bc34a75 100644 --- a/vue/gold-system/src/views/managerecharge/rate.vue +++ b/vue/gold-system/src/views/managerecharge/rate.vue @@ -236,6 +236,14 @@ function formatDate(value) { const seconds = date.getSeconds().toString().padStart(2, "0"); 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 () { @@ -378,25 +386,32 @@ const checkNumber = function () { :height="tableHeight" style="width: 100%" > - - + + {{ scope.row.exchangeRate }} :1新币 - + {{ formatDate(scope.row.createTime) }} - + + + + + {{ formatDateTwe(scope.row.startTime) }} + --- + {{ formatDateTwe(scope.row.endTime) }} + - - + { - getActivityById(row); -}; +function handleActivityChange(value) { + // 在这里执行你的逻辑,例如获取选中的值 + console.log("选中的值:", value); + getActivityById(value); + console.log("看看", addRecharge.value); +} const calculatedFreeGold = computed(() => { if (!addRecharge.value.activityId == 0) { const paidGold = Number(addRecharge.value.paidGold) || 0; const activityId = Number(addRecharge.value.rechargeRatio) || 1; // 避免除以0 + console.log("看看有没拿到", addRecharge.value); return Math.ceil(paidGold / activityId); } }); @@ -479,6 +483,7 @@ const addLine = function () { const handleSelectionChangebatch = function (val) { console.log("val===", val); batchDelObj.value = val; + console.log("大傻春"); }; // const batchDel = function () { @@ -665,6 +670,7 @@ const batchAdd = function () { v-model="addRecharge.activityId" placeholder="请选择" style="width: 300px" + @change="handleActivityChange" > + >
{{ scope.row.exchangeRate }} :1新币