报修 页面优化 bug修改

dev
wangwei 2 years ago
parent 0a0b487333
commit 8ed569504c

@ -77,7 +77,7 @@
<el-table-column label="更新人" prop="updateUserName" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="创建时间" prop="createTime" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="更新时间" prop="udpateTime" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="备注" prop="remark" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="备注" prop="remak" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="操作" width="140" fixed="right">
<template slot-scope="scope">

@ -50,6 +50,25 @@
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="维修类型:">
<el-select v-model="filterQuery.repairType" placeholder="请选择维修类型" style="width: 90%" clearable>
<el-option label="自行维修" :value=1></el-option>
<el-option label="外部维修" :value=2></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="紧急程度:">
<el-select v-model="filterQuery.urgencyType" placeholder="请选择紧急程度" style="width: 90%" clearable>
<el-option label="正常" :value=1></el-option>
<el-option label="较急" :value=2></el-option>
<el-option label="特急" :value=3></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
@ -72,14 +91,38 @@
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="批次号" prop="batchNo" show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="资产编码" prop="code" show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="创建日期" prop="createTime" show-overflow-tooltip width="140"></el-table-column>
<!--<el-table-column label="创建日期" prop="createTime" show-overflow-tooltip width="140"></el-table-column>-->
<el-table-column label="创建人" prop="createUserName" show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="维修类型" prop="repairType" show-overflow-tooltip width="120">
<template slot-scope="scope">
<el-tag >
{{ repairType[scope.row.repairType] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="紧急程度" prop="urgencyType" show-overflow-tooltip width="120">
<template slot-scope="scope">
<el-tag>
{{ urgencyType[scope.row.urgencyType] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="计划完成时间" prop="planTime" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="报修说明" prop="msg" show-overflow-tooltip width="180"></el-table-column>
<el-table-column label="报修图片" prop="uploadImage" show-overflow-tooltip width="250">
<template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewer(scope.row)">{{ scope.row.uploadImage }}</div>
</template>
</el-table-column>
<el-table-column label="状态" prop="status" show-overflow-tooltip width="120">
<template slot-scope="scope">
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="报修说明" prop="msg" show-overflow-tooltip width="180"></el-table-column>
<el-table-column label="操作"width="120" fixed="right">
<template slot-scope="scope">
<el-button
@ -113,6 +156,7 @@
:visible.sync="formVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
:before-close="closeDialog"
width="65%"
v-if="formVisible"
>
@ -122,6 +166,9 @@
></DeviceRepairOrderAduitModify>
</el-dialog>
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/>
</div>
</template>
@ -130,10 +177,16 @@ import {getDeptListByUser} from "@/api/auth/authDept";
import {findInvByUser} from "@/api/system/invSubWarehouse";
import {getRepairList, updateStatus, deleteRepairOrder} from "@/api/inventory/deviceRepairOrder";
import DeviceRepairOrderAduitModify from "@/views/inventory/DeviceRepairOrderAuditModify";
import {previewImage} from "@/api/purchase/supCompany";
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
export default {
name: "DeviceRepairOrderAudit",
data() {
return {
BASE_URL: process.env.VUE_APP_BASE_API,
imgViewerVisible:false,
imgList: [],
filterQuery: {
orderId: null,
deptCode: this.$store.getters.locDeptCode,
@ -155,6 +208,15 @@ export default {
1: "未审核",
2: "已审核"
},
repairType:{
1:"自行维修",
2:"外部维修"
},
urgencyType:{
1:"正常",
2:"较急",
3:"特急"
},
showSearch: true
};
},
@ -296,8 +358,38 @@ export default {
this.formVisible = false;
this.getList();
},
showImgViewer(row){
if(row.uploadImage.substr(-1) == ','){
row.uploadImage=row.uploadImage.slice(0, row.uploadImage.length-1);
}
this.certFileUrl = this.BASE_URL +"/udiwms/image/register/file/getImage?type=image2&name=";
console.log(this.certFileUrl + "========");
this.imgList = [];
previewImage({imageUrl: row.uploadImage, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgList = response.data;
}
console.log(this.imgList)
this.imgViewerVisible = true;
});
const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
closeImgViewer() {
this.imgViewerVisible = false;
const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
},
},
components: {DeviceRepairOrderAduitModify},
components: {DeviceRepairOrderAduitModify,ElImageViewer},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();

@ -1,7 +1,7 @@
<template>
<div>
<el-card style="margin: 5px;margin-top: -20px">
<el-form :model="repairOrder" ref="dataForm" label-width="100px" style="margin-bottom: -15px">
<el-form :model="repairOrder" ref="dataForm" label-width="100px" :rules="formRules" style="margin-bottom: -15px" >
<el-button-group style="display: flex;margin: 0px 0 10px 80%; height: 35px">
<!--<el-button-->
<!-- type="primary"-->
@ -125,7 +125,7 @@
</el-row>
<el-row>
<el-col :span="10">
<el-form-item class="query-form-item" label="维修人:">
<el-form-item class="query-form-item" label="维修人:" prop="repariName">
<el-select v-model="repairOrder.repariName"
placeholder="请选择维修人"
clearable="true"
@ -285,6 +285,9 @@ export default {
headers: {},
fileList: [],
userList:[],
formRules:{
repariName:[{required: true, message:"请选择维修人", trigger: 'blur'}]
}
};
},
methods: {

@ -1,7 +1,7 @@
<template>
<div>
<el-card style="margin: 5px;margin-top: -20px">
<el-form :model="repairOrder" ref="dataForm" label-width="100px" style="margin-bottom: -15px">
<el-form :model="repairOrder" ref="dataForm" label-width="120px" style="margin-bottom: -15px" :rules="formRules">
<el-button-group style="display: flex;margin: 0px 0 10px 80%; height: 35px">
<el-button
type="primary"
@ -17,10 +17,11 @@
<el-row>
<el-col :span="10">
<el-form-item class="query-form-item" label="部门:">
<el-form-item class="query-form-item" label="部门:" prop="deptCode">
<el-select v-model="repairOrder.deptCode"
placeholder="请选择部门"
clearable="true"
:disabled="repairOrder.code != null"
@change="deptChange"
style="width: 90%"
>
@ -36,10 +37,11 @@
</el-col>
<el-col :span="10">
<el-form-item class="query-form-item" label="仓库:">
<el-form-item class="query-form-item" label="仓库:" prop="invCode">
<el-select v-model="repairOrder.invCode"
placeholder="请选择仓库"
clearable="true"
:disabled="repairOrder.code != null"
style="width: 90%"
>
<el-option
@ -56,14 +58,14 @@
<el-row>
<el-col :span="10">
<el-form-item label="设备名称:">
<el-form-item class="query-form-item" label="设备名称:" prop="deviceName">
<el-input v-model="repairOrder.deviceName" placeholder="请输入设备名称" style="width: 90%"
disabled
clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="物资编码:">
<el-form-item class="query-form-item" label="物资编码:" prop="code">
<el-input v-model="repairOrder.code" placeholder="请输入编码" style="width: 90%" clearable
disabled></el-input>
</el-form-item>
@ -71,7 +73,7 @@
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="维修类型:">
<el-form-item class="query-form-item" label="维修类型:" prop="repairType">
<el-select v-model="repairOrder.repairType" placeholder="请选择维修类型" style="width: 90%" clearable>
<el-option label="自行维修" :value=1></el-option>
<el-option label="外部维修" :value=2></el-option>
@ -80,7 +82,7 @@
</el-col>
<el-col :span="10">
<el-form-item label="紧急程度:">
<el-form-item class="query-form-item" label="紧急程度:" prop="urgencyType">
<el-select v-model="repairOrder.urgencyType" placeholder="请选择紧急程度" style="width: 90%" clearable>
<el-option label="正常" :value=1></el-option>
<el-option label="较急" :value=2></el-option>
@ -91,7 +93,7 @@
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="计划完成日期:" prop="planTime">
<el-form-item class="query-form-item" label="计划完成日期:" prop="planTime">
<el-date-picker
v-model="repairOrder.planTime"
type="datetime"
@ -147,7 +149,7 @@
<el-dialog
title="选择巡检设备"
title="选择报修设备"
:visible.sync="deviceDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
@ -155,51 +157,68 @@
v-if="deviceDialogVisible"
append-to-body
>
<el-form class="query-form" :model="filterQuery" :inline="true" label-width="100px">
<el-form-item class="query-form-item" label="部门:">
<el-input v-model="deptName" disabled></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="仓库:">
<el-input v-model="invName" disabled></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="资产编码:">
<el-input v-model="filterQuery.code" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="queryDevice"
>查询
</el-button
>
<el-button type="primary" icon="search" @click="combine"></el-button>
</el-button-group>
</el-form-item>
</el-form>
<el-card class="el-card">
<el-form :model="filterQuery" label-width="100px">
<el-row>
<el-col :span="8">
<el-form-item label="部门:">
<el-input v-model="deptName" style="width: 90%" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="仓库:">
<el-input v-model="invName" style="width: 90%" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="资产编码:">
<el-input v-model="filterQuery.code" style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-table v-loading="deviceLoading" :data="deviceList" style="width: 100%"
highlight-current-row
@current-change="handleCurrentChange"
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="queryDevice"
>查询
</el-button
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="设备名称" prop="deviceName" width="200"></el-table-column>
<el-table-column label="资产编码" prop="code" width="200"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="120"></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="120"></el-table-column>
<el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip></el-table-column>
<el-table-column label="供应商" prop="supName" show-overflow-tooltip></el-table-column>
<el-table-column label="注册证号" prop="zczbhhzbapzbh" width="150" show-overflow-tooltip></el-table-column>
</el-table>
<el-button type="primary" icon="el-icon-document-add" @click="combine"></el-button>
</el-button-group>
</div>
</el-form>
<pagination
v-show="deviceTotal>0"
:total="deviceTotal"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getDeviceList"
></pagination>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="deviceLoading" :data="deviceList" style="width: 100%"
highlight-current-row border ref="ref"
@selection-change="handleCurrentChange"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="设备名称" prop="deviceName" width="200"></el-table-column>
<el-table-column label="资产编码" prop="code" width="200"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="120"></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="120"></el-table-column>
<el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip></el-table-column>
<el-table-column label="供应商" prop="supName" show-overflow-tooltip></el-table-column>
<el-table-column label="注册证号" prop="zczbhhzbapzbh" width="150" show-overflow-tooltip></el-table-column>
</el-table>
<pagination
v-show="deviceTotal>0"
:total="deviceTotal"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getDeviceList"
></pagination>
</el-card>
</el-dialog>
</div>
@ -244,11 +263,21 @@ export default {
deptName: null,
invName: null,
selectRow: null,
choiceFile:"选取报修",
choiceFile: "选取报修",
uploadUrl: "",
BASE_URL: process.env.VUE_APP_BASE_API,
headers: {},
fileList: [],
formRules: {
deptCode: [{required: true, message: '请选择部门', trigger: 'blur'}],
invCode: [{required: true, message: '请选择仓库', trigger: 'blur'}],
deviceName: [{required: true, message: '请输入设备名称', trigger: 'blur'}],
code: [{required: true, message: '请输入物资编码', trigger: 'blur'}],
repairType: [{required: true, message: '请选择维修类型', trigger: 'blur'}],
urgencyType: [{required: true, message: '请选择紧急程度', trigger: 'blur'}],
planTime: [{required: true, message: '请选择计划完成日期', trigger: 'blur'}],
},
check: true
};
},
methods: {
@ -274,8 +303,32 @@ export default {
});
},
submit() {
if (isBlank(this.repairOrder.deptCode) || isBlank(this.repairOrder.invCode) || isBlank(this.repairOrder.code)) {
this.$message.error("请选择设备相关信息")
if (isBlank(this.repairOrder.deptCode)) {
this.$message.error("请选择部门")
return;
}
if (isBlank(this.repairOrder.invCode)) {
this.$message.error("请选择仓库")
return;
}
if (isBlank(this.repairOrder.deviceName)) {
this.$message.error("请输入设备名称")
return;
}
if (isBlank(this.repairOrder.code)) {
this.$message.error("请输入物资编码")
return;
}
if (isBlank(this.repairOrder.repairType)) {
this.$message.error("请选择维修类型")
return;
}
if (isBlank(this.repairOrder.urgencyType)) {
this.$message.error("请选择紧急程度")
return;
}
if (isBlank(this.repairOrder.planTime)) {
this.$message.error("请选择计划完成日期")
return;
}
let formName = isBlank(this.repairOrder.id) ? "add" : "edit";
@ -347,15 +400,31 @@ export default {
this.filterQuery.page = 1;
this.getDeviceList();
},
handleCurrentChange(row) {
this.selectRow = row;
handleCurrentChange(val) {
this.check = !this.check
if (val.length >= 2) {
// 0
// console.log(val.splice(0,val.length-1),'')
let arrays = val.splice(0, val.length - 1)
arrays.forEach(row => {
this.$refs.ref.toggleRowSelection(row); //
})
}
// console.log(val,'')
this.selectRow = val[0];
},
combine() {
if (this.check) {
this.$message.error("请勾选设备!")
return;
}
this.deviceDialogVisible = false;
this.repairOrder.code = this.selectRow.code;
this.repairOrder.deviceName = this.selectRow.deviceName;
},
uploadHandlePreview(file) {},
uploadHandlePreview(file) {
},
uploadHandleRemove(file, fileList) {
this.repairOrder.uploadImage = null;
console.log(file, fileList);
@ -401,11 +470,11 @@ export default {
},
uploadHandleSuccess(response, file, fileList) {
if (response.code === 20000) {
if(this.repairOrder.uploadImage == null){
this.repairOrder.uploadImage = response.data.name+",";
}else{
this.repairOrder.uploadImage += response.data.name+",";
}
if (this.repairOrder.uploadImage == null) {
this.repairOrder.uploadImage = response.data.name + ",";
} else {
this.repairOrder.uploadImage += response.data.name + ",";
}
} else {
this.$message.error("文件上传失败:" + response.message);
}

@ -50,6 +50,25 @@
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="维修类型:">
<el-select v-model="filterQuery.repairType" placeholder="请选择维修类型" style="width: 90%" clearable>
<el-option label="自行维修" :value=1></el-option>
<el-option label="外部维修" :value=2></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="紧急程度:">
<el-select v-model="filterQuery.urgencyType" placeholder="请选择紧急程度" style="width: 90%" clearable>
<el-option label="正常" :value=1></el-option>
<el-option label="较急" :value=2></el-option>
<el-option label="特急" :value=3></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
@ -67,7 +86,7 @@
border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="报修单号" prop="orderId" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="部门" prop="deptName" show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="部门" prop="deptName" show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="仓库" prop="invName" show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="设备名称" prop="deviceName" show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip width="120"></el-table-column>
@ -90,7 +109,7 @@
</el-table-column>
<el-table-column label="计划完成时间" prop="planTime" show-overflow-tooltip width="140"></el-table-column>
<el-table-column label="报修说明" prop="msg" show-overflow-tooltip width="180"></el-table-column>
<el-table-column label="报修图片" prop="uploadImage" show-overflow-tooltip width="250">
<el-table-column label="报修图片" prop="uploadImage" show-overflow-tooltip width="250">
<template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewer(scope.row)">{{ scope.row.uploadImage }}</div>
</template>
@ -101,7 +120,7 @@
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="200" fixed="right">
<el-table-column label="操作" width="200" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
@ -190,17 +209,17 @@ export default {
1: "未审核",
2: "已审核"
},
repairType:{
1:"自行维修",
2:"外部维修"
repairType: {
1: "自行维修",
2: "外部维修"
},
urgencyType:{
1:"正常",
2:"较急",
3:"特急"
urgencyType: {
1: "正常",
2: "较急",
3: "特急"
},
BASE_URL: process.env.VUE_APP_BASE_API,
imgViewerVisible:false,
imgViewerVisible: false,
imgList: [],
formName: null,
formMap: {
@ -345,11 +364,11 @@ export default {
this.formVisible = false;
this.getList();
},
showImgViewer(row){
if(row.uploadImage.substr(-1) == ','){
row.uploadImage=row.uploadImage.slice(0, row.uploadImage.length-1);
showImgViewer(row) {
if (row.uploadImage.substr(-1) == ',') {
row.uploadImage = row.uploadImage.slice(0, row.uploadImage.length - 1);
}
this.certFileUrl = this.BASE_URL +"/udiwms/image/register/file/getImage?type=image2&name=";
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
console.log(this.certFileUrl + "========");
this.imgList = [];
previewImage({imageUrl: row.uploadImage, certFileUrl: this.certFileUrl}).then(response => {
@ -377,7 +396,7 @@ export default {
},
components: {
deviceRepairOrderModify,ElImageViewer
deviceRepairOrderModify, ElImageViewer
},
filters: {
statusFilterType(status) {

@ -50,6 +50,38 @@
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="维修人:">
<el-select v-model="filterQuery.repariName"
placeholder="请选择维修人"
clearable="true"
style="width: 90%"
>
<el-option
v-for="item in userList"
:key="item.id"
:label="item.employeeName"
:value="item.userid">
<span style="float: left">{{ item.employeeName }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="报修状态:">
<el-select v-model="filterQuery.status"
placeholder="请选择维修人"
clearable="true"
style="width: 90%"
>
<el-option label="已审核" :value="2"></el-option>
<el-option label="维修中" :value="4"></el-option>
<el-option label="已处理" :value="5"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
@ -162,6 +194,7 @@ import {getRepairList, updateStatus, deleteRepairOrder} from "@/api/inventory/de
import {previewImage} from "@/api/purchase/supCompany";
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
import DeviceRepairOrderStart from "@/views/inventory/DeviceRepairOrderStart";
import {warehouseUserList} from "@/api/system/invWarehouse";
export default {
name: "DeviceRepairOrderAudit",
@ -200,7 +233,8 @@ export default {
repairMap: {
start: "开始任务",
end: "结束任务"
}
},
userList: [],
};
},
methods: {
@ -225,6 +259,12 @@ export default {
this.filterQuery.page = 1;
this.getList();
},
getuserList() {
let param = {code: this.$store.getters.locInvCode}
warehouseUserList(param).then((res) => {
this.userList = res.data.list || [];
})
},
getList() {
this.loading = true;
getRepairList(this.filterQuery).then((res) => {
@ -347,6 +387,7 @@ export default {
},
created() {
this.getDeptList();
this.getuserList();
},
};
</script>

Loading…
Cancel
Save