rev:设备维修、报修管理修改
This commit is contained in:
@@ -374,6 +374,9 @@ public class DevicerepairmstServiceImpl implements DevicerepairmstService {
|
|||||||
JSONObject jsonReMst = reMstTab.query("repair_id = '" + whereJson.getString("repair_id") + "'").uniqueResult(0);
|
JSONObject jsonReMst = reMstTab.query("repair_id = '" + whereJson.getString("repair_id") + "'").uniqueResult(0);
|
||||||
jsonReMst.put("invstatus", "06");
|
jsonReMst.put("invstatus", "06");
|
||||||
jsonReMst.put("real_end_date", DateUtil.now());
|
jsonReMst.put("real_end_date", DateUtil.now());
|
||||||
|
jsonReMst.put("confirm_optid", currentUserId);
|
||||||
|
jsonReMst.put("confirm_optname", nickName);
|
||||||
|
jsonReMst.put("confirm_time", DateUtil.now());
|
||||||
reMstTab.update(jsonReMst);
|
reMstTab.update(jsonReMst);
|
||||||
// 3.更新设备档案表
|
// 3.更新设备档案表
|
||||||
JSONObject jsonFile = fileTab.query("devicerecord_id = '" + jsonReMst.getString("devicerecord_id") + "' and is_delete = '0'").uniqueResult(0);
|
JSONObject jsonFile = fileTab.query("devicerecord_id = '" + jsonReMst.getString("devicerecord_id") + "' and is_delete = '0'").uniqueResult(0);
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
||||||
LEFT JOIN EM_BI_DeviceFaultClass class2 ON mst.device_faultclass_id = class2.device_faultclass_id
|
LEFT JOIN EM_BI_DeviceFaultClass class2 ON mst.device_faultclass_id = class2.device_faultclass_id
|
||||||
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
||||||
LEFT JOIN sys_dept d2 ON file.use_groupid = d2.dept_id
|
LEFT JOIN sys_dept d2 ON file.use_deptid = d2.dept_id
|
||||||
WHERE
|
WHERE
|
||||||
mst.is_delete = '0'
|
mst.is_delete = '0'
|
||||||
AND file.is_delete = '0'
|
AND file.is_delete = '0'
|
||||||
@@ -183,7 +183,7 @@
|
|||||||
AND mst.invstatus = '06'
|
AND mst.invstatus = '06'
|
||||||
|
|
||||||
OPTION 输入.deptIds <> ""
|
OPTION 输入.deptIds <> ""
|
||||||
file.use_groupid in 输入.deptIds
|
file.use_deptid in 输入.deptIds
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
||||||
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
||||||
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
||||||
LEFT JOIN sys_dept d2 ON file.use_groupid = d2.dept_id
|
LEFT JOIN sys_dept d2 ON file.use_deptid = d2.dept_id
|
||||||
WHERE
|
WHERE
|
||||||
mst.is_delete = '0'
|
mst.is_delete = '0'
|
||||||
AND file.is_delete = '0'
|
AND file.is_delete = '0'
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
WHERE
|
WHERE
|
||||||
mst.is_delete = '0'
|
mst.is_delete = '0'
|
||||||
AND file.is_delete = '0'
|
AND file.is_delete = '0'
|
||||||
AND mst.invstatus in (07,99)
|
AND mst.invstatus in (06,99)
|
||||||
|
|
||||||
OPTION 输入.device_code <> ""
|
OPTION 输入.device_code <> ""
|
||||||
(file.device_code like 输入.device_code or
|
(file.device_code like 输入.device_code or
|
||||||
@@ -280,7 +280,7 @@
|
|||||||
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
||||||
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
||||||
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
||||||
LEFT JOIN sys_dept d2 ON file.use_groupid = d2.dept_id
|
LEFT JOIN sys_dept d2 ON file.use_deptid = d2.dept_id
|
||||||
LEFT JOIN EM_BI_DeviceRepairRecord r ON r.repair_id = mst.repair_id
|
LEFT JOIN EM_BI_DeviceRepairRecord r ON r.repair_id = mst.repair_id
|
||||||
LEFT JOIN EM_BI_DeviceRepairRequest RepairRequest ON RepairRequest.request_id = mst.source_bill_id
|
LEFT JOIN EM_BI_DeviceRepairRequest RepairRequest ON RepairRequest.request_id = mst.source_bill_id
|
||||||
WHERE
|
WHERE
|
||||||
@@ -336,7 +336,7 @@
|
|||||||
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
||||||
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
||||||
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
||||||
LEFT JOIN sys_dept d2 ON file.use_groupid = d2.dept_id
|
LEFT JOIN sys_dept d2 ON file.use_deptid = d2.dept_id
|
||||||
WHERE
|
WHERE
|
||||||
mst.is_delete = '0'
|
mst.is_delete = '0'
|
||||||
AND file.is_delete = '0'
|
AND file.is_delete = '0'
|
||||||
@@ -391,7 +391,7 @@
|
|||||||
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
||||||
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
||||||
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
||||||
LEFT JOIN sys_dept d2 ON file.use_groupid = d2.dept_id
|
LEFT JOIN sys_dept d2 ON file.use_deptid = d2.dept_id
|
||||||
WHERE
|
WHERE
|
||||||
mst.is_delete = '0'
|
mst.is_delete = '0'
|
||||||
AND file.is_delete = '0'
|
AND file.is_delete = '0'
|
||||||
|
|||||||
@@ -1,450 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!--工具栏-->
|
|
||||||
<div class="head-container">
|
|
||||||
<div v-if="crud.props.searchToggle">
|
|
||||||
<!-- 搜索 -->
|
|
||||||
<el-form
|
|
||||||
:inline="true"
|
|
||||||
class="demo-form-inline"
|
|
||||||
label-position="right"
|
|
||||||
label-width="110px"
|
|
||||||
label-suffix=":"
|
|
||||||
>
|
|
||||||
<el-form-item label="设备类别">
|
|
||||||
<treeselect
|
|
||||||
v-model="query.material_type_id"
|
|
||||||
:load-options="loadClass"
|
|
||||||
:options="classes"
|
|
||||||
style="width: 200px;"
|
|
||||||
placeholder="请选择"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="设备">
|
|
||||||
<el-input
|
|
||||||
v-model="query.device_code"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请输入设备编码、名称"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="单据号">
|
|
||||||
<el-input
|
|
||||||
v-model="query.repair_code"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请输入编码、名称"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="维修类型">
|
|
||||||
<el-select
|
|
||||||
v-model="query.maintenancecycle"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请选择"
|
|
||||||
class="filter-item"
|
|
||||||
@change="hand"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.EM_DEVICE_WX_INVTYPE"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计划维修日期">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="query.createTime"
|
|
||||||
type="daterange"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
@change="hand"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="单据状态">
|
|
||||||
<el-select
|
|
||||||
v-model="query.invstatus"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请选择"
|
|
||||||
class="filter-item"
|
|
||||||
@change="hand"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.EM_DEVICE_WX_INVSTATUS"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<rrOperation />
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
|
||||||
<crudOperation :permission="permission">
|
|
||||||
<el-button
|
|
||||||
slot="right"
|
|
||||||
class="filter-item"
|
|
||||||
type="success"
|
|
||||||
icon="el-icon-position"
|
|
||||||
size="mini"
|
|
||||||
@click="confirmRepair"
|
|
||||||
>
|
|
||||||
验收通过
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
slot="right"
|
|
||||||
class="filter-item"
|
|
||||||
type="warning"
|
|
||||||
icon="el-icon-position"
|
|
||||||
size="mini"
|
|
||||||
@click="confirmRepair2"
|
|
||||||
>
|
|
||||||
验收不通过
|
|
||||||
</el-button>
|
|
||||||
</crudOperation>
|
|
||||||
<!--表格渲染-->
|
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
|
||||||
<el-table-column fixed="left" type="selection" min-width="35" />
|
|
||||||
<el-table-column fixed="left" prop="repair_code" label="维修单号" min-width="120">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.repair_code }}</el-link>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column fixed="left" prop="device_code" label="设备编码" min-width="85" />
|
|
||||||
<el-table-column fixed="left" prop="device_name" label="设备名称" min-width="150" />
|
|
||||||
<el-table-column fixed="left" prop="extend_code" label="设备自编码" min-width="100" />
|
|
||||||
<el-table-column fixed="left" prop="dept_name" label="归属部门" min-width="130" />
|
|
||||||
<el-table-column fixed="left" prop="use_name" label="使用班组" min-width="130" />
|
|
||||||
<el-table-column fixed="left" prop="invstatus" label="单据状态" :formatter="formatStatusName" min-width="70" />
|
|
||||||
<el-table-column fixed="left" prop="maintenancecycle" label="单据类型" :formatter="formatTypeName" min-width="70" />
|
|
||||||
<el-table-column fixed="left" prop="fault_level" label="故障等级" :formatter="formatLevelName" min-width="70" />
|
|
||||||
<el-table-column fixed="left" prop="plan_start_date" label="计划维修日期" min-width="95" />
|
|
||||||
<el-table-column prop="fault_desc" label="故障描述" min-width="200" />
|
|
||||||
<el-table-column prop="remark" label="备注" min-width="200" />
|
|
||||||
<el-table-column prop="input_optname" label="制单人" min-width="90" />
|
|
||||||
<el-table-column prop="input_time" label="制单时间" min-width="140" />
|
|
||||||
<el-table-column prop="update_optname" label="维修人" min-width="150" />
|
|
||||||
<el-table-column prop="real_start_date" label="开始时间" min-width="140" />
|
|
||||||
<el-table-column prop="real_end_date" label="结束时间" min-width="140" />
|
|
||||||
<el-table-column prop="confirm_optname" label="验收人" min-width="150" />
|
|
||||||
<el-table-column prop="confirm_time" label="验收时间" min-width="140" />
|
|
||||||
<el-table-column prop="audit_optname" label="审核人" min-width="90" />
|
|
||||||
<el-table-column prop="audit_time" label="审核时间" min-width="140" />
|
|
||||||
<el-table-column prop="source_bill_code" label="源单号" min-width="120px" />
|
|
||||||
<el-table-column prop="source_bill_type" label="源单业务类型" min-width="90" />
|
|
||||||
</el-table>
|
|
||||||
<!--分页组件-->
|
|
||||||
<pagination />
|
|
||||||
</div>
|
|
||||||
<AddDialog />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import crudDevicerepairmst from '@/views/wms/device_manage/repair/devicerepair/devicerepairmst'
|
|
||||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
|
||||||
import rrOperation from '@crud/RR.operation'
|
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
|
||||||
import udOperation from '@crud/UD.operation'
|
|
||||||
import pagination from '@crud/Pagination'
|
|
||||||
import DateRangePicker from '@/components/DateRangePicker'
|
|
||||||
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 AddDialog from '@/views/wms/device_manage/repair/devicerepair/AddDialog'
|
|
||||||
// import { getDepts, getDeptSuperior } from '@/api/system/dept'
|
|
||||||
import { mapGetters } from 'vuex'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Devicegridcheck',
|
|
||||||
dicts: ['EM_DEVICE_WX_INVTYPE', 'EM_DEVICE_WX_INVSTATUS', 'EM_FAULT_LEVEL'],
|
|
||||||
components: { AddDialog, pagination, crudOperation, rrOperation, udOperation, DateRangePicker, Treeselect },
|
|
||||||
mixins: [presenter(), header(), crud()],
|
|
||||||
cruds() {
|
|
||||||
return CRUD({
|
|
||||||
title: '维修单维护班组验收',
|
|
||||||
url: 'api/devicerepairmst/query5',
|
|
||||||
idField: 'repair_id',
|
|
||||||
sort: 'repair_id,desc',
|
|
||||||
crudMethod: { ...crudDevicerepairmst },
|
|
||||||
optShow: {
|
|
||||||
add: false,
|
|
||||||
edit: false,
|
|
||||||
del: false,
|
|
||||||
download: false,
|
|
||||||
reset: true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
classes: [],
|
|
||||||
depts: [],
|
|
||||||
class_idStr: null,
|
|
||||||
materOpt_code: '23',
|
|
||||||
permission: {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters({
|
|
||||||
user: 'user'
|
|
||||||
})
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
debugger
|
|
||||||
const param = {
|
|
||||||
'materOpt_code': this.materOpt_code
|
|
||||||
}
|
|
||||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
|
||||||
this.class_idStr = res.class_idStr
|
|
||||||
this.crud.query.class_idStr = this.class_idStr
|
|
||||||
this.queryClassId()
|
|
||||||
})
|
|
||||||
this.getDepts()
|
|
||||||
this.query.dept_id = this.user.dept.id
|
|
||||||
this.getSupDepts(this.user.dept.id)
|
|
||||||
this.crud.toQuery()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
|
||||||
return true
|
|
||||||
},
|
|
||||||
hand(value) {
|
|
||||||
this.crud.toQuery()
|
|
||||||
},
|
|
||||||
loadClass({ action, parentNode, callback }) {
|
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
|
||||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
|
||||||
parentNode.children = res.content.map(function(obj) {
|
|
||||||
if (obj.hasChildren) {
|
|
||||||
obj.children = null
|
|
||||||
}
|
|
||||||
return obj
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
callback()
|
|
||||||
}, 100)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
queryClassId() {
|
|
||||||
const param = {
|
|
||||||
'class_idStr': this.class_idStr
|
|
||||||
}
|
|
||||||
crudClassstandard.queryClassById(param).then(res => {
|
|
||||||
this.classes = res.content.map(obj => {
|
|
||||||
if (obj.hasChildren) {
|
|
||||||
obj.children = null
|
|
||||||
}
|
|
||||||
return obj
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
formatStatusName(row, cloum) {
|
|
||||||
return this.dict.label.EM_DEVICE_WX_INVSTATUS[row.invstatus]
|
|
||||||
},
|
|
||||||
formatTypeName(row, cloum) {
|
|
||||||
return this.dict.label.EM_DEVICE_WX_INVTYPE[row.maintenancecycle]
|
|
||||||
},
|
|
||||||
formatLevelName(row, cloum) {
|
|
||||||
return this.dict.label.EM_FAULT_LEVEL[row.fault_level]
|
|
||||||
},
|
|
||||||
confirmRepair() {
|
|
||||||
const _selectData = this.$refs.table.selection
|
|
||||||
if (_selectData.length === 0) {
|
|
||||||
return this.crud.notify('请选择需要确认的记录!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
}
|
|
||||||
for (let i = 0; i < _selectData.length; i++) {
|
|
||||||
const now = _selectData[i]
|
|
||||||
if (now.invstatus !== '06') {
|
|
||||||
return this.crud.notify('只能对结束状态的单据确认:' + now.repair_code, CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
crudDevicerepairmst.confirmRepair({ invstatus: '07', rows: _selectData }).then(res => {
|
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
this.crud.toQuery()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
confirmRepair2() {
|
|
||||||
const _selectData = this.$refs.table.selection
|
|
||||||
if (_selectData.length === 0) {
|
|
||||||
return this.crud.notify('请选择需要操作的记录!', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
}
|
|
||||||
for (let i = 0; i < _selectData.length; i++) {
|
|
||||||
const now = _selectData[i]
|
|
||||||
if (now.invstatus !== '06') {
|
|
||||||
return this.crud.notify('只能对结束状态的单据操作:' + now.repair_code, CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
crudDevicerepairmst.confirmRepair({ invstatus: '03', rows: _selectData }).then(res => {
|
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
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
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getSupDepts(deptId) {
|
|
||||||
debugger
|
|
||||||
var number = parseFloat(deptId)
|
|
||||||
getDeptSuperior(number).then(res => {
|
|
||||||
const date = res.content
|
|
||||||
this.buildDepts(date)
|
|
||||||
this.depts = date
|
|
||||||
})
|
|
||||||
},
|
|
||||||
buildDepts(depts) {
|
|
||||||
depts.forEach(data => {
|
|
||||||
if (data.children) {
|
|
||||||
this.buildDepts(data.children)
|
|
||||||
}
|
|
||||||
if (data.hasChildren && !data.children) {
|
|
||||||
data.children = null
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
::v-deep {
|
|
||||||
|
|
||||||
.vue-treeselect__menu {
|
|
||||||
|
|
||||||
overflow-x: auto !important;
|
|
||||||
|
|
||||||
width: 300px;
|
|
||||||
|
|
||||||
max-height: 300px !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__label {
|
|
||||||
|
|
||||||
overflow: unset;
|
|
||||||
|
|
||||||
text-overflow: unset;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__control {
|
|
||||||
|
|
||||||
height: 20px !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__multi-value-item-container,
|
|
||||||
|
|
||||||
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
|
||||||
|
|
||||||
height: 30px;
|
|
||||||
|
|
||||||
line-height: 24px;
|
|
||||||
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__limit-tip,
|
|
||||||
|
|
||||||
.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value
|
|
||||||
|
|
||||||
.vue-treeselect__input-container {
|
|
||||||
|
|
||||||
padding-top: 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
|
||||||
|
|
||||||
// margin-bottom: 15px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__placeholder,
|
|
||||||
|
|
||||||
.vue-treeselect__single-value {
|
|
||||||
|
|
||||||
height: 28px;
|
|
||||||
|
|
||||||
line-height: 32px;
|
|
||||||
|
|
||||||
font-size: small;
|
|
||||||
|
|
||||||
color: "#CCCFD6";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect--has-value .vue-treeselect__input {
|
|
||||||
|
|
||||||
height: 18px !important;
|
|
||||||
|
|
||||||
line-height: 18px !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect div,
|
|
||||||
|
|
||||||
.vue-treeselect span {
|
|
||||||
|
|
||||||
box-sizing: content-box;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// 选中后的溢出隐藏
|
|
||||||
|
|
||||||
.vue-treeselect__multi-value-label {
|
|
||||||
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
width: 140px;
|
|
||||||
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__value-container {
|
|
||||||
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
height: 32px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -92,34 +92,34 @@
|
|||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
<el-table-column fixed="left" type="selection" min-width="35" />
|
<el-table-column type="selection" min-width="35" />
|
||||||
<el-table-column fixed="left" prop="repair_code" label="维修单号" min-width="120px" >
|
<el-table-column prop="repair_code" label="维修单号" min-width="140px" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.repair_code }}</el-link>
|
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.repair_code }}</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed="left" prop="device_code" label="设备编码" min-width="85" />
|
<el-table-column prop="device_code" label="设备编码" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="device_name" label="设备名称" min-width="150" />
|
<el-table-column prop="device_name" label="设备名称" min-width="150" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="extend_code" label="设备自编码" min-width="100" />
|
<el-table-column prop="extend_code" label="设备自编码" min-width="100" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="dept_name" label="归属部门" min-width="130" />
|
<el-table-column prop="dept_name" label="归属部门" min-width="130" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="use_name" label="使用班组" min-width="130" />
|
<el-table-column prop="use_name" label="使用部门" min-width="130" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="invstatus" label="单据状态" :formatter="formatStatusName" min-width="70" />
|
<el-table-column prop="invstatus" label="单据状态" :formatter="formatStatusName" min-width="90" />
|
||||||
<el-table-column fixed="left" prop="maintenancecycle" label="单据类型" :formatter="formatTypeName" min-width="70" />
|
<el-table-column prop="maintenancecycle" label="单据类型" :formatter="formatTypeName" min-width="90" />
|
||||||
<el-table-column fixed="left" prop="fault_level" label="故障等级" :formatter="formatLevelName" min-width="70" />
|
<el-table-column prop="fault_level" label="故障等级" :formatter="formatLevelName" min-width="90" />
|
||||||
<el-table-column fixed="left" prop="plan_start_date" label="计划维修日期" min-width="95" />
|
<el-table-column prop="plan_start_date" label="计划维修日期" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column prop="fault_desc" label="故障描述" min-width="200" />
|
<el-table-column prop="fault_desc" label="故障描述" min-width="200" show-overflow-tooltip />
|
||||||
<el-table-column prop="remark" label="备注" min-width="200" />
|
<el-table-column prop="remark" label="备注" min-width="200" show-overflow-tooltip />
|
||||||
<el-table-column prop="input_optname" label="制单人" min-width="120px" />
|
<el-table-column prop="input_optname" label="制单人" min-width="120px" />
|
||||||
<el-table-column prop="input_time" label="制单时间" min-width="140" />
|
<el-table-column prop="input_time" label="制单时间" min-width="140" />
|
||||||
<el-table-column prop="update_optname" label="维修人" min-width="120px" />
|
<el-table-column prop="update_optname" label="维修人" min-width="120px" />
|
||||||
<el-table-column prop="real_start_date" label="开始时间" min-width="140" />
|
<el-table-column prop="real_start_date" label="开始时间" min-width="140" />
|
||||||
<el-table-column prop="real_end_date" label="结束时间" min-width="140" />
|
<el-table-column prop="real_end_date" label="结束时间" min-width="140" />
|
||||||
<el-table-column prop="confirm_optname" label="确认人" min-width="120px" />
|
<el-table-column prop="confirm_optname" label="确认人" min-width="120px" />
|
||||||
<el-table-column prop="confirm_time" label="确认时间" min-width="140" />
|
<el-table-column prop="confirm_time" label="确认时间" min-width="140" />
|
||||||
<el-table-column prop="audit_optname" label="审核人" min-width="120px" />
|
<el-table-column prop="audit_optname" label="审核人" min-width="120px" />
|
||||||
<el-table-column prop="audit_time" label="审核时间" min-width="140" />
|
<el-table-column prop="audit_time" label="审核时间" min-width="140" />
|
||||||
<el-table-column prop="source_bill_code" label="源单号" min-width="120px" />
|
<el-table-column prop="source_bill_code" label="源单号" min-width="120px" />
|
||||||
<el-table-column prop="source_bill_type" label="源单业务类型" min-width="90" />
|
<el-table-column prop="source_bill_type" label="源单业务类型" min-width="120" />
|
||||||
<el-table-column v-permission="[]" label="操作" min-width="125" align="center" fixed="right">
|
<el-table-column v-permission="[]" label="操作" min-width="125" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
>
|
>
|
||||||
开始维修
|
开始维修
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<!--<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="success"
|
type="success"
|
||||||
@@ -106,8 +106,8 @@
|
|||||||
@click="outRepair"
|
@click="outRepair"
|
||||||
>
|
>
|
||||||
委外维修
|
委外维修
|
||||||
</el-button>
|
</el-button>-->
|
||||||
<el-button
|
<!--<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="success"
|
type="success"
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
@click="openReceive"
|
@click="openReceive"
|
||||||
>
|
>
|
||||||
维修领用
|
维修领用
|
||||||
</el-button>
|
</el-button>-->
|
||||||
<el-button
|
<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@@ -132,32 +132,30 @@
|
|||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" v-loading="crud.loading" :row-style="tableRowClassName" :data="crud.data" size="mini" style="width: 100%;" @selection-change="mySelectionChange">
|
<el-table ref="table" v-loading="crud.loading" :row-style="tableRowClassName" :data="crud.data" size="mini" style="width: 100%;" @selection-change="mySelectionChange">
|
||||||
<el-table-column fixed="left" type="selection" min-width="35" />
|
<el-table-column type="selection" min-width="35" />
|
||||||
<el-table-column fixed="left" prop="repair_code" label="维修单号" min-width="105" />
|
<el-table-column prop="repair_code" label="维修单号" min-width="140" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="device_code" label="设备编码" min-width="85" />
|
<el-table-column prop="device_code" label="设备编码" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="device_name" label="设备名称" min-width="150" />
|
<el-table-column prop="device_name" label="设备名称" min-width="150" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="dept_name" label="所属部门" min-width="130" />
|
<el-table-column prop="dept_name" label="所属部门" min-width="130" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="use_name" label="使用班组" min-width="130" />
|
<el-table-column prop="use_name" label="使用部门" min-width="130" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="extend_code" label="设备自编码" min-width="100" />
|
<el-table-column prop="extend_code" label="设备自编码" min-width="100" />
|
||||||
<el-table-column fixed="left" prop="invstatus" label="单据状态" :formatter="formatStatusName" min-width="70" />
|
<el-table-column prop="invstatus" label="单据状态" :formatter="formatStatusName" min-width="90" />
|
||||||
<el-table-column fixed="left" prop="maintenancecycle" label="单据类型" :formatter="formatTypeName" min-width="70" />
|
<el-table-column prop="maintenancecycle" label="单据类型" :formatter="formatTypeName" min-width="90" />
|
||||||
<el-table-column fixed="left" prop="fault_level" label="故障等级" :formatter="formatLevelName" min-width="70" />
|
<el-table-column prop="fault_level" label="故障等级" :formatter="formatLevelName" min-width="90" />
|
||||||
<el-table-column fixed="left" prop="plan_start_date" label="计划维修日期" width="95" />
|
<el-table-column prop="plan_start_date" label="计划维修日期" width="120" show-overflow-tooltip />
|
||||||
<el-table-column prop="fault_desc" label="故障描述" min-width="150" />
|
<el-table-column prop="fault_desc" label="故障描述" min-width="150" show-overflow-tooltip />
|
||||||
<el-table-column prop="request_name" label="报修人" min-width="90" />
|
<el-table-column prop="request_name" label="报修人" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column prop="estimaterepair_times" label="预计修复时间H" min-width="130" />
|
<el-table-column prop="estimaterepair_times" label="预计修复时间H" min-width="130" show-overflow-tooltip />
|
||||||
<el-table-column prop="input_optname" label="制单人" min-width="90" />
|
<el-table-column prop="input_optname" label="制单人" min-width="90" show-overflow-tooltip />
|
||||||
<el-table-column prop="input_time" label="制单时间" min-width="140" />
|
<el-table-column prop="input_time" label="制单时间" min-width="140" show-overflow-tooltip />
|
||||||
<el-table-column prop="update_optname" label="维修人" min-width="150" />
|
<el-table-column prop="update_optname" label="维修人" min-width="150" />
|
||||||
<el-table-column prop="real_start_date" label="开始时间" min-width="140" />
|
<el-table-column prop="real_start_date" label="开始时间" min-width="140" />
|
||||||
<el-table-column prop="real_end_date" label="结束时间" min-width="140" />
|
<el-table-column prop="real_end_date" label="结束时间" min-width="140" />
|
||||||
<el-table-column prop="remark" label="备注" min-width="200" />
|
<el-table-column prop="remark" label="备注" min-width="200" />
|
||||||
<el-table-column prop="confirm_optname" label="验收人" min-width="90" />
|
|
||||||
<el-table-column prop="confirm_time" label="验收时间" min-width="140" />
|
|
||||||
<el-table-column prop="audit_optname" label="审核人" min-width="90" />
|
<el-table-column prop="audit_optname" label="审核人" min-width="90" />
|
||||||
<el-table-column prop="audit_time" label="审核时间" min-width="140" />
|
<el-table-column prop="audit_time" label="审核时间" min-width="140" />
|
||||||
<el-table-column prop="source_bill_code" label="源单号" min-width="100" />
|
<el-table-column prop="source_bill_code" label="源单号" min-width="100" show-overflow-tooltip />
|
||||||
<el-table-column prop="source_bill_type" label="源单业务类型" min-width="95" />
|
<el-table-column prop="source_bill_type" label="源单业务类型" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column v-permission="[]" label="操作" min-width="125" align="center" fixed="right">
|
<el-table-column v-permission="[]" label="操作" min-width="125" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
|
|||||||
@@ -116,8 +116,8 @@
|
|||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
<el-table-column fixed="left" type="selection" min-width="35" />
|
<el-table-column type="selection" min-width="35" />
|
||||||
<el-table-column fixed="left" prop="is_active" min-width="70" label="是否启用">
|
<el-table-column fixed="left" prop="is_active" min-width="90" label="是否启用">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
:value="format_is_active(scope.row.is_active)"
|
:value="format_is_active(scope.row.is_active)"
|
||||||
@@ -127,23 +127,23 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed="left" prop="repair_plan_code" label="计划单号" min-width="120" />
|
<el-table-column prop="repair_plan_code" label="计划单号" min-width="140" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="repair_plan_name" label="计划名称" min-width="150px" />
|
<el-table-column prop="repair_plan_name" label="计划名称" min-width="150px" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="class_name" label="设备类型" min-width="130" />
|
<el-table-column prop="class_name" label="设备类型" min-width="130" />
|
||||||
<el-table-column fixed="left" prop="device_code" label="设备编号" min-width="85" />
|
<el-table-column prop="device_code" label="设备编号" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="device_name" label="设备名称" min-width="150" />
|
<el-table-column prop="device_name" label="设备名称" min-width="150" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="extend_code" label="设备自编码" min-width="100" />
|
<el-table-column prop="extend_code" label="设备自编码" min-width="100" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="maintenancecycle" label="维修周期" :formatter="formatMainName" min-width="75" />
|
<el-table-column prop="maintenancecycle" label="维修周期" :formatter="formatMainName" min-width="90" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="repair_type" label="维修类型" :formatter="formatRepairpType" min-width="75" />
|
<el-table-column prop="repair_type" label="维修类型" :formatter="formatRepairpType" min-width="90" />
|
||||||
<el-table-column prop="plan_start_date" label="计划初始日期" min-width="100" />
|
<el-table-column prop="plan_start_date" label="计划初始日期" min-width="120" />
|
||||||
<el-table-column prop="real_start_date" label="最近维修开始日期" min-width="125" />
|
<el-table-column prop="real_start_date" label="最近维修开始日期" min-width="125" />
|
||||||
<el-table-column prop="real_end_date" label="最近维修结束日期" min-width="125" />
|
<el-table-column prop="real_end_date" label="最近维修结束日期" min-width="125" />
|
||||||
<el-table-column prop="next_end_date" label="下次维修日期" min-width="100" />
|
<el-table-column prop="next_end_date" label="下次维修日期" min-width="120" />
|
||||||
<el-table-column prop="create_name" label="创建人" min-width="90" />
|
<el-table-column prop="create_name" label="创建人" min-width="90" />
|
||||||
<el-table-column prop="create_time" label="创建时间" min-width="140" />
|
<el-table-column prop="create_time" label="创建时间" min-width="140" />
|
||||||
<el-table-column prop="confirm_optname" label="审核人" min-width="90" />
|
<el-table-column prop="confirm_optname" label="审核人" min-width="90" />
|
||||||
<el-table-column prop="confirm_time" label="审核时间" min-width="140" />
|
<el-table-column prop="confirm_time" label="审核时间" min-width="140" />
|
||||||
<el-table-column prop="remark" label="备注" min-width="200" />
|
<el-table-column prop="remark" label="备注" min-width="200" />
|
||||||
<el-table-column v-permission="[]" label="操作" min-width="125" align="center" fixed="right">
|
<el-table-column v-permission="[]" label="操作" min-width="125" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
|
|||||||
@@ -1,177 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
title="报修单图片"
|
|
||||||
append-to-body
|
|
||||||
:visible.sync="dialogVisible"
|
|
||||||
destroy-on-close
|
|
||||||
:show-close="true"
|
|
||||||
fullscreen
|
|
||||||
@close="close"
|
|
||||||
@open="open"
|
|
||||||
>
|
|
||||||
<div class="head-container">
|
|
||||||
<div v-if="crud.props.searchToggle">
|
|
||||||
<!-- 搜索 -->
|
|
||||||
<el-input v-model.trim="query.request_code" disabled clearable size="mini" placeholder="报修单单号" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
|
||||||
<!-- <el-date-picker
|
|
||||||
v-model="query.createTime"
|
|
||||||
type="daterange"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
:default-time="['00:00:00', '23:59:59']"
|
|
||||||
@change="crud.toQuery"
|
|
||||||
/>-->
|
|
||||||
<!-- <rrOperation />-->
|
|
||||||
</div>
|
|
||||||
<crudOperation :permission="permission" />
|
|
||||||
</div>
|
|
||||||
<!--表格渲染-->
|
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
|
||||||
<el-table-column type="selection" width="55" />
|
|
||||||
<el-table-column prop="name" label="文件名(点击查看照片)" width="280">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-popover
|
|
||||||
:content="'file/' + scope.row.type + '/' + scope.row.real_name"
|
|
||||||
placement="top-start"
|
|
||||||
title="路径"
|
|
||||||
width="200"
|
|
||||||
trigger="hover"
|
|
||||||
>
|
|
||||||
<a
|
|
||||||
slot="reference"
|
|
||||||
:href="baseApi + '/file/' + scope.row.type + '/' + scope.row.real_name"
|
|
||||||
class="el-link--primary"
|
|
||||||
style="word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color: #1890ff;font-size: 13px;"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
{{ scope.row.name }}
|
|
||||||
</a>
|
|
||||||
</el-popover>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="path" label="预览图">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-image
|
|
||||||
:src=" baseApi + '/file/' + scope.row.type + '/' + scope.row.real_name"
|
|
||||||
:preview-src-list="[baseApi + '/file/' + scope.row.type + '/' + scope.row.real_name]"
|
|
||||||
fit="contain"
|
|
||||||
lazy
|
|
||||||
class="el-avatar"
|
|
||||||
>
|
|
||||||
<div slot="error">
|
|
||||||
<i class="el-icon-document" />
|
|
||||||
</div>
|
|
||||||
</el-image>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="suffix" label="文件类型" />
|
|
||||||
<el-table-column prop="type" label="类别" />
|
|
||||||
<el-table-column prop="size" label="大小" />
|
|
||||||
<el-table-column prop="source_bill_code" label="来源单号" />
|
|
||||||
<el-table-column prop="create_name" label="创建人" />
|
|
||||||
<el-table-column prop="create_time" label="创建日期" width="180" />
|
|
||||||
</el-table>
|
|
||||||
<!--分页组件-->
|
|
||||||
<pagination />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex'
|
|
||||||
import crudFile from '@/api/tools/localStorage'
|
|
||||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
|
||||||
import rrOperation from '@crud/RR.operation'
|
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
|
||||||
import pagination from '@crud/Pagination'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: { pagination, crudOperation, rrOperation },
|
|
||||||
cruds() {
|
|
||||||
return CRUD({ title: '文件', idField: 'storage_id', url: 'api/devicerepairrequest/localStorage', crudMethod: { ...crudFile },
|
|
||||||
optShow: {
|
|
||||||
add: false,
|
|
||||||
edit: false,
|
|
||||||
del: true,
|
|
||||||
download: false,
|
|
||||||
reset: true
|
|
||||||
},
|
|
||||||
query: { request_code: '' }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
mixins: [presenter(), header(), crud()],
|
|
||||||
props: {
|
|
||||||
dialogShow: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogVisible: false,
|
|
||||||
loading: false,
|
|
||||||
permission: {
|
|
||||||
edit: ['admin', 'storage:edit'],
|
|
||||||
del: ['admin', 'storage:del']
|
|
||||||
},
|
|
||||||
request_code: ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters([
|
|
||||||
'baseApi',
|
|
||||||
'fileUploadApi'
|
|
||||||
])
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
dialogShow: {
|
|
||||||
handler(newValue, oldValue) {
|
|
||||||
this.dialogVisible = newValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
open() {
|
|
||||||
this.crud.query.request_code = this.request_code
|
|
||||||
this.crud.toQuery()
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 接受父组件传值
|
|
||||||
* @param msg
|
|
||||||
*/
|
|
||||||
setForm(msg) {
|
|
||||||
this.request_code = msg
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
this.crud.resetQuery(false)
|
|
||||||
this.$emit('update:dialogShow', 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>
|
|
||||||
@@ -1,377 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!--工具栏-->
|
|
||||||
<div class="head-container">
|
|
||||||
<div v-if="crud.props.searchToggle">
|
|
||||||
<!-- 搜索 -->
|
|
||||||
<el-form
|
|
||||||
:inline="true"
|
|
||||||
class="demo-form-inline"
|
|
||||||
label-position="right"
|
|
||||||
label-width="110px"
|
|
||||||
label-suffix=":"
|
|
||||||
>
|
|
||||||
<el-form-item label="设备类别">
|
|
||||||
<treeselect
|
|
||||||
v-model="query.material_type_id"
|
|
||||||
:load-options="loadClass"
|
|
||||||
:options="classes"
|
|
||||||
style="width: 200px;"
|
|
||||||
placeholder="请选择"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="设备">
|
|
||||||
<el-input
|
|
||||||
v-model="query.device_code"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请输入设备编码、名称"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="报修单号">
|
|
||||||
<el-input
|
|
||||||
v-model="query.request_code"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请输入编码、名称"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="报修日期">
|
|
||||||
<date-range-picker v-model="query.createTime" class="date-item" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态">
|
|
||||||
<el-select
|
|
||||||
v-model="query.status"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请选择"
|
|
||||||
class="filter-item"
|
|
||||||
@change="hand"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in statusList"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<rrOperation />
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
|
||||||
<crudOperation :permission="permission">
|
|
||||||
<el-button
|
|
||||||
slot="right"
|
|
||||||
class="filter-item"
|
|
||||||
type="success"
|
|
||||||
icon="el-icon-position"
|
|
||||||
size="mini"
|
|
||||||
@click="repair"
|
|
||||||
>
|
|
||||||
维修
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
slot="right"
|
|
||||||
class="filter-item"
|
|
||||||
type="success"
|
|
||||||
icon="el-icon-position"
|
|
||||||
size="mini"
|
|
||||||
@click="notRepair"
|
|
||||||
>
|
|
||||||
不维修
|
|
||||||
</el-button>
|
|
||||||
</crudOperation>
|
|
||||||
<!--表格渲染-->
|
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
|
||||||
<el-table-column fixed="left" type="selection" min-width="35" />
|
|
||||||
<el-table-column fixed="left" prop="request_code" min-width="120px" label="报修单号" />
|
|
||||||
<el-table-column fixed="left" prop="path" label="故障图片" min-width="70">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button type="primary" icon="el-icon-folder-opened" circle @click="Picconfirm(scope.$index, scope.row)" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column fixed="left" prop="device_code" label="设备编码" min-width="85" />
|
|
||||||
<el-table-column fixed="left" prop="device_name" label="设备名称" min-width="150" />
|
|
||||||
<el-table-column fixed="left" prop="extend_code" label="设备自编码" min-width="100" />
|
|
||||||
<el-table-column fixed="left" prop="device_faultclass_name" label="故障分类" min-width="145" />
|
|
||||||
<el-table-column fixed="left" prop="fault_level" label="故障等级" :formatter="formaLevelName" min-width="70" />
|
|
||||||
<el-table-column fixed="left" prop="status" label="状态" :formatter="formatStatusName" min-width="70" />
|
|
||||||
<el-table-column fixed="left" prop="is_passed" label="是否通过" :formatter="formatPassedName" min-width="70" />
|
|
||||||
<el-table-column prop="fault_desc" label="故障描述" min-width="150" />
|
|
||||||
<el-table-column prop="remark" label="备注" min-width="200" />
|
|
||||||
<el-table-column prop="fault_time" label="故障时间" min-width="140" />
|
|
||||||
<el-table-column prop="create_name" label="创建人" min-width="90" />
|
|
||||||
<el-table-column prop="create_time" label="创建时间" min-width="140" />
|
|
||||||
<el-table-column prop="process_name" label="处理人" min-width="90" />
|
|
||||||
<el-table-column prop="process_time" label="处理时间" min-width="140" />
|
|
||||||
</el-table>
|
|
||||||
<!--分页组件-->
|
|
||||||
<pagination />
|
|
||||||
</div>
|
|
||||||
<PicDialog ref="child" :dialog-show.sync="PicDialog" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import crudDevicerepairrequest from '@/views/wms/device_manage/repair/devicevprs/devicerepairrequest'
|
|
||||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
|
||||||
import rrOperation from '@crud/RR.operation'
|
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
|
||||||
import udOperation from '@crud/UD.operation'
|
|
||||||
import pagination from '@crud/Pagination'
|
|
||||||
import DateRangePicker from '@/components/DateRangePicker'
|
|
||||||
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 PicDialog from '@/views/wms/device_manage/repair/devicerepairrequest/PicDialog'
|
|
||||||
|
|
||||||
const defaultForm = { 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: 'Devicerepairrequest',
|
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, Treeselect, PicDialog },
|
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
|
||||||
dicts: ['EM_FAULT_LEVEL'],
|
|
||||||
cruds() {
|
|
||||||
return CRUD({
|
|
||||||
title: '设备报修处理',
|
|
||||||
url: 'api/devicerepairrequest',
|
|
||||||
idField: 'request_id',
|
|
||||||
sort: 'request_id,desc',
|
|
||||||
crudMethod: { ...crudDevicerepairrequest },
|
|
||||||
optShow: {
|
|
||||||
add: false,
|
|
||||||
edit: false,
|
|
||||||
del: false,
|
|
||||||
download: false,
|
|
||||||
reset: true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
classes: [],
|
|
||||||
checkrows: [],
|
|
||||||
class_idStr: null,
|
|
||||||
materOpt_code: '23',
|
|
||||||
statusList: [
|
|
||||||
{ 'label': '生成', 'value': '01' },
|
|
||||||
{ 'label': '维修中', 'value': '02' },
|
|
||||||
{ 'label': '完毕', 'value': '03' }
|
|
||||||
],
|
|
||||||
PicDialog: false,
|
|
||||||
permission: {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
const param = {
|
|
||||||
'materOpt_code': this.materOpt_code
|
|
||||||
}
|
|
||||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
|
||||||
this.class_idStr = res.class_idStr
|
|
||||||
this.crud.query.class_idStr = this.class_idStr
|
|
||||||
this.crud.toQuery()
|
|
||||||
this.queryClassId()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
|
||||||
return true
|
|
||||||
},
|
|
||||||
hand(value) {
|
|
||||||
this.crud.toQuery()
|
|
||||||
},
|
|
||||||
loadClass({ action, parentNode, callback }) {
|
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
|
||||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
|
||||||
parentNode.children = res.content.map(function(obj) {
|
|
||||||
if (obj.hasChildren) {
|
|
||||||
obj.children = null
|
|
||||||
}
|
|
||||||
return obj
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
callback()
|
|
||||||
}, 100)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
queryClassId() {
|
|
||||||
const param = {
|
|
||||||
'class_idStr': this.class_idStr
|
|
||||||
}
|
|
||||||
crudClassstandard.queryClassById(param).then(res => {
|
|
||||||
this.classes = res.content.map(obj => {
|
|
||||||
if (obj.hasChildren) {
|
|
||||||
obj.children = null
|
|
||||||
}
|
|
||||||
return obj
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
formaLevelName(row) {
|
|
||||||
return this.dict.label.EM_FAULT_LEVEL[row.fault_level]
|
|
||||||
},
|
|
||||||
formatStatusName(row, cloum) {
|
|
||||||
if (row.status === '01') {
|
|
||||||
return '生成'
|
|
||||||
} else if (row.status === '02') {
|
|
||||||
return '维修中'
|
|
||||||
} else if (row.status === '99') {
|
|
||||||
return '完毕'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
formatPassedName(row, cloum) {
|
|
||||||
if (row.is_passed === '0') {
|
|
||||||
return '否'
|
|
||||||
} else if (row.is_passed === '1') {
|
|
||||||
return '是'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
repair() {
|
|
||||||
this.checkrows = this.$refs.table.selection
|
|
||||||
if(this.checkrows.length === 0 ){
|
|
||||||
this.crud.notify('请勾选需要操作的记录!')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
crudDevicerepairrequest.repair({ rows: this.checkrows}).then(res => {
|
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
this.crud.toQuery()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
notRepair() {
|
|
||||||
this.checkrows = this.$refs.table.selection
|
|
||||||
if(this.checkrows.length === 0 ){
|
|
||||||
this.crud.notify('请勾选需要操作的记录!')
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
crudDevicerepairrequest.notRepair({ rows: this.checkrows}).then(res => {
|
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
this.crud.toQuery()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
Picconfirm(index, row) {
|
|
||||||
debugger
|
|
||||||
this.$refs.child.setForm(row.request_code)
|
|
||||||
this.PicDialog = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
::v-deep {
|
|
||||||
|
|
||||||
.vue-treeselect__menu {
|
|
||||||
|
|
||||||
overflow-x: auto !important;
|
|
||||||
|
|
||||||
width: 300px;
|
|
||||||
|
|
||||||
max-height: 300px !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__label {
|
|
||||||
|
|
||||||
overflow: unset;
|
|
||||||
|
|
||||||
text-overflow: unset;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__control {
|
|
||||||
|
|
||||||
height: 20px !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__multi-value-item-container,
|
|
||||||
|
|
||||||
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
|
||||||
|
|
||||||
height: 30px;
|
|
||||||
|
|
||||||
line-height: 24px;
|
|
||||||
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__limit-tip,
|
|
||||||
|
|
||||||
.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value
|
|
||||||
|
|
||||||
.vue-treeselect__input-container {
|
|
||||||
|
|
||||||
padding-top: 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
|
||||||
|
|
||||||
// margin-bottom: 15px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__placeholder,
|
|
||||||
|
|
||||||
.vue-treeselect__single-value {
|
|
||||||
|
|
||||||
height: 28px;
|
|
||||||
|
|
||||||
line-height: 32px;
|
|
||||||
|
|
||||||
font-size: small;
|
|
||||||
|
|
||||||
color: "#CCCFD6";
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect--has-value .vue-treeselect__input {
|
|
||||||
|
|
||||||
height: 18px !important;
|
|
||||||
|
|
||||||
line-height: 18px !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect div,
|
|
||||||
|
|
||||||
.vue-treeselect span {
|
|
||||||
|
|
||||||
box-sizing: content-box;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// 选中后的溢出隐藏
|
|
||||||
|
|
||||||
.vue-treeselect__multi-value-label {
|
|
||||||
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
width: 140px;
|
|
||||||
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__value-container {
|
|
||||||
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
height: 32px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
>
|
>
|
||||||
维修结果
|
维修结果
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="success"
|
type="success"
|
||||||
@@ -117,37 +117,37 @@
|
|||||||
@click="createExcel"
|
@click="createExcel"
|
||||||
>
|
>
|
||||||
生成派工单
|
生成派工单
|
||||||
</el-button>
|
</el-button>-->
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
<el-table-column fixed="left" type="selection" min-width="35" />
|
<el-table-column type="selection" min-width="35" />
|
||||||
<el-table-column fixed="left" prop="repair_code" label="维修单号" min-width="120" >
|
<el-table-column prop="repair_code" label="维修单号" min-width="140" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link type="warning" @click="openReceive(scope.row)">{{ scope.row.repair_code }}</el-link>
|
<el-link type="warning" @click="openReceive(scope.row)">{{ scope.row.repair_code }}</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed="left" prop="device_code" label="设备编码" min-width="85" />
|
<el-table-column prop="device_code" label="设备编码" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="device_name" label="设备名称" min-width="170" />
|
<el-table-column prop="device_name" label="设备名称" min-width="170" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="extend_code" label="设备自编码" min-width="100" />
|
<el-table-column prop="extend_code" label="设备自编码" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="invstatus" label="单据状态" :formatter="formatStatusName" min-width="75" />
|
<el-table-column prop="invstatus" label="单据状态" :formatter="formatStatusName" min-width="90" />
|
||||||
<el-table-column fixed="left" prop="maintenancecycle" label="单据类型" :formatter="formatTypeName" min-width="75" />
|
<el-table-column prop="maintenancecycle" label="单据类型" :formatter="formatTypeName" min-width="90" />
|
||||||
<el-table-column fixed="left" prop="fault_level" label="故障等级" :formatter="formatLevelName" min-width="75" />
|
<el-table-column prop="fault_level" label="故障等级" :formatter="formatLevelName" min-width="90" />
|
||||||
<el-table-column fixed="left" prop="plan_start_date" label="计划维修日期" min-width="100" />
|
<el-table-column prop="plan_start_date" label="计划维修日期" min-width="100" show-overflow-tooltip />
|
||||||
<el-table-column prop="fault_desc" label="故障描述" min-width="200" />
|
<el-table-column prop="fault_desc" label="故障描述" min-width="200" show-overflow-tooltip />
|
||||||
<el-table-column prop="input_optname" label="制单人" min-width="90" />
|
<el-table-column prop="input_optname" label="制单人" min-width="90" />
|
||||||
<el-table-column prop="input_time" label="制单时间" min-width="140" />
|
<el-table-column prop="input_time" label="制单时间" min-width="140" show-overflow-tooltip />
|
||||||
<el-table-column prop="update_optname" label="维修人" min-width="150" />
|
<el-table-column prop="update_optname" label="维修人" min-width="150" />
|
||||||
<el-table-column prop="estimaterepair_times" label="修复时间(h)" min-width="100" />
|
<el-table-column prop="estimaterepair_times" label="修复时间(h)" min-width="100" />
|
||||||
<el-table-column prop="real_start_date" label="开始时间" min-width="140" />
|
<el-table-column prop="real_start_date" label="开始时间" min-width="140" />
|
||||||
<el-table-column prop="real_end_date" label="结束时间" min-width="140" />
|
<el-table-column prop="real_end_date" label="结束时间" min-width="140" />
|
||||||
<el-table-column prop="confirm_optname" label="确认人" min-width="90" />
|
<el-table-column prop="confirm_optname" label="确认人" min-width="90" />
|
||||||
<el-table-column prop="confirm_time" label="确认时间" min-width="140" />
|
<el-table-column prop="confirm_time" label="确认时间" min-width="140" />
|
||||||
<el-table-column prop="audit_optname" label="审核人" min-width="90" />
|
<el-table-column prop="audit_optname" label="审核人" min-width="90" />
|
||||||
<el-table-column prop="audit_time" label="审核时间" min-width="140" />
|
<el-table-column prop="audit_time" label="审核时间" min-width="140" />
|
||||||
<el-table-column prop="source_bill_code" label="源单号" min-width="120px" />
|
<el-table-column prop="source_bill_code" label="源单号" min-width="120px" />
|
||||||
<el-table-column prop="source_bill_type" label="源单业务类型" min-width="100" />
|
<el-table-column prop="source_bill_type" label="源单业务类型" min-width="120" />
|
||||||
<el-table-column prop="remark" label="备注" min-width="200" />
|
<el-table-column prop="remark" label="备注" min-width="200" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
@@ -266,8 +266,8 @@ export default {
|
|||||||
uditRepair() {
|
uditRepair() {
|
||||||
const _selectData = this.$refs.table.selection
|
const _selectData = this.$refs.table.selection
|
||||||
const data = _selectData[0]
|
const data = _selectData[0]
|
||||||
if (data.invstatus !== '07') {
|
if (data.invstatus !== '06') {
|
||||||
return this.crud.notify('只能对确认状态的单据审核', CRUD.NOTIFICATION_TYPE.INFO)
|
return this.crud.notify('只能对结束状态的单据审核', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
}
|
}
|
||||||
crudDevicerepairmst.uditRepair(data).then(res => {
|
crudDevicerepairmst.uditRepair(data).then(res => {
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
|||||||
@@ -1,111 +0,0 @@
|
|||||||
<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.trim="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 '@/views/wms/device_manage/repair/devicerepair/devicerepairmst'
|
|
||||||
export default {
|
|
||||||
name: 'OutDialog',
|
|
||||||
mixins: [crud()],
|
|
||||||
props: {
|
|
||||||
dialogShow: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
openParam: {
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
form4: {
|
|
||||||
},
|
|
||||||
dialogVisible: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
dialogShow: {
|
|
||||||
handler(newValue, oldValue) {
|
|
||||||
this.dialogVisible = newValue
|
|
||||||
this.form4 = this.openParam
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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>
|
|
||||||
@@ -1,384 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<!--工具栏-->
|
|
||||||
<div class="head-container">
|
|
||||||
<div v-if="crud.props.searchToggle">
|
|
||||||
<!-- 搜索 -->
|
|
||||||
<el-form
|
|
||||||
:inline="true"
|
|
||||||
class="demo-form-inline"
|
|
||||||
label-position="right"
|
|
||||||
label-width="110px"
|
|
||||||
label-suffix=":"
|
|
||||||
>
|
|
||||||
<el-form-item label="设备类别">
|
|
||||||
<treeselect
|
|
||||||
v-model="query.material_type_id"
|
|
||||||
:load-options="loadClass"
|
|
||||||
:options="classes"
|
|
||||||
style="width: 200px;"
|
|
||||||
placeholder="请选择"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="设备">
|
|
||||||
<el-input
|
|
||||||
v-model="query.device_code"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请输入设备编码、名称"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="单据号">
|
|
||||||
<el-input
|
|
||||||
v-model="query.repair_code"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请输入编码、名称"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="维修类型">
|
|
||||||
<el-select
|
|
||||||
v-model="query.maintenancecycle"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请选择"
|
|
||||||
class="filter-item"
|
|
||||||
@change="hand"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.EM_DEVICE_WX_INVTYPE"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计划维修日期">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="query.createTime"
|
|
||||||
type="daterange"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
@change="hand"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="单据状态">
|
|
||||||
<el-select
|
|
||||||
v-model="query.invstatus"
|
|
||||||
clearable
|
|
||||||
size="mini"
|
|
||||||
placeholder="请选择"
|
|
||||||
class="filter-item"
|
|
||||||
@change="hand"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.EM_DEVICE_WX_INVSTATUS"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<rrOperation />
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
|
||||||
<crudOperation :permission="permission">
|
|
||||||
<!-- <el-button
|
|
||||||
slot="right"
|
|
||||||
class="filter-item"
|
|
||||||
type="success"
|
|
||||||
icon="el-icon-position"
|
|
||||||
size="mini"
|
|
||||||
:disabled="crud.selections.length !== 1"
|
|
||||||
@click="outRepair"
|
|
||||||
>
|
|
||||||
委外维修
|
|
||||||
</el-button>-->
|
|
||||||
<el-button
|
|
||||||
slot="right"
|
|
||||||
class="filter-item"
|
|
||||||
type="success"
|
|
||||||
icon="el-icon-position"
|
|
||||||
size="mini"
|
|
||||||
:disabled="crud.selections.length !== 1"
|
|
||||||
@click="checkRepair"
|
|
||||||
>
|
|
||||||
委外验收
|
|
||||||
</el-button>
|
|
||||||
</crudOperation>
|
|
||||||
<!--表格渲染-->
|
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
|
||||||
<el-table-column fixed="left" type="selection" min-width="35" />
|
|
||||||
<el-table-column fixed="left" prop="repair_code" label="维修单号" min-width="120" />
|
|
||||||
<el-table-column fixed="left" prop="device_code" label="设备编码" min-width="85" />
|
|
||||||
<el-table-column fixed="left" prop="device_name" label="设备名称" min-width="150" />
|
|
||||||
<el-table-column fixed="left" prop="extend_code" label="设备自编码" min-width="100" />
|
|
||||||
<el-table-column fixed="left" prop="invstatus" label="单据状态" :formatter="formatStatusName" min-width="70" />
|
|
||||||
<el-table-column fixed="left" prop="maintenancecycle" label="单据类型" :formatter="formatTypeName" min-width="70" />
|
|
||||||
<el-table-column fixed="left" prop="fault_level" label="故障等级" :formatter="formatLevelName" min-width="70" />
|
|
||||||
<el-table-column fixed="left" prop="plan_start_date" label="计划维修日期" min-width="95" />
|
|
||||||
<el-table-column prop="fault_desc" label="故障描述" min-width="150" />
|
|
||||||
<el-table-column prop="remark" label="备注" min-width="200" />
|
|
||||||
<el-table-column prop="input_optname" label="制单人" min-width="90" />
|
|
||||||
<el-table-column prop="input_time" label="制单时间" min-width="140" />
|
|
||||||
<el-table-column prop="update_optname" label="维修人" min-width="120" />
|
|
||||||
<el-table-column prop="real_start_date" label="开始时间" min-width="140" />
|
|
||||||
<el-table-column prop="real_end_date" label="结束时间" min-width="140" />
|
|
||||||
<el-table-column prop="outsourceaskfor_optname" label="委外申请人" min-width="120" />
|
|
||||||
<el-table-column prop="outsourceaskfor_time" label="委外申请时间" min-width="140" />
|
|
||||||
<el-table-column prop="outsourceback_optname" label="委外验收" min-width="90" />
|
|
||||||
<el-table-column prop="outsourceback_time" label="委外验收时间" min-width="140" />
|
|
||||||
<el-table-column prop="confirm_optname" label="确认人" min-width="90" />
|
|
||||||
<el-table-column prop="confirm_time" label="确认时间" min-width="140" />
|
|
||||||
<el-table-column prop="audit_optname" label="审核人" min-width="90" />
|
|
||||||
<el-table-column prop="audit_time" label="审核时间" min-width="140" />
|
|
||||||
<el-table-column prop="source_bill_code" label="源单号" min-width="120" />
|
|
||||||
<el-table-column prop="source_bill_type" label="源单业务类型" min-width="95" />
|
|
||||||
</el-table>
|
|
||||||
<!--分页组件-->
|
|
||||||
<pagination />
|
|
||||||
</div>
|
|
||||||
<OutDialog :dialog-show.sync="OutDialog" :open-param="openParam" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import crudDevicerepairmst from '@/views/wms/device_manage/repair/devicerepair/devicerepairmst'
|
|
||||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
|
||||||
import rrOperation from '@crud/RR.operation'
|
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
|
||||||
import udOperation from '@crud/UD.operation'
|
|
||||||
import pagination from '@crud/Pagination'
|
|
||||||
import DateRangePicker from '@/components/DateRangePicker'
|
|
||||||
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/device_manage/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, OutDialog },
|
|
||||||
mixins: [presenter(), header(), crud()],
|
|
||||||
cruds() {
|
|
||||||
return CRUD({
|
|
||||||
title: '委外维修',
|
|
||||||
url: 'api/devicerepairmst/query4',
|
|
||||||
idField: 'repair_id',
|
|
||||||
sort: 'repair_id,desc',
|
|
||||||
crudMethod: { ...crudDevicerepairmst },
|
|
||||||
optShow: {
|
|
||||||
add: false,
|
|
||||||
edit: false,
|
|
||||||
del: false,
|
|
||||||
download: false,
|
|
||||||
reset: true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
classes: [],
|
|
||||||
class_idStr: null,
|
|
||||||
OutDialog: false,
|
|
||||||
openParam: null,
|
|
||||||
materOpt_code: '23',
|
|
||||||
permission: {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
const param = {
|
|
||||||
'materOpt_code': this.materOpt_code
|
|
||||||
}
|
|
||||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
|
||||||
this.class_idStr = res.class_idStr
|
|
||||||
this.crud.query.class_idStr = this.class_idStr
|
|
||||||
this.crud.toQuery()
|
|
||||||
this.queryClassId()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
|
||||||
return true
|
|
||||||
},
|
|
||||||
hand(value) {
|
|
||||||
this.crud.toQuery()
|
|
||||||
},
|
|
||||||
loadClass({ action, parentNode, callback }) {
|
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
|
||||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
|
||||||
parentNode.children = res.content.map(function(obj) {
|
|
||||||
if (obj.hasChildren) {
|
|
||||||
obj.children = null
|
|
||||||
}
|
|
||||||
return obj
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
callback()
|
|
||||||
}, 100)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
queryClassId() {
|
|
||||||
const param = {
|
|
||||||
'class_idStr': this.class_idStr
|
|
||||||
}
|
|
||||||
crudClassstandard.queryClassById(param).then(res => {
|
|
||||||
this.classes = res.content.map(obj => {
|
|
||||||
if (obj.hasChildren) {
|
|
||||||
obj.children = null
|
|
||||||
}
|
|
||||||
return obj
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
formatStatusName(row, cloum) {
|
|
||||||
return this.dict.label.EM_DEVICE_WX_INVSTATUS[row.invstatus]
|
|
||||||
},
|
|
||||||
formatTypeName(row, cloum) {
|
|
||||||
return this.dict.label.EM_DEVICE_WX_INVTYPE[row.maintenancecycle]
|
|
||||||
},
|
|
||||||
formatLevelName(row, cloum) {
|
|
||||||
return this.dict.label.EM_FAULT_LEVEL[row.fault_level]
|
|
||||||
},
|
|
||||||
outRepair() {
|
|
||||||
const _selectData = this.$refs.table.selection
|
|
||||||
const data = _selectData[0]
|
|
||||||
if (data.invstatus !== '03') {
|
|
||||||
return this.crud.notify('只能对开始状态的单据维修', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
}
|
|
||||||
crudDevicerepairmst.outRepair(data).then(res => {
|
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
this.crud.toQuery()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
checkRepair() {
|
|
||||||
const _selectData = this.$refs.table.selection
|
|
||||||
const data = _selectData[0]
|
|
||||||
if (data.invstatus !== '04') {
|
|
||||||
return this.crud.notify('只能对委外维修状态的单据验收', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
}
|
|
||||||
this.openParam = data
|
|
||||||
this.OutDialog = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
::v-deep {
|
|
||||||
|
|
||||||
.vue-treeselect__menu {
|
|
||||||
|
|
||||||
overflow-x: auto !important;
|
|
||||||
|
|
||||||
width: 300px;
|
|
||||||
|
|
||||||
max-height: 300px !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__label {
|
|
||||||
|
|
||||||
overflow: unset;
|
|
||||||
|
|
||||||
text-overflow: unset;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__control {
|
|
||||||
|
|
||||||
height: 20px !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__multi-value-item-container,
|
|
||||||
|
|
||||||
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
|
||||||
|
|
||||||
height: 30px;
|
|
||||||
|
|
||||||
line-height: 24px;
|
|
||||||
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__limit-tip,
|
|
||||||
|
|
||||||
.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value
|
|
||||||
|
|
||||||
.vue-treeselect__input-container {
|
|
||||||
|
|
||||||
padding-top: 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
|
||||||
|
|
||||||
// margin-bottom: 15px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__placeholder,
|
|
||||||
|
|
||||||
.vue-treeselect__single-value {
|
|
||||||
|
|
||||||
height: 28px;
|
|
||||||
|
|
||||||
line-height: 32px;
|
|
||||||
|
|
||||||
font-size: small;
|
|
||||||
|
|
||||||
color: "#CCCFD6";
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect--has-value .vue-treeselect__input {
|
|
||||||
|
|
||||||
height: 18px !important;
|
|
||||||
|
|
||||||
line-height: 18px !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect div,
|
|
||||||
|
|
||||||
.vue-treeselect span {
|
|
||||||
|
|
||||||
box-sizing: content-box;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// 选中后的溢出隐藏
|
|
||||||
|
|
||||||
.vue-treeselect__multi-value-label {
|
|
||||||
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
width: 140px;
|
|
||||||
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.vue-treeselect__value-container {
|
|
||||||
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
height: 32px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -27,15 +27,17 @@
|
|||||||
<treeselect
|
<treeselect
|
||||||
v-model="query.dept_id"
|
v-model="query.dept_id"
|
||||||
:load-options="loadDepts"
|
:load-options="loadDepts"
|
||||||
|
:normalizer="normalizer"
|
||||||
:options="depts"
|
:options="depts"
|
||||||
style="width: 200px;"
|
style="width: 200px;"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="使用班组">
|
<el-form-item label="使用部门">
|
||||||
<treeselect
|
<treeselect
|
||||||
v-model="query.use_id"
|
v-model="query.use_id"
|
||||||
:load-options="loadDepts"
|
:load-options="loadDepts"
|
||||||
|
:normalizer="normalizer"
|
||||||
:options="depts"
|
:options="depts"
|
||||||
style="width: 200px;"
|
style="width: 200px;"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
@@ -69,7 +71,7 @@
|
|||||||
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||||
<el-table-column prop="class_name" label="设备类型" show-overflow-tooltip />
|
<el-table-column prop="class_name" label="设备类型" show-overflow-tooltip />
|
||||||
<el-table-column prop="dept_name" label="归属部门" 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="use_name" label="使用部门" show-overflow-tooltip />
|
||||||
<el-table-column prop="device_spec" label="规格" min-width="130" show-overflow-tooltip />
|
<el-table-column prop="device_spec" label="规格" min-width="130" show-overflow-tooltip />
|
||||||
<el-table-column prop="device_model" label="型号" show-overflow-tooltip />
|
<el-table-column prop="device_model" label="型号" show-overflow-tooltip />
|
||||||
<el-table-column prop="supplier_name" label="供应商" show-overflow-tooltip />
|
<el-table-column prop="supplier_name" label="供应商" show-overflow-tooltip />
|
||||||
@@ -95,7 +97,7 @@ import pagination from '@crud/Pagination'
|
|||||||
import crudDevicemaintenanceplanmst from '@/views/wms/device_manage/upkeep/devicemaintenanceplan/devicemaintenanceplanmst'
|
import crudDevicemaintenanceplanmst from '@/views/wms/device_manage/upkeep/devicemaintenanceplan/devicemaintenanceplanmst'
|
||||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
// import { getDepts } from '@/api/system/dept'
|
import crudDept from '@/views/system/dept/dept'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Device',
|
name: 'Device',
|
||||||
@@ -136,7 +138,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getDepts()
|
this.deptTree()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickChange(item) {
|
clickChange(item) {
|
||||||
@@ -187,29 +189,31 @@ export default {
|
|||||||
// 获取弹窗内部门数据
|
// 获取弹窗内部门数据
|
||||||
loadDepts({ action, parentNode, callback }) {
|
loadDepts({ action, parentNode, callback }) {
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
getDepts({ enabled: true, pid: parentNode.id }).then(res => {
|
crudDept.getDeptvo({ is_used: true, pid: parentNode.dept_id }).then(res => {
|
||||||
parentNode.children = res.content.map(function(obj) {
|
parentNode.children = res.content.map(function(obj) {
|
||||||
if (obj.hasChildren) {
|
obj.children = null
|
||||||
obj.children = null
|
|
||||||
}
|
|
||||||
return obj
|
return obj
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
callback()
|
callback()
|
||||||
}, 200)
|
}, 100)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getDepts() {
|
deptTree() {
|
||||||
getDepts({ enabled: true }).then(res => {
|
setTimeout(() => {
|
||||||
this.depts = res.content.map(function(obj) {
|
crudDept.getDeptTree().then(res => {
|
||||||
if (obj.hasChildren) {
|
this.depts = res.content
|
||||||
obj.children = null
|
|
||||||
}
|
|
||||||
return obj
|
|
||||||
})
|
})
|
||||||
})
|
}, 100)
|
||||||
}
|
},
|
||||||
|
normalizer(node) {
|
||||||
|
return {
|
||||||
|
id: node.dept_id,
|
||||||
|
label: node.name,
|
||||||
|
children: node.children
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -71,7 +71,28 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" />
|
<crudOperation :permission="permission">
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-position"
|
||||||
|
size="mini"
|
||||||
|
@click="repair"
|
||||||
|
>
|
||||||
|
维修
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-position"
|
||||||
|
size="mini"
|
||||||
|
@click="notRepair"
|
||||||
|
>
|
||||||
|
不维修
|
||||||
|
</el-button>
|
||||||
|
</crudOperation>
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="800px">
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="800px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
@@ -148,25 +169,25 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
<el-table-column fixed="left" type="selection" min-width="35" />
|
<el-table-column type="selection" min-width="35" />
|
||||||
<el-table-column fixed="left" prop="request_code" min-width="100" label="报修单号" />
|
<el-table-column fixed="left" prop="request_code" min-width="140" label="报修单号" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="path" label="故障图片" min-width="70">
|
<!-- <el-table-column fixed="left" prop="path" label="故障图片" min-width="90">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="primary" icon="el-icon-folder-opened" circle @click="Picconfirm(scope.$index, scope.row)" />
|
<el-button type="primary" icon="el-icon-folder-opened" circle @click="Picconfirm(scope.$index, scope.row)" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>-->
|
||||||
<el-table-column fixed="left" prop="device_code" label="设备编码" min-width="85" />
|
<el-table-column prop="device_code" label="设备编码" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="device_name" label="设备名称" min-width="150" />
|
<el-table-column prop="device_name" label="设备名称" min-width="150" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="extend_code" label="设备自编码" min-width="100" />
|
<el-table-column prop="extend_code" label="设备自编码" min-width="100" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="dept_name" label="所属部门" min-width="130" />
|
<el-table-column prop="dept_name" label="所属部门" min-width="130" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="use_name" label="使用班组" min-width="130" />
|
<el-table-column prop="use_name" label="使用部门" min-width="130" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="product_person_name" label="班组配合人" min-width="90" />
|
<el-table-column prop="product_person_name" label="班组配合人" min-width="90" show-overflow-tooltip />
|
||||||
<el-table-column fixed="left" prop="device_faultclass_name" label="故障分类" min-width="145" />
|
<el-table-column prop="device_faultclass_name" label="故障分类" min-width="145" />
|
||||||
<el-table-column fixed="left" prop="fault_level" label="故障等级" :formatter="formaLevelName" min-width="70" />
|
<el-table-column prop="fault_level" label="故障等级" :formatter="formaLevelName" min-width="90" />
|
||||||
<el-table-column fixed="left" prop="status" label="状态" :formatter="formatStatusName" min-width="70" />
|
<el-table-column prop="status" label="状态" :formatter="formatStatusName" min-width="90" />
|
||||||
<el-table-column fixed="left" prop="is_passed" label="是否通过" :formatter="formatPassedName" min-width="70" />
|
<el-table-column prop="is_passed" label="是否通过" :formatter="formatPassedName" min-width="90" />
|
||||||
<el-table-column prop="fault_desc" label="故障描述" min-width="150" />
|
<el-table-column prop="fault_desc" label="故障描述" min-width="150" show-overflow-tooltip />
|
||||||
<el-table-column prop="remark" label="备注" min-width="200" />
|
<el-table-column prop="remark" label="备注" min-width="200" show-overflow-tooltip />
|
||||||
<el-table-column prop="fault_time" label="故障时间" min-width="140" />
|
<el-table-column prop="fault_time" label="故障时间" min-width="140" />
|
||||||
<el-table-column prop="create_name" label="报修人" min-width="90" />
|
<el-table-column prop="create_name" label="报修人" min-width="90" />
|
||||||
<el-table-column prop="create_time" label="创建时间" min-width="140" />
|
<el-table-column prop="create_time" label="创建时间" min-width="140" />
|
||||||
@@ -207,7 +228,6 @@ import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
|||||||
import PicDialog from '@/views/wms/device_manage/repair/devicevprs/PicDialog'
|
import PicDialog from '@/views/wms/device_manage/repair/devicevprs/PicDialog'
|
||||||
import DeviceDialog from '@/views/wms/device_manage/repair/devicevprs/DeviceDialog'
|
import DeviceDialog from '@/views/wms/device_manage/repair/devicevprs/DeviceDialog'
|
||||||
import FaultDialog from '@/views/wms/device_manage/repair/devicevprs/FaultDialog'
|
import FaultDialog from '@/views/wms/device_manage/repair/devicevprs/FaultDialog'
|
||||||
// import { getDepts, getDeptSuperior } from '@/api/system/dept'
|
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import crudDept from '@/views/system/dept/dept'
|
import crudDept from '@/views/system/dept/dept'
|
||||||
|
|
||||||
@@ -241,6 +261,7 @@ export default {
|
|||||||
classes: [],
|
classes: [],
|
||||||
class_idStr: null,
|
class_idStr: null,
|
||||||
depts: [],
|
depts: [],
|
||||||
|
checkrows: [],
|
||||||
materOpt_code: '23',
|
materOpt_code: '23',
|
||||||
statusList: [
|
statusList: [
|
||||||
{ 'label': '生成', 'value': '01' },
|
{ 'label': '生成', 'value': '01' },
|
||||||
@@ -345,23 +366,23 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
repair() {
|
repair() {
|
||||||
const _selectData = this.$refs.table.selection
|
this.checkrows = this.$refs.table.selection
|
||||||
const data = _selectData[0]
|
if (this.checkrows.length === 0) {
|
||||||
if (data.status !== '01') {
|
this.crud.notify('请勾选需要操作的记录!')
|
||||||
return this.crud.notify('只能对生成状态的单据进行维修', CRUD.NOTIFICATION_TYPE.INFO)
|
return false
|
||||||
}
|
}
|
||||||
crudDevicerepairrequest.repair(data).then(res => {
|
crudDevicerepairrequest.repair({ rows: this.checkrows}).then(res => {
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
notRepair() {
|
notRepair() {
|
||||||
const _selectData = this.$refs.table.selection
|
this.checkrows = this.$refs.table.selection
|
||||||
const data = _selectData[0]
|
if(this.checkrows.length === 0 ){
|
||||||
if (data.status !== '01') {
|
this.crud.notify('请勾选需要操作的记录!')
|
||||||
return this.crud.notify('只能对生成状态的单据进行操作', CRUD.NOTIFICATION_TYPE.INFO)
|
return false
|
||||||
}
|
}
|
||||||
crudDevicerepairrequest.notRepair(data).then(res => {
|
crudDevicerepairrequest.notRepair({ rows: this.checkrows}).then(res => {
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user