Merge remote-tracking branch 'origin/master'

master
陈恒杰 1 year ago
commit 92ff4350e6

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

@ -119,10 +119,11 @@ export function commitActualValue(recordId, actualValues) {
}
//审核结果提交
export function commitCheckResult(recordId,typeCode) {
export function commitCheckResult(recordId,typeCode,checkType) {
const data = {
recordId,
typeCode
typeCode,
checkType
}
return request({
url: '/quality/qcIncome/commitCheckResult',

@ -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 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="请输入维修人员" />
<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-input v-model="form.workOutsourcingUnit" placeholder="请输入委外单位" style="width: 270px"/>
</el-form-item>
<el-form-item label="原因" prop="workReason">
<el-input v-model="form.workReason" 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="managementCode">
<el-input v-model="form.managementCode" placeholder="请输入管理单号" />
<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,
@ -275,6 +304,14 @@ export default {
factoryCode: null
};
this.resetForm("form");
},
//
handleSelectEquipment() {
this.$refs.itemSelect.showFlag = true;
},
//
onItemSelectedEquipment(obj) {
this.form.equipmentCode = obj;
},
/** 搜索按钮操作 */
handleQuery() {

@ -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,7 +656,7 @@
</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="请填写委外单位"
@ -587,7 +665,7 @@
</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="请填写委外维修人员"
@ -596,7 +674,7 @@
</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="请填写委外联系方式"
@ -607,11 +685,58 @@
</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"
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="委外维修人员" 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="联系方式" 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="委外原因" 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>
@ -820,8 +945,22 @@
</el-col>
<el-col :span="8">
<el-form-item label="维修状态" prop="workStatus">
<el-input v-model="form.workStatus" style="width: 195px">
</el-input>
<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();
},
//

@ -202,24 +202,25 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
type="success"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
@click="orderDialog = true"
v-hasPermi="['device:upkeepOrder:add']"
>新增</el-button>
>快速工单
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
type="primary"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['device:upkeepOrder:edit']"
>修改</el-button>
>结果检验
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -230,7 +231,8 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['device:upkeepOrder:remove']"
>删除</el-button>
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -240,7 +242,8 @@
size="mini"
@click="handleExport"
v-hasPermi="['device:upkeepOrder:export']"
>导出</el-button>
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -299,7 +302,7 @@
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column width="180" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
@ -307,14 +310,16 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:upkeepOrder:edit']"
>修改</el-button>
>填写记录
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:upkeepOrder:remove']"
>删除</el-button>
>删除
</el-button>
</template>
</el-table-column>
</el-table>
@ -327,90 +332,389 @@
@pagination="getList"
/>
<!-- 添加或修改保养工单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<!-- 快速工单弹出框 -->
<el-dialog
title="快速工单"
:visible.sync="orderDialog"
width="800px"
>
<el-tabs type="border-card">
<el-tab-pane label="工单基本信息">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="计划id" prop="planId">
<el-input v-model="form.planId" placeholder="请输入计划id" />
</el-form-item>
<el-form-item label="计划编码" prop="planCode">
<el-input v-model="form.planCode" placeholder="请输入计划编码" />
</el-form-item>
<el-form-item label="单号" prop="orderCode">
<el-input v-model="form.orderCode" placeholder="请输入单号" />
</el-form-item>
<el-form-item label="车间" prop="planWorkshop">
<el-input v-model="form.planWorkshop" placeholder="请输入车间" />
</el-form-item>
<el-form-item label="产线" prop="planProdLine">
<el-input v-model="form.planProdLine" placeholder="请输入产线" />
</el-form-item>
<el-form-item label="循环周期" prop="planLoop">
<el-input v-model="form.planLoop" placeholder="请输入循环周期" />
</el-form-item>
<el-form-item label="循环执行时间开始" prop="planLoopStart">
<el-date-picker clearable
v-model="form.planLoopStart"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择循环执行时间开始">
</el-date-picker>
</el-form-item>
<el-form-item label="循环执行时间结束" prop="planLoopEnd">
<el-date-picker clearable
v-model="form.planLoopEnd"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择循环执行时间结束">
</el-date-picker>
<el-row>
<el-col :span="8">
<el-form-item label="保养名称:">
<el-input v-model="form.planName" placeholder="请输入保养名称"/>
</el-form-item>
<el-form-item label="实际开始时间" prop="orderStart">
<el-date-picker clearable
v-model="form.orderStart"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择实际开始时间">
</el-date-picker>
</el-col>
<el-col :span=12 :offset="1">
<el-form-item label="是否停机保养:">
<el-radio v-model="form.shutDown" label="0"></el-radio>
<el-radio v-model="form.shutDown" label="1"></el-radio>
</el-form-item>
<el-form-item label="实际结束时间" prop="orderEnd">
<el-date-picker clearable
v-model="form.orderEnd"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择实际结束时间">
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label-width="100px" label="保养执行时间">
<el-date-picker
@change="changeArray"
v-model="form.planTimeArray"
type="datetimerange"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="设备编码" prop="equipmentCode">
<el-input v-model="form.equipmentCode" placeholder="请输入设备编码" />
</el-form-item>
<el-form-item label="工单费用" prop="orderCost">
<el-input v-model="form.orderCost" placeholder="请输入工单费用" />
</el-form-item>
<el-form-item label="责任人" prop="planPerson">
<el-input v-model="form.planPerson" placeholder="请输入责任人" />
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane label="选择设备、保养项">
<el-row>
<el-col class="my-step-mar" :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="selectEquBtn">
选择设备
</el-button>
</el-col>
</el-row>
<el-table
:data="form.equipmentItem"
stripe
style="width: 100%">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column
prop="equipmentCode"
label="设备编码"
width="180">
</el-table-column>
<el-table-column
prop="equipmentName"
label="设备名称"
width="180">
</el-table-column>
<el-table-column
prop="itemTempName"
label="巡检项"
width="300">
</el-table-column>
<el-table-column
width="150"
fixed="right"
label="操作"
>
<template slot-scope="scope">
<el-button @click="editorTheItem(scope.row)" type="text" size="small">标准</el-button>
<el-button @click="selectSpareBtn(scope.row)" type="text" size="small">备件</el-button>
<el-button @click="delTheEquItem(scope.row)" type="text" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 编辑检查项弹窗 -->
<el-dialog
title="编辑检查项"
:visible.sync="editorItem"
width="50%"
append-to-body
>
<!-- 编辑检查标准 -->
<el-table
:data="itemDetailList"
v-loading="detailLoading"
stripe
@selection-change="selectChangeEqu"
style="width: 100%">
<el-table-column width="55" align="center"/>
<el-table-column
prop="itemName"
label="检查项">
</el-table-column>
<el-table-column
prop="standardName"
label="检查标准">
</el-table-column>
<el-table-column
prop="standardTypeName"
label="标准类型">
</el-table-column>
<el-table-column
fixed="right"
label="操作"
>
<template slot-scope="scope">
<el-button @click="delStandard(scope.row)" type="text" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="standardBtn"> </el-button>
</span>
</el-dialog>
<!-- 选择设备弹窗 -->
<el-dialog
title="选择设备"
:visible.sync="selectEqu"
width="800px"
append-to-body
>
<el-form :model="equipmentQuery" ref="queryBPForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="设备编码">
<el-input
v-model="equipmentQuery.equipmentCode"
placeholder="请输入设备编码"
clearable
/>
</el-form-item>
<el-form-item label="工单用时" prop="orderCostTime">
<el-input v-model="form.orderCostTime" placeholder="请输入工单用时" />
<el-form-item label="设备名称">
<el-input
v-model="equipmentQuery.equipmentName"
placeholder="请输入设备名称"
clearable
/>
</el-form-item>
<el-form-item label="签字" prop="orderSignPerson">
<el-input v-model="form.orderSignPerson" placeholder="请输入签字" />
<el-form-item v-if="false" label="设备类型">
<el-input
v-model="equipmentQuery.equipmentName"
placeholder="请输入设备类型"
clearable
/>
</el-form-item>
<el-form-item label="工厂" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂" />
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getEquList"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetEqu"></el-button>
</el-form-item>
<el-form-item label="备用字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
</el-form>
<!-- 搜索-设备列表 -->
<el-table
:data="queryEquipment"
v-loading="equLoading"
stripe
@selection-change="selectChangeEqu"
style="width: 100%">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column
prop="equipmentCode"
label="设备编码">
</el-table-column>
<el-table-column
prop="equipmentName"
label="设备名称">
</el-table-column>
<el-table-column
prop="equipmentTypeName"
label="设备类型">
</el-table-column>
<el-table-column
prop="workshopName"
label="工作中心">
</el-table-column>
</el-table>
<pagination
v-show="equTotal>0"
:total="equTotal"
:page.sync="equipmentQuery.pageNum"
:limit.sync="equipmentQuery.pageSize"
@pagination="getEquList"
/>
<span slot="footer" class="dialog-footer">
<el-button @click="selectEqu = false"> </el-button>
<el-button type="primary" @click="confirmSelectEquBtn"> </el-button>
</span>
</el-dialog>
<!-- 选择备件弹窗 -->
<el-dialog
title="备件领用"
:visible.sync="spareDialog"
width="900px"
append-to-body
>
<el-tabs type="border-card">
<el-tab-pane label="备件选择">
<el-form :model="spareQuery" ref="queryBPForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="备件编码">
<el-input
v-model="spareQuery.materialCode"
placeholder="请输入备件编码"
clearable
/>
</el-form-item>
<el-form-item label="备用字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
<el-form-item label="备件名称">
<el-input
v-model="spareQuery.materialDesc"
placeholder="请输入备件名称"
clearable
/>
</el-form-item>
<el-form-item label="备用字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
<el-form-item v-if="false" label="备件类型">
<el-input
v-model="spareQuery.spareType"
placeholder="请输入备件类型"
clearable
/>
</el-form-item>
<el-form-item label="删除标志" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标志" />
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getSpareList"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetSpare"></el-button>
</el-form-item>
</el-form>
<!-- 搜索-备件列表 -->
<el-table
:data="spareList"
v-loading="spareLoading"
stripe
@selection-change="selectChangeSpare"
style="width: 100%">
<el-table-column v-if="false" type="selection" width="55" align="center"/>
<el-table-column
prop="materialCode"
label="备件号">
</el-table-column>
<el-table-column
prop="materialDesc"
label="备件名称">
</el-table-column>
<el-table-column
prop="spareType"
label="备件类型">
</el-table-column>
<el-table-column
prop="amount"
label="库存数量">
</el-table-column>
<el-table-column
width="150"
fixed="right"
label="操作"
>
<template slot-scope="scope">
<el-button @click="addSpareList(scope.row)" type="text" size="small">添加</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="spareTotal>0"
:total="spareTotal"
:page.sync="spareQuery.pageNum"
:limit.sync="spareQuery.pageSize"
@pagination="getSpareList"
/>
<span slot="footer" class="dialog-footer">
<el-button @click="spareDialog = false"> </el-button>
<el-button type="primary" @click="confirmSelectSpareBtn"> </el-button>
</span>
</el-tab-pane>
<el-tab-pane label="备件数量">
<el-row>
<el-col class="my-step-mar" :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="applyNumDialog = true , applyNum = null">
领用数量
</el-button>
</el-col>
</el-row>
<el-table
:data="chooseSpareList"
v-loading="spareLoading"
stripe
@selection-change="selectChangeSpare"
style="width: 100%">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column
prop="materialCode"
label="备件号">
</el-table-column>
<el-table-column
prop="materialDesc"
label="备件名称">
</el-table-column>
<el-table-column
prop="spareType"
label="备件类型">
</el-table-column>
<el-table-column
prop="amount"
label="库存数量">
</el-table-column>
<el-table-column
prop="applyNum"
label="领用数量">
</el-table-column>
<el-table-column
width="150"
fixed="right"
label="操作"
>
<template slot-scope="scope">
<el-button @click="delSpareList(scope.row)" type="text" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog
title="申领数量"
:visible.sync="applyNumDialog"
width="30%"
append-to-body
>
<el-row>
<el-col :span="8" :offset="7">
<el-input-number v-model="applyNum" @change="changeApplySpareNum" :min="1" label="描述文字"></el-input-number>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button v-if="false" @click="applyNumDialog = false"> </el-button>
<el-button type="primary" @click="applyNumDialog = false"> </el-button>
</span>
</el-dialog>
</el-tab-pane>
<el-button type="primary" class="dialog-footer" @click="spareChangeCom"></el-button>
</el-tabs>
</el-dialog>
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="orderDialog = false"> </el-button>
<el-button type="primary" @click="orderDialog = false"> </el-button>
</span>
</el-dialog>
<!-- 添加或修改保养工单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-tabs type="border-card">
<el-tab-pane label="基础信息">
<el-descriptions title="">
<el-descriptions-item label="计划编码">{{ this.form.planCode }}</el-descriptions-item>
<el-descriptions-item label="计划名称">{{ this.form.planName }}</el-descriptions-item>
<el-descriptions-item label="循环周期">{{ this.form.planLoop }}{{ this.form.planLoopType }}
</el-descriptions-item>
<el-descriptions-item label="工单编码">{{ this.form.orderCode }}</el-descriptions-item>
<el-descriptions-item label="车间编码">{{ this.form.planWorkshop }}</el-descriptions-item>
<el-descriptions-item label="工作中心">{{ this.form.workCenterName }}</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="记录">
记录
</el-tab-pane>
<el-tab-pane label="备件">
备件
</el-tab-pane>
</el-tabs>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
@ -420,12 +724,76 @@
</template>
<script>
import { listUpkeepOrder, getUpkeepOrder, delUpkeepOrder, addUpkeepOrder, updateUpkeepOrder } from "@/api/device/upkeepOrder";
import {
listUpkeepOrder,
getUpkeepOrder,
delUpkeepOrder,
addUpkeepOrder,
updateUpkeepOrder
} from "@/api/device/upkeepOrder";
import {formatEquItem, querySpareList} from "@/api/device/upkeepPlan";
import {getEquList} from "@/api/device/plan";
import {getDeviceOrder} from "@/api/device/deviceOrder";
export default {
name: "UpkeepOrder",
dicts: ['device_order_status', 'device_loop_type'],
data() {
return {
//
selOnSpare: [],
//
applyNum: null,
//
applyNumDialog: false,
//
chooseSpareList: [],
//
spareTotal: 0,
// table
spareLoading: false,
//
spareDialog: false,
// list
spareList: [],
// 穿
personList: [],
selectPersonList: [],
// list
workCenterList: [],
// list
itemDetailList: [],
// loading
detailLoading: false,
//
selectEquList: [],
// loading
equLoading: false,
//
equTotal: 0,
// list
queryEquipment: [],
//
spareQuery: {
materialCode: null,
materialDesc: null,
pageNum: 1,
pageSize: 10,
},
//
equipmentQuery: {
equipmentCode: null,
equipmentName: null,
workshopCode: null,
pageNum: 1,
pageSize: 10,
},
//
selectEqu: false,
//
editorItem: false,
//
orderDialog: false,
//
loading: true,
//
@ -474,19 +842,305 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
equ: {equipmentName: null},
},
//
form: {},
form: {
equ: {equipmentName: null},
selectSpareList: [],
equipmentItem: [],
shutDown: '0',
calculationRule: '0',
planLoopType: 'day',
planLoop: null,
upkeep: '1',
planName: null,
planWorkshop: null,
personList:[],
planTimeArray:[],
},
//
rules: {
}
rules: {}
};
},
created() {
this.getList();
},
methods: {
//
standardBtn() {
this.editorItem = false;
},
//
delStandard(e) {
e.showFlag = false;
for (let i = 0; i < this.itemDetailList.length; i++) {
if (this.itemDetailList[i].detailCode == e.detailCode) {
this.itemDetailList[i].showFlag = false;
this.itemDetailList.splice(i, 1);
}
}
},
// -
editorTheItem(e) {
//
this.itemDetailList = [];
for (let i = 0; i < this.form.equipmentItem.length; i++) {
if (e.code == this.form.equipmentItem[i].code) {
for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) {
var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName;
for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++){
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemName = itemName;
if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardType == "qualitative") {
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定性";
}else {
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定量";
}
this.itemDetailList.push(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k]);
}
}
}
}
this.editorItem = true;
},
// -
delTheEquItem(e) {
this.form.equipmentItem.splice(e.equipmentCode, 1)
},
//
confirmSelectEquBtn() {
if (this.selectEquList.length > 1) {
this.$message({
message: "只能选择一个设备!",
type: "warning"
})
return
}
//
formatEquItem(this.selectEquList).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.form.equipmentItem.push(response.data[i]);
}
this.selectEqu = false;
})
},
//
selectChangeEqu(e) {
this.selectEquList = e;
},
//
getEquList() {
this.equLoading = true;
this.equipmentQuery.workshopCode = this.form.planWorkshop;
getEquList(this.equipmentQuery).then(response => {
this.equTotal = response.total;
this.queryEquipment = response.rows;
this.equLoading = false;
})
},
//
selectEquBtn() {
this.getEquList();
this.selectEqu = true;
},
//
spareChangeCom() {
console.log("点击了完成按钮")
console.log(this.chooseSpareList)
console.log("form")
console.log(this.form)
this.spareDialog = false;
},
//
changeApplySpareNum(e) {
for (let i = 0; i < this.selOnSpare.length; i++) {
this.selOnSpare[i].applyNum = e;
}
},
// -
delSpareList(e) {
console.log("删除备件")
console.log(e)
for (let i = 0; i < this.chooseSpareList.length; i++){
if (this.chooseSpareList[i].materialCode == e.materialCode) {
this.chooseSpareList.splice(i,1);
this.$message({
message: '删除成功!',
type: 'success'
})
}
}
},
// -
addSpareList(e) {
console.log("选择备件")
console.log(e)
for (let i = 0; i < this.chooseSpareList.length; i++){
if (this.chooseSpareList[i].materialCode == e.materialCode) {
this.$message({
message: '不可重复添加!',
type: 'warning'
})
return;
}
}
this.chooseSpareList.push(e);
this.$message({
message: '添加成功!',
type: 'success'
})
},
//
changeArray(e) {
console.log(e)
console.log(this.form.planTimeArray)
if (this.form.planLoop == null) {
this.$message({
message: '请输入循环周期!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
if (this.form.planLoopType == null) {
this.$message({
message: '请选择循环类型!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
//
if (this.form.planLoopType == 'day') {
//
let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
//
let days = Math.floor(diff / (1000 * 60 * 60 * 24));
if (days > this.form.planLoop) {
this.$message({
message: '可执行时间范围为' + days + '天,循环周期为' + days + '天,超过循环周期' + (days - this.form.planLoop) + '天,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'week') {
//
let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
//
let weeks = Math.floor(diff / (1000 * 60 * 60 * 24 * 7));
if (weeks > (this.form.planLoop / 7)) {
this.$message({
message: '可执行时间范围为' + weeks + '周,循环周期为' + weeks + '周,超过循环周期' + (weeks * 7 - this.form.planLoop) + '天,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'month') {
let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
if (monthsDiff > this.form.planLoop) {
this.$message({
message: '可执行时间范围为' + monthsDiff + '月,循环周期为' + monthsDiff + '月,超过循环周期' + (monthsDiff - this.form.planLoop) + '月,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'season') {
let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
if (monthsDiff * 3 > this.form.planLoop) {
this.$message({
message: '可执行时间范围为' + monthsDiff * 3 + '季度,循环周期为' + monthsDiff * 3 + '季度,超过循环周期' + (monthsDiff - this.form.planLoop) + '月,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'year') {
//
let yearsDiff = this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear();
if (yearsDiff > this.form.planLoop) {
this.$message({
message: '可执行时间范围为' + yearsDiff + '年,循环周期为' + yearsDiff + '年,超过循环周期' + (yearsDiff - this.form.planLoop) + '年,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
},
//
confirmSelectSpareBtn() {
console.log("点击了选择备件确定按钮")
},
//
selectChangeSpare(e) {
console.log("多选改变")
console.log(e)
this.selOnSpare = e;
},
//
resetSpare() {
this.spareQuery = {
materialCode: null,
materialDesc: null,
pageNum: 1,
pageSize: 10,
};
this.setSpareList();
console.log("点击了搜索重置按钮")
},
//
setSpareList() {
querySpareList(this.spareQuery).then(response => {
this.spareTotal = response.total;
this.spareList = response.rows;
this.spareLoading = false;
console.log(response)
})
},
//
getSpareList() {
this.setSpareList()
console.log("点击了搜索备件按钮")
},
//
selectSpareBtn(e) {
console.log("点击了选择备件按钮!")
console.log(e)
this.setSpareList();
if (e.spareList == null) {
e.spareList = [];
}
this.chooseSpareList = e.spareList;
this.spareDialog = true;
},
/** 查询保养工单列表 */
getList() {
this.loading = true;
@ -531,7 +1185,8 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
equ: {equipmentName: null},
};
this.resetForm("form");
},
@ -555,16 +1210,18 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加保养工单";
this.title = "快速工单";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const orderId = row.orderId || this.ids
getUpkeepOrder(orderId).then(response => {
const orderCode = row.orderCode || this.ids
getDeviceOrder(orderCode).then(response => {
this.form = response.data;
console.log("这里是回显信息")
console.log(response.data)
this.open = true;
this.title = "修改保养工单";
this.title = "填写记录";
});
},
/** 提交按钮 */
@ -595,7 +1252,8 @@ export default {
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {

@ -861,7 +861,7 @@ export default {
equTotal: 0,
// list
queryEquipment: [],
//
//
spareQuery: {
materialCode: null,
materialDesc: null,

@ -932,7 +932,7 @@ export default {
}
}
this.productData[0].atrr1 = this.splitForm.splitNum
this.productData[0].atrr1 = this.splitForm.splitNum;
setAtrr1(this.productData[0], this.splitForm.splitNum)
this.refreshProTable = false // refreshProTablefalse
@ -1112,6 +1112,25 @@ export default {
//
this.splitForm.formFields = this.formFields
//
//
function setQuantitySplit(data) {
if (data.children !== undefined) {
for (let i = 0; i < data.children.length; i++) {
if (data.children[i].quantitySplit == null) {
data.children[i].quantitySplit = 0;
}
data.children[i].quantitySplit = Number(data.children[i].quantitySplit) + Number(data.children[i].atrr1)
setQuantitySplit(data.children[i]);
}
}
}
if (this.productData[0].quantitySplit == null) {
this.productData[0].quantitySplit = 0;
}
this.productData[0].quantitySplit = Number(this.splitForm.splitNum) + Number(this.productData[0].quantitySplit);
setQuantitySplit(this.productData[0])
//
const data = {
formFields: this.formFields,

@ -172,7 +172,7 @@ export default {
//
submitBomForm() {
commitCheckResult(this.queryParams.belongTo,this.typeCode).then(response => {
commitCheckResult(this.queryParams.belongTo,this.typeCode,this.checkType).then(response => {
this.$modal.msgSuccess("检测完成");
this.$emit('saveCheck');
this.showFlag = false;

@ -569,7 +569,6 @@ export default {
});
} else {
addIncome(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});

@ -599,7 +599,6 @@ export default {
});
} else {
addQcProduce(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});

@ -592,7 +592,6 @@ export default {
});
} else {
addWarehousing(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});

@ -1,14 +1,22 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="任务编码" prop="taskId">
<el-form-item label="任务编码" prop="checkNo">
<el-input
v-model="queryParams.taskId"
v-model="queryParams.checkNo"
placeholder="请输入所属任务编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="订单编码" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="请输入订单编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料号" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
@ -99,16 +107,27 @@
<el-table v-loading="loading" :data="unqualifiedList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="id" align="center" prop="id" v-if="false"/>
<el-table-column label="所属任务编码" align="center" prop="taskId" />
<el-table-column label="0未处理" align="center" prop="status" />
<el-table-column label="下一节点编码" align="center" prop="nextNodeCode" />
<el-table-column label="下一节点名称" align="center" prop="nextNodeName" />
<el-table-column label="不合格描述" align="center" prop="remark" />
<el-table-column label="预留字段1" align="center" prop="attr1" />
<el-table-column label="预留字段2" align="center" prop="attr2" />
<el-table-column label="预留字段3" align="center" prop="attr3" />
<el-table-column label="预留字段4" align="center" prop="attr4" />
<el-table-column label="工厂编码" align="center" prop="factoryCode" />
<el-table-column label="检查任务编码" align="center" prop="checkNo" width="150"/>
<el-table-column label="订单编码" align="center" prop="orderNo" width="150"/>
<el-table-column label="批次号" align="center" prop="incomeBatchNo" width="100"/>
<el-table-column label="质检项目" align="center" prop="checkName" width="80"/>
<el-table-column label="物料编码" align="center" prop="materialCode" width="150"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
<el-table-column label="订单数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="异常时间" align="center" prop="checkTime" width="120"/>
<el-table-column label="状态" align="center" prop="status" >
<template slot-scope="scope">
<dict-tag
:options="dict.type.do_result"
:value="scope.row.status"
/>
</template>
</el-table-column>
<el-table-column label="下一节点编码" align="center" prop="nextNodeCode" width="120"/>
<el-table-column label="下一节点名称" align="center" prop="nextNodeName" width="120"/>
<el-table-column label="提报时间" align="center" prop="createTime" width="120"/>
<el-table-column label="不合格描述" align="center" prop="remark" width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -131,38 +150,121 @@
/>
<!-- 添加或修改不合格处理对话框 -->
<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="taskId">
<el-input v-model="form.taskId" placeholder="请输入归属任务编码" />
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="8">
<el-form-item label="检验任务编号" prop="checkNo">
<el-input v-model="form.checkNo" placeholder="请输入检验任务编号" disabled/>
</el-form-item>
<el-form-item label="下一节点编码" prop="nextNodeCode">
<el-input v-model="form.nextNodeCode" placeholder="请输入下一节点编码" />
</el-col>
<el-col :span="8">
<el-form-item label="来料批次号" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" placeholder="请输入来料批次号" />
</el-form-item>
<el-form-item label="下一节点名称" prop="nextNodeName">
<el-input v-model="form.nextNodeName" placeholder="请输入下一节点名称" />
</el-col>
<el-col :span="8">
<el-form-item label="订单号" prop="orderNo">
<el-input v-model="form.orderNo" placeholder="请输入订单号" />
</el-form-item>
<el-form-item label="不合格描述" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请选择物料名称">
<el-button slot="append" @click="handleSelectMaterial" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
<el-form-item label="预留字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入预留字段1" />
</el-col>
<el-col :span="12">
<el-form-item label="物料号" prop="materialCode">
<el-input v-model="form.materialCode" placeholder="请输入物料号" disabled/>
</el-form-item>
<el-form-item label="预留字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入预留字段2" />
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="检验类型" prop="checkType" >
<el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;">
<el-option
v-for="dict in checkTypes"
:key="dict.id"
:label="dict.checkName"
:value="dict.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="预留字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入预留字段3" />
</el-col>
<el-col :span="8">
<el-form-item label="收货数量" prop="quality">
<el-input type="number" v-model="form.quality" placeholder="请输入收货数量" />
</el-form-item>
<el-form-item label="预留字段4" prop="attr4">
<el-input v-model="form.attr4" placeholder="请输入预留字段4" />
</el-col>
<el-col :span="8">
<el-form-item label="单位" prop="unit" >
<el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;">
<el-option
v-for="dict in dict.type.unit"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="供应商名称" prop="supplierName">
<el-input v-model="form.supplierName" placeholder="请选择供应商名称">
<el-button slot="append" @click="handleSelectSupplier" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="供应商编码" prop="supplierCode">
<el-input v-model="form.supplierCode" placeholder="请输入供应商编码" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="来料时间" prop="incomeTime">
<el-date-picker clearable
v-model="form.incomeTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择来料时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="检测人姓名" prop="checkManName">
<el-input v-model="form.checkManName" placeholder="请选择检测人姓名">
<el-button slot="append" @click="handleSelectUser" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检测人工号" prop="checkManCode" >
<el-input v-model="form.checkManCode" placeholder="请输入检测人工号" disabled/>
</el-form-item>
<el-form-item label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-col>
<el-col :span="8">
<el-form-item label="检测地点" prop="checkLoc">
<el-input v-model="form.checkLoc" placeholder="请输入检测地点" />
</el-form-item>
<el-form-item label="删除标识1删除0正常" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标识1删除0正常" />
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="不合格描述" prop="checkLoc">
<el-input type="textarea" autosize placeholder="请输入内容" v-model="form.remark"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -203,7 +305,7 @@ export default {
checkTimeArray: [],
pageNum: 1,
pageSize: 10,
taskId: null,
checkNo: null,
status: null,
nextNodeCode: null,
nextNodeName: null,
@ -223,8 +325,15 @@ export default {
created() {
this.getDate();
this.getList();
this.getCheckTypes();
},
methods: {
/****/
getCheckTypes() {
getCheckTypes('material').then(response => {
this.checkTypes = response;
});
},
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate (0)
@ -264,7 +373,7 @@ export default {
reset() {
this.form = {
id: null,
taskId: null,
checkNo: null,
status: null,
nextNodeCode: null,
nextNodeName: null,
@ -311,7 +420,7 @@ export default {
getUnqualified(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改不合格处理";
this.title = "不合格处理流程";
});
},
/** 提交按钮 */

@ -162,7 +162,7 @@ export default {
//--------------------->
leftList: [],
rightList: [],
titles: ["未factoryCode", "已关联产品"],
titles: ["未关联产品", "已关联产品"],
//
Ltotal: "",
LPageNum: "1",

Loading…
Cancel
Save