维修班组 报修 维修 委外

master
A0010407 1 year ago
parent 3bb5790c6b
commit e732aafe13

@ -42,3 +42,11 @@ export function delEquTeam(id) {
method: 'delete'
});
}
// 查询设备班组分类
export function getMaintenanceTeamList() {
return request({
url: '/device/equTeam/getMaintenanceTeamList',
method: 'get'
});
}

@ -237,6 +237,7 @@ import {
delEquTeam,
addEquTeam,
updateEquTeam,
getMaintenanceTeamList,
} from "@/api/device/equTeam";
import ItemSelectPerson from "./selectSinglePerson.vue";

@ -160,6 +160,7 @@
align="center"
prop="orderCode"
width="200"
fixed
/>
<el-table-column
label="设备编码"

@ -104,14 +104,30 @@
<el-table v-loading="loading" :data="outsourceWorkOrderList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="委外工单编码" align="center" prop="workCode" width="180"/>
<el-table-column label="维修人员" align="center" prop="workPerson" width="150"/>
<el-table-column label="报修单号" align="center" prop="orderCode" width="180"/>
<el-table-column label="维修单号" align="center" prop="repairCode" width="180"/>
<el-table-column label="设备编码" align="center" prop="equipmentCode" />
<el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="设备类型" align="center" prop="equipmentTypeName" />
<el-table-column label="委外维修人员" align="center" prop="workPerson" width="150"/>
<el-table-column label="委外单位" align="center" prop="workOutsourcingUnit" width="200"/>
<el-table-column label="联系方式" align="center" prop="workConnection" width="150"/>
<el-table-column label="原因" align="center" prop="workReason" width="150"/>
<el-table-column label="委外原因" align="center" prop="workReason" width="150"/>
<el-table-column label="委外类型" align="center" prop="workType" />
<el-table-column label="管理单号" align="center" prop="managementCode" />
<el-table-column label="委外费用" align="center" prop="workCost" />
<el-table-column label="委外用时" align="center" prop="workCostTime" />
<el-table-column width="180" label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column width="120" label="创建人" align="center" prop="createBy"/>
<el-table-column width="180" label="更新时间" align="center" prop="updateTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<el-table-column width="120" label="更新人" align="center" prop="updateBy"/>
<el-table-column label="工厂编码" align="center" prop="factoryCode" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
@ -143,36 +159,45 @@
<!-- 添加或修改委外工单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="委外工单编码" prop="workCode">
<el-input v-model="form.workCode" placeholder="请输入委外工单编码" />
</el-form-item>
<el-form-item label="维修人员" prop="workPerson">
<el-input v-model="form.workPerson" placeholder="请输入维修人员" />
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-form-item label="设备编码" prop="equipmentCode">
<el-input
v-model="form.equipmentCode"
placeholder="请输入设备编码"
style="width: 270px"
>
<el-button
slot="append"
@click="handleSelectEquipment"
icon="el-icon-search"
></el-button>
</el-input>
<ItemSelect ref="itemSelect" @onSelected="onItemSelectedEquipment">
</ItemSelect>
</el-form-item>
<el-form-item label="委外维修人员" prop="workPerson">
<el-input v-model="form.workPerson" placeholder="请输入委外维修人员" style="width: 270px"/>
</el-form-item>
<el-form-item label="委外单位" prop="workOutsourcingUnit">
<el-input v-model="form.workOutsourcingUnit" placeholder="请输入委外单位" />
</el-form-item>
<el-form-item label="联系方式" prop="workConnection">
<el-input v-model="form.workConnection" placeholder="请输入联系方式" />
</el-form-item>
<el-form-item label="原因" prop="workReason">
<el-input v-model="form.workReason" placeholder="请输入原因" />
<el-input v-model="form.workOutsourcingUnit" placeholder="请输入委外单位" style="width: 270px"/>
</el-form-item>
<el-form-item label="管理单号" prop="managementCode">
<el-input v-model="form.managementCode" placeholder="请输入管理单号" />
<el-form-item label="委外单位联系方式" prop="workConnection">
<el-input v-model="form.workConnection" placeholder="请输入委外单位联系方式" style="width: 270px"/>
</el-form-item>
<el-form-item label="委外原因" prop="workReason">
<el-input
v-model="form.workReason"
placeholder="请输入委外原因"
style="width: 270px"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
/>
</el-form-item>
<el-form-item label="委外费用" prop="workCost">
<el-input v-model="form.workCost" placeholder="请输入委外费用" />
<el-input v-model="form.workCost" placeholder="请输入委外费用" style="width: 270px"/>
</el-form-item>
<el-form-item label="委外用时" prop="workCostTime">
<el-input v-model="form.workCostTime" placeholder="请输入委外用时" />
</el-form-item>
<el-form-item label="删除标识" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标识" />
</el-form-item>
<el-form-item label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
<el-input v-model="form.workCostTime" placeholder="请输入委外用时" style="width: 270px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -185,9 +210,11 @@
<script>
import { listOutsourceWorkOrder, getOutsourceWorkOrder, delOutsourceWorkOrder, addOutsourceWorkOrder, updateOutsourceWorkOrder } from "@/api/device/outsourceWorkOrder";
import ItemSelect from "./selectSingleEquipment.vue";
export default {
name: "OutsourceWorkOrder",
components: { ItemSelect },
data() {
return {
//
@ -213,12 +240,13 @@ export default {
pageNum: 1,
pageSize: 10,
workCode: null,
repairCode: null,
workPerson: null,
workOutsourcingUnit: null,
workConnection: null,
workReason: null,
workType: null,
managementCode: null,
equipmentCode: null,
workCost: null,
workCostTime: null,
attr1: null,
@ -256,12 +284,13 @@ export default {
this.form = {
workId: null,
workCode: null,
repairCode: null,
workPerson: null,
workOutsourcingUnit: null,
workConnection: null,
workReason: null,
workType: null,
managementCode: null,
equipmentCode: null,
workCost: null,
workCostTime: null,
attr1: null,
@ -276,6 +305,14 @@ export default {
};
this.resetForm("form");
},
//
handleSelectEquipment() {
this.$refs.itemSelect.showFlag = true;
},
//
onItemSelectedEquipment(obj) {
this.form.equipmentCode = obj;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;

@ -0,0 +1,246 @@
<template>
<el-dialog title="设备选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1100px"
center
:before-close="cancelEquipmentForm"
>
<el-row :gutter="20">
<!--分类数据-->
<el-col :span="5" :xs="24">
<el-card >
<span>请选择设备类型</span>
<div class="head-container" style="text-align: center">
<el-tree
:data="treeData1"
:props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}"
node-key="id"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
default-expand-all
@node-click="handleNodeClick"
/>
</div>
</el-card>
</el-col>
<!--设备数据-->
<el-col :span="19" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备编码" prop="itemCode">
<el-input
v-model="queryParams.itemCode"
placeholder="请输入设备编码"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="itemName">
<el-input
v-model="queryParams.itemName"
placeholder="请输入设备名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<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-form-item>
</el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleEquipmentSelectionChange" ref="myTable">
<el-table-column width="50" align="center" type="selection">
<!-- <template v-slot="scope">
<el-radio v-model="selectedItemId" :label="scope.row.itemId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
</template> -->
</el-table-column>
<!-- 序号 -->
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
<el-table-column label="设备编码" align="center" key="itemCode" prop="equipmentCode" v-if="columns[0].visible" >
</el-table-column>
<el-table-column label="设备类型编码" align="center" key="itemTypeCode" prop="equipmentTypeCode" v-if="columns[2].visible" >
</el-table-column>
<el-table-column label="设备名称" align="left" key="itemName" prop="equipmentName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitEquipmentForm"> </el-button>
<el-button @click="cancelEquipmentForm"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getEquipmentList,getEquipmentTypeList} from "@/api/device/faultReport";
import { treeselect } from "@/api/wms/equipment";
import { Message } from 'element-ui'
export default {
name: "MdItemSingle",
// components: { Treeselect },
data() {
return {
treeData1:[],
showFlag:false,
//
selectedItemId: undefined,
selectedRows: undefined,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total:0,
//
itemList: null,
//
itemTypeOptions: undefined,
//
equipmentTypeCode: undefined,
//
queryParams: {
pageNum: 1,
pageSize: 10,
itemName: undefined,
equipmentTypeCode: undefined,
itemTypeId: 0,
itemCodeGet: '',
itemCode : undefined,
},
//
columns: [
{ key: 0, label: `设备编码`, visible: true },
{ key: 1, label: `设备名称`, visible: true },
{ key: 2, label: `设备类型`, visible: true },
]
};
},
created() {
this.getList();
this.getEquipmentType();
},
methods: {
//
reset() {
this.form = {
itemId: null,
itemCode: this.processId,
itemType: null,
};
this.resetForm("form");
},
handleEquipmentSelectionChange (val) {
this.itemList = val
},
//
indexMethod(index){
return index+1 ;
},
/** 查询设备编码列表*/
getList() {
this.loading = true;
getEquipmentList(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 查询分类下拉树结构 */
getEquipmentType() {
getEquipmentTypeList().then(response => {
console.log(response.rows);
this.treeData1 = response.rows;
console.log(this.treeData1);
});
},
//
filterNode(value, data) {
console.log(value, data);
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
handleNodeClick(data) {
console.log('id',data.id);
this.queryParams.equipmentTypeCode = data.equipmentTypeCode;
console.log(this.equipmentTypeCode);
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.equipmentTypeCode = null;
this.resetForm("queryForm");
this.handleQuery();
},
//
handleEquipmentSelectionChange(selection) {
this.ids = selection.map(item => item.equipmentCode);
this.single = selection.length!==1;
this.multiple = !selection.length;
console.log("多选框",this.ids);
},
submitEquipmentForm() {
const data = this.ids;
if(data.length >1){
Message.warning("只能选择一个报修机器,请勿选择多个!");
}else{
const equipmentCode = data.toString();
if(this.queryParams.itemCodeGet == ""){
this.queryParams.itemCodeGet = equipmentCode;
}else{
this.queryParams.itemCodeGet = this.queryParams.itemCodeGet + ','+ equipmentCode;
}
this.selectedRows = this.queryParams.itemCodeGet;
this.$emit('onSelected', this.selectedRows);
this.queryParams.equipmentTypeCode = null;
this.getList();
console.log('111111',this.queryParams.equipmentTypeCode);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
}
},
cancelEquipmentForm(){
this.queryParams.equipmentTypeCode = null;
this.getList();
console.log('111111',this.queryParams.equipmentTypeCode);
this.showFlag = false;
}
}
};
</script>

@ -52,41 +52,49 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="计划维修时间" prop="workPlanTime">
<el-date-picker
clearable
v-model="queryParams.workPlanTime"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择计划维修时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="计划停机时间" prop="workPlanDownTime">
<el-date-picker
clearable
v-model="queryParams.workPlanDownTime"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择计划停机时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="维修人员" prop="workPerson">
<el-input
v-model="queryParams.workPerson"
placeholder="请输入维修人员"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="维修组" prop="workTeam">
<el-input
<el-select
v-model="queryParams.workTeam"
placeholder="请输入维修组"
placeholder="请选择维修组"
@change="$forceUpdate()"
clearable
filterable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
>
<el-option
v-for="item in teamOption"
:key="item.teamCode"
:label="item.teamName"
:value="item.teamCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="维修状态" prop="workStatus">
<el-select
v-model="queryParams.workStatus"
placeholder="请选择维修状态"
@change="$forceUpdate()"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in workStatusOption"
:key="item.workStatus"
:label="item.label"
:value="item.workStatus"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否委外" prop="workOutsource">
<el-select
@ -94,7 +102,7 @@
placeholder="请选择是否委外"
@change="$forceUpdate()"
clearable
style="width: 220px"
style="width: 200px"
@keyup.enter.native="handleQuery"
>
<el-option
@ -105,7 +113,6 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="委外工单编码" prop="outWorkCode">
<el-input
v-model="queryParams.outWorkCode"
@ -114,6 +121,34 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="计划维修时间" prop="workPlanTime">
<el-date-picker
clearable
v-model="queryParams.workPlanTimeArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label="计划停机时间" prop="workPlanDownTime">
<el-date-picker
clearable
v-model="queryParams.workPlanDownTimeArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
@ -261,7 +296,9 @@
</template>
</el-table-column>
<el-table-column label="维修人员" align="center" prop="workPerson" />
<el-table-column label="维修组" align="center" prop="workTeam" />
<el-table-column label="维修组编码" align="center" prop="workTeam" width="100"/>
<el-table-column label="维修组名称" align="center" prop="teamName" width="100"/>
<el-table-column label="维修组人员" align="center" prop="teamPerson" width="300"/>
<el-table-column label="是否委外" align="center" prop="workOutsource">
<template slot-scope="scope">
{{ scope.row.workOutsource == "1" ? "转委外" : "不委外" }}
@ -280,36 +317,41 @@
width="300"
/>
<el-table-column
label="维修用时"
label="维修开始时间"
align="center"
prop="workCostTime"
prop="workStartTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.workCostTime) }}</span>
<span>{{ parseTime(scope.row.workStartTime) }}</span>
</template>
</el-table-column>
<el-table-column
label="维修开始时间"
label="维修结束时间"
align="center"
prop="workStartTime"
prop="workEndTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.workStartTime) }}</span>
<span>{{ parseTime(scope.row.workEndTime) }}</span>
</template>
</el-table-column>
<el-table-column
label="维修结束时间"
label="维修用时"
align="center"
prop="workEndTime"
prop="workCostTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.workEndTime) }}</span>
<span>{{ parseTime(scope.row.workCostTime) }}</span>
</template>
</el-table-column>
<el-table-column label="维修费用" align="center" prop="workCost" />
<el-table-column label="维修状态" align="center" prop="workStatus" >
<template slot-scope="scope">
{{ scope.row.workStatus == "1"?'维修结束': scope.row.workStatus == "2"?'维修中' : scope.row.workStatus == "0" ? '待维修' : '无'}}
</template>
</el-table-column>
<el-table-column label="工厂编码" align="center" prop="factoryCode" />
<el-table-column
label="操作"
@ -354,18 +396,11 @@
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="报修单号" prop="orderCode">
<el-input
v-model="form.orderCode"
placeholder="请输入报修单号"
style="width: 250px"
/>
</el-form-item>
<el-form-item label="设备编码" prop="equipmentCode">
<el-input
v-model="form.equipmentCode"
placeholder="请输入设备编码"
style="width: 250px"
style="width: 280px"
>
<el-button
slot="append"
@ -382,17 +417,23 @@
v-model="form.workPlanTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 250px"
style="width: 280px"
placeholder="请选择计划维修时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="计划停机时间" prop="workPlanDownTime">
<el-form-item label="是否停机维修" prop="workDownMachine">
<el-radio-group v-model="form.workDownMachine">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="计划停机时间" prop="workPlanDownTime" v-if="form.workDownMachine == '1' ">
<el-date-picker
clearable
v-model="form.workPlanDownTime"
type="datetime"
style="width: 250px"
style="width: 280px"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择计划停机时间"
>
@ -402,7 +443,7 @@
<el-input
v-model="form.workPerson"
placeholder="请选择维修人"
style="width: 250px"
style="width: 280px"
>
<el-button
slot="append"
@ -416,11 +457,31 @@
>
</ItemSelectPerson>
</el-form-item>
<el-form-item label="维修组" prop="workTeam" style="width: 250px">
<el-input
<el-form-item label="维修组" prop="workTeam">
<el-select
v-model="form.workTeam"
placeholder="请输入维修组"
style="width: 250px"
placeholder="请选择维修组"
@change="$forceUpdate()"
clearable
filterable
style="width: 280px"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in teamOption"
:key="item.teamCode"
:label="item.teamName"
:value="item.teamCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="故障描述" prop="workFaultDesc">
<el-input
v-model="form.workFaultDesc"
placeholder="请输入故障描述"
style="width: 280px"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
/>
</el-form-item>
</el-form>
@ -465,7 +526,13 @@
>
</el-date-picker>
</el-form-item>
<el-form-item label="计划停机时间" prop="workPlanDownTime">
<el-form-item label="是否停机维修" prop="workDownMachine">
<el-radio-group v-model="form.workDownMachine">
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="计划停机时间" prop="workPlanDownTime" v-if="form.workDownMachine == '1' ">
<el-date-picker
clearable
v-model="form.workPlanDownTime"
@ -494,12 +561,23 @@
>
</ItemSelectPerson>
</el-form-item>
<el-form-item label="维修组" prop="workTeam" style="width: 250px">
<el-input
<el-form-item label="维修组" prop="workTeam">
<el-select
v-model="form.workTeam"
placeholder="请输入维修组"
placeholder="请选择维修组"
@change="$forceUpdate()"
clearable
filterable
style="width: 250px"
/>
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in teamOption"
:key="item.teamCode"
:label="item.teamName"
:value="item.teamCode"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -578,40 +656,87 @@
</el-row>
<el-row>
<el-col :span="8">
<el-form-item prop="workOutsourcingUnit" label="委外单位">
<el-form-item prop="workOutsourcingUnit" label="委外单位" v-if="form.outWorkCode == null">
<el-input
v-model="form.workOutsourcingUnit"
placeholder="请填写委外单位"
style="width: 195px"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="outSourcePerson" label="委外维修人员" v-if="form.outWorkCode == null">
<el-input
v-model="form.outSourcePerson"
placeholder="请填写委外维修人员"
style="width: 195px"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="workConnection" label="联系方式" v-if="form.outWorkCode == null">
<el-input
v-model="form.workConnection"
placeholder="请填写委外联系方式"
style="width: 195px"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item prop="outSourceReason" label="委外原因" v-if="form.outWorkCode == null">
<el-input
v-model="form.outSourceReason"
placeholder="请输入委外原因"
type="textarea"
style="width: 840px"
:autosize="{ minRows: 2, maxRows: 4 }"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item prop="workOutsourcingUnit" label="委外单位" v-if="form.outWorkCode != null">
<el-input
v-model="form.workOutsourcingUnit"
placeholder="请填写委外单位"
style="width: 195px"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="outSourcePerson" label="委外维修人员">
<el-form-item prop="outSourcePerson" label="委外维修人员" v-if="form.outWorkCode != null">
<el-input
v-model="form.outSourcePerson"
placeholder="请填写委外维修人员"
style="width: 195px"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="workConnection" label="联系方式">
<el-form-item prop="workConnection" label="联系方式" v-if="form.outWorkCode != null">
<el-input
v-model="form.workConnection"
placeholder="请填写委外联系方式"
style="width: 195px"
disabled
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item prop="outSourceReason" label="委外原因">
<el-form-item prop="outSourceReason" label="委外原因" v-if="form.outWorkCode != null">
<el-input
v-model="form.outSourceReason"
placeholder="请输入委外原因"
type="textarea"
disabled
style="width: 840px"
:autosize="{ minRows: 2, maxRows: 4 }"
/>
</el-form-item>
@ -819,9 +944,23 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="维修状态" prop="workStatus">
<el-input v-model="form.workStatus" style="width: 195px">
</el-input>
<el-form-item label="维修状态" prop="workStatus">
<el-select
v-model="queryParams.workStatus"
placeholder="请选择维修状态"
@change="$forceUpdate()"
clearable
style="width: 220px"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in workStatusOption"
:key="item.workStatus"
:label="item.label"
:value="item.workStatus"
></el-option>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
<el-col :span="8">
@ -921,6 +1060,7 @@ import {
applyOutsource,
writeRepairOrder,
} from "@/api/device/repairOrder";
import { getMaintenanceTeamList } from "@/api/device/equTeam";
import ItemSelect from "./selectSingleEquipment.vue";
import ItemSelectPerson from "./selectSinglePerson.vue";
import { Message } from "element-ui";
@ -931,6 +1071,8 @@ export default {
components: { ItemSelect, ItemSelectPerson, SelectSpareParts },
data() {
return {
//
teamOption: [],
optType: undefined,
//
repairRecordSteps: 0,
@ -984,7 +1126,11 @@ export default {
attr2: null,
attr3: null,
factoryCode: null,
//
workPlanTimeArray: [],
workPlanDownTimeArray: [],
},
//
workOutsourceOption: [
{
workOutsource: "1",
@ -995,6 +1141,7 @@ export default {
label: "不委外",
},
],
//
workDownMachineOption: [
{
workDownMachine: "1",
@ -1005,6 +1152,49 @@ export default {
label: "不停机",
},
],
//
workStatusOption: [
{
workStatus: "0",
label: "待维修",
},
{
workStatus: "2",
label: "维修中",
},
{
workStatus: "1",
label: "维修结束",
},
],
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
//
form: {},
//
@ -1013,6 +1203,7 @@ export default {
},
created() {
this.getList();
this.getTeamList();
},
methods: {
//
@ -1032,6 +1223,16 @@ export default {
this.loading = false;
});
},
/** 查询维修工单列表 */
getTeamList() {
this.loading = true;
getMaintenanceTeamList(this.queryParams).then((response) => {
console.log(response.rows);
this.teamOption = response.rows;
});
},
// -
cancelAddForm() {
this.openAdd = false;
@ -1093,6 +1294,9 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
//
this.queryParams.workPlanTimeArray = [],
this.queryParams.workPlanDownTimeArray = [],
this.handleQuery();
},
//

Loading…
Cancel
Save