|
|
|
@ -59,7 +59,6 @@
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="设备类别" prop="equipmentCategory">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.equipmentCategory"
|
|
|
|
@ -75,6 +74,22 @@
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="工厂车间" prop="factoryWorkshop">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.factoryWorkshop"
|
|
|
|
|
placeholder="工厂车间"
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.factory_workshop"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
@ -279,6 +294,19 @@
|
|
|
|
|
prop="workshopName"
|
|
|
|
|
width="150"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="factoryWorkshop"
|
|
|
|
|
label="工厂车间"
|
|
|
|
|
width="150"
|
|
|
|
|
align="center"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag
|
|
|
|
|
:options="dict.type.factory_workshop"
|
|
|
|
|
:value="scope.row.factoryWorkshop"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="设备IP" align="center" prop="plcIp" width="150" />
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="设备端口号"
|
|
|
|
@ -560,6 +588,23 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="设备类别" prop="equipmentCategory">
|
|
|
|
|
<el-select
|
|
|
|
|
@change="changeHandler"
|
|
|
|
|
v-model="form.equipmentCategory"
|
|
|
|
|
placeholder="请选择设备类别"
|
|
|
|
|
style="width: 195px"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.equipment_category"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="sap线体编码" prop="sapCode">
|
|
|
|
|
<el-input
|
|
|
|
@ -576,15 +621,17 @@
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="设备类别" prop="equipmentCategory">
|
|
|
|
|
<el-form-item label="工厂车间" prop="factoryWorkshop">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="form.equipmentCategory"
|
|
|
|
|
placeholder="请选择设备类别"
|
|
|
|
|
v-model="form.factoryWorkshop"
|
|
|
|
|
placeholder="请选择工厂车间"
|
|
|
|
|
style="width: 195px"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.equipment_category"
|
|
|
|
|
v-for="dict in dict.type.factory_workshop"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
@ -592,7 +639,7 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
@ -875,7 +922,7 @@
|
|
|
|
|
form.equipmentTypeName
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="所属工作中心">{{
|
|
|
|
|
form.workCenter
|
|
|
|
|
form.workshopName
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="工作中心编码">{{
|
|
|
|
|
form.workshopCode
|
|
|
|
@ -907,6 +954,9 @@
|
|
|
|
|
<el-descriptions-item label="设备类别">{{
|
|
|
|
|
form.equipmentCategory
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="工厂车间">{{
|
|
|
|
|
form.factoryWorkshop
|
|
|
|
|
}}</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
|
|
|
|
|
<el-divider content-position="center">设备使用状况</el-divider>
|
|
|
|
@ -1130,6 +1180,7 @@ export default {
|
|
|
|
|
"equ_type",
|
|
|
|
|
"equipment_status",
|
|
|
|
|
"equipment_category",
|
|
|
|
|
"factory_workshop",
|
|
|
|
|
],
|
|
|
|
|
components: { ItemSelectPerson, ItemEquipment, ItemWXRecords, ItemBYRecords },
|
|
|
|
|
data() {
|
|
|
|
@ -1263,6 +1314,7 @@ export default {
|
|
|
|
|
equipmentLocation: null,
|
|
|
|
|
hourlyUnitPrice: null,
|
|
|
|
|
equipmentCategory: null,
|
|
|
|
|
factoryWorkshop: null,
|
|
|
|
|
},
|
|
|
|
|
queryEquipmentHeadParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
@ -1333,6 +1385,8 @@ export default {
|
|
|
|
|
equipmentCategory: [
|
|
|
|
|
{ required: true, message: "设备类别不能为空", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
sapName: [],
|
|
|
|
|
sapCode: [],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
@ -1346,7 +1400,26 @@ export default {
|
|
|
|
|
this.sparePartsList();
|
|
|
|
|
this.selectEquipmentTypeDept();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
//监听设备类型是不是组线
|
|
|
|
|
changeHandler(value) {
|
|
|
|
|
console.log("监听设备类型是不是组线",value);
|
|
|
|
|
if (value == "1") {
|
|
|
|
|
this.rules.sapCode.push({
|
|
|
|
|
required: true,
|
|
|
|
|
// message: "当设备类别为组线时,Sap编码不能为空",
|
|
|
|
|
});
|
|
|
|
|
this.rules.sapName.push({
|
|
|
|
|
required: true,
|
|
|
|
|
// message: "当设备类别为组线时,Sap名称不能为空",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this.rules.sapCode.pop();
|
|
|
|
|
this.rules.sapName.pop();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 填写维修记录步骤上一步
|
|
|
|
|
stepLast() {
|
|
|
|
|
this.repairRecordSteps--;
|
|
|
|
@ -1466,6 +1539,7 @@ export default {
|
|
|
|
|
unitMeasurement: null,
|
|
|
|
|
sapCode: null,
|
|
|
|
|
sapName: null,
|
|
|
|
|
factoryWorkshop: null,
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
@ -1617,6 +1691,14 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
this.form.barCodeFileList = newFiles;
|
|
|
|
|
}
|
|
|
|
|
if (this.form.equipmentCategory == "1") {
|
|
|
|
|
this.rules.sapCode.push({
|
|
|
|
|
required: true,
|
|
|
|
|
});
|
|
|
|
|
this.rules.sapName.push({
|
|
|
|
|
required: true,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
this.form.workCenter = this.form.workshopCode;
|
|
|
|
|
this.repairRecordSteps = 0;
|
|
|
|
|
this.queryAuxiliaryEquipmentParams.equipmentCode = null;
|
|
|
|
@ -1679,12 +1761,39 @@ export default {
|
|
|
|
|
if (this.form.equipmentId != null) {
|
|
|
|
|
this.form.rightData = this.rightList;
|
|
|
|
|
this.form.auxiliaryEquipmentRightData =
|
|
|
|
|
this.auxiliaryEquipmentRightList;
|
|
|
|
|
updateEquipment(this.form).then((response) => {
|
|
|
|
|
this.auxiliaryEquipmentRightList;
|
|
|
|
|
//修改提示
|
|
|
|
|
if (this.form.equipmentCode == null) {
|
|
|
|
|
this.$message.error(
|
|
|
|
|
"【设备基础信息】设备编码为空,请填写设备编码!"
|
|
|
|
|
);
|
|
|
|
|
} else if (this.form.equipmentName == null) {
|
|
|
|
|
this.$message.error(
|
|
|
|
|
"【设备基础信息】设备编名称为空,请填写设备名称!"
|
|
|
|
|
);
|
|
|
|
|
} else if (this.form.status == null) {
|
|
|
|
|
this.$message.error(
|
|
|
|
|
"【设备使用状况】设备状态为空,请选择设备状态!"
|
|
|
|
|
);
|
|
|
|
|
} else if (this.form.equipmentTypeCode == null) {
|
|
|
|
|
this.$message.error(
|
|
|
|
|
"【设备基础信息】设备类型为空,请选择设备类型!"
|
|
|
|
|
);
|
|
|
|
|
} else if (this.form.equipmentCategory == null) {
|
|
|
|
|
this.$message.error(
|
|
|
|
|
"【设备基础信息】设备类别为空,请选择设备类别!"
|
|
|
|
|
);
|
|
|
|
|
}else if (this.form.equipmentCategory == "1" && (this.form.sapName == null ||this.form.sapCode == null)) {
|
|
|
|
|
this.$message.error(
|
|
|
|
|
"【设备基础信息】Sap编码、Sap名称有空值,请填写!"
|
|
|
|
|
);
|
|
|
|
|
}else{
|
|
|
|
|
updateEquipment(this.form).then((response) => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (this.form.equipmentCode == null) {
|
|
|
|
|
this.$message.error(
|
|
|
|
@ -1706,6 +1815,10 @@ export default {
|
|
|
|
|
this.$message.error(
|
|
|
|
|
"【设备基础信息】设备类别为空,请选择设备类别!"
|
|
|
|
|
);
|
|
|
|
|
}else if (this.form.equipmentCategory == "1" && (this.form.sapName == null ||this.form.sapCode == null)) {
|
|
|
|
|
this.$message.error(
|
|
|
|
|
"【设备基础信息】Sap编码、Sap名称有空值,请填写!"
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
this.form.auxiliaryEquipmentRightData =
|
|
|
|
|
this.auxiliaryEquipmentRightList;
|
|
|
|
|