|
|
@ -7,7 +7,7 @@ import axios from "axios"; |
|
|
|
import { ElMessageBox } from "element-plus"; |
|
|
|
import API from "../../api/index.js"; |
|
|
|
import moment from "moment"; |
|
|
|
import _ from 'lodash'; |
|
|
|
import _ from "lodash"; |
|
|
|
|
|
|
|
const addRe = ref({ |
|
|
|
typeR: "0", |
|
|
@ -16,10 +16,7 @@ const addRe = ref({ |
|
|
|
const adminData = ref({}); |
|
|
|
const getAdminData = async function () { |
|
|
|
try { |
|
|
|
const result = await API.post( |
|
|
|
"/hwjb/admin/userinfo", |
|
|
|
{} |
|
|
|
); |
|
|
|
const result = await API.post("/hwjb/admin/userinfo", {}); |
|
|
|
adminData.value = result; |
|
|
|
addRefund.value.adminId = adminData.value.adminId; |
|
|
|
console.log("请求成功", result); |
|
|
@ -55,10 +52,7 @@ const cancel = function () { |
|
|
|
const add = async function () { |
|
|
|
try { |
|
|
|
// 发送POST请求 |
|
|
|
const result = await API.post( |
|
|
|
"/hwjb/refund/add", |
|
|
|
addRefund.value |
|
|
|
); |
|
|
|
const result = await API.post("/hwjb/refund/add", addRefund.value); |
|
|
|
if (result.code === 0) { |
|
|
|
ElMessage.error(result.msg); |
|
|
|
return; |
|
|
@ -203,7 +197,7 @@ const getGoods = async function (jwcode) { |
|
|
|
try { |
|
|
|
// 发送POST请求 |
|
|
|
const result = await API.post( |
|
|
|
"/hwjb/consume/getDeatil/" + addRefund.value.jwcode, |
|
|
|
"hwjb/consume/getDeatil/" + addRefund.value.jwcode, |
|
|
|
{} |
|
|
|
); |
|
|
|
if (result.code === 0) { |
|
|
@ -249,7 +243,7 @@ const getProductByOrderCode = async function (item) { |
|
|
|
"/hwjb/refund/searchByOrderCode?orderCode=" + item, |
|
|
|
{} |
|
|
|
); |
|
|
|
addRefund.value.contactId = result.data.detailId; |
|
|
|
addRefund.value.contactId = result.data.detailyId; |
|
|
|
addRefund.value.refundGoods = result.data.productName; |
|
|
|
addRefund.value.orderCode = result.data.orderCode; |
|
|
|
addRefund.value.taskCoin = result.data.taskCoin * -1; |
|
|
|