修复业务模块bug

This commit is contained in:
2026-08-13 14:07:04 +08:00
parent 6554ad80dd
commit f62e36e846
15 changed files with 941 additions and 186 deletions
+1 -2
View File
@@ -122,8 +122,7 @@ export const createOption = () => ({
maxlength: 20,
formslot: true,
rules: [
{ max: 20, message: '联系方式不能超过20个字', trigger: 'blur' },
{ pattern: /^\d*$/, message: '联系方式只能输入数字', trigger: 'blur' },
{ pattern: /^1[3-9]\d{9}$/, message: '联系方式格式不正确', trigger: 'blur' },
],
},
{
+1 -1
View File
@@ -171,7 +171,7 @@ export const nonNegativeRule = label => ({
});
export const phoneRule = label => ({
pattern: /^(1\d{10}|0\d{2,3}-?\d{7,8})$/,
pattern: /^1[3-9]\d{9}$/,
message: `${label}格式不正确`,
trigger: 'blur',
});
+1 -1
View File
@@ -39,7 +39,7 @@ export const loadingManageConfig = {
{ prop: 'transitAddress', label: '途经地' },
{ prop: 'arrivalAddress', label: '到货地' },
{ prop: 'carrierName', label: '承运商' },
{ prop: 'transportType', label: '运输类型' },
{ prop: 'transportType', label: '运输方式' },
{ prop: 'dataSource', label: '数据来源' },
{ prop: 'createTime', label: '创建时间' },
{ prop: 'updateTime', label: '更新时间' },
+15 -3
View File
@@ -15,8 +15,6 @@ const templateTypeOptions = [
export const config = {
title: '发货模板',
permission: 'shipping_template',
exportUrl: '/blade-transport/shipping-template/export-shipping-template',
exportName: '发货模板',
tableColumnOrder: [
'templateCode',
'templateName',
@@ -31,7 +29,7 @@ export const config = {
{ prop: 'templateCode', label: '模板编号' },
{ prop: 'templateName', label: '模板名称' },
{ prop: 'templateType', label: '模板类型' },
{ prop: 'transportType', label: '运输类型' },
{ prop: 'transportType', label: '运输方式' },
{ prop: 'createUserName', label: '创建人' },
{ prop: 'remark', label: '备注' },
{ prop: 'updateTime', label: '更新时间' },
@@ -173,6 +171,19 @@ export const option = {
rules: selectRule('运输方式'),
display: true,
},
{
label: '备注',
prop: 'basicRemark',
type: 'textarea',
minRows: 3,
span: 24,
order: 315,
minWidth: 180,
maxlength: 200,
showWordLimit: true,
rules: textRule('备注', 200),
display: true,
},
{
label: '',
prop: 'shippingInfoTitle',
@@ -259,4 +270,5 @@ export const option = {
])
),
dialogWidth: '96%',
dialogTop: '10px',
};
+1
View File
@@ -172,6 +172,7 @@ export const config = {
enableTransportPlanForm: true,
enableTransportPlanCreateActions: true,
enableTransportPlanImport: true,
fixedTransportAddressType: true,
transportPlanImportTitle: '导入发货计划',
transportPlanTemplateUrl: '/blade-transport/transport-plan/export-template',
attachmentTitle: '附件',
+11 -23
View File
@@ -18,6 +18,7 @@ const transportTypeDict = {
};
const isEmpty = value => value === undefined || value === null || value === '';
const normalizeNumericDisplayValue = value => (Number(value) === -1 ? '' : value);
const parseJsonArray = value => {
if (Array.isArray(value)) return value;
@@ -86,7 +87,9 @@ const formatGoodsInfo = row => {
const name = getFirstValue(item, ['cargoName', 'goodsName', 'name']);
const type = getFirstValue(item, ['cargoType', 'goodsType', 'typeName']);
const quantity = joinText([
getFirstValue(item, ['quantity', 'cargoQuantity', 'goodsQuantity']),
normalizeNumericDisplayValue(
getFirstValue(item, ['quantity', 'cargoQuantity', 'goodsQuantity'])
),
getFirstValue(item, ['quantityUnit', 'cargoUnit', 'unit']),
]);
return joinText([name, type, quantity]);
@@ -102,17 +105,17 @@ const formatGoodsField = (row, props) => {
return goods ? getFirstValue(goods, props) : '';
};
const formatTransportMode = row =>
getFirstValue(row, ['transportModeName', 'transportMode', 'transportWayName', 'transportWay']);
const formatUnitPrice = row => {
const value = getFirstValue(row, ['unitPrice', 'price']);
const value = normalizeNumericDisplayValue(getFirstValue(row, ['unitPrice', 'price']));
const unit = getFirstValue(row, ['priceUnit', 'billingUnit', 'unit']);
if (!isEmpty(value)) return unit ? `${value}(${unit})` : value;
const billing = getBillingRows(row).find(item => !isEmpty(item.unitPrice));
const billing = getBillingRows(row).find(
item => !isEmpty(normalizeNumericDisplayValue(item.unitPrice))
);
if (!billing) return '';
const billingUnit = getFirstValue(billing, ['priceUnit', 'billingUnit', 'unit']);
return billingUnit ? `${billing.unitPrice}(${billingUnit})` : billing.unitPrice;
const billingPrice = normalizeNumericDisplayValue(billing.unitPrice);
return billingUnit ? `${billingPrice}(${billingUnit})` : billingPrice;
};
const formatAmount = (row, props) => getFirstValue(row, props);
@@ -176,8 +179,6 @@ const auditColumn = prop => ({ ...auditColumns.find(item => item.prop === prop)
export const config = {
title: '运单管理',
permission: 'waybill_manage',
exportUrl: '/blade-transport/waybill-manage/export-waybill-manage',
exportName: '运单管理',
importUrl: '/blade-transport/waybill-manage/import-waybill-manage',
defaultForm: {
carrierType: '承运商',
@@ -332,19 +333,6 @@ export const option = {
},
{
label: '运输方式',
prop: 'transportMode',
type: 'select',
search: true,
searchOrder: 1,
formatter: row => formatTransportMode(row),
...transportTypeDict,
minWidth: 130,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: '运输类型',
prop: 'transportType',
type: 'select',
search: true,
@@ -353,7 +341,7 @@ export const option = {
order: 850,
...transportTypeDict,
minWidth: 130,
rules: selectRule('运输类型'),
rules: selectRule('运输方式'),
},
{
label: '过程节点',