diff --git a/src/views/moneyManage/executor/executor.vue b/src/views/moneyManage/executor/executor.vue index d4470d6..be07c25 100644 --- a/src/views/moneyManage/executor/executor.vue +++ b/src/views/moneyManage/executor/executor.vue @@ -247,6 +247,7 @@ const adminStore = useAdminStore() const { adminData, menuTree } = storeToRefs(adminStore) import { permissionMapping, findMenuById } from "@/utils/menuTreePermission.js" import moment from 'moment' +import { isNumber } from 'lodash' const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload' const dateRange = ref([]) @@ -280,9 +281,13 @@ const getRefund = async function () { statusesParam.value = [40, 41] } - if (searchForm.value.goodsName) { - searchForm.value.goodsName = searchForm.value.goodsName[searchForm.value.goodsName.length - 1] - } + const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 + ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' + + if(searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)){ + ElMessage.error('精网号必须为数字') + return + } const params = { pageNum: pagination.value.pageNum, @@ -291,7 +296,7 @@ const getRefund = async function () { jwcode: searchForm.value.jwcode, name: searchForm.value.name, markets: searchForm.value.markets, - goodsName: searchForm.value.goodsName, + goodsName: goodsName, statuses: statusesParam.value,//10:地区财务待审核;12:地区财务驳回; // 20:地区负责人待审核;22:地区负责人驳回; // 30:总部财务待审核;32:总部财务驳回; @@ -398,78 +403,8 @@ const hideEditDialog = () => { jwcode: '' } } -const channelOptions = ref([{ - value: '银行转账', - label: '银行转账' -}, -{ - value: '刷卡', - label: '刷卡' -}, -{ - value: '现金', - label: '现金' -}, -{ - value: '支票', - label: '支票' -}, -{ - value: 'Grabpay', - label: 'Grabpay' -}, -{ - value: 'Nets', - label: 'Nets' -}, -{ - value: 'E-Transfer', - label: 'E-Transfer' -}, -{ - value: 'PayPal', - label: 'PayPal' -}, -{ - value: 'Stripe-链接收款', - label: 'Stripe-链接收款' -}, -{ - value: 'PaymentAsia-链接收款', - label: 'PaymentAsia-链接收款' -}, -{ - value: 'Ipay88-链接收款', - label: 'Ipay88-链接收款' -} -]) - -const currencies = ref([ - { - value: '新币', - label: '新币' - }, - { - value: '港币', - label: '港币' - }, - { - value: '马币', - label: '马币' - }, - { - value: '加币', - label: '加币' - }, - { - value: '泰铢', - label: '泰铢' - }, - { - value: '越南盾', - label: '越南盾' - } -]) +const currencies = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)']) +const channelOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"]) // 预览图片函数 const previewImage = (imageUrl) => { diff --git a/src/views/moneyManage/refundDetail/refundCharge.vue b/src/views/moneyManage/refundDetail/refundCharge.vue index d9a6f04..b8126fb 100644 --- a/src/views/moneyManage/refundDetail/refundCharge.vue +++ b/src/views/moneyManage/refundDetail/refundCharge.vue @@ -31,14 +31,13 @@
付款币种 - +
支付方式 - +
@@ -350,6 +349,7 @@ import { permissionMapping, findMenuById, hasMenuPermission } from "@/utils/menu import moment from 'moment' import { productList } from '@/views/moneyManage/receiveDetail/utils/staticData.js' import RefundChargeBackground from '@/assets/images/refund-progress.png' +import { isNumber } from 'lodash' const currentStep = ref(0)// 进度图 const searchForm = ref({ @@ -393,77 +393,8 @@ const statusStepMap = { 40: [7, false], 41: [8, false] } -const currencies = ref([ - { - value: '新币', - label: '新币' - }, - { - value: '港币', - label: '港币' - }, - { - value: '马币', - label: '马币' - }, - { - value: '加币', - label: '加币' - }, - { - value: '泰铢', - label: '泰铢' - }, - { - value: '越南盾', - label: '越南盾' - } -]) -const channelOptions = ref([{ - value: '银行转账', - label: '银行转账' -}, -{ - value: '刷卡', - label: '刷卡' -}, -{ - value: '现金', - label: '现金' -}, -{ - value: '支票', - label: '支票' -}, -{ - value: 'Grabpay', - label: 'Grabpay' -}, -{ - value: 'Nets', - label: 'Nets' -}, -{ - value: 'E-Transfer', - label: 'E-Transfer' -}, -{ - value: 'PayPal', - label: 'PayPal' -}, -{ - value: 'Stripe-链接收款', - label: 'Stripe-链接收款' -}, -{ - value: 'PaymentAsia-链接收款', - label: 'PaymentAsia-链接收款' -}, -{ - value: 'Ipay88-链接收款', - label: 'Ipay88-链接收款' -} -]) +const currencies = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)']) +const channelOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"]) const statusList = ref(['待审核', '审核通过', '已驳回', '退款成功']) // 查全部 const getRefund = async function () { @@ -485,8 +416,12 @@ const getRefund = async function () { statuses.value = [20, 22, 30, 32, 40, 41] } - if (searchForm.value.goodsName) { - searchForm.value.goodsName = searchForm.value.goodsName[searchForm.value.goodsName.length - 1] + const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 + ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' + + if(searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)){ + ElMessage.error('精网号必须为数字') + return } const params = { @@ -496,7 +431,7 @@ const getRefund = async function () { jwcode: searchForm.value.jwcode,//精网号 name: searchForm.value.name,//姓名 markets: searchForm.value.markets,//地区 - goodsName: searchForm.value.goodsName,//商品名 + goodsName: goodsName,//商品名 statuses: statuses.value,//10:地区财务待审核;12:地区财务驳回; // 20:地区负责人待审核;22:地区负责人驳回; // 30:总部财务待审核;32:总部财务驳回; @@ -647,10 +582,13 @@ const exportExcel = async function () { statuses.value = [20, 22, 30, 32, 40, 41] } - if (searchForm.value.goodsName) { - searchForm.value.goodsName = searchForm.value.goodsName[searchForm.value.goodsName.length - 1] - } + const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 + ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' + if(searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)){ + ElMessage.error('精网号必须为数字') + return + } const params = { pageNum: pagination.value.pageNum, @@ -659,7 +597,7 @@ const exportExcel = async function () { jwcode: searchForm.value.jwcode,//精网号 name: searchForm.value.name,//姓名 markets: searchForm.value.markets,//地区 - goodsName: searchForm.value.goodsName,//商品名 + goodsName: goodsName,//商品名 statuses: statuses.value,//10:地区财务待审核;12:地区财务驳回; // 20:地区负责人待审核;22:地区负责人驳回; // 30:总部财务待审核;32:总部财务驳回; diff --git a/src/views/moneyManage/refundDetail/refundFinance.vue b/src/views/moneyManage/refundDetail/refundFinance.vue index 09ae3d5..1d68e31 100644 --- a/src/views/moneyManage/refundDetail/refundFinance.vue +++ b/src/views/moneyManage/refundDetail/refundFinance.vue @@ -349,6 +349,7 @@ import { permissionMapping, findMenuById, hasMenuPermission } from "@/utils/menu import moment from 'moment' import { productList } from '@/views/moneyManage/receiveDetail/utils/staticData.js' import RefundFinanceBackground from '@/assets/images/refund-progress.png' +import { isNumber } from 'lodash' const currentStep = ref(0)// 进度图 const searchForm = ref({ @@ -476,8 +477,12 @@ const getRefund = async function () { statusParam.value = [10, 20, 22, 30, 32, 40, 41] } - if (searchForm.value.goodsName) { - searchForm.value.goodsName = searchForm.value.goodsName[searchForm.value.goodsName.length - 1] + const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 + ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' + + if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) { + ElMessage.error('精网号必须为数字') + return } const params = { @@ -487,7 +492,7 @@ const getRefund = async function () { jwcode: searchForm.value.jwcode,//精网号 name: searchForm.value.name,//姓名 markets: searchForm.value.markets,//地区 - goodsName: searchForm.value.goodsName,//商品名 + goodsName: goodsName,//商品名 statuses: statusParam.value,//10:地区财务待审核;12:地区财务驳回; // 20:地区负责人待审核;22:地区负责人驳回; // 30:总部财务待审核;32:总部财务驳回; @@ -570,77 +575,9 @@ const handleReject = async function () { ElMessage.error(error.message || '审核失败') } } -const currencies = ref([ - { - value: '新币', - label: '新币' - }, - { - value: '港币', - label: '港币' - }, - { - value: '马币', - label: '马币' - }, - { - value: '加币', - label: '加币' - }, - { - value: '泰铢', - label: '泰铢' - }, - { - value: '越南盾', - label: '越南盾' - } -]) -const channelOptions = ref([{ - value: '银行转账', - label: '银行转账' -}, -{ - value: '刷卡', - label: '刷卡' -}, -{ - value: '现金', - label: '现金' -}, -{ - value: '支票', - label: '支票' -}, -{ - value: 'Grabpay', - label: 'Grabpay' -}, -{ - value: 'Nets', - label: 'Nets' -}, -{ - value: 'E-Transfer', - label: 'E-Transfer' -}, -{ - value: 'PayPal', - label: 'PayPal' -}, -{ - value: 'Stripe-链接收款', - label: 'Stripe-链接收款' -}, -{ - value: 'PaymentAsia-链接收款', - label: 'PaymentAsia-链接收款' -}, -{ - value: 'Ipay88-链接收款', - label: 'Ipay88-链接收款' -} -]) +const currencies = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)']) +const channelOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"]) + const getMarket = async function () { try { const result = await API({ @@ -707,6 +644,15 @@ const exportExcel = async function () { } else { statusParam.value = [10, 20, 22, 30, 32, 40, 41] } + + const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 + ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' + + if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) { + ElMessage.error('精网号必须为数字') + return + } + const params = { pageNum: pagination.value.pageNum, pageSize: pagination.value.pageSize, @@ -714,7 +660,7 @@ const exportExcel = async function () { jwcode: searchForm.value.jwcode,//精网号 name: searchForm.value.name,//姓名 markets: searchForm.value.markets,//地区 - goodsName: searchForm.value.goodsName[searchForm.value.goodsName.length - 1],//商品名 + goodsName: goodsName,//商品名 statuses: statusParam.value,//10:地区财务待审核;12:地区财务驳回; // 20:地区负责人待审核;22:地区负责人驳回; // 30:总部财务待审核;32:总部财务驳回; diff --git a/src/views/moneyManage/refundDetail/refundHeader.vue b/src/views/moneyManage/refundDetail/refundHeader.vue index 6c9946a..9818b6f 100644 --- a/src/views/moneyManage/refundDetail/refundHeader.vue +++ b/src/views/moneyManage/refundDetail/refundHeader.vue @@ -361,7 +361,7 @@ const { adminData, menuTree } = storeToRefs(adminStore) import { permissionMapping, findMenuById, hasMenuPermission } from "@/utils/menuTreePermission.js" import moment from 'moment' import { productList } from '@/views/moneyManage/receiveDetail/utils/staticData.js' - +import { isNumber } from 'lodash' const startsWith1 = (mainStr, prefix) => { // 处理前缀为空字符串的情况(空字符串是所有字符串的前缀) if (prefix === '') { @@ -417,77 +417,9 @@ const statusStepMap = { 40: [7, false], 41: [8, false] } -const currencies = ref([ - { - value: '新币', - label: '新币' - }, - { - value: '港币', - label: '港币' - }, - { - value: '马币', - label: '马币' - }, - { - value: '加币', - label: '加币' - }, - { - value: '泰铢', - label: '泰铢' - }, - { - value: '越南盾', - label: '越南盾' - } -]) -const channelOptions = ref([{ - value: '银行转账', - label: '银行转账' -}, -{ - value: '刷卡', - label: '刷卡' -}, -{ - value: '现金', - label: '现金' -}, -{ - value: '支票', - label: '支票' -}, -{ - value: 'Grabpay', - label: 'Grabpay' -}, -{ - value: 'Nets', - label: 'Nets' -}, -{ - value: 'E-Transfer', - label: 'E-Transfer' -}, -{ - value: 'PayPal', - label: 'PayPal' -}, -{ - value: 'Stripe-链接收款', - label: 'Stripe-链接收款' -}, -{ - value: 'PaymentAsia-链接收款', - label: 'PaymentAsia-链接收款' -}, -{ - value: 'Ipay88-链接收款', - label: 'Ipay88-链接收款' -} -]) +const currencies = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)']) +const channelOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"]) + const statusList = ref(['待审核', '审核通过', '已驳回', '退款成功']) const executorList = ref([ { @@ -543,8 +475,12 @@ const getRefund = async function () { statusParam.value = [30, 32, 40, 41] } - if (searchForm.value.goodsName) { - searchForm.value.goodsName = searchForm.value.goodsName[searchForm.value.goodsName.length - 1] + const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 + ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' + + if(searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)){ + ElMessage.error('精网号必须为数字') + return } const params = { @@ -554,7 +490,7 @@ const getRefund = async function () { jwcode: searchForm.value.jwcode, name: searchForm.value.name, markets: searchForm.value.markets, - goodsName: searchForm.value.goodsName, + goodsName: goodsName, statuses: statusParam.value, paymentCurrency: searchForm.value.paymentCurrency, payType: searchForm.value.payType, @@ -686,9 +622,13 @@ const exportExcel = async function () { statusParam.value = [30, 32, 40, 41] } - if (searchForm.value.goodsName) { - searchForm.value.goodsName = searchForm.value.goodsName[searchForm.value.goodsName.length - 1] - } + const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 + ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' + + if(searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)){ + ElMessage.error('精网号必须为数字') + return + } const params = { pageNum: pagination.value.pageNum, @@ -697,7 +637,7 @@ const exportExcel = async function () { jwcode: searchForm.value.jwcode, name: searchForm.value.name, markets: searchForm.value.markets, - goodsName: searchForm.value.goodsName, + goodsName: goodsName, statuses: statusParam.value, paymentCurrency: searchForm.value.paymentCurrency, payType: searchForm.value.payType, diff --git a/src/views/moneyManage/refundDetail/refundService.vue b/src/views/moneyManage/refundDetail/refundService.vue index 41b9ea8..549048d 100644 --- a/src/views/moneyManage/refundDetail/refundService.vue +++ b/src/views/moneyManage/refundDetail/refundService.vue @@ -234,6 +234,7 @@ import ConfirmDialog from '@/components/dialogs/ConfirmDialog.vue' import { pa } from 'element-plus/es/locales.mjs' import { productList } from '@/views/moneyManage/receiveDetail/utils/staticData.js' import RefundRecallBackground from '@/assets/images/refund-recall.png' +import { isNumber } from 'lodash' const dateRange = ref([]) const searchForm = ref({ @@ -283,8 +284,12 @@ const getRefund = async function () { statusParam.value = [12, 22, 32] } - if (searchForm.value.goodsName) { - searchForm.value.goodsName = searchForm.value.goodsName[searchForm.value.goodsName.length - 1] + const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 + ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' + + if(searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)){ + ElMessage.error('精网号必须为数字') + return } const params = { @@ -294,7 +299,7 @@ const getRefund = async function () { jwcode: searchForm.value.jwcode,//精网号 name: searchForm.value.name,//姓名 markets: searchForm.value.market,//地区 - goodsName: searchForm.value.goodsName,//商品名 + goodsName: goodsName,//商品名 statuses: statusParam.value,//10:地区财务待审核;12:地区财务驳回; // 20:地区负责人待审核;22:地区负责人驳回; // 30:总部财务待审核;32:总部财务驳回; @@ -446,77 +451,9 @@ const cancelEdit = function () { } showEdit.value = false } -const currencies = ref([ - { - value: '新币', - label: '新币' - }, - { - value: '港币', - label: '港币' - }, - { - value: '马币', - label: '马币' - }, - { - value: '加币', - label: '加币' - }, - { - value: '泰铢', - label: '泰铢' - }, - { - value: '越南盾', - label: '越南盾' - } -]) -const channelOptions = ref([{ - value: '银行转账', - label: '银行转账' -}, -{ - value: '刷卡', - label: '刷卡' -}, -{ - value: '现金', - label: '现金' -}, -{ - value: '支票', - label: '支票' -}, -{ - value: 'Grabpay', - label: 'Grabpay' -}, -{ - value: 'Nets', - label: 'Nets' -}, -{ - value: 'E-Transfer', - label: 'E-Transfer' -}, -{ - value: 'PayPal', - label: 'PayPal' -}, -{ - value: 'Stripe-链接收款', - label: 'Stripe-链接收款' -}, -{ - value: 'PaymentAsia-链接收款', - label: 'PaymentAsia-链接收款' -}, -{ - value: 'Ipay88-链接收款', - label: 'Ipay88-链接收款' -} -]) +const currencies = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)']) +const channelOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"]) + const reset = function () { searchForm.value = { jwcode: '',