Browse Source

Merge branch 'milestone-20251104-现金二期' of http://39.101.133.168:8807/huangqizhen/gold-vue into milestone-20251104-现金二期

lihuilin/feature-20251104102812-现金二期
lihuilin 1 week ago
parent
commit
12d2955939
  1. 2
      src/components/MoneyManage/ProductSelect.vue
  2. 2
      src/components/dialogs/changePassword.vue
  3. 38
      src/views/moneyManage/receiveDetail/receiveFinance.vue
  4. 6
      src/views/moneyManage/receiveDetail/receiveHead.vue
  5. 38
      src/views/moneyManage/receiveDetail/receiveManage.vue
  6. 152
      src/views/moneyManage/receiveDetail/receiveService.vue
  7. 56
      src/views/moneyManage/receiveDetail/utils/recriveFormRules.js
  8. 89
      src/views/moneyManage/receiveDetail/utils/staticData.js

2
src/components/MoneyManage/ProductSelect.vue

@ -137,7 +137,7 @@ watch(selectedValue, (newVal) => {
const AIProduct = ['AI机构追踪', 'AI机构出击', 'AI机构资金', 'AI机构活跃度','AI机构探测神器']
const superProduct = ['超级机构透视', '超级机构伏击', '超级机构猎杀', '超级机构脉搏', '超级机构罗盘','超级机构探测神器']
const InfoFee = ['静态信息费', '博股会员']
const InfoFee = ['静态信息费', '博股会员','HC信息费']
const menuData = [
{
name: '美股',

2
src/components/dialogs/changePassword.vue

@ -114,7 +114,7 @@ const changePassword = async function () {
//
setTimeout(() => {
router.push('/PasswordSuccess');
router.push('/PasswordSuccess'); // pushreplace
}, 1000);
}else if (result.code === 0){
ElMessage.error('原密码错误,请重新输入')

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

@ -267,7 +267,6 @@
</template>
</el-dialog>
<!-- 仅保留地区财务相关弹窗审核弹窗编辑手续费弹窗 -->
<!-- 审核弹窗 -->
<el-dialog class="adddialog" v-model="auditFormisible" width="20vw" :before-close="closeAuditForm">
<el-form class="addForm" label-width="4vw" label-position="left">
@ -340,13 +339,13 @@
</el-icon>
</el-upload>
<el-text class="picText">
仅支持.jpg .png格式文件 1 MB
仅支持.jpg .png格式文件 2 MB
</el-text>
</div>
</el-form-item>
<el-form-item label="备注">
<el-input disabled="true" v-model="auditFormData.remark" type="textarea" :rows="3"
placeholder="请输入备注" maxlength="100" show-word-limit />
maxlength="100" show-word-limit />
</el-form-item>
<el-form-item label="驳回理由" v-if="ifReject" required>
<el-input v-model="auditFormData.rejectReason" type="textarea" :rows="3" placeholder="请输入驳回理由"
@ -370,7 +369,7 @@
</template>
</el-dialog>
<!-- 编辑填手续费弹窗地区财务核心编辑功能 -->
<!-- 编辑填手续费弹窗 -->
<el-dialog class="editdialog" v-model="editFormisible" width="20vw" :before-close="closeEditForm">
<div class="content">
<div class="left">
@ -447,7 +446,7 @@
<Plus />
</el-icon>
</el-upload>
<el-text class="picText">仅支持.jpg .png格式文件 1 MB</el-text>
<el-text class="picText">仅支持.jpg .png格式文件 2 MB</el-text>
</div>
</el-form-item>
<el-form-item label="备注">
@ -457,10 +456,9 @@
</el-form>
</div>
<div class="right">
<!-- 地区财务可编辑项仅到账相关信息 -->
<el-form ref="editFormRef" :rules="editFormRule" :model="editFormData" class="editFormRighrt"
label-width="4.5vw" label-position="left">
<el-form-item label="到账货币" required>
<el-form-item label="到账货币" >
<CurrencySelect v-model="editFormData.receivedCurrency" :items="customOptions"
placeholder="请选择到账货币" />
</el-form-item>
@ -470,7 +468,7 @@
<el-form-item label="手续费" prop="handlingCharge">
<el-input v-model="editFormData.handlingCharge" placeholder="请输入手续费" type="number" />
</el-form-item>
<el-form-item label="到账时间" required>
<el-form-item label="到账时间" >
<el-date-picker type="datetime" v-model="editFormData.receivedTime" placeholder="请选择到账时间" />
</el-form-item>
</el-form>
@ -969,6 +967,7 @@ const reset = () => {
searchData.value = {};
//
pageInfo.value.pageNum = 1;
getTime.value = []
getlist();
};
@ -1117,11 +1116,11 @@ const submitEditForm = async () => {
url: '/cashCollection/complete',
data: {
orderCode: editFormData.value.orderCode,
handlingCharge: editFormData.value.handlingCharge * 100, //
handlingCharge: editFormData.value.handlingCharge * 100 || null, //
paymentCurrency: CurrencyForId(editFormData.value.paymentCurrency),
paymentAmount: editFormData.value.paymentAmount * 100, //
receivedCurrency: CurrencyForId(editFormData.value.receivedCurrency),
receivedAmount: editFormData.value.receivedAmount * 100, //
receivedAmount: editFormData.value.receivedAmount * 100 || null, //
receivedTime: editFormData.value.receivedTime,
receivedRemark: editFormData.value.receivedRemark || ''
}
@ -1245,16 +1244,15 @@ onMounted(async () => {
//
await getlist();
//
if (!hasMenuPermission(menuTree.value, 67)) {
ElMessageBox.alert(
'您暂无该页面操作权限,请联系管理员',
'权限提示',
{ type: 'error' }
).then(() => {
window.history.back();
});
}
// if (!hasMenuPermission(menuTree.value, 67)) {
// ElMessageBox.alert(
// '',
// '',
// { type: 'error' }
// ).then(() => {
// window.history.back();
// });
// }
//
const bgImg = new Image();
bgImg.src = '/src/assets/receive-recall.png';

6
src/views/moneyManage/receiveDetail/receiveHead.vue

@ -301,7 +301,7 @@
<Plus />
</el-icon>
</el-upload>
<el-text class="picText">仅支持.jpg .png格式文件 1 MB</el-text>
<el-text class="picText">仅支持.jpg .png格式文件 2 MB</el-text>
</div>
</el-form-item>
<el-form-item label="备注">
@ -944,11 +944,11 @@ const submitEditForm = async () => {
url: '/cashCollection/complete',
data: {
orderCode: editFormData.value.orderCode,
handlingCharge: editFormData.value.handlingCharge * 100, //
handlingCharge: editFormData.value.handlingCharge * 100 || null, //
paymentCurrency: CurrencyForId(editFormData.value.paymentCurrency),
paymentAmount: editFormData.value.paymentAmount * 100, //
receivedCurrency: CurrencyForId(editFormData.value.receivedCurrency),
receivedAmount: editFormData.value.receivedAmount * 100, //
receivedAmount: editFormData.value.receivedAmount * 100 || null, //
receivedTime: editFormData.value.receivedTime,
receivedRemark: editFormData.value.receivedRemark || ''
}

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

@ -267,7 +267,6 @@
</template>
</el-dialog>
<!-- 仅保留地区财务相关弹窗审核弹窗编辑手续费弹窗 -->
<!-- 审核弹窗 -->
<el-dialog class="adddialog" v-model="auditFormisible" width="20vw" :before-close="closeAuditForm">
<el-form class="addForm" label-width="4vw" label-position="left">
@ -340,13 +339,13 @@
</el-icon>
</el-upload>
<el-text class="picText">
仅支持.jpg .png格式文件 1 MB
仅支持.jpg .png格式文件 2 MB
</el-text>
</div>
</el-form-item>
<el-form-item label="备注">
<el-input disabled="true" v-model="auditFormData.remark" type="textarea" :rows="3"
placeholder="请输入备注" maxlength="100" show-word-limit />
maxlength="100" show-word-limit />
</el-form-item>
<el-form-item label="驳回理由" v-if="ifReject" required>
<el-input v-model="auditFormData.rejectReason" type="textarea" :rows="3" placeholder="请输入驳回理由"
@ -370,7 +369,7 @@
</template>
</el-dialog>
<!-- 编辑填手续费弹窗地区财务核心编辑功能 -->
<!-- 编辑填手续费弹窗 -->
<el-dialog class="editdialog" v-model="editFormisible" width="20vw" :before-close="closeEditForm">
<div class="content">
<div class="left">
@ -447,7 +446,7 @@
<Plus />
</el-icon>
</el-upload>
<el-text class="picText">仅支持.jpg .png格式文件 1 MB</el-text>
<el-text class="picText">仅支持.jpg .png格式文件 2 MB</el-text>
</div>
</el-form-item>
<el-form-item label="备注">
@ -457,10 +456,9 @@
</el-form>
</div>
<div class="right">
<!-- 地区财务可编辑项仅到账相关信息 -->
<el-form ref="editFormRef" :rules="editFormRule" :model="editFormData" class="editFormRighrt"
label-width="4.5vw" label-position="left">
<el-form-item label="到账货币" required>
<el-form-item label="到账货币" >
<CurrencySelect v-model="editFormData.receivedCurrency" :items="customOptions"
placeholder="请选择到账货币" />
</el-form-item>
@ -470,7 +468,7 @@
<el-form-item label="手续费" prop="handlingCharge">
<el-input v-model="editFormData.handlingCharge" placeholder="请输入手续费" type="number" />
</el-form-item>
<el-form-item label="到账时间" required>
<el-form-item label="到账时间" >
<el-date-picker type="datetime" v-model="editFormData.receivedTime" placeholder="请选择到账时间" />
</el-form-item>
</el-form>
@ -969,6 +967,7 @@ const reset = () => {
searchData.value = {};
//
pageInfo.value.pageNum = 1;
getTime.value = []
getlist();
};
@ -1117,11 +1116,11 @@ const submitEditForm = async () => {
url: '/cashCollection/complete',
data: {
orderCode: editFormData.value.orderCode,
handlingCharge: editFormData.value.handlingCharge * 100, //
handlingCharge: editFormData.value.handlingCharge * 100 || null, //
paymentCurrency: CurrencyForId(editFormData.value.paymentCurrency),
paymentAmount: editFormData.value.paymentAmount * 100, //
receivedCurrency: CurrencyForId(editFormData.value.receivedCurrency),
receivedAmount: editFormData.value.receivedAmount * 100, //
receivedAmount: editFormData.value.receivedAmount * 100 || null, //
receivedTime: editFormData.value.receivedTime,
receivedRemark: editFormData.value.receivedRemark || ''
}
@ -1245,16 +1244,15 @@ onMounted(async () => {
//
await getlist();
//
if (!hasMenuPermission(menuTree.value, 67)) {
ElMessageBox.alert(
'您暂无该页面操作权限,请联系管理员',
'权限提示',
{ type: 'error' }
).then(() => {
window.history.back();
});
}
// if (!hasMenuPermission(menuTree.value, 67)) {
// ElMessageBox.alert(
// '',
// '',
// { type: 'error' }
// ).then(() => {
// window.history.back();
// });
// }
//
const bgImg = new Image();
bgImg.src = '/src/assets/receive-recall.png';

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

@ -66,7 +66,6 @@
<div class="div-card2">
<el-card class="card2">
<div class="btns">
<!-- 删除财务专属的标签页切换 -->
<div class="btnAdd">
<el-button @click="openAddForm" type="success">添加收款</el-button>
</div>
@ -201,7 +200,7 @@
<el-form-item label="产品名称" required @change="ifGold" prop="goodsName">
<ProductSelect ref="productSelectRef" v-model="addFormData.goodsName"></ProductSelect>
</el-form-item>
<el-form-item v-show="!isGold" label="产品数量" required prop="goodNum">
<el-form-item v-show="!isGold" label="产品数量" required>
<div style="display: flex;">
<el-input style="padding-right: 30px; flex: 3;" v-model="addFormData.goodNum"
placeholder="请输入产品数量" />
@ -213,13 +212,15 @@
<div style=" display: flex; ">
<span
style="color: #999999; display: flex; white-space: nowrap;align-items: center;">永久金币</span>
<el-input style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;"
<el-input placeholder="0"
style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;"
v-model="addFormData.permanentGold" />
</div>
<div style="padding-right: 5px; display: flex;">
<span
style="color: #999999; display: flex; white-space: nowrap;align-items: center;">免费金币</span>
<el-input style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;"
<el-input placeholder="0"
style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;"
v-model="addFormData.freeGold" />
</div>
</div>
@ -266,9 +267,9 @@
<span class="dialog-footer">
<el-button style="background-color: #7E91FF;" @click="closeAddForm">取消</el-button>
<el-button v-if="addOrEdit == 1" style="background-color: #2741DE; margin-left: 2.5vw;"
type="primary" @click="throttledhandleAddForm">确定</el-button>
type="primary" @click="throttledhandleAddForm" :disabled="ifAddDone">确定</el-button>
<el-button v-else-if="addOrEdit == 2" style="background-color: #2741DE; margin-left: 2.5vw;"
type="primary" @click="throttledhandleEditForm">编辑</el-button>
type="primary" @click="throttledhandleEditForm" :disabled="ifReAddDone">编辑</el-button>
</span>
</template>
</el-dialog>
@ -381,12 +382,23 @@
</div>
<div>ps:请在退款理由表明用户的退款需求</div>
<div style="display:flex;justify-content: center;margin-top: 5vh;">
<el-button type="default" @click="">重置</el-button>
<el-button type="default" @click="closeRefundForm">取消</el-button>
<el-button type="primary" @click="throttledsubmitRefund">提交</el-button>
</div>
</div>
</div>
</el-dialog>
<!-- 查看驳回理由 -->
<el-dialog title="驳回理由" v-model="rejectReasonVisible" width="50%" top="30vh"
style="min-width: 200px; max-width: 500px;" :before-close="closeRejectForm">
<div class="reject-reason-box">
{{ rejectReason }}
</div>
<div class="rejectBtn">
<el-button type="primary" @click="closeRejectForm">确定</el-button>
</div>
</el-dialog>
</div>
</template>
@ -405,7 +417,7 @@ import { hasMenuPermission } from '@/utils/menuTreePermission.js'
import _ from 'lodash'
//
import { addFormRule } from './utils/recriveFormRules.js'
import { productList, MarketNameForId, CurrencyForId, marketList, statusList, numUnitList } from './utils/staticData.js'
import { productList, MarketNameForId, CurrencyForId, marketList, statusList } from './utils/staticData.js'
// ===================== =====================
const adminStore = useAdminStore();
@ -414,6 +426,11 @@ const adminData = ref({}) // 管理员信息
const tableData = ref([]) //
const total = ref(0) //
const pageInfo = ref({ pageSize: 10, pageNum: 1 }) //
const numUnitList = ref(['年', '月'])
//
const ifAddDone = ref(false)
const ifReAddDone = ref(false)
//
const kefu = ref(true)
@ -441,6 +458,16 @@ const reset = () => {
getlist()
}
const rejectReasonVisible = ref(false)
const rejectReason = ref('')
const closeRejectForm = () => {
rejectReasonVisible.value = false
}
const openRejectReason = (reason) => {
rejectReason.value = reason
rejectReasonVisible.value = true
}
//
const handleDatePickerChange = () => { }
//
@ -529,13 +556,17 @@ const ifGold = () => {
addFormData.value.goodNum = 0
} else {
isGold.value = false
const selectItems = ["AI机构追踪", "AI机构出击", "AI机构资金", "AI机构活跃度", "超级机构透视", "超级机构伏击", "超级机构猎杀", "超级机构脉搏", "超级机构罗盘", 'HC信息费']
numUnitList.value = ['个', '年', '月']
const selectItems = ["AI机构追踪", "AI机构出击", "AI机构资金", "AI机构活跃度", "超级机构透视", "超级机构伏击", "超级机构猎杀", "超级机构脉搏", "超级机构罗盘", 'HC信息费', 'HC信息费', 'AI机构探测神器', '超级机构探测神器']
if (selectItems.includes(addFormData.value.goodsName)) {
addFormData.value.numUnit = ''
numUnitList.value = ['年', '月']
} else if (addFormData.value.goodsName == '静态信息费') {
addFormData.value.numUnit = '年'
numUnitList.value = ['年']
} else {
addFormData.value.numUnit = '个'
numUnitList.value = ['个']
}
}
}
@ -549,6 +580,12 @@ const ifGroup = () => {
} else if (addFormData.value.payType === 'Ipay88-链接收款') {
isGroup.value = true
addFormData.value.receivedMarket = '马来西亚'
} else if (addFormData.value.payType === 'E-Transfer') {
isGroup.value = true
addFormData.value.receivedMarket = '加拿大'
} else if (addFormData.value.payType === 'Grabpay' || addFormData.value.payType === 'Nets' || addFormData.value.payType === 'Paypal') {
isGroup.value = true
addFormData.value.receivedMarket = '新加坡'
} else {
isGroup.value = false
}
@ -580,7 +617,9 @@ const openAddForm = (row) => {
if (row?.jwcode) {
//
addOrEdit.value = 2
addFormData.value = { ...row }
addFormData.value = {
...row,
}
jwcodeSeachMarket()
ifGold()
} else {
@ -599,15 +638,56 @@ const closeAddForm = () => {
isGold.value = false
addFormRef.value?.resetFields();
}
const testGold = () => {
//
if (addFormData.value.goodsName == '金币充值') {
if (addFormData.value.permanentGold == null) {
addFormData.value.permanentGold = 0
}
if (addFormData.value.freeGold == null) {
addFormData.value.freeGold = 0
}
const permanentGold = Number(addFormData.value.permanentGold);
const freeNum = Number(addFormData.value.freeGold);
// 0-9999990
const reg = /^[0-9]{1,6}$/;
if (!reg.test(permanentGold) || permanentGold < 0) {
return { valid: false, message: '请检查永久金币格式' };
}
if (!reg.test(freeNum) || freeNum < 0) {
return { valid: false, message: '请检查免费金币格式' };
}
if (permanentGold == 0 && freeNum == 0) {
return { valid: false, message: '永久金币或免费金币不能同为0' };
}
}
return { valid: true };
}
//
const handleAddForm = async () => {
try {
await addFormRef.value.validate();
if (!testGold().valid) {
ElMessage.error(testGold().message);
return;
}
//
if (!isGold.value) {
if (!addFormData.value.goodNum) {
ElMessage.error('请输入产品数量');
return;
}
const positiveIntReg = /^[1-9]\d*$/;
if (!positiveIntReg.test(addFormData.value.goodNum)) {
ElMessage.error('产品数量必须为正整数');
return;
}
}
//
if (addFormData.value.payTime) {
addFormData.value.payTime = moment(addFormData.value.payTime).format('YYYY-MM-DD HH:mm:ss')
}
ifAddDone.value = true
const result = await request({
url: '/cashCollection/add',
data: {
@ -627,19 +707,39 @@ const handleAddForm = async () => {
getlist()
closeAddForm()
}
ifAddDone.value = false
} catch (error) {
console.log('新增报错:', error);
ElMessage.error('请完善表单信息后提交');
ifAddDone.value = false
}
}
//
const handleEditForm = async () => {
try {
await addFormRef.value.validate();
if (!testGold().valid) {
ElMessage.error(testGold().message);
return;
}
//
if (!isGold.value) {
if (!addFormData.value.goodNum) {
ElMessage.error('请输入产品数量');
return;
}
const positiveIntReg = /^[1-9]\d*$/;
if (!positiveIntReg.test(addFormData.value.goodNum)) {
ElMessage.error('产品数量必须为正整数');
return;
}
}
//
if (addFormData.value.payTime) {
addFormData.value.payTime = moment(addFormData.value.payTime).format('YYYY-MM-DD HH:mm:ss')
}
ifReAddDone.value = true
const result = await request({
url: '/cashCollection/reSubmit',
data: {
@ -650,7 +750,7 @@ const handleEditForm = async () => {
goodNum: addFormData.value.goodNum || 0,
paymentCurrency: CurrencyForId(addFormData.value.paymentCurrency) || '',
receivedMarket: MarketNameForId(addFormData.value.receivedMarket) || '',
paymentAmount: (addFormData.value.paymentAmount) * 100
paymentAmount: (addFormData.value.paymentAmount) * 100,
}
})
if (result.code == 200) {
@ -658,14 +758,16 @@ const handleEditForm = async () => {
getlist()
closeAddForm()
}
ifReAddDone.value = false
} catch (error) {
console.log(error);
ifReAddDone.value = false
}
}
//
const customOptions = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)'])
const paytypeOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"])
const paytypeOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "Grabpay", "Nets", "E-Transfer", "Paypal", "银行转账", "刷卡", "现金", "支票"])
const MoneyAddressOptions = ref(['马来西亚', '香港', '新加坡', '泰国', '越南HCM', '加拿大'])
const handleCurrencyChange = (option) => {
console.log('选中的币种:', option);
@ -829,6 +931,11 @@ const submitRefund = async () => {
if (refundFormData.value.refundModel == 0) {
refundFormData.value.partRefundGold = refundFormData.value.permanentGold,
refundFormData.value.partRefundFree = refundFormData.value.freeGold
} else if (refundFormData.value.refundModel == 1) {
if (refundFormData.value.partRefundGold > refundFormData.value.permanentGold || refundFormData.value.partRefundFree > refundFormData.value.freeGold) {
ElMessage.error('退款金额不能大于订单金额')
return
}
}
const result = await request({
url: '/Money/add',
@ -861,13 +968,6 @@ const submitRefund = async () => {
}
}
//
const openRejectReason = (reason) => {
ElMessageBox.alert(reason, '驳回理由', {
confirmButtonText: '确认',
customClass: 'reject-reason-box',
})
}
// ===================== =====================
//
@ -1174,14 +1274,14 @@ onMounted(async () => {
background-color: #E5EBFE !important;
}
//
.reject-reason-box {
--el-message-box-height: 500px;
width: 80%;
padding: 20px;
}
.reject-reason-box .el-message-box__content {
max-height: 350px;
overflow-y: auto;
white-space: pre-wrap;
.rejectBtn {
margin-top: 20px;
display: flex;
justify-content: flex-end;
}
</style>

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

@ -24,30 +24,6 @@ export const addFormRule = {
goodNum: [
{ required: true, message: '请输入产品数量', trigger: 'blur' },
],
// 永久金币:纯数字(非必填,可按需调整)
permanentGold: [
{
validator: (rule, value, callback) => {
if (value && !/^\d+$/.test(value)) {
callback(new Error('请输入纯数字'));
} else {
callback();
}
}, trigger: 'blur'
}
],
// 免费金币:纯数字(非必填,可按需调整)
freeGold: [
{
validator: (rule, value, callback) => {
if (value && !/^\d+$/.test(value)) {
callback(new Error('请输入纯数字'));
} else {
callback();
}
}, trigger: 'blur'
}
],
// 付款币种:必填
paymentCurrency: [
{ required: true, message: '请选择付款币种', trigger: 'change' }
@ -57,16 +33,22 @@ export const addFormRule = {
{ required: true, message: '请输入付款金额', trigger: 'blur' },
{
validator: (rule, value, callback) => {
if (!/^\d+$/.test(value)) {
callback(new Error('请输入纯数字'));
} else if (value.length >= 8) {
callback(new Error('付款金额不能超过7位数字'));
} else if (Number(value) === 0) {
// 匹配非负数字(支持整数或最多2位小数)
const reg = /^\d+(\.\d{1,2})?$/;
if (!reg.test(value)) {
callback(new Error('请输入有效的金额(最多2位小数)'));
} else {
const num = Number(value);
if (num === 0) {
callback(new Error('付款金额不能为0'));
} else if (num > 9999999) { // 限制最大值为9999999(7位整数)
callback(new Error('付款金额不能超过9999999'));
} else {
callback();
}
}, trigger: 'blur'
}
},
trigger: 'blur'
}
],
// 支付方式:必填
@ -82,24 +64,20 @@ export const addFormRule = {
{ required: true, message: '请选择付款时间', trigger: 'change' }
]
};
//填手续费校验规则
export const editFormRule = {
// 到账金额:最大6位(整数部分最多4位,小数2位),支持两位小数
// 到账金额:正数,整数部分最多6位,小数部分最多2位(支持纯小数如 0.1、0.99)
receivedAmount: [
{ required: true, message: '请输入到账金额', trigger: 'blur' },
{
pattern: /^\d{1,6}(\.\d{1,2})?$/,
pattern: /^(0\.\d{1,2}|[1-9]\d{0,5}(\.\d{1,2})?)$/, // 修正:添加 / 包裹正则
message: '请检查到账金额格式',
trigger: 'blur'
}
],
// 手续费:同到账金额规则
// 手续费:正数,整数部分最多6位,小数部分最多2位(不支持纯0开头的小数如 0.1,需从1开始)
handlingCharge: [
{ required: true, message: '请输入手续费', trigger: 'blur' },
{
pattern: /^\d{1,6}(\.\d{1,2})?$/,
message: '请检查手续费格式',
pattern: /^\d{1,6}(\.\d{1,2})?$/, // 注意:此正则允许 0 开头(如 0123 不符合整数规范)
message: '整数部分最多6位,小数部分最多2位',
trigger: 'blur'
}
],

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

@ -21,110 +21,99 @@ export const productList = [
"value": "美股",
"label": "美股",
"children": [
{
"value": "美股软件",
"label": "美股软件"
}
{ "value": "美股软件", "label": "美股软件" },
{ "value": "美股金卡", "label": "美股金卡" },
{ "value": "美股套餐", "label": "美股套餐" }
]
},
{
"value": "港股",
"label": "港股",
"children": [
{
"value": "港股软件",
"label": "港股软件"
}
{ "value": "港股软件", "label": "港股软件" },
{ "value": "港股金卡", "label": "港股金卡" },
{ "value": "港股套餐", "label": "港股套餐" }
]
},
{
"value": "A股",
"label": "A股",
"children": [
{
"value": "A股软件",
"label": "A股软件"
}
{ "value": "A股软件", "label": "A股软件" },
{ "value": "A股金卡", "label": "A股金卡" },
{ "value": "A股套餐", "label": "A股套餐" }
]
},
{
"value": "新加坡股",
"label": "新加坡股",
"children": [
{
"value": "新加坡股软件",
"label": "新加坡股软件"
}
{ "value": "新加坡股软件", "label": "新加坡股软件" },
{ "value": "新加坡股金卡", "label": "新加坡股金卡" },
{ "value": "新加坡股套餐", "label": "新加坡股套餐" }
]
},
{
"value": "马股",
"label": "马股",
"children": [
{
"value": "马股软件",
"label": "马股软件"
}
{ "value": "马股软件", "label": "马股软件" },
{ "value": "马股金卡", "label": "马股金卡" },
{ "value": "马股套餐", "label": "马股套餐" }
]
},
{
"value": "日本股",
"label": "日本股",
"children": [
{
"value": "日本股软件",
"label": "日本股软件"
}
{ "value": "日本股软件", "label": "日本股软件" },
{ "value": "日本股金卡", "label": "日本股金卡" },
{ "value": "日本股套餐", "label": "日本股套餐" }
]
},
{
"value": "泰股",
"label": "泰股",
"children": [
{
"value": "泰股软件",
"label": "泰股软件"
}
{ "value": "泰股软件", "label": "泰股软件" },
{ "value": "泰股金卡", "label": "泰股金卡" },
{ "value": "泰股套餐", "label": "泰股套餐" }
]
},
{
"value": "越南股",
"label": "越南股",
"children": [
{
"value": "越南股软件",
"label": "越南股软件"
}
{ "value": "越南股软件", "label": "越南股软件" },
{ "value": "越南股金卡", "label": "越南股金卡" },
{ "value": "越南股套餐", "label": "越南股套餐" }
]
},
{
"value": "印尼股",
"label": "印尼股",
"children": [
{
"value": "印尼股软件",
"label": "印尼股软件"
}
{ "value": "印尼股软件", "label": "印尼股软件" },
{ "value": "印尼股金卡", "label": "印尼股金卡" },
{ "value": "印尼股套餐", "label": "印尼股套餐" }
]
},
{
"value": "韩国股",
"label": "韩国股",
"children": [
{
"value": "韩国股软件",
"label": "韩国股软件"
}
{ "value": "韩国股软件", "label": "韩国股软件" },
{ "value": "韩国股金卡", "label": "韩国股金卡" },
{ "value": "韩国股套餐", "label": "韩国股套餐" }
]
},
{
"value": "台湾股",
"label": "台湾股",
"children": [
{
"value": "台湾股软件",
"label": "台湾股软件"
}
{ "value": "台湾股软件", "label": "台湾股软件" },
{ "value": "台湾股金卡", "label": "台湾股金卡" },
{ "value": "台湾股套餐", "label": "台湾股套餐" }
]
}
]
@ -148,6 +137,10 @@ export const productList = [
{
"value": "AI机构活跃度",
"label": "AI机构活跃度"
},
{
"value": "AI机构探测神器",
"label": "AI机构探测神器"
}
]
},
@ -174,6 +167,10 @@ export const productList = [
{
"value": "超级机构罗盘",
"label": "超级机构罗盘"
},
{
"value": "超级机构探测神器",
"label": "超级机构探测神器"
}
]
},
@ -188,6 +185,10 @@ export const productList = [
{
"value": "博股会员",
"label": "博股会员"
},
{
"value": "HC信息费",
"label": "HC信息费"
}
]
}

Loading…
Cancel
Save