| | |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="借用状态"> |
| | | <j-dict-select-tag placeholder="请选择借用状态" dictCode="equipment_lean_out_status" v-model="queryParam.leanStatus" |
| | | <j-dict-select-tag placeholder="请选择借用状态" dictCode="equipment_lean_out_status" |
| | | v-model="queryParam.leanStatus" |
| | | allow-clear/> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >新增</a-button> |
| | | >新增 |
| | | </a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item |
| | | key="1" |
| | | @click="batchDel" |
| | | > |
| | | <a-icon type="delete" /> |
| | | <a-icon type="delete"/> |
| | | 删除 |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> 批量操作 |
| | | <a-icon type="down" /> |
| | | <a-icon type="down"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </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>项 |
| | | <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" |
| | |
| | | > |
| | | <template v-if="record.leanStatus === 'WAIT_SUBMIT'"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | <a-divider type="vertical" /> |
| | | <a-divider type="vertical"/> |
| | | <a-popconfirm |
| | | title="确定提交吗?" |
| | | @confirm="() => handleSubmit(record.id)" |
| | | > |
| | | <a>提交</a> |
| | | </a-popconfirm> |
| | | <a-divider type="vertical" /> |
| | | <a-divider type="vertical"/> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
| | | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a |
| | |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </template> |
| | | |
| | | <template v-if="record.leanStatus === 'WAIT_RETURN'"> |
| | | <a-popconfirm title='确定归还吗?' @confirm='() => equipmentReturn(record.id)'> |
| | | <a>归还</a> |
| | | </a-popconfirm> |
| | | <a-divider type='vertical' /> |
| | | <a @click='handleDetail(record)'>详情</a> |
| | | <a-divider type='vertical'/> |
| | | </template> |
| | | <template v-if="record.leanStatus !== 'WAIT_RETURN' && record.leanStatus !== 'WAIT_SUBMIT'"> |
| | | |
| | | <template v-if="record.leanStatus !== 'WAIT_SUBMIT'"> |
| | | <a |
| | | href="javascript:;" |
| | | @click="handleDetail(record)" |
| | |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></eamEquipmentLeanOut-modal> |
| | | |
| | | <!--审批弹窗--> |
| | | <equipment-lean-out-and-return-approval-modal ref="approvalModal" |
| | | :selectShenpiData="selectRowData"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/assets/less/TableExpand.less' |
| | | import EamEquipmentLeanOutModal from './modules/EamEquipmentLeanOutModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | import { getAction } from '@api/manage' |
| | | import '@/assets/less/TableExpand.less' |
| | | import EamEquipmentLeanOutModal from './modules/EamEquipmentLeanOutModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | import { getAction } from '@api/manage' |
| | | import EquipmentLeanOutAndReturnApprovalModal |
| | | from '../../flowable/workflow/leanOut/EquipmentLeanOutAndReturnApprovalModal' |
| | | |
| | | export default { |
| | | name: 'EamEquipmentLeanOutList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | LxSearchEquipmentSelect, |
| | | EamEquipmentLeanOutModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '设备借出归还管理页面', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | fixed: 'left', |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '设备编号', |
| | | align: 'center', |
| | | dataIndex: 'equipmentCode', |
| | | fixed: 'left', |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName', |
| | | fixed: 'left', |
| | | }, |
| | | { |
| | | title: '单据号', |
| | | align: 'center', |
| | | dataIndex: 'code' |
| | | }, |
| | | { |
| | | title: '借入车间', |
| | | align: 'center', |
| | | dataIndex: 'leanDepartId_dictText' |
| | | }, |
| | | { |
| | | title: '借入人', |
| | | align: 'center', |
| | | dataIndex: 'leanPerson_dictText' |
| | | }, |
| | | { |
| | | title: '借用原因', |
| | | align: 'center', |
| | | dataIndex: 'leanReason' |
| | | }, |
| | | { |
| | | title: '借用状态', |
| | | align: 'center', |
| | | dataIndex: 'leanStatus_dictText' |
| | | }, |
| | | { |
| | | title: '借用开始时间', |
| | | align: 'center', |
| | | dataIndex: 'leanStartTime' |
| | | }, |
| | | { |
| | | title: '借用归还时间', |
| | | align: 'center', |
| | | dataIndex: 'leanEndTime' |
| | | }, |
| | | { |
| | | title: '备注', |
| | | align: 'center', |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/eamEquipmentLeanOut/list', |
| | | delete: '/eam/eamEquipmentLeanOut/delete', |
| | | deleteBatch: '/eam/eamEquipmentLeanOut/deleteBatch', |
| | | submit: '/eam/eamEquipmentLeanOut/submit', |
| | | equipmentReturn: '/eam/eamEquipmentLeanOut/equipmentReturn', |
| | | } |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | equipmentReturn(id) { |
| | | if (!this.url.equipmentReturn) { |
| | | this.$message.error('请设置url.submit属性!') |
| | | return |
| | | } |
| | | let that = this |
| | | getAction(that.url.equipmentReturn, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | export default { |
| | | name: 'EamEquipmentLeanOutList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EquipmentLeanOutAndReturnApprovalModal, |
| | | LxSearchEquipmentSelect, |
| | | EamEquipmentLeanOutModal |
| | | }, |
| | | handleSubmit(id) { |
| | | if (!this.url.submit) { |
| | | this.$message.error('请设置url.submit属性!') |
| | | return |
| | | } |
| | | let that = this |
| | | getAction(that.url.submit, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | data() { |
| | | return { |
| | | description: '设备借出归还管理页面', |
| | | selectRowData: {}, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | fixed: 'left', |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '设备编号', |
| | | align: 'center', |
| | | dataIndex: 'equipmentCode', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '单据号', |
| | | align: 'center', |
| | | dataIndex: 'code' |
| | | }, |
| | | { |
| | | title: '借入车间', |
| | | align: 'center', |
| | | dataIndex: 'leanDepartId_dictText' |
| | | }, |
| | | { |
| | | title: '借入人', |
| | | align: 'center', |
| | | dataIndex: 'leanPerson_dictText' |
| | | }, |
| | | { |
| | | title: '借用原因', |
| | | align: 'center', |
| | | dataIndex: 'leanReason' |
| | | }, |
| | | { |
| | | title: '借用状态', |
| | | align: 'center', |
| | | dataIndex: 'leanStatus_dictText' |
| | | }, |
| | | { |
| | | title: '借用开始时间', |
| | | align: 'center', |
| | | dataIndex: 'leanStartTime' |
| | | }, |
| | | { |
| | | title: '借用归还时间', |
| | | align: 'center', |
| | | dataIndex: 'leanEndTime' |
| | | }, |
| | | { |
| | | title: '备注', |
| | | align: 'center', |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/eamEquipmentLeanOut/list', |
| | | delete: '/eam/eamEquipmentLeanOut/delete', |
| | | deleteBatch: '/eam/eamEquipmentLeanOut/deleteBatch', |
| | | submit: '/eam/eamEquipmentLeanOut/submit', |
| | | equipmentReturn: '/eam/eamEquipmentLeanOut/equipmentReturn' |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | equipmentReturn(id) { |
| | | this.loading = true |
| | | let that = this |
| | | getAction(that.url.equipmentReturn, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | that.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleSubmit(id) { |
| | | this.loading = true |
| | | let that = this |
| | | getAction(that.url.submit, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | that.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleDetail(record) { |
| | | this.selectRowData = Object.assign({}, record) |
| | | this.$refs.approvalModal.recordDetail(record) |
| | | this.$refs.approvalModal.title = '详情' |
| | | this.$refs.approvalModal.disableSubmit = true |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |