¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="12"> |
| | | <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="12"> |
| | | <a-form-item label="ç¡®è®¤ç¶æ"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©ç¡®è®¤ç¶æ" v-model="queryParam.confirmStatus" |
| | | dict-code="confirm_status"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="产åæå¤±æ
åµ"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©äº§åæå¤±æ
åµ" v-model="queryParam.productLoss" |
| | | dict-code="yn"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <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 type="info" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleBatchPrint" type="primary" icon="monitor" :disabled="selectedRowKeys.length===0">æ¹éé¢è§ |
| | | </a-button> |
| | | <a-button icon="delete" type="danger" @click="batchDel" :disabled="selectedRowKeys.length===0">æ¹éå é¤</a-button> |
| | | </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" :scroll="{x:'max-content'}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <template v-if="record.confirmStatus==='PENDING_SUBMIT'"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | <a-divider type="vertical"/> |
| | | <a-popconfirm title="ç¡®å®æäº¤å?" @confirm="() => handleSubmit(record.id)"> |
| | | <a>æäº¤</a> |
| | | </a-popconfirm> |
| | | </template> |
| | | |
| | | <a v-else @click="handleDetail(record)">详æ
</a> |
| | | </span> |
| | | |
| | | <!--å符串è¶
é¿æªåçç¥å·æ¾ç¤º--> |
| | | <span slot="qualityAnalysis" slot-scope="text"> |
| | | <j-ellipsis :value="text" :length="8"/> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <eamReportProductHazards-modal ref="modalForm" @ok="modalFormOk"></eamReportProductHazards-modal> |
| | | |
| | | <!--审æ¹çªå£--> |
| | | <report-product-hazards-approval-modal ref="reportProductHazardsApprovalModal" |
| | | :selectShenpiData="selectedRowData"/> |
| | | |
| | | <!--æ¹éæå°å¼¹çª--> |
| | | <eam-product-hazards-batch-print-modal ref="batchPrintModal"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/assets/less/TableExpand.less' |
| | | import EamReportProductHazardsModal from './modules/EamReportProductHazardsModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction } from '@api/manage' |
| | | import ReportProductHazardsApprovalModal |
| | | from '@views/flowable/workflow/repairOrder/ReportProductHazardsApprovalModal.vue' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | import EamProductHazardsBatchPrintModal from './modules/EamProductHazardsBatchPrintModal' |
| | | |
| | | export default { |
| | | name: 'EamReportProductHazardsList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EamProductHazardsBatchPrintModal, |
| | | LxSearchEquipmentSelect, |
| | | ReportProductHazardsApprovalModal, |
| | | EamReportProductHazardsModal |
| | | }, |
| | | props: { |
| | | isDisplayOperation: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | propsQueryParam: { |
| | | type: Object |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '产åå®å
¨éæ£ç¡®è®¤ç®¡ç页é¢', |
| | | disableMixinCreated: true, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'ç»ä¸ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'equipmentCode', |
| | | fixed: 'left', |
| | | scopedSlots: { customRender: 'equipmentCode' } |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | | align: 'center', |
| | | dataIndex: 'equipmentModel', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'ç¡®è®¤ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'confirmStatus_dictText', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'æ¹æ¬¡å·', |
| | | align: 'center', |
| | | dataIndex: 'batchNumber' |
| | | }, |
| | | { |
| | | title: 'å å·¥é¶ä»¶å·', |
| | | align: 'center', |
| | | dataIndex: 'processingPart' |
| | | }, |
| | | { |
| | | title: 'ä»¶æ°', |
| | | align: 'center', |
| | | dataIndex: 'quantity' |
| | | }, |
| | | { |
| | | title: 'æä½å·¥', |
| | | align: 'center', |
| | | dataIndex: 'confirmer_dictText' |
| | | }, |
| | | { |
| | | title: 'æä½å·¥ç¡®è®¤æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'confirmTime' |
| | | }, |
| | | { |
| | | title: '产åæå¤±æ
åµ', |
| | | align: 'center', |
| | | dataIndex: 'productLoss_dictText' |
| | | }, |
| | | { |
| | | title: '产åæå¤±è´¨éå½±ååæ', |
| | | align: 'center', |
| | | dataIndex: 'qualityAnalysis', |
| | | scopedSlots: { customRender: 'qualityAnalysis' } |
| | | }, |
| | | { |
| | | title: '主管工èº', |
| | | align: 'center', |
| | | dataIndex: 'technologist_dictText' |
| | | }, |
| | | { |
| | | title: '主管工èºç¡®è®¤æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'technologistTime' |
| | | }, |
| | | { |
| | | title: '主管工èºç¡®è®¤æè§', |
| | | align: 'center', |
| | | dataIndex: 'technologistComment' |
| | | }, |
| | | { |
| | | title: 'é¨çº§é¢å¯¼', |
| | | align: 'center', |
| | | dataIndex: 'deputyDepartment_dictText' |
| | | }, |
| | | { |
| | | title: 'é¨çº§é¢å¯¼ç¡®è®¤æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'deputyDepartmentTime' |
| | | }, |
| | | { |
| | | title: 'é¨çº§é¢å¯¼ç¡®è®¤æè§', |
| | | align: 'center', |
| | | dataIndex: 'deputyDepartmentComment' |
| | | }, |
| | | { |
| | | title: 'HFç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'hfCode' |
| | | } |
| | | ], |
| | | selectedRowData: {}, |
| | | url: { |
| | | list: '/eam/eamReportProductHazards/list', |
| | | delete: '/eam/eamReportProductHazards/delete', |
| | | deleteBatch: '/eam/eamReportProductHazards/deleteBatch', |
| | | exportXlsUrl: 'eam/eamReportProductHazards/exportXls', |
| | | importExcelUrl: 'eam/eamReportProductHazards/importExcel', |
| | | submit: '/eam/eamReportProductHazards/submit' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | if (!this.isDisplayOperation) this.queryParam = Object.assign({}, this.propsQueryParam) |
| | | else { |
| | | const operationColumn = { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | width: 200, |
| | | fixed: 'right' |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | | } |
| | | this.loadData(1) |
| | | }, |
| | | methods: { |
| | | /** |
| | | * ç¹å»æäº¤æ¶è§¦å |
| | | * @param id |
| | | */ |
| | | handleSubmit(id) { |
| | | this.loading = true |
| | | getAction(this.url.submit, { id }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | this.loadData() |
| | | } else { |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | this.loading = false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // æ¹éæå° |
| | | handleBatchPrint() { |
| | | this.$refs.batchPrintModal.handlePreview(this.selectedRowKeys.join()) |
| | | }, |
| | | |
| | | /** |
| | | * ç¹å»è¯¦æ
æ¶è§¦åæ¶è§¦å |
| | | * @param record |
| | | */ |
| | | handleDetail(record) { |
| | | this.selectedRowData = Object.assign({}, record) |
| | | this.$refs.reportProductHazardsApprovalModal.title = '详æ
' |
| | | this.$refs.reportProductHazardsApprovalModal.disableSubmit = true |
| | | this.$refs.reportProductHazardsApprovalModal.visible = true |
| | | this.$refs.reportProductHazardsApprovalModal.handleDetail(record) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |