代码更新
This commit is contained in:
@@ -8,12 +8,13 @@
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<el-row>
|
||||
<el-col :span="18" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="6">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" type="primary" @click="endRepair">结束维修</el-button>
|
||||
<el-button icon="el-icon-check" size="mini" type="primary" @click="submitMain">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||
</span>
|
||||
@@ -65,7 +66,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产配合人" prop="product_person_name">
|
||||
<el-form-item label="班组配合人" prop="product_person_name">
|
||||
<el-input v-model="form.product_person_name" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -169,14 +170,19 @@ export default {
|
||||
},
|
||||
submitMain() {
|
||||
const data = this.form
|
||||
if (this.form.update_optname === '') {
|
||||
return this.crud.notify('维修人不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
crudDevicerepairmst.submitRepair(data).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
this.dialogVisible = false
|
||||
})
|
||||
},
|
||||
endRepair() {
|
||||
const data = this.form
|
||||
crudDevicerepairmst.endRepair(data).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
this.dialogVisible = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
111
mes/qd/src/views/wms/sb/repair/devicerepairpa/StartDialog.vue
Normal file
111
mes/qd/src/views/wms/sb/repair/devicerepairpa/StartDialog.vue
Normal 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="update_optname">
|
||||
<el-input v-model="form4.update_optname" 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: 'StartDialog',
|
||||
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.update_optname) {
|
||||
return this.crud.notify('维修人不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
const data = this.form4
|
||||
crudDevicerepairmst.startRepair(data).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
this.dialogVisible = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
@@ -89,7 +89,7 @@
|
||||
>
|
||||
开始维修
|
||||
</el-button>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
@@ -99,6 +99,17 @@
|
||||
@click="executeRepair"
|
||||
>
|
||||
维修执行
|
||||
</el-button>-->
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="open_flag"
|
||||
@click="openReceive"
|
||||
>
|
||||
维修领用
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
@@ -111,17 +122,6 @@
|
||||
>
|
||||
结束维修
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="open_flag"
|
||||
@click="openReceive"
|
||||
>
|
||||
维修领用
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -131,7 +131,7 @@
|
||||
:disabled="confirm_flag"
|
||||
@click="confirmRepair"
|
||||
>
|
||||
维修确认
|
||||
班组验收
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
@@ -179,6 +179,7 @@
|
||||
<ExecuteDialog :dialog-show.sync="executeDialog" :open-param="openParam" />
|
||||
<resuftDialog :dialog-show.sync="resuftDialog" :open-param="openParam" />
|
||||
<ReceiveDialog :dialog-show.sync="receiveDialog" :open-param="openParam" />
|
||||
<StartDialog :dialog-show.sync="startDialog" :open-param="openParam" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -197,11 +198,12 @@ import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
import ExecuteDialog from '@/views/wms/sb/repair/devicerepairpa/ExecuteDialog'
|
||||
import resuftDialog from '@/views/wms/sb/repair/devicerepairpa/resuftDialog'
|
||||
import ReceiveDialog from '@/views/wms/sb/repair/devicerepairpa/ReceiveDialog'
|
||||
import StartDialog from '@/views/wms/sb/repair/devicerepairpa/StartDialog'
|
||||
|
||||
export default {
|
||||
name: 'Devicerepairpa',
|
||||
dicts: ['EM_DEVICE_WX_INVTYPE', 'EM_DEVICE_WX_INVSTATUS', 'EM_FAULT_LEVEL'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, Treeselect, ExecuteDialog, resuftDialog, ReceiveDialog },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, Treeselect, ExecuteDialog, resuftDialog, ReceiveDialog, StartDialog },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -234,6 +236,7 @@ export default {
|
||||
executeDialog: false,
|
||||
resuftDialog: false,
|
||||
receiveDialog: false,
|
||||
startDialog: false,
|
||||
permission: {
|
||||
}
|
||||
}
|
||||
@@ -300,18 +303,19 @@ export default {
|
||||
if (data.invstatus !== '02') {
|
||||
return this.crud.notify('只能对提交状态的单据维修', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
crudDevicerepairmst.startRepair(data).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
this.openParam = data
|
||||
this.startDialog = true
|
||||
},
|
||||
endRepair() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = _selectData[0]
|
||||
if (data.invstatus === '03' || data.invstatus === '05') {
|
||||
crudDevicerepairmst.endRepair(data).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
crudDevicerepairmst.getDtl(data).then(res => {
|
||||
this.openParam = {
|
||||
'form': data,
|
||||
'tableData': res
|
||||
}
|
||||
this.executeDialog = true
|
||||
})
|
||||
} else {
|
||||
return this.crud.notify('只能对开始或者委外验收的单据结束维修', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
|
||||
@@ -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"
|
||||
@@ -95,6 +104,11 @@
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item label="班组配合人:" prop="product_person_name">
|
||||
<el-input v-model="form.product_person_name" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item label="故障等级:" prop="fault_level">
|
||||
<el-select
|
||||
@@ -141,6 +155,9 @@
|
||||
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
|
||||
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||
<el-table-column prop="dept_name" label="所属部门" show-overflow-tooltip />
|
||||
<el-table-column prop="use_name" label="使用班组" show-overflow-tooltip />
|
||||
<el-table-column prop="product_person_name" label="班组配合人" width="90px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_faultclass_name" label="故障分类" />
|
||||
<el-table-column prop="fault_level" label="故障等级" :formatter="formaLevelName" />
|
||||
<el-table-column prop="status" label="状态" :formatter="formatStatusName"/>
|
||||
@@ -187,8 +204,9 @@ import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
import PicDialog from '@/views/wms/sb/repair/devicerepairrequest/PicDialog'
|
||||
import DeviceDialog from '@/views/wms/sb/upkeep/devicemaintenanceplan/DeviceDialog'
|
||||
import FaultDialog from '@/views/wms/sb/repair/devicevprs/FaultDialog'
|
||||
import { getDepts } from '@/api/system/dept'
|
||||
|
||||
const defaultForm = { device_faultclass_name: null, device_code: null, request_id: null, request_code: null, devicerecord_id: null, fault_time: null, device_faultclass_id: null, fault_desc: null, fault_level: null, remark: null, status: null, create_id: null, create_name: null, create_time: null, is_passed: null, process_id: null, process_name: null, process_time: null, finish_id: null, finish_name: null, finish_time: null, is_delete: null, sysdeptid: null, syscompanyid: null }
|
||||
const defaultForm = { product_person_name: null, device_faultclass_name: null, device_code: null, request_id: null, request_code: null, devicerecord_id: null, fault_time: null, device_faultclass_id: null, fault_desc: null, fault_level: null, remark: null, status: null, create_id: null, create_name: null, create_time: null, is_passed: null, process_id: null, process_name: null, process_time: null, finish_id: null, finish_name: null, finish_time: null, is_delete: null, sysdeptid: null, syscompanyid: null }
|
||||
export default {
|
||||
name: 'Devicevprs',
|
||||
dicts: ['EM_FAULT_LEVEL'],
|
||||
@@ -197,7 +215,7 @@ export default {
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '设备报修',
|
||||
url: 'api/devicerepairrequest',
|
||||
url: 'api/devicerepairrequest/query2',
|
||||
idField: 'request_id',
|
||||
sort: 'request_id,desc',
|
||||
crudMethod: { ...crudDevicerepairrequest },
|
||||
@@ -216,6 +234,7 @@ export default {
|
||||
faultDialog: false,
|
||||
classes: [],
|
||||
class_idStr: null,
|
||||
depts: [],
|
||||
materOpt_code: '23',
|
||||
statusList: [
|
||||
{ 'label': '生成', 'value': '01' },
|
||||
@@ -234,6 +253,9 @@ export default {
|
||||
],
|
||||
fault_level: [
|
||||
{ required: true, message: '故障等级不能为空', trigger: 'blur' }
|
||||
],
|
||||
product_person_name: [
|
||||
{ required: true, message: '班组配合人不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -248,6 +270,7 @@ export default {
|
||||
this.crud.toQuery()
|
||||
this.queryClassId()
|
||||
})
|
||||
this.getDepts()
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
@@ -350,6 +373,32 @@ export default {
|
||||
tableChanged(row) {
|
||||
this.form.device_faultclass_id = row.device_faultclass_id
|
||||
this.form.device_faultclass_name = row.device_faultclass_name
|
||||
},
|
||||
// 获取弹窗内部门数据
|
||||
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
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="createExcel"
|
||||
>
|
||||
生成设备保养
|
||||
生成保养单
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
|
||||
Reference in New Issue
Block a user