|
|
|
@ -250,6 +250,30 @@ |
|
|
|
<el-form-item label="产品名称"> |
|
|
|
<el-select disabled="true" v-model="auditFormData.goodsName" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="!isGold" label="产品数量"> |
|
|
|
<div style="display: flex;"> |
|
|
|
<el-input disabled="true" style="padding-right: 30px; flex: 3;" v-model="auditFormData.goodNum" |
|
|
|
placeholder="请输入产品数量" /> |
|
|
|
<CurrencySelect disabled="true" v-model="auditFormData.numUnit" :items="numUnitList" |
|
|
|
style="flex: 1.5;" placeholder="单位" @change="handleCurrencyChange" /> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
<div v-show="isGold" style="margin-bottom: 15px; display: flex;"> |
|
|
|
<div style=" display: flex; "> |
|
|
|
<span |
|
|
|
style="color: #999999; display: flex; white-space: nowrap;align-items: center;">永久金币:</span> |
|
|
|
<el-input disabled="true" |
|
|
|
style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;" |
|
|
|
v-model="auditFormData.permanentGold" /> |
|
|
|
</div> |
|
|
|
<div style="padding-right: 5px; display: flex;"> |
|
|
|
<span |
|
|
|
style="color: #999999; display: flex; white-space: nowrap;align-items: center;">免费金币:</span> |
|
|
|
<el-input disabled="true" |
|
|
|
style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;" |
|
|
|
v-model="auditFormData.freeGold" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-form-item label="付款币种"> |
|
|
|
<el-select disabled="true" v-model="auditFormData.paymentCurrency" placeholder="请选择付款币种" |
|
|
|
@change="handleCurrencyChange" /> |
|
|
|
@ -333,10 +357,11 @@ |
|
|
|
</el-form-item> |
|
|
|
<!-- 金币产品特殊显示 --> |
|
|
|
<el-form-item v-show="!isEditGold" label="产品数量"> |
|
|
|
<div style="padding-right: 50px; display: flex;"> |
|
|
|
<el-input disabled="true" style="padding-right: 10px;" v-model="editFormData.goodNum" |
|
|
|
placeholder="产品数量" /> |
|
|
|
<span style="color: #999999;">个</span> |
|
|
|
<div style="display: flex;"> |
|
|
|
<el-input disabled="true" style="padding-right: 30px; flex: 3;" |
|
|
|
v-model="editFormData.goodNum" placeholder="请输入产品数量" /> |
|
|
|
<CurrencySelect disabled="true" v-model="editFormData.numUnit" :items="numUnitList" |
|
|
|
style="flex: 1.5;" placeholder="单位" @change="handleCurrencyChange" /> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
<div v-show="isEditGold" style="margin-bottom: 15px; display: flex;"> |
|
|
|
@ -403,10 +428,10 @@ |
|
|
|
<CurrencySelect v-model="editFormData.receivedCurrency" :items="customOptions" |
|
|
|
placeholder="请选择到账货币" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="到账金额" prop="receivedAmount" required> |
|
|
|
<el-form-item label="到账金额" prop="receivedAmount"> |
|
|
|
<el-input v-model="editFormData.receivedAmount" placeholder="请输入到账金额" type="number" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="手续费" prop="handlingCharge" required> |
|
|
|
<el-form-item label="手续费" prop="handlingCharge"> |
|
|
|
<el-input v-model="editFormData.handlingCharge" placeholder="请输入手续费" type="number" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="到账时间" required> |
|
|
|
@ -452,8 +477,10 @@ |
|
|
|
</div> |
|
|
|
<div v-show="!isRefundGold" class="add-item"> |
|
|
|
<el-text style="width:4vw;">产品数量</el-text> |
|
|
|
<el-input style="padding-right: 10px; width:10.5vw;" v-model="refundFormData.goodNum" |
|
|
|
<el-input style="padding-right: 10px; width:6.5vw;" v-model="refundFormData.goodNum" |
|
|
|
placeholder="请输入产品数量" disabled /> |
|
|
|
<CurrencySelect disabled="true" v-model="refundFormData.numUnit" :items="numUnitList" |
|
|
|
style=" width: 3.5vw;" placeholder="单位" @change="handleCurrencyChange" /> |
|
|
|
</div> |
|
|
|
<div v-show="isRefundGold" style="display: flex; margin-bottom: 10px;"> |
|
|
|
<div style=" display: flex; align-items: center;justify-content: center; "> |
|
|
|
@ -462,8 +489,7 @@ |
|
|
|
v-model="refundFormData.permanentGold" disabled /> |
|
|
|
</div> |
|
|
|
<div style=" display: flex; align-items: center;justify-content: center; "> |
|
|
|
<span |
|
|
|
style="color: #999999; white-space: nowrap;">免费金币:</span> |
|
|
|
<span style="color: #999999; white-space: nowrap;">免费金币:</span> |
|
|
|
<el-input style="padding-right: 10px; height: 30px; width: 70px;" |
|
|
|
v-model="refundFormData.freeGold" disabled /> |
|
|
|
</div> |
|
|
|
@ -513,6 +539,18 @@ |
|
|
|
<el-radio value="1">部分退款</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</div> |
|
|
|
<div v-show="refundFormData.refundModel == '1'" style="display: flex; margin-bottom: 10px;"> |
|
|
|
<div style=" display: flex; align-items: center;justify-content: center; "> |
|
|
|
<span style="color: #999999; white-space: nowrap;">永久金币:</span> |
|
|
|
<el-input style="padding-right: 10px; height: 30px; width: 70px;" |
|
|
|
v-model="refundCoinData.permanentGold" dsabled /> |
|
|
|
</div> |
|
|
|
<div style=" display: flex; align-items: center;justify-content: center; "> |
|
|
|
<span style="color: #999999; white-space: nowrap;">免费金币:</span> |
|
|
|
<el-input style="padding-right: 10px; height: 30px; width: 70px;" |
|
|
|
v-model="refundCoinData.freeGold" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="add-item"> |
|
|
|
<el-text style="width:4vw;">退款理由</el-text> |
|
|
|
<el-input v-model="refundFormData.refundReason" style="width:10vw;" :rows="5" maxlength="150" |
|
|
|
@ -520,7 +558,7 @@ |
|
|
|
</div> |
|
|
|
<div>ps:请在退款理由表明用户的退款需求。</div> |
|
|
|
<div style="display:flex;justify-content: center;margin-top: 5vh;"> |
|
|
|
<el-button type="default" @click="">重置</el-button> |
|
|
|
<el-button type="default" @click="resetRefund">重置</el-button> |
|
|
|
<el-button type="primary" @click="throttledsubmitRefund">提交</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -612,8 +650,16 @@ const openRefundDialog = () => { |
|
|
|
const closeRefundForm = () => { |
|
|
|
refundDialog.value = false |
|
|
|
refundFormData.value = {} |
|
|
|
refundCoinData.value = { |
|
|
|
permanentGold: 0, |
|
|
|
freeGold: 0 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const refundCoinData = ref({ |
|
|
|
permanentGold: 0, |
|
|
|
freeGold: 0 |
|
|
|
}) |
|
|
|
const isRefundGold = ref(false) |
|
|
|
const ifRefundGold = () => { |
|
|
|
if (refundFormData.value.goodsName === '金币充值') { |
|
|
|
@ -713,11 +759,30 @@ const getlist = async () => { |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
//重置退款 |
|
|
|
const resetRefund = () => { |
|
|
|
refundFormData.value.refundModel = '' |
|
|
|
refundFormData.value.refundReason = '' |
|
|
|
refundCoinData.value = { |
|
|
|
permanentGold: 0, |
|
|
|
freeGold: 0 |
|
|
|
} |
|
|
|
} |
|
|
|
//提交退款 |
|
|
|
const submitRefund = async () => { |
|
|
|
try { |
|
|
|
if (refundFormData.value.goodsName != '金币充值') { |
|
|
|
|
|
|
|
return ElMessage.error('线上数据仅支持金币充值退款'); |
|
|
|
} |
|
|
|
if (!refundFormData.value.refundModel) { |
|
|
|
return ElMessage.error('请选择退款方式'); |
|
|
|
} |
|
|
|
if (!refundFormData.value.refundReason) { |
|
|
|
return ElMessage.error('请输入退款原因'); |
|
|
|
} |
|
|
|
const result = await request({ |
|
|
|
url: '/Money/add', |
|
|
|
url: '/Money/addOnline', |
|
|
|
data: { |
|
|
|
jwcode: refundFormData.value.jwcode, // 精网号(必填) |
|
|
|
name: refundFormData.value.name, // 姓名(必填) |
|
|
|
@ -743,8 +808,8 @@ const submitRefund = async () => { |
|
|
|
refundModel: refundFormData.value.refundModel, // 退款方式:0-全额,1-部分(可选) |
|
|
|
id: refundFormData.value.id, //订单id |
|
|
|
orderCode: refundFormData.value.orderCode, |
|
|
|
permanentGold: (refundFormData.value.permanentGold) * 100 || 0, |
|
|
|
freeGold: (refundFormData.value.freeGold) * 100 || 0 |
|
|
|
permanentGold: (refundCoinData.value.permanentGold) * 100 || 0, |
|
|
|
freeGold: (refundCoinData.value.freeGold) * 100 || 0 |
|
|
|
} |
|
|
|
}) |
|
|
|
if (result.code == 200) { |
|
|
|
@ -784,6 +849,9 @@ const navigateTo = async (tab) => { |
|
|
|
// 打开审核弹窗 |
|
|
|
const openAuditForm = (row) => { |
|
|
|
auditFormData.value = { ...row, market: row.marketName }; |
|
|
|
ifGold(auditFormData.value) |
|
|
|
console.log('isGold', isGold.value); |
|
|
|
|
|
|
|
auditFormisible.value = true; |
|
|
|
}; |
|
|
|
|
|
|
|
@ -850,6 +918,17 @@ const handelAuditReject = async () => { |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
//判断产品类型 |
|
|
|
const isGold = ref(false) |
|
|
|
const ifGold = (data) => { |
|
|
|
console.log('data', data); |
|
|
|
if (data.goodsName === '金币充值') { |
|
|
|
isGold.value = true |
|
|
|
} else { |
|
|
|
isGold.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 审核按钮倒计时(防止误操作) |
|
|
|
watch(auditFormisible, (val) => { |
|
|
|
if (val) { |
|
|
|
@ -888,6 +967,7 @@ const openEditForm = (row) => { |
|
|
|
const closeEditForm = () => { |
|
|
|
editFormisible.value = false; |
|
|
|
editFormData.value = {}; |
|
|
|
editFormRef.value.resetFields(); |
|
|
|
}; |
|
|
|
|
|
|
|
// 提交编辑(补充手续费) |
|
|
|
@ -1022,7 +1102,9 @@ const getActivitys = async () => { |
|
|
|
// 2.8 节流函数(防止重复提交) |
|
|
|
const throttledhandelAuditReject = _.throttle(handelAuditReject, 3000, { trailing: false }); |
|
|
|
const throttledsubmitEditForm = _.throttle(submitEditForm, 3000, { trailing: false }); |
|
|
|
|
|
|
|
const throttledsubmitRefund = _.throttle(submitRefund, 5000, { |
|
|
|
trailing: false |
|
|
|
}) |
|
|
|
// 2.9 页面初始化 |
|
|
|
onMounted(async () => { |
|
|
|
await getAdminData(); |
|
|
|
|