|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|