设备编号状态,维修记录表
This commit is contained in:
parent
5caa60fe25
commit
56f241f0c3
|
|
@ -91,4 +91,21 @@ export function getRepairDocumentInfo(taskId) {
|
||||||
url: '/material/repair/getRepairDocumentInfo/?taskId=' + taskId,
|
url: '/material/repair/getRepairDocumentInfo/?taskId=' + taskId,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取维修记录
|
||||||
|
export function getRepairCodeList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/repair/getRepairCodeList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getRepairRecord(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/repair/getRepairRecord',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -39,6 +39,7 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item prop="materialModel">
|
<el-form-item prop="materialModel">
|
||||||
<el-select v-model="queryParams.materialModel" placeholder="请选择规格型号" clearable filterable >
|
<el-select v-model="queryParams.materialModel" placeholder="请选择规格型号" clearable filterable >
|
||||||
|
|
@ -51,6 +52,16 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item prop="maStatus">
|
||||||
|
<el-select v-model="queryParams.maStatus" placeholder="请选择设备状态" clearable filterable >
|
||||||
|
<el-option
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
v-for="dict in dict.type.ma_machine_status"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
<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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
|
@ -383,6 +394,7 @@
|
||||||
import html2canvas from 'html2canvas';
|
import html2canvas from 'html2canvas';
|
||||||
export default {
|
export default {
|
||||||
name: "Device",
|
name: "Device",
|
||||||
|
dicts: ["ma_machine_status"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
|
@ -431,7 +443,8 @@
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
keyWord:undefined,
|
keyWord:undefined,
|
||||||
isAssets:undefined
|
isAssets:undefined,
|
||||||
|
maStatus:null,
|
||||||
},
|
},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryTeam: {
|
queryTeam: {
|
||||||
|
|
@ -735,6 +748,7 @@
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.queryParams.keyWord=null;
|
this.queryParams.keyWord=null;
|
||||||
|
this.queryParams.maStatus=null;
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,20 +106,183 @@
|
||||||
<div v-if="scope.row.manageType == 1">数量管理</div>
|
<div v-if="scope.row.manageType == 1">数量管理</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="primary" @click="handleRepair(scope.row)">维修记录</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
<!-- 维修记录弹窗 -->
|
||||||
|
<el-dialog title="维修记录" :visible.sync="openRepair" width="46%">
|
||||||
|
<el-table :data="repairRecord" border>
|
||||||
|
<el-table-column label="类型名称" prop="typeName" align="center"></el-table-column>
|
||||||
|
<el-table-column label="规格型号" prop="type" align="center"></el-table-column>
|
||||||
|
<el-table-column label="机具编号" prop="code" align="center"></el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="primary" @click="handleRecord(scope.row)">试验记录表</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="openRepair = false">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 弹框 -->
|
||||||
|
<el-dialog title="试验记录表" :visible.sync="dialogVisible" width="46%">
|
||||||
|
<div id="print-content">
|
||||||
|
<vue-easy-print tableShow ref="remarksPrintRef2" class="print" style="margin: 0 20px">
|
||||||
|
<div style="text-align: center; font-weight: 600; font-size: 30px">机具(物流)分公司动力设备维修及试验记录单</div>
|
||||||
|
<div class="info" style="margin: 10px 20px 0; display: flex; justify-content: space-between;">
|
||||||
|
<div
|
||||||
|
class="item"
|
||||||
|
style="flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||||
|
<span>退料单号:{{}}</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="item"
|
||||||
|
style="flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||||
|
<span>提交日期:{{}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="item" style="flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
|
||||||
|
<span>设备编号:{{}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="border: 3px solid #000; min-height: 900px; line-height: 3; position: relative">
|
||||||
|
<div style="font-weight: 800; border-bottom: 1px solid #888; display: flex">
|
||||||
|
<div style="width: 100%; padding-left: 10px;text-align: center">{{'手动角磨机' }}</div>
|
||||||
|
</div>
|
||||||
|
<div v-for="(group, groupIndex) in groupPrintData" :key="groupIndex" style="display: flex; border-bottom: 1px solid #000;">
|
||||||
|
<!-- 遍历分组中的每个元素,每个元素生成 name 和 status 两个表格 -->
|
||||||
|
<div v-for="(row, index) in group" :key="index" style="flex: 1; display: flex; border-right: 1px solid #000;">
|
||||||
|
<div style="flex: 1; text-align: center; border-right: 1px solid #000; padding: 3px;">
|
||||||
|
<span style="display: block;">{{ row.name || '' }}</span>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; text-align: center; padding: 3px;">
|
||||||
|
<span style="display: block;">{{ row.status || '' }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="position: absolute; bottom: 0; width: 100%;">
|
||||||
|
<div style="font-weight: 800; border-bottom: 1px solid #888;border-top: 1px solid #888; display: flex">
|
||||||
|
<div style="width: 20%; text-align: center;border-right: 1px solid #888;">空载试验</div>
|
||||||
|
<div style="width: 80%; text-align: center; display: flex; justify-content: space-between; ">
|
||||||
|
<span style="margin-left: 10px;">维修提交合格<span style="letter-spacing: 2em;">( )</span></span>
|
||||||
|
<span>维修提交报废<span style="letter-spacing: 2em;">( )</span></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-weight: 800; border-bottom: 1px solid #888; display: flex">
|
||||||
|
<div style="width: 20%; text-align: center;border-right: 1px solid #888;">标识等</div>
|
||||||
|
<div style="width: 80%; text-align: center; display: flex; justify-content: space-between;">
|
||||||
|
<span style="margin-left: 10px;">二维码<span style="letter-spacing: 2em;">( )</span></span>
|
||||||
|
<span>铭牌<span style="letter-spacing: 2em;">(<span style="font-weight: bold;">√</span>)</span></span>
|
||||||
|
<span>档位<span style="letter-spacing: 2em;">( )</span></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-weight: 800; border-bottom: 1px solid #888; display: flex">
|
||||||
|
<div style="width: 60%; display: flex; flex-direction: column;">
|
||||||
|
<!-- 第一行:试验记录标题 -->
|
||||||
|
<div style="display: flex; border-bottom: 1px solid #888;height: 40px;">
|
||||||
|
<div style="flex: 1; text-align: center; border-right: 1px solid #888;">额定负载(T/MPa)</div>
|
||||||
|
<div style="flex: 1; text-align: center; border-right: 1px solid #888;">试验负载(T/MPa)</div>
|
||||||
|
<div style="flex: 1; text-align: center;">持荷时间(分/秒)</div>
|
||||||
|
</div>
|
||||||
|
<!-- 第二行:试验记录结果 -->
|
||||||
|
<div style="display: flex; border-bottom: 1px solid #888;height: 40px;">
|
||||||
|
<div style="flex: 1; text-align: center; border-right: 1px solid #888;">{{ testResult1 || '' }}</div>
|
||||||
|
<div style="flex: 1; text-align: center; border-right: 1px solid #888;">{{ testResult2 || '' }}</div>
|
||||||
|
<div style="flex: 1; text-align: center;">{{ testResult3 || '' }}</div>
|
||||||
|
</div>
|
||||||
|
<!-- 第三行:试验日期、检验人员、提交人员标题 -->
|
||||||
|
<div style="display: flex; border-bottom: 1px solid #888;height: 40px;">
|
||||||
|
<div style="flex: 1; text-align: center; border-right: 1px solid #888;">试验日期</div>
|
||||||
|
<div style="flex: 1; text-align: center; border-right: 1px solid #888;">检修人员</div>
|
||||||
|
<div style="flex: 1; text-align: center;">试验人员</div>
|
||||||
|
</div>
|
||||||
|
<!-- 第四行:对应结果 -->
|
||||||
|
<div style="display: flex;height: 40px;">
|
||||||
|
<div style="flex: 1; text-align: center; border-right: 1px solid #888;">{{ '2025-06-14' }}</div>
|
||||||
|
<div style="flex: 1; text-align: center; border-right: 1px solid #888;">{{ '张三' }}</div>
|
||||||
|
<div style="flex: 1; text-align: center;">{{ '李四' }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 右边部分,占三分之一 -->
|
||||||
|
<div style="width: 40%; display: flex; border-left: 1px solid #888;">
|
||||||
|
<!-- 第一列:试验结论 -->
|
||||||
|
<div style="width: 25%;text-align: center; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid #888;">
|
||||||
|
<span>试验结论</span>
|
||||||
|
</div>
|
||||||
|
<!-- 第二列:合格 -->
|
||||||
|
<div style="width: 75%; padding: 0;">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
v-model="testConclusion"
|
||||||
|
style="
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
font-size: 64px;
|
||||||
|
color: red;
|
||||||
|
font-weight: bold;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-align: center;
|
||||||
|
background-color: white;
|
||||||
|
font-family: SimSun;
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="fillIn" style="margin-top: 10px; display: flex; justify-content: space-between">
|
||||||
|
<div class="item" style="width: 33%">
|
||||||
|
<div>
|
||||||
|
<span>审核:{{ }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="item" style="width: 33%">
|
||||||
|
<div>
|
||||||
|
<span>检验员:{{ '高民' }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</vue-easy-print>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||||
|
<el-button type="primary" @click="print">打 印</el-button>
|
||||||
|
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
getAppRepairMaTypeList,
|
getAppRepairMaTypeList,getRepairCodeList,getRepairRecord
|
||||||
} from "@/api/repair/repair.js";
|
} from "@/api/repair/repair.js";
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
|
import vueEasyPrint from "vue-easy-print";
|
||||||
|
import printJS from 'print-js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ReturnApplyAdd',
|
name: 'ReturnApplyAdd',
|
||||||
dicts: ["ma_machine_status"],
|
dicts: ["ma_machine_status"],
|
||||||
|
components: { vueEasyPrint },
|
||||||
props: {
|
props: {
|
||||||
repairRow: {
|
repairRow: {
|
||||||
type: [Object],
|
type: [Object],
|
||||||
|
|
@ -155,12 +318,45 @@ export default {
|
||||||
companyId: '',
|
companyId: '',
|
||||||
createBy: '',
|
createBy: '',
|
||||||
rowId: '',
|
rowId: '',
|
||||||
|
|
||||||
|
dialogVisible: false, // 弹框显示
|
||||||
|
dialogForm: {
|
||||||
|
proName: '', // 项目名称
|
||||||
|
code: '' // 业务单号
|
||||||
|
},
|
||||||
|
dialogColumns: [
|
||||||
|
{ label: '名称', prop: 'maTypeName', width: '150px' },
|
||||||
|
{ label: '规格', prop: 'typeName', width: '150px' },
|
||||||
|
{ label: '单位', prop: 'unitName', width: '60px' },
|
||||||
|
{ label: '数量', prop: 'preNum', width: '60px' },
|
||||||
|
{ label: '备注', prop: 'remark', width: '' }
|
||||||
|
],
|
||||||
|
dialogList: [],
|
||||||
|
openRepair: false,
|
||||||
|
repairRecord: [],
|
||||||
|
printTableData: [{'name':'角磨1','status':'合格'},{'name':'角磨2','status':'合格'},{'name':'角磨3','status':'合格'},{'name':'角磨4','status':'合格'},{'name':'角磨5','status':'合格'}],
|
||||||
|
testResult1: '',
|
||||||
|
testResult2: '',
|
||||||
|
testResult3: '',
|
||||||
|
testConclusion: '合格',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.GetViewByApply();
|
this.GetViewByApply();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
groupPrintData() {
|
||||||
|
const result = [];
|
||||||
|
for (let i = 0; i < this.printTableData.length; i += 2) {
|
||||||
|
const group = this.printTableData.slice(i, i + 2);
|
||||||
|
// 若分组不足 2 个元素,补充空对象
|
||||||
|
while (group.length < 2) {
|
||||||
|
group.push({ name: '', status: '' });
|
||||||
|
}
|
||||||
|
result.push(group);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
},
|
||||||
...mapState(["user"]),
|
...mapState(["user"]),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -183,6 +379,41 @@ export default {
|
||||||
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum) - Number(e.typeScrapNum);
|
e.disrepairNum = Number(e.typeRepairNum) - Number(e.typeRepairedNum) - Number(e.typeScrapNum);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async handleRepair(row){
|
||||||
|
this.openRepair = true;
|
||||||
|
console.log("222222",row)
|
||||||
|
let param = {
|
||||||
|
taskId: this.repairRow.taskId,
|
||||||
|
typeId: row.typeId
|
||||||
|
}
|
||||||
|
const res = await getRepairCodeList(param)
|
||||||
|
this.repairRecord = res.data
|
||||||
|
},
|
||||||
|
|
||||||
|
async handleRecord(row){
|
||||||
|
this.dialogVisible = true;
|
||||||
|
// let param = {
|
||||||
|
// taskId:this.repairRow.taskId,
|
||||||
|
// }
|
||||||
|
// const res = await getRepairRecord(param)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 打印
|
||||||
|
print() {
|
||||||
|
printJS({
|
||||||
|
printable: 'print-content',
|
||||||
|
type: 'html', //
|
||||||
|
// targetStyles: ['*'], // 打印的元素样式
|
||||||
|
scanStyles: false, // 是否扫描页面样式
|
||||||
|
// css: [
|
||||||
|
// 'https://unpkg.com/element-ui/lib/theme-chalk/index.css' // Element UI 的样式表
|
||||||
|
// ],
|
||||||
|
maxWidth: '1400'
|
||||||
|
// 其他配置选项
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue