Browse Source

精网号校验

lihuilin/feature-20251104102812-现金二期
zhangyongQINGHU 1 week ago
parent
commit
ac72656e81
  1. 39
      src/views/moneyManage/receiveDetail/receiveFinance.vue
  2. 37
      src/views/moneyManage/receiveDetail/receiveHead.vue
  3. 59
      src/views/moneyManage/receiveDetail/receiveManage.vue
  4. 8
      src/views/moneyManage/receiveDetail/receiveService.vue
  5. 21
      src/views/moneyManage/refundDetail/refundCharge.vue
  6. 26
      src/views/moneyManage/refundDetail/refundFinance.vue
  7. 21
      src/views/moneyManage/refundDetail/refundHeader.vue
  8. 13
      src/views/moneyManage/refundDetail/refundService.vue

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

@ -762,10 +762,10 @@ const exportExcel = async function () {
payCurrencySelect = CurrencyForId(searchData.value.paymentCurrency); payCurrencySelect = CurrencyForId(searchData.value.paymentCurrency);
} }
if (searchData.value.jwcode && !isNumber(searchData.value.jwcode)) {
ElMessage.error('精网号只能是数字')
return
}
// if (searchData.value.jwcode && !isNumber(searchData.value.jwcode)) {
// ElMessage.error('')
// return
// }
const cashRoleId = '1'; const cashRoleId = '1';
const submitterMarket = adminData.value.markets; const submitterMarket = adminData.value.markets;
@ -882,10 +882,10 @@ const getlist = async () => {
payCurrencySelect = CurrencyForId(searchData.value.paymentCurrency); payCurrencySelect = CurrencyForId(searchData.value.paymentCurrency);
} }
if (searchData.value.jwcode && !isNumber(searchData.value.jwcode)) {
ElMessage.error('精网号只能是数字')
return
}
// if (searchData.value.jwcode && !isNumber(searchData.value.jwcode)) {
// ElMessage.error('')
// return
// }
// ID=1 // ID=1
const cashRoleId = '1'; const cashRoleId = '1';
@ -997,7 +997,6 @@ const submitRefund = async () => {
// 2.2 // 2.2
const search = () => { const search = () => {
getlist(); getlist();
ElMessage.success('查询成功');
}; };
const reset = () => { const reset = () => {
@ -1239,17 +1238,17 @@ const getAdminData = async () => {
adminData.value = result; adminData.value = result;
// //
if (adminData.value.roleId === 2) {
superAdmin.value = true;
//
if (adminData.value.markets === '总部' || adminData.value.markets === '研发部') {
ElMessageBox.alert(
'管理员账号仅显示所属地区的财务数据,请确认地区设置',
'温馨提示',
{ type: 'warning' }
);
}
}
// if (adminData.value.roleId === 2) {
// superAdmin.value = true;
// //
// if (adminData.value.markets === '' || adminData.value.markets === '') {
// ElMessageBox.alert(
// '',
// '',
// { type: 'warning' }
// );
// }
// }
} catch (error) { } catch (error) {
console.error('管理员信息获取失败:', error); console.error('管理员信息获取失败:', error);
ElMessage.error('管理员信息加载异常'); ElMessage.error('管理员信息加载异常');

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

@ -617,10 +617,10 @@ const exportExcel = async function () {
payCurrencySelect = CurrencyForId(searchData.value.paymentCurrency); payCurrencySelect = CurrencyForId(searchData.value.paymentCurrency);
} }
if (searchData.value.jwcode && !isNumber(searchData.value.jwcode)) {
ElMessage.error('精网号只能是数字')
return
}
// if (searchData.value.jwcode && !isNumber(searchData.value.jwcode)) {
// ElMessage.error('')
// return
// }
const cashRoleId = '2'; const cashRoleId = '2';
const submitterMarket = adminData.value.markets; const submitterMarket = adminData.value.markets;
@ -785,10 +785,10 @@ const getlist = async () => {
} }
} }
if (searchData.value.jwcode && !isNumber(searchData.value.jwcode)) {
ElMessage.error('精网号只能是数字')
return
}
// if (searchData.value.jwcode && !isNumber(searchData.value.jwcode)) {
// ElMessage.error('')
// return
// }
const result = await request({ const result = await request({
url: '/cashCollection/selectCollection', url: '/cashCollection/selectCollection',
@ -878,7 +878,6 @@ const submitRefund = async () => {
// 2.2 // 2.2
const search = () => { const search = () => {
getlist(); getlist();
ElMessage.success('查询成功');
}; };
const reset = () => { const reset = () => {
@ -1044,16 +1043,16 @@ const getAdminData = async () => {
adminData.value = result; adminData.value = result;
// //
if (adminData.value.roleId === 2) {
//
if (adminData.value.markets === '总部' || adminData.value.markets === '研发部') {
ElMessageBox.alert(
'管理员账号仅显示所属地区的财务数据,请确认地区设置',
'温馨提示',
{ type: 'warning' }
);
}
}
// if (adminData.value.roleId === 2) {
// //
// if (adminData.value.markets === '' || adminData.value.markets === '') {
// ElMessageBox.alert(
// '',
// '',
// { type: 'warning' }
// );
// }
// }
} catch (error) { } catch (error) {
console.error('管理员信息获取失败:', error); console.error('管理员信息获取失败:', error);
ElMessage.error('管理员信息加载异常'); ElMessage.error('管理员信息加载异常');

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

@ -622,9 +622,6 @@ import _ from 'lodash';
import { Plus } from '@element-plus/icons-vue'; import { Plus } from '@element-plus/icons-vue';
import { startsWith } from './utils/util.js' import { startsWith } from './utils/util.js'
import { isNumber } from 'lodash' import { isNumber } from 'lodash'
//
const market = ref([])
// //
import CurrencySelect from '@/components/MoneyManage/CurrencySelect.vue'; import CurrencySelect from '@/components/MoneyManage/CurrencySelect.vue';
@ -649,6 +646,8 @@ const tableData = ref([]);
const total = ref(0); const total = ref(0);
const pageInfo = ref({ pageSize: 10, pageNum: 1 }); const pageInfo = ref({ pageSize: 10, pageNum: 1 });
//
const market = ref([])
// //
const searchData = ref({}); const searchData = ref({});
@ -763,10 +762,10 @@ const exportExcel = async function () {
payCurrencySelect = CurrencyForId(searchData.value.paymentCurrency); payCurrencySelect = CurrencyForId(searchData.value.paymentCurrency);
} }
if (searchData.value.jwcode && !isNumber(searchData.value.jwcode)) {
ElMessage.error('精网号只能是数字')
return
}
// if (searchData.value.jwcode && !isNumber(searchData.value.jwcode)) {
// ElMessage.error('')
// return
// }
const cashRoleId = '1'; const cashRoleId = '1';
const submitterMarket = adminData.value.markets; const submitterMarket = adminData.value.markets;
@ -883,6 +882,11 @@ const getlist = async () => {
payCurrencySelect = CurrencyForId(searchData.value.paymentCurrency); payCurrencySelect = CurrencyForId(searchData.value.paymentCurrency);
} }
// if (searchData.value.jwcode && !isNumber(searchData.value.jwcode)) {
// ElMessage.error('')
// return
// }
// ID=1 // ID=1
const cashRoleId = '1'; const cashRoleId = '1';
const receivedMarket = adminData.value.markets; const receivedMarket = adminData.value.markets;
@ -993,7 +997,6 @@ const submitRefund = async () => {
// 2.2 // 2.2
const search = () => { const search = () => {
getlist(); getlist();
ElMessage.success('查询成功');
}; };
const reset = () => { const reset = () => {
@ -1235,17 +1238,17 @@ const getAdminData = async () => {
adminData.value = result; adminData.value = result;
// //
if (adminData.value.roleId === 2) {
superAdmin.value = true;
//
if (adminData.value.markets === '总部' || adminData.value.markets === '研发部') {
ElMessageBox.alert(
'管理员账号仅显示所属地区的财务数据,请确认地区设置',
'温馨提示',
{ type: 'warning' }
);
}
}
// if (adminData.value.roleId === 2) {
// superAdmin.value = true;
// //
// if (adminData.value.markets === '' || adminData.value.markets === '') {
// ElMessageBox.alert(
// '',
// '',
// { type: 'warning' }
// );
// }
// }
} catch (error) { } catch (error) {
console.error('管理员信息获取失败:', error); console.error('管理员信息获取失败:', error);
ElMessage.error('管理员信息加载异常'); ElMessage.error('管理员信息加载异常');
@ -1296,14 +1299,20 @@ onMounted(async () => {
}); });
// 2.10 使 // 2.10 使
const handleCurrencyChange = () => { };
const handleCurrencyChange = () => {
};
const beforeUpload = () => true; const beforeUpload = () => true;
const handelImgErr = () => { };
const handleImageChange = () => { };
const customUpload = () => { };
const handleDatePickerChange = () => { };
const handelImgErr = () => {
};
const handleImageChange = () => {
};
const customUpload = () => {
};
const handleDatePickerChange = () => {
};
const disabledDate = () => false; const disabledDate = () => false;
const handleSortChange = () => { };
const handleSortChange = () => {
};
const getMarket = async function () { const getMarket = async function () {
try { try {
const result = await API({ const result = await API({

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

@ -527,10 +527,10 @@ const getlist = async () => {
} }
} }
if (searchData.value.jwcode && !isNumber(searchData.value.jwcode)) {
ElMessage.error('精网号只能是数字')
return
}
// if (searchData.value.jwcode && !isNumber(searchData.value.jwcode)) {
// ElMessage.error('')
// return
// }
const result = await request({ const result = await request({
url: '/cashCollection/selectCollection', url: '/cashCollection/selectCollection',

21
src/views/moneyManage/refundDetail/refundCharge.vue

@ -421,9 +421,16 @@ const getRefund = async function () {
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) {
ElMessage.error('精网号必须为数字')
return
// if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) {
// ElMessage.error('')
// return
// }
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
return;
}
} }
if (searchForm.value.paymentCurrency) { if (searchForm.value.paymentCurrency) {
@ -592,10 +599,10 @@ const exportExcel = async function () {
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) {
ElMessage.error('精网号必须为数字')
return
}
// if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) {
// ElMessage.error('')
// return
// }
if (searchForm.value.paymentCurrency) { if (searchForm.value.paymentCurrency) {
payCurrencySelect.value = CurrencyForId(searchForm.value.paymentCurrency) payCurrencySelect.value = CurrencyForId(searchForm.value.paymentCurrency)

26
src/views/moneyManage/refundDetail/refundFinance.vue

@ -479,9 +479,16 @@ const getRefund = async function () {
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) {
ElMessage.error('精网号必须为数字')
return
// if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) {
// ElMessage.error('')
// return
// }
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
return;
}
} }
const params = { const params = {
@ -647,9 +654,16 @@ const exportExcel = async function () {
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) {
ElMessage.error('精网号必须为数字')
return
// if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) {
// ElMessage.error('')
// return
// }
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
return;
}
} }
const params = { const params = {

21
src/views/moneyManage/refundDetail/refundHeader.vue

@ -477,9 +477,16 @@ const getRefund = async function () {
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) {
ElMessage.error('精网号必须为数字')
return
// if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) {
// ElMessage.error('')
// return
// }
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
return;
}
} }
const params = { const params = {
@ -624,10 +631,10 @@ const exportExcel = async function () {
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) {
ElMessage.error('精网号必须为数字')
return
}
// if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) {
// ElMessage.error('')
// return
// }
const params = { const params = {
pageNum: pagination.value.pageNum, pageNum: pagination.value.pageNum,

13
src/views/moneyManage/refundDetail/refundService.vue

@ -287,9 +287,16 @@ const getRefund = async function () {
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) {
ElMessage.error('精网号必须为数字')
return
// if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) {
// ElMessage.error('')
// return
// }
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
return;
}
} }
const params = { const params = {

Loading…
Cancel
Save