设备点检记录
This commit is contained in:
parent
0c9b02a07a
commit
7516bdbfb8
44
src/api/mes/dv/checkrecord.js
Normal file
44
src/api/mes/dv/checkrecord.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备点检记录列表
|
||||
export function listCheckrecord(query) {
|
||||
return request({
|
||||
url: '/mes/dv/checkrecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备点检记录详细
|
||||
export function getCheckrecord(recordId) {
|
||||
return request({
|
||||
url: '/mes/dv/checkrecord/' + recordId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增设备点检记录
|
||||
export function addCheckrecord(data) {
|
||||
return request({
|
||||
url: '/mes/dv/checkrecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改设备点检记录
|
||||
export function updateCheckrecord(data) {
|
||||
return request({
|
||||
url: '/mes/dv/checkrecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备点检记录
|
||||
export function delCheckrecord(recordId) {
|
||||
return request({
|
||||
url: '/mes/dv/checkrecord/' + recordId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
src/api/mes/dv/checkrecordline.js
Normal file
44
src/api/mes/dv/checkrecordline.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备点检记录行列表
|
||||
export function listCheckrecordline(query) {
|
||||
return request({
|
||||
url: '/mes/dv/checkrecordline/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备点检记录行详细
|
||||
export function getCheckrecordline(lineId) {
|
||||
return request({
|
||||
url: '/mes/dv/checkrecordline/' + lineId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增设备点检记录行
|
||||
export function addCheckrecordline(data) {
|
||||
return request({
|
||||
url: '/mes/dv/checkrecordline',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改设备点检记录行
|
||||
export function updateCheckrecordline(data) {
|
||||
return request({
|
||||
url: '/mes/dv/checkrecordline',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备点检记录行
|
||||
export function delCheckrecordline(lineId) {
|
||||
return request({
|
||||
url: '/mes/dv/checkrecordline/' + lineId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
226
src/components/dvplanSelect/index.vue
Normal file
226
src/components/dvplanSelect/index.vue
Normal file
@ -0,0 +1,226 @@
|
||||
<template>
|
||||
<el-dialog title="设备选择"
|
||||
v-if="showFlag"
|
||||
:visible.sync="showFlag"
|
||||
:modal= false
|
||||
width="80%"
|
||||
center
|
||||
>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="计划编号" prop="planCode">
|
||||
<el-input
|
||||
v-model="queryParams.planCode"
|
||||
placeholder="请输入计划编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划名称" prop="planName">
|
||||
<el-input
|
||||
v-model="queryParams.planName"
|
||||
placeholder="请输入计划名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="checkplanList" @current-change="handleCurrent" @row-dblclick="handleRowDbClick">
|
||||
<el-table-column width="55" align="center" >
|
||||
<template v-slot="scope">
|
||||
<el-radio v-model="selectedPlanId" :label="scope.row.planId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划编码" align="center" prop="planCode" >
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:dv:checkplan:query']"
|
||||
>{{scope.row.planCode}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划名称" align="center" width="200px" prop="planName" />
|
||||
<el-table-column label="计划类型" align="center" width="120px" prop="planType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.dv_plan_type" :value="scope.row.planType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始日期" align="center" prop="startDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束日期" align="center" prop="endDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="频率" align="center" prop="cycleType" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.cycleCount}}<dict-tag :options="dict.type.mes_cycle_type" :value="scope.row.cycleType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="130px" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-if="scope.row.status =='PREPARE'"
|
||||
v-hasPermi="['mes:dv:checkplan:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-if="scope.row.status =='PREPARE'"
|
||||
v-hasPermi="['mes:dv:checkplan:remove']"
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-if="scope.row.status =='FINISHED'"
|
||||
v-hasPermi="['mes:dv:checkplan:edit']"
|
||||
>停用</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirmSelect">确 定</el-button>
|
||||
<el-button @click="showFlag=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCheckplan } from "@/api/mes/dv/checkplan";
|
||||
|
||||
export default {
|
||||
name: "CheckplanSelect",
|
||||
dicts: ['mes_cycle_type','mes_order_status','dv_plan_type'],
|
||||
props: {
|
||||
planType: {
|
||||
type: String,
|
||||
default: 'CHECK'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showFlag: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
selectedPlanId: undefined,
|
||||
selectedRow: undefined,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备点检计划头表格数据
|
||||
checkplanList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
planCode: null,
|
||||
planName: null,
|
||||
planType: this.planType,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
cycleType: null,
|
||||
cycleCount: null,
|
||||
status: 'FINISHED'
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询设备点检计划头列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCheckplan(this.queryParams).then(response => {
|
||||
this.checkplanList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
handleCurrent(row){
|
||||
if(row){
|
||||
this.selectedRow = row;
|
||||
}
|
||||
},
|
||||
//行双击选中
|
||||
handleRowDbClick(row){
|
||||
if(row){
|
||||
this.selectedRow = row;
|
||||
this.$emit('onSelected',this.selectedRow);
|
||||
this.showFlag = false;
|
||||
}
|
||||
},
|
||||
// 单选选中数据
|
||||
handleRowChange(row) {
|
||||
if(row){
|
||||
this.selectedRow = row;
|
||||
}
|
||||
},
|
||||
//确定选中
|
||||
confirmSelect(){
|
||||
if(this.selectedPlanId ==null || this.selectedPlanId==0){
|
||||
this.$notify({
|
||||
title:'提示',
|
||||
type:'warning',
|
||||
message: '请至少选择一条数据!'
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.$emit('onSelected',this.selectedRow);
|
||||
this.showFlag = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
168
src/components/dvsubjectSelect/single.vue
Normal file
168
src/components/dvsubjectSelect/single.vue
Normal file
@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<el-dialog title="设备点检保养项目选择"
|
||||
v-if="showFlag"
|
||||
:visible.sync="showFlag"
|
||||
:modal= false
|
||||
width="80%"
|
||||
center
|
||||
>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目编码" prop="subjectCode">
|
||||
<el-input
|
||||
v-model="queryParams.subjectCode"
|
||||
placeholder="请输入项目编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称" prop="subjectName">
|
||||
<el-input
|
||||
v-model="queryParams.subjectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="dvsubjectList" @current-change="handleCurrent" @row-dblclick="handleRowDbClick">
|
||||
<el-table-column width="55" align="center" >
|
||||
<template v-slot="scope">
|
||||
<el-radio v-model="selectedId" :label="scope.row.subjectId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目编码" align="center" prop="subjectCode" />
|
||||
<el-table-column label="项目名称" align="center" prop="subjectName" />
|
||||
<el-table-column label="项目内容" align="center" prop="subjectContent" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="标准" align="center" prop="subjectStandard" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirmSelect">确 定</el-button>
|
||||
<el-button @click="showFlag=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listDvsubject} from "@/api/mes/dv/dvsubject";
|
||||
export default {
|
||||
name: "DvsubjectSelect",
|
||||
dicts: ['sys_yes_no', 'mes_dvsubject_type'],
|
||||
props:{
|
||||
subjectType: null,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showFlag:false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
selectedId: undefined,
|
||||
selectedRow: undefined,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备点检保养项目表格数据
|
||||
dvsubjectList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
subjectCode: null,
|
||||
subjectName: null,
|
||||
subjectType: this.subjectType,
|
||||
subjectContent: null,
|
||||
subjectStandard: null,
|
||||
enableFlag: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询设备点检保养项目列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listDvsubject(this.queryParams).then(response => {
|
||||
this.dvsubjectList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams = {}
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.subjectType = this.subjectType
|
||||
this.getList();
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
handleCurrent(row){
|
||||
if(row){
|
||||
this.selectedRow = row;
|
||||
}
|
||||
},
|
||||
//行双击选中
|
||||
handleRowDbClick(row){
|
||||
if(row){
|
||||
this.selectedRow = row;
|
||||
this.$emit('onSelected',this.selectedRow);
|
||||
this.showFlag = false;
|
||||
}
|
||||
},
|
||||
// 单选选中数据
|
||||
handleRowChange(row) {
|
||||
if(row){
|
||||
this.selectedRow = row;
|
||||
}
|
||||
},
|
||||
|
||||
//确定选中
|
||||
confirmSelect(){
|
||||
if(this.selectedId == null || this.selectedId == 0){
|
||||
this.$notify({
|
||||
title:'提示',
|
||||
type:'warning',
|
||||
message: '请选择一条数据!'
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.$emit('onSelected',this.selectedRow);
|
||||
this.showFlag = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -102,7 +102,6 @@ import { listMachinery, getMachinery, delMachinery, addMachinery, updateMachiner
|
||||
import { listMachinerytype } from "@/api/mes/dv/machinerytype";
|
||||
import { listAllWorkshop } from "@/api/mes/md/workshop";
|
||||
|
||||
import { getToken } from "@/utils/auth";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
@ -187,7 +186,6 @@ export default {
|
||||
},
|
||||
getWorkshops(){
|
||||
listAllWorkshop().then( response => {
|
||||
debugger;
|
||||
this.workshopOptions =response.data;
|
||||
});
|
||||
},
|
||||
@ -205,7 +203,6 @@ export default {
|
||||
/** 查询设备类型下拉树结构 */
|
||||
getTreeselect() {
|
||||
listMachinerytype().then(response => {
|
||||
debugger;
|
||||
this.machineryTypeOptions = [];
|
||||
const data = this.handleTree(response.data, "machineryTypeId", "parentTypeId")[0];
|
||||
this.machineryTypeOptions.push(data);
|
||||
|
@ -30,18 +30,15 @@
|
||||
|
||||
<el-table v-loading="loading" :data="checksubjectList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="项目编码" align="center" prop="subjectCode" />
|
||||
<el-table-column label="项目名称" align="center" prop="subjectName" />
|
||||
<el-table-column label="项目类型" align="center" prop="subjectType" />
|
||||
<el-table-column label="项目内容" align="center" width="300px" prop="subjectContent" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="项目名称" align="center" prop="subjectName" width="150px"/>
|
||||
<el-table-column label="项目内容" align="center" width="350px" prop="subjectContent" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="标准" align="center" width="300px" prop="subjectStandard" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" v-if="optType !='view'" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-if="optType !='view'"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:dv:checkplan:remove']"
|
||||
>删除</el-button>
|
||||
|
415
src/views/mes/dv/checkrecord/index.vue
Normal file
415
src/views/mes/dv/checkrecord/index.vue
Normal file
@ -0,0 +1,415 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="计划编码" prop="planCode">
|
||||
<el-input
|
||||
v-model="queryParams.planCode"
|
||||
placeholder="请输入计划编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划名称" prop="planName">
|
||||
<el-input
|
||||
v-model="queryParams.planName"
|
||||
placeholder="请输入计划名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编码" prop="machineryCode">
|
||||
<el-input
|
||||
v-model="queryParams.machineryCode"
|
||||
placeholder="请输入设备编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="machineryName">
|
||||
<el-input
|
||||
v-model="queryParams.machineryName"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点检时间" prop="checkTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.checkTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择点检时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:dv:checkrecord:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:dv:checkrecord:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:dv:checkrecord:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="checkrecordList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="设备编码" align="center" prop="machineryCode" >
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['mes:dv:checkrecord:query']"
|
||||
>{{scope.row.machineryCode}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" align="center" prop="machineryName" />
|
||||
<el-table-column label="品牌" align="center" prop="machineryBrand" />
|
||||
<el-table-column label="规格型号" align="center" prop="machinerySpec" />
|
||||
<el-table-column label="计划编码" align="center" prop="planCode" />
|
||||
<el-table-column label="计划名称" align="center" prop="planName" />
|
||||
<el-table-column lable="点检人" align="center" prop="nickName" />
|
||||
<el-table-column label="点检时间" align="center" prop="checkTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.status =='PREPARE'"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:dv:checkrecord:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-if="scope.row.status =='PREPARE'"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:dv:checkrecord:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改设备点检记录对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备编码" prop="machineryCode">
|
||||
<el-input v-model="form.machineryCode" placeholder="请选择设备" >
|
||||
<el-button slot="append" @click="handleSelectMachinery" icon="el-icon-search"></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<MachinerySelectSingle ref="machinerySelect" @onSelected="onMachineryAdd"></MachinerySelectSingle>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备名称" prop="machineryName">
|
||||
<el-input v-model="form.machineryName" readonly="readonly" placeholder="请选择设备" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="品牌" prop="machineryBrand">
|
||||
<el-input v-model="form.machineryBrand" readonly="readonly" placeholder="请选择设备" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="规格型号" prop="machinerySpec">
|
||||
<el-input v-model="form.machinerySpec" readonly="readonly" type="textarea" placeholder="请选择设备" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计划编码" prop="planCode">
|
||||
<el-input v-model="form.planCode" placeholder="请选择设备点检计划" >
|
||||
<el-button slot="append" @click="handleSelectPlan" icon="el-icon-search"></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<CheckplanSelect ref="checkplanSelect" planType="CHECK" @onSelected="onPlanAdd"></CheckplanSelect>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计划名称" prop="planName">
|
||||
<el-input v-model="form.planName" readonly="readonly" placeholder="请输入计划名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="点检时间" prop="checkTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.checkTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择点检时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider v-if="form.recordId !=null" content-position="center">点检项目</el-divider>
|
||||
<el-card shadow="always" v-if="form.recordId !=null" class="box-card">
|
||||
<CheckRecordLine ref="checkRecordLine" :optType="optType" :recordId="form.recordId"></CheckRecordLine>
|
||||
</el-card>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel" v-if="optType =='view' || form.status !='PREPARE' ">返 回</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-if="optType !=='view' && form.status =='PREPARE' " >保 存</el-button>
|
||||
<el-button type="success" @click="handleFinish" v-if="optType !=='view' && form.status =='PREPARE' " >提 交</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCheckrecord, getCheckrecord, delCheckrecord, addCheckrecord, updateCheckrecord } from "@/api/mes/dv/checkrecord";
|
||||
import MachinerySelectSingle from "@/components/machinerySelect/single.vue";
|
||||
import CheckplanSelect from "@/components/dvplanSelect/index.vue";
|
||||
import CheckRecordLine from "./line.vue";
|
||||
export default {
|
||||
name: "Checkrecord",
|
||||
dicts: ['mes_order_status'],
|
||||
components:{ MachinerySelectSingle, CheckplanSelect, CheckRecordLine },
|
||||
data() {
|
||||
return {
|
||||
optType: null,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备点检记录表格数据
|
||||
checkrecordList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
planId: null, planCode: null, planName: null, planType: null, machineryId: null, machineryCode: null, machineryName: null, machineryBrand: null, machinerySpec: null, checkTime: null, status: null, },
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
machineryId: [
|
||||
{ required: true, message: "设备ID不能为空", trigger: "blur" }
|
||||
], machineryCode: [
|
||||
{ required: true, message: "设备编码不能为空", trigger: "blur" }
|
||||
],
|
||||
checkTime: [
|
||||
{ required: true, message: "点检时间不能为空", trigger: "blur" }
|
||||
], }
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询设备点检记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCheckrecord(this.queryParams).then(response => {
|
||||
this.checkrecordList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
recordId: null, planId: null, planCode: null, planName: null, planType: null, machineryId: null, machineryCode: null, machineryName: null, machineryBrand: null, machinerySpec: null, checkTime: new Date(), status: "PREPARE", remark: null, attr1: null, attr2: null, attr3: null, attr4: null, createBy: null, createTime: null, updateBy: null, updateTime: null };
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.recordId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加设备点检记录";
|
||||
this.optType = "add";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const recordId = row.recordId || this.ids
|
||||
getCheckrecord(recordId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改设备点检记录";
|
||||
this.optType = "edit";
|
||||
});
|
||||
},
|
||||
handleView(row) {
|
||||
this.reset();
|
||||
const recordId = row.recordId || this.ids
|
||||
getCheckrecord(recordId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "查看设备点检记录";
|
||||
this.optType = "view";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.recordId != null) {
|
||||
updateCheckrecord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCheckrecord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleFinish(){
|
||||
if(this.form.recordId != null && this.form.status =='PREPARE'){
|
||||
this.form.status='FINISHED';
|
||||
updateCheckrecord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("已提交");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
},err =>{
|
||||
this.form.status='PREPARE';
|
||||
});
|
||||
}
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const recordIds = row.recordId || this.ids;
|
||||
this.$modal.confirm('是否确认删除设备点检记录编号为"' + recordIds + '"的数据项?').then(function() {
|
||||
return delCheckrecord(recordIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleSelectMachinery(){
|
||||
debugger;
|
||||
this.$refs.machinerySelect.showFlag = true;
|
||||
},
|
||||
|
||||
//设备资源选择回调
|
||||
onMachineryAdd(obj){
|
||||
if(obj !=null && obj != undefined){
|
||||
this.form.machineryId = obj.machineryId;
|
||||
this.form.machineryCode = obj.machineryCode;
|
||||
this.form.machineryName = obj.machineryName;
|
||||
this.form.machineryBrand = obj.machineryBrand;
|
||||
this.form.machinerySpec = obj.machinerySpec;
|
||||
}
|
||||
},
|
||||
|
||||
handleSelectPlan(){
|
||||
this.$refs.checkplanSelect.showFlag = true;
|
||||
},
|
||||
|
||||
onPlanAdd(obj){
|
||||
if(obj !=null && obj != undefined){
|
||||
this.form.planId = obj.planId;
|
||||
this.form.planCode = obj.planCode;
|
||||
this.form.planName = obj.planName;
|
||||
this.form.planType = obj.planType;
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('dv/checkrecord/export', {
|
||||
...this.queryParams
|
||||
}, `checkrecord_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
277
src/views/mes/dv/checkrecord/line.vue
Normal file
277
src/views/mes/dv/checkrecord/line.vue
Normal file
@ -0,0 +1,277 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10" v-if="optType !== 'view'" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['dv:checkrecordline:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['dv:checkrecordline:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['dv:checkrecordline:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="checkrecordlineList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="项目名称" align="center" prop="subjectName" />
|
||||
<el-table-column label="检查内容" align="center" prop="subjectContent" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="标准" align="center" prop="subjectStandard" />
|
||||
<el-table-column label="点检结果" align="center" prop="checkStatus" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.dv_cm_result_status" :value="scope.row.checkStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="异常描述" align="center" prop="checkResult" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" v-if="optType !== 'view'" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['dv:checkrecordline:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['dv:checkrecordline:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改设备点检记录行对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="项目名称" prop="subjectName">
|
||||
<el-input v-model="form.subjectName" placeholder="请选择检查项目" >
|
||||
<el-button slot="append" @click="handleSelectSubject" icon="el-icon-search"></el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<DvSubjectSelect ref="subjectSelect" subjectType="CHECK" @onSelected="onSubjectSelected"></DvSubjectSelect>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="标准" prop="subjectStandard">
|
||||
<el-input v-model="form.subjectStandard" placeholder="请输入标准" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="项目内容">
|
||||
<el-input type="textarea" v-model="form.subjectContent" :min-height="192"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="点检结果">
|
||||
<el-radio-group v-model="form.checkStatus">
|
||||
<el-radio label="Y">正常</el-radio>
|
||||
<el-radio label="N">异常</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.checkStatus === 'N'" label="异常描述" prop="checkResult">
|
||||
<el-input v-model="form.checkResult" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCheckrecordline, getCheckrecordline, delCheckrecordline, addCheckrecordline, updateCheckrecordline } from "@/api/mes/dv/checkrecordline";
|
||||
import DvSubjectSelect from "@/components/dvsubjectSelect/single.vue";
|
||||
export default {
|
||||
name: "Checkrecordline",
|
||||
props:{
|
||||
optType: null,
|
||||
recordId: null,
|
||||
},
|
||||
dicts: ['dv_cm_result_status'],
|
||||
components:{ DvSubjectSelect },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 设备点检记录行表格数据
|
||||
checkrecordlineList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
recordId: this.recordId, subjectId: null, subjectCode: null, subjectName: null, subjectType: null, subjectContent: null, subjectStandard: null, checkStatus: null, checkResult: null, },
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
recordId: [
|
||||
{ required: true, message: "计划ID不能为空", trigger: "blur" }
|
||||
], subjectId: [
|
||||
{ required: true, message: "项目ID不能为空", trigger: "blur" }
|
||||
], subjectCode: [
|
||||
{ required: true, message: "项目编码不能为空", trigger: "blur" }
|
||||
], subjectContent: [
|
||||
{ required: true, message: "项目内容不能为空", trigger: "blur" }
|
||||
], checkStatus: [
|
||||
{ required: true, message: "点检结果不能为空", trigger: "blur" }
|
||||
], }
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询设备点检记录行列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCheckrecordline(this.queryParams).then(response => {
|
||||
this.checkrecordlineList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
lineId: null, recordId: this.recordId, subjectId: null, subjectCode: null, subjectName: null, subjectType: null, subjectContent: null, subjectStandard: null, checkStatus: "Y", checkResult: null, attr1: null, attr2: null, attr3: null, attr4: null, createBy: null, createTime: null, updateBy: null, updateTime: null };
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.lineId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加设备点检记录行";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const lineId = row.lineId || this.ids
|
||||
getCheckrecordline(lineId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改设备点检记录行";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.lineId != null) {
|
||||
updateCheckrecordline(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCheckrecordline(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const lineIds = row.lineId || this.ids;
|
||||
this.$modal.confirm('是否确认删除设备点检记录行编号为"' + lineIds + '"的数据项?').then(function() {
|
||||
return delCheckrecordline(lineIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleSelectSubject(){
|
||||
this.$refs.subjectSelect.showFlag = true;
|
||||
},
|
||||
onSubjectSelected(obj){
|
||||
if(obj){
|
||||
this.form.subjectId = obj.subjectId;
|
||||
this.form.subjectCode = obj.subjectCode;
|
||||
this.form.subjectName = obj.subjectName;
|
||||
this.form.subjectType = obj.subjectType;
|
||||
this.form.subjectContent = obj.subjectContent;
|
||||
this.form.subjectStandard = obj.subjectStandard;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user