From c48b1c7796e3267baa29458aef4d24b42a24f645 Mon Sep 17 00:00:00 2001 From: khalil <842328916@qq.com> Date: Thu, 11 Sep 2025 18:56:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=A0=E9=80=81=E9=92=BB=E7=9F=B3=E6=B0=B4?= =?UTF-8?q?=E6=99=B6-=E6=8F=90=E5=8F=96=E5=85=AC=E5=85=B1=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/record/OfficicalGoldView.vue | 39 ++++---------------------- 1 file changed, 5 insertions(+), 34 deletions(-) diff --git a/src/views/record/OfficicalGoldView.vue b/src/views/record/OfficicalGoldView.vue index 498c84a..c158123 100644 --- a/src/views/record/OfficicalGoldView.vue +++ b/src/views/record/OfficicalGoldView.vue @@ -308,25 +308,21 @@ export default { 'ernos': erBanNos, 'type': type, 'num': num, - 'actualAmount': actualAmount, 'remark': remark, 'busType': busType }; - if (type == 'CLEAR_USER_GOLD') { - clearUserGold(data); - } else { - give(data); - } + operate(data); }); - function give (data) { + function operate (data) { isGiveBol = true; if (confirm('确认吗?')) { $("#tipMsg").text("处理中,请稍后..."); $("#tipModal").modal('show'); + $.ajax({ type: "post", - url: "/admin/goldcoin/give", + url: "/admin/goldcoin/operate", data: data, dataType: "json", success: function (json) { @@ -388,32 +384,7 @@ export default { } } - function clearUserGold (data) { - isGiveBol = true; - if (confirm('确认吗?')) { - $("#tipMsg").text("处理中,请稍后..."); - $("#tipModal").modal('show'); - $.ajax({ - type: "post", - url: "/admin/goldcoin/clearUserGold", - data: { erBanNos: data.ernos, num: data.num }, - dataType: "json", - success: function (json) { - if (json.code == 200) { - $("#tipMsg").text("处理成功"); - $('#btnScan').click(); - } else { - $("#tipMsg").text("处理出错,errorCode: " + json.message); - } - isGiveBol = false; - }, - error: function (json) { - $("#tipMsg").text("处理出错,网络出错"); - isGiveBol = false; - } - }); - } - } + function trimTextArea (str) { return str.split('\n').map((line) => line.trim())