update - 返修措施、pda管理

master
yinq 1 year ago
parent 398cfef844
commit c9e49e47db

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询PDA管理列表
export function listPdaRecord(query) {
return request({
url: '/report/pdaRecord/list',
method: 'get',
params: query
})
}
// 查询PDA管理详细
export function getPdaRecord(objId) {
return request({
url: '/report/pdaRecord/' + objId,
method: 'get'
})
}
// 新增PDA管理
export function addPdaRecord(data) {
return request({
url: '/report/pdaRecord',
method: 'post',
data: data
})
}
// 修改PDA管理
export function updatePdaRecord(data) {
return request({
url: '/report/pdaRecord',
method: 'put',
data: data
})
}
// 删除PDA管理
export function delPdaRecord(objId) {
return request({
url: '/report/pdaRecord/' + objId,
method: 'delete'
})
}

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询返修措施维护列表
export function listRepairMeasures(query) {
return request({
url: '/report/repairMeasures/list',
method: 'get',
params: query
})
}
// 查询返修措施维护详细
export function getRepairMeasures(objId) {
return request({
url: '/report/repairMeasures/' + objId,
method: 'get'
})
}
// 新增返修措施维护
export function addRepairMeasures(data) {
return request({
url: '/report/repairMeasures',
method: 'post',
data: data
})
}
// 修改返修措施维护
export function updateRepairMeasures(data) {
return request({
url: '/report/repairMeasures',
method: 'put',
data: data
})
}
// 删除返修措施维护
export function delRepairMeasures(objId) {
return request({
url: '/report/repairMeasures/' + objId,
method: 'delete'
})
}

@ -0,0 +1,300 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="PDA名称" prop="pdaName">
<el-input
v-model="queryParams.pdaName"
placeholder="请输入PDA名称"
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-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="['pdaRecord:pdaRecord: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="['pdaRecord:pdaRecord: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="['pdaRecord:pdaRecord:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['pdaRecord:pdaRecord:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="pdaRecordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="PDA名称" align="center" prop="pdaName" v-if="columns[1].visible"/>
<el-table-column label="PDA串码" align="center" prop="serialCode" v-if="columns[2].visible"/>
<el-table-column label="备注" align="center" prop="remark" v-if="columns[3].visible"/>
<el-table-column label="工序编号" align="center" prop="procedureCode" v-if="columns[4].visible"/>
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[5].visible"/>
<el-table-column label="创建人" align="center" prop="createdBy" v-if="columns[6].visible"/>
<el-table-column label="创建时间" align="center" prop="createdTime" width="180" v-if="columns[7].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="修改人" align="center" prop="updatedBy" v-if="columns[8].visible"/>
<el-table-column label="修改时间" align="center" prop="updatedTime" width="180" v-if="columns[9].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</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"
@click="handleUpdate(scope.row)"
v-hasPermi="['pdaRecord:pdaRecord:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['pdaRecord:pdaRecord: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"
/>
<!-- 添加或修改PDA管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="PDA名称" prop="pdaName">
<el-input v-model="form.pdaName" placeholder="请输入PDA名称" />
</el-form-item>
<el-form-item label="PDA串码" prop="serialCode">
<el-input v-model="form.serialCode" placeholder="请输入PDA串码" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<!-- <el-form-item label="工序编号" prop="procedureCode">-->
<!-- <el-input v-model="form.procedureCode" placeholder="请输入工序编号" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="启用标识" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" 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 { listPdaRecord, getPdaRecord, delPdaRecord, addPdaRecord, updatePdaRecord } from "@/api/report/pdaRecord";
export default {
name: "PdaRecord",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// PDA
pdaRecordList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
pdaName: null,
serialCode: null,
procedureCode: null,
isFlag: null,
createdBy: null,
createdTime: null,
updatedBy: null,
updatedTime: null
},
//
form: {},
//
rules: {
},
columns: [
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `PDA名称`, visible: true },
{ key: 2, label: `PDA串码`, visible: true },
{ key: 3, label: `备注`, visible: true },
{ key: 4, label: `工序编号`, visible: false },
{ key: 5, label: `启用标识`, visible: false },
{ key: 6, label: `创建人`, visible: false },
{ key: 7, label: `创建时间`, visible: false },
{ key: 8, label: `修改人`, visible: false },
{ key: 9, label: `修改时间`, visible: false },
]
};
},
created() {
this.getList();
},
methods: {
/** 查询PDA管理列表 */
getList() {
this.loading = true;
listPdaRecord(this.queryParams).then(response => {
this.pdaRecordList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
objId: null,
pdaName: null,
serialCode: null,
remark: null,
procedureCode: null,
isFlag: null,
createdBy: null,
createdTime: null,
updatedBy: null,
updatedTime: 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.objId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加PDA管理";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const objId = row.objId || this.ids
getPdaRecord(objId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改PDA管理";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.objId != null) {
updatePdaRecord(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPdaRecord(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const objIds = row.objId || this.ids;
this.$modal.confirm('是否确认删除PDA管理编号为"' + objIds + '"的数据项?').then(function() {
return delPdaRecord(objIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('pdaRecord/pdaRecord/export', {
...this.queryParams
}, `pdaRecord_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -0,0 +1,296 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="返修措施名称" prop="repairName">
<el-input
v-model="queryParams.repairName"
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-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="['report:repairMeasures: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="['report:repairMeasures: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="['report:repairMeasures:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['report:repairMeasures:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="repairMeasuresList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="返修措施编码" align="center" prop="repairCode" v-if="columns[1].visible"/>
<el-table-column label="返修措施名称" align="center" prop="repairName" v-if="columns[2].visible"/>
<el-table-column label="工序编号" align="center" prop="processCode" v-if="columns[3].visible"/>
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[4].visible"/>
<el-table-column label="创建人" align="center" prop="createdBy" v-if="columns[5].visible"/>
<el-table-column label="创建时间" align="center" prop="createdTime" width="180" v-if="columns[6].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updatedBy" v-if="columns[7].visible"/>
<el-table-column label="更新时间" align="center" prop="updatedTime" width="180" v-if="columns[8].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</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"
@click="handleUpdate(scope.row)"
v-hasPermi="['report:repairMeasures:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['report:repairMeasures: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="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="返修措施编码" prop="repairCode">
<el-input v-model="form.repairCode" placeholder="请输入返修措施编码" />
</el-form-item>
<el-form-item label="返修措施名称" prop="repairName">
<el-input v-model="form.repairName" placeholder="请输入返修措施名称" />
</el-form-item>
<!-- <el-form-item label="工序编号" prop="processCode">-->
<!-- <el-input v-model="form.processCode" placeholder="请输入工序编号" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="启用标识" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" 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 { listRepairMeasures, getRepairMeasures, delRepairMeasures, addRepairMeasures, updateRepairMeasures } from "@/api/report/repairMeasures";
export default {
name: "RepairMeasures",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
repairMeasuresList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
repairCode: null,
repairName: null,
processCode: null,
isFlag: null,
createdBy: null,
createdTime: null,
updatedBy: null,
updatedTime: null
},
//
form: {},
//
rules: {
},
columns: [
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `返修措施编码`, visible: true },
{ key: 2, label: `返修措施名称`, visible: true },
{ key: 3, label: `工序编号`, visible: false },
{ key: 4, label: `启用标识`, visible: false },
{ key: 5, label: `创建人`, visible: false },
{ key: 6, label: `创建时间`, visible: false },
{ key: 7, label: `更新人`, visible: false },
{ key: 8, label: `更新时间`, visible: false },
]
};
},
created() {
this.getList();
},
methods: {
/** 查询返修措施维护列表 */
getList() {
this.loading = true;
listRepairMeasures(this.queryParams).then(response => {
this.repairMeasuresList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
objId: null,
repairCode: null,
repairName: null,
processCode: null,
isFlag: null,
createdBy: null,
createdTime: null,
updatedBy: null,
updatedTime: 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.objId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加返修措施维护";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const objId = row.objId || this.ids
getRepairMeasures(objId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改返修措施维护";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.objId != null) {
updateRepairMeasures(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addRepairMeasures(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const objIds = row.objId || this.ids;
this.$modal.confirm('是否确认删除返修措施维护编号为"' + objIds + '"的数据项?').then(function() {
return delRepairMeasures(objIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('report/repairMeasures/export', {
...this.queryParams
}, `repairMeasures_${new Date().getTime()}.xlsx`)
}
}
};
</script>
Loading…
Cancel
Save