设备计划代码提交

dev
郑明梁 2 years ago
parent 235aa003d3
commit 9c321847ef

@ -5,8 +5,8 @@
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="任务号:">
<el-input v-model="filterQuery.orderId" placeholder="请输入任务号" style="width: 90%"
<el-form-item class="query-form-item" label="任务号:">
<el-input v-model="filterQuery.orderId" placeholder="请输入任务号" style="width: 90%"
clearable></el-input>
</el-form-item>
</el-col>
@ -83,6 +83,7 @@
<el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail" highlight-current-row border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="任务编号" prop="orderId"></el-table-column>
<el-table-column label="资产编码" prop="code"></el-table-column>
<el-table-column label="设备名称" prop="deviceName"></el-table-column>
<el-table-column label="任务状态" prop="status">
<template slot-scope="scope">
@ -150,7 +151,6 @@
<el-tag>{{ statusdetailMap[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="巡检结果备注" prop="result" width="500"></el-table-column>
<el-table-column label="巡检图片" prop="inspectImage" width="300">
<template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewer(scope.row)">{{ scope.row.inspectImage }}</div>

@ -48,6 +48,17 @@
clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="任务状态:" class="query-form-item">
<el-select v-model="filterQuery.status" style="width: 90%" placeholder="请选择任务级别" clearable>
<el-option label="未巡检" :value=2></el-option>
<el-option label="巡检中" :value=3></el-option>
<el-option label="已巡检" :value=4></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="预计结束时间时间:">
<el-date-picker
@ -64,8 +75,6 @@
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="开始时间:">
<el-date-picker
@ -114,6 +123,7 @@
<el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail" highlight-current-row border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="任务编号" prop="orderId"></el-table-column>
<el-table-column label="资产编码" prop="code"></el-table-column>
<el-table-column label="设备名称" prop="deviceName"></el-table-column>
<el-table-column label="任务状态" prop="status">
<template slot-scope="scope">
@ -125,28 +135,28 @@
<el-table-column label="提醒时间" prop="remindTime"></el-table-column>
<el-table-column label="巡检人" prop="inspectName"></el-table-column>
<el-table-column label="预计结束时间时间" prop="expectedTime"></el-table-column>
<el-table-column label="操作">
<el-table-column label="操作" width="170">
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="scope.row.status != 0"
@click.native.stop="startOrder(scope.row,1)"
:disabled="scope.row.status != 2"
@click.native.stop="startOrder(scope.row,3)"
>开始巡检
</el-button
>
<el-button
type="text"
size="small"
:disabled="scope.row.status != 1"
@click.native.stop="startOrder(scope.row,2)"
:disabled="scope.row.status != 3"
@click.native.stop="startOrder(scope.row,4)"
>结束巡检
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="startOrder(scope.row,3)"
@click.native.stop="startOrder(scope.row,5)"
>详情
</el-button
>
@ -188,7 +198,6 @@
<el-tag>{{ statusdetailMap[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="巡检结果备注" prop="result" width="500"></el-table-column>
<el-table-column label="巡检图片" prop="inspectImage" width="300">
<template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewer(scope.row)">{{ scope.row.inspectImage }}</div>
@ -248,7 +257,7 @@ export default {
deptCode: this.$store.getters.locDeptCode,
invCode: null,
code: null,
statusList: [0,1,2],
statusList: [2,3,4],
page: 1,
limit: 20,
},
@ -264,9 +273,9 @@ export default {
loading: false,
formVisible: false,
statusMap: {
0: "未巡检",
1: "巡检中",
2: "已巡检",
2: "未巡检",
3: "巡检中",
4: "已巡检",
},
statusdetailMap: {
1: "未开始",
@ -404,7 +413,7 @@ export default {
deptCode: this.$store.getters.locDeptCode,
invCode: null,
code: null,
statusList: [0,1,2],
statusList: [2,3,4],
page: 1,
limit: 20,
};
@ -488,6 +497,7 @@ export default {
},
startOrder(row,type) {
this.formVisible = true;
//3 4 5
this.type = type
this.deviceInspectTake = row;
},

@ -2,14 +2,13 @@
<div>
<el-card style="margin: 5px;margin-top: -20px">
<el-form :model="inspectTake" ref="formRef" label-width="120px" style="margin-bottom: -15px" :rules="rules">
<el-button-group style="display: flex;margin: 0px 0 10px 90%; height: 35px">
<el-button-group style="display: flex;margin: 0px 0 10px 85%; height: 35px" v-if="type != 3">
<el-button
type="primary"
:disabled="type == 3"
@click.native="selectDevice()"
>选择设备
</el-button>
<el-button type="primary" :disabled="type == 3" @click.native="submit(type)">提交</el-button>
<el-button type="primary" @click.native="submit(type)">提交</el-button>
</el-button-group>
<el-row>
@ -66,7 +65,7 @@
<el-col :span="10">
<el-form-item label="巡检人:" prop="inspectUser">
<el-select v-model="inspectTake.inspectUser"
:disabled="type == 3"
:disabled = "type == 3"
placeholder="委托验收人" clearable
style="width: 90%">
<el-option
@ -103,7 +102,7 @@
type="datetime"
placeholder="选择任务预期结束时间"
style="width: 90%"
:disabled="type == 3"
:disabled = "type == 3"
:picker-options="pickerOptionsExpected"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
@ -118,7 +117,7 @@
type="datetime"
placeholder="选择提醒时间"
style="width: 90%"
:disabled="type == 3"
:disabled = "type == 3"
:picker-options="pickerOptionsExpected"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
@ -132,7 +131,7 @@
<el-col :span="24">
<el-form-item label="备注:" prop="remark">
<el-input type="textarea" :rows="3"
:disabled="type == 3"
:disabled = "type == 3"
v-model="inspectTake.remark"></el-input>
</el-form-item>
</el-col>
@ -145,10 +144,10 @@
<el-row type="flex" justify="end">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 10px">
<el-button type="primary" @click.native.stop="selectPlanFunction(null)" :disabled="type == 3" :loading="loading">选入</el-button>
<el-button type="primary" @click.native.stop="selectPlanFunction(null)" v-if="type != 3" :loading="loading"></el-button>
</el-button-group>
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button type="primary" @click.native.stop="setPlanFunction(null)" :disabled="type == 3" :loading="loading" >
<el-button type="primary" @click.native.stop="setPlanFunction(null)" v-if="type != 3" :loading="loading" >
新增
</el-button>
</el-button-group>
@ -170,7 +169,7 @@
</el-table-column>
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-button type="text" size="small" :disabled="type == 3" @click.native.stop="editDialog(scope.row,'edit')">
<el-button type="text" size="small" v-if="type != 3" @click.native.stop="editDialog(scope.row,'edit')">
编辑
</el-button>
<el-button type="text" size="small" @click.native.stop="editDialog(scope.row,'detail')">详情</el-button>
@ -399,7 +398,11 @@ export default {
});
},
submit() {
this.inspectTake.status = 1
if(this.formName == "add"){
this.inspectTake.status = 1
}else{
this.inspectTake.status = 2
}
uploadDeviceTake(this.inspectTake).then((res) => {
if (res.code === 20000) {
this.$message.success("提交成功");

@ -3,7 +3,7 @@
<el-card style="margin: 5px;margin-top: -20px">
<el-form :model="inspectTake" ref="formRef" label-width="120px" style="margin-bottom: -15px">
<el-button-group style="display: flex;margin: 0px 0 10px 90%; height: 35px">
<el-button type="primary" v-if="type != 3" @click.native="submit(type)"></el-button>
<el-button type="primary" v-if="type != 5" @click.native="submit(type)"></el-button>
</el-button-group>
<el-row>
@ -53,7 +53,7 @@
</el-col>
</el-row>
<el-row v-if="type == 3">
<el-row v-if="type == 5">
<el-col :span="10">
<el-form-item label="开始时间:" prop="deviceName">
<el-input v-model="inspectTake.strartTime" disabled placeholder="请输入开始时间" style="width: 90%"
@ -69,6 +69,17 @@
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="项目类型:" prop="type">
<el-select v-model="inspectTake.type" style="width: 90%" disabled placeholder="请选择项目类型" clearable="true">
<el-option label="巡检" :value="1"></el-option>
<el-option label="养护" :value="2"></el-option>
<el-option label="报修" :value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="巡检人:" prop="inspectUser">
<el-select v-model="inspectTake.inspectUser" disabled placeholder="委托验收人" clearable
@ -88,7 +99,7 @@
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input type="textarea" :rows="3" :disabled="editType == 2 || type == 3"
<el-input type="textarea" :rows="3" :disabled="editType == 2 || type == 5"
v-model="inspectTake.remark"></el-input>
</el-form-item>
</el-col>
@ -100,10 +111,11 @@
<el-card>
<el-row type="flex" justify="end">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 10px">
<el-button type="primary" @click.native.stop="selectPlanFunction(null)" v-if="type != 5" :loading="loading"></el-button>
</el-button-group>
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button type="primary" @click.native.stop="setPlanFunction(null)" :loading="loading" v-if="type != 3">
新增
</el-button>
<el-button type="primary" @click.native.stop="setPlanFunction(null)" :loading="loading" v-if="type != 5"></el-button>
</el-button-group>
</el-row>
@ -123,7 +135,7 @@
</el-table-column>
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-button type="text" size="small" v-if="type != 3" @click.native.stop="editDialog(scope.row,'edit')">
<el-button type="text" size="small" v-if="type != 5" @click.native.stop="editDialog(scope.row,'edit')">
编辑
</el-button>
<el-button type="text" size="small" @click.native.stop="editDialog(scope.row,'detail')">详情</el-button>
@ -148,6 +160,23 @@
:closeDialog="inspectTakeSetCloseDialog"
></DeviceInspectTakeProjectSet>
</el-dialog>
<el-dialog
title="设备选入"
:visible.sync="inspectSelectPlanSetVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="80%"
append-to-body
v-if="inspectSelectPlanSetVisible"
>
<DeviceProjectSelectTake
:inputQuery="inputQuery"
:type="inspectTake.type"
:closeDialog="inspectTakeSetCloseDialog"
></DeviceProjectSelectTake>
</el-dialog>
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/>
</div>
@ -160,9 +189,14 @@ import {getDeptListByUser} from "@/api/auth/authDept";
import {getInvListByUser, warehouseUserList} from "@/api/system/invWarehouse";
import {saveDeviceInspectPlan, updateStatus} from "@/api/inventory/deviceInspectPlan";
import DeviceInspectTakeProjectSet from "@/views/inventory/DeviceInspectTakeProjectSet"
import {selectDeviceInspecTakeDetail, uploadDeviceInspecTake} from "@/api/inventory/deviceInspectTake";
import {
saveDeviceInspectTake,
selectDeviceInspecTakeDetail,
uploadDeviceInspecTake
} from "@/api/inventory/deviceInspectTake";
import {previewImage, previewFile} from "@/api/purchase/supCompany";
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
import DeviceProjectSelectTake from "@/views/inventory/DeviceProjectSelectTake"
export default {
props: {
@ -187,6 +221,7 @@ export default {
userList: [],
imgList: [],
name:'',
isColse: false,
BASE_URL: process.env.VUE_APP_BASE_API,
editType: null,
deviceDialogVisible: false,
@ -218,6 +253,7 @@ export default {
selectRow: null,
imgViewerVisible: false,
inspectTakeSetVisible: false,
inspectSelectPlanSetVisible: false,
statusMap: {
1: "未开始",
2: "已检查",
@ -250,8 +286,7 @@ export default {
},
submit(status) {
//
var falg = true
if (this.type == 2) {
if (this.type == 4) {
for (var i = 0; i < this.delectList.length; i++) {
if (this.delectList[i].status != 2) {
return this.$message.error("还有任务未检查!");
@ -331,7 +366,30 @@ export default {
this.inspectTakeSetVisible = true;
}
},
selectPlanFunction(row){
if (this.inspectTake.orderId != null) { //edit
if(isBlank(row)){
this.inputQuery = {
id: null,
projectCode: null,
projectContent: null,
status: null,
result: null,
inspectImage: null,
inspectUser: null,
updateTime: null,
taskOrderIdFk: null
},
this.inputQuery.inspectUser = this.inspectTake.inspectUser
this.inputQuery.taskOrderIdFk = this.inspectTake.orderId
}else{
this.inputQuery = row
}
}else{
this.inputQuery.taskOrderIdFk = this.inspectTake.orderId
}
this.inspectSelectPlanSetVisible = true;
},
editDialog(row, type) {
this.inputQuery = row;
this.inspectTakeSetVisible = true
@ -376,18 +434,29 @@ export default {
},
inspectTakeSetCloseDialog() {
this.inspectTakeSetVisible = false
this.inspectSelectPlanSetVisible = false
var count=0;
if (this.type == 4) {
for (var i = 0; i < this.delectList.length; i++) {
if (this.delectList[i].status != 2) {
count++;
}
}
if(count == 0){
return this.$message.success("任务已全部完成")
}
}
this.selectDeviceInspecTakeDetail({taskOrderIdFk: this.inspectTake.orderId});
}
}
,
components: {
DeviceInspectTakeProjectSet, ElImageViewer
DeviceInspectTakeProjectSet, ElImageViewer ,DeviceProjectSelectTake
}
,
created() {
this.getDeptList();
this.getUserBus();
console.log(this.type)
if (!isBlank(this.inspectTake.id)) {
this.selectDeviceInspecTakeDetail({taskOrderIdFk: this.inspectTake.orderId});
}

@ -34,7 +34,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row v-if="editType != 2">
<el-col :span="11">
<el-form-item label="巡检图片:">
<el-upload
@ -66,8 +66,8 @@
</el-row>
</el-form>
<div style="text-align: center;margin-top: 12px">
<el-button type="primary" size="small" icon="search" @click="onModifySubmit"></el-button>
<el-button type="primary" size="small" icon="search" @click="closeDialog"></el-button>
<el-button type="primary" size="small" icon="search" v-if="editType != 2" @click="onModifySubmit"></el-button>
<el-button type="primary" size="small" icon="search" v-if="editType != 2" @click="closeDialog"></el-button>
</div>
</el-card>
</div>

@ -37,7 +37,7 @@
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="任务号:">
<el-form-item class="query-form-item" label="任务号:">
<el-input v-model="filterQuery.orderId" placeholder="请输入任务单号" style="width: 90%"
clearable></el-input>
</el-form-item>
@ -104,11 +104,12 @@
</el-col>
<el-col :span="8">
<el-form-item label="任务状态:" class="query-form-item">
<el-select v-model="filterQuery.status" style="width: 90%" placeholder="请选择计划级别" clearable>
<el-option label="未巡检" :value=0></el-option>
<el-option label="巡检中" :value=1></el-option>
<el-option label="已巡检" :value=2></el-option>
<el-option label="异常" :value=3></el-option>
<el-select v-model="filterQuery.status" style="width: 90%" placeholder="请选择任务状态" clearable>
<el-option label="草稿" :value=0></el-option>
<el-option label="未分配" :value=1></el-option>
<el-option label="未巡检" :value=2></el-option>
<el-option label="巡检中" :value=3></el-option>
<el-option label="已巡检" :value=4></el-option>
</el-select>
</el-form-item>
</el-col>
@ -128,26 +129,27 @@
<el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail" highlight-current-row border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="部门" prop="deptName"></el-table-column>
<el-table-column label="仓库" prop="invName"></el-table-column>
<el-table-column label="任务编号" prop="orderId"></el-table-column>
<el-table-column label="设备名称" prop="deviceName"></el-table-column>
<el-table-column label="任务状态" prop="status">
<el-table-column label="部门" prop="deptName" width="150"></el-table-column>
<el-table-column label="仓库" prop="invName" width="150"></el-table-column>
<el-table-column label="任务编号" prop="orderId" width="150"></el-table-column>
<el-table-column label="资产编码" prop="code" width="150"></el-table-column>
<el-table-column label="设备名称" prop="deviceName" width="150"></el-table-column>
<el-table-column label="任务状态" prop="status" width="150">
<template slot-scope="scope">
<el-tag :type="statusFilterType(scope.row.status)">{{ statusMap[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="开始时间" prop="strartTime"></el-table-column>
<el-table-column label="结束时间" prop="endTime"></el-table-column>
<el-table-column label="提醒时间" prop="remindTime"></el-table-column>
<el-table-column label="巡检人" prop="inspectName"></el-table-column>
<el-table-column label="预计结束时间时间" prop="expectedTime"></el-table-column>
<el-table-column label="开始时间" prop="strartTime" width="150"></el-table-column>
<el-table-column label="结束时间" prop="endTime" width="150"> </el-table-column>
<el-table-column label="提醒时间" prop="remindTime" width="150"></el-table-column>
<el-table-column label="巡检人" prop="inspectName" width="150"></el-table-column>
<el-table-column label="预计结束时间时间" prop="expectedTime" width="150"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="startOrder(scope.row,3)"
@click.native.stop="startOrder(scope.row,5)"
>详情
</el-button
>
@ -189,7 +191,6 @@
<el-tag>{{ statusdetailMap[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="巡检结果备注" prop="result" width="500"></el-table-column>
<el-table-column label="巡检图片" prop="inspectImage" width="300">
<template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewer(scope.row)">{{ scope.row.inspectImage }}</div>
@ -264,10 +265,11 @@ export default {
loading: false,
formVisible: false,
statusMap: {
0: "未巡检",
1: "巡检中",
2: "已巡检",
3: "异常",
0: "草稿",
1: "未分配",
2: "未巡检",
3: "巡检中",
4: "已巡检",
},
statusdetailMap: {
1: "未开始",

Loading…
Cancel
Save