Merge remote-tracking branch 'origin/master'

yangwl
wws 12 months ago
commit 05f3231482

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

@ -100,10 +100,10 @@ export const constantRoutes = [
component: () => import("@/views/kanban/exception/index"), component: () => import("@/views/kanban/exception/index"),
hidden: true, hidden: true,
}, },
// 看板路由 // 看板路由
{ {
path: "/kanban/3decharts", path: "/kanban/equipment",
component: () => import("@/views/kanban/3decharts/index"), component: () => import("@/views/kanban/equipment/index"),
hidden: true, hidden: true,
}, },
] ]

@ -54,9 +54,9 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="报修人编号" prop="orderRepairman"> <el-form-item label="报修人编号" prop="orderRepairmanCode">
<el-input <el-input
v-model="queryParams.orderRepairman" v-model="queryParams.orderRepairmanCode"
placeholder="请输入报修人编号" placeholder="请输入报修人编号"
style="width: 200px" style="width: 200px"
clearable clearable
@ -171,6 +171,15 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- 序号 -->
<el-table-column
type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
fixed
/>
<el-table-column <el-table-column
label="报修单号" label="报修单号"
align="center" align="center"
@ -309,61 +318,67 @@
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="基本信息"> <el-tab-pane label="基本信息">
<el-descriptions :column="3" border> <el-descriptions :column="3" border>
<el-descriptions-item label="设备编码">{{ <el-descriptions-item label="设备编码">{{
form.equipmentCode form.equipmentCode
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="故障时间">{{ <el-descriptions-item label="故障时间">{{
form.orderBreakdownTime form.orderBreakdownTime
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="报修来源">{{ <el-descriptions-item label="报修来源">{{
form.orderSource form.orderSource
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="报修时间">{{ <el-descriptions-item label="报修时间">{{
form.orderTime form.orderTime
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="报修人名字">{{ <el-descriptions-item label="报修人名字">{{
form.orderRepairmanName form.orderRepairmanName
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="联系方式">{{ <el-descriptions-item label="联系方式">{{
form.orderConnection form.orderConnection
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="故障描述">{{ <el-descriptions-item label="故障描述">{{
form.orderDesc form.orderDesc
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="1" border> <el-descriptions :column="1" border>
<el-descriptions-item label="故障图片"> <el-descriptions-item label="故障图片">
<el-image <el-image
v-for="(item, index) in urlLists" v-for="(item, index) in urlLists"
:key="index" :key="index"
:src="item" :src="item"
></el-image ></el-image
></el-descriptions-item> ></el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息"> <el-tab-pane label="检查项信息">
<el-table :data="checkList" border style="width: 100%"> <el-table :data="checkList" border style="width: 100%">
<el-table-column prop="itemName" label="检查项名称" width="150"> <el-table-column prop="itemName" label="检查项名称" width="200">
</el-table-column> </el-table-column>
<el-table-column prop="standardName" label="标准名称" width="180"> <el-table-column prop="itemMethod" label="检查项方法" width="200">
</el-table-column> </el-table-column>
<el-table-column prop="standardType" label="标准类型" width="100"> <el-table-column prop="standardName" label="标准名称" width="180">
</el-table-column> </el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="50"> <el-table-column prop="standardType" label="标准类型" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="actualValue" label="实际值" width="50"> <el-table-column prop="detailReach" label="是否达标" width="50">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="detailUpLimit" label="上限" width="50"> <dict-tag
</el-table-column> :options="dict.type.device_reach_standard"
<el-table-column prop="detailDownLimit" label="下限" width="50"> :value="scope.row.detailReach"
</el-table-column> />
<el-table-column prop="detailUnit" label="单位" width="50"> </template>
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="故障图片"> <el-table-column prop="actualValue" label="实际值" width="50">
</el-table-column> </el-table-column>
</el-table> <el-table-column prop="detailUpLimit" label="上限" width="50">
</el-tab-pane> </el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column>
<el-table-column prop="detailUnit" label="单位" width="45">
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="审核"> <el-tab-pane label="审核">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@ -372,7 +387,7 @@
<el-radio label="计划性维修">计划性维修</el-radio> <el-radio label="计划性维修">计划性维修</el-radio>
<el-radio label="不维修">不维修</el-radio> <el-radio label="不维修">不维修</el-radio>
<el-radio label="委外维修">委外维修</el-radio> <el-radio label="委外维修">委外维修</el-radio>
<el-radio label="立即维修" @click.native ="timeBackFilling" <el-radio label="立即维修" @click.native="timeBackFilling"
>立即维修</el-radio >立即维修</el-radio
> >
</el-radio-group> </el-radio-group>
@ -382,21 +397,21 @@
<el-row> <el-row>
<el-col :span="8" v-if="form.repairDestination == '计划性维修'"> <el-col :span="8" v-if="form.repairDestination == '计划性维修'">
<el-form-item prop="workTeam" label="维修组"> <el-form-item prop="workTeam" label="维修组">
<el-select <el-select
v-model="form.workTeam" v-model="form.workTeam"
placeholder="请选择维修组" placeholder="请选择维修组"
@change="$forceUpdate()" @change="$forceUpdate()"
clearable clearable
filterable filterable
style="width: 200px" style="width: 200px"
> >
<el-option <el-option
v-for="item in teamOption" v-for="item in teamOption"
:key="item.teamCode" :key="item.teamCode"
:label="item.teamName" :label="item.teamName"
:value="item.teamCode" :value="item.teamCode"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" v-if="form.repairDestination == '计划性维修'"> <el-col :span="8" v-if="form.repairDestination == '计划性维修'">
@ -461,21 +476,21 @@
<el-row> <el-row>
<el-col :span="8" v-if="form.repairDestination == '立即维修'"> <el-col :span="8" v-if="form.repairDestination == '立即维修'">
<el-form-item prop="workTeam" label="维修组"> <el-form-item prop="workTeam" label="维修组">
<el-select <el-select
v-model="form.workTeam" v-model="form.workTeam"
placeholder="请选择维修组" placeholder="请选择维修组"
@change="$forceUpdate()" @change="$forceUpdate()"
clearable clearable
filterable filterable
style="width: 200px" style="width: 200px"
> >
<el-option <el-option
v-for="item in teamOption" v-for="item in teamOption"
:key="item.teamCode" :key="item.teamCode"
:label="item.teamName" :label="item.teamName"
:value="item.teamCode" :value="item.teamCode"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" v-if="form.repairDestination == '立即维修'"> <el-col :span="8" v-if="form.repairDestination == '立即维修'">
@ -641,7 +656,7 @@
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="报修信息审核结果"> <el-tab-pane label="报修审核结果">
<el-descriptions <el-descriptions
:column="2" :column="2"
border border
@ -657,7 +672,7 @@
form.workPlanTime form.workPlanTime
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="是否停机维修">{{ <el-descriptions-item label="是否停机维修">{{
form.workDownMachine form.workDownMachine ? "是" : "否"
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="计划停机时间">{{ <el-descriptions-item label="计划停机时间">{{
form.workPlanDownTime form.workPlanDownTime
@ -679,7 +694,7 @@
form.workPlanTime form.workPlanTime
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="是否停机维修">{{ <el-descriptions-item label="是否停机维修">{{
form.workDownMachine form.workDownMachine ? "是" : "否"
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="计划停机时间">{{ <el-descriptions-item label="计划停机时间">{{
form.workPlanDownTime form.workPlanDownTime
@ -714,24 +729,34 @@
form.workConnection form.workConnection
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="2" <el-descriptions
border :column="2"
v-if="form.repairDestination == '委外维修'"> border
<el-descriptions-item label="委外原因">{{ v-if="form.repairDestination == '委外维修'"
form.outSourceReason >
}}</el-descriptions-item> <el-descriptions-item label="委外原因">{{
</el-descriptions> form.outSourceReason
}}</el-descriptions-item>
</el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息"> <el-tab-pane label="检查项信息">
<el-table :data="checkList" border style="width: 100%"> <el-table :data="checkList" border style="width: 100%">
<el-table-column prop="itemName" label="检查项名称" width="150"> <el-table-column prop="itemName" label="检查项名称" width="200">
</el-table-column>
<el-table-column prop="itemMethod" label="检查项方法" width="200">
</el-table-column> </el-table-column>
<el-table-column prop="standardName" label="标准名称" width="180"> <el-table-column prop="standardName" label="标准名称" width="180">
</el-table-column> </el-table-column>
<el-table-column prop="standardType" label="标准类型" width="100"> <el-table-column prop="standardType" label="标准类型" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="50"> <el-table-column prop="detailReach" label="是否达标" width="50">
<template slot-scope="scope">
<dict-tag
:options="dict.type.device_reach_standard"
:value="scope.row.detailReach"
/>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="actualValue" label="实际值" width="50"> <el-table-column prop="actualValue" label="实际值" width="50">
</el-table-column> </el-table-column>
@ -739,9 +764,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50"> <el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="单位" width="50"> <el-table-column prop="detailUnit" label="单位" width="45">
</el-table-column>
<el-table-column prop="detailUnit" label="故障图片">
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
@ -930,13 +953,21 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息"> <el-tab-pane label="检查项信息">
<el-table :data="checkList" border style="width: 100%"> <el-table :data="checkList" border style="width: 100%">
<el-table-column prop="itemName" label="检查项名称" width="150"> <el-table-column prop="itemName" label="检查项名称" width="200">
</el-table-column>
<el-table-column prop="itemMethod" label="检查项方法" width="200">
</el-table-column> </el-table-column>
<el-table-column prop="standardName" label="标准名称" width="180"> <el-table-column prop="standardName" label="标准名称" width="180">
</el-table-column> </el-table-column>
<el-table-column prop="standardType" label="标准类型" width="100"> <el-table-column prop="standardType" label="标准类型" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="50"> <el-table-column prop="detailReach" label="是否达标" width="50">
<template slot-scope="scope">
<dict-tag
:options="dict.type.device_reach_standard"
:value="scope.row.detailReach"
/>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="actualValue" label="实际值" width="50"> <el-table-column prop="actualValue" label="实际值" width="50">
</el-table-column> </el-table-column>
@ -944,16 +975,14 @@
</el-table-column> </el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50"> <el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="单位" width="50"> <el-table-column prop="detailUnit" label="单位" width="45">
</el-table-column>
<el-table-column prop="detailUnit" label="故障图片">
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button> <el-button @click="cancelView"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -977,7 +1006,7 @@ import { getMaintenanceTeamList } from "@/api/device/equTeam";
export default { export default {
name: "FaultReport", name: "FaultReport",
components: { ItemSelect, ItemSelectPerson }, components: { ItemSelect, ItemSelectPerson },
dicts: ["device_order_source"], dicts: ["device_order_source", "device_reach_standard"],
data() { data() {
return { return {
// //
@ -1127,25 +1156,36 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
//
indexMethod(index) {
return index + 1;
},
timeBackFilling() { timeBackFilling() {
var getTime = new Date().getTime(); // var getTime = new Date().getTime(); //
var time = new Date(getTime); // var time = new Date(getTime); //
function nowDate(time) { function nowDate(time) {
var year = time.getFullYear(); // var year = time.getFullYear(); //
var month = (time.getMonth() + 1).toString().padStart(2, '0'); // var month = (time.getMonth() + 1).toString().padStart(2, "0"); //
var date = time.getDate().toString().padStart(2, '0'); // var date = time.getDate().toString().padStart(2, "0"); //
var hour = time.getHours().toString().padStart(2, '0'); // var hour = time.getHours().toString().padStart(2, "0"); //
var minute = time.getMinutes().toString().padStart(2, '0'); // var minute = time.getMinutes().toString().padStart(2, "0"); //
var second = time.getSeconds().toString().padStart(2, '0'); // var second = time.getSeconds().toString().padStart(2, "0"); //
return ( return (
year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second year +
) "-" +
} month +
console.log(time); "-" +
console.log(nowDate(time)); date +
" " +
hour +
":" +
minute +
":" +
second
);
}
console.log(time);
console.log(nowDate(time));
this.form.workPlanTime = nowDate(time); this.form.workPlanTime = nowDate(time);
}, },
// //
@ -1158,7 +1198,6 @@ var getTime = new Date().getTime(); //获取到当前时间戳
}, },
// //
onItemSelectedPerson(obj) { onItemSelectedPerson(obj) {
console.log("111111111111", obj);
this.form.orderRepairmanCode = obj[0].userName; this.form.orderRepairmanCode = obj[0].userName;
this.form.orderRepairmanName = obj[0].nickName; this.form.orderRepairmanName = obj[0].nickName;
}, },
@ -1180,6 +1219,10 @@ var getTime = new Date().getTime(); //获取到当前时间戳
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
//
cancelView() {
this.openView = false;
},
// //
cancelCheckForm() { cancelCheckForm() {
this.viewCheck = false; this.viewCheck = false;
@ -1219,6 +1262,8 @@ var getTime = new Date().getTime(); //获取到当前时间戳
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams.orderBreakdownTimeArray = null;
this.queryParams.orderTimeArray = null;
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
@ -1285,6 +1330,7 @@ var getTime = new Date().getTime(); //获取到当前时间戳
item1.standardList.forEach((item) => { item1.standardList.forEach((item) => {
var standard = {}; var standard = {};
standard.itemName = item1.itemName; standard.itemName = item1.itemName;
standard.itemMethod = item1.itemMethod;
standard.standardName = item.standardName; standard.standardName = item.standardName;
standard.detailUpLimit = item.detailUpLimit; standard.detailUpLimit = item.detailUpLimit;
standard.detailDownLimit = item.detailDownLimit; standard.detailDownLimit = item.detailDownLimit;

@ -1,8 +1,9 @@
<template> <template>
<el-dialog title="设备选择" <el-dialog
title="设备选择"
v-if="showFlag" v-if="showFlag"
:visible.sync="showFlag" :visible.sync="showFlag"
:modal= false :modal="false"
width="1100px" width="1100px"
center center
:before-close="cancelEquipmentForm" :before-close="cancelEquipmentForm"
@ -10,26 +11,33 @@
<el-row :gutter="20"> <el-row :gutter="20">
<!--分类数据--> <!--分类数据-->
<el-col :span="5" :xs="24"> <el-col :span="5" :xs="24">
<el-card > <el-card>
<span>请选择设备类型</span> <span>请选择设备类型</span>
<div class="head-container" style="text-align: center"> <div class="head-container" style="text-align: center">
<el-tree <el-tree
:data="treeData1" :data="treeData1"
:props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}" :props="{ id: 'equipmentTypeCode', label: 'equipmentTypeName' }"
node-key="id" node-key="id"
:expand-on-click-node="false" :expand-on-click-node="false"
:filter-node-method="filterNode" :filter-node-method="filterNode"
ref="tree" ref="tree"
default-expand-all default-expand-all
@node-click="handleNodeClick" @node-click="handleNodeClick"
/> />
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
<!--设备数据--> <!--设备数据-->
<el-col :span="19" :xs="24"> <el-col :span="19" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="设备编码" prop="itemCode"> <el-form-item label="设备编码" prop="itemCode">
<el-input <el-input
v-model="queryParams.itemCode" v-model="queryParams.itemCode"
@ -49,23 +57,61 @@
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></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-item>
</el-form> </el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleEquipmentSelectionChange" ref="myTable"> <el-table
v-loading="loading"
:data="itemList"
@selection-change="handleEquipmentSelectionChange"
ref="myTable"
>
<el-table-column width="50" align="center" type="selection"> <el-table-column width="50" align="center" type="selection">
<!-- <template v-slot="scope"> <!-- <template v-slot="scope">
<el-radio v-model="selectedItemId" :label="scope.row.itemId" @change="handleRowChange(scope.row)">{{""}}</el-radio> <el-radio v-model="selectedItemId" :label="scope.row.itemId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
</template> --> </template> -->
</el-table-column> </el-table-column>
<!-- 序号 --> <!-- 序号 -->
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column> <el-table-column
<el-table-column label="设备编码" align="center" key="itemCode" prop="equipmentCode" v-if="columns[0].visible" > 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>
<el-table-column label="设备类型编码" align="center" key="itemTypeCode" prop="equipmentTypeCode" v-if="columns[2].visible" > <el-table-column
label="设备类型编码"
align="center"
key="itemTypeCode"
prop="equipmentTypeCode"
v-if="columns[2].visible"
>
</el-table-column> </el-table-column>
<el-table-column label="设备名称" align="left" key="itemName" prop="equipmentName" v-if="columns[1].visible" :show-overflow-tooltip="true" /> <el-table-column
label="设备名称"
align="left"
key="itemName"
prop="equipmentName"
v-if="columns[1].visible"
:show-overflow-tooltip="true"
/>
</el-table> </el-table>
<pagination <pagination
@ -78,24 +124,27 @@
</el-col> </el-col>
</el-row> </el-row>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitEquipmentForm"> </el-button> <el-button type="primary" @click="submitEquipmentForm"> </el-button>
<el-button @click="cancelEquipmentForm"> </el-button> <el-button @click="cancelEquipmentForm"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getEquipmentList,getEquipmentTypeList} from "@/api/device/faultReport"; import {
getEquipmentList,
getEquipmentTypeList,
} from "@/api/device/faultReport";
import { treeselect } from "@/api/wms/equipment"; import { treeselect } from "@/api/wms/equipment";
import { Message } from 'element-ui' import { Message } from "element-ui";
export default { export default {
name: "MdItemSingle", name: "MdItemSingle",
// components: { Treeselect }, // components: { Treeselect },
data() { data() {
return { return {
treeData1:[], treeData1: [],
showFlag:false, showFlag: false,
// //
selectedItemId: undefined, selectedItemId: undefined,
selectedRows: undefined, selectedRows: undefined,
@ -106,7 +155,7 @@ export default {
// //
showSearch: true, showSearch: true,
// //
total:0, total: 0,
// //
itemList: null, itemList: null,
// //
@ -117,18 +166,20 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
itemName: undefined, itemName: null,
equipmentTypeCode: undefined, equipmentTypeCode: null,
itemTypeId: 0, itemTypeId: 0,
itemCodeGet: '', itemCodeGet: "",
itemCode : undefined, itemCode: null,
equipmentCode: null,
equipmentName: null,
}, },
// //
columns: [ columns: [
{ key: 0, label: `设备编码`, visible: true }, { key: 0, label: `设备编码`, visible: true },
{ key: 1, label: `设备名称`, visible: true }, { key: 1, label: `设备名称`, visible: true },
{ key: 2, label: `设备类型`, visible: true }, { key: 2, label: `设备类型`, visible: true },
] ],
}; };
}, },
created() { created() {
@ -147,29 +198,30 @@ export default {
this.resetForm("form"); this.resetForm("form");
}, },
handleEquipmentSelectionChange (val) { handleEquipmentSelectionChange(val) {
this.itemList = val this.itemList = val;
}, },
// //
indexMethod(index){ indexMethod(index) {
return index+1 ; return index + 1;
}, },
/** 查询设备编码列表*/ /** 查询设备编码列表*/
getList() { getList() {
this.loading = true; this.loading = true;
getEquipmentList(this.queryParams).then(response => { this.queryParams.equipmentCode = this.queryParams.itemCode;
this.itemList = response.rows; this.queryParams.equipmentName = this.queryParams.itemName;
this.total = response.total; getEquipmentList(this.queryParams).then((response) => {
this.loading = false; this.itemList = response.rows;
} this.total = response.total;
); this.loading = false;
});
}, },
/** 查询分类下拉树结构 */ /** 查询分类下拉树结构 */
getEquipmentType() { getEquipmentType() {
getEquipmentTypeList().then(response => { getEquipmentTypeList().then((response) => {
console.log(response.rows); console.log(response.rows);
this.treeData1 = response.rows; this.treeData1 = response.rows;
console.log(this.treeData1); console.log(this.treeData1);
@ -185,7 +237,7 @@ export default {
// //
handleNodeClick(data) { handleNodeClick(data) {
console.log('id',data.id); console.log("id", data.id);
this.queryParams.equipmentTypeCode = data.equipmentTypeCode; this.queryParams.equipmentTypeCode = data.equipmentTypeCode;
console.log(this.equipmentTypeCode); console.log(this.equipmentTypeCode);
this.handleQuery(); this.handleQuery();
@ -204,43 +256,42 @@ export default {
this.handleQuery(); this.handleQuery();
}, },
// //
handleEquipmentSelectionChange(selection) { handleEquipmentSelectionChange(selection) {
this.ids = selection.map(item => item.equipmentCode); this.ids = selection.map((item) => item.equipmentCode);
this.single = selection.length!==1; this.single = selection.length !== 1;
this.multiple = !selection.length; this.multiple = !selection.length;
console.log("多选框",this.ids); console.log("多选框", this.ids);
}, },
submitEquipmentForm() { submitEquipmentForm() {
const data = this.ids; const data = this.ids;
if(data.length >1){ if (data.length > 1) {
Message.warning("只能选择一个报修机器,请勿选择多个!"); Message.warning("只能选择一个报修机器,请勿选择多个!");
}else{ } else {
const equipmentCode = data.toString(); const equipmentCode = data.toString();
if(this.queryParams.itemCodeGet == ""){ if (this.queryParams.itemCodeGet == "") {
this.queryParams.itemCodeGet = equipmentCode; this.queryParams.itemCodeGet = equipmentCode;
}else{ } else {
this.queryParams.itemCodeGet = this.queryParams.itemCodeGet + ','+ equipmentCode; this.queryParams.itemCodeGet =
this.queryParams.itemCodeGet + "," + equipmentCode;
} }
this.selectedRows = this.queryParams.itemCodeGet; this.selectedRows = this.queryParams.itemCodeGet;
this.$emit('onSelected', this.selectedRows); this.$emit("onSelected", this.selectedRows);
this.queryParams.equipmentTypeCode = null; 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(); this.getList();
console.log('111111',this.queryParams.equipmentTypeCode); console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false; this.showFlag = false;
} this.queryParams.itemCodeGet = "";
}
},
} cancelEquipmentForm() {
this.queryParams.equipmentTypeCode = null;
this.getList();
console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false;
},
},
}; };
</script> </script>

@ -1,8 +1,9 @@
<template> <template>
<el-dialog title="人员选择" <el-dialog
title="人员选择"
v-if="showFlag" v-if="showFlag"
:visible.sync="showFlag" :visible.sync="showFlag"
:modal= false :modal="false"
width="800px" width="800px"
center center
:before-close="cancel" :before-close="cancel"
@ -10,7 +11,14 @@
<el-row :gutter="20"> <el-row :gutter="20">
<!--人员数据--> <!--人员数据-->
<el-col :span="24"> <el-col :span="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="人员编码" prop="itemCode"> <el-form-item label="人员编码" prop="itemCode">
<el-input <el-input
v-model="queryParams.itemCode" v-model="queryParams.itemCode"
@ -30,17 +38,53 @@
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></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-item>
</el-form> </el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleSelectionChange" ref="multipleTable"> <el-table
<el-table-column width="50" align="center" type="selection"></el-table-column> v-loading="loading"
:data="itemList"
@selection-change="handleSelectionChange"
ref="multipleTable"
>
<el-table-column
width="50"
align="center"
type="selection"
></el-table-column>
<!-- 序号 --> <!-- 序号 -->
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column> <el-table-column
<el-table-column label="人员编码" align="center" key="itemCode" prop="userName" v-if="columns[0].visible" > type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
></el-table-column>
<el-table-column
label="人员编码"
align="center"
key="itemCode"
prop="userName"
v-if="columns[0].visible"
>
</el-table-column> </el-table-column>
<el-table-column label="人员名称" align="left" key="itemName" prop="nickName" v-if="columns[1].visible" :show-overflow-tooltip="true" /> <el-table-column
label="人员名称"
align="left"
key="itemName"
prop="nickName"
v-if="columns[1].visible"
:show-overflow-tooltip="true"
/>
</el-table> </el-table>
<pagination <pagination
@ -53,22 +97,24 @@
</el-col> </el-col>
</el-row> </el-row>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" :disabled="multiple"> </el-button> <el-button type="primary" @click="submitForm" :disabled="multiple"
<el-button @click="cancel"> </el-button> > </el-button
>
<el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getRepairPersonList} from "@/api/device/faultReport"; import { getRepairPersonList } from "@/api/device/faultReport";
import { Message } from 'element-ui' import { Message } from "element-ui";
export default { export default {
name: "MdItemSingle", name: "MdItemSingle",
data() { data() {
return { return {
treeData1:[], treeData1: [],
showFlag:false, showFlag: false,
// //
selectedItemId: undefined, selectedItemId: undefined,
selectedRows: undefined, selectedRows: undefined,
@ -79,22 +125,24 @@ export default {
// //
showSearch: true, showSearch: true,
// //
total:0, total: 0,
// //
itemList: null, itemList: null,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
itemName: undefined, itemName: null,
itemCodeGet: '', itemCodeGet: "",
itemCode : undefined, itemCode: null,
nickName: null,
userName: null,
}, },
// //
columns: [ columns: [
{ key: 0, label: `人员编码`, visible: true }, { key: 0, label: `人员编码`, visible: true },
{ key: 1, label: `人员名称`, visible: true }, { key: 1, label: `人员名称`, visible: true },
] ],
}; };
}, },
created() { created() {
@ -102,35 +150,40 @@ export default {
}, },
methods: { methods: {
// //
reset() { cancel() {
this.form = { this.showFlag = false;
itemId: null, this.reset();
itemCode: this.processId, },
itemType: null, //
}; reset() {
this.resetForm("form"); this.form = {
}, itemId: null,
itemCode: this.processId,
itemType: null,
};
this.resetForm("form");
},
handleSelectionChange (val) { handleSelectionChange(val) {
this.itemList = val; this.itemList = val;
}, },
// //
indexMethod(index){ indexMethod(index) {
return index+1 ; return index + 1;
}, },
//
/** 查询设备编码列表*/ /** 查询设备编码列表*/
getList() { getList() {
this.loading = true; this.loading = true;
getRepairPersonList(this.queryParams).then(response => { this.queryParams.userName = this.queryParams.itemCode;
this.itemList = response.rows; this.queryParams.nickName = this.queryParams.itemName;
this.total = response.total; getRepairPersonList(this.queryParams).then((response) => {
this.loading = false; this.itemList = response.rows;
} this.total = response.total;
); this.loading = false;
});
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -147,22 +200,22 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.userId); this.ids = selection.map((item) => item.userId);
this.userCodes = selection.map(item => item.userName); this.userCodes = selection.map((item) => item.userName);
this.single = selection.length!==1; this.single = selection.length !== 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
submitForm() { submitForm() {
if(this.$refs.multipleTable.selection.length > 1){ if (this.$refs.multipleTable.selection.length > 1) {
Message.warning("只能选择一个报修人,请勿选择多个!"); Message.warning("只能选择一个报修人,请勿选择多个!");
}else{ } else {
this.$emit('onSelected', this.$refs.multipleTable.selection); this.$emit("onSelected", this.$refs.multipleTable.selection);
this.showFlag = false; this.showFlag = false;
this.getList(); this.getList();
} }
} },
} },
}; };
</script> </script>

@ -1,166 +1,285 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px"> <el-form
<el-form-item label="委外工单编码" prop="workCode"> :model="queryParams"
<el-input ref="queryForm"
v-model="queryParams.workCode" size="small"
placeholder="请输入委外工单编码" :inline="true"
clearable v-show="showSearch"
@keyup.enter.native="handleQuery" label-width="98px"
/> >
</el-form-item> <el-form-item label="委外工单编码" prop="workCode">
<el-form-item label="维修人员" prop="workPerson"> <el-input
<el-input v-model="queryParams.workCode"
v-model="queryParams.workPerson" placeholder="请输入委外工单编码"
placeholder="请输入维修人员" clearable
clearable style="width: 200px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="委外单位" prop="workOutsourcingUnit"> <el-form-item label="维修人员" prop="workPerson">
<el-input <el-input
v-model="queryParams.workOutsourcingUnit" v-model="queryParams.workPerson"
placeholder="请输入委外单位" placeholder="请输入维修人员"
clearable style="width: 200px"
@keyup.enter.native="handleQuery" clearable
/> @keyup.enter.native="handleQuery"
</el-form-item> />
<el-form-item label="联系方式" prop="workConnection"> </el-form-item>
<el-input <el-form-item label="委外单位" prop="workOutsourcingUnit">
v-model="queryParams.workConnection" <el-input
placeholder="请输入联系方式" v-model="queryParams.workOutsourcingUnit"
clearable placeholder="请输入委外单位"
@keyup.enter.native="handleQuery" style="width: 200px"
/> clearable
</el-form-item> @keyup.enter.native="handleQuery"
<el-form-item label="委外费用" prop="workCost"> />
<el-input </el-form-item>
v-model="queryParams.workCost" <el-form-item label="联系方式" prop="workConnection">
placeholder="请输入委外费用" <el-input
clearable v-model="queryParams.workConnection"
@keyup.enter.native="handleQuery" placeholder="请输入联系方式"
/> style="width: 200px"
</el-form-item> clearable
<el-form-item label="委外用时" prop="workCostTime"> @keyup.enter.native="handleQuery"
<el-input />
v-model="queryParams.workCostTime" </el-form-item>
placeholder="请输入委外用时" <el-form-item label="委外费用" prop="workCost">
clearable <el-input
@keyup.enter.native="handleQuery" v-model="queryParams.workCost"
/> placeholder="请输入委外费用"
</el-form-item> clearable
<el-form-item> style="width: 200px"
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> @keyup.enter.native="handleQuery"
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> />
</el-form-item> </el-form-item>
</el-form> <el-form-item label="委外用时" prop="workCostTime">
<el-input
v-model="queryParams.workCostTime"
placeholder="请输入委外用时"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="委外类型" prop="workType">
<el-select
v-model="queryParams.workType"
placeholder="请选择委外类型"
@change="$forceUpdate()"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in options"
:key="item.workType"
:label="item.label"
:value="item.workType"
></el-option>
</el-select>
</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-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
plain plain
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['device:outsourceWorkOrder:add']" v-hasPermi="['device:outsourceWorkOrder:add']"
>新增</el-button> >新增</el-button
</el-col> >
<el-col :span="1.5"> </el-col>
<el-button <el-col :span="1.5">
type="success" <el-button
plain type="success"
icon="el-icon-edit" plain
size="mini" icon="el-icon-edit"
:disabled="single" size="mini"
@click="handleUpdate" :disabled="single"
v-hasPermi="['device:outsourceWorkOrder:edit']" @click="handleUpdate"
>修改</el-button> v-hasPermi="['device:outsourceWorkOrder:edit']"
</el-col> >修改</el-button
<el-col :span="1.5"> >
<el-button </el-col>
type="danger" <el-col :span="1.5">
plain <el-button
icon="el-icon-delete" type="danger"
size="mini" plain
:disabled="multiple" icon="el-icon-delete"
@click="handleDelete" size="mini"
v-hasPermi="['device:outsourceWorkOrder:remove']" :disabled="multiple"
>删除</el-button> @click="handleDelete"
</el-col> v-hasPermi="['device:outsourceWorkOrder:remove']"
<el-col :span="1.5"> >删除</el-button
<el-button >
type="warning" </el-col>
plain <el-col :span="1.5">
icon="el-icon-download" <el-button
size="mini" type="warning"
@click="handleExport" plain
v-hasPermi="['device:outsourceWorkOrder:export']" icon="el-icon-download"
>导出</el-button> size="mini"
</el-col> @click="handleExport"
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> v-hasPermi="['device:outsourceWorkOrder:export']"
</el-row> >导出</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="outsourceWorkOrderList" @selection-change="handleSelectionChange"> <el-table
<el-table-column type="selection" width="55" align="center" /> v-loading="loading"
<el-table-column label="委外工单编码" align="center" prop="workCode" width="180"/> :data="outsourceWorkOrderList"
<el-table-column label="报修单号" align="center" prop="orderCode" width="180"/> @selection-change="handleSelectionChange"
<el-table-column label="维修单号" align="center" prop="repairCode" width="180"/> >
<el-table-column label="设备编码" align="center" prop="equipmentCode" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="设备名称" align="center" prop="equipmentName" /> <el-table-column
<el-table-column label="设备类型" align="center" prop="equipmentTypeName" /> label="委外工单编码"
<el-table-column label="委外维修人员" align="center" prop="workPerson" width="150"/> align="center"
<el-table-column label="委外单位" align="center" prop="workOutsourcingUnit" width="200"/> prop="workCode"
<el-table-column label="联系方式" align="center" prop="workConnection" width="150"/> width="180"
<el-table-column label="委外原因" align="center" prop="workReason" width="150"/> />
<el-table-column label="委外类型" align="center" prop="workType" /> <el-table-column
<el-table-column label="委外费用" align="center" prop="workCost" /> label="报修单号"
<el-table-column label="委外用时" align="center" prop="workCostTime" /> align="center"
<el-table-column width="180" label="创建时间" align="center" prop="createTime"> prop="orderCode"
<template slot-scope="scope"> width="180"
<span>{{ parseTime(scope.row.createTime) }}</span> />
</template> <el-table-column
</el-table-column> label="维修单号"
<el-table-column width="120" label="创建人" align="center" prop="createBy"/> align="center"
<el-table-column width="180" label="更新时间" align="center" prop="updateTime"> prop="repairCode"
<template slot-scope="scope"> width="180"
<span>{{ parseTime(scope.row.updateTime) }}</span> />
</template> <el-table-column label="设备编码" align="center" prop="equipmentCode" />
</el-table-column> <el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column width="120" label="更新人" align="center" prop="updateBy"/> <el-table-column
<el-table-column label="工厂编码" align="center" prop="factoryCode" /> label="设备类型"
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150"> align="center"
<template slot-scope="scope"> prop="equipmentTypeName"
<el-button />
size="mini" <el-table-column
type="text" label="委外维修人员"
icon="el-icon-edit" align="center"
@click="handleUpdate(scope.row)" prop="workPerson"
v-hasPermi="['device:outsourceWorkOrder:edit']" width="150"
>修改</el-button> />
<el-button <el-table-column
size="mini" label="委外单位"
type="text" align="center"
icon="el-icon-delete" prop="workOutsourcingUnit"
@click="handleDelete(scope.row)" width="200"
v-hasPermi="['device:outsourceWorkOrder:remove']" />
>删除</el-button> <el-table-column
</template> label="联系方式"
</el-table-column> align="center"
</el-table> prop="workConnection"
width="150"
/>
<el-table-column
label="委外原因"
align="center"
prop="workReason"
width="150"
/>
<el-table-column label="委外类型" align="center" prop="workType">
<template slot-scope="scope">
{{ scope.row.workType == 1 ? "保养委外" : "维修委外" }}
</template>
</el-table-column>
<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">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:outsourceWorkOrder:edit']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:outsourceWorkOrder:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改委外工单对话框 --> <!-- 添加或修改委外工单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="130px"> <el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-form-item label="设备编码" prop="equipmentCode"> <el-form-item label="设备编码" prop="equipmentCode">
<el-input <el-input
v-model="form.equipmentCode" v-model="form.equipmentCode"
placeholder="请输入设备编码" placeholder="请输入设备编码"
@ -174,16 +293,44 @@
</el-input> </el-input>
<ItemSelect ref="itemSelect" @onSelected="onItemSelectedEquipment"> <ItemSelect ref="itemSelect" @onSelected="onItemSelectedEquipment">
</ItemSelect> </ItemSelect>
</el-form-item> </el-form-item>
<el-form-item label="委外维修人员" prop="workPerson"> <el-form-item label="委外类型" prop="workType">
<el-input v-model="form.workPerson" placeholder="请输入委外维修人员" style="width: 270px"/> <el-select
</el-form-item> v-model="form.workType"
<el-form-item label="委外单位" prop="workOutsourcingUnit"> placeholder="请选择委外类型"
<el-input v-model="form.workOutsourcingUnit" placeholder="请输入委外单位" style="width: 270px"/> @change="$forceUpdate()"
</el-form-item> clearable
<el-form-item label="委外单位联系方式" prop="workConnection"> style="width: 270px"
<el-input v-model="form.workConnection" placeholder="请输入委外单位联系方式" style="width: 270px"/> >
</el-form-item> <el-option
v-for="item in options"
:key="item.workType"
:label="item.label"
:value="item.workType"
></el-option>
</el-select>
</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="请输入委外单位"
style="width: 270px"
/>
</el-form-item>
<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-form-item label="委外原因" prop="workReason">
<el-input <el-input
v-model="form.workReason" v-model="form.workReason"
@ -193,119 +340,142 @@
:autosize="{ minRows: 2, maxRows: 4 }" :autosize="{ minRows: 2, maxRows: 4 }"
/> />
</el-form-item> </el-form-item>
<el-form-item label="委外费用" prop="workCost"> <el-form-item label="委外费用" prop="workCost">
<el-input v-model="form.workCost" placeholder="请输入委外费用" style="width: 270px"/> <el-input
</el-form-item> v-model="form.workCost"
<el-form-item label="委外用时" prop="workCostTime"> placeholder="请输入委外费用"
<el-input v-model="form.workCostTime" placeholder="请输入委外用时" style="width: 270px"/> style="width: 270px"
</el-form-item> />
</el-form> </el-form-item>
<div slot="footer" class="dialog-footer"> <el-form-item label="委外用时" prop="workCostTime">
<el-button type="primary" @click="submitForm"> </el-button> <el-input
<el-button @click="cancel"> </el-button> v-model="form.workCostTime"
</div> placeholder="请输入委外用时"
</el-dialog> style="width: 270px"
</div> />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template> </template>
<script> <script>
import { listOutsourceWorkOrder, getOutsourceWorkOrder, delOutsourceWorkOrder, addOutsourceWorkOrder, updateOutsourceWorkOrder } from "@/api/device/outsourceWorkOrder"; import {
listOutsourceWorkOrder,
getOutsourceWorkOrder,
delOutsourceWorkOrder,
addOutsourceWorkOrder,
updateOutsourceWorkOrder,
} from "@/api/device/outsourceWorkOrder";
import ItemSelect from "./selectSingleEquipment.vue"; import ItemSelect from "./selectSingleEquipment.vue";
export default { export default {
name: "OutsourceWorkOrder", name: "OutsourceWorkOrder",
components: { ItemSelect }, components: { ItemSelect },
data() { data() {
return { return {
// //
loading: true, loading: true,
// //
ids: [], ids: [],
// //
single: true, single: true,
// //
multiple: true, multiple: true,
// //
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
outsourceWorkOrderList: [], outsourceWorkOrderList: [],
// //
title: "", title: "",
// //
open: false, open: false,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
workCode: null, workCode: null,
repairCode: null, repairCode: null,
workPerson: null, workPerson: null,
workOutsourcingUnit: null, workOutsourcingUnit: null,
workConnection: null, workConnection: null,
workReason: null, workReason: null,
workType: null, workType: null,
equipmentCode: null, equipmentCode: null,
workCost: null, workCost: null,
workCostTime: null, workCostTime: null,
attr1: null, attr1: null,
attr2: null, attr2: null,
attr3: null, attr3: null,
factoryCode: null factoryCode: null,
}, },
// options: [
form: {}, {
// workType: "1",
rules: { label: "保养委外",
} },
}; {
}, workType: "0",
created() { label: "维修委外",
this.getList(); },
}, ],
methods: { //
/** 查询委外工单列表 */ form: {},
getList() { //
this.loading = true; rules: {},
listOutsourceWorkOrder(this.queryParams).then(response => { };
this.outsourceWorkOrderList = response.rows; },
this.total = response.total; created() {
this.loading = false; this.getList();
}); },
}, methods: {
// /** 查询委外工单列表 */
cancel() { getList() {
this.open = false; this.loading = true;
this.reset(); listOutsourceWorkOrder(this.queryParams).then((response) => {
}, this.outsourceWorkOrderList = response.rows;
// this.total = response.total;
reset() { this.loading = false;
this.form = { });
workId: null, },
workCode: null, //
repairCode: null, cancel() {
workPerson: null, this.open = false;
workOutsourcingUnit: null, this.reset();
workConnection: null, },
workReason: null, //
workType: null, reset() {
equipmentCode: null, this.form = {
workCost: null, workId: null,
workCostTime: null, workCode: null,
attr1: null, repairCode: null,
attr2: null, workPerson: null,
attr3: null, workOutsourcingUnit: null,
delFlag: null, workConnection: null,
createBy: null, workReason: null,
createTime: null, workType: null,
updateBy: null, equipmentCode: null,
updateTime: null, workCost: null,
factoryCode: null workCostTime: null,
}; attr1: null,
this.resetForm("form"); attr2: null,
}, attr3: null,
// delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
factoryCode: null,
};
this.resetForm("form");
},
//
handleSelectEquipment() { handleSelectEquipment() {
this.$refs.itemSelect.showFlag = true; this.$refs.itemSelect.showFlag = true;
}, },
@ -313,74 +483,82 @@ export default {
onItemSelectedEquipment(obj) { onItemSelectedEquipment(obj) {
this.form.equipmentCode = obj; this.form.equipmentCode = obj;
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.workId) this.ids = selection.map((item) => item.workId);
this.single = selection.length!==1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加委外工单"; this.title = "添加委外工单";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const workId = row.workId || this.ids const workId = row.workId || this.ids;
getOutsourceWorkOrder(workId).then(response => { getOutsourceWorkOrder(workId).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改委外工单"; this.title = "修改委外工单";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.workId != null) { if (this.form.workId != null) {
updateOutsourceWorkOrder(this.form).then(response => { updateOutsourceWorkOrder(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} else { } else {
addOutsourceWorkOrder(this.form).then(response => { addOutsourceWorkOrder(this.form).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} }
} }
}); });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const workIds = row.workId || this.ids; const workIds = row.workId || this.ids;
this.$modal.confirm('是否确认删除委外工单编号为"' + workIds + '"的数据项?').then(function() { this.$modal
return delOutsourceWorkOrder(workIds); .confirm('是否确认删除委外工单编号为"' + workIds + '"的数据项?')
}).then(() => { .then(function () {
this.getList(); return delOutsourceWorkOrder(workIds);
this.$modal.msgSuccess("删除成功"); })
}).catch(() => {}); .then(() => {
}, this.getList();
/** 导出按钮操作 */ this.$modal.msgSuccess("删除成功");
handleExport() { })
this.download('device/outsourceWorkOrder/export', { .catch(() => {});
...this.queryParams },
}, `outsourceWorkOrder_${new Date().getTime()}.xlsx`) /** 导出按钮操作 */
} handleExport() {
} this.download(
"device/outsourceWorkOrder/export",
{
...this.queryParams,
},
`outsourceWorkOrder_${new Date().getTime()}.xlsx`
);
},
},
}; };
</script> </script>

@ -248,6 +248,15 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- 序号 -->
<el-table-column
type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
fixed
/>
<el-table-column <el-table-column
label="维修单号" label="维修单号"
align="center" align="center"
@ -825,6 +834,9 @@
<el-table-column prop="standardType" label="标准类型" width="100"> <el-table-column prop="standardType" label="标准类型" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="50"> <el-table-column prop="detailReach" label="是否达标" width="50">
<template slot-scope="scope">
{{ scope.row.detailReach == "1" ? "达标" : "不达标" }}
</template>
</el-table-column> </el-table-column>
<el-table-column prop="actualValue" label="实际值" width="50"> <el-table-column prop="actualValue" label="实际值" width="50">
</el-table-column> </el-table-column>

@ -192,6 +192,7 @@
align="center" align="center"
:index="indexMethod" :index="indexMethod"
label="序号" label="序号"
fixed
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column

@ -1290,7 +1290,7 @@ export default {
background-color: transparent; background-color: transparent;
/*将select的宽高等于div的宽高*/ /*将select的宽高等于div的宽高*/
width: 100%; width: 100%;
height: 50px;
/*隐藏select的下拉图标*/ /*隐藏select的下拉图标*/
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none; -moz-appearance: none;

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save