Compare commits

...

5 Commits

6 changed files with 63 additions and 28 deletions
+21 -10
View File
@@ -249,11 +249,22 @@ export const option = createCrudOption([
hide: true,
labelWidth: 0,
},
{
label: '客商',
prop: 'partyName',
search: true,
searchOrder: 14,
searchPlaceholder: '请输入甲/乙方名称',
hide: true,
display: false,
addDisplay: false,
editDisplay: false,
},
{
label: '合同编号',
prop: 'contractNo',
search: true,
searchOrder: 6,
searchOrder: 8,
searchPlaceholder: '请输入',
order: 185,
maxlength: 100,
@@ -266,7 +277,7 @@ export const option = createCrudOption([
align: 'left',
headerAlign: 'left',
search: true,
searchOrder: 7,
searchOrder: 1,
searchPlaceholder: '请输入',
order: 180,
slot: true,
@@ -278,7 +289,7 @@ export const option = createCrudOption([
label: '所属项目',
prop: 'projectName',
search: true,
searchOrder: 8,
searchOrder: 11,
searchType: 'select',
searchPlaceholder: '请选择',
formslot: true,
@@ -325,7 +336,7 @@ export const option = createCrudOption([
prop: 'contractCategory',
type: 'select',
search: true,
searchOrder: 9,
searchOrder: 12,
searchPlaceholder: '请选择',
order: 170,
dicData: contractCategoryOptions,
@@ -337,7 +348,7 @@ export const option = createCrudOption([
prop: 'signType',
type: 'select',
search: true,
searchOrder: 10,
searchOrder: 13,
searchPlaceholder: '请选择',
span: 8,
order: 190,
@@ -346,11 +357,11 @@ export const option = createCrudOption([
rules: selectRule('签约类型'),
},
{
label: '生效类型',
label: '合同状态',
prop: 'effectiveType',
type: 'select',
search: true,
searchOrder: 5,
searchOrder: 6,
searchPlaceholder: '请选择',
dicData: effectiveTypeOptions,
hide: true,
@@ -621,7 +632,7 @@ export const option = createCrudOption([
prop: 'hcsSyncStatus',
type: 'select',
search: true,
searchOrder: 6,
searchOrder: 7,
searchPlaceholder: '请选择',
slot: true,
dicData: hcsSyncStatusOptions,
@@ -642,7 +653,7 @@ export const option = createCrudOption([
type: 'select',
search: true,
searchPlaceholder: '请选择',
searchOrder: 7,
searchOrder: 9,
dicData: yesNoOptions,
hide: true,
addDisplay: false,
@@ -654,7 +665,7 @@ export const option = createCrudOption([
type: 'select',
search: true,
searchPlaceholder: '请选择',
searchOrder: 8,
searchOrder: 10,
dicData: yesNoOptions,
hide: true,
addDisplay: false,
+2 -1
View File
@@ -124,7 +124,8 @@ const formatGoodsInfo = row => {
const text = Object.entries(groups)
.map(([unit, group]) => {
const quantity = formatGoodsQuantity(group.quantity);
return `${group.typeName}等${group.count}种货物 | ${quantity}${unit ? ` ${unit}` : ''}`;
const typeName = group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
return `${typeName} | ${quantity}${unit ? ` ${unit}` : ''}`;
})
.join('; ');
@@ -3949,9 +3949,9 @@ export default {
return Object.values(groups)
.map(group => {
const quantity = this.formatDispatchQuantity(group.quantity);
return `${group.typeName}等${group.count}种货物 | ${quantity}${
group.unit ? ` ${group.unit}` : ''
}`;
const typeName =
group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
return `${typeName} | ${quantity}${group.unit ? ` ${group.unit}` : ''}`;
})
.join('; ');
},
@@ -7549,12 +7549,13 @@ export default {
}, {});
const cargoInfo = Object.values(groups)
.map(
group =>
`${group.cargoType}等${group.count}种货物 | ${this.formatDispatchQuantity(
group.quantity
)}${group.unit ? ` ${group.unit}` : ''}`
)
.map(group => {
const typeName =
group.count > 1 ? `${group.cargoType}等${group.count}种货物` : group.cargoType;
return `${typeName} | ${this.formatDispatchQuantity(group.quantity)}${
group.unit ? ` ${group.unit}` : ''
}`;
})
.join('; ');
return cargoInfo || plan.goodsInfo || '';
},
@@ -5013,9 +5013,9 @@ export default {
return Object.values(groups)
.map(group => {
const quantity = this.formatQuantity(group.quantity);
return `${group.typeName}等${group.count}种货物 | ${quantity}${
group.unit ? ` ${group.unit}` : ''
}`;
const typeName =
group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
return `${typeName} | ${quantity}${group.unit ? ` ${group.unit}` : ''}`;
})
.join('; ');
},
+3 -3
View File
@@ -2524,9 +2524,9 @@ export default {
Object.values(groups)
.map(group => {
const quantity = this.formatGoodsQuantity(group.quantity);
return `${group.typeName}等${group.count}种货物 | ${quantity}${
group.unit ? ` ${group.unit}` : ''
}`;
const typeName =
group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
return `${typeName} | ${quantity}${group.unit ? ` ${group.unit}` : ''}`;
})
.join('; ') || '-'
);
+24 -2
View File
@@ -489,6 +489,12 @@ const NODE_TEMPLATES = [
},
];
// 过程配置必须覆盖装货端与卸货端各一个节点;货量下限只看装货端——
// 到场没有货量开关,不能拿它顶替货量采集
const PICKUP_NODE_KEYS = ['arrive_scene', 'load', 'dispatch'];
const DELIVERY_NODE_KEYS = ['unload', 'arrival', 'sign', 'return'];
const CARGO_NODE_KEYS = ['load', 'dispatch'];
export default {
data() {
return {
@@ -916,8 +922,24 @@ export default {
this.$message.warning('备注不能超过500个字符');
return false;
}
if (!this.enabledNodes.length) {
this.$message.warning('请至少选择一个过程节点');
const isEnabledNode = key => this.nodeRows.some(item => item.key === key && item.enabled);
if (!PICKUP_NODE_KEYS.some(isEnabledNode)) {
this.$message.warning('发货、装货、到场至少选择一个');
return false;
}
if (!DELIVERY_NODE_KEYS.some(isEnabledNode)) {
this.$message.warning('卸货、到货、签收、回单至少选择一个');
return false;
}
// 装货端没有节点采集货量时,整条配置在小程序侧等于不采集货量
const collectsCargo = CARGO_NODE_KEYS.some(key =>
this.nodeRows.some(
item =>
item.key === key && item.enabled && item.uploadCargo && (item.cargoTypes || []).length
)
);
if (!collectsCargo) {
this.$message.warning('发货或装货至少勾选一个货量类型');
return false;
}
const transit = this.nodeRows.find(item => item.key === 'transit');