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

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

@ -54,9 +54,9 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="报修人编号" prop="orderRepairman">
<el-form-item label="报修人编号" prop="orderRepairmanCode">
<el-input
v-model="queryParams.orderRepairman"
v-model="queryParams.orderRepairmanCode"
placeholder="请输入报修人编号"
style="width: 200px"
clearable
@ -171,6 +171,15 @@
@selection-change="handleSelectionChange"
>
<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
label="报修单号"
align="center"
@ -343,14 +352,22 @@
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="检查项信息">
<el-table :data="checkList" border style="width: 100%">
<el-table-column prop="itemName" label="检查项名称" width="150">
<el-table :data="checkList" border style="width: 100%">
<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 prop="standardName" label="标准名称" width="180">
</el-table-column>
<el-table-column prop="standardType" label="标准类型" width="100">
</el-table-column>
<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 prop="actualValue" label="实际值" width="50">
</el-table-column>
@ -358,9 +375,7 @@
</el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column>
<el-table-column prop="detailUnit" label="单位" width="50">
</el-table-column>
<el-table-column prop="detailUnit" label="故障图片">
<el-table-column prop="detailUnit" label="单位" width="45">
</el-table-column>
</el-table>
</el-tab-pane>
@ -372,7 +387,7 @@
<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-group>
@ -641,7 +656,7 @@
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="报修信息审核结果">
<el-tab-pane label="报修审核结果">
<el-descriptions
:column="2"
border
@ -657,7 +672,7 @@
form.workPlanTime
}}</el-descriptions-item>
<el-descriptions-item label="是否停机维修">{{
form.workDownMachine
form.workDownMachine ? "是" : "否"
}}</el-descriptions-item>
<el-descriptions-item label="计划停机时间">{{
form.workPlanDownTime
@ -679,7 +694,7 @@
form.workPlanTime
}}</el-descriptions-item>
<el-descriptions-item label="是否停机维修">{{
form.workDownMachine
form.workDownMachine ? "是" : "否"
}}</el-descriptions-item>
<el-descriptions-item label="计划停机时间">{{
form.workPlanDownTime
@ -714,9 +729,11 @@
form.workConnection
}}</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="2"
<el-descriptions
:column="2"
border
v-if="form.repairDestination == '委外维修'">
v-if="form.repairDestination == '委外维修'"
>
<el-descriptions-item label="委外原因">{{
form.outSourceReason
}}</el-descriptions-item>
@ -725,13 +742,21 @@
<el-tab-pane label="检查项信息">
<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 prop="standardName" label="标准名称" width="180">
</el-table-column>
<el-table-column prop="standardType" label="标准类型" width="100">
</el-table-column>
<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 prop="actualValue" label="实际值" width="50">
</el-table-column>
@ -739,9 +764,7 @@
</el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column>
<el-table-column prop="detailUnit" label="单位" width="50">
</el-table-column>
<el-table-column prop="detailUnit" label="故障图片">
<el-table-column prop="detailUnit" label="单位" width="45">
</el-table-column>
</el-table>
</el-tab-pane>
@ -930,13 +953,21 @@
</el-tab-pane>
<el-tab-pane label="检查项信息">
<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 prop="standardName" label="标准名称" width="180">
</el-table-column>
<el-table-column prop="standardType" label="标准类型" width="100">
</el-table-column>
<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 prop="actualValue" label="实际值" width="50">
</el-table-column>
@ -944,16 +975,14 @@
</el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column>
<el-table-column prop="detailUnit" label="单位" width="50">
</el-table-column>
<el-table-column prop="detailUnit" label="故障图片">
<el-table-column prop="detailUnit" label="单位" width="45">
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
<el-button @click="cancelView"> </el-button>
</div>
</el-dialog>
</div>
@ -977,7 +1006,7 @@ import { getMaintenanceTeamList } from "@/api/device/equTeam";
export default {
name: "FaultReport",
components: { ItemSelect, ItemSelectPerson },
dicts: ["device_order_source"],
dicts: ["device_order_source", "device_reach_standard"],
data() {
return {
//
@ -1127,22 +1156,33 @@ export default {
this.getList();
},
methods: {
//
indexMethod(index) {
return index + 1;
},
timeBackFilling() {
var getTime = new Date().getTime(); //
var getTime = new Date().getTime(); //
var time = new Date(getTime); //
function nowDate(time) {
var year = time.getFullYear(); //
var month = (time.getMonth() + 1).toString().padStart(2, '0'); //
var date = time.getDate().toString().padStart(2, '0'); //
var hour = time.getHours().toString().padStart(2, '0'); //
var minute = time.getMinutes().toString().padStart(2, '0'); //
var second = time.getSeconds().toString().padStart(2, '0'); //
var month = (time.getMonth() + 1).toString().padStart(2, "0"); //
var date = time.getDate().toString().padStart(2, "0"); //
var hour = time.getHours().toString().padStart(2, "0"); //
var minute = time.getMinutes().toString().padStart(2, "0"); //
var second = time.getSeconds().toString().padStart(2, "0"); //
return (
year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second
)
year +
"-" +
month +
"-" +
date +
" " +
hour +
":" +
minute +
":" +
second
);
}
console.log(time);
console.log(nowDate(time));
@ -1158,7 +1198,6 @@ var getTime = new Date().getTime(); //获取到当前时间戳
},
//
onItemSelectedPerson(obj) {
console.log("111111111111", obj);
this.form.orderRepairmanCode = obj[0].userName;
this.form.orderRepairmanName = obj[0].nickName;
},
@ -1180,6 +1219,10 @@ var getTime = new Date().getTime(); //获取到当前时间戳
this.open = false;
this.reset();
},
//
cancelView() {
this.openView = false;
},
//
cancelCheckForm() {
this.viewCheck = false;
@ -1219,6 +1262,8 @@ var getTime = new Date().getTime(); //获取到当前时间戳
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.orderBreakdownTimeArray = null;
this.queryParams.orderTimeArray = null;
this.resetForm("queryForm");
this.handleQuery();
},
@ -1285,6 +1330,7 @@ var getTime = new Date().getTime(); //获取到当前时间戳
item1.standardList.forEach((item) => {
var standard = {};
standard.itemName = item1.itemName;
standard.itemMethod = item1.itemMethod;
standard.standardName = item.standardName;
standard.detailUpLimit = item.detailUpLimit;
standard.detailDownLimit = item.detailDownLimit;

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

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

@ -1,11 +1,19 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="98px"
>
<el-form-item label="委外工单编码" prop="workCode">
<el-input
v-model="queryParams.workCode"
placeholder="请输入委外工单编码"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
@ -13,6 +21,7 @@
<el-input
v-model="queryParams.workPerson"
placeholder="请输入维修人员"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
@ -21,6 +30,7 @@
<el-input
v-model="queryParams.workOutsourcingUnit"
placeholder="请输入委外单位"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
@ -29,6 +39,7 @@
<el-input
v-model="queryParams.workConnection"
placeholder="请输入联系方式"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
@ -38,6 +49,7 @@
v-model="queryParams.workCost"
placeholder="请输入委外费用"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
@ -46,12 +58,38 @@
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-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>
@ -64,7 +102,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['device:outsourceWorkOrder:add']"
>新增</el-button>
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
@ -75,7 +114,8 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['device:outsourceWorkOrder:edit']"
>修改</el-button>
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
@ -86,7 +126,8 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['device:outsourceWorkOrder:remove']"
>删除</el-button>
>删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
@ -96,40 +137,116 @@
size="mini"
@click="handleExport"
v-hasPermi="['device:outsourceWorkOrder:export']"
>导出</el-button>
>导出</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="outsourceWorkOrderList" @selection-change="handleSelectionChange">
<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="orderCode" width="180"/>
<el-table-column label="维修单号" align="center" prop="repairCode" width="180"/>
<el-table-column
label="委外工单编码"
align="center"
prop="workCode"
width="180"
/>
<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="workType" />
<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="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">
<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">
<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
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">
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="150"
>
<template slot-scope="scope">
<el-button
size="mini"
@ -137,20 +254,22 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:outsourceWorkOrder:edit']"
>修改</el-button>
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:outsourceWorkOrder:remove']"
>删除</el-button>
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@ -175,14 +294,42 @@
<ItemSelect ref="itemSelect" @onSelected="onItemSelectedEquipment">
</ItemSelect>
</el-form-item>
<el-form-item label="委外类型" prop="workType">
<el-select
v-model="form.workType"
placeholder="请选择委外类型"
@change="$forceUpdate()"
clearable
style="width: 270px"
>
<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-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-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-input
v-model="form.workConnection"
placeholder="请输入委外单位联系方式"
style="width: 270px"
/>
</el-form-item>
<el-form-item label="委外原因" prop="workReason">
<el-input
@ -194,10 +341,18 @@
/>
</el-form-item>
<el-form-item label="委外费用" prop="workCost">
<el-input v-model="form.workCost" placeholder="请输入委外费用" style="width: 270px"/>
<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="请输入委外用时" style="width: 270px"/>
<el-input
v-model="form.workCostTime"
placeholder="请输入委外用时"
style="width: 270px"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -209,7 +364,13 @@
</template>
<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";
export default {
@ -252,13 +413,22 @@ export default {
attr1: null,
attr2: null,
attr3: null,
factoryCode: null
factoryCode: null,
},
options: [
{
workType: "1",
label: "保养委外",
},
{
workType: "0",
label: "维修委外",
},
],
//
form: {},
//
rules: {
}
rules: {},
};
},
created() {
@ -268,7 +438,7 @@ export default {
/** 查询委外工单列表 */
getList() {
this.loading = true;
listOutsourceWorkOrder(this.queryParams).then(response => {
listOutsourceWorkOrder(this.queryParams).then((response) => {
this.outsourceWorkOrderList = response.rows;
this.total = response.total;
this.loading = false;
@ -301,7 +471,7 @@ export default {
createTime: null,
updateBy: null,
updateTime: null,
factoryCode: null
factoryCode: null,
};
this.resetForm("form");
},
@ -325,9 +495,9 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.workId)
this.single = selection.length!==1
this.multiple = !selection.length
this.ids = selection.map((item) => item.workId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
@ -338,8 +508,8 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const workId = row.workId || this.ids
getOutsourceWorkOrder(workId).then(response => {
const workId = row.workId || this.ids;
getOutsourceWorkOrder(workId).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改委外工单";
@ -347,16 +517,16 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.workId != null) {
updateOutsourceWorkOrder(this.form).then(response => {
updateOutsourceWorkOrder(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addOutsourceWorkOrder(this.form).then(response => {
addOutsourceWorkOrder(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
@ -368,19 +538,27 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const workIds = row.workId || this.ids;
this.$modal.confirm('是否确认删除委外工单编号为"' + workIds + '"的数据项?').then(function() {
this.$modal
.confirm('是否确认删除委外工单编号为"' + workIds + '"的数据项?')
.then(function () {
return delOutsourceWorkOrder(workIds);
}).then(() => {
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('device/outsourceWorkOrder/export', {
...this.queryParams
}, `outsourceWorkOrder_${new Date().getTime()}.xlsx`)
}
}
this.download(
"device/outsourceWorkOrder/export",
{
...this.queryParams,
},
`outsourceWorkOrder_${new Date().getTime()}.xlsx`
);
},
},
};
</script>

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

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

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

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