|
|
@ -152,12 +152,31 @@ const rules = reactive({ |
|
|
|
] |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 取消按钮 |
|
|
|
const cancelExceptJwcode = function () { |
|
|
|
addRefund.value = { |
|
|
|
jwcode: addRefund.value.jwcode, // 保留精网号 |
|
|
|
goodsName: '', |
|
|
|
refundType: '', |
|
|
|
refundModel: 0, |
|
|
|
permanentGold: '', |
|
|
|
freeGold: '', |
|
|
|
taskGold: '', |
|
|
|
sumGold: 0, |
|
|
|
remark: '', |
|
|
|
adminId: adminData.value.id |
|
|
|
} |
|
|
|
addRe.value.typeR = '0' |
|
|
|
} |
|
|
|
|
|
|
|
// 查找客户信息的方法 |
|
|
|
const user = ref({ |
|
|
|
firstRechargeTime: '' |
|
|
|
}) |
|
|
|
const getUser = async function (jwcode) { |
|
|
|
trimJwCode(); |
|
|
|
cancelExceptJwcode(); |
|
|
|
try { |
|
|
|
// 发送POST请求 |
|
|
|
const result = await API({ |
|
|
@ -190,7 +209,7 @@ const getUser = async function (jwcode) { |
|
|
|
} catch (error) { |
|
|
|
console.log("请求失败", error); |
|
|
|
ElMessage.error("查询失败,请检查精网号是否正确"); |
|
|
|
// 在这里可以处理错误逻辑,比如显示错误提示等 |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -222,10 +241,14 @@ const getRefundTypes = async function () { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 根据精网号查询商品 |
|
|
|
const goodsName = ref([]) |
|
|
|
const getGoods = async function (jwcode) { |
|
|
|
trimJwCode(); |
|
|
|
|
|
|
|
// 只有精网号存在时才发送请求 |
|
|
|
if (!addRefund.value.jwcode) { |
|
|
|
goodsName.value = []; // 清空商品数据 |
|
|
@ -234,7 +257,6 @@ const getGoods = async function (jwcode) { |
|
|
|
try { |
|
|
|
// 发送POST请求 |
|
|
|
const result = await API({ |
|
|
|
// url: 'http://39.101.133.168:8828/live_mall/api/product/all', //需要接口 |
|
|
|
url: '/refund/selectGoods', |
|
|
|
data: { |
|
|
|
jwcode: addRefund.value.jwcode |
|
|
|