¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å·¥åç¼å·"> |
| | | <a-input placeholder="请è¾å
¥å·¥åç¼å·" v-model="queryParam.repairCode"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ¥ä¿®ç¼å·"> |
| | | <a-input placeholder="请è¾å
¥æ¥ä¿®ç¼å·" v-model="queryParam.reportId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <lx-search-equipment-select placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="queryParam.equipmentId"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç»´ä¿®ç¶æ"> |
| | | <a-input placeholder="请è¾å
¥ç»´ä¿®ç¶æ" v-model="queryParam.repairStatus"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px"> |
| | | {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </span> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('维修工å')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" |
| | | @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"> |
| | | <a-icon type="delete"/> |
| | | å é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ |
| | | <a-icon type="down"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a |
| | | style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange" |
| | | :scroll="{x:'max-content'}" |
| | | > |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down"/></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <eamRepairOrder-modal ref="modalForm" @ok="modalFormOk"></eamRepairOrder-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/assets/less/TableExpand.less' |
| | | import EamRepairOrderModal from './modules/EamRepairOrderModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | |
| | | export default { |
| | | name: 'EamRepairOrderList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | LxSearchEquipmentSelect, |
| | | EamRepairOrderModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '维修工å管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'å·¥åç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'repairCode', |
| | | width: 200, |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'æ¥ä¿®ç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'reportId', |
| | | width: 200, |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId_dictText', |
| | | width: 200, |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'repairStatus_dicText', |
| | | fixed: 'left', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®å¼å§æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'actualStartTime', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®ç»ææ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'actualEndTime', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'æ
éåå ', |
| | | align: 'center', |
| | | dataIndex: 'faultReason' |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®ç»ææè¿°', |
| | | align: 'center', |
| | | dataIndex: 'repairDescription', |
| | | width: 300 |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®è´è´£äºº', |
| | | align: 'center', |
| | | dataIndex: 'repairer', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: 'æ¯å¦å§å¤', |
| | | align: 'center', |
| | | dataIndex: 'outsourcedFlag', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: 'å§å¤ç»´ä¿®æè¿°', |
| | | align: 'center', |
| | | dataIndex: 'outsourcedRepairDecription', |
| | | width: 300 |
| | | }, |
| | | { |
| | | title: 'å§å¤ç»´ä¿®å¼å§æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'outsourcedStartTime', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'å§å¤ç»´ä¿®ç»ææ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'outsourcedEndTime', |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: 'å§å¤è´è´£äºº', |
| | | align: 'center', |
| | | dataIndex: 'outsourcedPerson', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®å¾ç', |
| | | align: 'center', |
| | | dataIndex: 'imageFiles', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | fixed: 'right', |
| | | width: 150 |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/eamRepairOrder/list', |
| | | delete: '/eam/eamRepairOrder/delete', |
| | | deleteBatch: '/eam/eamRepairOrder/deleteBatch', |
| | | exportXlsUrl: 'eam/eamRepairOrder/exportXls', |
| | | importExcelUrl: 'eam/eamRepairOrder/importExcel' |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | methods: {} |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :labelCol="labelCol" :wrapperCol="wrapperCol" :rules="validatorRules"> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="repairCode" label="å·¥åç¼å·"> |
| | | <a-input placeholder="请è¾å
¥å·¥åç¼å·" v-model="model.repairCode"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="reportId" label="æ¥ä¿®ç¼å·"> |
| | | <a-input placeholder="请è¾å
¥æ¥ä¿®ç¼å·" v-model="model.reportId"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="equipmentId" label="设å¤ç¼å·"> |
| | | <lx-search-equipment-select placeholder="请è¾å
¥è®¾å¤ç¼å·æåç§°æç´¢" v-model="model.equipmentId"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <!-- <a-col :span="12">--> |
| | | <!-- <a-form-model-item prop="repairStatus" label="ç»´ä¿®ç¶æ">--> |
| | | <!-- <a-input placeholder="请è¾å
¥ç»´ä¿®ç¶æ" v-model="model.repairStatus"/>--> |
| | | <!-- </a-form-model-item>--> |
| | | <!-- </a-col>--> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="faultReason" label="æ
éåå "> |
| | | <a-input placeholder="请è¾å
¥æ
éåå " v-model="model.faultReason"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="actualStartTime" label="ç»´ä¿®å¼å§æ¶é´"> |
| | | <a-input placeholder="请è¾å
¥ç»´ä¿®å¼å§æ¶é´" v-model="model.actualStartTime"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="actualEndTime" label="ç»´ä¿®ç»ææ¶é´"> |
| | | <a-input placeholder="请è¾å
¥ç»´ä¿®ç»ææ¶é´" v-model="model.actualEndTime"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="repairDescription" label="ç»´ä¿®ç»ææè¿°"> |
| | | <a-input placeholder="请è¾å
¥ç»´ä¿®ç»ææè¿°" v-model="model.repairDescription"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="repairer" label="ç»´ä¿®è´è´£äºº"> |
| | | <a-input placeholder="请è¾å
¥ç»´ä¿®è´è´£äºº" v-model="model.repairer"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="outsourcedStartTime" label="å§å¤ç»´ä¿®å¼å§æ¶é´"> |
| | | <a-date-picker show-time value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" |
| | | placeholder="请è¾å
¥å§å¤ç»´ä¿®å¼å§æ¶é´" |
| | | v-model="model.outsourcedStartTime"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="outsourcedEndTime" label="å§å¤ç»´ä¿®ç»ææ¶é´"> |
| | | <a-date-picker show-time value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" |
| | | placeholder="请è¾å
¥å§å¤ç»´ä¿®ç»ææ¶é´" |
| | | v-model="model.outsourcedEndTime"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item prop="outsourcedPerson" label="å§å¤è´è´£äºº"> |
| | | <a-input placeholder="请è¾å
¥å§å¤è´è´£äºº" v-model="model.outsourcedPerson"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item prop="imageFiles" label="ç»´ä¿®å¾ç" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <j-image-upload v-model="model.imageFiles" :is-multiple="true" :number="3"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction } from '@api/manage' |
| | | import moment from 'moment' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | |
| | | export default { |
| | | name: 'EamRepairOrderModal', |
| | | components: { LxSearchEquipmentSelect }, |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 8 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 12 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 4 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 } |
| | | }, |
| | | confirmLoading: false, |
| | | validatorRules: {}, |
| | | url: { |
| | | add: '/eam/eamRepairOrder/add', |
| | | edit: '/eam/eamRepairOrder/edit' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | //åå§åé»è®¤å¼ |
| | | this.edit({}) |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.$refs.form.clearValidate() |
| | | }, |
| | | handleOk() { |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | let httpurl = '' |
| | | let method = '' |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add |
| | | method = 'post' |
| | | } else { |
| | | httpurl += this.url.edit |
| | | method = 'put' |
| | | } |
| | | httpAction(httpurl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | |
| | | </style> |