|
|
@ -328,6 +328,7 @@
|
|
|
|
<el-step title="设备使用状况"></el-step>
|
|
|
|
<el-step title="设备使用状况"></el-step>
|
|
|
|
<el-step title="设备资产信息"></el-step>
|
|
|
|
<el-step title="设备资产信息"></el-step>
|
|
|
|
<el-step title="设备绑定备件"></el-step>
|
|
|
|
<el-step title="设备绑定备件"></el-step>
|
|
|
|
|
|
|
|
<el-step title="设备绑定辅助设备"></el-step>
|
|
|
|
</el-steps>
|
|
|
|
</el-steps>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- 维修基本信息 -->
|
|
|
|
<!-- 维修基本信息 -->
|
|
|
@ -512,23 +513,22 @@
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="设备负责人" prop="equipmentHeadName">
|
|
|
|
<el-form-item label="设备负责人" prop="equipmentHead">
|
|
|
|
<el-select
|
|
|
|
<el-input
|
|
|
|
v-model="queryParams.equipmentHeadName"
|
|
|
|
v-model="form.equipmentHead"
|
|
|
|
placeholder="请选择设备负责人"
|
|
|
|
placeholder="请选择设备负责人"
|
|
|
|
@change="$forceUpdate()"
|
|
|
|
|
|
|
|
filterable
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
style="width: 195px"
|
|
|
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
<el-button
|
|
|
|
v-for="item in equipmentHeadOption"
|
|
|
|
slot="append"
|
|
|
|
:key="item.userName"
|
|
|
|
@click="handleSelectPerson"
|
|
|
|
:label="item.teamUserName"
|
|
|
|
icon="el-icon-search"
|
|
|
|
:value="item.userName"
|
|
|
|
></el-button>
|
|
|
|
></el-option>
|
|
|
|
</el-input>
|
|
|
|
</el-select>
|
|
|
|
<ItemSelectPerson
|
|
|
|
|
|
|
|
ref="itemSelectPerson"
|
|
|
|
|
|
|
|
@onSelected="onItemSelectedPerson"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</ItemSelectPerson>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
@ -617,7 +617,7 @@
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 维修基本信息 -->
|
|
|
|
<!-- 设备绑定备件 -->
|
|
|
|
<div v-if="this.repairRecordSteps == 3" class="step-body">
|
|
|
|
<div v-if="this.repairRecordSteps == 3" class="step-body">
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<el-transfer
|
|
|
|
<el-transfer
|
|
|
@ -631,16 +631,32 @@
|
|
|
|
</el-transfer>
|
|
|
|
</el-transfer>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 设备绑定辅助设备 -->
|
|
|
|
|
|
|
|
<div v-if="this.repairRecordSteps == 4" class="step-body">
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
|
|
<el-transfer
|
|
|
|
|
|
|
|
filterable
|
|
|
|
|
|
|
|
filter-placeholder="请输入辅助设备名称"
|
|
|
|
|
|
|
|
v-model="auxiliaryEquipmentRightList"
|
|
|
|
|
|
|
|
:titles="['未绑定辅助设备列表', '已绑定辅助设备列表']"
|
|
|
|
|
|
|
|
:button-texts="['取消', '绑定']"
|
|
|
|
|
|
|
|
:data="auxiliaryEquipmentLeftList"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-transfer>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<el-button v-if="this.repairRecordSteps > 0" @click="stepLast"
|
|
|
|
<el-button v-if="this.repairRecordSteps > 0" @click="stepLast"
|
|
|
|
>上一步</el-button
|
|
|
|
>上一步</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-button v-if="this.repairRecordSteps < 3" @click="stepNext"
|
|
|
|
<el-button v-if="this.repairRecordSteps < 4" @click="stepNext"
|
|
|
|
>下一步</el-button
|
|
|
|
>下一步</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
v-if="this.repairRecordSteps == 3"
|
|
|
|
v-if="this.repairRecordSteps == 4"
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
@click="submitForm"
|
|
|
|
@click="submitForm"
|
|
|
|
>提 交</el-button
|
|
|
|
>提 交</el-button
|
|
|
@ -719,7 +735,7 @@
|
|
|
|
form.department
|
|
|
|
form.department
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
<el-descriptions-item label="设备负责人">{{
|
|
|
|
<el-descriptions-item label="设备负责人">{{
|
|
|
|
form.equipmentHeadName
|
|
|
|
form.equipmentHead
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
</el-descriptions>
|
|
|
|
</el-descriptions>
|
|
|
|
|
|
|
|
|
|
|
@ -890,11 +906,12 @@ import { listTeamMembers } from "@/api/wms/team";
|
|
|
|
import EquipmentSpareParts from "./single.vue";
|
|
|
|
import EquipmentSpareParts from "./single.vue";
|
|
|
|
import { Message } from "element-ui";
|
|
|
|
import { Message } from "element-ui";
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
|
|
|
import ItemSelectPerson from "./single.vue";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Equipment",
|
|
|
|
name: "Equipment",
|
|
|
|
dicts: ["sys_normal_disable", "equ_type", "equipment_status"],
|
|
|
|
dicts: ["sys_normal_disable", "equ_type", "equipment_status"],
|
|
|
|
components: { EquipmentSpareParts },
|
|
|
|
components: { EquipmentSpareParts ,ItemSelectPerson},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
CS: {
|
|
|
|
CS: {
|
|
|
@ -969,6 +986,9 @@ export default {
|
|
|
|
repairRecordSteps: 0,
|
|
|
|
repairRecordSteps: 0,
|
|
|
|
leftList: [],
|
|
|
|
leftList: [],
|
|
|
|
rightList: [],
|
|
|
|
rightList: [],
|
|
|
|
|
|
|
|
//辅助设备
|
|
|
|
|
|
|
|
auxiliaryEquipmentRightList:[],
|
|
|
|
|
|
|
|
auxiliaryEquipmentLeftList:[],
|
|
|
|
bind: undefined,
|
|
|
|
bind: undefined,
|
|
|
|
imageFileList: [],
|
|
|
|
imageFileList: [],
|
|
|
|
qrFileList: [],
|
|
|
|
qrFileList: [],
|
|
|
@ -1108,16 +1128,13 @@ export default {
|
|
|
|
this.queryEquipmentHeadParams.pageNum = 1;
|
|
|
|
this.queryEquipmentHeadParams.pageNum = 1;
|
|
|
|
this.queryEquipmentHeadParams.pageSize = 2000;
|
|
|
|
this.queryEquipmentHeadParams.pageSize = 2000;
|
|
|
|
listTeamMembers(this.queryHeadParams).then((response) => {
|
|
|
|
listTeamMembers(this.queryHeadParams).then((response) => {
|
|
|
|
console.log(response.rows);
|
|
|
|
|
|
|
|
this.equipmentHeadOption = response.rows;
|
|
|
|
this.equipmentHeadOption = response.rows;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 查询设备分类 */
|
|
|
|
/** 查询设备分类 */
|
|
|
|
getEquipmentType() {
|
|
|
|
getEquipmentType() {
|
|
|
|
getEquipmentTypeList().then((response) => {
|
|
|
|
getEquipmentTypeList().then((response) => {
|
|
|
|
console.log(response.rows);
|
|
|
|
|
|
|
|
this.equipmentTypeOption = response.rows;
|
|
|
|
this.equipmentTypeOption = response.rows;
|
|
|
|
console.log(this.treeData1);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 查询设备备件 */
|
|
|
|
/** 查询设备备件 */
|
|
|
@ -1147,6 +1164,17 @@ export default {
|
|
|
|
getList() {
|
|
|
|
getList() {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
listEquipment(this.queryParams).then((response) => {
|
|
|
|
listEquipment(this.queryParams).then((response) => {
|
|
|
|
|
|
|
|
for (let i in response.rows) {
|
|
|
|
|
|
|
|
// 将返回的列表赋值于穿梭框左边列表
|
|
|
|
|
|
|
|
this.auxiliaryEquipmentLeftList.push({
|
|
|
|
|
|
|
|
key: response.rows[i].equipmentCode,
|
|
|
|
|
|
|
|
label: response.rows[i].equipmentName,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (let i in response.selected) {
|
|
|
|
|
|
|
|
this.auxiliaryEquipmentLeftList.push(response.selected[i].key);
|
|
|
|
|
|
|
|
this.form.auxiliaryEquipmentRightData = this.auxiliaryEquipmentRightList;
|
|
|
|
|
|
|
|
}
|
|
|
|
this.equipmentList = response.rows;
|
|
|
|
this.equipmentList = response.rows;
|
|
|
|
this.total = response.total;
|
|
|
|
this.total = response.total;
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
@ -1194,6 +1222,7 @@ export default {
|
|
|
|
workshopSection: null,
|
|
|
|
workshopSection: null,
|
|
|
|
equipmentLocation: null,
|
|
|
|
equipmentLocation: null,
|
|
|
|
hourlyUnitPrice: null,
|
|
|
|
hourlyUnitPrice: null,
|
|
|
|
|
|
|
|
equipmentHead : null,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.resetForm("form");
|
|
|
|
this.resetForm("form");
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -1246,25 +1275,29 @@ export default {
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
getWorkCenterList().then((response) => {
|
|
|
|
getWorkCenterList().then((response) => {
|
|
|
|
this.options1 = response.rows;
|
|
|
|
this.options1 = response.rows;
|
|
|
|
console.log(this.options1);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
this.repairRecordSteps = 0;
|
|
|
|
this.open = true;
|
|
|
|
this.open = true;
|
|
|
|
this.title = "添加设备管理";
|
|
|
|
this.title = "添加设备管理";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
handleUpdate(row) {
|
|
|
|
handleUpdate(row) {
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
const equipmentId = row.equipmentId || this.ids;
|
|
|
|
const equipmentId = row.equipmentId || this.ids;
|
|
|
|
getWorkCenterList().then((response) => {
|
|
|
|
getWorkCenterList().then((response) => {
|
|
|
|
this.options1 = response.rows;
|
|
|
|
this.options1 = response.rows;
|
|
|
|
console.log(this.options1);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
getEquipment(equipmentId).then((response) => {
|
|
|
|
getEquipment(equipmentId).then((response) => {
|
|
|
|
this.form = response.data;
|
|
|
|
this.form = response.data;
|
|
|
|
for (let i in response.data.selectedData) {
|
|
|
|
for (let i in response.data.selectedData) {
|
|
|
|
// 将返回的列表赋值于穿梭框右边列表
|
|
|
|
// 将返回的备品备件列表赋值于穿梭框右边列表
|
|
|
|
this.rightList.push(response.data.selectedData[i].spareCode);
|
|
|
|
this.rightList.push(response.data.selectedData[i].spareCode);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for (let i in response.data.selectedEquipmentData) {
|
|
|
|
|
|
|
|
// 将返回的辅助设备列表赋值于穿梭框右边列表
|
|
|
|
|
|
|
|
this.auxiliaryEquipmentRightList.push(response.data.selectedEquipmentData[i].auxiliaryEquipmentCode);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (response.data.imageFiles != null) {
|
|
|
|
if (response.data.imageFiles != null) {
|
|
|
|
var newFiles = [];
|
|
|
|
var newFiles = [];
|
|
|
@ -1275,7 +1308,6 @@ export default {
|
|
|
|
newFiles.push(newFile);
|
|
|
|
newFiles.push(newFile);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
this.form.imageFileList = newFiles;
|
|
|
|
this.form.imageFileList = newFiles;
|
|
|
|
console.log("55555", this.form.imageFileList);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (response.data.qrFiles != null) {
|
|
|
|
if (response.data.qrFiles != null) {
|
|
|
|
var newFiles = [];
|
|
|
|
var newFiles = [];
|
|
|
@ -1298,16 +1330,17 @@ export default {
|
|
|
|
this.form.barCodeFileList = newFiles;
|
|
|
|
this.form.barCodeFileList = newFiles;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.form.workCenter = this.form.workshopCode;
|
|
|
|
this.form.workCenter = this.form.workshopCode;
|
|
|
|
|
|
|
|
this.repairRecordSteps = 0;
|
|
|
|
this.open = true;
|
|
|
|
this.open = true;
|
|
|
|
this.title = "修改设备管理";
|
|
|
|
this.title = "修改设备管理";
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 查询明细按钮操作
|
|
|
|
// 查询明细按钮操作
|
|
|
|
handleView(row) {
|
|
|
|
handleView(row) {
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
const equipmentId = row.equipmentId || this.ids;
|
|
|
|
const equipmentId = row.equipmentId || this.ids;
|
|
|
|
getWorkCenterList().then((response) => {
|
|
|
|
getWorkCenterList().then((response) => {
|
|
|
|
console.log(this.options1);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
getEquipment(equipmentId).then((response) => {
|
|
|
|
getEquipment(equipmentId).then((response) => {
|
|
|
|
this.form = response.data;
|
|
|
|
this.form = response.data;
|
|
|
@ -1341,6 +1374,7 @@ export default {
|
|
|
|
this.optType = "view";
|
|
|
|
this.optType = "view";
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
/** 提交按钮 */
|
|
|
|
submitForm() {
|
|
|
|
submitForm() {
|
|
|
|
if (Array.isArray(this.form.qrFileList)) {
|
|
|
|
if (Array.isArray(this.form.qrFileList)) {
|
|
|
@ -1358,6 +1392,7 @@ export default {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (this.form.equipmentId != null) {
|
|
|
|
if (this.form.equipmentId != null) {
|
|
|
|
this.form.rightData = this.rightList;
|
|
|
|
this.form.rightData = this.rightList;
|
|
|
|
|
|
|
|
this.form.auxiliaryEquipmentRightData = this.auxiliaryEquipmentRightList;
|
|
|
|
updateEquipment(this.form).then((response) => {
|
|
|
|
updateEquipment(this.form).then((response) => {
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
@ -1381,6 +1416,7 @@ export default {
|
|
|
|
"【设备基础信息】设备类型为空,请选择设备类型!"
|
|
|
|
"【设备基础信息】设备类型为空,请选择设备类型!"
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.form.auxiliaryEquipmentRightData = this.auxiliaryEquipmentRightList;
|
|
|
|
this.form.rightData = this.rightList;
|
|
|
|
this.form.rightData = this.rightList;
|
|
|
|
addEquipment(this.form).then((response) => {
|
|
|
|
addEquipment(this.form).then((response) => {
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
@ -1467,6 +1503,17 @@ export default {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//人员选择
|
|
|
|
|
|
|
|
handleSelectPerson() {
|
|
|
|
|
|
|
|
this.$refs.itemSelectPerson.showFlag = true;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//人员选择
|
|
|
|
|
|
|
|
onItemSelectedPerson(obj) {
|
|
|
|
|
|
|
|
this.$set(this.form,"equipmentHead",obj[0].nickName + "(" + obj[0].userName+")" );
|
|
|
|
|
|
|
|
console.log(this.form.equipmentHead);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 设备状态修改
|
|
|
|
// 设备状态修改
|
|
|
|
handleStatusChange(row) {
|
|
|
|
handleStatusChange(row) {
|
|
|
|
let text = row.status === "1" ? "启用" : "停用";
|
|
|
|
let text = row.status === "1" ? "启用" : "停用";
|
|
|
@ -1498,4 +1545,8 @@ export default {
|
|
|
|
.step-body {
|
|
|
|
.step-body {
|
|
|
|
margin-top: 50px;
|
|
|
|
margin-top: 50px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.el-transfer-panel {
|
|
|
|
|
|
|
|
width: 350px;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|