|
@@ -6,36 +6,43 @@
|
|
|
<a-row :gutter="48">
|
|
<a-row :gutter="48">
|
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="关键字">
|
|
<a-form-item label="关键字">
|
|
|
- <a-input v-model="queryParam.keyword" placeholder="请输入设备名称/设备新号"/>
|
|
|
|
|
|
|
+ <a-input v-model="queryParam.keyword" placeholder="请输入设备名称/设备新号" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="设备旧号">
|
|
<a-form-item label="设备旧号">
|
|
|
- <a-input v-model="queryParam.zbh" placeholder="请输入设备旧号"/>
|
|
|
|
|
|
|
+ <a-input v-model="queryParam.zbh" placeholder="请输入设备旧号" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="报修人">
|
|
<a-form-item label="报修人">
|
|
|
- <a-input v-model="queryParam.actualUser" placeholder="请输入报修人"/>
|
|
|
|
|
|
|
+ <a-input v-model="queryParam.actualUser" placeholder="请输入报修人" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="维修人">
|
|
<a-form-item label="维修人">
|
|
|
- <a-input v-model="queryParam.repairUserName" placeholder="请输入维修人"/>
|
|
|
|
|
|
|
+ <a-input v-model="queryParam.repairUserName" placeholder="请输入维修人" />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
|
+ <a-form-item label="部门">
|
|
|
|
|
+ <a-select v-model="queryParam.deptId" placeholder="请选择部门" allowClear showSearch
|
|
|
|
|
+ optionFilterProp="label">
|
|
|
|
|
+ <a-select-option v-for="item in deptList" :key="item.deptId" :label="item.name"
|
|
|
|
|
+ :value="item.deptId">{{ item.name }}
|
|
|
|
|
+ </a-select-option>
|
|
|
|
|
+ </a-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="问题描述">
|
|
<a-form-item label="问题描述">
|
|
|
- <a-input v-model="queryParam.content" placeholder="问题描述模糊查询"/>
|
|
|
|
|
|
|
+ <a-input v-model="queryParam.content" placeholder="问题描述模糊查询" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="状态">
|
|
<a-form-item label="状态">
|
|
|
<a-select v-model="queryParam.status" placeholder="请选择">
|
|
<a-select v-model="queryParam.status" placeholder="请选择">
|
|
|
- <a-select-option
|
|
|
|
|
- v-for="(label,value) in statusMap"
|
|
|
|
|
- :key="value"
|
|
|
|
|
- :label="label"
|
|
|
|
|
|
|
+ <a-select-option v-for="(label, value) in statusMap" :key="value" :label="label"
|
|
|
:value="parseInt(value)">{{ label }}
|
|
:value="parseInt(value)">{{ label }}
|
|
|
</a-select-option>
|
|
</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
@@ -43,20 +50,14 @@
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="报修起始日期">
|
|
<a-form-item label="报修起始日期">
|
|
|
- <a-date-picker
|
|
|
|
|
- v-model="queryParam.searchStartTime"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <a-date-picker v-model="queryParam.searchStartTime" style="width: 100%"
|
|
|
|
|
+ :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="报修结束日期">
|
|
<a-form-item label="报修结束日期">
|
|
|
- <a-date-picker
|
|
|
|
|
- v-model="queryParam.searchEndTime"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <a-date-picker v-model="queryParam.searchEndTime" style="width: 100%"
|
|
|
|
|
+ :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :md="8 || 24" :sm="24">
|
|
<a-col :md="8 || 24" :sm="24">
|
|
@@ -70,8 +71,10 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="table-operator">
|
|
<div class="table-operator">
|
|
|
- <a-button v-if="$auth('repair-application-forms-add')" type="primary" icon="plus" @click="$refs.baseModal.base({},{filter: -1})">新增</a-button>
|
|
|
|
|
- <a-button style="margin-left: 8px" v-if="$auth('repair-application-forms-export')" type="primary" icon="download" @click="doExport">导出</a-button>
|
|
|
|
|
|
|
+ <a-button v-if="$auth('repair-application-forms-add')" type="primary" icon="plus"
|
|
|
|
|
+ @click="$refs.baseModal.base({}, { filter: -1 })">新增</a-button>
|
|
|
|
|
+ <a-button style="margin-left: 8px" v-if="$auth('repair-application-forms-export')" type="primary"
|
|
|
|
|
+ icon="download" @click="doExport">导出</a-button>
|
|
|
<a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('repair-application-forms-del')">
|
|
<a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('repair-application-forms-del')">
|
|
|
<a-menu slot="overlay">
|
|
<a-menu slot="overlay">
|
|
|
<a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
|
|
<a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
|
|
@@ -84,23 +87,14 @@
|
|
|
</a-dropdown>
|
|
</a-dropdown>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <s-table
|
|
|
|
|
- ref="table"
|
|
|
|
|
- size="default"
|
|
|
|
|
- rowKey="id"
|
|
|
|
|
- :columns="columns"
|
|
|
|
|
- :data="loadData"
|
|
|
|
|
- :alert="options.alert"
|
|
|
|
|
- :rowSelection="options.rowSelection"
|
|
|
|
|
- :scroll="{x: 1000, y: BaseTool.Constant.scrollY }"
|
|
|
|
|
- showPagination="auto"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData" :alert="options.alert"
|
|
|
|
|
+ :rowSelection="options.rowSelection" :scroll="{ x: 1000, y: BaseTool.Constant.scrollY }" showPagination="auto">
|
|
|
<span slot="action" slot-scope="record">
|
|
<span slot="action" slot-scope="record">
|
|
|
<template>
|
|
<template>
|
|
|
<a @click="handleView(record)">查看</a>
|
|
<a @click="handleView(record)">查看</a>
|
|
|
<operation-button
|
|
<operation-button
|
|
|
v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-edit')"
|
|
v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-edit')"
|
|
|
- @click="handleEdit(record)" >修改</operation-button>
|
|
|
|
|
|
|
+ @click="handleEdit(record)">修改</operation-button>
|
|
|
<!-- <operation-button-->
|
|
<!-- <operation-button-->
|
|
|
<!-- v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-del')"-->
|
|
<!-- v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-del')"-->
|
|
|
<!-- :type="2"-->
|
|
<!-- :type="2"-->
|
|
@@ -111,21 +105,23 @@
|
|
|
@click="handleDispatching(record)" >派工</operation-button>-->
|
|
@click="handleDispatching(record)" >派工</operation-button>-->
|
|
|
<operation-button
|
|
<operation-button
|
|
|
v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-dispatch')"
|
|
v-if="DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === record.status && $auth('repair-application-forms-dispatch')"
|
|
|
- @click="handleAssign(record)" >派工</operation-button>
|
|
|
|
|
|
|
+ @click="handleAssign(record)">派工</operation-button>
|
|
|
</template>
|
|
</template>
|
|
|
</span>
|
|
</span>
|
|
|
<span slot="status" slot-scope="text">
|
|
<span slot="status" slot-scope="text">
|
|
|
- <badge :text="BaseTool.Object.getField(statusMap,text)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_STATUS[text]"/>
|
|
|
|
|
|
|
+ <badge :text="BaseTool.Object.getField(statusMap, text)"
|
|
|
|
|
+ :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_STATUS[text]" />
|
|
|
</span>
|
|
</span>
|
|
|
<span slot="level" slot-scope="text">
|
|
<span slot="level" slot-scope="text">
|
|
|
- <badge :text="BaseTool.Object.getField(levelMap,text)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_LEVEL[text]"/>
|
|
|
|
|
|
|
+ <badge :text="BaseTool.Object.getField(levelMap, text)"
|
|
|
|
|
+ :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_LEVEL[text]" />
|
|
|
</span>
|
|
</span>
|
|
|
</s-table>
|
|
</s-table>
|
|
|
</div>
|
|
</div>
|
|
|
- <base-form ref="baseModal" @ok="handleOk"/>
|
|
|
|
|
- <base-out-form ref="baseOutModal" @ok="handleOk"/>
|
|
|
|
|
- <detail ref="detailModal" @ok="handleOk"/>
|
|
|
|
|
- <detail-out ref="detailOutModal" @ok="handleOk"/>
|
|
|
|
|
|
|
+ <base-form ref="baseModal" @ok="handleOk" />
|
|
|
|
|
+ <base-out-form ref="baseOutModal" @ok="handleOk" />
|
|
|
|
|
+ <detail ref="detailModal" @ok="handleOk" />
|
|
|
|
|
+ <detail-out ref="detailOutModal" @ok="handleOk" />
|
|
|
<assign-form ref="assignForm" @ok="handleOk" />
|
|
<assign-form ref="assignForm" @ok="handleOk" />
|
|
|
<dispatch-base-form ref="dispatchBaseForm" @ok="handleOk" />
|
|
<dispatch-base-form ref="dispatchBaseForm" @ok="handleOk" />
|
|
|
</a-card>
|
|
</a-card>
|
|
@@ -140,6 +136,8 @@ import Detail from './modules/DetailRepair'
|
|
|
import DetailOut from './modules/DetailRepairOut'
|
|
import DetailOut from './modules/DetailRepairOut'
|
|
|
import { getRepairApplicationFormPage, deleteRepairApplicationForms, fetchRepairApplicationForm, exportRepairApplicationForm } from '@/api/repair/application-form'
|
|
import { getRepairApplicationFormPage, deleteRepairApplicationForms, fetchRepairApplicationForm, exportRepairApplicationForm } from '@/api/repair/application-form'
|
|
|
import DispatchBaseForm from '@/views/repair/application-form/modules/DispatchBaseForm'
|
|
import DispatchBaseForm from '@/views/repair/application-form/modules/DispatchBaseForm'
|
|
|
|
|
+import { queryDept } from '@/api/upms/dept'
|
|
|
|
|
+import { selectUserDept } from '@/api/upms/user-dept'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'RepairForm',
|
|
name: 'RepairForm',
|
|
@@ -163,7 +161,7 @@ export default {
|
|
|
default: null
|
|
default: null
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- data () {
|
|
|
|
|
|
|
+ data() {
|
|
|
return {
|
|
return {
|
|
|
// 查询参数
|
|
// 查询参数
|
|
|
queryParam: {
|
|
queryParam: {
|
|
@@ -296,6 +294,8 @@ export default {
|
|
|
statusMap: {},
|
|
statusMap: {},
|
|
|
needStopMap: {},
|
|
needStopMap: {},
|
|
|
planFlagMap: {},
|
|
planFlagMap: {},
|
|
|
|
|
+ // 部门下拉数据
|
|
|
|
|
+ deptList: [],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
|
parameter = {
|
|
parameter = {
|
|
@@ -325,7 +325,7 @@ export default {
|
|
|
optionAlertShow: false
|
|
optionAlertShow: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- created () {
|
|
|
|
|
|
|
+ created() {
|
|
|
// 下拉框map
|
|
// 下拉框map
|
|
|
this.sourceMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_SOURCE)
|
|
this.sourceMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_SOURCE)
|
|
|
this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_LEVEL)
|
|
this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_LEVEL)
|
|
@@ -337,10 +337,25 @@ export default {
|
|
|
if (no != null) {
|
|
if (no != null) {
|
|
|
this.queryParam.no = no
|
|
this.queryParam.no = no
|
|
|
}
|
|
}
|
|
|
|
|
+ // 部门下拉数据
|
|
|
|
|
+ queryDept({}).then(res => {
|
|
|
|
|
+ this.deptList = res.data || []
|
|
|
|
|
+ })
|
|
|
|
|
+ // 我的工单:默认查询当前登录人部门的所有相关工单
|
|
|
|
|
+ if (this.searchType === 2) {
|
|
|
|
|
+ selectUserDept().then(res => {
|
|
|
|
|
+ if (res.data && res.data.deptId) {
|
|
|
|
|
+ this.queryParam.deptId = res.data.deptId
|
|
|
|
|
+ if (this.$refs.table) {
|
|
|
|
|
+ this.$refs.table.refresh()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
this.tableOption()
|
|
this.tableOption()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- tableOption () {
|
|
|
|
|
|
|
+ tableOption() {
|
|
|
if (!this.optionAlertShow) {
|
|
if (!this.optionAlertShow) {
|
|
|
this.options = {
|
|
this.options = {
|
|
|
alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
|
|
alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
|
|
@@ -364,7 +379,7 @@ export default {
|
|
|
this.optionAlertShow = false
|
|
this.optionAlertShow = false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- batchDelete (id) {
|
|
|
|
|
|
|
+ batchDelete(id) {
|
|
|
let ids = []
|
|
let ids = []
|
|
|
if (this.BaseTool.String.isBlank(id)) {
|
|
if (this.BaseTool.String.isBlank(id)) {
|
|
|
const length = this.selectedRows.length
|
|
const length = this.selectedRows.length
|
|
@@ -382,14 +397,14 @@ export default {
|
|
|
this.$refs.table.clearSelected()
|
|
this.$refs.table.clearSelected()
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- handleEdit (record) {
|
|
|
|
|
|
|
+ handleEdit(record) {
|
|
|
fetchRepairApplicationForm({ id: record.id }).then(res => {
|
|
fetchRepairApplicationForm({ id: record.id }).then(res => {
|
|
|
const type = res.data.type
|
|
const type = res.data.type
|
|
|
const modal = type === 2 ? this.$refs.baseOutModal : this.$refs.baseModal
|
|
const modal = type === 2 ? this.$refs.baseOutModal : this.$refs.baseModal
|
|
|
modal.base(res.data)
|
|
modal.base(res.data)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- handleView (record) {
|
|
|
|
|
|
|
+ handleView(record) {
|
|
|
fetchRepairApplicationForm({ id: record.id }).then(res => {
|
|
fetchRepairApplicationForm({ id: record.id }).then(res => {
|
|
|
this.visible = false
|
|
this.visible = false
|
|
|
// 收起可能残留的详情卡片,避免新旧详情(委外详情)同时显示
|
|
// 收起可能残留的详情卡片,避免新旧详情(委外详情)同时显示
|
|
@@ -404,26 +419,28 @@ export default {
|
|
|
modal.base(res.data)
|
|
modal.base(res.data)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- handleAssign (record) {
|
|
|
|
|
|
|
+ handleAssign(record) {
|
|
|
const modal = this.$refs.assignForm
|
|
const modal = this.$refs.assignForm
|
|
|
modal.base(record)
|
|
modal.base(record)
|
|
|
},
|
|
},
|
|
|
- handleOk () {
|
|
|
|
|
|
|
+ handleOk() {
|
|
|
this.visible = true
|
|
this.visible = true
|
|
|
this.queryParam.searchStartTime = this.queryParam.searchStartTime ? this.BaseTool.Date.formatter(this.queryParam.searchStartTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) + ' 00:00:01' : null
|
|
this.queryParam.searchStartTime = this.queryParam.searchStartTime ? this.BaseTool.Date.formatter(this.queryParam.searchStartTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) + ' 00:00:01' : null
|
|
|
this.queryParam.searchEndTime = this.queryParam.searchEndTime ? this.BaseTool.Date.formatter(this.queryParam.searchEndTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) + ' 23:59:59' : null
|
|
this.queryParam.searchEndTime = this.queryParam.searchEndTime ? this.BaseTool.Date.formatter(this.queryParam.searchEndTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) + ' 23:59:59' : null
|
|
|
this.$refs.table.refresh()
|
|
this.$refs.table.refresh()
|
|
|
},
|
|
},
|
|
|
- onSelectChange (selectedRowKeys, selectedRows) {
|
|
|
|
|
|
|
+ onSelectChange(selectedRowKeys, selectedRows) {
|
|
|
this.selectedRowKeys = selectedRowKeys
|
|
this.selectedRowKeys = selectedRowKeys
|
|
|
this.selectedRows = selectedRows
|
|
this.selectedRows = selectedRows
|
|
|
},
|
|
},
|
|
|
- resetSearchForm () {
|
|
|
|
|
|
|
+ resetSearchForm() {
|
|
|
this.queryParam = {
|
|
this.queryParam = {
|
|
|
|
|
+ filter: this.filter,
|
|
|
|
|
+ searchType: this.searchType
|
|
|
}
|
|
}
|
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
},
|
|
|
- doExport () {
|
|
|
|
|
|
|
+ doExport() {
|
|
|
const parameter = {
|
|
const parameter = {
|
|
|
...this.queryParam,
|
|
...this.queryParam,
|
|
|
searchStartTime: this.queryParam.searchStartTime,
|
|
searchStartTime: this.queryParam.searchStartTime,
|
|
@@ -433,7 +450,7 @@ export default {
|
|
|
this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- handleDispatching (record) {
|
|
|
|
|
|
|
+ handleDispatching(record) {
|
|
|
const modal = this.$refs.dispatchBaseForm
|
|
const modal = this.$refs.dispatchBaseForm
|
|
|
modal.base(record)
|
|
modal.base(record)
|
|
|
}
|
|
}
|