代码更新

This commit is contained in:
2022-09-30 15:19:09 +08:00
parent c96a961af3
commit 38b68fd258
7 changed files with 194 additions and 18 deletions

View File

@@ -20,6 +20,15 @@
placeholder="请选择"
/>
</el-form-item>
<el-form-item label="使用班组">
<treeselect
v-model="query.dept_id"
:load-options="loadDepts"
:options="depts"
style="width: 200px;"
placeholder="请选择"
/>
</el-form-item>
<el-form-item label="设备">
<el-input
v-model="query.device_code"
@@ -142,6 +151,7 @@ import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
import AddDialog from '@/views/wms/sb/repair/devicerepair/AddDialog'
import { getDepts } from '@/api/system/dept'
export default {
name: 'Devicegridcheck',
@@ -167,6 +177,7 @@ export default {
data() {
return {
classes: [],
depts: [],
class_idStr: null,
materOpt_code: '23',
permission: {
@@ -183,6 +194,7 @@ export default {
this.crud.toQuery()
this.queryClassId()
})
this.getDepts()
},
methods: {
// 钩子在获取表格数据之前执行false 则代表不获取数据
@@ -240,6 +252,32 @@ export default {
this.crud.toQuery()
})
},
// 获取弹窗内部门数据
loadDepts({ action, parentNode, callback }) {
if (action === LOAD_CHILDREN_OPTIONS) {
getDepts({ enabled: true, pid: parentNode.id }).then(res => {
parentNode.children = res.content.map(function(obj) {
if (obj.hasChildren) {
obj.children = null
}
return obj
})
setTimeout(() => {
callback()
}, 200)
})
}
},
getDepts() {
getDepts({ enabled: true }).then(res => {
this.depts = res.content.map(function(obj) {
if (obj.hasChildren) {
obj.children = null
}
return obj
})
})
}
}
}
</script>

View File

@@ -0,0 +1,111 @@
<template>
<el-dialog
title="委外验收"
append-to-body
:visible.sync="dialogVisible"
:before-close="handleClose"
width="550px"
destroy-on-close
@close="close"
>
<el-form ref="form" :inline="true" :model="form4" size="mini" label-width="120px" label-suffix=":">
<el-row>
<el-col :span="24">
<el-form-item label="委外单位" prop="outsourceback_remark">
<el-input v-model="form4.outsourceback_remark" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button icon="el-icon-check" size="mini" type="primary" @click="submitResuft">保存</el-button>
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
</span>
</el-dialog>
</template>
<script>
import CRUD, { crud } from '@crud/crud'
import crudDevicerepairmst from '@/api/wms/sb/devicerepairmst'
export default {
name: 'OutDialog',
mixins: [crud()],
props: {
dialogShow: {
type: Boolean,
default: false
},
openParam: {
type: Object
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
this.form4 = this.openParam
}
}
},
data() {
return {
form4: {
},
dialogVisible: false
}
},
methods: {
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done()
})
.catch(_ => {
})
},
close() {
this.$emit('update:dialogShow', false)
},
submitResuft() {
if (!this.form4.outsourceback_remark) {
return this.crud.notify('委外单位不能为空', CRUD.NOTIFICATION_TYPE.INFO)
}
const data = this.form4
crudDevicerepairmst.checkRepair(data).then(res => {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.dialogVisible = false
this.crud.toQuery()
})
}
}
}
</script>
<style>
.crud-opts2 {
padding: 0;
display: -webkit-flex;
display: flex;
align-items: center;
}
.crud-opts2 .el-dialog__title2 {
line-height: 24px;
font-size:20px;
color:#303133;
}
.crud-opts2 .role-span {
padding: 10px 0px 10px 0px;
}
.crud-opts2 .crud-opts-form {
padding: 10px 0px 0px 20px;
}
.input-with-select {
background-color: #fff;
}
</style>

View File

@@ -134,6 +134,7 @@
<!--分页组件-->
<pagination />
</div>
<OutDialog :dialog-show.sync="OutDialog" :open-param="openParam" />
</div>
</template>
@@ -149,11 +150,12 @@ import crudClassstandard from '@/api/wms/basedata/master/classstandard'
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
import OutDialog from '@/views/wms/sb/repair/devicerepaorout/OutDialog'
export default {
name: 'Devicerepaorout',
dicts: ['EM_DEVICE_WX_INVTYPE', 'EM_DEVICE_WX_INVSTATUS', 'EM_FAULT_LEVEL'],
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, Treeselect },
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, Treeselect, OutDialog },
mixins: [presenter(), header(), crud()],
cruds() {
return CRUD({
@@ -175,6 +177,8 @@ export default {
return {
classes: [],
class_idStr: null,
OutDialog: false,
openParam: null,
materOpt_code: '23',
permission: {
}
@@ -253,10 +257,8 @@ export default {
if (data.invstatus !== '04') {
return this.crud.notify('只能对委外维修状态的单据验收', CRUD.NOTIFICATION_TYPE.INFO)
}
crudDevicerepairmst.checkRepair(data).then(res => {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
this.openParam = data
this.OutDialog = true
}
}
}

View File

@@ -2,21 +2,21 @@
<div class="login" :style="'background-image:url('+ Background +');'">
<div style="font-size: 22px; color: #f4f4f5; text-align: center; background-color: transparent">武汉新锐设备管理任务看板</div>
<div class="t_btn2">
<el-table border style="width: 100%;" :data="tableData" max-height="700" :cell-style="cellStyle" :row-style="setRowStyle" :highlight-current-row="true" >
<el-table :border="false" style="width: 100%;" :data="tableData" max-height="700" :cell-style="cellStyle" :row-style="setRowStyle" :highlight-current-row="true" >
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="input_time" label="生成时间" show-overflow-tooltip />
<el-table-column prop="input_time" label="报修时间" show-overflow-tooltip />
<el-table-column prop="repair_code" label="任务号" show-overflow-tooltip />
<el-table-column prop="maintenancecycle" label="任务类型" />
<el-table-column prop="fault_level" label="故障等级" />
<!-- <el-table-column prop="" label="部门" />-->
<el-table-column prop="fault_desc" width="170px" label="故障描述" />
<el-table-column prop="device_name" width="150px" label="设备名称" />
<el-table-column prop="extend_code" label="自编号" show-overflow-tooltip />
<el-table-column prop="fault_desc" width="170px" label="故障描述" />
<el-table-column prop="fault_level" label="故障等级" />
<el-table-column prop="dept_name" label="使用部门" show-overflow-tooltip />
<el-table-column prop="invstatus" label="状态" />
<el-table-column prop="user_name" width="170px" label="维修/保养人" />
<el-table-column prop="real_start_date" width="150px" label="开始时间" show-overflow-tooltip />
<el-table-column prop="real_end_date" width="150px" label="结束时间" show-overflow-tooltip />
<!-- <el-table-column prop="" label="部门" />-->
</el-table>
</div>
</div>
@@ -127,10 +127,10 @@ export default {
/* 去除表头边框 */
border: none;
}
.t_btn2 >>> .el-table__row>td {
/* 去除表格线 */
/*.t_btn2 >>> .el-table__row>td {
!* 去除表格线 *!
border: none;
}
}*/
.t_btn2 >>> .el-table th {
/* 设置表头的颜色和字体颜色 */
background-color: #012957;