¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | title="è®¾å¤æ£å®å·¥å" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="å·¥åç¼ç "> |
| | | <a-input |
| | | placeholder="请è¾å
¥å·¥åç¼ç " |
| | | v-model="queryParam.num" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!-- <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="ç¹æ£æ¹æ³åç§°"> |
| | | <j-input |
| | | placeholder="请è¾å
¥ç¹æ£æ¹æ³åç§°" |
| | | v-model="queryParam.name" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> --> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <span |
| | | style="float: left;overflow: hidden;" |
| | | class="table-page-search-submitButtons" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left: 8px" |
| | | >éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢</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" |
| | | :scroll="{ x: 'calc(2000px + 50%)', y: 900 }" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange" |
| | | :rowSelection="rowSelection" |
| | | :customRow="clickThenSelect" |
| | | > |
| | | <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" --> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a-popconfirm |
| | | title="ç¡®å®ä¸åå·¥åå?" |
| | | @confirm="() => handleOrderIssue(record)" |
| | | > |
| | | <a v-if="record.status === '1'">ä¸å</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | v-if="record.status === '1'" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | v-if="record.status === '1'" |
| | | @click="handleEdit(record)" |
| | | >ç¼è¾</a> |
| | | <a-divider |
| | | v-if="record.status === '1'" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | v-if="record.status === '2' " |
| | | @click="handleOrderExe(record)" |
| | | >æ§è¡</a> |
| | | <a-divider |
| | | v-if="record.status === '2'" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | v-if="record.status === '4'" |
| | | @click="handleOrderExe(record)" |
| | | >æ¥ç</a> |
| | | <a-divider |
| | | v-if="record.status === '4'" |
| | | type="vertical" |
| | | /> |
| | | <a-popconfirm |
| | | title="ç¡®å®æ¤åå·¥åå?" |
| | | @confirm="() => handleOrderReset(record,'1')" |
| | | > |
| | | <a v-if="record.status === '2'">æ¤å</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | v-if="record.status === '2'" |
| | | type="vertical" |
| | | /> |
| | | <a-popconfirm |
| | | title="ç¡®å®æ¤åå·¥åå?" |
| | | @confirm="() => handleOrderReset(record,'2')" |
| | | > |
| | | <a v-if="record.status === '4'">æ¤å</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | v-if="record.status === '4'" |
| | | type="vertical" |
| | | /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a v-if="record.status === '1'">å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | <span |
| | | slot="num" |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | v-if="record.status === '3' || record.status === '2' " |
| | | class="lot" |
| | | @click="handleOrderExe(record)" |
| | | >{{record.num}}</a> |
| | | |
| | | <span v-else>{{record.num}}</span> |
| | | </span> |
| | | </a-table> |
| | | <a-tabs |
| | | type="card" |
| | | defaultActiveKey="1" |
| | | > |
| | | <a-tab-pane |
| | | key="1" |
| | | forceRender |
| | | > |
| | | <span slot="tab"> |
| | | <a-badge>ç²¾åº¦åæ° </a-badge> |
| | | </span> |
| | | <div |
| | | class="table-operator" |
| | | style="margin:10px" |
| | | > |
| | | <equipment-precision-parameters-list ref="PrecisionParametersList"></equipment-precision-parameters-list> |
| | | </div> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane |
| | | key="2" |
| | | forceRender |
| | | > |
| | | <span slot="tab"> |
| | | <a-badge>æ£å®æ¥å </a-badge> |
| | | </span> |
| | | <div |
| | | class="table-operator" |
| | | style="margin:10px" |
| | | > |
| | | <equipment-calibration-order-report-list ref="EquipmentCalibrationOrderReportList"></equipment-calibration-order-report-list> |
| | | </div> |
| | | </a-tab-pane> |
| | | |
| | | </a-tabs> |
| | | </div> |
| | | |
| | | <equipment-calibration-order-modal |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></equipment-calibration-order-modal> |
| | | |
| | | <equipment-calibration-order-exe-drawer |
| | | ref="EquipmentCalibrationOrderExeDrawer" |
| | | @ok="modalFormOk" |
| | | ></equipment-calibration-order-exe-drawer> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EquipmentCalibrationOrderModal from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal' |
| | | import EquipmentCalibrationOrderExeDrawer from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer' |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import EquipmentPrecisionParametersList from './modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList' |
| | | import EquipmentCalibrationOrderReportList from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList' |
| | | |
| | | export default { |
| | | name: 'EquipmentCalibrationOrder', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | EquipmentCalibrationOrderModal, |
| | | EquipmentCalibrationOrderExeDrawer, |
| | | EquipmentPrecisionParametersList, |
| | | EquipmentCalibrationOrderReportList, |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'è®¾å¤æ£å®å·¥å', |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '50'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | align: "center", |
| | | dataIndex: 'status_dictText' |
| | | }, |
| | | { |
| | | title: 'å·¥åå·', |
| | | align: "center", |
| | | dataIndex: 'num', |
| | | // scopedSlots: { customRender: 'num' } |
| | | }, |
| | | { |
| | | title: 'æ£å®æ¹å¼', |
| | | align: "center", |
| | | dataIndex: 'calibrationType_dictText', |
| | | }, |
| | | { |
| | | title: '设å¤ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'equipmentNum', |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: "center", |
| | | dataIndex: 'equipmentName', |
| | | }, |
| | | { |
| | | title: 'åå·', |
| | | align: "center", |
| | | dataIndex: 'equipmentModel', |
| | | }, |
| | | { |
| | | title: 'è§æ ¼', |
| | | align: "center", |
| | | dataIndex: 'equipmentSpecification', |
| | | }, |
| | | { |
| | | title: 'å¤å®ä¾æ®', |
| | | align: "center", |
| | | dataIndex: 'managementMode_dictText', |
| | | }, |
| | | |
| | | { |
| | | title: 'å¤å®ç»æ', |
| | | align: "center", |
| | | dataIndex: 'calibrationResult' |
| | | }, |
| | | { |
| | | title: 'å建人', |
| | | align: "center", |
| | | dataIndex: 'createBy' |
| | | }, |
| | | { |
| | | title: 'åå»ºæ¥æ', |
| | | align: "center", |
| | | dataIndex: 'createTime' |
| | | }, |
| | | { |
| | | title: 'æ£å®äºº', |
| | | align: "center", |
| | | dataIndex: 'calibrationUserId_dictText' |
| | | }, |
| | | { |
| | | title: '宿æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'calibrationTime' |
| | | }, |
| | | { |
| | | title: 'ä¸åæ¶é´', |
| | | align: "center", |
| | | dataIndex: 'issueTime' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 300, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/calibrationOrder/listNew", |
| | | delete: "/eam/calibrationOrder/delete", |
| | | edit: "/eam/calibrationOrder/editStatus", |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | computed: { |
| | | importExcelUrl: function () { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | rowSelection() { |
| | | return { |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.onSelectChange(selectedRowKeys, selectedRows); |
| | | }, |
| | | getCheckboxProps: record => ({ |
| | | props: { |
| | | disabled: record.distable |
| | | }, |
| | | }), |
| | | selectedRowKeys: this.selectedRowKeys, |
| | | }; |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | clickThenSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | if (selectedRowKeys.length == 1) { |
| | | this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = selectedRowKeys[0] |
| | | this.$refs.PrecisionParametersList.calibrationOrderId = selectedRowKeys[0] |
| | | } else { |
| | | this.$refs.PrecisionParametersList.calibrationOrderId = '-1' |
| | | this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = '-1' |
| | | } |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | }, |
| | | |
| | | handleOrderExe(record) { |
| | | this.$refs.EquipmentCalibrationOrderExeDrawer.visible = true |
| | | this.$refs.EquipmentCalibrationOrderExeDrawer.title = 'æ£å®å·¥åæ§è¡' |
| | | this.$refs.EquipmentCalibrationOrderExeDrawer.handleShow(record) |
| | | if (record.status === '4') { |
| | | this.$refs.EquipmentCalibrationOrderExeDrawer.buttonDistable = true//ä¿åãæåãæ¥å·¥ |
| | | this.$refs.EquipmentCalibrationOrderExeDrawer.revocationDistable = true//æ¤éæé® |
| | | this.$refs.EquipmentCalibrationOrderExeDrawer.SWbuttonDistable = true//æäº¤æé® |
| | | } else if (record.status === '2') { |
| | | this.$refs.EquipmentCalibrationOrderExeDrawer.buttonDistable = false//ä¿åãæåãæ¥å·¥ |
| | | this.$refs.EquipmentCalibrationOrderExeDrawer.revocationDistable = true//æ¤éæé® |
| | | this.$refs.EquipmentCalibrationOrderExeDrawer.SWbuttonDistable = false//æäº¤æé® |
| | | } |
| | | |
| | | }, |
| | | |
| | | handleOrderIssue(record) { |
| | | const that = this; |
| | | requestPut(that.url.edit, { id: record.id, status: '2' }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("å·¥åä¸åæåï¼") |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning("å·¥åä¸å失败ï¼") |
| | | } |
| | | }) |
| | | }, |
| | | //æ¤å |
| | | handleOrderReset(record, status) { |
| | | const that = this; |
| | | requestPut(that.url.edit, { id: record.id, status: status }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success("工忤åæåï¼") |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning("工忤å失败ï¼") |
| | | } |
| | | }) |
| | | }, |
| | | searchQuery() { |
| | | this.$refs.PrecisionParametersList.calibrationOrderId = '-1' |
| | | this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = '-1' |
| | | this.loadData(1); |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {}; |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | this.$refs.PrecisionParametersList.calibrationOrderId = '-1' |
| | | this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = '-1' |
| | | this.loadData(1); |
| | | }, |
| | | |
| | | modalFormOk() { |
| | | // æ°å¢/ä¿®æ¹ æåæ¶ï¼éè½½å表 |
| | | this.loadData() |
| | | //æ¸
空å表éä¸ |
| | | this.onClearSelected() |
| | | |
| | | this.$refs.PrecisionParametersList.calibrationOrderId = '-1' |
| | | this.$refs.EquipmentCalibrationOrderReportList.calibrationOrderId = '-1' |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |