|
@@ -90,7 +90,11 @@
|
|
|
<el-table v-loading="loading" :data="faultList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="报备编号" align="center" prop="id" />
|
|
|
- <el-table-column label="设备条形码" align="center" prop="assetBarCode" />
|
|
|
+ <el-table-column label="设备条形码" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <a style="color: #409EFF" @click="openMore(scope.row)">{{scope.row.assetBarCode}}</a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="报备人" align="center" prop="userId" />
|
|
|
<el-table-column label="报备时间" align="center" prop="reportDate" width="180">
|
|
|
<template slot-scope="scope">
|
|
@@ -110,10 +114,18 @@
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
+ icon="el-icon-setting"
|
|
|
+ :disabled="scope.row.processState === '1'"
|
|
|
+ @click="handleProcess(scope.row)"
|
|
|
+ v-hasPermi="['asset:fault:edit']"
|
|
|
+ >处理</el-button><br/>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['asset:fault:edit']"
|
|
|
- >修改</el-button>
|
|
|
+ >修改</el-button><br/>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
@@ -124,6 +136,27 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+
|
|
|
+ <el-dialog title="资产信息" :visible.sync="assetShow">
|
|
|
+ <el-descriptions title="资产信息">
|
|
|
+ <el-descriptions-item label="资产编号">{{assetInfo.number}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="资产名称">{{assetInfo.name}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="资产种类">{{assetInfo.kind}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="分类编号">{{assetInfo.categoryNumber}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="资产原值">{{assetInfo.amount}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="数量">{{assetInfo.quantity}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="计量单位">{{assetInfo.quantityUnit}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="取得时间">{{assetInfo.buildDate}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="存放地点">{{assetInfo.placeName}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="资产用途">{{assetInfo.purpose}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="使用部门">{{assetInfo.deptName}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="登记人">{{assetInfo.registrant}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="规格型号">{{assetInfo.specificationsModel}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="生产厂商">{{assetInfo.manufacturer}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="品牌型号">{{assetInfo.brand}}</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="供应商">{{assetInfo.supplier}}</el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
<pagination
|
|
|
v-show="total>0"
|
|
@@ -166,7 +199,7 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="处理结果" prop="processResult">
|
|
|
+ <el-form-item label="处理结果">
|
|
|
<el-input v-model="form.processResult" type="textarea" placeholder="请输入内容" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -175,11 +208,33 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 设备故障处理对话框 -->
|
|
|
+ <el-dialog title="设备故障处理" :visible.sync="report" width="500px" append-to-body>
|
|
|
+ <el-form ref="form" :model="faultForm" :rules="rules" label-width="80px">
|
|
|
+ <el-form-item label="报备编号">
|
|
|
+ <el-input :disabled="true" v-model="faultForm.tbFaultReportId" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="处理结果" prop="processResult">
|
|
|
+ <el-input v-model="faultForm.processResult" type="textarea" placeholder="请输入内容" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="状态反馈" prop="feedbackStatus">
|
|
|
+ <el-radio-group v-model="faultForm.feedbackStatus" size="small">
|
|
|
+ <el-radio label="1" border>正常</el-radio>
|
|
|
+ <el-radio label="2" border>报废</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitFaultForm">确 定</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listFault, getFault, delFault, addFault, updateFault } from "@/api/asset/fault";
|
|
|
+import { listFault, getFault, delFault, addFault, updateFault, processFault } from "@/api/asset/fault";
|
|
|
|
|
|
export default {
|
|
|
name: "Fault",
|
|
@@ -200,6 +255,10 @@ export default {
|
|
|
total: 0,
|
|
|
// 故障报备表格数据
|
|
|
faultList: [],
|
|
|
+ // 是否显示设备信息
|
|
|
+ assetShow: false,
|
|
|
+ // 设备信息
|
|
|
+ assetInfo: {},
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
@@ -216,6 +275,14 @@ export default {
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
+ // 是否显示故障处理
|
|
|
+ report: false,
|
|
|
+ // 故障处理参数
|
|
|
+ faultForm: {
|
|
|
+ tbFaultReportId: null,
|
|
|
+ processResult: null,
|
|
|
+ feedbackStatus: null
|
|
|
+ },
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
assetBarCode: [
|
|
@@ -236,6 +303,12 @@ export default {
|
|
|
processState: [
|
|
|
{ required: true, message: "处理状态不能为空", trigger: "change" }
|
|
|
],
|
|
|
+ processResult: [
|
|
|
+ { required: true, message: "处理结果不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ feedbackStatus: [
|
|
|
+ { required: true, message: "反馈状态不能为空", trigger: "change"}
|
|
|
+ ],
|
|
|
}
|
|
|
};
|
|
|
},
|
|
@@ -255,6 +328,7 @@ export default {
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false;
|
|
|
+ this.report = false;
|
|
|
this.reset();
|
|
|
},
|
|
|
// 表单重置
|
|
@@ -269,6 +343,11 @@ export default {
|
|
|
processState: null,
|
|
|
processResult: null
|
|
|
};
|
|
|
+ this.faultForm = {
|
|
|
+ assetBarCode: null,
|
|
|
+ processResult: null,
|
|
|
+ feedbackStatus: null
|
|
|
+ }
|
|
|
this.resetForm("form");
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
@@ -293,6 +372,11 @@ export default {
|
|
|
this.open = true;
|
|
|
this.title = "添加故障报备";
|
|
|
},
|
|
|
+ /** 打开查看设备信息 */
|
|
|
+ openMore(row) {
|
|
|
+ this.assetShow = true
|
|
|
+ this.assetInfo = row.tbAsset
|
|
|
+ },
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
@@ -303,6 +387,12 @@ export default {
|
|
|
this.title = "修改故障报备";
|
|
|
});
|
|
|
},
|
|
|
+ /** 处理按钮操作 */
|
|
|
+ handleProcess(row) {
|
|
|
+ this.reset()
|
|
|
+ this.faultForm.tbFaultReportId = row.id
|
|
|
+ this.report = true
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
@@ -323,6 +413,15 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ /** 提交处理按钮 */
|
|
|
+ submitFaultForm() {
|
|
|
+ this.faultForm.feedbackStatus = Number(this.faultForm.feedbackStatus)
|
|
|
+ processFault(this.faultForm).then(response => {
|
|
|
+ this.$modal.msgSuccess("处理成功");
|
|
|
+ this.report = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|