|
|
@ -200,6 +200,10 @@ |
|
|
v-else-if="activeTab == 'pass' && !(scope.row.status == 6 || scope.row.status == 4)" |
|
|
v-else-if="activeTab == 'pass' && !(scope.row.status == 6 || scope.row.status == 4)" |
|
|
style="color: #2741DE;" @click="openEditForm(scope.row)">编辑 |
|
|
style="color: #2741DE;" @click="openEditForm(scope.row)">编辑 |
|
|
</el-link> |
|
|
</el-link> |
|
|
|
|
|
<el-link |
|
|
|
|
|
v-else-if="activeTab == 'done' && scope.row.status == 4 && startsWith(scope.row.orderCode, 'GOLDCOIN')" |
|
|
|
|
|
style="color: #2741DE;" @click="openRefundConfirm">退款 |
|
|
|
|
|
</el-link> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
@ -212,6 +216,21 @@ |
|
|
</div> |
|
|
</div> |
|
|
</el-card> |
|
|
</el-card> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<!-- 退款确认弹窗 --> |
|
|
|
|
|
<div class="recallDialog" v-show="refundConfirmDialog"> |
|
|
|
|
|
<div class="close"> |
|
|
|
|
|
<button @click="closeConfirmRefund" class="Btn">关闭</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="text"> |
|
|
|
|
|
<text class="txt">{{ textContent }}</text> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="cancle"> |
|
|
|
|
|
<button @click="closeConfirmRefund" class="Btn">取消</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="confirm"> |
|
|
|
|
|
<button @click="openRefundDialog" class="Btn">确定</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- 仅保留地区财务相关弹窗:审核弹窗、编辑手续费弹窗 --> |
|
|
<!-- 仅保留地区财务相关弹窗:审核弹窗、编辑手续费弹窗 --> |
|
|
<!-- 审核弹窗 --> |
|
|
<!-- 审核弹窗 --> |
|
|
@ -406,6 +425,110 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 新增退款 --> |
|
|
|
|
|
<el-dialog v-model="refundDialog" title="退款" class="refundDialog" overflow draggable style="width: 40vw;" |
|
|
|
|
|
:before-close="closeRefundForm"> |
|
|
|
|
|
<div style="display: flex;"> |
|
|
|
|
|
<div class="left"> |
|
|
|
|
|
<div class="add-item"> |
|
|
|
|
|
<el-text style="width:4vw;">精网号</el-text> |
|
|
|
|
|
<el-input v-model="refundFormData.jwcode" style="width:10vw;" disabled /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="add-item"> |
|
|
|
|
|
<el-text style="width:4vw;">客户姓名</el-text> |
|
|
|
|
|
<el-input v-model="refundFormData.name" style="width:10vw;" disabled /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="add-item"> |
|
|
|
|
|
<el-text style="width:4vw;">所属地区</el-text> |
|
|
|
|
|
<el-input v-model="refundFormData.marketName" style="width:10vw;" disabled /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="add-item"> |
|
|
|
|
|
<el-text style="width:4vw;">活动名称</el-text> |
|
|
|
|
|
<el-input v-model="refundFormData.activity" style="width:10vw;" disabled /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="add-item"> |
|
|
|
|
|
<el-text style="width:4vw;">产品名称</el-text> |
|
|
|
|
|
<el-input v-model="refundFormData.goodsName" style="width:10vw;" disabled /> |
|
|
|
|
|
</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" |
|
|
|
|
|
placeholder="请输入产品数量" disabled /> |
|
|
|
|
|
<span style="color: #999999;">{{ productUnit }}</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div v-show="isRefundGold" style="margin-bottom: 15px; "> |
|
|
|
|
|
<div style=" display: flex; "> |
|
|
|
|
|
<span |
|
|
|
|
|
style="color: #999999; display: flex; white-space: nowrap;align-items: center;">永久金币:</span> |
|
|
|
|
|
<el-input style="padding-right: 10px; height: 30px; width: 110px; margin-bottom: 10px" |
|
|
|
|
|
v-model="refundFormData.permanentGold" disabled /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div style="padding-right: 5px; display: flex;"> |
|
|
|
|
|
<span |
|
|
|
|
|
style="color: #999999; display: flex; white-space: nowrap;align-items: center;">免费金币:</span> |
|
|
|
|
|
<el-input style="padding-right: 10px; height: 30px; width: 110px;" |
|
|
|
|
|
v-model="refundFormData.freeGold" disabled /> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="add-item"> |
|
|
|
|
|
<el-text style="width:4vw;">付款币种</el-text> |
|
|
|
|
|
<el-input v-model="refundFormData.paymentCurrency" style="width:10vw;" disabled /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="add-item"> |
|
|
|
|
|
<el-text style="width:4vw;">付款金额</el-text> |
|
|
|
|
|
<el-input v-model="refundFormData.paymentAmount" style="width:10vw;" disabled /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="add-item"> |
|
|
|
|
|
<el-text style="width:4vw;">支付方式</el-text> |
|
|
|
|
|
<el-input v-model="refundFormData.payType" style="width:10vw;" disabled /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="add-item"> |
|
|
|
|
|
<el-text style="width:4vw;">付款时间</el-text> |
|
|
|
|
|
<el-date-picker v-model="refundFormData.payTime" type="datetime" style="width:10vw;" disabled /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="add-item"> |
|
|
|
|
|
<el-text style="width:4vw;" size="small">转账凭证</el-text> |
|
|
|
|
|
<el-form-item :rules="{ required: true, message: '请上传图片', trigger: 'change' }"> |
|
|
|
|
|
<el-upload ref="uploadRef" :auto-upload="false" list-type="picture-card" |
|
|
|
|
|
:show-file-list="false"> |
|
|
|
|
|
<template #default> |
|
|
|
|
|
<img v-if="refundFormData.voucher" :src="refundFormData.voucher" |
|
|
|
|
|
style="width: 100%; height: 100%; object-fit: cover;"> |
|
|
|
|
|
<el-icon v-else> |
|
|
|
|
|
<Plus /> |
|
|
|
|
|
</el-icon> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-upload> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="add-item"> |
|
|
|
|
|
<el-text style="width:4vw;">备注</el-text> |
|
|
|
|
|
<el-input v-model="refundFormData.remark" style="width:10vw;" :rows="2" type="textarea" |
|
|
|
|
|
maxLength="100" disabled show-word-limit /> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="right"> |
|
|
|
|
|
<div class="add-item"> |
|
|
|
|
|
<el-text style="width:4vw;">退款模式</el-text> |
|
|
|
|
|
<el-radio-group v-model="refundFormData.refundModel"> |
|
|
|
|
|
<el-radio value="0">全部退款</el-radio> |
|
|
|
|
|
<el-radio value="1">部分退款</el-radio> |
|
|
|
|
|
</el-radio-group> |
|
|
|
|
|
</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" |
|
|
|
|
|
show-word-limit type="textarea" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div>ps:请在退款理由表明用户的退款需求。</div> |
|
|
|
|
|
<div style="display:flex;justify-content: center;margin-top: 5vh;"> |
|
|
|
|
|
<el-button type="default" @click="">重置</el-button> |
|
|
|
|
|
<el-button type="primary" @click="throttledsubmitRefund">提交</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -419,6 +542,7 @@ import request from '@/util/http.js'; |
|
|
import moment from 'moment'; |
|
|
import moment from 'moment'; |
|
|
import _ from 'lodash'; |
|
|
import _ from 'lodash'; |
|
|
import { Plus } from '@element-plus/icons-vue'; |
|
|
import { Plus } from '@element-plus/icons-vue'; |
|
|
|
|
|
import { startsWith } from './utils/util.js' |
|
|
|
|
|
|
|
|
// 地区财务专属组件 |
|
|
// 地区财务专属组件 |
|
|
import CurrencySelect from '@/components/MoneyManage/CurrencySelect.vue'; |
|
|
import CurrencySelect from '@/components/MoneyManage/CurrencySelect.vue'; |
|
|
@ -474,7 +598,26 @@ const tooltipContent = ref(''); |
|
|
const tooltipLeft = ref(0); |
|
|
const tooltipLeft = ref(0); |
|
|
const tooltipTop = ref(0); |
|
|
const tooltipTop = ref(0); |
|
|
|
|
|
|
|
|
// 基础数据(地区财务专用) |
|
|
|
|
|
|
|
|
// 退款确认弹窗 |
|
|
|
|
|
const refundConfirmDialog = ref(false) |
|
|
|
|
|
const textContent = ref('') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//退款弹窗 |
|
|
|
|
|
const refundDialog = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const openRefundDialog = () => { |
|
|
|
|
|
refundDialog.value = true |
|
|
|
|
|
closeConfirmRefund() |
|
|
|
|
|
} |
|
|
|
|
|
const closeRefundForm = () => { |
|
|
|
|
|
refundDialog.value = false |
|
|
|
|
|
refundFormData.value = {} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 基础数据 |
|
|
const adminData = ref({}); |
|
|
const adminData = ref({}); |
|
|
const activityList = ref([]); |
|
|
const activityList = ref([]); |
|
|
const customOptions = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)']); |
|
|
const customOptions = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)']); |
|
|
@ -482,6 +625,19 @@ const paytypeList = ["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88- |
|
|
const paytypeOptions = ref([...paytypeList]); |
|
|
const paytypeOptions = ref([...paytypeList]); |
|
|
|
|
|
|
|
|
// ===================== 2. 核心功能函数(仅地区财务) ===================== |
|
|
// ===================== 2. 核心功能函数(仅地区财务) ===================== |
|
|
|
|
|
|
|
|
|
|
|
//确认退款弹窗 |
|
|
|
|
|
const openRefundConfirm = () => { |
|
|
|
|
|
textContent.value = '将要对该订单退款!' |
|
|
|
|
|
refundConfirmDialog.value = true |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const closeConfirmRefund = () => { |
|
|
|
|
|
refundConfirmDialog.value = false |
|
|
|
|
|
textContent.value = '' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 2.1 数据加载:获取地区财务订单列表 |
|
|
// 2.1 数据加载:获取地区财务订单列表 |
|
|
const getlist = async () => { |
|
|
const getlist = async () => { |
|
|
try { |
|
|
try { |
|
|
@ -544,6 +700,54 @@ const getlist = async () => { |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
//提交退款 |
|
|
|
|
|
const submitRefund = async () => { |
|
|
|
|
|
try { |
|
|
|
|
|
const result = await request({ |
|
|
|
|
|
url: '/Money/add', |
|
|
|
|
|
data: { |
|
|
|
|
|
jwcode: refundFormData.value.jwcode, // 精网号(必填) |
|
|
|
|
|
name: refundFormData.value.name, // 姓名(必填) |
|
|
|
|
|
market: refundFormData.value.marketName, // 所属地区(必填) |
|
|
|
|
|
activity: refundFormData.value.activity, // 活动名称(可选) |
|
|
|
|
|
bankCode: refundFormData.value.bankCode, // 银行流水订单号(必填) |
|
|
|
|
|
goodsName: refundFormData.value.goodsName, // 商品名称(必填) |
|
|
|
|
|
goodNum: refundFormData.value.goodNum, // 商品数量(必填,默认0) |
|
|
|
|
|
paymentCurrency: refundFormData.value.paymentCurrency, // 付款币种(必填) |
|
|
|
|
|
paymentAmount: (refundFormData.value.paymentAmount) * 100, // 付款金额(必填) |
|
|
|
|
|
receivedCurrency: refundFormData.value.receivedCurrency, // 到账币种(必填) |
|
|
|
|
|
receivedAmount: (refundFormData.value.receivedAmount) * 100, // 到账金额(必填) |
|
|
|
|
|
handlingCharge: (refundFormData.value.handlingCharge) * 100, // 手续费(可选) |
|
|
|
|
|
receivedMarket: refundFormData.value.receivedMarket, // 到账地区(可选) |
|
|
|
|
|
payType: refundFormData.value.payType, // 支付方式(必填) |
|
|
|
|
|
payTime: refundFormData.value.payTime, // 付款时间,格式:yyyy-MM-dd HH:mm:ss(可选) |
|
|
|
|
|
receivedTime: refundFormData.value.receivedTime, // 到账时间,格式:yyyy-MM-dd HH:mm:ss(可选) |
|
|
|
|
|
areaServise: adminData.value.adminName, // 提交人(可选) |
|
|
|
|
|
submitterId: adminData.value.id, |
|
|
|
|
|
voucher: refundFormData.value.voucher, // 转账凭证URL(可选) |
|
|
|
|
|
remark: refundFormData.value.remark, // 备注信息(可选) |
|
|
|
|
|
refundReason: refundFormData.value.refundReason, // 退款备注-客服填写(可选) |
|
|
|
|
|
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 |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
if (result.code == 200) { |
|
|
|
|
|
ElMessage.success('新增退款成功') |
|
|
|
|
|
getlist() |
|
|
|
|
|
closeRefundForm() |
|
|
|
|
|
} else { |
|
|
|
|
|
ElMessage.error(result.msg) |
|
|
|
|
|
getlist() |
|
|
|
|
|
} |
|
|
|
|
|
console.log('返回参数:', result); |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
console.log(error); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 2.2 搜索与重置 |
|
|
// 2.2 搜索与重置 |
|
|
const search = () => { |
|
|
const search = () => { |
|
|
getlist(); |
|
|
getlist(); |
|
|
@ -1128,4 +1332,80 @@ const handlePagination = (type, val) => { |
|
|
overflow-y: auto; |
|
|
overflow-y: auto; |
|
|
white-space: pre-wrap; |
|
|
white-space: pre-wrap; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.recallDialog { |
|
|
|
|
|
//撤回弹窗提示 |
|
|
|
|
|
height: 392px; |
|
|
|
|
|
width: 700px; |
|
|
|
|
|
background-image: url('/src/assets/收款明细撤回背景.png'); |
|
|
|
|
|
position: fixed; // 固定定位,相对于浏览器窗口 |
|
|
|
|
|
top: 50%; // 距离顶部50% |
|
|
|
|
|
left: 50%; // 距离左侧50% |
|
|
|
|
|
transform: translate(-50%, -50%); // 向左、向上平移自身宽高的50%,实现居中 |
|
|
|
|
|
z-index: 1000; // 确保在其他元素上层显示 |
|
|
|
|
|
|
|
|
|
|
|
.close { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
left: 625px; |
|
|
|
|
|
top: 20px; |
|
|
|
|
|
height: 38px; |
|
|
|
|
|
width: 38px; |
|
|
|
|
|
opacity: 0; |
|
|
|
|
|
|
|
|
|
|
|
.Btn { |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
border-radius: 10px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.text { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
left: 185px; |
|
|
|
|
|
top: 190px; |
|
|
|
|
|
height: 67px; |
|
|
|
|
|
width: 500px; |
|
|
|
|
|
|
|
|
|
|
|
.txt { |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
color: #001a42; |
|
|
|
|
|
font-family: "PingFang SC"; |
|
|
|
|
|
font-size: 48px; |
|
|
|
|
|
font-style: normal; |
|
|
|
|
|
font-weight: 900; |
|
|
|
|
|
line-height: normal; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.cancle { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
left: 185px; |
|
|
|
|
|
top: 304px; |
|
|
|
|
|
height: 55px; |
|
|
|
|
|
width: 150px; |
|
|
|
|
|
opacity: 0; |
|
|
|
|
|
|
|
|
|
|
|
.Btn { |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
border-radius: 20px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.confirm { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
left: 375px; |
|
|
|
|
|
top: 304px; |
|
|
|
|
|
height: 55px; |
|
|
|
|
|
width: 150px; |
|
|
|
|
|
opacity: 0; |
|
|
|
|
|
|
|
|
|
|
|
.Btn { |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
border-radius: 20px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |