Merge remote-tracking branch 'origin/dev' into dev2.0

20231126-yw
郑明梁 2 years ago
commit 5101975f0e

@ -56,6 +56,15 @@ export function addDeviceInspecTakeDetail(params) {
});
}
export function delectDeviceInspecTake(data) {
return axios({
url: "/udiwms/inv/device/inspect/take/delectDeviceInspecTake",
method: "post",
data: data
});
}

@ -28,42 +28,18 @@
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="预计结束时间时间:">
<el-date-picker
:picker-options="pickerEdOptions"
v-model="edDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="开始时间:">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%"
>
</el-date-picker>
<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-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="结束时间:">
<el-form-item class="query-form-item" label="预计结束时间时间:">
<el-date-picker
:picker-options="pickerOptions"
v-model="endDateRange"
:picker-options="pickerEdOptions"
v-model="edDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
@ -75,6 +51,7 @@
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
@ -104,8 +81,6 @@
<el-tag>{{ 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>
@ -125,6 +100,13 @@
>详情
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
@ -227,7 +209,11 @@
import {getDeptListByUser} from "@/api/auth/authDept";
import {findInvByUser} from "@/api/system/invSubWarehouse";
import deviceInspectTakeAuditModify from "@/views/inventory/DeviceInspectTakeAuditModify"
import {getDeviceInspectTakeList,selectDeviceInspecTakeDetail} from "@/api/inventory/deviceInspectTake";
import {
delectDeviceInspecTake,
getDeviceInspectTakeList,
selectDeviceInspecTakeDetail
} from "@/api/inventory/deviceInspectTake";
import {previewImage, previewFile} from "@/api/purchase/supCompany";
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
import DeviceInspectTakeDetail from "@/views/inventory/DeviceInspectTakeDetail"
@ -404,7 +390,7 @@ export default {
deptCode: this.$store.getters.locDeptCode,
invCode: null,
code: null,
statusList: [0,1,2],
statusList: [0,1],
page: 1,
limit: 20,
};
@ -463,7 +449,6 @@ export default {
this.formName="add"
this.addTakeDetial = true;
},
deptChange() {
this.invList = [];
this.filterQuery.invCode = null;
@ -506,9 +491,9 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {id: rowId};
let params = {id: rowId.id};
this.loading = true;
deleteInspectPlan(params).then((res) => {
delectDeviceInspecTake(params).then((res) => {
this.loading = false;
if (res.code === 20000) {
this.$message.success("删除成功!");

@ -98,15 +98,15 @@
</el-row>
<el-row>
<el-col :span="7">
<el-col :span="6">
<el-form-item label="时间频率:" prop="frequency">
<el-input v-model="inspectPlan.frequency" :disabled="type == 'detail'" type="number" placeholder="请选择时间频率" style="width: 100%"
clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-col :span="4">
<el-form-item label="单位:" label-width="60px" :disabled="type == 'detail'" prop="frequencyUnit">
<el-select v-model="inspectPlan.frequencyUnit" :disabled="type == 'detail'"style="width: 60%" placeholder="单位" clearable>
<el-select v-model="inspectPlan.frequencyUnit" :disabled="type == 'detail'"style="width: 73%" placeholder="单位" clearable>
<el-option label="年" :value=1></el-option>
<el-option label="月" :value=2></el-option>
<el-option label="日" :value=3></el-option>

@ -2,10 +2,10 @@
<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 85%; height: 35px" v-if="type != 3">
<el-button-group style="display: flex;margin: 0px 0 10px 85%; height: 35px" v-if="type != 3">
<el-button
type="primary"
@click.native="selectDevice()"
type="primary"
@click.native="selectDevice()"
>选择设备
</el-button>
<el-button type="primary" @click.native="submit(type)">提交</el-button>
@ -15,7 +15,7 @@
<el-col :span="10">
<el-form-item class="query-form-item" label="部门:" prop="deptCode">
<el-select v-model="inspectTake.deptCode" placeholder="请选择部门" clearable="true"
:disabled="inspectTake.code != null"
:disabled="inspectTake.code != null"
@change="deptChange" style="width: 90%">
<el-option
v-for="item in deptList"
@ -30,7 +30,7 @@
<el-col :span="10">
<el-form-item class="query-form-item" label="仓库:" prop="invCode">
<el-select v-model="inspectTake.invCode" placeholder="请选择仓库"
<el-select v-model="inspectTake.invCode" placeholder="请选择仓库"
:disabled="inspectTake.code != null"
clearable="true" style="width: 90%">
<el-option
@ -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
@ -122,32 +122,32 @@
<el-row>
<el-col :span="10">
<el-form-item label="预期结束时间:" prop="expectedTime">
<el-date-picker
<el-col :span="10">
<el-form-item label="预期结束时间:" prop="expectedTime">
<el-date-picker
v-model="inspectTake.expectedTime"
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"
>
</el-date-picker>
</el-form-item>
</el-col>
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="提醒时间:" prop="remindTime">
<el-date-picker
v-model="inspectTake.remindTime"
type="datetime"
placeholder="选择提醒时间"
style="width: 90%"
:disabled = "type == 3"
:picker-options="pickerOptionsExpected"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
v-model="inspectTake.remindTime"
type="datetime"
placeholder="选择提醒时间"
style="width: 90%"
:disabled="type == 3"
:picker-options="pickerOptionsExpected"
:clearable="false"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
@ -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>
@ -196,7 +198,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 != 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>
@ -225,31 +227,30 @@
<el-dialog
title="设备选入"
:visible.sync="inspectSelectPlanSetVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="80%"
append-to-body
v-if="inspectSelectPlanSetVisible"
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="inspectPlanSetCloseDialog"
:inputQuery="inputQuery"
:type="inspectTake.type"
:closeDialog="inspectPlanSetCloseDialog"
></DeviceProjectSelectTake>
</el-dialog>
<el-dialog
title="选择巡检设备"
:visible.sync="deviceDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="65%"
v-if="deviceDialogVisible"
append-to-body
title="选择巡检设备"
:visible.sync="deviceDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="65%"
v-if="deviceDialogVisible"
append-to-body
>
<el-card>
<el-form class="query-form" :model="filterQuery" :inline="true" label-width="100px">
@ -290,11 +291,11 @@
</el-table>
<pagination
v-show="deviceTotal>0"
:total="deviceTotal"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getDeviceList"
v-show="deviceTotal>0"
:total="deviceTotal"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getDeviceList"
></pagination>
</el-card>
</el-dialog>
@ -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,21 +438,36 @@ export default {
});
},
submit() {
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("提交成功");
this.closeDialog();
} else {
this.$message.error(res.message);
this.$refs["formRef"].validate((valid) => {
if (valid) {
if (this.formName == "add") {
this.inspectTake.status = 1
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("提交成功");
this.closeDialog();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error(error.message);
});
}
}
}).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
}
}
}

@ -469,21 +469,23 @@ export default {
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
},
inspectTakeSetCloseDialog() {
inspectTakeSetCloseDialog(obj) {
this.selectDeviceInspecTakeDetail({taskOrderIdFk: this.inspectTake.orderId});
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(isBlank(obj)){
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("任务已全部完成")
}
}
if(count == 0){
return this.$message.success("任务已全部完成")
}
}
this.selectDeviceInspecTakeDetail({taskOrderIdFk: this.inspectTake.orderId});
}
}
,

@ -67,7 +67,7 @@
</el-form>
<div style="text-align: center;margin-top: 12px">
<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>
<el-button type="primary" size="small" icon="search" v-if="editType != 2" @click="closeDialog('close')"></el-button>
</div>
</el-card>
</div>

@ -139,7 +139,8 @@ export default {
projectSetType: {
1: "巡检",
2: "养护"
2: "养护",
3: "报修",
},
formName: null,
deviceRepairOrder: {},

@ -209,11 +209,9 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="deviceLoading" :data="deviceList" style="width: 100%"
highlight-current-row border ref="ref"
@selection-change="handleCurrentChange"
<el-table v-loading="deviceLoading" :data="deviceList" style="width: 100%" highlight-current-row border ref="ref"
@current-change="handleCurrentChange"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="设备名称" prop="deviceName" width="200"></el-table-column>
<el-table-column label="资产编码" prop="code" width="200"></el-table-column>
@ -292,7 +290,6 @@ export default {
formRules: {
deptCode: [{required: true, message: '请选择部门', trigger: 'blur'}],
invCode: [{required: true, message: '请选择仓库', trigger: 'blur'}],
deviceName: [{required: true, message: '请输入设备名称', trigger: 'blur'}],
code: [{required: true, message: '请输入物资编码', trigger: 'blur'}],
repairType: [{required: true, message: '请选择维修类型', trigger: 'blur'}],
urgencyType: [{required: true, message: '请选择紧急程度', trigger: 'blur'}],
@ -423,22 +420,19 @@ export default {
this.filterQuery.page = 1;
this.getDeviceList();
},
handleCurrentChange(val) {
this.check = !this.check
if (val.length >= 2) {
// 0
// console.log(val.splice(0,val.length-1),'')
let arrays = val.splice(0, val.length - 1)
arrays.forEach(row => {
this.$refs.ref.toggleRowSelection(row); //
})
handleCurrentChange(row) {
this.selectRow = row;
},
//
resetForm() {
if (this.$refs["dataForm"]) {
//
this.$refs["dataForm"].clearValidate();
}
// console.log(val,'')
this.selectRow = val[0];
},
combine() {
if (this.check == false) {
this.resetForm();
if (this.selectRow == null) {
this.$message.error("请勾选设备!")
return;
}

Loading…
Cancel
Save