-
添加收款
@@ -405,7 +404,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 +413,7 @@ const adminData = ref({}) // 管理员信息
const tableData = ref([]) // 表格数据
const total = ref(0) // 总条数
const pageInfo = ref({ pageSize: 10, pageNum: 1 }) // 分页信息
+const numUnitList = ref(['年', '月'])
// 角色标识:固定为客服(删除财务、总部财务、超级管理员标识)
const kefu = ref(true)
@@ -532,10 +532,13 @@ const ifGold = () => {
const selectItems = ["AI机构追踪", "AI机构出击", "AI机构资金", "AI机构活跃度", "超级机构透视", "超级机构伏击", "超级机构猎杀", "超级机构脉搏", "超级机构罗盘", 'HC信息费']
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 +552,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
}
@@ -561,12 +570,12 @@ const jwcodeSeachMarket = async () => {
url: '/cashCollection/getNameAndMarket',
data: addFormData.value.jwcode
})
- if(result.code == 200){
+ if (result.code == 200) {
ElMessage.success('客户信息查询成功')
addFormData.value.market = result.data.market
addFormData.value.marketName = result.data.marketName
addFormData.value.name = result.data.name
- }else{
+ } else {
ElMessage.error('客户不存在')
}
} catch (error) {
@@ -580,7 +589,9 @@ const openAddForm = (row) => {
if (row?.jwcode) {
// 编辑模式
addOrEdit.value = 2
- addFormData.value = { ...row }
+ addFormData.value = { ...row,
+ activity: row.activityId
+ }
jwcodeSeachMarket()
ifGold()
} else {
@@ -636,6 +647,7 @@ const handleAddForm = async () => {
// 客服编辑收款(撤回后重新提交)
const handleEditForm = async () => {
try {
+ await addFormRef.value.validate();
// 处理时间格式
if (addFormData.value.payTime) {
addFormData.value.payTime = moment(addFormData.value.payTime).format('YYYY-MM-DD HH:mm:ss')
@@ -665,7 +677,7 @@ const handleEditForm = async () => {
// 付款币种和支付方式选项(客服专用)
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);
@@ -828,7 +840,7 @@ const submitRefund = async () => {
try {
if (refundFormData.value.refundModel == 0) {
refundFormData.value.partRefundGold = refundFormData.value.permanentGold,
- refundFormData.value.partRefundFree = refundFormData.value.freeGold
+ refundFormData.value.partRefundFree = refundFormData.value.freeGold
}
const result = await request({
url: '/Money/add',