1、车船模块fix bug

2、运力模块fix bug
3、新增设备台账
4、其他bug 修复
5、调整组织、人员模块
This commit is contained in:
2026-08-07 08:28:21 +08:00
parent 1e4de76978
commit 6a02e9126b
37 changed files with 2593 additions and 645 deletions
+45 -9
View File
@@ -70,6 +70,39 @@
class="maintenance-plan-page__input"
/>
</template>
<template #mileageForm>
<el-input
v-model="form.mileage"
:disabled="boxType === 'view'"
inputmode="decimal"
placeholder="请输入"
@input="value => normalizeDecimalInput('mileage', value)"
>
<template #append>{{ form.mileageUnit || '公里' }}</template>
</el-input>
</template>
<template #costForm>
<el-input
v-model="form.cost"
:disabled="boxType === 'view'"
inputmode="decimal"
placeholder="请输入"
@input="value => normalizeDecimalInput('cost', value)"
>
<template #append></template>
</el-input>
</template>
<template #nextMaintenanceMileageForm>
<el-input
v-model="form.nextMaintenanceMileage"
:disabled="boxType === 'view'"
inputmode="decimal"
placeholder="请输入"
@input="value => normalizeDecimalInput('nextMaintenanceMileage', value)"
>
<template #append>{{ form.mileageUnit || '公里' }}</template>
</el-input>
</template>
<template #mileage="{ row }">
<span>{{ formatMileage(row.mileage, row.mileageUnit) }}</span>
</template>
@@ -169,6 +202,7 @@ export default {
searchMenuPosition: 'right',
border: true,
index: true,
indexLabel: '序号',
viewBtn: true,
selection: true,
dialogClickModal: false,
@@ -223,12 +257,10 @@ export default {
{
label: '里程/航程数',
prop: 'mileage',
type: 'number',
precision: 2,
type: 'input',
minWidth: 130,
slot: true,
span: 12,
append: '公里',
placeholder: '请输入',
rules: [{ validator: validateNonNegative, trigger: 'blur' }],
},
@@ -255,9 +287,8 @@ export default {
{
label: '费用',
prop: 'cost',
type: 'number',
precision: 2,
append: '元',
type: 'input',
slot: true,
span: 12,
placeholder: '请输入',
rules: [
@@ -302,12 +333,10 @@ export default {
{
label: '下次保养里程/航程',
prop: 'nextMaintenanceMileage',
type: 'number',
precision: 2,
type: 'input',
minWidth: 170,
slot: true,
span: 12,
append: '公里',
placeholder: '请输入',
rules: [{ validator: validateNonNegative, trigger: 'blur' }],
},
@@ -531,6 +560,13 @@ export default {
if (!value || typeof value === 'string') return value;
return JSON.stringify(value);
},
normalizeDecimalInput(prop, value) {
const sanitized = String(value ?? '').replace(/[^\d.]/g, '');
const [integerPart, ...decimalParts] = sanitized.split('.');
this.form[prop] = decimalParts.length
? `${integerPart || '0'}.${decimalParts.join('').slice(0, 2)}`
: integerPart;
},
initDeptTree() {
getDeptTree(this.userInfo.tenantId).then(res => {
const column = this.findColumn(this.option.column, 'createDept');