Browse Source

10.16

zhangyong/milestone-20250913-现金管理
ZhangYong 1 month ago
parent
commit
ceb153f3ec
  1. 5
      .env.development
  2. 16
      src/components/MoneyManage/CurrencySelect.vue
  3. 44
      src/components/MoneyManage/ProductSelect.vue
  4. 154
      src/views/moneyManage/receiveDetail/receiveDetail.vue

5
.env.development

@ -13,4 +13,7 @@ VITE_UPLOAD_URL=http://39.101.133.168:8828/hljw/api/aws/upload
# 本地
VITE_API_BASE='http://localhost:8081/'
# sunjiabei
# VITE_API_BASE='http://192.168.1.70:8081/'
# VITE_API_BASE='http://192.168.1.70:8081/'
# lijianlin
# VITE_API_BASE='http://192.168.9.41:8081/'

16
src/components/MoneyManage/CurrencySelect.vue

@ -3,8 +3,8 @@
<!-- 下拉框触发器 -->
<div class="dropdown-toggle" @click="toggleMenu" :class="{ 'active': isOpen }">
<div class="search">
<input type="text" v-model="searchData" class="search-input" :placeholder="placeholder" :value="selectedItem"
@focus="handleSearchFocus" @blur="handleSearchBlur">
<input type="text" class="search-input" :placeholder="placeholder" :value="isOpen ? searchData : selectedItem"
@focus="handleSearchFocus" @blur="handleSearchBlur" @input="handleInput">
<el-icon class="clear-icon" v-if="searchData" @click="clearSearch">
<CircleClose />
</el-icon>
@ -30,7 +30,7 @@
</template>
<script setup>
import { ref, computed, watchEffect, onMounted } from 'vue';
import { ref, computed, watchEffect, onMounted, watch } from 'vue';
const searchData = ref('')
const isOpen = ref(false)
@ -98,8 +98,12 @@ const filteredItems = computed(() => {
)
})
const handleInput = (e) => {
searchData.value = e.target.value
}
// /
onMounted(() => {
selectedItem.value = props.modelValue;
document.addEventListener('click', handleClickOutside)
return () => {
document.removeEventListener('click', handleClickOutside)
@ -107,9 +111,9 @@ onMounted(() => {
})
//
watchEffect(() => {
selectedItem.value = props.modelValue
})
watch(() => props.modelValue, (newVal) => {
selectedItem.value = newVal;
}, { immediate: true });
</script>
<style scoped lang="scss">
//

44
src/components/MoneyManage/ProductSelect.vue

@ -141,19 +141,47 @@ const InfoFee = ['静态信息费', '博股会员']
const menuData = [
{
name: '美股',
options: ['美服软件', '美服金卡', '美服套餐']
options: ['美股软件', '美股金卡', '美股套餐']
},
{
name: '港股',
options: ['港股软件', '港股金卡', '港股套餐']
},
{
name: 'A股',
options: ['A股软件', 'A股金卡', 'A股套餐']
},
{
name: '新加坡股',
options: ['新加坡软件', '新加坡服务']
options: ['新加坡软件', '新加坡股金卡', '新加坡股套餐']
},
{
name: '韩股',
options: ['韩服工具', '韩服会员']
name: '股',
options: ['马股软件', '马股金卡', '马股套餐']
},
{
name: '港股',
options: ['韩服工具', '韩服会员']
name: '日本股',
options: ['日本股软件', '日本股金卡', '日本股套餐']
},
{
name: '泰股',
options: ['泰股软件', '泰股金卡', '泰股套餐']
},
{
name: '越南股',
options: ['越南股软件', '越南股金卡', '越南股套餐']
},
{
name: '印尼股',
options: ['印尼股软件', '印尼股金卡', '印尼股套餐']
},
{
name: '韩国股',
options: ['韩国股软件', '韩国股金卡', '韩国股套餐']
},
{
name: '台湾股',
options: ['台湾股软件', '台湾股金卡', '台湾股套餐']
}
];
//
@ -215,6 +243,10 @@ const activeIndex = ref(-1)
const clickmenu = (index) => {
activeIndex.value = activeIndex.value === index ? -1 : index;
}
watch(() => props.modelValue, (newVal) => {
selectedItem.value = newVal;
}, { immediate: true });
onMounted(async () => {
selectedValue.value = props.modelValue;
selectedItem.value = selectedValue.value || '';

154
src/views/moneyManage/receiveDetail/receiveDetail.vue

@ -181,7 +181,7 @@
<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-if="scope.row.status == 5">已撤回</span>
<span v-else></span>
</template>
</el-table-column>
@ -190,14 +190,14 @@
<span v-if="kefu && scope.row.status == 4" style="color: #FA5A1E;"
@click="openRecall('refund')">退款</span>
<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;"
<span v-else-if="kefu && scope.row.status == 5" style="color: #2741DE;"
@click="openAddForm(scope.row)">编辑</span>
<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>
@click="openAuditForm(scope.row)">审核</span>
<span v-else-if="activeTab == 'pass' && !kefu" style="color: #2741DE;"
@click="openEditForm(scope.row)">编辑</span>
</template>
@ -233,7 +233,7 @@
<el-input v-model="addFormData.jwcode" placeholder="请输入精网号" @blur="jwcodeSeachMarket" />
</el-form-item>
<el-form-item label="客户姓名" required>
<el-input v-model="addFormData.name" placeholder="请输入客户姓名" />
<el-input disabled="true" v-model="addFormData.name" placeholder="请输入客户姓名" />
</el-form-item>
<el-form-item label="所属地区" required>
<el-input disabled="true" v-model="addFormData.market" :value="addFormData.marketName"
@ -292,8 +292,10 @@
<template #footer>
<span class="dialog-footer">
<el-button style="background-color: #7E91FF;" @click="closeAddForm">取消</el-button>
<el-button style="background-color: #2741DE; margin-left: 2.5vw;" type="primary"
@click="handleAddForm">确定</el-button>
<el-button v-if="addOrEdit == 1" style="background-color: #2741DE; margin-left: 2.5vw;"
type="primary" @click="handleAddForm">确定</el-button>
<el-button v-else-if="addOrEdit == 2" style="background-color: #2741DE; margin-left: 2.5vw;"
type="primary" @click="handleEditForm">编辑</el-button>
</span>
</template>
</el-dialog>
@ -301,40 +303,42 @@
<el-dialog class="adddialog" v-model="auditFormisible" width="20vw" :before-close="closeAuditForm">
<el-form class="addForm" label-width="4vw" label-position="left">
<el-form-item label="精网号">
<el-input v-model="auditFormData.jwcode" placeholder="请输入驳回理由" />
<el-input disabled="true" v-model="auditFormData.jwcode" placeholder="请输入驳回理由" />
</el-form-item>
<el-form-item label="客户姓名">
<el-input v-model="auditFormData.name" placeholder="请输入客户姓名" />
<el-input disabled="true" v-model="auditFormData.name" placeholder="请输入客户姓名" />
</el-form-item>
<el-form-item label="所属地区">
<el-input disabled="true" v-model="auditFormData.market" />
</el-form-item>
<el-form-item label="活动名称">
<el-input v-model="auditFormData.jwcode" placeholder="请输入活动名称" />
<el-input disabled="true" v-model="auditFormData.activity" placeholder="请输入活动名称" />
</el-form-item>
<el-form-item label="产品名称">
<el-select placeholder="请选择产品名称" clearable></el-select>
<el-form-item label="产品名称" required>
<ProductSelect disabled="true" v-model="auditFormData.goodsName"></ProductSelect>
</el-form-item>
<el-form-item label="付款币种">
<el-select placeholder="请选择付款币种" v-model="auditFormData.moneyType" clearable>
<el-option v-for="item in payModel" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-form-item label="付款币种" required>
<CurrencySelect disabled="true" v-model="auditFormData.paymentCurrency" :items="customOptions"
placeholder="请选择付款币种" @change="handleCurrencyChange" />
</el-form-item>
<el-form-item label="付款金额">
<el-input v-model="auditFormData.jwcode" placeholder="请输入付款金额" />
<el-input disabled="true" v-model="auditFormData.paymentAmount" placeholder="请输入付款金额" />
</el-form-item>
<el-form-item label="支付方式">
<el-select placeholder="请选择支付方式" clearable></el-select>
<el-form-item label="支付方式" required>
<CurrencySelect disabled="true" v-model="auditFormData.payType" :items="paytypeOptions"
placeholder="请选择支付方式">
</CurrencySelect>
</el-form-item>
<el-form-item label="付款时间">
<el-date-picker type="datetime" v-model="auditFormData.time" placeholder="请选择付款时间" />
<el-date-picker disabled="true" type="datetime" v-model="auditFormData.payTime"
placeholder="请选择付款时间" />
</el-form-item>
<el-form-item label="转账凭证">
<div class="pic">
<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="auditFormData.imageUrl" :src="auditFormData.imageUrl" class="avatar"
<img v-if="auditFormData.voucher" :src="auditFormData.voucher" class="avatar"
style="height: 100%; width: 100%; object-fit: cover;" />
<el-icon v-else class="avatar-uploader-icon">
<Plus />
@ -346,11 +350,11 @@
</div>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="auditFormData.mask" type="textarea" :rows="3" placeholder="请输入备注" maxlength="100"
show-word-limit />
<el-input disabled="true" v-model="auditFormData.remark" type="textarea" :rows="3" placeholder="请输入备注"
maxlength="100" show-word-limit />
</el-form-item>
<el-form-item label="驳回理由" v-if="ifReject" required>
<el-input v-model="auditFormData.mask" type="textarea" :rows="3" placeholder="请输入驳回理由"
<el-input v-model="auditFormData.rejectReason" type="textarea" :rows="3" placeholder="请输入驳回理由"
maxlength="100" show-word-limit />
</el-form-item>
</el-form>
@ -361,7 +365,7 @@
backgroundColor: isBtnDisabled ? '#E5E5E5FF' : '#2741DEFF',
marginLeft: '60px',
color: isBtnDisabled ? '#8A8A8A' : '#F3FAFE'
}" @click="handleReject" :disabled="isBtnDisabled">{{ btnText }}</el-button>
}" @click="handelAudit" :disabled="isBtnDisabled">{{ btnText }}</el-button>
</span>
<span class="dialog-footer" v-if="ifReject">
<el-button style="background-color: #7E91FF;" @click="closeAuditForm">取消</el-button>
@ -487,6 +491,7 @@ const getTime = ref({
const search = () => {
getlist()
ElMessage.success('查询成功')
}
//
@ -504,8 +509,8 @@ const getlist = async () => {
})
console.log('返回参数:', result);
tableData.value = result.list
ElMessage.success('查询成功')
tableData.value = result.data.list
total.value = result.data.total
} catch (error) {
console.log(error);
}
@ -550,7 +555,6 @@ const jwcodeSeachMarket = async () => {
addFormData.value.marketName = result.marketName
addFormData.value.name = result.name
console.log('返回参数:', result);
tableData.value = result.list
} catch (error) {
console.log(error);
}
@ -563,10 +567,15 @@ const openRejectReason = (reason) => {
})
}
const uploadRef = ref()
const addOrEdit = ref(0) // 1 2
const openAddForm = (row) => {
if (row) {
console.log('编辑回显数据', row);
if (row.jwcode) {
addOrEdit.value = 2
addFormData.value = { ...row };
jwcodeSeachMarket()
} else {
addOrEdit.value = 1
addFormData.value = {}
}
addFormisible.value = true
@ -574,8 +583,9 @@ const openAddForm = (row) => {
const closeAddForm = () => {
addFormisible.value = false
addFormData.value = {}
addOrEdit.value = 0
}
//
const handleAddForm = async () => {
try {
if (addFormData.value.payTime) {
@ -591,14 +601,38 @@ const handleAddForm = async () => {
})
if (result.code == 200) {
ElMessage.success('添加成功')
getlist()
closeAddForm()
}
console.log('返回参数:', result);
} catch (error) {
console.log(error);
}
}
//
const handleEditForm = 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/reSubmit',
data: {
...addFormData.value,
submitterId: adminData.value.id
}
})
if (result.code == 200) {
ElMessage.success('编辑成功')
getlist()
closeAddForm()
}
console.log('返回参数:', result);
tableData.value = result.list
} catch (error) {
console.log(error);
}
}
//
const selectedCurrency = ref('');
const customOptions = ref(['新币', '马币', '港币', '美元', '英镑', '越南盾']);
@ -615,14 +649,13 @@ const textContent = ref('')
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
@ -674,7 +707,7 @@ const customUpload = async (options) => {
})
if (response.code === 200 && response.data) {
handleImgSuccess(response, options.file)
ElMessage.success(response.msg || '上传成功')
ElMessage.success('上传成功')
} else {
options.onError(response)
ElMessage.error(response.msg || '上传失败')
@ -707,15 +740,65 @@ const submitEditForm = () => {
const auditFormData = ref({
})
//
const handelAudit = async() => {
try {
const result = await request({
url: '/cashAudit/collectionAudit',
data: {
orderCode:auditFormData.value.orderCode,
action:1,
auditId:adminData.value.id
}
})
if (result.code == 200) {
ElMessage.success('审核成功')
getlist()
closeAuditForm()
}else{
ElMessage.error(result.msg)
getlist()
}
console.log('返回参数:', result);
} catch (error) {
console.log(error);
}
}
//
const handelAuditReject = async() => {
try {
const result = await request({
url: '/cashAudit/collectionAudit',
data: {
orderCode:auditFormData.value.orderCode,
orderCode:auditFormData.value.orderCode,
action:2,
auditId:adminData.value.id
}
})
if (result.code == 200) {
ElMessage.success('审核成功')
getlist()
closeAuditForm()
}
console.log('返回参数:', result);
} catch (error) {
console.log(error);
}
}
const auditFormisible = ref(false)
//
const ifReject = ref(false)
const openAuditForm = () => {
const openAuditForm = (row) => {
auditFormData.value = {...row}
auditFormisible.value = true
}
const countdown = ref(0); // 5
const isBtnDisabled = ref(false); //
const btnText = ref('通过(3)'); //
const closeAuditForm = () => {
ifReject.value = false
auditFormisible.value = false
@ -797,6 +880,7 @@ const getAdminData = async function () {
}
onMounted(async function () {
await getAdminData()
await getlist()
})
</script>
<style scoped lang="scss">

Loading…
Cancel
Save