|
|
|
@ -4,6 +4,9 @@
|
|
|
|
|
<div v-show="showSearch" class="mb-[10px]">
|
|
|
|
|
<el-card shadow="hover">
|
|
|
|
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
|
|
|
|
<el-form-item label="计划编号" prop="planMaintCode" v-if="planMaintCodeFromRoute">
|
|
|
|
|
<el-input v-model="planMaintCodeFromRoute" disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item label="主键标识" prop="planMaintDetailId">
|
|
|
|
|
<el-input v-model="queryParams.planMaintDetailId" placeholder="请输入主键标识" clearable @keyup.enter="handleQuery" />
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -131,9 +134,14 @@ import {getDmsPlanMaint, getDmsPlanMaintList} from "@/api/dms/dmsPlanMaint";
|
|
|
|
|
import {getDmsBaseMachineInfoList} from "@/api/dms/dmsBaseMachineInfo";
|
|
|
|
|
import {getDmsBaseMaintStationList} from "@/api/dms/dmsBaseMaintStation";
|
|
|
|
|
import {getDmsBaseMaintStandardList} from "@/api/dms/dmsBaseMaintStandard";
|
|
|
|
|
import { useRoute } from 'vue-router';
|
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
const planMaintIdFromRoute = ref<string | undefined>(route.params.planMaintId as string);
|
|
|
|
|
const planMaintCodeFromRoute = ref<string | undefined>(route.params.planMaintCode as string);
|
|
|
|
|
|
|
|
|
|
const dmsPlanMaintDetailList = ref<DmsPlanMaintDetailVO[]>([]);
|
|
|
|
|
const buttonLoading = ref(false);
|
|
|
|
|
const loading = ref(true);
|
|
|
|
@ -217,6 +225,10 @@ const { queryParams, form, rules } = toRefs(data);
|
|
|
|
|
/** 查询保养计划明细列表 */
|
|
|
|
|
const getList = async () => {
|
|
|
|
|
loading.value = true;
|
|
|
|
|
// 如果有路由参数的planMaintId,则设置到查询条件中
|
|
|
|
|
if (planMaintIdFromRoute.value) {
|
|
|
|
|
queryParams.value.planMaintId = planMaintIdFromRoute.value;
|
|
|
|
|
}
|
|
|
|
|
const res = await listDmsPlanMaintDetail(queryParams.value);
|
|
|
|
|
dmsPlanMaintDetailList.value = res.rows;
|
|
|
|
|
total.value = res.total;
|
|
|
|
@ -257,6 +269,10 @@ const handleSelectionChange = (selection: DmsPlanMaintDetailVO[]) => {
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
const handleAdd = () => {
|
|
|
|
|
reset();
|
|
|
|
|
// 如果有路由参数的planMaintId,则设置到表单中
|
|
|
|
|
if (planMaintIdFromRoute.value) {
|
|
|
|
|
form.value.planMaintId = planMaintIdFromRoute.value;
|
|
|
|
|
}
|
|
|
|
|
dialog.visible = true;
|
|
|
|
|
dialog.title = "添加保养计划明细";
|
|
|
|
|
}
|
|
|
|
|