Browse Source

合代码

zhangrenyuan/feature-20251104133449-现金管理二期
ZhangYong 3 weeks ago
parent
commit
eff34f6b7c
  1. 14
      src/components/MoneyManage/CurrencySelect.vue
  2. 320
      src/views/moneyManage/receiveDetail/receiveFinance.vue
  3. 32
      src/views/moneyManage/receiveDetail/receiveManage.vue
  4. 42
      src/views/moneyManage/receiveDetail/receiveService.vue
  5. 11
      src/views/moneyManage/receiveDetail/utils/recriveFormRules.js
  6. 2
      src/views/moneyManage/receiveDetail/utils/staticData.js

14
src/components/MoneyManage/CurrencySelect.vue

@ -124,7 +124,7 @@ watch(() => props.modelValue, (newVal) => {
// //
.dropdown { .dropdown {
position: relative; position: relative;
width: 268px;
width: 100%;
font-family: 'Arial', sans-serif; font-family: 'Arial', sans-serif;
} }
@ -154,7 +154,6 @@ watch(() => props.modelValue, (newVal) => {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: sticky; position: sticky;
}
// //
.search-input { .search-input {
@ -176,7 +175,10 @@ watch(() => props.modelValue, (newVal) => {
font-weight: 350; font-weight: 350;
line-height: 22px; line-height: 22px;
} }
}
}
.arrow {
color: #9ca3af;
} }
.clear-icon { .clear-icon {
@ -211,9 +213,6 @@ watch(() => props.modelValue, (newVal) => {
display: none; display: none;
} }
.arrow {
color: #9ca3af;
}
&:hover { &:hover {
border-color: #d1d5db; border-color: #d1d5db;
@ -250,7 +249,7 @@ watch(() => props.modelValue, (newVal) => {
position: absolute; position: absolute;
top: 100%; // top: 100%; //
left: 0; left: 0;
width: 100%;
width: 120%;
border: 1px solid #678BFF; border: 1px solid #678BFF;
min-height: 50px; min-height: 50px;
max-height: 300px; max-height: 300px;
@ -313,6 +312,7 @@ watch(() => props.modelValue, (newVal) => {
border: none; border: none;
border-radius: 10px; border-radius: 10px;
background-color: #fff; background-color: #fff;
box-shadow: 0 0 0 1px rgba(200, 200, 200, 0.3);
font-size: 12px; font-size: 12px;
font-style: normal; font-style: normal;
font-weight: 700; font-weight: 700;

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

@ -840,46 +840,26 @@ const handlePagination = (type, val) => {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
// /
.content { .content {
height: 100%; height: 100%;
width: 80vw; width: 80vw;
margin: 0 auto;
padding: 1vh 0;
//
.div-card1 {
.card1 { .card1 {
width: 100%;
background: #F3FAFE; background: #F3FAFE;
border: none;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
.row { .row {
height: auto;
width: 100%;
height: 4vh;
width: 80vw;
display: flex; display: flex;
align-items: center;
margin-bottom: 1vh;
min-height: 40px; min-height: 40px;
.rowItem { .rowItem {
display: flex; display: flex;
width: 15vw;
align-items: center; align-items: center;
margin-right: 1.5vw;
width: auto;
el-text {
min-width: 60px;
justify-content: center;
margin-right: 0.5vw; margin-right: 0.5vw;
color: #333;
font-weight: 500;
}
el-input,
el-select,
el-cascader {
min-width: 160px;
}
} }
.buttons { .buttons {
@ -890,96 +870,48 @@ const handlePagination = (type, val) => {
} }
} }
} }
}
//
.div-card2 { .div-card2 {
margin-top: 1.5vh;
width: 100%;
margin-top: 2vh;
.card2 { .card2 {
background: #F3FAFE;
border: none;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
background: #E7F4FD;
}
//
.btns { .btns {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 1vh 1vw;
border-bottom: 1px solid #E5EBFE;
padding-bottom: 10px;
.tabs { .tabs {
.btnItem {
margin-right: 0.5vw;
border-radius: 4px;
padding: 0.3vh 1vw;
font-size: 0.9vw;
min-width: 300px;
&:hover {
opacity: 0.9;
.btnItem {
margin-left: 10px;
border-radius: 5px;
} }
} }
} }
.btnAdd {
display: none; //
}
}
//
.table { .table {
margin: 1vh 1vw;
overflow: hidden;
.el-table {
border: none;
.el-table__header th {
background: #E5EBFE;
color: #2741DE;
font-weight: 500;
}
.el-table__body tr {
background: #F3FAFE;
&:hover>td {
background: #EEF3FF !important;
}
}
margin: 10px;
border-radius: 20px;
.el-table-column {
&[label="序号"],
&[label="Homily ID"],
&[label="姓名"] {
background: #F3FAFE;
z-index: 1;
}
&[label="操作"] {
el-link {
color: #2741DE;
cursor: pointer;
&:hover {
color: #1A30B9;
text-decoration: underline;
}
}
}
}
//
.ellipsis-container { .ellipsis-container {
position: relative;
width: 100%;
.ellipsis-text { .ellipsis-text {
color: #333;
display: inline-block;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer; cursor: pointer;
&:hover {
color: #2741DE;
}
} }
.custom-tooltip { .custom-tooltip {
@ -987,11 +919,12 @@ const handlePagination = (type, val) => {
z-index: 9999; z-index: 9999;
padding: 8px 12px; padding: 8px 12px;
width: 200px; width: 200px;
background-color: #fff;
color: #333;
border: 1px solid #E5EBFE;
background-color: #E4F0FC;
color: #333333;
border: 1px solid #e5e7eb;
border-radius: 4px; border-radius: 4px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
min-height: 30px;
max-height: 300px; max-height: 300px;
overflow-y: auto; overflow-y: auto;
font-size: 14px; font-size: 14px;
@ -999,44 +932,26 @@ const handlePagination = (type, val) => {
} }
} }
} }
}
//
.pagination { .pagination {
padding: 1vh 1vw;
text-align: right;
.el-pagination {
.el-pager li {
&.active {
background: #2741DE;
color: #fff;
}
}
}
}
margin-top: 10px;
padding: 10px 10px;
} }
} }
//
:deep(.adddialog) { :deep(.adddialog) {
min-width: 500px;
background-color: #F3FAFE !important; background-color: #F3FAFE !important;
margin-top: 8vh;
border-radius: 8px; border-radius: 8px;
.addForm { .addForm {
padding: 1.5vh 2vw;
padding: 0 60px 1vh 60px;
.el-form-item {
margin-bottom: 1.5vh;
&:last-of-type {
margin-bottom: 0;
}
.el-date-editor {
display: flex;
flex: 1;
.el-form-item__label {
color: #333;
font-weight: 500;
min-width: 80px;
} }
.pic { .pic {
@ -1046,21 +961,21 @@ const handlePagination = (type, val) => {
.uploader { .uploader {
height: 80px; height: 80px;
width: 80px; width: 80px;
border: 1px dashed #DCDFE6;
.el-upload { .el-upload {
height: 100%; height: 100%;
width: 100%; width: 100%;
display: flex;
align-items: center;
justify-content: center;
} }
} }
.picText { .picText {
margin-left: 1vw;
color: #999;
font-size: 12px;
color: #999999;
font-family: "PingFang SC";
font-size: 10px;
font-style: normal;
font-weight: 400;
line-height: 20px;
margin-left: 10px;
} }
} }
} }
@ -1068,100 +983,149 @@ const handlePagination = (type, val) => {
.dialog-footer { .dialog-footer {
display: flex; display: flex;
justify-content: center; justify-content: center;
gap: 1vw;
padding-top: 1.5vh;
padding-bottom: 1.5vh;
}
}
button {
padding: 0.5vh 1.5vw;
border-radius: 4px;
:deep(.editdialog) {
min-width: 990px;
background-color: #F3FAFE !important;
margin-top: 8vh;
border-radius: 8px;
&:first-of-type {
background: #7E91FF;
border: none;
color: #fff;
.editForm {
padding: 0 60px 1vh 60px;
.el-date-editor {
display: flex;
flex: 1;
} }
&:last-of-type {
background: #2741DE;
border: none;
color: #fff;
.pic {
display: flex;
align-items: center;
.uploader {
height: 80px;
width: 80px;
.el-upload {
height: 100%;
width: 100%;
} }
} }
.picText {
color: #999999;
font-family: "PingFang SC";
font-size: 10px;
font-style: normal;
font-weight: 400;
line-height: 20px;
margin-left: 10px;
} }
} }
} }
//
:deep(.editdialog) {
background-color: #F3FAFE !important;
border-radius: 8px;
width: 60vw !important;
.content { .content {
display: flex; display: flex;
gap: 2vw;
padding: 1.5vh 2vw;
height: 100%;
width: 100%;
.left {
min-width: 500px;
}
.left,
.right { .right {
flex: 1; flex: 1;
}
.editForm,
.editFormRighrt { .editFormRighrt {
.el-form-item {
margin-bottom: 1.5vh;
padding: 0 60px 0 40px;
.el-form-item__label {
color: #333;
font-weight: 500;
min-width: 80px;
}
.el-date-editor {
display: flex;
flex: 1;
} }
} }
.right {
.editBtns { .editBtns {
display: flex; display: flex;
justify-content: center; justify-content: center;
gap: 1vw;
margin-top: 2vh;
.editBtn1,
.editBtn2 {
padding: 0.5vh 1.5vw;
border-radius: 4px;
border: none;
color: #fff;
margin-top: 60px;
.txt { .txt {
color: #f3fafe;
text-align: center;
font-family: "PingFang SC";
font-size: 14px; font-size: 14px;
}
font-style: normal;
font-weight: 700;
line-height: 22px;
} }
.editBtn1 { .editBtn1 {
min-width: 80px;
padding: 5px 12px;
justify-content: center;
align-items: center;
gap: 4px;
border-radius: 4px;
background: #7E91FF; background: #7E91FF;
border: none;
box-shadow: 0 0 4px 0 #00000040;
} }
.editBtn2 { .editBtn2 {
display: flex;
width: 80px;
min-width: 80px;
padding: 5px 12px;
justify-content: center;
align-items: center;
gap: 4px;
border-radius: 4px;
background: #2741DE; background: #2741DE;
border: none;
box-shadow: 0 0 4px 0 #00000040;
margin-left: 60px;
} }
} }
} }
} }
} }
:deep(.adddialog .el-form-item__label) {
min-width: 80px;
width: auto;
font-weight: 800;
padding-bottom: 15px;
}
} }
//
:deep(.el-date-editor) {
width: 100%;
//
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__cell),
:deep(.el-table__body td) {
background-color: #F3FAFE !important;
}
:deep(.el-table__header th) {
background-color: #F3FAFE !important;
}
:deep(.el-table__row:hover > .el-table__cell) {
background-color: #E5EBFE !important;
} }
:deep(.el-select-dropdown) {
max-height: 200px;
//
.reject-reason-box {
--el-message-box-height: 500px;
} }
:deep(.el-cascader-panel) {
max-height: 200px;
.reject-reason-box .el-message-box__content {
max-height: 350px;
overflow-y: auto;
white-space: pre-wrap;
} }
</style> </style>

32
src/views/moneyManage/receiveDetail/receiveManage.vue

@ -24,8 +24,7 @@
<el-text style="width: 4vw;">付款币种</el-text> <el-text style="width: 4vw;">付款币种</el-text>
<el-select v-model="searchData.paymentCurrency" placeholder="请选择付款币种" style="width: 10vw;" <el-select v-model="searchData.paymentCurrency" placeholder="请选择付款币种" style="width: 10vw;"
clearable> clearable>
<el-option v-for="item in customOptions" :key="item" :label="item"
:value="item"/>
<el-option v-for="item in customOptions" :key="item" :label="item" :value="item" />
</el-select> </el-select>
</div> </div>
<div class="rowItem"> <div class="rowItem">
@ -39,7 +38,8 @@
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">活动名称</el-text> <el-text style="width: 4vw;">活动名称</el-text>
<el-select v-model="searchData.activity" placeholder="请选择活动方式" style="width: 10vw;" clearable> <el-select v-model="searchData.activity" placeholder="请选择活动方式" style="width: 10vw;" clearable>
<el-option v-for="item in activityList" :key="item.id" :label="item.activityName" :value="item.id"/>
<el-option v-for="item in activityList" :key="item.id" :label="item.activityName"
:value="item.id" />
</el-select> </el-select>
</div> </div>
<div class="rowItem"> <div class="rowItem">
@ -156,8 +156,8 @@
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<!-- 地区财务专属显示审核人信息 --> <!-- 地区财务专属显示审核人信息 -->
<el-table-column prop="auditName" label="审核人" <el-table-column prop="auditName" label="审核人"
v-if="activeTab == 'pass' || activeTab == 'reject' || activeTab == 'done'"
width="150px" show-overflow-tooltip></el-table-column>
v-if="activeTab == 'pass' || activeTab == 'reject' || activeTab == 'done'" width="150px"
show-overflow-tooltip></el-table-column>
<el-table-column prop="receivedTime" label="到账时间" <el-table-column prop="receivedTime" label="到账时间"
v-if="activeTab == 'pass' || activeTab == 'done'" width="180px"></el-table-column> v-if="activeTab == 'pass' || activeTab == 'done'" width="180px"></el-table-column>
<el-table-column prop="remark" label="备注" v-if="activeTab != 'reject'" width="150px" <el-table-column prop="remark" label="备注" v-if="activeTab != 'reject'" width="150px"
@ -169,10 +169,9 @@
<span v-else>正常</span> <span v-else>正常</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="auditTime" label="驳回时间" v-if="activeTab == 'reject'"
width="180px" show-overflow-tooltip></el-table-column>
<el-table-column prop="rejectReason" label="驳回理由" v-if="activeTab == 'reject'"
width="150px">
<el-table-column prop="auditTime" label="驳回时间" v-if="activeTab == 'reject'" width="180px"
show-overflow-tooltip></el-table-column>
<el-table-column prop="rejectReason" label="驳回理由" v-if="activeTab == 'reject'" width="150px">
<template #default="scope"> <template #default="scope">
<div class="ellipsis-container" <div class="ellipsis-container"
@mouseenter="handleMouseEnter($event, scope.row.rejectReason)" @mouseenter="handleMouseEnter($event, scope.row.rejectReason)"
@ -199,7 +198,8 @@
<el-link v-if="activeTab == 'wait'" style="color: #2741DE;" <el-link v-if="activeTab == 'wait'" style="color: #2741DE;"
@click="openAuditForm(scope.row)">审核 @click="openAuditForm(scope.row)">审核
</el-link> </el-link>
<el-link v-else-if="activeTab == 'pass' && !(scope.row.status == 6 || scope.row.status == 4)"
<el-link
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>
</template> </template>
@ -255,9 +255,9 @@
</el-form-item> </el-form-item>
<el-form-item label="转账凭证"> <el-form-item label="转账凭证">
<div class="pic"> <div class="pic">
<el-upload disabled="true" 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">
<el-upload disabled="true" 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.voucher" :src="auditFormData.voucher" class="avatar" <img v-if="auditFormData.voucher" :src="auditFormData.voucher" class="avatar"
style="height: 100%; width: 100%; object-fit: cover;" /> style="height: 100%; width: 100%; object-fit: cover;" />
<el-icon v-else class="avatar-uploader-icon"> <el-icon v-else class="avatar-uploader-icon">
@ -434,6 +434,12 @@ import { productList,MarketNameForId,CurrencyForId,marketList,statusList} from '
import CurrencySelect from '@/components/MoneyManage/CurrencySelect.vue' import CurrencySelect from '@/components/MoneyManage/CurrencySelect.vue'
import { Plus } from '@element-plus/icons-vue'; import { Plus } from '@element-plus/icons-vue';
// ===================== 1. =====================
const adminStore = useAdminStore();
const { menuTree } = storeToRefs(adminStore);
//===================== ================================= //===================== =================================
const tableData = ref([]) const tableData = ref([])
const searchData = ref({}) const searchData = ref({})

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

@ -20,7 +20,6 @@
<el-option v-for="item in marketList" :key="item" :label="item" :value="item" /> <el-option v-for="item in marketList" :key="item" :label="item" :value="item" />
</el-select> </el-select>
</div> </div>
<!-- 仅保留客服专属的订单状态筛选 -->
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">订单状态</el-text> <el-text style="width: 4vw;">订单状态</el-text>
<el-select v-model="searchData.status" placeholder="请选择订单状态" style="width: 10vw;" clearable> <el-select v-model="searchData.status" placeholder="请选择订单状态" style="width: 10vw;" clearable>
@ -55,7 +54,6 @@
@change="handleDatePickerChange" :default-time="defaultTime" @change="handleDatePickerChange" :default-time="defaultTime"
:disabled-date="disabledDate" /> :disabled-date="disabledDate" />
</div> </div>
<!-- 仅保留客服的查询重置按钮删除超级管理员相关按钮 -->
<div class="buttons"> <div class="buttons">
<el-button type="primary" @click="search">查询</el-button> <el-button type="primary" @click="search">查询</el-button>
<el-button type="success" @click="reset">重置</el-button> <el-button type="success" @click="reset">重置</el-button>
@ -124,7 +122,6 @@
<span v-else></span> <span v-else></span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 仅保留客服专属操作删除财务审核编辑手续费操作 -->
<el-table-column fixed="right" label="操作" width="120px"> <el-table-column fixed="right" label="操作" width="120px">
<template #default=scope> <template #default=scope>
<el-link v-if="scope.row.status == 4" style="color: #FA5A1E;" <el-link v-if="scope.row.status == 4" style="color: #FA5A1E;"
@ -141,7 +138,6 @@
</el-table> </el-table>
</div> </div>
<!-- 分页组件保留公共逻辑 -->
<div class="pagination"> <div class="pagination">
<el-pagination background :page-size="pageInfo.pageSize" :page-sizes="[5, 10, 20, 50, 100]" <el-pagination background :page-size="pageInfo.pageSize" :page-sizes="[5, 10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper" :total="total" layout="total, sizes, prev, pager, next, jumper" :total="total"
@ -151,7 +147,6 @@
</el-card> </el-card>
</div> </div>
<!-- 仅保留客服专属弹窗撤回确认退款确认新增/编辑收款退款弹窗 -->
<!-- 撤回确认弹窗 --> <!-- 撤回确认弹窗 -->
<div class="recallDialog" v-show="recallDialog"> <div class="recallDialog" v-show="recallDialog">
<div class="close"> <div class="close">
@ -194,19 +189,24 @@
<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="所属地区" required 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">
<el-input v-model="addFormData.activity" placeholder="请输入活动名称" />
<el-select v-model="addFormData.activity" placeholder="请选择活动方式" clearable>
<el-option v-for="item in activityList" :key="item.id" :label="item.activityName"
:value="item.id" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="产品名称" required @change="ifGold" prop="goodsName"> <el-form-item label="产品名称" required @change="ifGold" prop="goodsName">
<ProductSelect ref="productSelectRef" v-model="addFormData.goodsName"></ProductSelect> <ProductSelect ref="productSelectRef" v-model="addFormData.goodsName"></ProductSelect>
</el-form-item> </el-form-item>
<el-form-item v-show="!isGold" label="产品数量" required prop="goodNum"> <el-form-item v-show="!isGold" label="产品数量" required prop="goodNum">
<div style="padding-right: 50px; display: flex;">
<el-input style="padding-right: 10px;" v-model="addFormData.goodNum" placeholder="请输入产品数量" />
<span style="color: #999999;">{{ productUnit }}</span>
<div style="display: flex;">
<el-input style="padding-right: 30px; flex: 3;" v-model="addFormData.goodNum"
placeholder="请输入产品数量" />
<CurrencySelect v-model="addFormData.numUnit" :items="numUnitList" style="flex: 1.5;"
placeholder="单位" @change="handleCurrencyChange" />
</div> </div>
</el-form-item> </el-form-item>
<div v-show="isGold" style="margin-bottom: 15px; display: flex;"> <div v-show="isGold" style="margin-bottom: 15px; display: flex;">
@ -235,7 +235,7 @@
@change="ifGroup"> @change="ifGroup">
</CurrencySelect> </CurrencySelect>
</el-form-item> </el-form-item>
<el-form-item label="到账地区" required prop="receivedMarket">
<el-form-item label="到账地区" prop="receivedMarket">
<CurrencySelect v-model="addFormData.receivedMarket" :items="MoneyAddressOptions" <CurrencySelect v-model="addFormData.receivedMarket" :items="MoneyAddressOptions"
:disabled="isGroup" placeholder="请选择到账地区"> :disabled="isGroup" placeholder="请选择到账地区">
</CurrencySelect> </CurrencySelect>
@ -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="转账凭证" required 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="备注" required 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>
@ -394,7 +394,7 @@ import { hasMenuPermission } from '@/utils/menuTreePermission.js'
import _ from 'lodash' import _ from 'lodash'
// //
import { addFormRule } from './utils/recriveFormRules.js' import { addFormRule } from './utils/recriveFormRules.js'
import { productList, MarketNameForId, CurrencyForId, marketList, statusList } from './utils/staticData.js'
import { productList, MarketNameForId, CurrencyForId, marketList, statusList, numUnitList } from './utils/staticData.js'
// ===================== ===================== // ===================== =====================
const adminStore = useAdminStore(); const adminStore = useAdminStore();
@ -506,7 +506,6 @@ const addFormData = ref({ name: '', market: '', permanentGold: 0, freeGold: 0, g
const addFormRef = ref(null) // const addFormRef = ref(null) //
const addOrEdit = ref(0) // 1=2= const addOrEdit = ref(0) // 1=2=
const isGold = ref(false) // const isGold = ref(false) //
const productUnit = ref('个') //
const productSelectRef = ref(null) // const productSelectRef = ref(null) //
const uploadRef = ref(null) // const uploadRef = ref(null) //
@ -517,9 +516,14 @@ const ifGold = () => {
addFormData.value.goodNum = 0 addFormData.value.goodNum = 0
} else { } else {
isGold.value = false isGold.value = false
//
const selectItems = ["AI机构追踪", "AI机构出击", "AI机构资金", "AI机活跃度", "超级机构透视", "超级机构伏击", "超级机构猎杀", "超级机构脉搏", "超级机构罗盘", "静态信息费", "博股会员"]
productUnit.value = selectItems.includes(addFormData.value.goodsName) ? '年' : '个'
const selectItems = ["AI机构追踪", "AI机构出击", "AI机构资金", "AI机活跃度", "超级机构透视", "超级机构伏击", "超级机构猎杀", "超级机构脉搏", "超级机构罗盘", 'HC信息费']
if (selectItems.includes(addFormData.value.goodsName)) {
addFormData.value.numUnit = ''
} else if (addFormData.value.goodsName == '静态信息费') {
addFormData.value.numUnit = '年'
}else{
addFormData.value.numUnit = '个'
}
} }
} }
@ -742,8 +746,6 @@ const ifRefundGold = () => {
refundFormData.value.goodNum = 0 refundFormData.value.goodNum = 0
} else { } else {
isRefundGold.value = false isRefundGold.value = false
const selectItems = ["AI机构追踪", "AI机构出击", "AI机构资金", "AI机活跃度", "超级机构透视", "超级机构伏击", "超级机构猎杀", "超级机构脉搏", "超级机构罗盘", "静态信息费", "博股会员"]
productUnit.value = selectItems.includes(refundFormData.value.goodsName) ? '年' : '个'
} }
} }

11
src/views/moneyManage/receiveDetail/utils/recriveFormRules.js

@ -9,13 +9,12 @@ export const addFormRule = {
{ required: true, message: '请输入客户姓名', trigger: 'blur' } { required: true, message: '请输入客户姓名', trigger: 'blur' }
], ],
// 所属地区:必填 // 所属地区:必填
marketName: [
market: [
{ required: true, message: '请选择所属地区', trigger: 'blur' } { required: true, message: '请选择所属地区', trigger: 'blur' }
], ],
// 活动名称:必填 + 长度小于30 // 活动名称:必填 + 长度小于30
activity: [ activity: [
{ required: true, message: '请输入活动名称', trigger: 'blur' }, { required: true, message: '请输入活动名称', trigger: 'blur' },
{ max: 30, message: '活动名称长度不能超过30个字符', trigger: 'blur' }
], ],
// 产品名称:必填 // 产品名称:必填
goodsName: [ goodsName: [
@ -81,14 +80,6 @@ export const addFormRule = {
// 付款时间:必填 // 付款时间:必填
payTime: [ payTime: [
{ required: true, message: '请选择付款时间', trigger: 'change' } { required: true, message: '请选择付款时间', trigger: 'change' }
],
// 转账凭证:必填
voucher: [
{ required: true, message: '请上传转账凭证', trigger: 'change' }
],
// 备注:必填
remark: [
{ required: true, message: '请输入备注', trigger: 'blur' }
] ]
}; };

2
src/views/moneyManage/receiveDetail/utils/staticData.js

@ -257,3 +257,5 @@ export const statusList = [
value: 2 value: 2
}, },
] ]
export const numUnitList = ['个', '年', '月']
Loading…
Cancel
Save