Browse Source

添加,筛选接口对接完毕,产品组件修改完成

zhangyong/milestone-20250913-现金管理
ZhangYong 2 months ago
parent
commit
aaba89e870
  1. 136
      src/components/MoneyManage/CurrencySelect.vue
  2. 215
      src/components/MoneyManage/ProductSelect.vue
  3. 11
      src/util/request.js
  4. 180
      src/views/moneyManage/receiveDetail/receiveDetail.vue

136
src/components/MoneyManage/CurrencySelect.vue

@ -2,9 +2,13 @@
<div class="dropdown" ref="dropdownRef">
<!-- 下拉框触发器 -->
<div class="dropdown-toggle" @click="toggleMenu" :class="{ 'active': isOpen }">
<span class="placeholder" :style="{ color: selectedItem ? '#333' : '#A8ABB2' }">
{{ selectedItem || placeholder }}
</span>
<div class="search">
<input type="text" v-model="searchData" class="search-input" :placeholder="placeholder" :value="selectedItem"
@focus="handleSearchFocus" @blur="handleSearchBlur">
<el-icon class="clear-icon" v-if="searchData" @click="clearSearch">
<CircleClose />
</el-icon>
</div>
<span class="arrow">
<el-icon>
<ArrowDown />
@ -14,18 +18,6 @@
<!-- 下拉菜单 -->
<div class="dropdown-menu" v-if="isOpen">
<!-- 搜索框 -->
<div class="search">
<input type="text" v-model="searchData" class="search-input" placeholder="查询" @focus="handleSearchFocus"
@blur="handleSearchBlur">
<el-icon v-show="!searchData" class="search-icon">
<Search />
</el-icon>
<el-icon class="clear-icon" v-if="searchData" @click="clearSearch">
<CircleClose />
</el-icon>
</div>
<!-- 选项区域按钮样式 -->
<div class="menuContent">
<button class="dropdown-item" v-for="(item, index) in filteredItems" :key="index" @click="handleSelect(item)"
@ -130,9 +122,8 @@ watchEffect(() => {
// /
.dropdown-toggle {
border: 1px solid #e5e7eb;
padding: 4px 12px;
/* 调整内边距以匹配按钮高度 */
height: 23px;
height: 31px;
/* 调整高度以匹配按钮 */
cursor: pointer;
display: flex;
@ -148,6 +139,50 @@ watchEffect(() => {
line-height: 18px;
color: #A8ABB2;
}
//
.search {
width: 100%;
height: 100%;
position: sticky;
}
//
.search-input {
width: 100%;
height: 90%;
/* 左侧留出图标空间 */
box-sizing: border-box;
border: none;
border-radius: 6px;
padding-left: 11px;
outline: none;
font-size: 14px;
transition: border-color 0.3s ease;
&::placeholder {
color: #999999;
opacity: 1;
font-style: normal;
font-weight: 350;
line-height: 22px;
}
}
.clear-icon {
position: absolute;
top: 62%;
right: 20px;
transform: translateY(-50%);
color: #909399;
cursor: pointer;
z-index: 1003;
&:hover {
color: #606266;
}
}
}
// +
@ -158,7 +193,7 @@ watchEffect(() => {
//
.arrow {
margin-left: 8px;
margin-right: 8px;
color: #999;
transition: transform 0.3s ease;
}
@ -174,6 +209,7 @@ watchEffect(() => {
left: 0;
width: 100%;
border: 1px solid #678BFF;
min-height: 50px;
max-height: 300px;
background-color: #fff;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
@ -186,7 +222,7 @@ watchEffect(() => {
&::before {
content: "";
position: absolute;
top: -8px;
top: -11px;
left: 50%;
transform: translateX(-50%) scaleY(0.5);
width: 30px;
@ -201,7 +237,7 @@ watchEffect(() => {
&::after {
content: "";
position: absolute;
top: -9px;
top: -12px;
/* 比 ::before 往下一点,制造边框效果 */
left: 50%;
transform: translateX(-50%) scaleY(0.5);
@ -213,67 +249,7 @@ watchEffect(() => {
}
}
//
.search {
position: sticky;
top: 0;
background-color: #FFFFFF;
z-index: 1002;
padding: 10px 14px 0px 10px;
}
// +
.search-input {
width: 100%;
height: 27px;
padding: 0 12px 0 5px;
/* 左侧留出图标空间 */
border: 1px solid #dcdfe6;
border-radius: 10px;
box-sizing: border-box;
background-color: #f8f9fa;
/* 浅灰背景匹配参考图 */
outline: none;
font-size: 12px;
transition: border-color 0.3s ease;
&::placeholder {
color: #909399;
}
&:hover {
border-color: #c0c4cc;
}
&:focus {
border-color: #678BFF;
}
}
//
.search-icon {
position: absolute;
top: 62%;
left: 50px;
transform: translateY(-50%);
color: #909399;
z-index: 1003;
}
// + hover
.clear-icon {
position: absolute;
top: 62%;
right: 20px;
transform: translateY(-50%);
color: #909399;
cursor: pointer;
z-index: 1003;
&:hover {
color: #606266;
}
}
//
.menuContent {

215
src/components/MoneyManage/ProductSelect.vue

@ -23,7 +23,7 @@
</span>
</div>
<div class="coinoption" v-show="coinisOpen">
<el-checkbox v-model="isCoinRechargeChecked" label="金币充值" size="large" />
<el-radio v-model="selectedValue" label="金币充值" size="large" />
</div>
<div class="product">
<div class="coinselect" @click="producthandelMenu" :class="{ 'active': productisOpen }">
@ -40,42 +40,52 @@
<hr class="line">
<div class="checktxt">软件</div>
<div class="marketprodut">
<div class="one">
<div class="firstMenu" v-for="(menu, index) in menuData" :key="menu.name" @click="clickmenu(index)">
<div class="fistlevel" v-for="(menu, index) in menuData" :key="menu.name" @click="clickmenu(index)"
:class="{ 'selected': menu.options.includes(selectedValue) }">
<div class="label">
{{ menu.name }}
<el-icon>
<el-icon :class="{ 'rotate': activeIndex === index }">
<ArrowDown />
</el-icon>
</div>
<div v-show="activeIndex == index" class="selectoption" @click.stop>
<el-radio-group v-model="selectedValue">
<div class="option" v-for="product in menu.options" :key="product">
<el-radio :label="product">
{{ product }}
</el-radio>
</div>
</el-radio-group>
</div>
</div>
<hr class="line">
</div>
<hr class="line">
<div class="ai">
<div class="checktxt">AI机构探测神器</div>
<hr class="line">
<el-checkbox-group v-model="selectedSoftwareItems" :max="1">
<el-checkbox v-for="ai in AIProduct" :key="ai" :label="ai" :value="ai">
<el-radio-group v-model="selectedValue">
<el-radio v-for="ai in AIProduct" :key="ai" :label="ai" :value="ai">
{{ ai }}
</el-checkbox>
</el-checkbox-group>
</el-radio>
</el-radio-group>
</div>
<div class="ai">
<div class="checktxt">超级机构探测神器</div>
<hr class="line">
<el-checkbox-group v-model="selectedSoftwareItems" :max="1">
<el-checkbox v-for="ai in superProduct" :key="ai" :label="ai" :value="ai">
<el-radio-group v-model="selectedValue">
<el-radio v-for="ai in superProduct" :key="ai" :label="ai" :value="ai">
{{ ai }}
</el-checkbox>
</el-checkbox-group>
</el-radio>
</el-radio-group>
</div>
<div class="ai">
<div class="checktxt">静态信息费</div>
<div class="checktxt">其他</div>
<hr class="line">
<el-checkbox-group v-model="selectedSoftwareItems" :max="1">
<el-checkbox v-for="ai in InfoFee" :key="ai" :label="ai" :value="ai">
<el-radio-group v-model="selectedValue">
<el-radio v-for="ai in InfoFee" :key="ai" :label="ai" :value="ai">
{{ ai }}
</el-checkbox>
</el-checkbox-group>
</el-radio>
</el-radio-group>
</div>
</div>
</div>
@ -83,7 +93,7 @@
</div>
</template>
<script setup>
import { ref, watch, onMounted } from 'vue';
import { ref, watch, onMounted, computed, onUnmounted, nextTick } from 'vue';
import { ArrowDown } from '@element-plus/icons-vue';
@ -97,6 +107,7 @@ const placeholder = ref('请选择产品')
const handelMenu = () => {
isOpen.value = !isOpen.value
ifselectAndOpen()
}
const coinhandelMenu = () => {
coinisOpen.value = !coinisOpen.value
@ -108,21 +119,25 @@ const producthandelMenu = () => {
// v-model
const props = defineProps({
modelValue: {
type: Array,
default: () => []
type: String,
default: ''
}
})
const emit = defineEmits(['update:modelValue'])
const isCoinRechargeChecked = ref(false)
const selectedSoftwareItems = ref([])
const selectedValue = ref([])
const selectedValue = ref('')
watch(selectedValue, (newVal) => {
emit('update:modelValue', newVal ? newVal : '');
selectedItem.value = newVal || '';
});
const AIProduct = ['AI机构追踪', 'AI机构出击 ', 'AI机构资金', 'AI机活跃度']
const superProduct = ['超级机构透视', '超级机构伏击 ', '超级机构猎杀', '超级机构脉搏', '超级机构罗盘']
const InfoFee = ['静态信息费']
const InfoFee = ['静态信息费', '博股会员']
const menuData = [
{
name: '美股',
@ -135,53 +150,78 @@ const menuData = [
{
name: '韩股',
options: ['韩服工具', '韩服会员']
},
{
name: '港股',
options: ['韩服工具', '韩服会员']
}
];
//
watch(isCoinRechargeChecked, (newVal) => {
if (newVal) {
selectedSoftwareItems.value = [];
selectedValue.value = newVal ? ['金币充值'] : [];
} else {
selectedValue.value = selectedSoftwareItems.value.length > 0 ? selectedSoftwareItems.value : [];
//
const closeSoftwareSubmenu = () => {
activeIndex.value = -1; // -1
};
const closeWholeDropdown = () => {
isOpen.value = false; //
//
coinisOpen.value = false;
productisOpen.value = false;
closeSoftwareSubmenu(); //
};
const handleGlobalClick = (e) => {
// --- ---
if (productisOpen.value) {
const submenuContainers = document.querySelectorAll('.selectoption');
const firstLevelContainers = document.querySelectorAll('.fistlevel');
let isClickInsideSubmenu = false;
let isClickInsideFirstLevel = false;
submenuContainers.forEach(container => container.contains(e.target) && (isClickInsideSubmenu = true));
firstLevelContainers.forEach(container => container.contains(e.target) && (isClickInsideFirstLevel = true));
if (!isClickInsideSubmenu && !isClickInsideFirstLevel) {
closeSoftwareSubmenu();
}
}
emit('update:modelValue', selectedValue.value);
selectedItem.value = selectedValue.value[0] || '';
});
//
watch(selectedSoftwareItems, (newVals) => {
if (newVals.length > 0) {
isCoinRechargeChecked.value = false;
selectedValue.value = newVals;
// --- ---
if (isOpen.value) { //
// DOM
const dropdownContainer = document.querySelector('.menu');
// .selectBox
const triggerButton = document.querySelector('.selectBox');
//
if (!dropdownContainer?.contains(e.target) && !triggerButton?.contains(e.target)) {
closeWholeDropdown();
}
}
};
const ifselectAndOpen = async () => {
await nextTick();
if (selectedValue.value == '金币充值') {
coinisOpen.value = true
} else if (selectedValue.value) {
productisOpen.value = true
} else {
selectedValue.value = isCoinRechargeChecked.value ? ['金币充值'] : [];
//
}
emit('update:modelValue', selectedValue.value);
selectedItem.value = selectedValue.value[0] || '';
});
}
//
const activeIndex = ref(false)
const activeIndex = ref(-1)
const clickmenu = (index) => {
activeIndex.value = activeIndex.value === index ? -1 : index;
}
onMounted(() => {
const initValue = props.modelValue;
if (initValue.length === 0) return;
//
if (initValue[0] === '金币充值') {
isCoinRechargeChecked.value = true;
selectedValue.value = ['金币充值'];
}
// selectedSoftwareItems
else {
selectedSoftwareItems.value = initValue;
selectedValue.value = initValue;
}
//
selectedItem.value = selectedValue.value[0] || '';
onMounted(async () => {
selectedValue.value = props.modelValue;
selectedItem.value = selectedValue.value || '';
document.addEventListener('click', handleGlobalClick); //
});
onUnmounted(() => {
document.removeEventListener('click', handleGlobalClick); //
});
</script>
<style scoped lang="scss">
@ -307,6 +347,57 @@ onMounted(() => {
.ai {
width: 100%;
}
.marketprodut {
width: 100%;
display: flex;
flex-wrap: wrap;
gap: 10px;
.fistlevel {
position: relative;
width: 130px;
.label .el-icon {
margin-left: 5px;
transition: transform 0.3s ease;
}
.label .rotate {
transform: rotate(-90deg); //
}
.label {
margin-left: 10px;
}
.selectoption {
width: 100px;
background-color: #fff;
padding: 5px 20px;
position: absolute;
left: 60px;
top: 0;
z-index: 999;
border: 1px solid #175BE5;
border-radius: 6px;
:deep(.el-checkbox__label) {
color: #333333;
font-family: "PingFang SC";
font-size: 13px;
font-style: normal;
font-weight: 400;
line-height: 22px;
}
}
}
.fistlevel.selected .label {
color: #175BE5;
}
}
}
}
}

11
src/util/request.js

@ -26,11 +26,12 @@ export const uploadFile = (file) => {
service.interceptors.request.use(config => {
const token = localStorage.getItem('token')
if (token) {
if (config.data) {
config.data.token = token;
} else {
config.data = { token };
}
// 请求体里面为什么放token?
// if (config.data) {
// config.data.token = token;
// } else {
// config.data = { token };
// }
config.headers.token = `${token}`
}
return config

180
src/views/moneyManage/receiveDetail/receiveDetail.vue

@ -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 {

Loading…
Cancel
Save