|
|
|
@ -10,29 +10,35 @@ |
|
|
|
</div> |
|
|
|
<div class="rowItem"> |
|
|
|
<el-text style="width: 4vw;">客户姓名</el-text> |
|
|
|
<el-input v-model="searchData.name" placeholder="请输入客户姓名" style="width:10vw;" clearable></el-input> |
|
|
|
<el-input v-model="searchData.name" placeholder="请输入客户姓名" style="width:10vw;" |
|
|
|
clearable></el-input> |
|
|
|
</div> |
|
|
|
<div class="rowItem"> |
|
|
|
<el-text style="width: 4vw;">所属地区</el-text> |
|
|
|
<el-select v-model="searchData.market" placeholder="请选择所属地区" style="width:10vw;" clearable></el-select> |
|
|
|
<el-select v-model="searchData.market" placeholder="请选择所属地区" style="width:10vw;" |
|
|
|
clearable></el-select> |
|
|
|
</div> |
|
|
|
<div class="rowItem"> |
|
|
|
<el-text style="width: 4vw;">订单状态</el-text> |
|
|
|
<el-select v-model="searchData.status" placeholder="请选择订单状态" style="width: 10vw;" clearable></el-select> |
|
|
|
<el-select v-model="searchData.status" placeholder="请选择订单状态" style="width: 10vw;" |
|
|
|
clearable></el-select> |
|
|
|
</div> |
|
|
|
<div class="rowItem"> |
|
|
|
<el-text style="width: 4vw;">支付方式</el-text> |
|
|
|
<el-select v-model="searchData.payType" placeholder="请选择支付方式" style="width: 10vw;" clearable></el-select> |
|
|
|
<el-select v-model="searchData.payType" placeholder="请选择支付方式" style="width: 10vw;" |
|
|
|
clearable></el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="row" style="margin-top: 10px;"> |
|
|
|
<div class="rowItem"> |
|
|
|
<el-text style="width: 4vw;">活动名称</el-text> |
|
|
|
<el-select v-model="searchData.activity" placeholdert="请选择活动方式" style="width: 10vw;" clearable></el-select> |
|
|
|
<el-select v-model="searchData.activity" placeholdert="请选择活动方式" style="width: 10vw;" |
|
|
|
clearable></el-select> |
|
|
|
</div> |
|
|
|
<div class="rowItem"> |
|
|
|
<el-text style="width: 4vw;">产品名称</el-text> |
|
|
|
<el-select v-model="searchData.goodsName" placeholder="请选择产品名称" style="width: 10vw;" clearable></el-select> |
|
|
|
<el-select v-model="searchData.goodsName" placeholder="请选择产品名称" style="width: 10vw;" |
|
|
|
clearable></el-select> |
|
|
|
</div> |
|
|
|
<div class="rowItem" style="width: 30vw"> |
|
|
|
<el-text style="width: 4vw; margin-left: 0.5vw;">付款时间</el-text> |
|
|
|
@ -104,14 +110,16 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="receivedCurrency" label="到账币种" v-if="caiwu && activeTab == 'pass'" |
|
|
|
width="150px"></el-table-column> |
|
|
|
<el-table-column prop="receivedAmount" label="到账金额" v-if="caiwu && activeTab == 'pass'" width="150px"> |
|
|
|
<el-table-column prop="receivedAmount" label="到账金额" v-if="caiwu && activeTab == 'pass'" |
|
|
|
width="150px"> |
|
|
|
<template #default="scope"> |
|
|
|
<div v-if="!scope.row.getMoney"> |
|
|
|
<text style="color: #FA5A1E;">待补充</text> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="handlingCharge" label="手续费" v-if="caiwu && activeTab == 'pass'" width="150px"> |
|
|
|
<el-table-column prop="handlingCharge" label="手续费" v-if="caiwu && activeTab == 'pass'" |
|
|
|
width="150px"> |
|
|
|
<template #default="scope"> |
|
|
|
<div v-if="!scope.row.shouxufei"> |
|
|
|
<text style="color: #FA5A1E;">待补充</text> |
|
|
|
@ -126,7 +134,7 @@ |
|
|
|
<div v-if="scope.row.voucher" |
|
|
|
style="display: flex; justify-content: center; align-items: center; cursor: pointer;" |
|
|
|
@click="previewImage(scope.row.voucher)"> |
|
|
|
<img :src="scope.row.payModel" alt="支付凭证" style="width: auto; height: 40px;"> |
|
|
|
<img :src="scope.row.voucher" alt="支付凭证" style="width: auto; height: 40px;"> |
|
|
|
</div> |
|
|
|
<div v-else |
|
|
|
style="display: flex; justify-content: center; align-items: center; height: 40px;"> |
|
|
|
@ -138,9 +146,10 @@ |
|
|
|
width="150px" show-overflow-tooltip></el-table-column> |
|
|
|
<el-table-column prop="submitterName" label="提交人" width="150px" |
|
|
|
show-overflow-tooltip></el-table-column> |
|
|
|
<el-table-column prop="auditor" label="审核人" v-if="caiwu && activeTab == 'pass' || 'reject'" |
|
|
|
width="150px" show-overflow-tooltip></el-table-column> |
|
|
|
<el-table-column prop="mask" label="备注" v-if="activeTab != 'reject'" width="150px" |
|
|
|
<el-table-column prop="auditor" label="审核人" |
|
|
|
v-if="caiwu && activeTab == 'pass' || activeTab == 'reject'" width="150px" |
|
|
|
show-overflow-tooltip></el-table-column> |
|
|
|
<el-table-column prop="remark" label="备注" v-if="activeTab != 'reject'" width="150px" |
|
|
|
show-overflow-tooltip></el-table-column> |
|
|
|
<el-table-column prop="rejectTime" label="驳回时间" v-if="activeTab == 'reject' && !kefu" |
|
|
|
width="150px" show-overflow-tooltip></el-table-column> |
|
|
|
@ -167,15 +176,26 @@ |
|
|
|
<el-table-column prop="getMoneyTime" label="到账时间" v-if="caiwu && activeTab == 'pass'" |
|
|
|
width="150px"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column v-if="kefu" fixed="right" prop="orderStatus" label="订单状态" width="100px" /> |
|
|
|
<el-table-column fixed="right" label="操作" width="100px" v-if="activeTab != 'reject'"> |
|
|
|
<el-table-column v-if="kefu" fixed="right" prop="status" label="订单状态" width="100px"> |
|
|
|
<template #default="scope"> |
|
|
|
<span v-if="scope.row.status == 0">待审核</span> |
|
|
|
<span v-else-if="scope.row.status == 1 || scope.row.status == 4">已通过</span> |
|
|
|
<span v-else-if="scope.row.status == 2">已驳回</span> |
|
|
|
<span v-else-if="scope.row.status == 3">已撤回</span> |
|
|
|
<span v-else></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column fixed="right" label="操作" width="120px" v-if="activeTab != 'reject'"> |
|
|
|
<template #default=scope> |
|
|
|
<span v-if="kefu && scope.row.orderStatus == '已通过'" style="color: #FA5A1E;" |
|
|
|
<span v-if="kefu && scope.row.status == 4" style="color: #FA5A1E;" |
|
|
|
@click="openRecall('refund')">退款</span> |
|
|
|
<span v-else-if="kefu && scope.row.orderStatus == '已撤回'" style="color: #2741DE;" |
|
|
|
<span v-else-if="kefu && scope.row.status == 1" style="color: #2741DE;">待填写手续费</span> |
|
|
|
<span v-else-if="kefu && scope.row.status == 3" style="color: #2741DE;" |
|
|
|
@click="openAddForm(scope.row)">编辑</span> |
|
|
|
<span v-else-if="kefu && scope.row.orderStatus == '待审核'" style="color: #FA5A1E;" |
|
|
|
<span v-else-if="kefu && scope.row.status == 0" style="color: #FA5A1E;" |
|
|
|
@click="openRecall('recall')">撤回</span> |
|
|
|
<span v-else-if="kefu && scope.row.status == 2" style="color: #FA5A1E;" |
|
|
|
@click="openRejectReason(scope.row.rejectReason)">查看驳回理由</span> |
|
|
|
<span v-else-if="activeTab == 'wait' && !kefu" style="color: #2741DE;" |
|
|
|
@click="openAuditForm">审核</span> |
|
|
|
<span v-else-if="activeTab == 'pass' && !kefu" style="color: #2741DE;" |
|
|
|
@ -206,47 +226,49 @@ |
|
|
|
<button class="Btn">确定</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 客服新增弹窗 --> |
|
|
|
<el-dialog class="adddialog" v-model="addFormisible" width="20vw" :before-close="closeAddForm"> |
|
|
|
<el-form class="addForm" label-width="4vw" label-position="left"> |
|
|
|
<el-form-item label="精网号" required> |
|
|
|
<el-input v-model="addFormData.jwcode" placeholder="请输入精网号" /> |
|
|
|
<el-input v-model="addFormData.jwcode" placeholder="请输入精网号" @blur="jwcodeSeachMarket" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="客户姓名" required> |
|
|
|
<el-input v-model="addFormData.userName" placeholder="请输入客户姓名" /> |
|
|
|
<el-input v-model="addFormData.name" placeholder="请输入客户姓名" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="所属地区" required> |
|
|
|
<el-input disabled="true" v-model="addFormData.market" placeholder="请输入所属地区" /> |
|
|
|
<el-input disabled="true" v-model="addFormData.market" :value="addFormData.marketName" |
|
|
|
placeholder="请输入所属地区" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="活动名称" required> |
|
|
|
<el-input v-model="addFormData.jwcode" placeholder="请输入活动名称" /> |
|
|
|
<el-input v-model="addFormData.activity" placeholder="请输入活动名称" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="产品名称" required> |
|
|
|
<ProductSelect v-model="addFormData.rateName"></ProductSelect> |
|
|
|
<ProductSelect v-model="addFormData.goodsName"></ProductSelect> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="产品数量" required> |
|
|
|
<div style="padding-right: 50px; display: flex;"> |
|
|
|
<el-input style="padding-right: 10px;" v-model="addFormData.rateNum" placeholder="请输入产品数量" /> |
|
|
|
<el-input style="padding-right: 10px;" v-model="addFormData.goodNum" placeholder="请输入产品数量" /> |
|
|
|
<span style="color: #999999;">个</span> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="付款币种" required> |
|
|
|
<CurrencySelect v-model="addFormData.moneytype" :items="customOptions" placeholder="请选择付款币种" |
|
|
|
<CurrencySelect v-model="addFormData.paymentCurrency" :items="customOptions" placeholder="请选择付款币种" |
|
|
|
@change="handleCurrencyChange" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="付款金额" required> |
|
|
|
<el-input v-model="addFormData.jwcode" placeholder="请输入付款金额" /> |
|
|
|
<el-input v-model="addFormData.paymentAmount" placeholder="请输入付款金额" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="支付方式" required> |
|
|
|
<CurrencySelect v-model="addFormData.paytype" :items="paytypeOptions" placeholder="请选择支付方式"> |
|
|
|
<CurrencySelect v-model="addFormData.payType" :items="paytypeOptions" placeholder="请选择支付方式"> |
|
|
|
</CurrencySelect> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="到账地区" required> |
|
|
|
<CurrencySelect v-model="addFormData.MoneyAddress" :items="MoneyAddressOptions" |
|
|
|
<CurrencySelect v-model="addFormData.receivedMarket" :items="MoneyAddressOptions" |
|
|
|
placeholder="请选择支付方式"> |
|
|
|
</CurrencySelect> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="付款时间" required> |
|
|
|
<el-date-picker type="datetime" placement="right" v-model="addFormData.time" |
|
|
|
<el-date-picker type="datetime" placement="right" v-model="addFormData.payTime" |
|
|
|
placeholder="请选择付款时间" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="转账凭证" required> |
|
|
|
@ -254,7 +276,7 @@ |
|
|
|
<el-upload ref="uploadRef" class="uploader" :show-file-list="false" list-type="picture-card" |
|
|
|
:auto-upload="false" :before-upload="beforeUpload" :on-error="handelImgErr" |
|
|
|
:on-change="handleImageChange" :http-request="customUpload"> |
|
|
|
<img v-if="addFormData.imageUrl" :src="addFormData.imageUrl" class="avatar" |
|
|
|
<img v-if="addFormData.voucher" :src="addFormData.voucher" class="avatar" |
|
|
|
style="height: 100%; width: 100%; object-fit: cover;" /> |
|
|
|
<el-icon v-else class="avatar-uploader-icon"> |
|
|
|
<Plus /> |
|
|
|
@ -263,7 +285,7 @@ |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="备注" required> |
|
|
|
<el-input v-model="addFormData.mask" type="textarea" :rows="4" placeholder="请输入备注" maxlength="100" |
|
|
|
<el-input v-model="addFormData.remark" type="textarea" :rows="4" placeholder="请输入备注" maxlength="100" |
|
|
|
show-word-limit /> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
@ -282,7 +304,7 @@ |
|
|
|
<el-input v-model="auditFormData.jwcode" placeholder="请输入驳回理由" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="客户姓名"> |
|
|
|
<el-input v-model="auditFormData.userName" placeholder="请输入客户姓名" /> |
|
|
|
<el-input v-model="auditFormData.name" placeholder="请输入客户姓名" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="所属地区"> |
|
|
|
<el-input disabled="true" v-model="auditFormData.market" /> |
|
|
|
@ -357,7 +379,7 @@ |
|
|
|
<el-input v-model="editFormData.jwcode" placeholder="请输入驳回理由" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="客户姓名"> |
|
|
|
<el-input v-model="editFormData.userName" placeholder="请输入客户姓名" /> |
|
|
|
<el-input v-model="editFormData.name" placeholder="请输入客户姓名" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="所属地区"> |
|
|
|
<el-input disabled="true" v-model="editFormData.market" placeholder="请输入所属地区" /> |
|
|
|
@ -442,8 +464,8 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script setup> |
|
|
|
import { ref, watch, computed } from 'vue'; |
|
|
|
import { ElMessage } from 'element-plus' |
|
|
|
import { ref, watch, computed, onMounted } from 'vue'; |
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus' |
|
|
|
import API from '@/util/http.js' |
|
|
|
import { color } from 'echarts'; |
|
|
|
import { template } from 'lodash'; |
|
|
|
@ -451,7 +473,7 @@ import CurrencySelect from '@/components/MoneyManage/CurrencySelect.vue' |
|
|
|
import ProductSelect from '@/components/MoneyManage/ProductSelect.vue' |
|
|
|
import { Search } from '@element-plus/icons-vue'; |
|
|
|
import request from '@/util/http.js' |
|
|
|
|
|
|
|
import moment from 'moment' |
|
|
|
//===================== 查询相关 ================================= |
|
|
|
const tableData = ref([]) |
|
|
|
const searchData = ref({ |
|
|
|
@ -459,12 +481,12 @@ const searchData = ref({ |
|
|
|
}) |
|
|
|
|
|
|
|
const getTime = ref({ |
|
|
|
startTime:'', |
|
|
|
endTime:'' |
|
|
|
startTime: '', |
|
|
|
endTime: '' |
|
|
|
}) |
|
|
|
|
|
|
|
const search = ()=>{ |
|
|
|
getlist() |
|
|
|
const search = () => { |
|
|
|
getlist() |
|
|
|
} |
|
|
|
|
|
|
|
//获得表格数据接口 |
|
|
|
@ -481,12 +503,11 @@ const getlist = async () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
console.log('返回参数:',result); |
|
|
|
console.log('返回参数:', result); |
|
|
|
tableData.value = result.list |
|
|
|
ElMessage.success('查询成功') |
|
|
|
} catch(error) { |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
//==================== 标签切换 ========================= |
|
|
|
@ -515,10 +536,32 @@ const checkCaiwu = () => { |
|
|
|
} |
|
|
|
//================= 客服新增弹窗 ================== |
|
|
|
const addFormData = ref({ |
|
|
|
name: '', |
|
|
|
market: '' |
|
|
|
}) |
|
|
|
const addFormisible = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const jwcodeSeachMarket = async () => { |
|
|
|
try { |
|
|
|
const result = await request({ |
|
|
|
url: '/cashCollection/getNameAndMarket', |
|
|
|
data: addFormData.value.jwcode |
|
|
|
}) |
|
|
|
addFormData.value.market = result.market |
|
|
|
addFormData.value.marketName = result.marketName |
|
|
|
addFormData.value.name = result.name |
|
|
|
console.log('返回参数:', result); |
|
|
|
tableData.value = result.list |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
} |
|
|
|
const openRejectReason = (reason) => { |
|
|
|
ElMessageBox.alert(reason, '驳回理由', { |
|
|
|
// if you want to disable its autofocus |
|
|
|
// autofocus: false, |
|
|
|
confirmButtonText: '确认', |
|
|
|
}) |
|
|
|
} |
|
|
|
const uploadRef = ref() |
|
|
|
const openAddForm = (row) => { |
|
|
|
if (row) { |
|
|
|
@ -533,9 +576,27 @@ const closeAddForm = () => { |
|
|
|
addFormData.value = {} |
|
|
|
} |
|
|
|
|
|
|
|
const handleAddForm = () => { |
|
|
|
console.log('客服新增的数据', addFormData.value); |
|
|
|
|
|
|
|
const handleAddForm = async () => { |
|
|
|
try { |
|
|
|
if (addFormData.value.payTime) { |
|
|
|
addFormData.value.payTime = moment(addFormData.value.payTime).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
} |
|
|
|
console.log('客服新增的数据', addFormData.value); |
|
|
|
const result = await request({ |
|
|
|
url: '/cashCollection/add', |
|
|
|
data: { |
|
|
|
...addFormData.value, |
|
|
|
submitterId: adminData.value.id |
|
|
|
} |
|
|
|
}) |
|
|
|
if (result.code == 200) { |
|
|
|
ElMessage.success('添加成功') |
|
|
|
} |
|
|
|
console.log('返回参数:', result); |
|
|
|
tableData.value = result.list |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//付款币种 |
|
|
|
@ -555,13 +616,13 @@ const recallDialog = ref(false) |
|
|
|
const openRecall = (val) => { |
|
|
|
console.log('打开弹窗', val); |
|
|
|
|
|
|
|
recallDialog.value = true |
|
|
|
if (val == 'refund') { |
|
|
|
textContent.value = '将要对该订单退款!' |
|
|
|
} |
|
|
|
if (val == 'recall') { |
|
|
|
textContent.value = '将要撤回该信息!' |
|
|
|
} |
|
|
|
recallDialog.value = true |
|
|
|
} |
|
|
|
const closeRecall = () => { |
|
|
|
recallDialog.value = false |
|
|
|
@ -571,7 +632,7 @@ const closeRecall = () => { |
|
|
|
const handleImgSuccess = (response, uploadFile) => { |
|
|
|
try { |
|
|
|
console.log('11', response) |
|
|
|
addFormData.value.imageUrl = response.data.url |
|
|
|
addFormData.value.voucher = response.data.url |
|
|
|
console.log('22', response.data.url) |
|
|
|
} catch (error) { |
|
|
|
console.log('报错信息', error) |
|
|
|
@ -611,7 +672,7 @@ const customUpload = async (options) => { |
|
|
|
'Content-Type': 'multipart/form-data' |
|
|
|
} |
|
|
|
}) |
|
|
|
if (response.code === 100 && response.data) { |
|
|
|
if (response.code === 200 && response.data) { |
|
|
|
handleImgSuccess(response, options.file) |
|
|
|
ElMessage.success(response.msg || '上传成功') |
|
|
|
} else { |
|
|
|
@ -718,6 +779,25 @@ const handleMouseMove = (e) => { |
|
|
|
tooltipTop.value = e.clientY - 10; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const adminData = ref({}) |
|
|
|
// 获取管理员信息 |
|
|
|
const getAdminData = async function () { |
|
|
|
try { |
|
|
|
const result = await API({ |
|
|
|
url: '/admin/userinfo', |
|
|
|
data: {} |
|
|
|
}) |
|
|
|
adminData.value = result |
|
|
|
console.log('请求成功', result) |
|
|
|
console.log('用户信息', user.value) |
|
|
|
} catch (error) { |
|
|
|
console.log('请求失败', error) |
|
|
|
} |
|
|
|
} |
|
|
|
onMounted(async function () { |
|
|
|
await getAdminData() |
|
|
|
}) |
|
|
|
</script> |
|
|
|
<style scoped lang="scss"> |
|
|
|
.content { |
|
|
|
|