Browse Source

对接退款

zhangrenyuan/feature-20251104133449-现金管理二期
ZhangYong 3 weeks ago
parent
commit
8fd2d3fb36
  1. 47
      src/views/moneyManage/receiveDetail/receiveFinance.vue
  2. 34
      src/views/moneyManage/receiveDetail/receiveService.vue

47
src/views/moneyManage/receiveDetail/receiveFinance.vue

@ -162,8 +162,8 @@
v-if="activeTab == 'pass' || activeTab == 'done'" width="180px" /> v-if="activeTab == 'pass' || activeTab == 'done'" width="180px" />
<el-table-column prop="remark" label="备注" v-if="activeTab != 'reject'" width="150px" <el-table-column prop="remark" label="备注" v-if="activeTab != 'reject'" width="150px"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="status" fixed="right" label="订单状态" v-if="activeTab == 'done'" width="150px"
show-overflow-tooltip>
<el-table-column prop="status" fixed="right" label="订单状态" v-if="activeTab == 'done'"
width="150px" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<span style="color: rgb(242, 84, 83);" v-if="scope.row.status == 6">退款</span> <span style="color: rgb(242, 84, 83);" v-if="scope.row.status == 6">退款</span>
<span style="color: rgb(127,204,133);" v-else>正常</span> <span style="color: rgb(127,204,133);" v-else>正常</span>
@ -543,12 +543,12 @@
<div style=" display: flex; align-items: center;justify-content: center; "> <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;" <el-input style="padding-right: 10px; height: 30px; width: 70px;"
v-model="refundCoinData.permanentGold" dsabled />
v-model="refundFormData.partRefundGold" dsabled />
</div> </div>
<div style=" display: flex; align-items: center;justify-content: center; "> <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;" <el-input style="padding-right: 10px; height: 30px; width: 70px;"
v-model="refundCoinData.freeGold" />
v-model="refundFormData.partRefundFree" />
</div> </div>
</div> </div>
<div class="add-item"> <div class="add-item">
@ -650,16 +650,8 @@ const openRefundDialog = () => {
const closeRefundForm = () => { const closeRefundForm = () => {
refundDialog.value = false refundDialog.value = false
refundFormData.value = {} refundFormData.value = {}
refundCoinData.value = {
permanentGold: 0,
freeGold: 0
}
} }
const refundCoinData = ref({
permanentGold: 0,
freeGold: 0
})
const isRefundGold = ref(false) const isRefundGold = ref(false)
const ifRefundGold = () => { const ifRefundGold = () => {
if (refundFormData.value.goodsName === '金币充值') { if (refundFormData.value.goodsName === '金币充值') {
@ -763,10 +755,6 @@ const getlist = async () => {
const resetRefund = () => { const resetRefund = () => {
refundFormData.value.refundModel = '' refundFormData.value.refundModel = ''
refundFormData.value.refundReason = '' refundFormData.value.refundReason = ''
refundCoinData.value = {
permanentGold: 0,
freeGold: 0
}
} }
//退 //退
const submitRefund = async () => { const submitRefund = async () => {
@ -781,24 +769,27 @@ const submitRefund = async () => {
if (!refundFormData.value.refundReason) { if (!refundFormData.value.refundReason) {
return ElMessage.error('请输入退款原因'); return ElMessage.error('请输入退款原因');
} }
if(refundFormData.value.refundReason){
if (refundFormData.value.refundModel == 0) {
refundFormData.value.partRefundGold = refundFormData.value.permanentGold,
refundFormData.value.partRefundFree = refundFormData.value.freeGold
} }
const result = await request({ const result = await request({
url: '/Money/addOnline', url: '/Money/addOnline',
data: { data: {
jwcode: refundFormData.value.jwcode, //
name: refundFormData.value.name, //
market: refundFormData.value.marketName, //
submitterMarket:adminData.value.markets,
jwcode: refundFormData.value.jwcode,
name: refundFormData.value.name,
market: refundFormData.value.marketName,
submitterId: adminData.value.id, submitterId: adminData.value.id,
remark: refundFormData.value.remark, //
refundReason: refundFormData.value.refundReason, // 退-
refundModel: refundFormData.value.refundModel, // 退0-1-
id: refundFormData.value.id, //id
submitterMarket: adminData.value.markets,
remark: refundFormData.value.remark,
refundReason: refundFormData.value.refundReason,
refundModel: refundFormData.value.refundModel,
id: refundFormData.value.id,
orderCode: refundFormData.value.orderCode, orderCode: refundFormData.value.orderCode,
permanentGold: (refundCoinData.value.permanentGold) * 100 || 0,
freeGold: (refundCoinData.value.freeGold) * 100 || 0
permanentGold: (refundFormData.value.permanentGold) * 100 || 0,
freeGold: (refundFormData.value.freeGold) * 100 || 0,
partRefundGold: (refundFormData.value.partRefundGold) * 100 || 0,
partRefundFree: (refundFormData.value.partRefundFree) * 100 || 0,
} }
}) })
if (result.code == 200) { if (result.code == 200) {

34
src/views/moneyManage/receiveDetail/receiveService.vue

@ -139,9 +139,9 @@
</div> </div>
<div class="pagination"> <div class="pagination">
<el-pagination background :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total"
@size-change="handlePagination('size', $event)"
<el-pagination background :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize"
:page-sizes="[5, 10, 20, 50, 100]" layout="total, sizes, prev, pager, next, jumper"
:total="total" @size-change="handlePagination('size', $event)"
@current-change="handlePagination('page', $event)"></el-pagination> @current-change="handlePagination('page', $event)"></el-pagination>
</div> </div>
</el-card> </el-card>
@ -189,7 +189,7 @@
<el-form-item label="客户姓名" required prop="name"> <el-form-item label="客户姓名" required prop="name">
<el-input disabled v-model="addFormData.name" placeholder="请输入客户姓名" /> <el-input disabled v-model="addFormData.name" placeholder="请输入客户姓名" />
</el-form-item> </el-form-item>
<el-form-item label="所属地区" prop="market">
<el-form-item label="所属地区" prop="market">
<el-input disabled v-model="addFormData.marketName" placeholder="请输入所属地区" /> <el-input disabled v-model="addFormData.marketName" placeholder="请输入所属地区" />
</el-form-item> </el-form-item>
<el-form-item label="活动名称" required prop="activity"> <el-form-item label="活动名称" required prop="activity">
@ -244,7 +244,7 @@
<el-date-picker type="datetime" placement="right" v-model="addFormData.payTime" <el-date-picker type="datetime" placement="right" v-model="addFormData.payTime"
placeholder="请选择付款时间" /> placeholder="请选择付款时间" />
</el-form-item> </el-form-item>
<el-form-item label="转账凭证" prop="voucher">
<el-form-item label="转账凭证" prop="voucher">
<div class="pic"> <div class="pic">
<el-upload ref="uploadRef" class="uploader" :show-file-list="false" list-type="picture-card" <el-upload ref="uploadRef" class="uploader" :show-file-list="false" list-type="picture-card"
:auto-upload="false" :before-upload="beforeUpload" :on-error="handelImgErr" :auto-upload="false" :before-upload="beforeUpload" :on-error="handelImgErr"
@ -257,7 +257,7 @@
</el-upload> </el-upload>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark">
<el-form-item label="备注" prop="remark">
<el-input v-model="addFormData.remark" type="textarea" :rows="4" placeholder="请输入备注" maxlength="100" <el-input v-model="addFormData.remark" type="textarea" :rows="4" placeholder="请输入备注" maxlength="100"
show-word-limit /> show-word-limit />
</el-form-item> </el-form-item>
@ -302,8 +302,8 @@
<el-text style="width:4vw;">产品数量</el-text> <el-text style="width:4vw;">产品数量</el-text>
<el-input style="padding-right: 10px; width:6.5vw;" v-model="refundFormData.goodNum" <el-input style="padding-right: 10px; width:6.5vw;" v-model="refundFormData.goodNum"
placeholder="请输入产品数量" disabled /> placeholder="请输入产品数量" disabled />
<CurrencySelect disabled v-model="refundFormData.numUnit" :items="numUnitList" style="width: 3.5vw;"
placeholder="单位" @change="handleCurrencyChange" />
<CurrencySelect disabled v-model="refundFormData.numUnit" :items="numUnitList"
style="width: 3.5vw;" placeholder="单位" @change="handleCurrencyChange" />
</div> </div>
<div v-show="isRefundGold" style="margin-bottom: 15px; "> <div v-show="isRefundGold" style="margin-bottom: 15px; ">
<div style=" display: flex; "> <div style=" display: flex; ">
@ -364,11 +364,13 @@
<el-radio value="1">部分退款</el-radio> <el-radio value="1">部分退款</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="add-item" v-show="refundFormData.goodsName === '金币充值' && refundFormData.refundModel === '1'">
<div class="add-item"
v-show="refundFormData.goodsName === '金币充值' && refundFormData.refundModel === '1'">
<el-text style="width:4vw;">永久金币</el-text> <el-text style="width:4vw;">永久金币</el-text>
<el-input v-model="refundFormData.partRefundGold" style="width:5vw;" />&nbsp;&nbsp; <el-input v-model="refundFormData.partRefundGold" style="width:5vw;" />&nbsp;&nbsp;
</div> </div>
<div class="add-item" v-show="refundFormData.goodsName === '金币充值' && refundFormData.refundModel === '1'">
<div class="add-item"
v-show="refundFormData.goodsName === '金币充值' && refundFormData.refundModel === '1'">
<el-text style="width:4vw;">免费金币</el-text> <el-text style="width:4vw;">免费金币</el-text>
<el-input v-model="refundFormData.partRefundFree" style="width:5vw;" />&nbsp;&nbsp; <el-input v-model="refundFormData.partRefundFree" style="width:5vw;" />&nbsp;&nbsp;
</div> </div>
@ -434,8 +436,8 @@ const search = () => {
const reset = () => { const reset = () => {
searchData.value = {} searchData.value = {}
getTime.value = [] getTime.value = []
//
pageInfo.value.pageNum = 1
//
pageInfo.value.pageNum = 1
getlist() getlist()
} }
@ -532,7 +534,7 @@ const ifGold = () => {
addFormData.value.numUnit = '' addFormData.value.numUnit = ''
} else if (addFormData.value.goodsName == '静态信息费') { } else if (addFormData.value.goodsName == '静态信息费') {
addFormData.value.numUnit = '年' addFormData.value.numUnit = '年'
}else{
} else {
addFormData.value.numUnit = '个' addFormData.value.numUnit = '个'
} }
} }
@ -819,6 +821,10 @@ const closeRefundForm = () => {
// 退 // 退
const submitRefund = async () => { const submitRefund = async () => {
try { try {
if (refundFormData.value.refundModel == 0) {
refundFormData.value.partRefundGold = refundFormData.value.permanentGold,
refundFormData.value.partRefundFree = refundFormData.value.freeGold
}
const result = await request({ const result = await request({
url: '/Money/add', url: '/Money/add',
data: { data: {
@ -826,7 +832,7 @@ const submitRefund = async () => {
name: refundFormData.value.name, name: refundFormData.value.name,
market: refundFormData.value.marketName, market: refundFormData.value.marketName,
submitterId: adminData.value.id, submitterId: adminData.value.id,
submitterMarket:adminData.value.markets,
submitterMarket: adminData.value.markets,
remark: refundFormData.value.remark, remark: refundFormData.value.remark,
refundReason: refundFormData.value.refundReason, refundReason: refundFormData.value.refundReason,
refundModel: refundFormData.value.refundModel, refundModel: refundFormData.value.refundModel,

Loading…
Cancel
Save