|
@@ -6,36 +6,33 @@
|
|
|
<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-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.category" placeholder="请选择">
|
|
<a-select v-model="queryParam.category" placeholder="请选择">
|
|
|
- <a-select-option
|
|
|
|
|
- v-for="(label,value) in categoryMap"
|
|
|
|
|
- :key="value"
|
|
|
|
|
- :label="label"
|
|
|
|
|
|
|
+ <a-select-option v-for="(label, value) in categoryMap" :key="value" :label="label"
|
|
|
:value="parseInt(value)">{{ label }}
|
|
:value="parseInt(value)">{{ label }}
|
|
|
</a-select-option>
|
|
</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
@@ -44,10 +41,7 @@
|
|
|
<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>
|
|
@@ -55,20 +49,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_DATETIME_PATTERN"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <a-date-picker v-model="queryParam.searchStartTime" style="width: 100%"
|
|
|
|
|
+ :format="BaseTool.Date.PICKER_NORM_DATETIME_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_DATETIME_PATTERN"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <a-date-picker v-model="queryParam.searchEndTime" style="width: 100%"
|
|
|
|
|
+ :format="BaseTool.Date.PICKER_NORM_DATETIME_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">
|
|
@@ -82,8 +70,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()">
|
|
@@ -96,37 +86,30 @@
|
|
|
</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>
|
|
|
</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>
|
|
@@ -164,7 +147,7 @@ export default {
|
|
|
default: 1
|
|
default: 1
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- data () {
|
|
|
|
|
|
|
+ data() {
|
|
|
return {
|
|
return {
|
|
|
// 查询参数
|
|
// 查询参数
|
|
|
queryParam: {
|
|
queryParam: {
|
|
@@ -210,15 +193,15 @@ export default {
|
|
|
width: '120px',
|
|
width: '120px',
|
|
|
dataIndex: 'repairUserName'
|
|
dataIndex: 'repairUserName'
|
|
|
},
|
|
},
|
|
|
- /* {
|
|
|
|
|
- title: '报修来源',
|
|
|
|
|
- checked: true,
|
|
|
|
|
- width: '100px',
|
|
|
|
|
- dataIndex: 'source',
|
|
|
|
|
- customRender: (text, record, index) => {
|
|
|
|
|
- return this.BaseTool.Object.getField(this.sourceMap, text)
|
|
|
|
|
- }
|
|
|
|
|
- },*/
|
|
|
|
|
|
|
+ /* {
|
|
|
|
|
+ title: '报修来源',
|
|
|
|
|
+ checked: true,
|
|
|
|
|
+ width: '100px',
|
|
|
|
|
+ dataIndex: 'source',
|
|
|
|
|
+ customRender: (text, record, index) => {
|
|
|
|
|
+ return this.BaseTool.Object.getField(this.sourceMap, text)
|
|
|
|
|
+ }
|
|
|
|
|
+ },*/
|
|
|
{
|
|
{
|
|
|
title: '工单类型',
|
|
title: '工单类型',
|
|
|
checked: true,
|
|
checked: true,
|
|
@@ -335,7 +318,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)
|
|
@@ -350,7 +333,7 @@ export default {
|
|
|
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 = [] } },
|
|
@@ -374,7 +357,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
|
|
@@ -392,14 +375,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
|
|
|
const type = res.data.type
|
|
const type = res.data.type
|
|
@@ -407,26 +390,26 @@ 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_DATETIME_PATTERN) : null
|
|
this.queryParam.searchStartTime = this.queryParam.searchStartTime ? this.BaseTool.Date.formatter(this.queryParam.searchStartTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : null
|
|
|
this.queryParam.searchEndTime = this.queryParam.searchEndTime ? this.BaseTool.Date.formatter(this.queryParam.searchEndTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : null
|
|
this.queryParam.searchEndTime = this.queryParam.searchEndTime ? this.BaseTool.Date.formatter(this.queryParam.searchEndTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : 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 = {
|
|
|
}
|
|
}
|
|
|
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,
|
|
@@ -436,7 +419,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)
|
|
|
}
|
|
}
|