|
|
|
@ -65,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
|
|
|
|
@ -129,7 +129,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"
|
|
|
|
@ -144,7 +144,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"
|
|
|
|
@ -158,7 +158,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>
|
|
|
|
@ -171,10 +171,12 @@
|
|
|
|
|
|
|
|
|
|
<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 != 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)" v-if="type != 3" :loading="loading" >
|
|
|
|
|
<el-button type="primary" @click.native.stop="setPlanFunction(null)" v-if="type != 3" :loading="loading">
|
|
|
|
|
新增
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
@ -241,7 +243,6 @@
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="选择巡检设备"
|
|
|
|
|
:visible.sync="deviceDialogVisible"
|
|
|
|
@ -349,7 +350,7 @@ export default {
|
|
|
|
|
invList: [],
|
|
|
|
|
userList: [],
|
|
|
|
|
imgList: [],
|
|
|
|
|
name:'',
|
|
|
|
|
name: '',
|
|
|
|
|
BASE_URL: process.env.VUE_APP_BASE_API,
|
|
|
|
|
editType: null,
|
|
|
|
|
deviceDialogVisible: false,
|
|
|
|
@ -373,7 +374,7 @@ export default {
|
|
|
|
|
updateTime: null,
|
|
|
|
|
taskOrderIdFk: null
|
|
|
|
|
},
|
|
|
|
|
ischeck:false,
|
|
|
|
|
ischeck: false,
|
|
|
|
|
deviceList: [],
|
|
|
|
|
delectList: [],
|
|
|
|
|
deviceTotal: 0,
|
|
|
|
@ -382,15 +383,15 @@ export default {
|
|
|
|
|
selectRow: null,
|
|
|
|
|
imgViewerVisible: false,
|
|
|
|
|
inspectTakeSetVisible: false,
|
|
|
|
|
inspectSelectPlanSetVisible:false,
|
|
|
|
|
rules:{
|
|
|
|
|
deptCode: [{required: true, message:"请选择部门!",trigger: 'blur'}],
|
|
|
|
|
invCode: [{required: true, message:"请选择仓库!",trigger: 'blur'}],
|
|
|
|
|
deviceName: [{required: true, message:"请输入设备名称!",trigger: 'blur'}],
|
|
|
|
|
code: [{required: true, message:"请输入物资编码!",trigger: 'blur'}],
|
|
|
|
|
type: [{required: true, message:"请选择类型!",trigger: 'blur'}],
|
|
|
|
|
repairType: [{required: true, message:"请选择维修类型!",trigger: 'blur'}],
|
|
|
|
|
level: [{required: true, message:"请选择紧急程度!",trigger: 'blur'}],
|
|
|
|
|
inspectSelectPlanSetVisible: false,
|
|
|
|
|
rules: {
|
|
|
|
|
deptCode: [{required: true, message: "请选择部门!", trigger: 'blur'}],
|
|
|
|
|
invCode: [{required: true, message: "请选择仓库!", trigger: 'blur'}],
|
|
|
|
|
deviceName: [{required: true, message: "请输入设备名称!", trigger: 'blur'}],
|
|
|
|
|
code: [{required: true, message: "请输入物资编码!", trigger: 'blur'}],
|
|
|
|
|
type: [{required: true, message: "请选择类型!", trigger: 'blur'}],
|
|
|
|
|
repairType: [{required: true, message: "请选择维修类型!", trigger: 'blur'}],
|
|
|
|
|
level: [{required: true, message: "请选择紧急程度!", trigger: 'blur'}],
|
|
|
|
|
},
|
|
|
|
|
statusMap: {
|
|
|
|
|
1: "未开始",
|
|
|
|
@ -417,12 +418,12 @@ export default {
|
|
|
|
|
this.getInvList();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
repairType(val){
|
|
|
|
|
if(val == 3){
|
|
|
|
|
repairType(val) {
|
|
|
|
|
if (val == 3) {
|
|
|
|
|
//报修
|
|
|
|
|
this.ischeck = true;
|
|
|
|
|
|
|
|
|
|
}else
|
|
|
|
|
} else
|
|
|
|
|
this.ischeck = false;
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
@ -437,11 +438,23 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
submit() {
|
|
|
|
|
if(this.formName == "add"){
|
|
|
|
|
|
|
|
|
|
this.$refs["formRef"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.formName == "add") {
|
|
|
|
|
this.inspectTake.status = 1
|
|
|
|
|
}else{
|
|
|
|
|
this.inspectTake.status = 2
|
|
|
|
|
saveDeviceInspectTake(this.inspectTake,'add').then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.$message.success("提交成功");
|
|
|
|
|
this.closeDialog();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.$message.error(error.message);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.inspectTake.status = 2
|
|
|
|
|
uploadDeviceTake(this.inspectTake).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.$message.success("提交成功");
|
|
|
|
@ -452,6 +465,9 @@ export default {
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.$message.error(error.message);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onReset() {
|
|
|
|
@ -501,15 +517,15 @@ export default {
|
|
|
|
|
setPlanFunction(row) {
|
|
|
|
|
|
|
|
|
|
if (this.inspectTake.orderId != null) { //edit
|
|
|
|
|
if(isBlank(row)){
|
|
|
|
|
if (isBlank(row)) {
|
|
|
|
|
this.inputQuery = {};
|
|
|
|
|
this.inputQuery.status = 1;
|
|
|
|
|
this.inputQuery.taskOrderIdFk = this.inspectTake.orderId
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.inputQuery = row
|
|
|
|
|
}
|
|
|
|
|
this.inspectTakeSetVisible = true;
|
|
|
|
|
}else{ // add
|
|
|
|
|
} else { // add
|
|
|
|
|
this.inputQuery.status = 1;
|
|
|
|
|
this.inspectTake.type = this.inspectTake.type
|
|
|
|
|
this.inspectTake.status = 0;
|
|
|
|
@ -531,17 +547,17 @@ export default {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
selectPlanFunction(row){
|
|
|
|
|
selectPlanFunction(row) {
|
|
|
|
|
if (this.inspectTake.orderId != null) { //edit
|
|
|
|
|
if(isBlank(row)){
|
|
|
|
|
if (isBlank(row)) {
|
|
|
|
|
this.inputQuery = {};
|
|
|
|
|
this.inputQuery.taskOrderIdFk = this.inspectTake.orderId
|
|
|
|
|
this.inputQuery.projectCode = this.inspectTake.code
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.inputQuery = row
|
|
|
|
|
}
|
|
|
|
|
this.inspectSelectPlanSetVisible = true;
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.$refs["formRef"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.inspectTake.type = this.inspectTake.type
|
|
|
|
@ -567,7 +583,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
inspectPlanSetCloseDialog(){
|
|
|
|
|
inspectPlanSetCloseDialog() {
|
|
|
|
|
this.inspectPlanSetVisible = false;
|
|
|
|
|
this.inspectSelectPlanSetVisible = false;
|
|
|
|
|
this.selectDeviceInspecTakeDetail({taskOrderIdFk: this.inspectTake.orderId});
|
|
|
|
@ -676,7 +692,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
components: {
|
|
|
|
|
DeviceInspectTakeProjectSet, ElImageViewer,DeviceProjectSelectTake
|
|
|
|
|
DeviceInspectTakeProjectSet, ElImageViewer, DeviceProjectSelectTake
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
created() {
|
|
|
|
@ -685,8 +701,8 @@ export default {
|
|
|
|
|
this.getUserBus();
|
|
|
|
|
if (!isBlank(this.inspectTake.id)) {
|
|
|
|
|
this.selectDeviceInspecTakeDetail({taskOrderIdFk: this.inspectTake.orderId});
|
|
|
|
|
if(this.inspectTake.type == 3){
|
|
|
|
|
this.ischeck =true
|
|
|
|
|
if (this.inspectTake.type == 3) {
|
|
|
|
|
this.ischeck = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|