|
|
@@ -160,7 +160,6 @@
|
|
|
v-model="scope.row.rule"
|
|
|
:active-value="0"
|
|
|
:inactive-value="1"
|
|
|
- disabled
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -440,7 +439,6 @@
|
|
|
type="primary"
|
|
|
:icon="Box"
|
|
|
@click="handleSelectMaterial"
|
|
|
- :disabled="!currentBomItem || isButtonsDisabled"
|
|
|
>
|
|
|
{{ t('stock.selectMaterial') }}
|
|
|
</el-button>
|
|
|
@@ -457,7 +455,6 @@
|
|
|
type="primary"
|
|
|
:icon="Plus"
|
|
|
@click="handleAddMaterial"
|
|
|
- :disabled="!currentBomItem || isButtonsDisabled"
|
|
|
>
|
|
|
新增物料
|
|
|
</el-button>
|
|
|
@@ -938,7 +935,7 @@ const isMaterialDisabled = (material) => {
|
|
|
// 如果保养项不存在,默认不禁用
|
|
|
if (!bomItem) return false;
|
|
|
// 如果保养项状态为已完成(status=1),则禁用该物料
|
|
|
- if (bomItem.status === 1) return true;
|
|
|
+ // if (bomItem.status === 1) return true;
|
|
|
// 如果保养项rule=1(不消耗物料),则禁用
|
|
|
if (bomItem.rule === 1) return true;
|
|
|
return false;
|
|
|
@@ -1881,10 +1878,10 @@ const submitForm = async () => {
|
|
|
}
|
|
|
|
|
|
// 保养时 累计运行时长 mainRuntime 全局校验
|
|
|
- if (!validateAllMainRuntimes()) {
|
|
|
+ /* if (!validateAllMainRuntimes()) {
|
|
|
message.error(t('mainPlan.mainRuntimeError'));
|
|
|
return;
|
|
|
- }
|
|
|
+ } */
|
|
|
|
|
|
// 保养时 累计运行公里数 mainMileage 全局校验
|
|
|
if (!validateAllMainMileages()) {
|
|
|
@@ -1948,8 +1945,8 @@ const submitForm = async () => {
|
|
|
mainWorkOrderBom: convertedList,
|
|
|
mainWorkOrderMaterials: allMaterials
|
|
|
}
|
|
|
- await IotMainWorkOrderApi.fillWorkOrder(data)
|
|
|
- message.success(t('common.createSuccess'))
|
|
|
+ await IotMainWorkOrderApi.modifyWorkOrder(data)
|
|
|
+ message.success(t('common.updateSuccess'))
|
|
|
close()
|
|
|
// 发送操作成功的事件
|
|
|
emit('success')
|