From 8611a1ba1696e76cced04ff5d658ba138a05dafd Mon Sep 17 00:00:00 2001 From: zenglf <18502938215@163.com> Date: 星期六, 19 八月 2023 14:37:32 +0800 Subject: [PATCH] 设备管理前端代码提交 截止 20230819 13:55 分 --- src/views/spare/modules/sparePartOutbound/SparePartOutboundModal.vue | 10 src/views/eam/EquipmentImportanceList.vue | 2 src/views/spare/SparePartOutboundList.vue | 66 src/views/eam/modules/equipmentReturn/EquipmentUnloadingReturnDetail.vue | 5 src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue | 51 src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue | 390 +- src/views/eam/modules/equipmentChange/EquipmentChangeDetailModal.vue | 17 src/views/eam/modules/equipmentUnseal/EquipmentUnsealForm.vue | 318 +- src/views/spare/modules/sparePartPurchaseStorage/SparePartPurchaseStorageModal.vue | 16 src/views/eam/repairOrderFinishedReport/modules/JSelectSparePartModal.vue | 4 src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderForm.vue | 222 + src/views/eam/modules/equipmentBorrow/EquipmentUnloadingBorrowDetail.vue | 5 src/views/eam/EquipmentUnloadingBorrowList.vue | 36 src/views/eam/modules/equipmentDisposal/EquipmentDisposalDetailList.vue | 42 src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue | 146 + src/views/eam/EquipmentChangeList.vue | 36 src/views/eam/EquipmentUnloadingReturnList.vue | 36 src/views/eam/modules/equipmentReturn/EquipmentUnloadingReturnDetailModal.vue | 19 src/views/eam/MalfunctionRepair.vue | 114 src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderDetailList.vue | 419 +-- src/views/spare/SparePartCancellingStocksList.vue | 97 src/views/eam/modules/equipmentScrap/EquipmentScrapDetailList.vue | 2 src/views/eam/RepairOrderList.vue | 193 - src/views/eam/EquipmentUnsealList.vue | 240 + src/views/eam/ProjectMaintenanceOrderList.vue | 356 +- src/views/eam/RepairOrderFaultAnalysisList.vue | 270 + src/views/spare/modules/sparePartReceive/SparePartReceiveForm.vue | 17 src/views/spare/modules/sparePartScrapRequirement/SpareSelectList.vue | 1 src/views/eam/repairOrderFinishedReport/modules/JSelectUserTeamlModal.vue | 4 src/views/eam/modules/equipmentDisposal/EquipmentDisposalForm.vue | 211 src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue | 157 src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue | 6 src/views/eam/EquipmentTransferInList.vue | 16 src/views/eam/modules/equipment/EquipmentModel.vue | 47 src/views/eam/modules/equipmentBorrow/EquipmentUnloadingBorrowDetailModal.vue | 12 src/views/eam/RepairOrderFinishedReport.vue | 2 src/views/spare/SparePartScrapList.vue | 78 src/views/spare/SparePartPurchaseStorageList.vue | 244 +- .gitignore | 2 src/views/eam/modules/projectMaintenanceOrder/ApprovelModal.vue | 219 ++ src/views/eam/modules/equipmentChange/EquipmentChangeDetail.vue | 56 src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportDrawerList.vue | 15 src/views/eam/modules/equipmentTransferIn/EquipmentTransferInDetail.vue | 8 src/views/eam/EquipmentTransferList.vue | 18 src/views/eam/EquipmentSealList.vue | 533 ++-- src/views/eam/modules/malfunctionRepair/MalfunctionRepaireModal.vue | 74 src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderModal.vue | 89 src/views/spare/modules/sparePartScrapRequirement/SparePartScrapRequirementForm.vue | 16 src/views/eam/modules/equipmentScrap/EquipmentScrapModal.vue | 3 src/views/spare/SparePartScrapRequirementList.vue | 63 src/views/spare/modules/sparePartScrap/SparePartScrapDetailList.vue | 72 src/views/spare/modules/sparePartScrap/SparePartScrapForm.vue | 26 src/views/eam/modules/equipmentTransfer/EquipmentTransferOutDetail.vue | 3 src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer.vue | 6 src/views/eam/modules/repairorder/moudles/RepairOrderActualMaterialReport.vue | 16 src/views/eam/EquipmentScrapList.vue | 12 src/views/eam/DailyMaintenanceStandardList.vue | 20 src/views/eam/EquipmentCalibrationOrder.vue | 12 src/views/eam/modules/specialtyMaintenanceOrder/ActualWorkHoursEditTable.vue | 16 src/views/spare/modules/sparePartScrapRequirement/SparePartScrapRequirementDetailList.vue | 18 src/views/spare/SparePartReceiveList.vue | 63 src/views/eam/modules/repairorder/moudles/RepairOrderActualHoursReport.vue | 87 src/views/eam/modules/equipmentTransferIn/EquipmentTransferInDetailModal.vue | 20 src/views/eam/FaultDescriptionList.vue | 159 src/views/eam/modules/equipmentSeal/EquipmentSealDetailList.vue | 457 ++-- src/views/eam/EquipmentDisposalList.vue | 10 src/views/eam/modules/equipmentTransfer/EquipmentTransferOutDetailModal.vue | 19 src/views/eam/modules/equipmentUnseal/EquipmentUnsealDetailList.vue | 430 ++- src/views/spare/modules/sparePartReceive/SparePartReceiveDeatilList.vue | 22 69 files changed, 3,720 insertions(+), 2,751 deletions(-) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eb8350a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/node_modules/ +/.idea diff --git a/src/views/eam/DailyMaintenanceStandardList.vue b/src/views/eam/DailyMaintenanceStandardList.vue index 643a8eb..f61a8d7 100644 --- a/src/views/eam/DailyMaintenanceStandardList.vue +++ b/src/views/eam/DailyMaintenanceStandardList.vue @@ -336,16 +336,16 @@ align: 'center', dataIndex: 'createTime', }, - { - title: '鏇存柊浜�', - align: 'center', - dataIndex: 'updateBy', - }, - { - title: '鏇存柊鏃ユ湡', - align: 'center', - dataIndex: 'updateTime', - }, + // { + // title: '鏇存柊浜�', + // align: 'center', + // dataIndex: 'updateBy', + // }, + // { + // title: '鏇存柊鏃ユ湡', + // align: 'center', + // dataIndex: 'updateTime', + // }, { title: '鎿嶄綔', dataIndex: 'action', diff --git a/src/views/eam/EquipmentCalibrationOrder.vue b/src/views/eam/EquipmentCalibrationOrder.vue index 6b2b9d4..94c693b 100644 --- a/src/views/eam/EquipmentCalibrationOrder.vue +++ b/src/views/eam/EquipmentCalibrationOrder.vue @@ -257,6 +257,18 @@ 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: [ { diff --git a/src/views/eam/EquipmentChangeList.vue b/src/views/eam/EquipmentChangeList.vue index 55b82d5..5bfa910 100644 --- a/src/views/eam/EquipmentChangeList.vue +++ b/src/views/eam/EquipmentChangeList.vue @@ -101,15 +101,15 @@ @change='handleTableChange' > - <span +<!-- <span slot='action' slot-scope='text, record' > - <a v-if="record.auditStatus === 'notSubmitted'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'" @click='handleEdit(record)'>缂栬緫</a> <a v-if="record.auditStatus === 'pendingApproval'" @click='handleApprove(record)'>瀹℃壒</a> - <a-divider v-if="record.auditStatus === 'notSubmitted'" type='vertical' /> - <a-dropdown v-if="record.auditStatus === 'notSubmitted'"> + <a-divider v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'" type='vertical' /> + <a-dropdown v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'"> <a class='ant-dropdown-link'>鏇村 <a-icon type='down' /></a> <a-menu slot='overlay'> <a-menu-item> @@ -121,8 +121,34 @@ </a-menu> </a-dropdown> - </span> + </span>--> + <span + slot='action' + slot-scope='text, record' + > + <a v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.auditStatus === 'pendingApproval'" @click='handleApprove(record)'>瀹℃壒</a> + <a-divider + v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected' || record.auditStatus === 'pendingApproval'" + 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 v-if="record.auditStatus === 'notSubmitted'||record.auditStatus === 'Rejected'"> + <a-popconfirm title='纭畾鍒犻櫎鍚�?' + @confirm='() => handleDelete(record.id)'> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + + </a-menu> + </a-dropdown> + </span> </a-table> <a-tabs defaultActiveKey='1'> <a-tab-pane diff --git a/src/views/eam/EquipmentDisposalList.vue b/src/views/eam/EquipmentDisposalList.vue index 74be0df..9c6c8e9 100644 --- a/src/views/eam/EquipmentDisposalList.vue +++ b/src/views/eam/EquipmentDisposalList.vue @@ -1,5 +1,5 @@ <template> - <a-card :bordered="false"> + <a-card :bordered="false" title="璁惧澶勭疆"> <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> @@ -111,7 +111,7 @@ slot-scope="text, record" > <a-popconfirm - v-if="record.auditStatus == 'notSubmitted'" + v-if="record.auditStatus == 'notSubmitted'||record.auditStatus =='Rejected'" title="纭鎻愪氦鍚�?" @confirm="() =>handleCommit(record,'commit')" > @@ -126,16 +126,16 @@ </a-popconfirm> <a-divider - v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'" + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'||record.auditStatus =='Rejected'" type="vertical" /> <a - v-if="record.auditStatus == 'notSubmitted' " + v-if="record.auditStatus == 'notSubmitted'||record.auditStatus =='Rejected' " @click="handleEdit(record)" >缂栬緫</a> <a v-if="record.auditStatus == 'pendingApproval'" @click="handleApprove(record)">瀹℃壒</a> <a-divider - v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'" + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'||record.auditStatus =='Rejected'" type="vertical" /> <a-dropdown> diff --git a/src/views/eam/EquipmentImportanceList.vue b/src/views/eam/EquipmentImportanceList.vue index 4d91541..3ad9142 100644 --- a/src/views/eam/EquipmentImportanceList.vue +++ b/src/views/eam/EquipmentImportanceList.vue @@ -1,5 +1,5 @@ <template> - <a-card :bordered="false"> + <a-card :bordered="false" title='閲嶈搴�'> <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form diff --git a/src/views/eam/EquipmentScrapList.vue b/src/views/eam/EquipmentScrapList.vue index 79611d4..dad5582 100644 --- a/src/views/eam/EquipmentScrapList.vue +++ b/src/views/eam/EquipmentScrapList.vue @@ -1,5 +1,5 @@ <template> - <a-card :bordered="false"> + <a-card :bordered="false" title="璁惧鎶ュ簾"> <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> @@ -127,7 +127,7 @@ slot-scope="text, record" > <a-popconfirm - v-if="record.auditStatus == 'notSubmitted'" + v-if="record.auditStatus == 'notSubmitted'||record.auditStatus =='Rejected'" title="纭鎻愪氦鍚�?" @confirm="() =>handleCommit(record,'commit')" > @@ -142,16 +142,16 @@ </a-popconfirm> <a-divider - v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'" + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'||record.auditStatus =='Rejected'" type="vertical" /> <a - v-if="record.auditStatus == 'notSubmitted' " + v-if="record.auditStatus == 'notSubmitted' ||record.auditStatus =='Rejected'" @click="handleEdit(record)" >缂栬緫</a> <a v-if="record.auditStatus == 'pendingApproval'" @click="handleApprove(record)">瀹℃壒</a> <a-divider - v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'" + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'||record.auditStatus =='Rejected'" type="vertical" /> <a-dropdown> @@ -209,7 +209,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import EquipmentScrapModal from './modules/equipmentScrap/EquipmentScrapModal.vue' -import EquipmentScrapDetailList from './modules/equipmentScrap/EquipmentScrapDetailList.vue' +import EquipmentScrapDetailList from './modules/equipmentScrap/EquipmentScrapDetailList' import { getAction,postAction } from '@/api/manage' import { initDictOptions, filterMultiDictText } from '@/components/dict/JDictSelectUtil' import JEllipsis from '@/components/jeecg/JEllipsis' diff --git a/src/views/eam/EquipmentSealList.vue b/src/views/eam/EquipmentSealList.vue index 4ea51a2..a2ee311 100644 --- a/src/views/eam/EquipmentSealList.vue +++ b/src/views/eam/EquipmentSealList.vue @@ -1,17 +1,40 @@ <template> - <a-card :bordered="false"> + <a-card + title='璁惧灏佸瓨' + :bordered="false" + > <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > <a-row :gutter="24"> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="鍗曟嵁鍙�"> - <a-input placeholder="璇疯緭鍏ュ崟鎹彿" v-model="queryParam.num"></a-input> + <a-input + placeholder="璇疯緭鍏ュ崟鎹彿" + v-model="queryParam.num" + ></a-input> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="瀹℃壒鐘舵��"> - <j-dict-select-tag placeholder="璇烽�夋嫨瀹℃壒鐘舵��" v-model="queryParam.auditStatus" dictCode="audit_status"/> + <j-dict-select-tag + placeholder="璇烽�夋嫨瀹℃壒鐘舵��" + v-model="queryParam.auditStatus" + dictCode="audit_status" + /> </a-form-item> </a-col> <!-- <template v-if="toggleSearchStatus"> @@ -23,10 +46,27 @@ </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 type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + <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="primary" + @click="searchReset" + icon="reload" + style="margin-left: 8px" + >閲嶇疆</a-button> <!-- <a @click="handleToggleSearch" style="margin-left: 8px"> {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> @@ -40,30 +80,14 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> - <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - <!-- <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].auditStatus==='notSubmitted'" @click="handleSubmit" type="primary" icon="check">鎻愪氦</a-button> - <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].auditStatus === 'pendingApproval'" @click="handleRevocation" type="primary" icon="rollback">鎾ゅ洖</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>--> - <!-- 楂樼骇鏌ヨ鍖哄煙 --> -<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> -<!-- <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>--> + <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" @@ -77,24 +101,48 @@ :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" :customRow="clickThenSelect" - @change="handleTableChange"> + @change="handleTableChange" + > - <template slot="htmlSlot" slot-scope="text"> + <template + slot="htmlSlot" + slot-scope="text" + > <div v-html="text"></div> </template> - <template slot="imgSlot" slot-scope="text,record"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + <template + slot="imgSlot" + slot-scope="text,record" + > + <span + v-if="!text" + style="font-size: 12px;font-style: italic;" + >鏃犲浘鐗�</span> + <img + v-else + :src="getImgView(text)" + :preview="record.id" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> </template> - <template slot="fileSlot" slot-scope="text"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> + <template + slot="fileSlot" + slot-scope="text" + > + <span + v-if="!text" + style="font-size: 12px;font-style: italic;" + >鏃犳枃浠�</span> <a-button v-else :ghost="true" type="primary" icon="download" size="small" - @click="downloadFile(text)"> + @click="downloadFile(text)" + > 涓嬭浇 </a-button> </template> @@ -103,32 +151,35 @@ slot="action" slot-scope="text, record" > - <a-popconfirm - v-if="record.auditStatus == 'notSubmitted'" - title="纭鎻愪氦鍚�?" - @confirm="() =>handleCommit(record, 'commit')" - > - <a>鎻愪氦</a> - </a-popconfirm> - <a-popconfirm - v-if="record.auditStatus == 'pendingApproval'" - title="纭鎾ゅ洖鍚�?" - @confirm="() =>handleCommit(record, 'back')" - > - <a>鎾ゅ洖</a> - </a-popconfirm> + <a-popconfirm + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'Rejected'" + title="纭鎻愪氦鍚�?" + @confirm="() =>handleCommit(record, 'commit')" + > + <a>鎻愪氦</a> + </a-popconfirm> + <a-popconfirm + v-if="record.auditStatus == 'pendingApproval'" + title="纭鎾ゅ洖鍚�?" + @confirm="() =>handleCommit(record, 'back')" + > + <a>鎾ゅ洖</a> + </a-popconfirm> <a-divider - v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'" + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval' || record.auditStatus == 'Rejected'" type="vertical" /> <a - v-if="record.auditStatus == 'notSubmitted' " + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'Rejected'" @click="handleEdit(record)" >缂栬緫</a> - <a v-if="record.auditStatus == 'pendingApproval'" @click="handleApprove(record)">瀹℃壒</a> + <a + v-if="record.auditStatus == 'pendingApproval'" + @click="handleApprove(record)" + >瀹℃壒</a> <a-divider - v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'" + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval' || record.auditStatus == 'Rejected'" type="vertical" /> <a-dropdown> @@ -173,199 +224,209 @@ </div> <a-tabs defaultActiveKey="1"> - <a-tab-pane tab="璁惧灏佸瓨鏄庣粏" key="1" > + <a-tab-pane + tab="璁惧灏佸瓨鏄庣粏" + key="1" + > <equipment-seal-detail-list :mainId="equipmentSealDetailMainId" /> </a-tab-pane> </a-tabs> - <equipmentSeal-modal ref="modalForm" @ok="modalFormOk"></equipmentSeal-modal> - <approvel-modal ref="approvalModalForm" @ok='approvalModalFormOk' @cancel='approvalModalFormOk'></approvel-modal> + <equipmentSeal-modal + ref="modalForm" + @ok="modalFormOk" + ></equipmentSeal-modal> + <approvel-modal + ref="approvalModalForm" + @ok='approvalModalFormOk' + @cancel='approvalModalFormOk' + ></approvel-modal> </a-card> </template> <script> - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import EquipmentSealModal from './modules/equipmentSeal/EquipmentSealModal' - import { getAction,postAction } from '@/api/manage' - import EquipmentSealDetailList from './modules/equipmentSeal/EquipmentSealDetailList' - import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil' - import '@/assets/less/TableExpand.less' - import ApprovelModal from './modules/equipmentSeal/ApprovelModal' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import EquipmentSealModal from './modules/equipmentSeal/EquipmentSealModal' +import { getAction, postAction } from '@/api/manage' +import EquipmentSealDetailList from './modules/equipmentSeal/EquipmentSealDetailList' +import { initDictOptions, filterMultiDictText } from '@/components/dict/JDictSelectUtil' +import '@/assets/less/TableExpand.less' +import ApprovelModal from './modules/equipmentSeal/ApprovelModal' - export default { - name: "EquipmentSealList", - mixins:[JeecgListMixin], - components: { - EquipmentSealDetailList, - EquipmentSealModal, - ApprovelModal +export default { + name: "EquipmentSealList", + mixins: [JeecgListMixin], + components: { + EquipmentSealDetailList, + EquipmentSealModal, + ApprovelModal + }, + data() { + return { + description: '璁惧灏佸瓨绠$悊椤甸潰', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title: '瀹℃壒鐘舵��', + align: "center", + dataIndex: 'auditStatus_dictText' + }, + { + title: '鍗曟嵁鍙�', + align: "center", + sorter: true, + dataIndex: 'num' + }, + { + title: '鍒涘缓浜�', + align: "center", + dataIndex: 'createBy' + }, + { + title: '鍒涘缓鏃堕棿', + align: "center", + dataIndex: 'createTime', + // customRender:function (text) { + // return !text?"":(text.length>10?text.substr(0,10):text) + // } + }, + { + title: '淇敼浜�', + align: "center", + dataIndex: 'updateBy' + }, + { + title: '淇敼鏃堕棿', + align: "center", + dataIndex: 'updateTime', + // customRender:function (text) { + // return !text?"":(text.length>10?text.substr(0,10):text) + // } + }, + { + title: '澶囨敞', + align: "center", + dataIndex: 'remark' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align: "center", + fixed: "right", + width: 147, + scopedSlots: { customRender: 'action' }, + } + ], + url: { + list: "/eam/equipmentSeal/list", + approve: '/eam/equipmentSeal/approve', + delete: "/eam/equipmentSeal/delete", + deleteBatch: "/eam/equipmentSeal/deleteBatch", + exportXlsUrl: "/eam/equipmentSeal/exportXls", + importExcelUrl: "eam/equipmentSeal/importExcel", + submit: 'eam/equipmentSeal/submit', + revocation: 'eam/equipmentSeal/revocation' + }, + dictOptions: { + auditStatus: [], + }, + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 5, + pageSizeOptions: ['5', '10', '50'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + selectedMainId: '', + superFieldList: [], + equipmentSealDetailMainId: '', + } + }, + created() { + this.getSuperFieldList(); + }, + computed: { + importExcelUrl: function () { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + } + }, + methods: { + initDictConfig() { }, - data () { + clickThenSelect(record) { return { - description: '璁惧灏佸瓨绠$悊椤甸潰', - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } - }, - { - title:'瀹℃壒鐘舵��', - align:"center", - dataIndex: 'auditStatus_dictText' - }, - { - title:'鍗曟嵁鍙�', - align:"center", - sorter: true, - dataIndex: 'num' - }, - { - title:'鍒涘缓浜�', - align:"center", - dataIndex: 'createBy' - }, - { - title:'鍒涘缓鏃堕棿', - align:"center", - dataIndex: 'createTime', - // customRender:function (text) { - // return !text?"":(text.length>10?text.substr(0,10):text) - // } - }, - { - title:'淇敼浜�', - align:"center", - dataIndex: 'updateBy' - }, - { - title:'淇敼鏃堕棿', - align:"center", - dataIndex: 'updateTime', - // customRender:function (text) { - // return !text?"":(text.length>10?text.substr(0,10):text) - // } - }, - { - title:'澶囨敞', - align:"center", - dataIndex: 'remark' - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align:"center", - fixed:"right", - width:147, - scopedSlots: { customRender: 'action' }, + on: { + click: () => { + this.onSelectChange(record.id.split(","), [record]); } - ], - url: { - list: "/eam/equipmentSeal/list", - approve: '/eam/equipmentSeal/approve', - delete: "/eam/equipmentSeal/delete", - deleteBatch: "/eam/equipmentSeal/deleteBatch", - exportXlsUrl: "/eam/equipmentSeal/exportXls", - importExcelUrl: "eam/equipmentSeal/importExcel", - submit:'eam/equipmentSeal/submit', - revocation:'eam/equipmentSeal/revocation' - }, - dictOptions:{ - auditStatus:[], - }, - /* 鍒嗛〉鍙傛暟 */ - ipagination:{ - current: 1, - pageSize: 5, - pageSizeOptions: ['5', '10', '50'], - showTotal: (total, range) => { - return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" - }, - showQuickJumper: true, - showSizeChanger: true, - total: 0 - }, - selectedMainId:'', - superFieldList:[], - equipmentSealDetailMainId: '', + } } }, - created() { - this.getSuperFieldList(); + onClearSelected() { + this.selectedRowKeys = []; + this.selectionRows = []; + this.selectedMainId = '' }, - computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + onSelectChange(selectedRowKeys, selectionRows) { + this.selectedMainId = selectedRowKeys[0] + this.selectedRowKeys = selectedRowKeys; + this.selectionRows = selectionRows; + this.equipmentSealDetailMainId = selectionRows[0]['id'] + }, + loadData(arg) { + if (!this.url.list) { + this.$message.error("璇疯缃畊rl.list灞炴��!") + return } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1; + } + this.onClearSelected() + var params = this.getQueryParams();//鏌ヨ鏉′欢 + this.loading = true; + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records; + this.ipagination.total = res.result.total; + } + if (res.code === 510) { + this.$message.warning(res.message) + } + this.loading = false; + }) + this.equipmentSealDetailMainId = '' }, - methods: { - initDictConfig(){ - }, - clickThenSelect(record) { - return { - on: { - click: () => { - this.onSelectChange(record.id.split(","), [record]); - } - } - } - }, - onClearSelected() { - this.selectedRowKeys = []; - this.selectionRows = []; - this.selectedMainId='' - }, - onSelectChange(selectedRowKeys, selectionRows) { - this.selectedMainId=selectedRowKeys[0] - this.selectedRowKeys = selectedRowKeys; - this.selectionRows = selectionRows; - this.equipmentSealDetailMainId = selectionRows[0]['id'] - }, - loadData(arg) { - if(!this.url.list){ - this.$message.error("璇疯缃畊rl.list灞炴��!") - return - } - //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 - if (arg === 1) { - this.ipagination.current = 1; - } - this.onClearSelected() - var params = this.getQueryParams();//鏌ヨ鏉′欢 - this.loading = true; - getAction(this.url.list, params).then((res) => { - if (res.success) { - this.dataSource = res.result.records; - this.ipagination.total = res.result.total; - } - if(res.code===510){ - this.$message.warning(res.message) - } - this.loading = false; - }) - this.equipmentSealDetailMainId='' - }, - getSuperFieldList(){ - let fieldList=[]; - fieldList.push({type:'string',value:'num',text:'鍗曟嵁鍙�',dictCode:''}) - fieldList.push({type:'string',value:'auditStatus',text:'瀹℃壒鐘舵��(鏈彁浜�-notSubmitted銆佸緟瀹℃壒 pendingApproval銆佸鎵逛腑-approvalProcess銆佸凡椹冲洖-Rejected銆佸凡閫氳繃-Approved)',dictCode:'audit_status'}) - fieldList.push({type:'string',value:'changeMethod',text:'鍙樺姩鏂瑰紡(灏佸瓨-seal锛屽惎灏�-unseal,鎶ュ簾-scrap锛屽缃�-disposal)',dictCode:''}) - fieldList.push({type:'string',value:'remark',text:'澶囨敞',dictCode:''}) - fieldList.push({type:'string',value:'createBy',text:'鍒涘缓浜�',dictCode:"sys_user,realname,username"}) - fieldList.push({type:'date',value:'createTime',text:'鍒涘缓鏃堕棿'}) - fieldList.push({type:'string',value:'updateBy',text:'淇敼浜�',dictCode:"sys_user,realname,username"}) - fieldList.push({type:'date',value:'updateTime',text:'淇敼鏃堕棿'}) - this.superFieldList = fieldList - }, - handleCommit(record, type) { - let url + getSuperFieldList() { + let fieldList = []; + fieldList.push({ type: 'string', value: 'num', text: '鍗曟嵁鍙�', dictCode: '' }) + fieldList.push({ type: 'string', value: 'auditStatus', text: '瀹℃壒鐘舵��(鏈彁浜�-notSubmitted銆佸緟瀹℃壒 pendingApproval銆佸鎵逛腑-approvalProcess銆佸凡椹冲洖-Rejected銆佸凡閫氳繃-Approved)', dictCode: 'audit_status' }) + fieldList.push({ type: 'string', value: 'changeMethod', text: '鍙樺姩鏂瑰紡(灏佸瓨-seal锛屽惎灏�-unseal,鎶ュ簾-scrap锛屽缃�-disposal)', dictCode: '' }) + fieldList.push({ type: 'string', value: 'remark', text: '澶囨敞', dictCode: '' }) + fieldList.push({ type: 'string', value: 'createBy', text: '鍒涘缓浜�', dictCode: "sys_user,realname,username" }) + fieldList.push({ type: 'date', value: 'createTime', text: '鍒涘缓鏃堕棿' }) + fieldList.push({ type: 'string', value: 'updateBy', text: '淇敼浜�', dictCode: "sys_user,realname,username" }) + fieldList.push({ type: 'date', value: 'updateTime', text: '淇敼鏃堕棿' }) + this.superFieldList = fieldList + }, + handleCommit(record, type) { + let url type == 'commit' ? record.auditStatus = 'pendingApproval' : record.auditStatus = 'notSubmitted' type == 'commit' ? url = this.url.submit : url = this.url.revocation postAction(url, record).then(res => { @@ -382,10 +443,10 @@ } }) }, - handleApprove: function(record) { + handleApprove: function (record) { let approve approve = this.url.approve - this.$refs.approvalModalForm.showModals(record, approve,'Approved','Rejected') + this.$refs.approvalModalForm.showModals(record, approve, 'Approved', 'Rejected') this.$refs.approvalModalForm.title = '瀹℃壒' this.$refs.approvalModalForm.disableSubmit = false @@ -407,9 +468,9 @@ //this.equipmentSealDetailMainId='' this.loadData(1) }, - } } +} </script> <style scoped> - @import '~@assets/less/common.less'; +@import '~@assets/less/common.less'; </style> \ No newline at end of file diff --git a/src/views/eam/EquipmentTransferInList.vue b/src/views/eam/EquipmentTransferInList.vue index 286c256..5fb81e4 100644 --- a/src/views/eam/EquipmentTransferInList.vue +++ b/src/views/eam/EquipmentTransferInList.vue @@ -1,6 +1,6 @@ <template> <a-card - title='璁惧璋冨嚭' + title='璁惧璋冨叆' :bordered='false' > <div class='table-page-search-wrapper'> @@ -105,14 +105,20 @@ slot='action' slot-scope='text, record' > - <a v-if="record.auditStatus === 'notSubmitted'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'" @click='handleEdit(record)'>缂栬緫</a> <a v-if="record.auditStatus === 'pendingApproval'" @click='handleApprove(record)'>瀹℃壒</a> - <a-divider v-if="record.auditStatus === 'notSubmitted'" type='vertical' /> - <a-dropdown v-if="record.auditStatus === 'notSubmitted'"> + <a-divider + v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected' || record.auditStatus === 'pendingApproval'" + type='vertical' + /> + <a-dropdown> <a class='ant-dropdown-link'>鏇村 <a-icon type='down' /></a> <a-menu slot='overlay'> - <a-menu-item> + <a-menu-item> + <a @click='handleDetail(record)'>璇︽儏</a> + </a-menu-item> + <a-menu-item v-if="record.auditStatus === 'notSubmitted'||record.auditStatus === 'Rejected'"> <a-popconfirm title='纭畾鍒犻櫎鍚�?' @confirm='() => handleDelete(record.id)'> <a>鍒犻櫎</a> diff --git a/src/views/eam/EquipmentTransferList.vue b/src/views/eam/EquipmentTransferList.vue index 4d3989b..a6ff9c2 100644 --- a/src/views/eam/EquipmentTransferList.vue +++ b/src/views/eam/EquipmentTransferList.vue @@ -107,14 +107,20 @@ slot='action' slot-scope='text, record' > - <a v-if="record.auditStatus === 'notSubmitted'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.auditStatus === 'notSubmitted'|| record.auditStatus === 'Rejected'" + @click='handleEdit(record)'>缂栬緫</a> <a v-if="record.auditStatus === 'pendingApproval'" @click='handleApprove(record)'>瀹℃壒</a> - - <a-divider v-if="record.auditStatus === 'notSubmitted'" type='vertical' /> - <a-dropdown v-if="record.auditStatus === 'notSubmitted'"> - <a class='ant-dropdown-link'>鏇村 <a-icon type='down' /></a> + <a-divider + v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected' || record.auditStatus === 'pendingApproval'" + 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 v-if="record.auditStatus === 'notSubmitted'||record.auditStatus === 'Rejected'"> <a-popconfirm title='纭畾鍒犻櫎鍚�?' @confirm='() => handleDelete(record.id)'> <a>鍒犻櫎</a> @@ -323,7 +329,7 @@ }, handleApprove: function(record) { - let reject, approval; + let reject, approval reject = this.url.reject approval = this.url.approval this.$refs.approvalModalForm.showModals(record, reject, approval) diff --git a/src/views/eam/EquipmentUnloadingBorrowList.vue b/src/views/eam/EquipmentUnloadingBorrowList.vue index bb5907f..0cd00c8 100644 --- a/src/views/eam/EquipmentUnloadingBorrowList.vue +++ b/src/views/eam/EquipmentUnloadingBorrowList.vue @@ -99,16 +99,42 @@ :customRow='clickThenSelect' @change='handleTableChange' > +<span + slot='action' + slot-scope='text, record' +> + <a v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.auditStatus === 'pendingApproval'" @click='handleApprove(record)'>瀹℃壒</a> - <span + <a-divider + v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected' || record.auditStatus === 'pendingApproval'" + 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 v-if="record.auditStatus === 'notSubmitted'||record.auditStatus === 'Rejected'"> + <a-popconfirm title='纭畾鍒犻櫎鍚�?' + @confirm='() => handleDelete(record.id)'> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + + </a-menu> + </a-dropdown> + </span> +<!-- <span slot='action' slot-scope='text, record' > - <a v-if="record.auditStatus === 'notSubmitted'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'" @click='handleEdit(record)'>缂栬緫</a> <a v-if="record.auditStatus === 'pendingApproval'" @click='handleApprove(record)'>瀹℃壒</a> - <a-divider v-if="record.auditStatus === 'notSubmitted'" type='vertical' /> - <a-dropdown v-if="record.auditStatus === 'notSubmitted'"> + <a-divider v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'" type='vertical' /> + <a-dropdown v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'"> <a class='ant-dropdown-link'>鏇村 <a-icon type='down' /></a> <a-menu slot='overlay'> <a-menu-item> @@ -120,7 +146,7 @@ </a-menu> </a-dropdown> - </span> + </span>--> </a-table> <a-tabs defaultActiveKey='1'> diff --git a/src/views/eam/EquipmentUnloadingReturnList.vue b/src/views/eam/EquipmentUnloadingReturnList.vue index bc6bdc4..47dc39c 100644 --- a/src/views/eam/EquipmentUnloadingReturnList.vue +++ b/src/views/eam/EquipmentUnloadingReturnList.vue @@ -99,16 +99,42 @@ :customRow='clickThenSelect' @change='handleTableChange' > +<span + slot='action' + slot-scope='text, record' +> + <a v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.auditStatus === 'pendingApproval'" @click='handleApprove(record)'>瀹℃壒</a> - <span + <a-divider + v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected' || record.auditStatus === 'pendingApproval'" + 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 v-if="record.auditStatus === 'notSubmitted'||record.auditStatus === 'Rejected'"> + <a-popconfirm title='纭畾鍒犻櫎鍚�?' + @confirm='() => handleDelete(record.id)'> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + + </a-menu> + </a-dropdown> + </span> +<!-- <span slot='action' slot-scope='text, record' > - <a v-if="record.auditStatus === 'notSubmitted'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'" @click='handleEdit(record)'>缂栬緫</a> <a v-if="record.auditStatus === 'pendingApproval'" @click='handleApprove(record)'>瀹℃壒</a> - <a-divider v-if="record.auditStatus === 'notSubmitted'" type='vertical' /> - <a-dropdown v-if="record.auditStatus === 'notSubmitted'"> + <a-divider v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'" type='vertical' /> + <a-dropdown v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'"> <a class='ant-dropdown-link'>鏇村 <a-icon type='down' /></a> <a-menu slot='overlay'> <a-menu-item> @@ -120,7 +146,7 @@ </a-menu> </a-dropdown> - </span> + </span>--> </a-table> <a-tabs defaultActiveKey='1'> <a-tab-pane diff --git a/src/views/eam/EquipmentUnsealList.vue b/src/views/eam/EquipmentUnsealList.vue index 7a85a28..cb7b72c 100644 --- a/src/views/eam/EquipmentUnsealList.vue +++ b/src/views/eam/EquipmentUnsealList.vue @@ -1,8 +1,14 @@ <template> - <a-card :bordered="false"> + <a-card + title='璁惧鍚皝' + :bordered="false" + > <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > <a-row :gutter="24"> <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="false"> <a-form-item label="鍙樺姩鏂瑰紡(灏佸瓨-seal锛屽惎灏�-unseal,鎶ュ簾-scrap锛屽缃�-disposal)"> @@ -10,14 +16,31 @@ :defaultValue="changeMethod"></a-input> </a-form-item> </a-col> --> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="鍗曟嵁鍙�"> - <a-input placeholder="璇疯緭鍏ュ崟鎹彿" v-model="queryParam.num"></a-input> + <a-input + placeholder="璇疯緭鍏ュ崟鎹彿" + v-model="queryParam.num" + ></a-input> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > <a-form-item label="瀹℃壒鐘舵��"> - <j-dict-select-tag placeholder="璇烽�夋嫨瀹℃壒鐘舵��" v-model="queryParam.auditStatus" dictCode="audit_status" /> + <j-dict-select-tag + placeholder="璇烽�夋嫨瀹℃壒鐘舵��" + v-model="queryParam.auditStatus" + dictCode="audit_status" + /> </a-form-item> </a-col> <!-- <template v-if="toggleSearchStatus"> @@ -30,10 +53,27 @@ </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 type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + <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="primary" + @click="searchReset" + icon="reload" + style="margin-left: 8px" + >閲嶇疆</a-button> <!-- <a @click="handleToggleSearch" style="margin-left: 8px"> {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> @@ -47,52 +87,69 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> - <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - <!-- <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].auditStatus==='notSubmitted'" @click="handleSubmit" type="primary" icon="check">鎻愪氦</a-button> - <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].auditStatus === 'pendingApproval'" @click="handleRevocation" type="primary" icon="rollback">鎾ゅ洖</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>--> - <!-- 楂樼骇鏌ヨ鍖哄煙 --> - <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> - <!-- <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>--> + <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" bordered rowKey="id" class="j-table-force-nowrap" :scroll="{ x: true }" - :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + class="j-table-force-nowrap" + :scroll="{ x: true }" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }" - :customRow="clickThenSelect" @change="handleTableChange"> + :customRow="clickThenSelect" + @change="handleTableChange" + > - <template slot="htmlSlot" slot-scope="text"> + <template + slot="htmlSlot" + slot-scope="text" + > <div v-html="text"></div> </template> - <template slot="imgSlot" slot-scope="text,record"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" - style="max-width:80px;font-size: 12px;font-style: italic;" /> + <template + slot="imgSlot" + slot-scope="text,record" + > + <span + v-if="!text" + style="font-size: 12px;font-style: italic;" + >鏃犲浘鐗�</span> + <img + v-else + :src="getImgView(text)" + :preview="record.id" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> </template> - <template slot="fileSlot" slot-scope="text"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> - <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)"> + <template + slot="fileSlot" + slot-scope="text" + > + <span + v-if="!text" + style="font-size: 12px;font-style: italic;" + >鏃犳枃浠�</span> + <a-button + v-else + :ghost="true" + type="primary" + icon="download" + size="small" + @click="downloadFile(text)" + > 涓嬭浇 </a-button> </template> @@ -101,32 +158,35 @@ slot="action" slot-scope="text, record" > - <a-popconfirm - v-if="record.auditStatus == 'notSubmitted'" - title="纭鎻愪氦鍚�?" - @confirm="() =>handleCommit(record,'commit')" - > - <a>鎻愪氦</a> - </a-popconfirm> - <a-popconfirm - v-if="record.auditStatus == 'pendingApproval'" - title="纭鎾ゅ洖鍚�?" - @confirm="() =>handleCommit(record,'back')" - > - <a>鎾ゅ洖</a> - </a-popconfirm> + <a-popconfirm + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'Rejected'" + title="纭鎻愪氦鍚�?" + @confirm="() =>handleCommit(record,'commit')" + > + <a>鎻愪氦</a> + </a-popconfirm> + <a-popconfirm + v-if="record.auditStatus == 'pendingApproval'" + title="纭鎾ゅ洖鍚�?" + @confirm="() =>handleCommit(record,'back')" + > + <a>鎾ゅ洖</a> + </a-popconfirm> <a-divider - v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'" + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval' || record.auditStatus == 'Rejected'" type="vertical" /> <a - v-if="record.auditStatus == 'notSubmitted' " + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'Rejected'" @click="handleEdit(record)" >缂栬緫</a> - <a v-if="record.auditStatus == 'pendingApproval'" @click="handleApprove(record)">瀹℃壒</a> + <a + v-if="record.auditStatus == 'pendingApproval'" + @click="handleApprove(record)" + >瀹℃壒</a> <a-divider - v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'" + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval' || record.auditStatus == 'Rejected'" type="vertical" /> <a-dropdown> @@ -171,13 +231,23 @@ </div> <a-tabs defaultActiveKey="1"> - <a-tab-pane tab="璁惧鍚皝鏄庣粏" key="1"> + <a-tab-pane + tab="璁惧鍚皝鏄庣粏" + key="1" + > <EquipmentUnsealDetailList :mainId="equipmentUnsealDetailMainId" /> </a-tab-pane> </a-tabs> - <equipmentUnseal-modal ref="modalForm" @ok="modalFormOk"></equipmentUnseal-modal> - <approvel-modal ref="approvalModalForm" @ok='approvalModalFormOk' @cancel='approvalModalFormOk'></approvel-modal> + <equipmentUnseal-modal + ref="modalForm" + @ok="modalFormOk" + ></equipmentUnseal-modal> + <approvel-modal + ref="approvalModalForm" + @ok='approvalModalFormOk' + @cancel='approvalModalFormOk' + ></approvel-modal> </a-card> </template> @@ -185,10 +255,9 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import EquipmentUnsealModal from './modules/equipmentUnseal/EquipmentUnsealModal' -import { getAction,deleteAction,postAction } from '@/api/manage' +import { getAction, deleteAction, postAction } from '@/api/manage' import EquipmentUnsealDetailList from './modules/equipmentUnseal/EquipmentUnsealDetailList' import { initDictOptions, filterMultiDictText } from '@/components/dict/JDictSelectUtil' - import '@/assets/less/TableExpand.less' import ApprovelModal from './modules/equipmentSeal/ApprovelModal' @@ -273,8 +342,8 @@ deleteBatch: '/eam/equipmentUnseal/deleteBatch', exportXlsUrl: '/eam/equipmentUnseal/exportXls', importExcelUrl: 'eam/equipmentUnseal/importExcel', - submit:'eam/equipmentUnseal/submit', - revocation:'eam/equipmentUnseal/revocation' + submit: 'eam/equipmentUnseal/submit', + revocation: 'eam/equipmentUnseal/revocation' }, dictOptions: { auditStatus: [] @@ -292,14 +361,13 @@ total: 0 }, selectedMainId: '', - superFieldList: [], equipmentUnsealDetailMainId: '', // 榛樿鍙樺姩鏂瑰紡 灏佸瓨-seal锛屽惎灏�-unseal,鎶ュ簾-scrap锛屽缃�-disposal changeMethod: 'unseal' } }, created() { - this.getSuperFieldList() + }, computed: { importExcelUrl: function () { @@ -354,7 +422,7 @@ this.equipmentUnsealDetailMainId = "" }, handleCommit(record, type) { - let url + let url type == 'commit' ? record.auditStatus = 'pendingApproval' : record.auditStatus = 'notSubmitted' type == 'commit' ? url = this.url.submit : url = this.url.revocation postAction(url, record).then(res => { @@ -371,10 +439,10 @@ } }) }, - handleApprove: function(record) { + handleApprove: function (record) { let approve approve = this.url.approve - this.$refs.approvalModalForm.showModals(record, approve,'Approved','Rejected') + this.$refs.approvalModalForm.showModals(record, approve, 'Approved', 'Rejected') this.$refs.approvalModalForm.title = '瀹℃壒' this.$refs.approvalModalForm.disableSubmit = false @@ -385,19 +453,7 @@ //娓呯┖鍒楄〃閫変腑 this.onClearSelected() }, - getSuperFieldList() { - let fieldList = [] - fieldList.push({ type: 'string', value: 'num', text: '鍗曟嵁鍙�', dictCode: '' }) - fieldList.push({ type: 'string', value: 'auditStatus', text: '瀹℃壒鐘舵��(鏈彁浜�-notSubmitted銆佸緟瀹℃壒 pendingApproval銆佸鎵逛腑-approvalProcess銆佸凡椹冲洖-Rejected銆佸凡閫氳繃-Approved)', dictCode: 'audit_status' }) - fieldList.push({ type: 'string', value: 'changeMethod', text: '鍙樺姩鏂瑰紡(灏佸瓨-seal锛屽惎灏�-unseal,鎶ュ簾-scrap锛屽缃�-disposal)', dictCode: '' }) - fieldList.push({ type: 'string', value: 'remark', text: '澶囨敞', dictCode: '' }) - fieldList.push({ type: 'string', value: 'createBy', text: '鍒涘缓浜�', dictCode: 'sys_user,realname,username' }) - fieldList.push({ type: 'date', value: 'createTime', text: '鍒涘缓鏃堕棿' }) - fieldList.push({ type: 'string', value: 'updateBy', text: '淇敼浜�', dictCode: 'sys_user,realname,username' }) - fieldList.push({ type: 'date', value: 'updateTime', text: '淇敼鏃堕棿' }) - this.superFieldList = fieldList - this.queryParam.changeMethod = this.changeMethod - }, + searchReset() { this.queryParam = { changeMethod: this.changeMethod @@ -414,7 +470,7 @@ // 閫変腑鍒楄〃鏂板椤� this.selectedRowKeys = [this.dataSource[0].id] this.selectionRows = [this.dataSource[0]] - this.selectedMainId = this.dataSource[0].id + this.selectedMainId = this.dataSource[0].id this.equipmentUnsealDetailMainId = this.dataSource[0].id }, handleDelete(id) { diff --git a/src/views/eam/FaultDescriptionList.vue b/src/views/eam/FaultDescriptionList.vue index 1080dab..de6de95 100644 --- a/src/views/eam/FaultDescriptionList.vue +++ b/src/views/eam/FaultDescriptionList.vue @@ -8,59 +8,56 @@ :md="12" :sm="24" > - <div> - <a-form-item - label="鏁呴殰鎴栨搷浣滆繃绋嬭鎯咃細" - > - <a-textarea - allow-clear - :disabled="true" - rows="4" - v-model="faultDetails" - ></a-textarea> - </a-form-item> - </div> + <div> + <a-form-item label="鏁呴殰鎴栨搷浣滆繃绋嬭鎯咃細"> + <a-textarea + allow-clear + :disabled="true" + rows="4" + v-model="faultDetails" + ></a-textarea> + </a-form-item> + </div> </a-col> <a-col :md="12" :sm="24" > - <div> - <a-form-item - label="鏁呴殰鍥剧墖" - :labelCol="labelCol" - :wrapperCol="wrapperCol" - > + <div> + <a-form-item + label="鏁呴殰鍥剧墖" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > <j-image-upload - :isMultiple="true" - :disabled="true" - v-model="photo" - ></j-image-upload> - </a-form-item> - </div> + :isMultiple="true" + :disabled="true" + v-model="photo" + ></j-image-upload> + </a-form-item> + </div> </a-col> </a-row> - </a-card> </template> <script> - import '@/assets/less/TableExpand.less' - import { mixinDevice } from '@/utils/mixin' - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import { deleteAction, getAction, downFile, getFileAccessHttpUrl, httpAction } from '@/api/manage' +import '@/assets/less/TableExpand.less' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { deleteAction, getAction, downFile, getFileAccessHttpUrl, httpAction } from '@/api/manage' - export default { - name: 'FaultDescriptionList', - mixins:[JeecgListMixin, mixinDevice], - components: { - }, - data () { - return { - description: '鏁呴殰鎻忚堪绠$悊椤甸潰', - labelCol: { +export default { + name: 'FaultDescriptionList', + mixins: [JeecgListMixin, mixinDevice], + components: { + }, + data() { + return { + description: '鏁呴殰鎻忚堪绠$悊椤甸潰', + labelCol: { xs: { span: 24 }, sm: { span: 5 }, }, @@ -68,43 +65,43 @@ xs: { span: 24 }, sm: { span: 16 }, }, - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } - }, - { - title:'鏁呴殰璇︽儏', - align:"center", - dataIndex: 'faultDetails' - }, - { - title:'鏁呴殰鐓х墖', - align:"center", - dataIndex: 'photo' - }, - ], - url: { - list: "/eam/faultDescription/list", + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } }, - faultId:'', - faultDetails:'', - photo:'' - } - }, - created() { - }, - computed: { - }, - methods: { - loadData(arg) { + { + title: '鏁呴殰璇︽儏', + align: "center", + dataIndex: 'faultDetails' + }, + { + title: '鏁呴殰鐓х墖', + align: "center", + dataIndex: 'photo' + }, + ], + url: { + list: "/eam/faultDescription/list", + }, + faultId: '', + faultDetails: '', + photo: '' + } + }, + created() { + }, + computed: { + }, + methods: { + loadData(arg) { if (!this.url.list) { this.$message.error('璇疯缃畊rl.list灞炴��!') return @@ -120,10 +117,10 @@ if (res.success) { //update-begin---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ this.dataSource = res.result.records - if(this.dataSource != null && this.dataSource != ""){ + if (this.dataSource != null && this.dataSource != "") { this.faultDetails = this.dataSource[0].faultDetails this.photo = this.dataSource[0].photo - }else{ + } else { this.faultDetails = "" this.photo = "" } @@ -142,16 +139,16 @@ }) }, - }, - watch:{ - faultId() { + }, + watch: { + faultId() { this.queryParam = {}; this.queryParam.faultId = this.faultId; this.loadData(1); }, - } } +} </script> <style scoped> - @import '~@assets/less/common.less'; +@import '~@assets/less/common.less'; </style> \ No newline at end of file diff --git a/src/views/eam/MalfunctionRepair.vue b/src/views/eam/MalfunctionRepair.vue index 007551e..a716e69 100644 --- a/src/views/eam/MalfunctionRepair.vue +++ b/src/views/eam/MalfunctionRepair.vue @@ -77,8 +77,9 @@ :loading="loading" class="j-table-force-nowrap" @change="handleTableChange" - :rowSelection = "rowSelection" + :customRow="clickThenSelect" > + <!-- :rowSelection="rowSelection" --> <!-- :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" --> <template @@ -128,32 +129,35 @@ slot="action" slot-scope="text, record" > - <a-popconfirm - v-if="record.status == '1'" - title="纭鎻愪氦鍚�?" - @confirm="() =>handleCommit(record, 'commit')" - > - <a>鎻愪氦</a> - </a-popconfirm> - <a-popconfirm - v-if="record.status == '2'" - title="纭鎾ゅ洖鍚�?" - @confirm="() =>handleCommit(record, 'back')" - > - <a>鎾ゅ洖</a> - </a-popconfirm> + <a-popconfirm + v-if="record.status == '1' || record.status == '4'" + title="纭鎻愪氦鍚�?" + @confirm="() =>handleCommit(record, 'commit')" + > + <a>鎻愪氦</a> + </a-popconfirm> + <a-popconfirm + v-if="record.status == '2'" + title="纭鎾ゅ洖鍚�?" + @confirm="() =>handleCommit(record, 'back')" + > + <a>鎾ゅ洖</a> + </a-popconfirm> <a-divider - v-if="record.status == '1' || record.status == '2'" + v-if="record.status == '1' || record.status == '2' || record.status == '4'" type="vertical" /> <a - v-if="record.status == '1' " + v-if="record.status == '1' || record.status == '4'" @click="handleEdit(record)" >缂栬緫</a> - <a v-if="record.status == '2'" @click="handleApprove(record)">瀹℃壒</a> + <a + v-if="record.status == '2'" + @click="handleApprove(record)" + >瀹℃壒</a> <a-divider - v-if="record.status == '1' || record.status == '2'" + v-if="record.status == '1' || record.status == '2' || record.status == '4'" type="vertical" /> <a-dropdown> @@ -171,33 +175,6 @@ <a>鍒犻櫎</a> </a-popconfirm> </a-menu-item> - <!-- <a-menu-item v-if="record.status == '1'"> - <a-popconfirm - v-if="record.status == '1'" - title="纭鎻愪氦鍚�?" - @confirm="() =>handleCommit(record, 'commit')" - > - <a>鎻愪氦</a> - </a-popconfirm> - </a-menu-item> - <a-menu-item v-if="record.status == '2'"> - <a-popconfirm - v-if="record.status == '2'" - title="纭鎾ゅ洖鍚�?" - @confirm="() =>handleCommit(record, 'back')" - > - <a>鎾ゅ洖</a> - </a-popconfirm> - </a-menu-item> - <a-menu-item v-if="record.status == '2'"> - <a-popconfirm - v-if="record.status == '2'" - title="纭椹冲洖鍚�?" - @confirm="() =>handleFinish(record, 'reject')" - > - <a>椹冲洖</a> - </a-popconfirm> - </a-menu-item>--> <a-menu-item v-if="record.status == '3' || record.status == '4'"> <a-popconfirm v-if="record.status == '3' || record.status == '4'" @@ -236,14 +213,18 @@ ref="modalForm" @ok="modalFormOk" ></malfunction-repair-modal> - <approvel-modal ref='approvalModalForm' @ok='approvalModalFormOk' @cancel='approvalModalFormOk'></approvel-modal> + <approvel-modal + ref='approvalModalForm' + @ok='approvalModalFormOk' + @cancel='approvalModalFormOk' + ></approvel-modal> </a-card> </template> <script> import '@/assets/less/TableExpand.less' -import { putAction,getAction } from '@/api/manage' +import { putAction, getAction } from '@/api/manage' import { mixinDevice } from '@/utils/mixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import MalfunctionRepairModal from './modules/malfunctionRepair/MalfunctionRepaireModal' @@ -356,7 +337,7 @@ dataIndex: 'action', align: "center", fixed: "right", - width: 147, + width: 200, scopedSlots: { customRender: 'action' } } ], @@ -368,7 +349,18 @@ importExcelUrl: "eam/equipmentReportRepair/importExcel", edit: "/eam/equipmentReportRepair/edit", }, - imgList:'' + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 5, + pageSizeOptions: ['5', '10', '50'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, } }, created() { @@ -397,6 +389,16 @@ }, }, methods: { + + clickThenSelect(record) { + return { + on: { + click: () => { + this.onSelectChange(record.id.split(","), [record]); + } + } + } + }, loadData(arg) { if (!this.url.list) { @@ -459,12 +461,12 @@ }) }, - handleFinish(record,type) { - if(type == 'agree'){ + handleFinish(record, type) { + if (type == 'agree') { record.status = '3' - }else if(type == 'reject'){ + } else if (type == 'reject') { record.status = '4' - }else if(type == 'revoke'){ + } else if (type == 'revoke') { record.status = '2' } putAction(this.url.edit, record).then(res => { @@ -476,10 +478,10 @@ } }) }, - handleApprove: function(record) { + handleApprove: function (record) { let edit edit = this.url.edit - this.$refs.approvalModalForm.showModals(record, edit,'3','4') + this.$refs.approvalModalForm.showModals(record, edit, '3', '4') this.$refs.approvalModalForm.title = '瀹℃壒' this.$refs.approvalModalForm.disableSubmit = false diff --git a/src/views/eam/ProjectMaintenanceOrderList.vue b/src/views/eam/ProjectMaintenanceOrderList.vue index 571303c..24aefee 100644 --- a/src/views/eam/ProjectMaintenanceOrderList.vue +++ b/src/views/eam/ProjectMaintenanceOrderList.vue @@ -1,34 +1,90 @@ <template> - <a-card :bordered='false'> + <a-card + title="椤圭洰鎬х淮淇�" + :bordered='false' + > <!-- 鏌ヨ鍖哄煙 --> <div class='table-page-search-wrapper'> - <a-form layout='inline' @keyup.enter.native='searchQuery'> + <a-form + layout='inline' + @keyup.enter.native='searchQuery' + > <a-row :gutter='24'> - <a-col :xl='6' :lg='7' :md='8' :sm='24'> + <a-col + :xl='6' + :lg='7' + :md='8' + :sm='24' + > <a-form-item label='璁″垝鍗曠紪鐮�'> - <j-input placeholder='璇疯緭鍏ヨ鍒掑崟缂栫爜' v-model='queryParam.num'></j-input> + <j-input + placeholder='璇疯緭鍏ヨ鍒掑崟缂栫爜' + v-model='queryParam.num' + ></j-input> </a-form-item> </a-col> - <a-col :xl='6' :lg='7' :md='8' :sm='24'> + <a-col + :xl='6' + :lg='7' + :md='8' + :sm='24' + > <a-form-item label='瀹℃壒鐘舵��'> - <j-dict-select-tag placeholder='璇烽�夋嫨瀹℃壒鐘舵��' v-model='queryParam.auditStatus' dictCode='audit_status' /> + <j-dict-select-tag + placeholder='璇烽�夋嫨瀹℃壒鐘舵��' + v-model='queryParam.auditStatus' + dictCode='audit_status' + /> </a-form-item> </a-col> <template v-if='toggleSearchStatus'> - <a-col :xl='10' :lg='11' :md='12' :sm='24'> + <a-col + :xl='10' + :lg='11' + :md='12' + :sm='24' + > <a-form-item label='鍒涘缓鏃堕棿'> - <j-date placeholder='璇烽�夋嫨寮�濮嬫棩鏈�' class='query-group-cust' v-model='queryParam.createTime_begin'></j-date> + <j-date + placeholder='璇烽�夋嫨寮�濮嬫棩鏈�' + class='query-group-cust' + v-model='queryParam.createTime_begin' + ></j-date> <span class='query-group-split-cust'></span> - <j-date placeholder='璇烽�夋嫨缁撴潫鏃ユ湡' class='query-group-cust' v-model='queryParam.createTime_end'></j-date> + <j-date + placeholder='璇烽�夋嫨缁撴潫鏃ユ湡' + class='query-group-cust' + v-model='queryParam.createTime_end' + ></j-date> </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 type='primary' @click='searchReset' icon='reload' style='margin-left: 8px'>閲嶇疆</a-button> - <a @click='handleToggleSearch' style='margin-left: 8px'> + <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='primary' + @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> @@ -41,16 +97,25 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class='table-operator'> - <a-button @click='handleAdd' type='primary' icon='plus'>鏂板</a-button> + <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> + <!-- <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' @@ -58,91 +123,66 @@ bordered rowKey='id' class='j-table-force-nowrap' - :scroll='{x:true}' + :scroll="{ x: 'calc(1500px + 50%)', y: 900 }" :columns='columns' :dataSource='dataSource' :pagination='ipagination' :loading='loading' - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}" :customRow='clickThenSelect' - @change='handleTableChange'> - - <template slot='htmlSlot' slot-scope='text'> - <div v-html='text'></div> - </template> - <template slot='imgSlot' slot-scope='text,record'> - <span v-if='!text' style='font-size: 12px;font-style: italic;'>鏃犲浘鐗�</span> - <img v-else :src='getImgView(text)' :preview='record.id' height='25px' alt='' - style='max-width:80px;font-size: 12px;font-style: italic;' /> - </template> - <template slot='fileSlot' slot-scope='text'> - <span v-if='!text' style='font-size: 12px;font-style: italic;'>鏃犳枃浠�</span> - <a-button + @change='handleTableChange' + > + <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}" --> + <template + slot='imgSlot' + slot-scope='text,record' + > + <span + v-if='!text' + style='font-size: 12px;font-style: italic;' + >鏃犲浘鐗�</span> + <img v-else - :ghost='true' - type='primary' - icon='download' - size='small' - @click='downloadFile(text)'> - 涓嬭浇 - </a-button> + :src='getImgView(text)' + :preview='record.id' + height='25px' + alt='' + style='max-width:80px;font-size: 12px;font-style: italic;' + /> </template> - - <!-- <span slot='action' slot-scope='text, record'> - <a v-if="record.status == '1' " @click='handleEdit(record)'>缂栬緫</a> - - <a-divider v-if="record.status == '1' " 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>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - <a-menu-item v-if="record.auditStatus == 'notSubmitted'"> - <a @click='handleSubmit'>鎻愪氦</a> - </a-menu-item> - <a-menu-item v-if="record.auditStatus == 'pendingApproval'"> - <a @click='handleRevocation'>鎾ゅ洖</a> - </a-menu-item> - </a-menu> - </a-dropdown> - </span> --> <span slot="action" slot-scope="text, record" > - <a-popconfirm - v-if="record.auditStatus == 'notSubmitted'" - title="纭鎻愪氦鍚�?" - @confirm="() =>handleCommit(record, 'commit')" - > - <a>鎻愪氦</a> - </a-popconfirm> - <a-popconfirm - v-if="record.auditStatus == 'pendingApproval'" - title="纭鎾ゅ洖鍚�?" - @confirm="() =>handleCommit(record, 'back')" - > - <a>鎾ゅ洖</a> - </a-popconfirm> + <a-popconfirm + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'Rejected'" + title="纭鎻愪氦鍚�?" + @confirm="() =>handleCommit(record, 'commit')" + > + <a>鎻愪氦</a> + </a-popconfirm> + <a-popconfirm + v-if="record.auditStatus == 'pendingApproval'" + title="纭鎾ゅ洖鍚�?" + @confirm="() =>handleCommit(record, 'back')" + > + <a>鎾ゅ洖</a> + </a-popconfirm> <a-divider - v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'" + v-if="record.auditStatus == 'notSubmitted'|| record.auditStatus == 'Rejected' || record.auditStatus == 'pendingApproval'" type="vertical" /> <a - v-if="record.auditStatus == 'notSubmitted' " + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'Rejected'" @click="handleEdit(record)" >缂栬緫</a> - <a v-if="record.auditStatus == 'pendingApproval'" @click="handleApprove(record)">瀹℃壒</a> + <a + v-if="record.auditStatus == 'pendingApproval'" + @click="handleApprove(record)" + >瀹℃壒</a> <a-divider - v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'pendingApproval'" + v-if="record.auditStatus == 'notSubmitted'|| record.auditStatus == 'Rejected' || record.auditStatus == 'pendingApproval'" type="vertical" /> <a-dropdown> @@ -160,42 +200,6 @@ <a>鍒犻櫎</a> </a-popconfirm> </a-menu-item> - <!-- <a-menu-item v-if="record.status == '1'"> - <a-popconfirm - v-if="record.status == '1'" - title="纭鎻愪氦鍚�?" - @confirm="() =>handleCommit(record, 'commit')" - > - <a>鎻愪氦</a> - </a-popconfirm> - </a-menu-item> - <a-menu-item v-if="record.status == '2'"> - <a-popconfirm - v-if="record.status == '2'" - title="纭鎾ゅ洖鍚�?" - @confirm="() =>handleCommit(record, 'back')" - > - <a>鎾ゅ洖</a> - </a-popconfirm> - </a-menu-item> - <a-menu-item v-if="record.status == '2'"> - <a-popconfirm - v-if="record.status == '2'" - title="纭椹冲洖鍚�?" - @confirm="() =>handleFinish(record, 'reject')" - > - <a>椹冲洖</a> - </a-popconfirm> - </a-menu-item>--> - <!-- <a-menu-item v-if="record.auditStatus == 'Approved' || record.auditStatus == 'Rejected'"> - <a-popconfirm - v-if="record.auditStatus == 'Approved' || record.auditStatus == 'Rejected'" - title="纭鎾ら攢鍚�?" - @confirm="() =>handleFinish(record, 'revoke')" - > - <a>鎾ら攢</a> - </a-popconfirm> - </a-menu-item> --> </a-menu> </a-dropdown> </span> @@ -203,14 +207,32 @@ </a-table> </div> - <a-tabs defaultActiveKey='1'> - <a-tab-pane tab='椤圭洰缁翠慨鏄庣粏' key='1'> - <project-maintenance-order-detail-list :mainId='equipmentSealDetailMainId' /> + <a-tabs + type="card" + defaultActiveKey='1' + > + <a-tab-pane + tab='椤圭洰缁翠慨鏄庣粏' + key='1' + > + <div + class="table-operator" + style="margin:-16px" + > + <project-maintenance-order-detail-list :mainId='equipmentSealDetailMainId' /> + </div> </a-tab-pane> </a-tabs> - <project-maintenance-order-modal ref='modalForm' @ok='modalFormOk'></project-maintenance-order-modal> - <approvel-modal ref='approvalModalForm' @ok='approvalModalFormOk' @cancel='approvalModalFormOk'></approvel-modal> + <project-maintenance-order-modal + ref='modalForm' + @ok='modalFormOk' + ></project-maintenance-order-modal> + <approvel-modal + ref='approvalModalForm' + @ok='approvalModalFormOk' + @cancel='approvalModalFormOk' + ></approvel-modal> </a-card> </template> @@ -218,11 +240,11 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import ProjectMaintenanceOrderModal from './modules/projectMaintenanceOrder/ProjectMaintenanceOrderModal' -import { getAction,putAction } from '@/api/manage' +import { getAction, putAction } from '@/api/manage' import ProjectMaintenanceOrderDetailList from './modules/projectMaintenanceOrder/ProjectMaintenanceOrderDetailList' import { initDictOptions, filterMultiDictText } from '@/components/dict/JDictSelectUtil' import '@/assets/less/TableExpand.less' -import ApprovelModal from './modules/malfunctionRepair/ApprovelModal' +import ApprovelModal from './modules/projectMaintenanceOrder/ApprovelModal' export default { name: 'ProjectMaintenanceOrderList', @@ -243,7 +265,7 @@ key: 'rowIndex', width: 60, align: 'center', - customRender: function(t, r, index) { + customRender: function (t, r, index) { return parseInt(index) + 1 } }, @@ -251,9 +273,7 @@ title: '瀹℃壒鐘舵��', align: 'center', dataIndex: 'auditStatus_dictText' - }, - { title: '鐘舵��', align: 'center', @@ -262,19 +282,17 @@ { title: '璁″垝鍗曠紪鐮�', align: 'center', - sorter: true, dataIndex: 'num' }, + // sorter: true, { title: '璁″垝鍚嶇О', align: 'center', - sorter: true, dataIndex: 'name' }, { title: '璁″垝寮�濮嬫椂闂�', align: 'center', - sorter: true, dataIndex: 'planStartTime', // customRender: function(text) { // return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) @@ -283,7 +301,6 @@ { title: '璁″垝缁撴潫鏃堕棿', align: 'center', - sorter: true, dataIndex: 'planEndTime', // customRender: function(text) { // return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) @@ -292,7 +309,6 @@ { title: '瀹為檯寮�濮嬫椂闂�', align: 'center', - sorter: true, dataIndex: 'actualStartTime', // customRender: function(text) { // return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) @@ -302,7 +318,6 @@ { title: '瀹為檯缁撴潫鏃堕棿', align: 'center', - sorter: true, dataIndex: 'actualEndTime', // customRender: function(text) { // return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) @@ -355,7 +370,7 @@ dataIndex: 'action', align: 'center', fixed: 'right', - width: 147, + width: 200, scopedSlots: { customRender: 'action' } } ], @@ -367,8 +382,8 @@ deleteBatch: '/eam/projectMaintenanceOrder/deleteBatch', exportXlsUrl: '/eam/projectMaintenanceOrder/exportXls', importExcelUrl: 'eam/projectMaintenanceOrder/importExcel', - edit:'/eam/projectMaintenanceOrder/edit', - commit:'/eam/projectMaintenanceOrder/commit' + edit: '/eam/projectMaintenanceOrder/edit', + commit: '/eam/projectMaintenanceOrder/commit' }, dictOptions: { auditStatus: [] @@ -391,10 +406,10 @@ } }, created() { - this.getSuperFieldList() + // this.getSuperFieldList() }, computed: { - importExcelUrl: function() { + importExcelUrl: function () { return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` } }, @@ -463,29 +478,29 @@ this.loading = false }) }, - getSuperFieldList() { - let fieldList = [] - fieldList.push({ type: 'string', value: 'num', text: '璁″垝鍗曠紪鍙�', dictCode: '' }) - fieldList.push({ type: 'string', value: 'name', text: '璁″垝鍚嶇О', dictCode: '' }) - fieldList.push({ type: 'date', value: 'planStartTime', text: '璁″垝寮�濮嬫椂闂�' }) - fieldList.push({ type: 'date', value: 'planEndTime', text: '璁″垝缁撴潫鏃堕棿' }) - fieldList.push({ type: 'date', value: 'actualStartTime', text: '瀹為檯寮�濮嬫椂闂�' }) - fieldList.push({ type: 'date', value: 'actualEndTime', text: '瀹為檯缁撴潫鏃堕棿' }) - fieldList.push({ - type: 'string', - value: 'auditStatus', - text: '瀹℃壒鐘舵��(鏈彁浜�-notSubmitted銆佸緟瀹℃壒 pendingApproval銆佸鎵逛腑-approvalProcess銆佸凡椹冲洖-Rejected銆佸凡閫氳繃-Approved)', - dictCode: 'audit_status' - }) - /* fieldList.push({type:'string',value:'changeMethod',text:'鍙樺姩鏂瑰紡(灏佸瓨-seal锛屽惎灏�-unseal,鎶ュ簾-scrap锛屽缃�-disposal)',dictCode:''})*/ - fieldList.push({ type: 'string', value: 'remark', text: '澶囨敞', dictCode: '' }) - fieldList.push({ type: 'string', value: 'createBy', text: '鍒涘缓浜�', dictCode: 'sys_user,realname,username' }) - fieldList.push({ type: 'date', value: 'createTime', text: '鍒涘缓鏃堕棿' }) - fieldList.push({ type: 'string', value: 'updateBy', text: '淇敼浜�', dictCode: 'sys_user,realname,username' }) - fieldList.push({ type: 'date', value: 'updateTime', text: '淇敼鏃堕棿' }) + // getSuperFieldList() { + // let fieldList = [] + // fieldList.push({ type: 'string', value: 'num', text: '璁″垝鍗曠紪鍙�', dictCode: '' }) + // fieldList.push({ type: 'string', value: 'name', text: '璁″垝鍚嶇О', dictCode: '' }) + // fieldList.push({ type: 'date', value: 'planStartTime', text: '璁″垝寮�濮嬫椂闂�' }) + // fieldList.push({ type: 'date', value: 'planEndTime', text: '璁″垝缁撴潫鏃堕棿' }) + // fieldList.push({ type: 'date', value: 'actualStartTime', text: '瀹為檯寮�濮嬫椂闂�' }) + // fieldList.push({ type: 'date', value: 'actualEndTime', text: '瀹為檯缁撴潫鏃堕棿' }) + // fieldList.push({ + // type: 'string', + // value: 'auditStatus', + // text: '瀹℃壒鐘舵��(鏈彁浜�-notSubmitted銆佸緟瀹℃壒 pendingApproval銆佸鎵逛腑-approvalProcess銆佸凡椹冲洖-Rejected銆佸凡閫氳繃-Approved)', + // dictCode: 'audit_status' + // }) + // /* fieldList.push({type:'string',value:'changeMethod',text:'鍙樺姩鏂瑰紡(灏佸瓨-seal锛屽惎灏�-unseal,鎶ュ簾-scrap锛屽缃�-disposal)',dictCode:''})*/ + // fieldList.push({ type: 'string', value: 'remark', text: '澶囨敞', dictCode: '' }) + // fieldList.push({ type: 'string', value: 'createBy', text: '鍒涘缓浜�', dictCode: 'sys_user,realname,username' }) + // fieldList.push({ type: 'date', value: 'createTime', text: '鍒涘缓鏃堕棿' }) + // fieldList.push({ type: 'string', value: 'updateBy', text: '淇敼浜�', dictCode: 'sys_user,realname,username' }) + // fieldList.push({ type: 'date', value: 'updateTime', text: '淇敼鏃堕棿' }) - this.superFieldList = fieldList - }, + // this.superFieldList = fieldList + // }, handleCommit(record, type) { type == 'commit' ? record.auditStatus = 'pendingApproval' : record.auditStatus = 'notSubmitted' putAction(this.url.commit, record).then(res => { @@ -502,12 +517,12 @@ } }) }, - handleFinish(record,type) { - if(type == 'agree'){ + handleFinish(record, type) { + if (type == 'agree') { record.auditStatus = 'Approved' - }else if(type == 'reject'){ + } else if (type == 'reject') { record.auditStatus = 'Rejected' - }else if(type == 'revoke'){ + } else if (type == 'revoke') { record.auditStatus = 'pendingApproval' } putAction(this.url.edit, record).then(res => { @@ -519,13 +534,12 @@ } }) }, - handleApprove: function(record) { + handleApprove: function (record) { let edit edit = this.url.commit - this.$refs.approvalModalForm.showModals(record, edit,'Approved','Rejected') + this.$refs.approvalModalForm.showModals(record, edit, 'Approved', 'Rejected') this.$refs.approvalModalForm.title = '瀹℃壒' this.$refs.approvalModalForm.disableSubmit = false - }, approvalModalFormOk() { // 閫氳繃/椹冲洖鏃讹紝閲嶈浇鍒楄〃 diff --git a/src/views/eam/RepairOrderFaultAnalysisList.vue b/src/views/eam/RepairOrderFaultAnalysisList.vue index 33024a7..99fd6ac 100644 --- a/src/views/eam/RepairOrderFaultAnalysisList.vue +++ b/src/views/eam/RepairOrderFaultAnalysisList.vue @@ -1,8 +1,14 @@ <template> - <a-card :bordered="false" :class="'cust-erp-sub-tab'"> + <a-card + :bordered="false" + :class="'cust-erp-sub-tab'" + > <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > <a-row :gutter="24"> </a-row> </a-form> @@ -10,7 +16,10 @@ <!-- 鏌ヨ鍖哄煙-END --> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator" v-if="mainId"> + <div + class="table-operator" + v-if="mainId" + > <!-- <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> <a-button type="primary" icon="download" @click="handleExportXls('鏁呴殰鍒嗘瀽')">瀵煎嚭</a-button> <a-upload @@ -24,7 +33,10 @@ </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-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> @@ -47,33 +59,63 @@ :dataSource="dataSource" :pagination="ipagination" :loading="loading" - @change="handleTableChange"> + @change="handleTableChange" + > <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" --> - <template slot="htmlSlot" slot-scope="text"> + <template + slot="htmlSlot" + slot-scope="text" + > <div v-html="text"></div> </template> - <template slot="imgSlot" slot-scope="text,record"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + <template + slot="imgSlot" + slot-scope="text,record" + > + <span + v-if="!text" + style="font-size: 12px;font-style: italic;" + >鏃犲浘鐗�</span> + <img + v-else + :src="getImgView(text)" + :preview="record.id" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> </template> - <template slot="fileSlot" slot-scope="text"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> + <template + slot="fileSlot" + slot-scope="text" + > + <span + v-if="!text" + style="font-size: 12px;font-style: italic;" + >鏃犳枃浠�</span> <a-button v-else :ghost="true" type="primary" icon="download" size="small" - @click="downloadFile(text)"> + @click="downloadFile(text)" + > 涓嬭浇 </a-button> </template> - <span slot="action" slot-scope="text, record"> + <span + slot="action" + slot-scope="text, record" + > <a @click="handleEdit(record)">缂栬緫</a> <a-divider type="vertical" /> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + @confirm="() => handleDelete(record.id)" + > <a>鍒犻櫎</a> </a-popconfirm> </span> @@ -81,105 +123,123 @@ </a-table> </div> - <repairOrderFaultAnalysis-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></repairOrderFaultAnalysis-modal> + <repairOrderFaultAnalysis-modal + ref="modalForm" + @ok="modalFormOk" + :mainId="mainId" + ></repairOrderFaultAnalysis-modal> </a-card> </template> <script> - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import RepairOrderFaultAnalysisModal from './modules/repairorder/RepairOrderFaultAnalysisModal' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import RepairOrderFaultAnalysisModal from './modules/repairorder/RepairOrderFaultAnalysisModal' - export default { - name: "RepairOrderFaultAnalysisList", - mixins:[JeecgListMixin], - components: { RepairOrderFaultAnalysisModal }, - props:{ - mainId:{ - type:String, - default:'', - required:false - } - }, - watch:{ - mainId:{ - immediate: true, - handler(val) { - if(!this.mainId){ - this.clearList() - }else{ - this.queryParam['repairOrderId'] = val - this.loadData(1); - } - } - } - }, - data () { - return { - description: '缁翠慨宸ュ崟绠$悊椤甸潰', - disableMixinCreated:true, - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } - }, - { - title: '鏁呴殰鍘熷洜', - dataIndex: 'faultCause', - align: "center", - scopedSlots: { customRender: 'faultCause' }, - width: 250, - }, - { - title: '鏁呴殰绫诲瀷', - dataIndex: 'faultTypeName', - align: "center", - scopedSlots: { customRender: 'faultType' }, - width: 250, - }, - { - title: '缁翠繚鏀硅繘鎰忚', - dataIndex: 'suggestion', - align: "center", - scopedSlots: { customRender: 'suggestion' }, - width: 250, - }, - ], - url: { - list: "/eam/repairOrder/listRepairOrderFaultAnalysisByMainId", - delete: "/eam/repairOrder/deleteRepairOrderFaultAnalysis", - deleteBatch: "/eam/repairOrder/deleteBatchRepairOrderFaultAnalysis", - exportXlsUrl: "/eam/repairOrder/exportRepairOrderFaultAnalysis", - importUrl: "/eam/repairOrder/importRepairOrderFaultAnalysis", - }, - dictOptions:{ - } - } - }, - created() { - }, - computed: { - importExcelUrl(){ - return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; - } - }, - methods: { - clearList(){ - this.dataSource=[] - this.selectedRowKeys=[] - this.ipagination.current = 1 - } - +export default { + name: "RepairOrderFaultAnalysisList", + mixins: [JeecgListMixin], + components: { RepairOrderFaultAnalysisModal }, + props: { + mainId: { + type: String, + default: '', + required: false } + }, + watch: { + mainId: { + immediate: true, + handler(val) { + if (!this.mainId) { + this.clearList() + } else { + this.queryParam['repairOrderId'] = val + this.loadData(1); + } + } + } + }, + data() { + return { + description: '缁翠慨宸ュ崟绠$悊椤甸潰', + disableMixinCreated: true, + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title: '鏁呴殰鍘熷洜', + dataIndex: 'faultCause', + align: "center", + scopedSlots: { customRender: 'faultCause' }, + width: 250, + }, + { + title: '鏁呴殰绫诲瀷', + dataIndex: 'faultTypeName', + align: "center", + scopedSlots: { customRender: 'faultType' }, + width: 250, + }, + { + title: '鏁呴殰鍒嗘瀽', + dataIndex: 'faultCause', + align: 'center', + width: 150, + ellipsis: true, + }, + { + title: '缁翠慨鎺柦', + dataIndex: 'maintenanceMeasures', + align: 'center', + width: 150, + ellipsis: true, + }, + { + title: '缁翠繚鏀硅繘鎰忚', + dataIndex: 'suggestion', + align: "center", + scopedSlots: { customRender: 'suggestion' }, + width: 250, + }, + ], + url: { + list: "/eam/repairOrder/listRepairOrderFaultAnalysisByMainId", + delete: "/eam/repairOrder/deleteRepairOrderFaultAnalysis", + deleteBatch: "/eam/repairOrder/deleteBatchRepairOrderFaultAnalysis", + exportXlsUrl: "/eam/repairOrder/exportRepairOrderFaultAnalysis", + importUrl: "/eam/repairOrder/importRepairOrderFaultAnalysis", + }, + dictOptions: { + } + } + }, + created() { + }, + computed: { + importExcelUrl() { + return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; + } + }, + methods: { + clearList() { + this.dataSource = [] + this.selectedRowKeys = [] + this.ipagination.current = 1 + } + } +} </script> <style scoped> - @import '~@assets/less/common.less' +@import '~@assets/less/common.less'; </style> diff --git a/src/views/eam/RepairOrderFinishedReport.vue b/src/views/eam/RepairOrderFinishedReport.vue index 9ef8d4f..a7eef6d 100644 --- a/src/views/eam/RepairOrderFinishedReport.vue +++ b/src/views/eam/RepairOrderFinishedReport.vue @@ -533,7 +533,7 @@ dataIndex: 'action', align: "center", fixed: "right", - width: 147, + width: 200, scopedSlots: { customRender: 'action' }, } ], diff --git a/src/views/eam/RepairOrderList.vue b/src/views/eam/RepairOrderList.vue index 1af7be6..5f0eb3b 100644 --- a/src/views/eam/RepairOrderList.vue +++ b/src/views/eam/RepairOrderList.vue @@ -3,17 +3,6 @@ title="缁翠慨宸ュ崟" :bordered="false" > - <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper"> - <a-form - layout="inline" - @keyup.enter.native="searchQuery" - > - <a-row :gutter="24"> - </a-row> - </a-form> - </div> - <!-- 鏌ヨ鍖哄煙-END --> <div class="table-page-search-wrapper"> <a-form layout="inline" @@ -21,8 +10,10 @@ > <a-row :gutter="24"> <a-col - :md="4" - :sm="8" + :xl="6" + :lg="7" + :md="8" + :sm="24" > <a-form-item label="宸ュ崟鐘舵��"> <j-dict-select-tag @@ -35,8 +26,10 @@ </a-form-item> </a-col> <a-col - :md="4" - :sm="8" + :xl="6" + :lg="7" + :md="8" + :sm="24" > <a-form-item label="鍗曟嵁鍙�"> <a-input @@ -46,8 +39,10 @@ </a-form-item> </a-col> <a-col - :md="4" - :sm="8" + :xl="6" + :lg="7" + :md="8" + :sm="24" > <a-form-item label="璁惧缂栫爜"> <a-input @@ -56,33 +51,39 @@ ></a-input> </a-form-item> </a-col> - <a-col - :md="4" - :sm="8" - > - <a-form-item label="璁惧鍚嶇О"> - <a-input - placeholder="璇疯緭鍏ヨ澶囧悕绉�" - v-model="queryParam.equipmentName" - ></a-input> - </a-form-item> - </a-col> - <a-col - :md="4" - :sm="8" - > - <a-button - type="primary" - @click="searchQuery" - icon="search" - style="margin-right: 5px" - >鏌ヨ</a-button> - <a-button - @click="searchReset" - icon="reload" - >閲嶇疆</a-button> + <a-col :span="3"> + <span + style="float: left;overflow: hidden;" + class="table-page-search-submitButtons" + > + <a + @click="handleToggleSearch" + style="margin-left: 8px" + > + {{ toggleSearchStatus ? '鏌ヨ鏉′欢鏀惰捣' : '璇︾粏鏌ヨ' }} + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> + </a> + </span> </a-col> </a-row> + + <template v-if="toggleSearchStatus"> + <a-row :gutter="24"> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > + <a-form-item label="璁惧鍚嶇О"> + <a-input + placeholder="璇疯緭鍏ヨ澶囧悕绉�" + v-model="queryParam.equipmentName" + ></a-input> + </a-form-item> + </a-col> + </a-row> + </template> </a-form> </div> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> @@ -97,7 +98,7 @@ key="2" @click="handleAddPre(2)" ><a-icon type="copy" />鍙傜収淇濅慨鏁呴殰鍗�</a-menu-item> - <a-menu-item + <a-menu-item key="2" @click="handleAddPre(3)" ><a-icon type="copy" />鍙傜収椤圭洰鎬х淮淇�</a-menu-item> @@ -107,6 +108,17 @@ icon="plus" >鏂板</a-button> </a-dropdown> + + <a-button + type="primary" + @click="searchQuery" + icon="search" + style="margin-right: 5px" + >鏌ヨ</a-button> + <a-button + @click="searchReset" + icon="reload" + >閲嶇疆</a-button> <a-button hidden type="primary" @@ -146,53 +158,22 @@ :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="rowSelection" @change="handleTableChange" :customRow="clickThenSelect" > + <!-- :rowSelection="rowSelection" --> - <template - slot="htmlSlot" - slot-scope="text" + <span + slot="num" + slot-scope="text, record" > - <div v-html="text"></div> - </template> - <template - slot="imgSlot" - slot-scope="text,record" - > - <span - v-if="!text" - style="font-size: 12px;font-style: italic;" - >鏃犲浘鐗�</span> - <img - v-else - :src="getImgView(text)" - :preview="record.id" - height="25px" - alt="" - style="max-width:80px;font-size: 12px;font-style: italic;" - /> - </template> - <template - slot="fileSlot" - slot-scope="text" - > - <span - v-if="!text" - style="font-size: 12px;font-style: italic;" - >鏃犳枃浠�</span> - <a-button - v-else - :ghost="true" - type="primary" - icon="download" - size="small" - @click="downloadFile(text)" - > - 涓嬭浇 - </a-button> - </template> + <a + v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' " + class="lot" + @click="handleOrderExe(record)" + >{{record.num}}</a> + <span v-else>{{record.num}}</span> + </span> <!-- <span slot="action" @@ -345,7 +326,7 @@ tab="鏁呴殰鎻忚堪" key="1" > - <FaultDescriptionList ref="FaultDescriptionList"/> + <FaultDescriptionList ref="FaultDescriptionList" /> </a-tab-pane> <a-tab-pane tab="缁翠慨瑕佹眰" @@ -467,6 +448,16 @@ // 琛ㄥご columns: [ { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { title: '鐘舵��', align: "center", dataIndex: 'status_dictText' @@ -474,7 +465,8 @@ { title: '鍗曟嵁鍙�', align: "center", - dataIndex: 'num' + dataIndex: 'num', + scopedSlots: { customRender: 'num' } }, { title: '涓氬姟绫诲瀷', @@ -618,8 +610,6 @@ orderReceive: "eam/repairOrder/receive", orderStart: "eam/repairOrder/start" }, - dictOptions: { - }, /* 鍒嗛〉鍙傛暟 */ ipagination: { current: 1, @@ -647,9 +637,6 @@ sonsAddStatus: false, } }, - // created() { - // this.getSuperFieldList(); - // }, computed: { importExcelUrl: function () { return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; @@ -754,24 +741,10 @@ } this.loading = false; this.$refs.FaultDescriptionList.faultId = '-1' + this.excuteRepairOrder = {} }) }, - // getSuperFieldList() { - // let fieldList = []; - // fieldList.push({ type: 'string', value: 'num', text: '缁翠慨璁㈠崟鍙�', dictCode: '' }) - // fieldList.push({ type: 'string', value: 'equipmentId', text: '璁惧鍙拌处ID', dictCode: '' }) - // fieldList.push({ type: 'string', value: 'reportRepairId', text: '鏁呴殰鎶ヤ慨鍗旾D', dictCode: '' }) - // fieldList.push({ type: 'string', value: 'teamId', text: '鐝粍ID', dictCode: '' }) - // fieldList.push({ type: 'string', value: 'faultDescription', text: '鏁呴殰鎻忚堪', dictCode: '' }) - // fieldList.push({ type: 'datetime', value: 'faultTime', text: '鏁呴殰鏃堕棿' }) - // fieldList.push({ type: 'string', value: 'photo', text: '鏁呴殰鐓х墖', dictCode: '' }) - // fieldList.push({ type: 'string', value: 'isStop', text: '鏄惁鍋滄満', dictCode: '' }) - // fieldList.push({ type: 'datetime', value: 'actualEndTime', text: '瀹為檯缁撴潫鏃堕棿' }) - // fieldList.push({ type: 'string', value: 'maintenanceMethod', text: '缁翠繚鏂瑰紡', dictCode: '' }) - // fieldList.push({ type: 'string', value: 'createBy', text: '鍒涘缓浜�', dictCode: '' }) - // fieldList.push({ type: 'datetime', value: 'createTime', text: '鍒涘缓鏃堕棿' }) - // this.superFieldList = fieldList - // }, + handleAddPre(isSelfCreate) { this.isSelfCreate = isSelfCreate; this.handleAdd(); @@ -781,9 +754,9 @@ if (record.reportRepairId != null && record.reportRepairId != undefined && record.reportRepairId != '') { this.isSelfCreate = '2'; } - else if(record.projectMaintenanceOrderId != null && record.projectMaintenanceOrderId != undefined && record.projectMaintenanceOrderId != ''){ + else if (record.projectMaintenanceOrderId != null && record.projectMaintenanceOrderId != undefined && record.projectMaintenanceOrderId != '') { this.isSelfCreate = '3'; - }else{ + } else { this.isSelfCreate = '1'; } this.handleEdit(record); diff --git a/src/views/eam/modules/equipment/EquipmentModel.vue b/src/views/eam/modules/equipment/EquipmentModel.vue index 726a235..6cb5f72 100644 --- a/src/views/eam/modules/equipment/EquipmentModel.vue +++ b/src/views/eam/modules/equipment/EquipmentModel.vue @@ -249,22 +249,14 @@ placeholder="璇疯緭鍏ョ鐞嗙粍缁�" v-decorator="['manageId', validatorRules.manageId]" /> --> - <!-- <a-select + <a-select :placeholder="disableSubmit?'':'璇烽�夋嫨绠$悊缁勭粐'" :options="this.departs" style="width: 100%" :disabled="disableSubmit" v-decorator="['manageId', validatorRules.manageId]" - /> --> - <!-- @change="(e)=>handle3Change(e)" --> - <a-tree-select - style="width: 100%" - :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" - :tree-data="treeData" - placeholder="璇烽�夋嫨绠$悊缁勭粐" - tree-default-expand-all - v-decorator="['manageId', validatorRules.manageId]" /> + <!-- @change="(e)=>handle3Change(e)" --> </a-form-item> </a-col> <a-col :span="24 / 3"> @@ -307,23 +299,23 @@ :wrapperCol="wrapperCol" label="浣跨敤閮ㄩ棬" > - <a-tree-select - style="width: 100%" - :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" - :tree-data="treeData" - placeholder="璇烽�夋嫨閮ㄩ棬" - tree-default-expand-all + <!-- <j-dict-select-tag + allow-clear + :disabled="disableSubmit" + :placeholder="disableSubmit?'':'璇烽�夋嫨浣跨敤缁勭粐'" + :triggerChange="true" + dictCode="sys_depart,depart_name,id,version = '7' and del_flag!='1'" v-decorator="['useId', validatorRules.useId]" - /> - <!-- <a-select + /> --> + <a-select :placeholder="disableSubmit?'':'璇烽�夋嫨浣跨敤閮ㄩ棬'" :options="this.departs" style="width: 100%" :disabled="disableSubmit" v-decorator="['useId', validatorRules.useId]" - /> --> + /> + <!-- @change="(e)=>handle2Change(e)" --> </a-form-item> - </a-col> <a-col :span="24 / 3"> @@ -561,6 +553,7 @@ 鍏抽棴 </a-button> <a-button + hidden v-if="!this.model.id" :disabled="disableSubmit || confirmLoading" :loading="confirmLoading" @@ -617,7 +610,6 @@ precisionParametersTemplateId: '', equipmentPhoto: '', departs: [], - treeData: [], model: {}, headers: {}, labelCol: { @@ -670,7 +662,6 @@ add: "/eam/equipment/add", edit: "/eam/equipment/edit", getSysDeparts: "/eam/equipment/getSysDeparts", - loadOptions: '/sys/sysDepart/loadDepartTreeOptions', }, //鏂板銆佺紪杈戙�佸垹闄ゃ�佹壒閲忓垹闄ゆ搷浣滄敼鍙樻暟鎹悗鍒锋柊鍏宠仈鐨勭粍浠剁殑鐩戝惉灞炴�� alterFlag: "", @@ -678,7 +669,6 @@ }, created() { this.getSysDeparts() - }, methods: { moment, @@ -693,7 +683,6 @@ this.visible = true; this.disableSubmit = false; this.fileList = []; - this.initOptions(); this.precisionParametersTemplateId = record.precisionParametersTemplateId this.processParametersTemplateId = record.processParametersTemplateId this.$nextTick(() => { @@ -946,16 +935,6 @@ // object-key琛ㄧず浠嶰SS涓嬭浇鏂囦欢鏃堕渶瑕佹寚瀹氬寘鍚枃浠跺悗缂�鍦ㄥ唴鐨勫畬鏁磋矾寰勶紝渚嬪abc/efg/123.jpg銆� return client.signatureUrl(record.path) } - }, - - initOptions() { - getAction(this.url.loadOptions).then(res => { - if (res.success) { - this.treeData = res.result - } else { - this.$message.warning(res.message) - } - }) }, diff --git a/src/views/eam/modules/equipmentBorrow/EquipmentUnloadingBorrowDetail.vue b/src/views/eam/modules/equipmentBorrow/EquipmentUnloadingBorrowDetail.vue index f58d3d4..480992e 100644 --- a/src/views/eam/modules/equipmentBorrow/EquipmentUnloadingBorrowDetail.vue +++ b/src/views/eam/modules/equipmentBorrow/EquipmentUnloadingBorrowDetail.vue @@ -19,7 +19,7 @@ size='middle' bordered rowKey='id' - :scroll='{x:true}' + :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" :columns='columns' :dataSource='dataSource' :pagination='ipagination' @@ -69,6 +69,7 @@ // disableMixinCreated: true, // originTargetKeys: [], // 琛ㄥご + disableMixinCreated: true, columns: [ { title: '#', @@ -117,7 +118,7 @@ { title: '璐d换鐝粍', align: 'center', - dataIndex: 'responsibilityTeamId' + dataIndex: 'responsibilityTeamName' }, { diff --git a/src/views/eam/modules/equipmentBorrow/EquipmentUnloadingBorrowDetailModal.vue b/src/views/eam/modules/equipmentBorrow/EquipmentUnloadingBorrowDetailModal.vue index a64fa52..c4c405b 100644 --- a/src/views/eam/modules/equipmentBorrow/EquipmentUnloadingBorrowDetailModal.vue +++ b/src/views/eam/modules/equipmentBorrow/EquipmentUnloadingBorrowDetailModal.vue @@ -14,7 +14,7 @@ <a-row :span='24'> <a-col :span='12'> <a-form-model-item label='鍗曟嵁鍙�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> - <a-input v-model='model.num' placeholder='璇疯緭鍏ュ崟鎹彿'></a-input> + <a-input v-model='model.num' placeholder='璇疯緭鍏ュ崟鎹彿' :disabled="disableSubmit"></a-input> </a-form-model-item> </a-col> <a-col :span='12'> @@ -36,6 +36,7 @@ <a-select placeholder='璇烽�夋嫨' v-model='model.useDepartId' + :disabled="disableSubmit" :options='this.departVoList' style='width: 100%' /> @@ -44,7 +45,7 @@ <a-col :span='12'> <a-form-model-item label='澶囨敞' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'> - <a-textarea v-model='model.remark' placeholder='璇疯緭鍏ュ娉�'></a-textarea> + <a-textarea v-model='model.remark' placeholder='璇疯緭鍏ュ娉�' :disabled="disableSubmit"></a-textarea> </a-form-model-item> </a-col> @@ -77,6 +78,7 @@ <a-date-picker :value='text' + :disabled="disableSubmit" v-if="col.dataIndex == 'actualBorrowDate'" format='YYYY-MM-DD HH:mm:ss' @change='(e)=>handleChange(e, record.key, col, index)' @@ -90,6 +92,7 @@ > <a-popconfirm title='纭畾鍒犻櫎鍚�?' + :disabled="disableSubmit" @confirm='() => handleDelete(text,record, index)' > <a>鍒犻櫎</a> @@ -107,6 +110,7 @@ <a-button @click='handleOk()' type='primary' + :disabled="disableSubmit" :loading='confirmLoading' >纭畾 </a-button> @@ -292,8 +296,8 @@ technicalStatus: data[i].technologyStatus_dictText, responsibilityTeamId: data[i].teamId, responsibilityUserId: data[i].functionary, - responsibilityUserName:functionary_dictText, - responsibilityTeamName:teamId_dictText, + responsibilityUserName:data[i].functionary_dictText, + responsibilityTeamName:data[i].teamId_dictText, equipmentStatus:data[i].equipmentStatus_dictText }) } diff --git a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer.vue b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer.vue index a4b66cf..c5acd18 100644 --- a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer.vue +++ b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer.vue @@ -151,6 +151,7 @@ :max="20000000" @change="(e)=>handleChange(e, record.key, col, index,record)" style="width: 100%" + :disabled="buttonDistable" /> </div> </template> @@ -166,7 +167,10 @@ class="table-operator" style="margin:-16px" > - <equipment-calibration-order-report-drawer-list :calibrationOrderId='calibrationOrderId' /> + <equipment-calibration-order-report-drawer-list + :buttonDistable='buttonDistable' + :calibrationOrderId='calibrationOrderId' + /> </div> </a-tab-pane> </a-tabs> diff --git a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportDrawerList.vue b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportDrawerList.vue index 8569e07..5b84f6a 100644 --- a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportDrawerList.vue +++ b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportDrawerList.vue @@ -19,6 +19,7 @@ @click="handleAdd" type="primary" icon="plus" + :disabled="buttonDistable" >鏂板</a-button> <a-table ref="table" @@ -43,7 +44,10 @@ slot="action" slot-scope="text, record" > - <a @click="handleEdit(record)">缂栬緫</a> + <a + :disabled="buttonDistable" + @click="handleEdit(record)" + >缂栬緫</a> <a-divider type="vertical" /> <Tooltip @@ -66,6 +70,7 @@ v-if="record.upload.path && record.upload.format.toLowerCase()=='pdf'" href="javascript:;" @click="view(record)" + :disabled="buttonDistable" > 棰勮 </a> @@ -78,6 +83,7 @@ <a href="javascript:;" @click="handleDownload(record)" + :disabled="buttonDistable" >涓嬭浇</a> <a-divider type="vertical" /> @@ -85,7 +91,7 @@ title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)" > - <a>鍒犻櫎</a> + <a :disabled="buttonDistable">鍒犻櫎</a> </a-popconfirm> </span> @@ -134,6 +140,11 @@ type: String, default: '-1', required: false + }, + buttonDistable: { + type: Boolean, + default: 'false', + required: false } }, watch: { diff --git a/src/views/eam/modules/equipmentChange/EquipmentChangeDetail.vue b/src/views/eam/modules/equipmentChange/EquipmentChangeDetail.vue index 56c3c75..d3ffde9 100644 --- a/src/views/eam/modules/equipmentChange/EquipmentChangeDetail.vue +++ b/src/views/eam/modules/equipmentChange/EquipmentChangeDetail.vue @@ -19,7 +19,7 @@ size='middle' bordered rowKey='id' - :scroll='{x:true}' + :scroll="{ x: 'calc(1500px + 40%)', y: 900 }" :columns='columns' :dataSource='dataSource' :pagination='ipagination' @@ -68,6 +68,7 @@ // disableMixinCreated: true, // originTargetKeys: [], // 琛ㄥご + disableMixinCreated: true, columns: [ { title: '#', @@ -83,86 +84,85 @@ title: '璁惧缂栫爜', align: 'center', - width: 100, - dataIndex: 'equipmentNum' + dataIndex: 'equipmentNum', + width: 170, }, { title: '璁惧鍚嶇О', align: 'center', - width: 150, - dataIndex: 'equipmentName' + dataIndex: 'equipmentName', + width: 170, }, { title: '鍨嬪彿', align: 'center', - width: 100, - dataIndex: 'specification' + dataIndex: 'specification', + width: 170, }, { title: '瑙勬牸', - width: 100, align: 'center', - dataIndex: 'model' - + dataIndex: 'model', + width: 170, }, { title: '鍙樺姩绫诲瀷', align: 'center', - width: 100, + width: 170, dataIndex: 'changeTypeName' }, { title: '鍙樺姩鍘熷洜', align: 'center', - width: 100, + width: 170, dataIndex: 'changeReason' }, { title: '鍙樺姩鍓嶇鐞嗛儴闂�', align: 'center', - width: 150, + width: 170, dataIndex: 'beforeDepartName' }, { title: '鍙樺姩鍚庣鐞嗛儴闂�', align: 'center', - width: 150, + width: 170, dataIndex: 'afterDepartName' }, { title: '鍙樺姩鍓嶇鐞嗕汉', align: 'center', - width: 150, + width: 170, dataIndex: 'beforeManagerName' }, { title: '鍙樺姩鍚庣鐞嗕汉', align: 'center', - width: 150, + width: 170, dataIndex: 'afterManagerName' }, { title: '鍙樺姩鍓嶄娇鐢ㄩ儴闂�', align: 'center', - width: 150, + width: 170, dataIndex: 'beforeUsageDepartName' }, { title: '鍙樺姩鍚庝娇鐢ㄩ儴闂�', align: 'center', - width: 150, + width: 170, dataIndex: 'afterUsageDepartName' }, { title: '鍙樺姩鍓嶈矗浠荤彮缁�', align: 'center', - width: 150, + width: 170, dataIndex: 'beforeTeamId' }, @@ -170,62 +170,62 @@ { title: '鍙樺姩鍚庤矗浠荤彮缁�', align: 'center', - width: 150, + width: 170, dataIndex: 'afterTeamId' }, { title: '鍙樺姩鍓嶈矗浠讳汉', align: 'center', - width: 150, + width: 170, dataIndex: 'beforeFunctionaryName' }, { title: '鍙樺姩鍚庤矗浠讳汉', align: 'center', - width: 150, + width: 170, dataIndex: 'afterFunctionaryName' }, { title: '鍙樺姩鍓嶄綅缃�', align: 'center', - width: 150, + width: 170, dataIndex: 'beforeLocation' }, { title: '鍙樺姩鍚庝綅缃�', align: 'center', - width: 150, + width: 170, dataIndex: 'afterLocation' }, { title: '鍙樺姩鍓嶈澶囩姸鎬�', align: 'center', - width: 150, + width: 170, dataIndex: 'beforeEquipmentStatus' }, { title: '鍙樺姩鍚庤澶囩姸鎬�', align: 'center', - width: 150, + width: 170, dataIndex: 'afterEquipmentStatusName' }, { title: '鍙樺姩鍓嶆妧鏈姸鎬�', align: 'center', - width: 150, + width: 170, dataIndex: 'beforeTechnologyStatus' }, { title: '鍙樺姩鍚庢妧鏈姸鎬�', align: 'center', - width: 150, + width: 170, dataIndex: 'afterTechnologyStatusName' } diff --git a/src/views/eam/modules/equipmentChange/EquipmentChangeDetailModal.vue b/src/views/eam/modules/equipmentChange/EquipmentChangeDetailModal.vue index 77e4976..3c5eb90 100644 --- a/src/views/eam/modules/equipmentChange/EquipmentChangeDetailModal.vue +++ b/src/views/eam/modules/equipmentChange/EquipmentChangeDetailModal.vue @@ -15,13 +15,13 @@ <a-row> <a-col :span='24'> <a-form-model-item label='鍗曟嵁鍙�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> - <a-input v-model='model.num' placeholder='璇疯緭鍏ュ崟鎹彿'></a-input> + <a-input v-model='model.num' placeholder='璇疯緭鍏ュ崟鎹彿' :disabled="disableSubmit"></a-input> </a-form-model-item> </a-col> <a-col :span='24'> <a-form-model-item label='澶囨敞' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'> - <a-textarea v-model='model.remark' rows="3" placeholder='璇疯緭鍏ュ娉�'></a-textarea> + <a-textarea v-model='model.remark' rows="3" placeholder='璇疯緭鍏ュ娉�' :disabled="disableSubmit"></a-textarea> </a-form-model-item> </a-col> </a-row> @@ -31,6 +31,7 @@ type='primary' :style="{ marginRight: '8px',marginBottom:'8px' }" :loading='confirmLoading' + :disabled="disableSubmit" @click='selectInspectionProjects()' >璁惧淇℃伅 </a-button> @@ -67,6 +68,7 @@ placeholder='璇烽�夋嫨' v-if="col.dataIndex === 'afterDepartId'" :options='record.departVoList' + :disabled="disableSubmit" @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' /> @@ -84,6 +86,7 @@ v-if="col.dataIndex === 'afterManager'" :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" :options='record.userVoList' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' @@ -102,6 +105,7 @@ v-if="col.dataIndex === 'afterUsageDepartId'" :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" :options='record.departVoList' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' @@ -120,6 +124,7 @@ <a-input :value='text' placeholder="璇疯緭鍏ヨ矗浠荤彮缁�" + :disabled="disableSubmit" v-if="col.dataIndex === 'afterTeamId'" @change='(e)=>handleChange(e, record.key, col, index)' /> @@ -139,6 +144,7 @@ v-if="col.dataIndex === 'afterFunctionary'" :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" :options='record.userVoList' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' @@ -150,6 +156,7 @@ v-if="col.dataIndex == 'changeReason'" :maxLength="500" auto-size + :disabled="disableSubmit" placeholder="璇疯緭鍏ュ彉鍔ㄥ師鍥�" @change='(e)=>handleChange(e, record.key, col, index)' /> @@ -158,6 +165,7 @@ :value='text' v-if="col.dataIndex === 'afterLocation'" placeholder='璇疯緭鍏ュ彉鍔ㄥ悗浣嶇疆' + :disabled="disableSubmit" @change='(e)=>handleChange(e, record.key, col, index)' /> @@ -165,6 +173,7 @@ v-if="col.dataIndex === 'afterTechnologyStatus'" :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" :options='record.technologyStatusList' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' @@ -174,6 +183,7 @@ v-if="col.dataIndex === 'afterEquipmentStatus'" :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" :options='record.equipmentStatusList' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' @@ -182,6 +192,7 @@ v-if="col.dataIndex === 'changeType'" :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" :options='record.changeTypeList' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' @@ -195,6 +206,7 @@ > <a-popconfirm title='纭畾鍒犻櫎鍚�?' + :disabled="disableSubmit" @confirm='() => handleDelete(text,record, index)' > <a>鍒犻櫎</a> @@ -212,6 +224,7 @@ <a-button @click='handleOk()' type='primary' + :disabled="disableSubmit" :loading='confirmLoading' >纭畾 </a-button> diff --git a/src/views/eam/modules/equipmentDisposal/EquipmentDisposalDetailList.vue b/src/views/eam/modules/equipmentDisposal/EquipmentDisposalDetailList.vue index 9b5a245..33e29f2 100644 --- a/src/views/eam/modules/equipmentDisposal/EquipmentDisposalDetailList.vue +++ b/src/views/eam/modules/equipmentDisposal/EquipmentDisposalDetailList.vue @@ -42,15 +42,16 @@ size="middle" bordered rowKey="id" - :scroll="{x:true}" + :scroll="{ x: 'calc(1000px + 5%)', y: 900 }" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + :maxHeight="800" @change="handleTableChange"> <template slot="htmlSlot" slot-scope="text"> + <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" --> <div v-html="text"></div> </template> <template slot="equipmentPhoto" slot-scope="text,record"> @@ -145,73 +146,88 @@ { title:'璁惧缂栫爜', align:"center", - dataIndex: 'equipmentNum' + dataIndex: 'equipmentNum', + width:200 }, { title:'璧勪骇缂栫爜', align:"center", - dataIndex: 'assetNumber' + dataIndex: 'assetNumber', + width:200 }, { title:'鐗圭璁惧', align:"center", dataIndex: 'specificEquipment_dictText', + width:200 }, { title:'璁惧鍚嶇О', align:"center", - dataIndex: 'equipmentName' + dataIndex: 'equipmentName', + width:200 }, { title:'璁惧鍨嬪彿', align:"center", - dataIndex: 'model' + dataIndex: 'model', + width:200 }, { title:'璁惧瑙勬牸', align:"center", - dataIndex: 'specification' + dataIndex: 'specification', + width:200 }, { title:'璁惧鐘舵��', align:"center", dataIndex: 'equipmentStatus_dictText', + width:200 }, { title:'鎶�鏈姸鎬�', align:"center", dataIndex: 'technologyStatus_dictText', + width:200 }, { title:'璁惧浣嶇疆', align:"center", - dataIndex: 'location' + dataIndex: 'location', + width:200 }, { title:'閲嶈搴�', align:"center", - dataIndex: 'equipmentImportanceId_dictText' + dataIndex: 'equipmentImportanceId_dictText', + width:200 + }, { title:'璁惧鍥剧墖', align:"center", dataIndex: 'equipmentPhoto', - scopedSlots: {customRender: "equipmentPhoto"} + scopedSlots: {customRender: "equipmentPhoto"}, + width:200 }, { title:'鍑忓皯鏂瑰紡', align:"center", - dataIndex: 'reduceMethod_dictText' + dataIndex: 'reduceMethod_dictText', + width:200 }, { title:'澶勭疆鍘熷洜', align:"center", - dataIndex: 'disposalReason' + dataIndex: 'disposalReason', + width:200 }, { title:'澶勭疆鏃ユ湡', align:"center", - dataIndex: 'disposalDate' + dataIndex: 'disposalDate', + width:200 }, // { // title: '鎿嶄綔', diff --git a/src/views/eam/modules/equipmentDisposal/EquipmentDisposalForm.vue b/src/views/eam/modules/equipmentDisposal/EquipmentDisposalForm.vue index 881de30..3397507 100644 --- a/src/views/eam/modules/equipmentDisposal/EquipmentDisposalForm.vue +++ b/src/views/eam/modules/equipmentDisposal/EquipmentDisposalForm.vue @@ -44,6 +44,8 @@ :disabled="formDisabled" :rowNumber="true" :rowSelection="true" + :bordered="true" + :alwaysEdit="true" :toolbar="true" :toolbarConfig="toolbarConfig" > @@ -134,7 +136,7 @@ key: 'id', type: JVXETypes.hidden, width: '100px', - fixed: 'left' + align:"center", }, { title: '璁惧鍙樺姩鍗昳d', @@ -142,6 +144,7 @@ type: JVXETypes.hidden, width: '200px', placeholder: '璇疯緭鍏�${title}', + align:"center", defaultValue: '' }, { @@ -151,6 +154,7 @@ disabled: true, width: '60px', placeholder: '璇疯緭鍏�${title}', + align:"center", defaultValue: '' }, { @@ -158,31 +162,92 @@ key: 'equipmentNum', type: JVXETypes.normal, disabled: true, - width: '120px', - // placeholder: '璇疯緭鍏�${title}', + width: '200px', + align:"center", defaultValue: '', - fixed: 'left' + }, + { + title: '璁惧鍚嶇О', + key: 'equipmentName', + type: JVXETypes.normal, + disabled: true, + width: '200px', + align:"center", + defaultValue: '', + // fixed: 'left' + }, + { + title: '璁惧鍨嬪彿', + key: 'model', + type: JVXETypes.normal, + disabled: true, + width: '200px', + align:"center", + defaultValue: '' + }, + { + title: '璁惧瑙勬牸', + key: 'specification', + type: JVXETypes.normal, + disabled: true, + width: '200px', + align:"center", + defaultValue: '' + }, + { + title: '璁惧鐘舵��', + key: 'equipmentStatus_dictText', + type: JVXETypes.normal, + disabled: true, + width: '195px', + align:"center", + defaultValue: '' + }, + { + title: '璁惧浣嶇疆', + key: 'location', + type: JVXETypes.normal, + disabled: true, + width: '195px', + align:"center", + defaultValue: '' + }, + { + title: '鐗圭璁惧', + key: 'specificEquipment', + type: JVXETypes.hidden, + align:"center", + disabled: true, + width: '200px', + // placeholder: '璇疯緭鍏�${title}', + defaultValue: '' + }, + { + title: '鐗圭璁惧', + key: 'specificEquipment_dictText', + type: JVXETypes.normal, + disabled: true, + width: '200px', + align:"center", + defaultValue: '' }, { title: '璧勪骇缂栫爜', key: 'assetNumber', type: JVXETypes.normal, disabled: true, - width: '120px', - // placeholder: '璇疯緭鍏�${title}', + width: '195px', + align:"center", defaultValue: '', - fixed: 'left' }, - { title: '澶勭疆鍘熷洜', key: 'disposalReason', type: JVXETypes.input, - // disabled:true, - width: '200px', + align:"center", + width: '195px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', - fixed: 'left', validateRules: [ { required: true, // 蹇呭~ @@ -193,11 +258,10 @@ title: '澶勭疆鏃ユ湡', key: 'disposalDate', type: JVXETypes.datetime, - // disabled:true, - width: '180px', + align:"center", + width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', - fixed: 'left', validateRules: [ { required: true // 蹇呭~ @@ -234,23 +298,14 @@ ] }, { - title: '鐗圭璁惧', - key: 'specificEquipment', - type: JVXETypes.hidden, - + title: '鍑忓皯鏂瑰紡', + key: 'reduceMethod', + type: JVXETypes.selectDictSearch, disabled: true, width: '200px', - // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' - }, - { - title: '鐗圭璁惧', - key: 'specificEquipment_dictText', - type: JVXETypes.normal, - disabled: true, - width: '200px', - // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' + align:"center", + defaultValue: '', + dict:'mom_eam_transfer_method,name,id' }, // { // title: '鐗圭璁惧', @@ -263,43 +318,6 @@ // // placeholder: '璇疯緭鍏�${title}', // defaultValue: '' // }, - { - title: '璁惧鍚嶇О', - key: 'equipmentName', - type: JVXETypes.normal, - disabled: true, - width: '200px', - // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' - }, - - { - title: '璁惧鍨嬪彿', - key: 'model', - type: JVXETypes.normal, - disabled: true, - width: '200px', - // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' - }, - { - title: '璁惧瑙勬牸', - key: 'specification', - type: JVXETypes.normal, - disabled: true, - width: '200px', - // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' - }, - { - title: '璁惧鐘舵��', - key: 'equipmentStatus_dictText', - type: JVXETypes.normal, - disabled: true, - width: '120px', - // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' - }, // { // title: '璁惧鐘舵��', // key: 'equipmentStatus', @@ -316,8 +334,8 @@ key: 'technologyStatus_dictText', type: JVXETypes.normal, disabled: true, - width: '120px', - // placeholder: '璇疯緭鍏�${title}', + width: '200px', + align:"center", defaultValue: '' }, // { @@ -332,33 +350,15 @@ // defaultValue: '' // }, { - title: '璁惧浣嶇疆', - key: 'location', - type: JVXETypes.normal, - disabled: true, - width: '200px', - // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' - }, - { title: '閲嶈搴�', key: 'equipmentImportanceId_dictText', type: JVXETypes.normal, disabled: true, - width: '200px', - // placeholder: '璇疯緭鍏�${title}', + width: '195px', + align:"center", defaultValue: '' }, - { - title: '鍑忓皯鏂瑰紡', - key: 'reduceMethod', - type: JVXETypes.selectDictSearch, - disabled: true, - width: '200px', - // placeholder: '璇疯緭鍏�${title}', - defaultValue: '', - dict:'mom_eam_transfer_method,name,id' - }, + // { // title: '閲嶈搴�', // key: 'equipmentImportanceId', @@ -376,23 +376,24 @@ // // placeholder: '璇疯緭鍏�${title}', // defaultValue: '' // } - { - title: '璁惧鍥剧墖', - key: 'equipmentPhoto', - type: JVXETypes.slot, - disabled: true, - width: '120px', - slotName:'equipmentPhoto' + // { + // title: '璁惧鍥剧墖', + // key: 'equipmentPhoto', + // type: JVXETypes.slot, + // disabled: true, + // width: '120px', + // slotName:'equipmentPhoto' - }, - { - title: '鎿嶄綔', - key: 'action', - type: JVXETypes.slot, - disabled: true, - width: '100px', - slotName: 'action', - }, + // }, + // { + // title: '鎿嶄綔', + // key: 'action', + // type: JVXETypes.slot, + // disabled: true, + // width: '100px', + // align:"center", + // slotName: 'action', + // }, ] }, diff --git a/src/views/eam/modules/equipmentReturn/EquipmentUnloadingReturnDetail.vue b/src/views/eam/modules/equipmentReturn/EquipmentUnloadingReturnDetail.vue index 4a5d5e3..23200cf 100644 --- a/src/views/eam/modules/equipmentReturn/EquipmentUnloadingReturnDetail.vue +++ b/src/views/eam/modules/equipmentReturn/EquipmentUnloadingReturnDetail.vue @@ -19,7 +19,7 @@ size='middle' bordered rowKey='id' - :scroll='{x:true}' + :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" :columns='columns' :dataSource='dataSource' :pagination='ipagination' @@ -69,6 +69,7 @@ // disableMixinCreated: true, // originTargetKeys: [], // 琛ㄥご + disableMixinCreated: true, columns: [ { title: '#', @@ -112,7 +113,7 @@ { title: '璐d换鐝粍', align: 'center', - dataIndex: 'responsibilityTeamId' + dataIndex: 'responsibilityTeamName' }, { diff --git a/src/views/eam/modules/equipmentReturn/EquipmentUnloadingReturnDetailModal.vue b/src/views/eam/modules/equipmentReturn/EquipmentUnloadingReturnDetailModal.vue index 6e6cd73..5916e5b 100644 --- a/src/views/eam/modules/equipmentReturn/EquipmentUnloadingReturnDetailModal.vue +++ b/src/views/eam/modules/equipmentReturn/EquipmentUnloadingReturnDetailModal.vue @@ -14,17 +14,17 @@ <a-row :span='24'> <a-col :span='12'> <a-form-model-item label='鍗曟嵁鍙�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> - <a-input v-model='model.num' placeholder='璇疯緭鍏ュ崟鎹彿'></a-input> + <a-input v-model='model.num' placeholder='璇疯緭鍏ュ崟鎹彿' :disabled="disableSubmit"></a-input> </a-form-model-item> </a-col> <a-col :span='12'> <a-form-model-item label='涓氬姟绫诲瀷' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='businessType'> <j-dict-select-tag allow-clear - :disabled='disableSubmit' v-model='model.businessType' :placeholder="disableSubmit?'':'璇烽�夋嫨绫诲瀷'" :triggerChange='true' + :disabled="disableSubmit" dictCode='business_type' /> </a-form-model-item> @@ -36,6 +36,7 @@ <a-select placeholder='璇烽�夋嫨' v-model='model.useDepartId' + :disabled="disableSubmit" :options='this.departVoList' style='width: 100%' /> @@ -44,7 +45,7 @@ <a-col :span='12'> <a-form-model-item label='澶囨敞' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'> - <a-textarea v-model='model.remark' placeholder='璇疯緭鍏ュ娉�'></a-textarea> + <a-textarea v-model='model.remark' placeholder='璇疯緭鍏ュ娉�' :disabled="disableSubmit"></a-textarea> </a-form-model-item> </a-col> @@ -55,6 +56,7 @@ type='primary' :style="{ marginRight: '8px',marginBottom:'8px' }" :loading='confirmLoading' + :disabled="disableSubmit" @click='selectInspectionProjects()' >璁惧淇℃伅 </a-button> @@ -76,6 +78,7 @@ <a-date-picker :value='text' + :disabled="disableSubmit" v-if="col.dataIndex == 'actualReturnDate'" format='YYYY-MM-DD HH:mm:ss' @change='(e)=>handleChange(e, record.key, col, index)' @@ -89,6 +92,7 @@ > <a-popconfirm title='纭畾鍒犻櫎鍚�?' + :disabled="disableSubmit" @confirm='() => handleDelete(text,record, index)' > <a>鍒犻櫎</a> @@ -106,6 +110,7 @@ <a-button @click='handleOk()' type='primary' + :disabled="disableSubmit" :loading='confirmLoading' >纭畾 </a-button> @@ -200,14 +205,14 @@ { title: '璐d换鐝粍', align: 'center', - dataIndex: 'responsibilityTeamId' + dataIndex: 'responsibilityTeamName' }, { title: '璐d换浜�', align: 'center', - dataIndex: 'responsibilityUserId' + dataIndex: 'responsibilityUserName' }, { title: '鎿嶄綔', @@ -292,7 +297,9 @@ technicalStatus: data[i].technologyStatus_dictText, responsibilityTeamId: data[i].teamId, responsibilityUserId: data[i].functionary, - actualBorrowDate:data[i].updateTime + actualBorrowDate:data[i].updateTime, + responsibilityUserName:data[i].functionary_dictText, + responsibilityTeamName:data[i].teamId_dictText, }) } diff --git a/src/views/eam/modules/equipmentScrap/EquipmentScrapDetailList.vue b/src/views/eam/modules/equipmentScrap/EquipmentScrapDetailList.vue index 261baa3..417e423 100644 --- a/src/views/eam/modules/equipmentScrap/EquipmentScrapDetailList.vue +++ b/src/views/eam/modules/equipmentScrap/EquipmentScrapDetailList.vue @@ -69,7 +69,7 @@ size="middle" bordered rowKey="id" - :scroll="{x:true}" + :scroll="{ x: 'calc(1500px + 50%)', y: 900 }" :columns="columns" :dataSource="dataSource" :pagination="ipagination" diff --git a/src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue b/src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue index 7f6ecf4..57b6f95 100644 --- a/src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue +++ b/src/views/eam/modules/equipmentScrap/EquipmentScrapForm.vue @@ -67,10 +67,12 @@ :loading="equipmentScrapDetailTable.loading" :columns="equipmentScrapDetailTable.columns" :dataSource="equipmentScrapDetailTable.dataSource" - :maxHeight="800" + :maxHeight="900" :disabled="formDisabled" :rowNumber="true" :rowSelection="true" + :alwaysEdit="true" + :bordered="true" :toolbar="true" :toolbarConfig="toolbarConfig" > @@ -172,9 +174,9 @@ { title: '璁惧鎶ュ簾鍗曟槑缁唅d', key: 'id', - type: JVXETypes.normal, + type: JVXETypes.hidden, width: '100px', - fixed: 'left' + align:'center', }, { title: '璁惧鍙樺姩鍗昳d', @@ -182,7 +184,8 @@ type: JVXETypes.hidden, width: '200px', placeholder: '璇疯緭鍏�${title}', - defaultValue: '' + defaultValue: '', + align:'center', }, { title: '璁惧ID', @@ -191,27 +194,69 @@ disabled: true, width: '60px', placeholder: '璇疯緭鍏�${title}', - defaultValue: '' + defaultValue: '', + align:'center', }, { title: '璁惧缂栫爜', key: 'equipmentNum', type: JVXETypes.normal, disabled: true, - width: '120px', + width: '200px', // placeholder: '璇疯緭鍏�${title}', defaultValue: '', - fixed: 'left' + align:'center', + }, + { + title: '璁惧鍚嶇О', + key: 'equipmentName', + type: JVXETypes.normal, + disabled: true, + width: '200px', + // placeholder: '璇疯緭鍏�${title}', + defaultValue: '', + align:'center', + }, + + { + title: '璁惧鍨嬪彿', + key: 'model', + type: JVXETypes.normal, + disabled: true, + width: '200px', + // placeholder: '璇疯緭鍏�${title}', + defaultValue: '', + align:'center', + }, + { + title: '璁惧瑙勬牸', + key: 'specification', + type: JVXETypes.normal, + disabled: true, + width: '200px', + // placeholder: '璇疯緭鍏�${title}', + defaultValue: '', + align:'center', + }, + { + title: '璁惧鐘舵��', + key: 'equipmentStatus_dictText', + type: JVXETypes.normal, + disabled: true, + width: '195px', + // placeholder: '璇疯緭鍏�${title}', + defaultValue: '', + align:'center', }, { title: '璧勪骇缂栫爜', key: 'assetNumber', type: JVXETypes.normal, disabled: true, - width: '120px', + width: '195px', // placeholder: '璇疯緭鍏�${title}', defaultValue: '', - fixed: 'left' + align:'center', }, { title: '鎶ュ簾鏃ユ湡', @@ -220,7 +265,8 @@ width: '200px', placeholder: '璇烽�夋嫨${title}', defaultValue: '', - fixed: 'left', + align:'center', + // fixed: 'left', // 琛ㄥ崟楠岃瘉瑙勫垯 validateRules: [ { @@ -232,10 +278,11 @@ title: '鎶ュ簾鍘熷洜', key: 'scrapReason', type: JVXETypes.input, - width: '200px', + width: '195px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', - fixed: 'left', + align:'center', + // fixed: 'left', // 琛ㄥ崟楠岃瘉瑙勫垯 validateRules: [ { @@ -247,7 +294,7 @@ title: '鐗圭璁惧', key: 'specificEquipment', type: JVXETypes.hidden, - + align:'center', disabled: true, width: '200px', // placeholder: '璇疯緭鍏�${title}', @@ -258,46 +305,10 @@ key: 'specificEquipment_dictText', type: JVXETypes.normal, disabled: true, - width: '100px', - // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' - }, - { - title: '璁惧鍚嶇О', - key: 'equipmentName', - type: JVXETypes.normal, - disabled: true, width: '200px', // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' - }, - - { - title: '璁惧鍨嬪彿', - key: 'model', - type: JVXETypes.normal, - disabled: true, - width: '200px', - // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' - }, - { - title: '璁惧瑙勬牸', - key: 'specification', - type: JVXETypes.normal, - disabled: true, - width: '200px', - // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' - }, - { - title: '璁惧鐘舵��', - key: 'equipmentStatus_dictText', - type: JVXETypes.normal, - disabled: true, - width: '120px', - // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' + defaultValue: '', + align:'center', }, // { // title: '璁惧鐘舵��', @@ -315,9 +326,10 @@ key: 'technologyStatus_dictText', type: JVXETypes.normal, disabled: true, - width: '120px', + width: '200px', // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' + defaultValue: '', + align:'center', }, { @@ -327,7 +339,8 @@ disabled: true, width: '200px', // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' + defaultValue: '', + align:'center', }, { title: '閲嶈搴�', @@ -336,7 +349,8 @@ disabled: true, width: '200px', // placeholder: '璇疯緭鍏�${title}', - defaultValue: '' + defaultValue: '', + align:'center', }, // { // title: '閲嶈搴�', @@ -355,23 +369,24 @@ // // placeholder: '璇疯緭鍏�${title}', // defaultValue: '' // } - { - title: '璁惧鍥剧墖', - key: 'equipmentPhoto', - type: JVXETypes.slot, - disabled: true, - width: '120px', - slotName:'equipmentPhoto' + // { + // title: '璁惧鍥剧墖', + // key: 'equipmentPhoto', + // type: JVXETypes.slot, + // disabled: true, + // width: '200px', + // slotName:'equipmentPhoto', + // align:'center', - }, - { - title: '鎿嶄綔', - key: 'action', - type: JVXETypes.slot, - disabled: true, - width: '100px', - slotName: 'action', - }, + // }, + // { + // title: '鎿嶄綔', + // key: 'action', + // type: JVXETypes.slot, + // disabled: true, + // width: '100px', + // slotName: 'action', + // }, ] }, diff --git a/src/views/eam/modules/equipmentScrap/EquipmentScrapModal.vue b/src/views/eam/modules/equipmentScrap/EquipmentScrapModal.vue index cf98f32..741d53f 100644 --- a/src/views/eam/modules/equipmentScrap/EquipmentScrapModal.vue +++ b/src/views/eam/modules/equipmentScrap/EquipmentScrapModal.vue @@ -5,6 +5,7 @@ :maskClosable="false" switchFullscreen @ok="handleOk" + :title="title" @cancel="handleCancel"> <equipment-scrap-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/> </j-modal> @@ -12,7 +13,7 @@ <script> - import EquipmentScrapForm from './EquipmentScrapForm.vue' + import EquipmentScrapForm from './EquipmentScrapForm' export default { name: 'EquipmentScrapModal', diff --git a/src/views/eam/modules/equipmentSeal/EquipmentSealDetailList.vue b/src/views/eam/modules/equipmentSeal/EquipmentSealDetailList.vue index 22fde4b..6a74814 100644 --- a/src/views/eam/modules/equipmentSeal/EquipmentSealDetailList.vue +++ b/src/views/eam/modules/equipmentSeal/EquipmentSealDetailList.vue @@ -1,83 +1,80 @@ <template> - <a-card :bordered="false" :class="'cust-erp-sub-tab'"> - <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> - <a-row :gutter="24"> - </a-row> - </a-form> - </div> - <!-- 鏌ヨ鍖哄煙-END --> - - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <!-- <div class="table-operator" v-if="mainId"> - <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 --> + <a-card + :bordered="false" + :class="'cust-erp-sub-tab'" + > <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" - :scroll="{x:true}" + :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - @change="handleTableChange"> + @change="handleTableChange" + > - <template slot="htmlSlot" slot-scope="text"> + <template + slot="htmlSlot" + slot-scope="text" + > <div v-html="text"></div> </template> - <template slot="equipmentPhoto" slot-scope="text,record"> + <template + slot="equipmentPhoto" + slot-scope="text,record" + > <Tooltip - placement="top" - title="棰勮鍥剧墖" + placement="top" + title="棰勮鍥剧墖" > - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + <span + v-if="!text" + style="font-size: 12px;font-style: italic;" + >鏃犲浘鐗�</span> + <img + v-else + :src="getImgView(text)" + :preview="record.id" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> </Tooltip> </template> - <template slot="fileSlot" slot-scope="text"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> + <template + slot="fileSlot" + slot-scope="text" + > + <span + v-if="!text" + style="font-size: 12px;font-style: italic;" + >鏃犳枃浠�</span> <a-button v-else :ghost="true" type="primary" icon="download" size="small" - @click="downloadFile(text)"> + @click="downloadFile(text)" + > 涓嬭浇 </a-button> </template> - <span slot="action" slot-scope="text, record"> + <span + slot="action" + slot-scope="text, record" + > <a @click="handleEdit(record)">缂栬緫</a> <a-divider type="vertical" /> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + @confirm="() => handleDelete(record.id)" + > <a>鍒犻櫎</a> </a-popconfirm> </span> @@ -85,192 +82,196 @@ </a-table> </div> - <equipmentSealDetail-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></equipmentSealDetail-modal> + <equipmentSealDetail-modal + ref="modalForm" + @ok="modalFormOk" + :mainId="mainId" + ></equipmentSealDetail-modal> </a-card> </template> <script> - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import EquipmentSealDetailModal from './EquipmentSealDetailModal' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import EquipmentSealDetailModal from './EquipmentSealDetailModal' - export default { - name: "EquipmentSealDetailList", - mixins:[JeecgListMixin], - components: { EquipmentSealDetailModal }, - props:{ - mainId:{ - type:String, - default:'', - required:false - } - }, - watch:{ - mainId:{ - immediate: true, - handler(val) { - if(!this.mainId){ - this.clearList() - }else{ - this.queryParam['equipmentChangeId'] = val - this.loadData(1); - } - } - } - }, - data () { - return { - description: '璁惧灏佸瓨绠$悊椤甸潰', - disableMixinCreated:true, - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } - }, - { - title:'璁惧缂栫爜', - align:"center", - dataIndex: 'equipmentNum' - }, - { - title:'璧勪骇缂栫爜', - align:"center", - dataIndex: 'assetNumber' - }, - { - title:'璁惧鍚嶇О', - align:"center", - dataIndex: 'equipmentName' - }, - { - title:'璁惧鍨嬪彿', - align:"center", - dataIndex: 'model' - }, - { - title:'璁惧瑙勬牸', - align:"center", - dataIndex: 'specification' - }, - { - title:'鐗圭璁惧', - align:"center", - dataIndex: 'specificEquipment_dictText', - }, - { - title:'璁惧鐘舵��', - align:"center", - dataIndex: 'equipmentStatus_dictText', - }, - { - title:'鎶�鏈姸鎬�', - align:"center", - dataIndex: 'technologyStatus_dictText', - }, - { - title:'璁惧浣嶇疆', - align:"center", - dataIndex: 'location' - }, - { - title:'閲嶈搴�', - align:"center", - dataIndex: 'equipmentImportanceId_dictText', - }, - { - title:'璁惧鍥剧墖', - align:"center", - dataIndex: 'equipmentPhoto', - scopedSlots: {customRender: "equipmentPhoto"} - }, - { - title:'灏佸瓨鍘熷洜', - align:"center", - dataIndex: 'sealReason' - }, - { - title:'灏佸瓨鏃ユ湡', - align:"center", - dataIndex: 'sealDate' - }, - { - title:'棰勮鍚皝鏃ユ湡', - align:"center", - dataIndex: 'planUnsealDate', - // customRender:function (text) { - // return !text?"":(text.length>10?text.substr(0,10):text) - // } - }, - // { - // title:'鏄惁寮哄埗鍚皝', - // align:"center", - // dataIndex: 'isForceUnseal', - // customRender: (text) => (!text ? "" : (text == "Y" ? "鏄�" : "鍚�")) - // }, - // { - // title:'寮哄埗鍚皝鏃ユ湡', - // align:"center", - // dataIndex: 'forceUnsealDate', - // // customRender:function (text) { - // // return !text?"":(text.length>10?text.substr(0,10):text) - // // } - // }, - // { - // title:'寮哄埗鍚皝鍚庝繚鍏�', - // align:"center", - // dataIndex: 'maintenanceAfterUnseal', - // customRender: (text) => (!text ? "" : (text == "Y" ? "鏄�" : "鍚�")) - // }, - // { - // title:'淇濆吇鏍囧噯', - // align:"center", - // dataIndex: 'maintenanceStandardId_dictText', - // }, - // { - // title: '鎿嶄綔', - // dataIndex: 'action', - // align:"center", - // fixed:"right", - // width:147, - // scopedSlots: { customRender: 'action' }, - // } - ], - url: { - list: "/eam/equipmentSeal/listEquipmentSealDetailByMainId", - delete: "/eam/equipmentSeal/deleteEquipmentSealDetail", - deleteBatch: "/eam/equipmentSeal/deleteBatchEquipmentSealDetail", - exportXlsUrl: "/eam/equipmentSeal/exportEquipmentSealDetail", - importUrl: "/eam/equipmentSeal/importEquipmentSealDetail", - }, - dictOptions:{ - auditStatus:[], - } - } - }, - created() { - }, - computed: { - importExcelUrl(){ - return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; - } - }, - methods: { - clearList(){ - this.dataSource=[] - this.selectedRowKeys=[] - this.ipagination.current = 1 - } - +export default { + name: "EquipmentSealDetailList", + mixins: [JeecgListMixin], + components: { EquipmentSealDetailModal }, + props: { + mainId: { + type: String, + default: '', + required: false } + }, + watch: { + mainId: { + immediate: true, + handler(val) { + if (!this.mainId) { + this.clearList() + } else { + this.queryParam['equipmentChangeId'] = val + this.loadData(1); + } + } + } + }, + data() { + return { + description: '璁惧灏佸瓨绠$悊椤甸潰', + disableMixinCreated: true, + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title: '璁惧缂栫爜', + align: "center", + dataIndex: 'equipmentNum' + }, + { + title: '璧勪骇缂栫爜', + align: "center", + dataIndex: 'assetNumber' + }, + { + title: '璁惧鍚嶇О', + align: "center", + dataIndex: 'equipmentName' + }, + { + title: '璁惧鍨嬪彿', + align: "center", + dataIndex: 'model' + }, + { + title: '璁惧瑙勬牸', + align: "center", + dataIndex: 'specification' + }, + { + title: '鐗圭璁惧', + align: "center", + dataIndex: 'specificEquipment_dictText', + }, + { + title: '璁惧鐘舵��', + align: "center", + dataIndex: 'equipmentStatus_dictText', + }, + { + title: '鎶�鏈姸鎬�', + align: "center", + dataIndex: 'technologyStatus_dictText', + }, + { + title: '璁惧浣嶇疆', + align: "center", + dataIndex: 'location' + }, + { + title: '閲嶈搴�', + align: "center", + dataIndex: 'equipmentImportanceId_dictText', + }, + { + title: '璁惧鍥剧墖', + align: "center", + dataIndex: 'equipmentPhoto', + scopedSlots: { customRender: "equipmentPhoto" } + }, + { + title: '灏佸瓨鍘熷洜', + align: "center", + dataIndex: 'sealReason' + }, + { + title: '灏佸瓨鏃ユ湡', + align: "center", + dataIndex: 'sealDate' + }, + { + title: '棰勮鍚皝鏃ユ湡', + align: "center", + dataIndex: 'planUnsealDate', + // customRender:function (text) { + // return !text?"":(text.length>10?text.substr(0,10):text) + // } + }, + // { + // title:'鏄惁寮哄埗鍚皝', + // align:"center", + // dataIndex: 'isForceUnseal', + // customRender: (text) => (!text ? "" : (text == "Y" ? "鏄�" : "鍚�")) + // }, + // { + // title:'寮哄埗鍚皝鏃ユ湡', + // align:"center", + // dataIndex: 'forceUnsealDate', + // // customRender:function (text) { + // // return !text?"":(text.length>10?text.substr(0,10):text) + // // } + // }, + // { + // title:'寮哄埗鍚皝鍚庝繚鍏�', + // align:"center", + // dataIndex: 'maintenanceAfterUnseal', + // customRender: (text) => (!text ? "" : (text == "Y" ? "鏄�" : "鍚�")) + // }, + // { + // title:'淇濆吇鏍囧噯', + // align:"center", + // dataIndex: 'maintenanceStandardId_dictText', + // }, + // { + // title: '鎿嶄綔', + // dataIndex: 'action', + // align:"center", + // fixed:"right", + // width:147, + // scopedSlots: { customRender: 'action' }, + // } + ], + url: { + list: "/eam/equipmentSeal/listEquipmentSealDetailByMainId", + delete: "/eam/equipmentSeal/deleteEquipmentSealDetail", + deleteBatch: "/eam/equipmentSeal/deleteBatchEquipmentSealDetail", + exportXlsUrl: "/eam/equipmentSeal/exportEquipmentSealDetail", + importUrl: "/eam/equipmentSeal/importEquipmentSealDetail", + }, + dictOptions: { + auditStatus: [], + } + } + }, + created() { + }, + computed: { + importExcelUrl() { + return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; + } + }, + methods: { + clearList() { + this.dataSource = [] + this.selectedRowKeys = [] + this.ipagination.current = 1 + } + } +} </script> <style scoped> - @import '~@assets/less/common.less' +@import '~@assets/less/common.less'; </style> diff --git a/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue b/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue index 385819d..8fc53a6 100644 --- a/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue +++ b/src/views/eam/modules/equipmentSeal/EquipmentSealForm.vue @@ -2,66 +2,121 @@ <a-spin :spinning="confirmLoading"> <j-form-container :disabled="formDisabled"> <!-- 涓昏〃鍗曞尯鍩� --> - <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> + <a-form-model + ref="form" + :model="model" + :rules="validatorRules" + slot="detail" + > <a-row> <a-col :span="24"> - <a-form-model-item label="鍗曟嵁鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num"> - <a-input v-model="model.num" placeholder="璇疯緭鍏ュ崟鎹彿"></a-input> + <a-form-model-item + label="鍗曟嵁鍙�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="num" + > + <a-input + v-model="model.num" + placeholder="璇疯緭鍏ュ崟鎹彿" + ></a-input> </a-form-model-item> </a-col> - <a-col :span="12" :hidden=true> - <a-form-model-item label="鍙樺姩鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="changeMethod"> - <a-input v-model="model.changeMethod" placeholder="璇疯緭鍏ュ彉鍔ㄦ柟寮�" defaultValue="seal"></a-input> + <a-col + :span="12" + :hidden=true + > + <a-form-model-item + label="鍙樺姩鏂瑰紡" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="changeMethod" + > + <a-input + v-model="model.changeMethod" + placeholder="璇疯緭鍏ュ彉鍔ㄦ柟寮�" + defaultValue="seal" + ></a-input> </a-form-model-item> </a-col> <a-col :span="24"> - <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> - <a-textarea v-model="model.remark" rows="4" placeholder="璇疯緭鍏ュ娉�" /> + <a-form-model-item + label="澶囨敞" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="remark" + > + <a-textarea + v-model="model.remark" + rows="4" + placeholder="璇疯緭鍏ュ娉�" + /> </a-form-model-item> </a-col> </a-row> </a-form-model> </j-form-container> <!-- 瀛愯〃鍗曞尯鍩� --> - <a-tabs v-model="activeKey" @change="handleChangeTabs"> - <a-tab-pane tab="璁惧灏佸瓨鏄庣粏" :key="refKeys[0]" :forceRender="true"> - <j-vxe-table keep-source :ref="refKeys[0]" :loading="equipmentSealDetailTable.loading" - :columns="equipmentSealDetailTable.columns" :dataSource="equipmentSealDetailTable.dataSource" :maxHeight="300" - :disabled="formDisabled" :rowNumber="true" :rowSelection="true" :toolbar="true" :toolbarConfig="toolbarConfig" - :linkage-config="linkageConfig"> + <a-tabs + v-model="activeKey" + @change="handleChangeTabs" + > + <a-tab-pane + tab="璁惧灏佸瓨鏄庣粏" + :key="refKeys[0]" + :forceRender="true" + > + <j-vxe-table + keep-source + :ref="refKeys[0]" + :loading="equipmentSealDetailTable.loading" + :columns="equipmentSealDetailTable.columns" + :dataSource="equipmentSealDetailTable.dataSource" + :maxHeight="300" + :disabled="formDisabled" + :alwaysEdit='true' + :bordered='true' + :rowNumber="true" + :rowSelection="true" + :toolbar="true" + :toolbarConfig="toolbarConfig" + :linkage-config="linkageConfig" + > <template slot="toolbarPrefix"> - <a-button type="primary" @click="selectEquipmentList" :disabled="formDisabled">閫夋嫨璁惧 + <a-button + type="primary" + @click="selectEquipmentList" + :disabled="formDisabled" + >閫夋嫨璁惧 </a-button> </template> - <!-- state.address.regionName --> - <template v-slot:maintenanceStandardId="props"> - <a-form-model ref="form" :model="props.row"> - <a-form-model-item style="margin-bottom: 0;" v-if="props.row.maintenanceAfterUnseal == 'Y'" label="" - :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenanceStandardId" - :rules="[{ required: true, message: '蹇呭~椤�',trigger: 'change' }]"> - <a-select v-model="props.row.maintenanceStandardId" @change="(e) => handleChange(e, props.row)" - :options="manageList" /> - </a-form-model-item> - <a-form-model-item style="margin-bottom: 0;" v-else label="" :labelCol="labelCol" :wrapperCol="wrapperCol" - prop="maintenanceStandardId"> - <a-select v-model="props.row.maintenanceStandardId" :options="manageList" - @change="(e) => handleChange(e, props.row.maintenanceAfterUnseal)" /> - </a-form-model-item> - </a-form-model> - </template> <!-- 璁惧鍥剧墖鎻掓Ы --> - <template v-slot:equipmentPhoto='props'> + <!-- <template v-slot:equipmentPhoto='props'> <Tooltip - placement="top" - title="棰勮鍥剧墖" - > - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" :preview="props.rowId" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> - </Tooltip> - </template> + placement="top" + title="棰勮鍥剧墖" + > + <span + v-if="!text" + style="font-size: 12px;font-style: italic;" + >鏃犲浘鐗�</span> + <img + v-else + :preview="props.equipmentId" + :src="getImgView(text)" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> + </Tooltip> + </template> --> + <!-- :preview="props.rowId"equipmentId --> <template v-slot:action="props"> - <a-popconfirm title="纭畾鍒犻櫎鍚楋紵" @confirm="handleDL(props)"> + <a-popconfirm + title="纭畾鍒犻櫎鍚楋紵" + @confirm="handleDL(props)" + > <a>鍒犻櫎</a> </a-popconfirm> </template> @@ -79,17 +134,14 @@ import { JEditableTableModelMixin } from '@/mixins/JEditableTableModelMixin' import { randomUUID, randomNumber } from '@/utils/util' - import { validateDuplicateValue } from '@/utils/util' import pick from 'lodash.pick' import { getAction, postAction, requestPut } from '@api/manage' // import EquipmentSelection from '@/components/tools/EquipmentSelection.vue' import EquipmentSelectModal from './EquipmentSelectModal.vue' - import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' import { JVXETypes } from '@comp/jeecg/JVxeTable' import { getRefPromise, VALIDATE_FAILED } from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' - import JFormContainer from '@/components/jeecg/JFormContainer' export default { @@ -116,11 +168,11 @@ xs: { span: 24 }, sm: { span: 16 } }, - manageList: [ - { label: '绌�', value: '' }, - { label: '淇濆吇鏍囧噯涓�', value: '1001' }, - { label: '淇濆吇鏍囧噯浜�', value: '1002' } - ], + // manageList: [ + // { label: '绌�', value: '' }, + // { label: '淇濆吇鏍囧噯涓�', value: '1001' }, + // { label: '淇濆吇鏍囧噯浜�', value: '1002' } + // ], // 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁 addDefaultRowNum: 0, model: {}, @@ -156,13 +208,12 @@ key: 'id', type: JVXETypes.hidden, width: '100px', - fixed: 'left' }, + // fixed: 'left' { title: '璁惧鍙樺姩鍗昳d', key: 'equipmentChangeId', type: JVXETypes.hidden, - placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, @@ -176,112 +227,18 @@ title: '璁惧缂栫爜', key: 'equipmentNum', type: JVXETypes.normal, - width: '120px', + width: '150px', + align: "center", // placeholder: '璇疯緭鍏�${title}', - fixed: 'left' }, - { - title: '璁惧璧勪骇缂栫爜', - key: 'assetNumber', - type: JVXETypes.normal, - width: '120px', - fixed: 'left', - defaultValue: '' - }, - { - title: '灏佸瓨鍘熷洜', - key: 'sealReason', - type: JVXETypes.input, - width: '200px', - placeholder: '璇疯緭鍏�${title}', - defaultValue: '', - validateRules: [ - { - required: true, // 蹇呭~ - message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈� - }] - }, - { - title: '灏佸瓨鏃ユ湡', - key: 'sealDate', - type: JVXETypes.datetime, - width: '100px', - placeholder: '璇烽�夋嫨${title}', - defaultValue: '', - validateRules: [ - { - required: true, // 蹇呭~ - message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈� - }] - - }, - { - title: '棰勮鍚皝鏃ユ湡', - key: 'planUnsealDate', - type: JVXETypes.date, - width: '120px', - placeholder: '璇疯緭鍏�${title}', - defaultValue: '' - }, - // { - // title: '寮哄埗鍚皝', - // key: 'isForceUnseal', - // type: JVXETypes.checkbox, - // customValue: ['Y', 'N'], - // width: '120px', - // placeholder: '璇疯緭鍏�${title}', - // defaultValue: '' - // }, - // { - // title: '寮哄埗鍚皝鏃ユ湡', - // key: 'forceUnsealDate', - // type: JVXETypes.date, - // width: '120px', - // placeholder: '璇疯緭鍏�${title}', - // defaultValue: '' - // }, - // { - // title: '寮哄埗鍚皝鍚庝繚鍏�', - // key: 'maintenanceAfterUnseal', - // type: JVXETypes.checkbox, - // customValue: ['Y', 'N'], - // width: '150px', - // placeholder: '璇疯緭鍏�${title}', - // defaultValue: 'N', - - // }, - // { - // title: '淇濆吇鏍囧噯', - // key: 'maintenanceStandardId', - // type: JVXETypes.slot, - // width: '260px', - // slotName: 'maintenanceStandardId' - // }, - - { - title: '鐗圭璁惧', - key: 'specificEquipment', - type: JVXETypes.hidden, - disabled: true, - - placeholder: '璇疯緭鍏�${title}', - defaultValue: '' - }, - { - title: '鐗圭璁惧', - key: 'specificEquipment_dictText', - type: JVXETypes.normal, - disabled: true, - width: '100px', - defaultValue: '' - }, + // fixed: 'left' { title: '璁惧鍚嶇О', key: 'equipmentName', type: JVXETypes.normal, disabled: true, - width: '200px', - + width: '150px', + align: "center", defaultValue: '' }, { @@ -289,7 +246,8 @@ key: 'model', type: JVXETypes.normal, disabled: true, - width: '120px', + width: '150px', + align: "center", defaultValue: '' }, { @@ -297,36 +255,90 @@ key: 'specification', type: JVXETypes.normal, disabled: true, - width: '120px', + width: '150px', + align: "center", placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, + { + title: '璁惧璧勪骇缂栫爜', + key: 'assetNumber', + type: JVXETypes.normal, + width: '150px', + align: "center", + defaultValue: '' + }, + { + title: '灏佸瓨鍘熷洜', + key: 'sealReason', + type: JVXETypes.input, + width: '200px', + align: "center", + placeholder: '璇疯緭鍏�${title}', + defaultValue: '', + validateRules: [{ + required: true, // 蹇呭~ + message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈� + }] + }, + { + title: '灏佸瓨鏃ユ湡', + key: 'sealDate', + type: JVXETypes.datetime, + width: '150px', + align: "center", + placeholder: '璇烽�夋嫨${title}', + defaultValue: '', + validateRules: [{ + required: true, // 蹇呭~ + message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈� + }] + + }, + { + title: '棰勮鍚皝鏃ユ湡', + key: 'planUnsealDate', + type: JVXETypes.date, + width: '150px', + align: "center", + placeholder: '璇疯緭鍏�${title}', + defaultValue: '' + }, + { + title: '鐗圭璁惧', + key: 'specificEquipment', + type: JVXETypes.hidden, + disabled: true, + placeholder: '璇疯緭鍏�${title}', + defaultValue: '', + width: '150px', + }, + { + title: '鐗圭璁惧', + key: 'specificEquipment_dictText', + type: JVXETypes.normal, + disabled: true, + width: '150px', + align: "center", + defaultValue: '' + }, + { title: '璁惧鐘舵��', key: 'equipmentStatus_dictText', type: JVXETypes.normal, disabled: true, - width: '100px', - // placeholder: '璇疯緭鍏�${title}', + width: '150px', + align: "center", defaultValue: '' }, - // { - // title: '璁惧鐘舵��', - // key: 'equipmentStatus', - // type: JVXETypes.select, - // options: [], - // dictCode: 'equipment_status', - // disabled: true, - // width: '200px', - // // placeholder: '璇疯緭鍏�${title}', - // defaultValue: '' - // }, { title: '鎶�鏈姸鎬�', key: 'technologyStatus_dictText', type: JVXETypes.normal, disabled: true, - width: '100px', + width: '150px', + align: "center", defaultValue: '' }, { @@ -334,16 +346,16 @@ key: 'location', type: JVXETypes.normal, disabled: true, - width: '120px' - + width: '200px', + align: "center", }, { title: '閲嶈搴�', key: 'equipmentImportanceId_dictText', type: JVXETypes.normal, disabled: true, - width: '100px', - // placeholder: '璇疯緭鍏�${title}', + width: '150px', + align: "center", defaultValue: '' }, { @@ -351,23 +363,23 @@ key: 'equipmentImportanceId', type: JVXETypes.hidden }, - { - title: '璁惧鍥剧墖', - key: 'equipmentPhoto', - type: JVXETypes.slot, - disabled: true, - width: '120px', - slotName:'equipmentPhoto' - - }, - { - title: '鎿嶄綔', - key: 'action', - type: JVXETypes.slot, - disabled: true, - width: '100px', - slotName: 'action', - }, + // { + // title: '璁惧鍥剧墖', + // key: 'equipmentPhoto', + // type: JVXETypes.slot, + // disabled: true, + // width: '150px', + // slotName: 'equipmentPhoto' + // }, + // { + // title: '鎿嶄綔', + // key: 'action', + // type: JVXETypes.slot, + // disabled: true, + // width: '150px', + // align: "center", + // slotName: 'action', + // }, ] }, @@ -419,9 +431,9 @@ this.addSelectedEquipments(data) }, handleDL(props) { - // 璋冪敤鍒犻櫎鏂规硶 - props.target.removeRows(props.row) - }, + // 璋冪敤鍒犻櫎鏂规硶 + props.target.removeRows(props.row) + }, //閫夋嫨璁惧 selectEquipmentList() { diff --git a/src/views/eam/modules/equipmentTransfer/EquipmentTransferOutDetail.vue b/src/views/eam/modules/equipmentTransfer/EquipmentTransferOutDetail.vue index 87de269..aa1f74c 100644 --- a/src/views/eam/modules/equipmentTransfer/EquipmentTransferOutDetail.vue +++ b/src/views/eam/modules/equipmentTransfer/EquipmentTransferOutDetail.vue @@ -19,7 +19,7 @@ size='middle' bordered rowKey='id' - :scroll='{x:true}' + :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" :columns='columns' :dataSource='dataSource' :pagination='ipagination' @@ -68,6 +68,7 @@ // disableMixinCreated: true, // originTargetKeys: [], // 琛ㄥご + disableMixinCreated: true, columns: [ { title: '#', diff --git a/src/views/eam/modules/equipmentTransfer/EquipmentTransferOutDetailModal.vue b/src/views/eam/modules/equipmentTransfer/EquipmentTransferOutDetailModal.vue index 2a43a11..7f649a3 100644 --- a/src/views/eam/modules/equipmentTransfer/EquipmentTransferOutDetailModal.vue +++ b/src/views/eam/modules/equipmentTransfer/EquipmentTransferOutDetailModal.vue @@ -14,7 +14,7 @@ <a-row :span='24'> <a-col :span='12'> <a-form-model-item label='鍗曟嵁鍙�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> - <a-input v-model='model.num' placeholder='璇疯緭鍏ュ崟鎹彿'></a-input> + <a-input v-model='model.num' placeholder='璇疯緭鍏ュ崟鎹彿' :disabled="disableSubmit"></a-input> </a-form-model-item> </a-col> <a-col :span='12'> @@ -27,7 +27,7 @@ v-model='model.inEnterpriseId' placeholder='璇烽�夋嫨璋冨叆鍏徃' :replace-fields='replaceFields' - :disabled='false' + :disabled="disableSubmit" @change='handleChangeInEnterpriseId'> </a-tree-select> </a-form-model-item> @@ -41,17 +41,17 @@ tree-default-expand-all :dropdown-style="{ maxHeight: '500px', overflow: 'auto' }" :treeData='treeDataSource' + :disabled="disableSubmit" v-model='model.outEnterpriseId' placeholder='璇烽�夋嫨璋冨嚭鍏徃' :replace-fields='replaceFields' - :disabled='false' - @change='handleChangeOutEnterpriseId' /> + @change='handleChangeOutEnterpriseId'/> </a-form-model-item> </a-col> <a-col :span='12'> <a-form-model-item label='澶囨敞' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'> - <a-textarea v-model='model.remark' rows='3' placeholder='璇疯緭鍏ュ娉�'></a-textarea> + <a-textarea v-model='model.remark' rows='3' placeholder='璇疯緭鍏ュ娉�' :disabled="disableSubmit"></a-textarea> </a-form-model-item> </a-col> @@ -62,6 +62,7 @@ type='primary' :style="{ marginRight: '8px',marginBottom:'8px' }" :loading='confirmLoading' + :disabled="disableSubmit" @click='selectInspectionProjects()' >璁惧淇℃伅 </a-button> @@ -84,6 +85,7 @@ <a-date-picker :value='text' + :disabled="disableSubmit" v-if="col.dataIndex == 'demandDate'" format='YYYY-MM-DD HH:mm:ss' @change='(e)=>handleChange(e, record.key, col, index)' @@ -92,12 +94,14 @@ <a-date-picker :value='text' + :disabled="disableSubmit" v-if="col.dataIndex == 'outDate'" format='YYYY-MM-DD HH:mm:ss' @change='(e)=>handleChange(e, record.key, col, index)' /> <a-date-picker :value='text' + :disabled="disableSubmit" v-if="col.dataIndex == 'actualOutDate'" format='YYYY-MM-DD HH:mm:ss' @change='(e)=>handleChange(e, record.key, col, index)' @@ -107,6 +111,7 @@ v-if="col.dataIndex == 'equipmentTransferCatrgoryId'" :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" :options='record.transferMethodVoList' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' @@ -115,6 +120,7 @@ v-if="col.dataIndex == 'inDepartId'" :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" :options='record.departVoList' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' @@ -123,6 +129,7 @@ v-if="col.dataIndex == 'inManagerId'" :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" :options='record.userVoList' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' @@ -135,6 +142,7 @@ > <a-popconfirm title='纭畾鍒犻櫎鍚�?' + :disabled="disableSubmit" @confirm='() => handleDelete(text,record, index)' > <a>鍒犻櫎</a> @@ -152,6 +160,7 @@ <a-button @click='handleOk()' type='primary' + :disabled="disableSubmit" :loading='confirmLoading' >纭畾 </a-button> diff --git a/src/views/eam/modules/equipmentTransferIn/EquipmentTransferInDetail.vue b/src/views/eam/modules/equipmentTransferIn/EquipmentTransferInDetail.vue index 8c64516..03441e2 100644 --- a/src/views/eam/modules/equipmentTransferIn/EquipmentTransferInDetail.vue +++ b/src/views/eam/modules/equipmentTransferIn/EquipmentTransferInDetail.vue @@ -19,7 +19,7 @@ size='middle' bordered rowKey='id' - :scroll='{x:true}' + :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" :columns='columns' :dataSource='dataSource' :pagination='ipagination' @@ -67,6 +67,7 @@ // disableMixinCreated: true, // originTargetKeys: [], // 琛ㄥご + disableMixinCreated: true, columns: [ { title: '#', @@ -132,10 +133,11 @@ title: '璋冨叆绠$悊浜�', align: 'center', dataIndex: 'inManagerName' - }, { + }, + { title: '璋冨叆璐d换鐝粍', align: 'center', - dataIndex: 'responsibilityTeamId' + dataIndex: 'responsibilityTeamName' }, { diff --git a/src/views/eam/modules/equipmentTransferIn/EquipmentTransferInDetailModal.vue b/src/views/eam/modules/equipmentTransferIn/EquipmentTransferInDetailModal.vue index 1daa84e..60076dc 100644 --- a/src/views/eam/modules/equipmentTransferIn/EquipmentTransferInDetailModal.vue +++ b/src/views/eam/modules/equipmentTransferIn/EquipmentTransferInDetailModal.vue @@ -15,7 +15,7 @@ <a-row :span='12'> <a-col :span='12'> <a-form-model-item label='鍗曟嵁鍙�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> - <a-input v-model='model.num' placeholder='璇疯緭鍏ュ崟鎹彿'></a-input> + <a-input v-model='model.num' placeholder='璇疯緭鍏ュ崟鎹彿' :disabled="disableSubmit"></a-input> </a-form-model-item> </a-col> <a-col :span='12'> @@ -28,7 +28,7 @@ v-model='model.inEnterpriseId' placeholder='璇烽�夋嫨璋冨叆鍏徃' :replace-fields='replaceFields' - :disabled='false' + :disabled="disableSubmit" @change='handleChangeInEnterpriseId'> </a-tree-select> </a-form-model-item> @@ -46,14 +46,14 @@ v-model='model.outEnterpriseId' placeholder='璇烽�夋嫨璋冨嚭鍏徃' :replace-fields='replaceFields' - :disabled='false' + :disabled="disableSubmit" @change='handleChangeOutEnterpriseId' /> </a-form-model-item> </a-col> <a-col :span='12'> <a-form-model-item label='澶囨敞' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'> - <a-textarea v-model='model.remark' placeholder='璇疯緭鍏ュ娉�'></a-textarea> + <a-textarea v-model='model.remark' placeholder='璇疯緭鍏ュ娉�' :disabled="disableSubmit"></a-textarea> </a-form-model-item> </a-col> </a-row> @@ -88,6 +88,7 @@ <a-select :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" v-if="col.dataIndex == 'inDepartId'" :options='record.departVoList' @change='(e) => handleChange(e, record.key, col, index)' @@ -97,6 +98,7 @@ v-if="col.dataIndex == 'inManagerId'" :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" :options='record.userVoList' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' @@ -104,6 +106,7 @@ <a-input :value='text' placeholder='璇疯緭鍏�' + :disabled="disableSubmit" v-if="col.dataIndex == 'position'" @change='(e)=>handleChange(e, record.key, col, index)' /> @@ -113,6 +116,7 @@ v-if="col.dataIndex == 'responsibilityUserId'" :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" :options='record.userVoList' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' @@ -121,6 +125,7 @@ v-if="col.dataIndex == 'responsibilityTeamId'" :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" :options='record.teamVoList' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' @@ -136,6 +141,7 @@ v-if="col.dataIndex == 'useDepartId'" :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" :options='record.departVoList' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' @@ -144,12 +150,14 @@ v-if="col.dataIndex == 'demandDate'" :value='text' + :disabled="disableSubmit" format='YYYY-MM-DD HH:mm:ss' @change='(e)=>handleChange(e, record.key, col, index)' /> <a-date-picker v-if="col.dataIndex == 'actualInDate'" :value='text' + :disabled="disableSubmit" format='YYYY-MM-DD HH:mm:ss' @change='(e)=>handleChange(e, record.key, col, index)' /> @@ -158,6 +166,7 @@ v-if="col.dataIndex == 'equipmentTransferCatrgoryId'" :value='text' placeholder='璇烽�夋嫨' + :disabled="disableSubmit" :options='record.transferMethodVoList' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' @@ -167,10 +176,12 @@ </template> <span slot='action' + slot-scope='text, record, index' > <a-popconfirm title='纭畾鍒犻櫎鍚�?' + :disabled="disableSubmit" @confirm='() => handleDelete(text,record, index)' > <a>鍒犻櫎</a> @@ -188,6 +199,7 @@ <a-button @click='handleOk()' type='primary' + :disabled="disableSubmit" :loading='confirmLoading' >纭畾 </a-button> diff --git a/src/views/eam/modules/equipmentUnseal/EquipmentUnsealDetailList.vue b/src/views/eam/modules/equipmentUnseal/EquipmentUnsealDetailList.vue index 8b29ce2..aca3e99 100644 --- a/src/views/eam/modules/equipmentUnseal/EquipmentUnsealDetailList.vue +++ b/src/views/eam/modules/equipmentUnseal/EquipmentUnsealDetailList.vue @@ -1,78 +1,87 @@ <template> - <a-card :bordered="false" :class="'cust-erp-sub-tab'"> + <a-card + :bordered="false" + :class="'cust-erp-sub-tab'" + > <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > <a-row :gutter="24"> </a-row> </a-form> </div> - <!-- 鏌ヨ鍖哄煙-END --> - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <!-- <div class="table-operator" v-if="mainId"> - <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" - :scroll="{x:true}" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - @change="handleTableChange"> + @change="handleTableChange" + :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" + > + <!-- :scroll="{x:true}" --> - <template slot="htmlSlot" slot-scope="text"> + <template + slot="htmlSlot" + slot-scope="text" + > <div v-html="text"></div> </template> - <template slot="equipmentPhoto" slot-scope="text,record"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + <template + slot="equipmentPhoto" + slot-scope="text,record" + > + <span + v-if="!text" + style="font-size: 12px;font-style: italic;" + >鏃犲浘鐗�</span> + <img + v-else + :src="getImgView(text)" + :preview="record.id" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> </template> - <template slot="fileSlot" slot-scope="text"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> + <template + slot="fileSlot" + slot-scope="text" + > + <span + v-if="!text" + style="font-size: 12px;font-style: italic;" + >鏃犳枃浠�</span> <a-button v-else :ghost="true" type="primary" icon="download" size="small" - @click="downloadFile(text)"> + @click="downloadFile(text)" + > 涓嬭浇 </a-button> </template> - <span slot="action" slot-scope="text, record"> + <span + slot="action" + slot-scope="text, record" + > <a @click="handleEdit(record)">缂栬緫</a> <a-divider type="vertical" /> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + @confirm="() => handleDelete(record.id)" + > <a>鍒犻櫎</a> </a-popconfirm> </span> @@ -80,182 +89,185 @@ </a-table> </div> - <equipmentUnsealDetail-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></equipmentUnsealDetail-modal> + <equipmentUnsealDetail-modal + ref="modalForm" + @ok="modalFormOk" + :mainId="mainId" + ></equipmentUnsealDetail-modal> </a-card> </template> <script> - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import EquipmentUnsealDetailModal from './EquipmentUnsealDetailModal' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import EquipmentUnsealDetailModal from './EquipmentUnsealDetailModal' - export default { - name: "EquipmentUnsealDetailList", - mixins:[JeecgListMixin], - components: { EquipmentUnsealDetailModal }, - props:{ - mainId:{ - type:String, - default:'', - required:false - } - }, - watch:{ - mainId:{ - immediate: true, - handler(val) { - if(!this.mainId){ - this.clearList() - }else{ - this.queryParam['equipmentChangeId'] = val - this.loadData(1); - } - } - } - }, - data () { - return { - description: '璁惧鍚皝绠$悊椤甸潰', - disableMixinCreated:true, - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } - }, - // { - // title:'璁惧鍙樺姩鍗昳d', - // align:"center", - // dataIndex: 'equipmentChangeId' - // }, - // { - // title:'璁惧ID', - // align:"center", - // dataIndex: 'equipmentId' - // }, - { - title:'璁惧缂栫爜', - align:"center", - dataIndex: 'equipmentNum' - }, - { - title:'璧勪骇缂栫爜', - align:"center", - dataIndex: 'assetNumber' - }, - { - title:'鐗圭璁惧', - align:"center", - dataIndex: 'specificEquipment_dictText', - }, - { - title:'璁惧鍚嶇О', - align:"center", - dataIndex: 'equipmentName' - }, - { - title:'璁惧鍨嬪彿', - align:"center", - dataIndex: 'model' - }, - { - title:'璁惧瑙勬牸', - align:"center", - dataIndex: 'specification' - }, - { - title:'璁惧鐘舵��', - align:"center", - dataIndex: 'equipmentStatus_dictText', - }, - { - title:'鎶�鏈姸鎬�', - align:"center", - dataIndex: 'technologyStatus_dictText', - }, - { - title:'璁惧鍥剧墖', - align:"center", - dataIndex: 'equipmentPhoto', - scopedSlots: {customRender: "equipmentPhoto"} - }, - { - title:'璁惧浣嶇疆', - align:"center", - dataIndex: 'location' - }, - { - title:'閲嶈搴�', - align:"center", - dataIndex: 'equipmentImportanceId_dictText', - }, - { - title:'灏佸瓨鍘熷洜', - align:"center", - dataIndex: 'sealReason' - }, - { - title:'灏佸瓨鏃ユ湡', - align:"center", - dataIndex: 'sealDate' - }, - { - title:'鍚皝鏃ユ湡', - align:"center", - dataIndex: 'unsealDate' - }, - { - title:'鍚皝鍘熷洜', - align:"center", - dataIndex: 'unsealReason' - }, - // { - // title: '鎿嶄綔', - // dataIndex: 'action', - // align:"center", - // fixed:"right", - // width:147, - // scopedSlots: { customRender: 'action' }, - // } - ], - url: { - list: "/eam/equipmentUnseal/listEquipmentUnsealDetailByMainId", - delete: "/eam/equipmentUnseal/deleteEquipmentUnsealDetail", - deleteBatch: "/eam/equipmentUnseal/deleteBatchEquipmentUnsealDetail", - exportXlsUrl: "/eam/equipmentUnseal/exportEquipmentUnsealDetail", - importUrl: "/eam/equipmentUnseal/importEquipmentUnsealDetail", - }, - dictOptions:{ - auditStatus:[], - } - } - }, - created() { - }, - computed: { - importExcelUrl(){ - return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; - } - }, - methods: { - clearList(){ - this.dataSource=[] - this.selectedRowKeys=[] - this.ipagination.current = 1 - } - +export default { + name: "EquipmentUnsealDetailList", + mixins: [JeecgListMixin], + components: { EquipmentUnsealDetailModal }, + props: { + mainId: { + type: String, + default: '', + required: false } + }, + watch: { + mainId: { + immediate: true, + handler(val) { + if (!this.mainId) { + this.clearList() + } else { + this.queryParam['equipmentChangeId'] = val + this.loadData(1); + } + } + } + }, + data() { + return { + description: '璁惧鍚皝绠$悊椤甸潰', + disableMixinCreated: true, + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + // { + // title:'璁惧鍙樺姩鍗昳d', + // align:"center", + // dataIndex: 'equipmentChangeId' + // }, + // { + // title:'璁惧ID', + // align:"center", + // dataIndex: 'equipmentId' + // }, + { + title: '璁惧缂栫爜', + align: "center", + dataIndex: 'equipmentNum' + }, + { + title: '璧勪骇缂栫爜', + align: "center", + dataIndex: 'assetNumber' + }, + { + title: '鐗圭璁惧', + align: "center", + dataIndex: 'specificEquipment_dictText', + }, + { + title: '璁惧鍚嶇О', + align: "center", + dataIndex: 'equipmentName' + }, + { + title: '璁惧鍨嬪彿', + align: "center", + dataIndex: 'model' + }, + { + title: '璁惧瑙勬牸', + align: "center", + dataIndex: 'specification' + }, + { + title: '璁惧鐘舵��', + align: "center", + dataIndex: 'equipmentStatus_dictText', + }, + { + title: '鎶�鏈姸鎬�', + align: "center", + dataIndex: 'technologyStatus_dictText', + }, + { + title: '璁惧鍥剧墖', + align: "center", + dataIndex: 'equipmentPhoto', + scopedSlots: { customRender: "equipmentPhoto" } + }, + { + title: '璁惧浣嶇疆', + align: "center", + dataIndex: 'location' + }, + { + title: '閲嶈搴�', + align: "center", + dataIndex: 'equipmentImportanceId_dictText', + }, + { + title: '灏佸瓨鍘熷洜', + align: "center", + dataIndex: 'sealReason' + }, + { + title: '灏佸瓨鏃ユ湡', + align: "center", + dataIndex: 'sealDate' + }, + { + title: '鍚皝鏃ユ湡', + align: "center", + dataIndex: 'unsealDate' + }, + { + title: '鍚皝鍘熷洜', + align: "center", + dataIndex: 'unsealReason' + }, + // { + // title: '鎿嶄綔', + // dataIndex: 'action', + // align:"center", + // fixed:"right", + // width:147, + // scopedSlots: { customRender: 'action' }, + // } + ], + url: { + list: "/eam/equipmentUnseal/listEquipmentUnsealDetailByMainId", + delete: "/eam/equipmentUnseal/deleteEquipmentUnsealDetail", + deleteBatch: "/eam/equipmentUnseal/deleteBatchEquipmentUnsealDetail", + exportXlsUrl: "/eam/equipmentUnseal/exportEquipmentUnsealDetail", + importUrl: "/eam/equipmentUnseal/importEquipmentUnsealDetail", + }, + dictOptions: { + auditStatus: [], + } + } + }, + created() { + }, + computed: { + importExcelUrl() { + return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; + } + }, + methods: { + clearList() { + this.dataSource = [] + this.selectedRowKeys = [] + this.ipagination.current = 1 + } + } +} </script> <style scoped> - ::v-deep .ant-card-body { - padding: 2px; - } - +::v-deep .ant-card-body { + padding: 2px; +} </style> diff --git a/src/views/eam/modules/equipmentUnseal/EquipmentUnsealForm.vue b/src/views/eam/modules/equipmentUnseal/EquipmentUnsealForm.vue index fc83ac7..f8631a9 100644 --- a/src/views/eam/modules/equipmentUnseal/EquipmentUnsealForm.vue +++ b/src/views/eam/modules/equipmentUnseal/EquipmentUnsealForm.vue @@ -2,29 +2,70 @@ <a-spin :spinning="confirmLoading"> <j-form-container :disabled="formDisabled"> <!-- 涓昏〃鍗曞尯鍩� --> - <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> + <a-form-model + ref="form" + :model="model" + :rules="validatorRules" + slot="detail" + > <a-row> <a-col :span="24"> - <a-form-model-item label="鍗曟嵁鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num"> - <a-input v-model="model.num" placeholder="璇疯緭鍏ュ崟鎹彿"></a-input> + <a-form-model-item + label="鍗曟嵁鍙�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="num" + > + <a-input + v-model="model.num" + placeholder="璇疯緭鍏ュ崟鎹彿" + ></a-input> </a-form-model-item> </a-col> - <a-col :span="12" :hidden=true> - <a-form-model-item label="鍙樺姩鏂瑰紡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="changeMethod"> - <a-input v-model="model.changeMethod" placeholder="璇疯緭鍏ュ彉鍔ㄦ柟寮�" defaultValue="unseal"></a-input> + <a-col + :span="12" + :hidden=true + > + <a-form-model-item + label="鍙樺姩鏂瑰紡" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="changeMethod" + > + <a-input + v-model="model.changeMethod" + placeholder="璇疯緭鍏ュ彉鍔ㄦ柟寮�" + defaultValue="unseal" + ></a-input> </a-form-model-item> </a-col> <a-col :span="24"> - <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> - <a-textarea v-model="model.remark" rows="4" placeholder="璇疯緭鍏ュ娉�" /> + <a-form-model-item + label="澶囨敞" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="remark" + > + <a-textarea + v-model="model.remark" + rows="4" + placeholder="璇疯緭鍏ュ娉�" + /> </a-form-model-item> </a-col> </a-row> </a-form-model> </j-form-container> <!-- 瀛愯〃鍗曞尯鍩� --> - <a-tabs v-model="activeKey" @change="handleChangeTabs"> - <a-tab-pane tab="璁惧鍚皝鏄庣粏" :key="refKeys[0]" :forceRender="true"> + <a-tabs + v-model="activeKey" + @change="handleChangeTabs" + > + <a-tab-pane + tab="璁惧鍚皝鏄庣粏" + :key="refKeys[0]" + :forceRender="true" + > <j-vxe-table keep-source :ref="refKeys[0]" @@ -37,25 +78,43 @@ :rowSelection="true" :toolbar="true" :toolbarConfig="toolbarConfig" + :alwaysEdit='true' + :bordered='true' > - <template slot="toolbarPrefix"> - <a-button type="primary" @click="selectEquipmentList" :disabled="formDisabled">閫夋嫨璁惧 + <a-button + type="primary" + @click="selectEquipmentList" + :disabled="formDisabled" + >閫夋嫨璁惧 </a-button> </template> <!-- 璁惧鍥剧墖鎻掓Ы --> - <template v-slot:equipmentPhoto='props'> + <!-- <template v-slot:equipmentPhoto='props'> <Tooltip - placement="top" - title="棰勮鍥剧墖" - > - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" :preview="props.rowId" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> - </Tooltip> - </template> + placement="top" + title="棰勮鍥剧墖" + > + <span + v-if="!text" + style="font-size: 12px;font-style: italic;" + >鏃犲浘鐗�</span> + <img + v-else + :src="getImgView(text)" + :preview="props.rowId" + height="25px" + alt="" + style="max-width:80px;font-size: 12px;font-style: italic;" + /> + </Tooltip> + </template> --> <template v-slot:action="props"> - <a-popconfirm title="纭畾鍒犻櫎鍚楋紵" @confirm="handleDL(props)"> + <a-popconfirm + title="纭畾鍒犻櫎鍚楋紵" + @confirm="handleDL(props)" + > <a>鍒犻櫎</a> </a-popconfirm> </template> @@ -145,103 +204,33 @@ title: '璁惧ID', key: 'equipmentId', type: JVXETypes.hidden, - defaultValue: '' }, { title: '璁惧缂栫爜', key: 'equipmentNum', type: JVXETypes.normal, - - width: '120px', - // placeholder: '璇疯緭鍏�${title}', - - fixed: 'left' + width: '150px', + align: "center", }, - { - title: '璧勪骇缂栫爜', - key: 'assetNumber', - type: JVXETypes.normal, - - width: '120px', - fixed: 'left', - - defaultValue: '' - }, - { - title: '灏佸瓨鍘熷洜', - key: 'sealReason', - type: JVXETypes.normal, - disabled: true, - width: '200px' - - }, - { - title: '灏佸瓨鏃ユ湡', - key: 'sealDate', - type: JVXETypes.normal, - disabled: true, - width: '120px' - - }, - { - title: '鍚皝鏃ユ湡', - key: 'unsealDate', - type: JVXETypes.datetime, - width: '200px', - placeholder: '璇疯緭鍏�${title}', - defaultValue: '', - validateRules: [ - { - required: true, // 蹇呭~ - message: '${title}涓嶈兘涓虹┖' // 鎻愮ず鐨勬枃鏈� - }] - }, - { - title: '鍚皝鍘熷洜', - key: 'unsealReason', - type: JVXETypes.textarea, - width: '200px', - placeholder: '璇疯緭鍏�${title}', - defaultValue: '', - validateRules: [ - { - required: true, // 蹇呭~ - message: '${title}涓嶈兘涓虹┖' // 鎻愮ず鐨勬枃鏈� - }] - }, - - { - title: '鐗圭璁惧', - key: 'specificEquipment', - type: JVXETypes.hidden, - disabled: true, - - defaultValue: '' - }, - { - title: '鐗圭璁惧', - key: 'specificEquipment_dictText', - type: JVXETypes.normal, - disabled: true, - width: '100px', - defaultValue: '' - }, + // fixed: 'left' { title: '璁惧鍚嶇О', key: 'equipmentName', type: JVXETypes.normal, disabled: true, - width: '200px', - + width: '150px', + align: "center", defaultValue: '' }, + // fixed: 'left', { title: '璁惧鍨嬪彿', key: 'model', type: JVXETypes.normal, disabled: true, - width: '120px', + width: '150px', + align: "center", defaultValue: '' }, { @@ -249,17 +238,87 @@ key: 'specification', type: JVXETypes.normal, disabled: true, - width: '120px', + width: '150px', + align: "center", placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, + { + title: '璧勪骇缂栫爜', + key: 'assetNumber', + type: JVXETypes.normal, + width: '150px', + align: "center", + defaultValue: '' + }, + { + title: '灏佸瓨鍘熷洜', + key: 'sealReason', + type: JVXETypes.normal, + disabled: true, + width: '200px', + align: "center", + }, + { + title: '灏佸瓨鏃ユ湡', + key: 'sealDate', + type: JVXETypes.normal, + disabled: true, + width: '150px', + align: "center", + }, + { + title: '鍚皝鏃ユ湡', + key: 'unsealDate', + type: JVXETypes.datetime, + width: '150px', + align: "center", + placeholder: '璇疯緭鍏�${title}', + defaultValue: '', + validateRules: [{ + required: true, // 蹇呭~ + message: '${title}涓嶈兘涓虹┖' // 鎻愮ず鐨勬枃鏈� + }] + }, + { + title: '鍚皝鍘熷洜', + key: 'unsealReason', + type: JVXETypes.textarea, + width: '200px', + align: "center", + placeholder: '璇疯緭鍏�${title}', + defaultValue: '', + validateRules: [{ + required: true, // 蹇呭~ + message: '${title}涓嶈兘涓虹┖' // 鎻愮ず鐨勬枃鏈� + }] + }, + { + title: '鐗圭璁惧', + key: 'specificEquipment', + type: JVXETypes.hidden, + disabled: true, + width: '150px', + align: "center", + defaultValue: '' + }, + { + title: '鐗圭璁惧', + key: 'specificEquipment_dictText', + type: JVXETypes.normal, + disabled: true, + width: '150px', + align: "center", + defaultValue: '' + }, + { title: '璁惧鐘舵��', key: 'equipmentStatus_dictText', type: JVXETypes.normal, disabled: true, - width: '100px', - // placeholder: '璇疯緭鍏�${title}', + width: '150px', + align: "center", defaultValue: '' }, // { @@ -278,7 +337,8 @@ key: 'technologyStatus_dictText', type: JVXETypes.normal, disabled: true, - width: '100px', + width: '150px', + align: "center", defaultValue: '' }, { @@ -286,15 +346,16 @@ key: 'location', type: JVXETypes.normal, disabled: true, - width: '120px' - + width: '150px', + align: "center", }, { title: '閲嶈搴�', key: 'equipmentImportanceId_dictText', type: JVXETypes.normal, disabled: true, - width: '100px', + width: '150px', + align: "center", // placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, @@ -303,23 +364,22 @@ key: 'equipmentImportanceId', type: JVXETypes.hidden }, - { - title: '璁惧鍥剧墖', - key: 'equipmentPhoto', - type: JVXETypes.slot, - disabled: true, - width: '120px', - slotName:'equipmentPhoto' - - }, - { - title: '鎿嶄綔', - key: 'action', - type: JVXETypes.slot, - disabled: true, - width: '100px', - slotName: 'action', - }, + // { + // title: '璁惧鍥剧墖', + // key: 'equipmentPhoto', + // type: JVXETypes.slot, + // disabled: true, + // width: '120px', + // slotName: 'equipmentPhoto' + // }, + // { + // title: '鎿嶄綔', + // key: 'action', + // type: JVXETypes.slot, + // disabled: true, + // width: '100px', + // slotName: 'action', + // }, ] }, url: { @@ -391,8 +451,8 @@ location: data[i].location, equipmentImportanceId_dictText: data[i].equipmentImportanceId_dictText, equipmentImportanceId: data[i].equipmentImportanceId, - sealReason:data[i].sealReason, - sealDate:data[i].sealDate + sealReason: data[i].sealReason, + sealDate: data[i].sealDate } } addRows.push(sealDetail) @@ -400,9 +460,9 @@ this.$refs.equipmentUnsealDetail.pushRows(addRows) }, handleDL(props) { - // 璋冪敤鍒犻櫎鏂规硶 - props.target.removeRows(props.row) - }, + // 璋冪敤鍒犻櫎鏂规硶 + props.target.removeRows(props.row) + }, addBefore() { this.equipmentUnsealDetailTable.dataSource = [] }, @@ -416,7 +476,7 @@ }) // 鍔犺浇瀛愯〃鏁版嵁 if (this.model.id) { - let params = { equipmentChangeId: this.model.id} + let params = { equipmentChangeId: this.model.id } this.requestSubTableData(this.url.equipmentUnsealDetail.list, params, this.equipmentUnsealDetailTable) } }, diff --git a/src/views/eam/modules/malfunctionRepair/MalfunctionRepaireModal.vue b/src/views/eam/modules/malfunctionRepair/MalfunctionRepaireModal.vue index 42bafe9..564aa50 100644 --- a/src/views/eam/modules/malfunctionRepair/MalfunctionRepaireModal.vue +++ b/src/views/eam/modules/malfunctionRepair/MalfunctionRepaireModal.vue @@ -85,36 +85,36 @@ /> </a-form-item> </a-col> - <a-row - hidden - :gutter="24" - > - <a-col :span="12"> - <a-form-item - label="璁惧Id" - :labelCol="labelCol" - :wrapperCol="wrapperCol" - > - <a-input - :disabled="true" - :placeholder="disableSubmit?'':'璇疯緭鍏ヨ澶囩紪鐮�/鍚嶇О/鍨嬪彿'" - v-decorator="['equipmentId', validatorRules.equipmentId ]" - /> - </a-form-item> - </a-col> - <a-col :span="12"> - <a-form-item - label="浣跨敤閮ㄩ棬Id" - :labelCol="labelCol" - :wrapperCol="wrapperCol" - > - <a-input - :disabled="true" - :placeholder="disableSubmit?'':'璇疯緭鍏ヤ娇鐢ㄩ儴闂╥d'" - v-decorator="['useDepartId', validatorRules.useDepartId ]" - /> - </a-form-item> - </a-col> + <a-row + hidden + :gutter="24" + > + <a-col :span="12"> + <a-form-item + label="璁惧Id" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input + :disabled="true" + :placeholder="disableSubmit?'':'璇疯緭鍏ヨ澶囩紪鐮�/鍚嶇О/鍨嬪彿'" + v-decorator="['equipmentId', validatorRules.equipmentId ]" + /> + </a-form-item> + </a-col> + <a-col :span="12"> + <a-form-item + label="浣跨敤閮ㄩ棬Id" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input + :disabled="true" + :placeholder="disableSubmit?'':'璇疯緭鍏ヤ娇鐢ㄩ儴闂╥d'" + v-decorator="['useDepartId', validatorRules.useDepartId ]" + /> + </a-form-item> + </a-col> </a-row> </a-row> <a-row :gutter="24"> @@ -219,13 +219,13 @@ /> </a-form-item> </a-col> - </a-row> - <a-row :gutter="24"> - <a-col :span="24"> + </a-row> + <a-row :gutter="24"> + <a-col :span="24/2"> <a-form-item label="鏁呴殰鐓х墖" - :labelCol="{span:3}" - :wrapperCol="{span:21}" + :labelCol="labelCol" + :wrapperCol="wrapperCol" > <!-- <j-image-upload-self :isMultiple="false" @@ -358,7 +358,7 @@ that.model = Object.assign({}, record); that.visible = true; that.$nextTick(() => { - that.form.setFieldsValue(pick(that.model, 'num', 'isStop', 'equipmentId','equipmentNum', 'equipmentName','equipmentModel','equipmentSpecification','urgency','useDepartId','departName', 'faultDescription', 'faultTime', 'remark', "photo")); + that.form.setFieldsValue(pick(that.model, 'num', 'isStop', 'equipmentId', 'equipmentNum', 'equipmentName', 'equipmentModel', 'equipmentSpecification', 'urgency', 'useDepartId', 'departName', 'faultDescription', 'faultTime', 'remark', "photo")); }); if (record.id) { this.codeDisable = true; @@ -417,7 +417,7 @@ }, sendEquipmentRecord(data) { let record = data.record; - this.form.setFieldsValue({ equipmentName: record.name, equipmentId: record.id,equipmentNum:record.num,equipmentModel:record.model,equipmentSpecification:record.specification,useDepartId:record.useId,departName:record.useId_dictText }); + this.form.setFieldsValue({ equipmentName: record.name, equipmentId: record.id, equipmentNum: record.num, equipmentModel: record.model, equipmentSpecification: record.specification, useDepartId: record.useId, departName: record.useId_dictText }); }, }, diff --git a/src/views/eam/modules/projectMaintenanceOrder/ApprovelModal.vue b/src/views/eam/modules/projectMaintenanceOrder/ApprovelModal.vue new file mode 100644 index 0000000..f0d3930 --- /dev/null +++ b/src/views/eam/modules/projectMaintenanceOrder/ApprovelModal.vue @@ -0,0 +1,219 @@ +<template> + <a-modal + :title='title' + :width="width" + :visible='visible' + :maskClosable='false' + @ok='handleOk' + cancelText='鍏抽棴' + @cancel='handleCancel' + :confirmLoading='confirmLoading' + > + <a-spin :spinning='confirmLoading'> + <a-form-model + :form='form' + ref='form' + :model='model' + > + <a-row> + <a-col :span='24'> + <a-form-model-item + label='鍗曟嵁鍙�' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='approvalOpinions' + > + <a-input + v-model='model.num' + :disabled=true + ></a-input> + </a-form-model-item> + </a-col> + <a-col :span='24'> + <a-form-model-item + label='瀹℃壒鎰忚' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='approvalOpinions' + > + <a-textarea + v-model='model.approval' + rows='3' + placeholder='璇疯緭鍏ュ鎵规剰瑙�' + ></a-textarea> + </a-form-model-item> + </a-col> + + </a-row> + </a-form-model> + </a-spin> + <template slot='footer'> + <a-button + :style="{marginRight: '8px'}" + @click='handleReject' + > + 椹冲洖 + </a-button> + + <a-button + @click='handleOk' + type='primary' + :loading='confirmLoading' + >閫氳繃 + </a-button> + </template> + </a-modal> + +</template> + +<script> +import { httpAction } from '@/api/manage' + +import Tooltip from 'ant-design-vue/es/tooltip' + + +export default { + name: 'ApprovelModal', + props: { + width: { + type: Number, + default: 550, + required: false + } + }, + components: { + Tooltip + + }, + data() { + return { + replaceFields: { + value: 'key' + }, + + title: '鎿嶄綔', + visible: false, + disableSubmit: false, + model: {}, + id: '', + labelCol: { + xs: { span: 24 }, + sm: { span: 5 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + }, + edit: '', + reject: '', + approval: '', + data: [], + confirmLoading: false, + form: this.$form.createForm(this), + url: {}, + record: {} + } + }, + + + methods: { + close() { + this.$emit('close') + this.visible = false + }, + + handleCancel() { + this.close() + }, + showModals(val, val1, val2, val3) { + this.record = val + this.model.num = this.record.num + // this.model.approval = this.record.approval + this.edit = val1 + this.reject = val3 + this.agree = val2 + this.visible = true + }, + + + handleReject() { + const that = this + this.model.id = that.record.id + this.model.auditStatus = this.reject + let httpurl = '' + let method = '' + httpurl += this.edit + method = 'post' + httpAction(httpurl, this.model, method).then((res) => { + if (res.success) { + that.$emit('cancel') + that.$message.success(res.message) + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.confirmLoading = false + that.close() + }) + + }, + handleOk() { + const that = this + this.model.id = that.record.id + this.model.auditStatus = this.agree + let httpurl = '' + let method = '' + httpurl += this.edit + method = 'post' + httpAction(httpurl, this.model, method).then((res) => { + if (res.success) { + that.$emit('ok') + that.$message.success(res.message) + + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.confirmLoading = false + that.close() + }) + } + + + } + +} +</script> + +<style lang='less' scoped> +/deep/ .frozenRowClass { + color: #c9c9c9; +} + +.fontweight { + font-weight: bold; +} + +.ant-btn { + padding: 0 10px; + margin-left: 3px; +} + +.ant-form-item-control { + line-height: 0px; +} + +/** 涓昏〃鍗曡闂磋窛 */ +.ant-form .ant-form-item { + margin-bottom: 10px; +} + +/** Tab椤甸潰琛岄棿璺� */ +.ant-tabs-content .ant-form-item { + margin-bottom: 0px; +} + +/deep/ .ant-modal-title { + text-align: center; +} +</style> \ No newline at end of file diff --git a/src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderDetailList.vue b/src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderDetailList.vue index 4a23bb9..63696d3 100644 --- a/src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderDetailList.vue +++ b/src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderDetailList.vue @@ -1,26 +1,18 @@ <template> - <a-card :bordered="false" :class="'cust-erp-sub-tab'"> + <a-card + :bordered="false" + :class="'cust-erp-sub-tab'" + > <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > <a-row :gutter="24"> </a-row> </a-form> </div> - <!-- 鏌ヨ鍖哄煙-END --> - - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> -<!-- <div class="table-operator" v-if="mainId"> - - <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>椤� @@ -32,231 +24,208 @@ size="middle" bordered rowKey="id" - :scroll="{x:true}" + :scroll="{ x: 'calc(1500px + 50%)', y: 900 }" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" - @change="handleTableChange"> - - <template slot="htmlSlot" slot-scope="text"> - <div v-html="text"></div> - </template> - <template slot="imgSlot" slot-scope="text,record"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> - <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> - </template> - <template slot="fileSlot" slot-scope="text"> - <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> - <a-button - v-else - :ghost="true" - type="primary" - icon="download" - size="small" - @click="downloadFile(text)"> - 涓嬭浇 - </a-button> - </template> - - <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> - <a-divider type="vertical" /> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </span> + @change="handleTableChange" + > </a-table> </div> - <project-maintenance-order-detail-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></project-maintenance-order-detail-modal> + <project-maintenance-order-detail-modal + ref="modalForm" + @ok="modalFormOk" + :mainId="mainId" + ></project-maintenance-order-detail-modal> </a-card> </template> <script> - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import ProjectMaintenanceOrderDetailModal from './ProjectMaintenanceOrderDetailModal' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import ProjectMaintenanceOrderDetailModal from './ProjectMaintenanceOrderDetailModal' - export default { - name: "ProjectMaintenanceOrderDetailList", - mixins:[JeecgListMixin], - components: { ProjectMaintenanceOrderDetailModal }, - props:{ - mainId:{ - type:String, - default:'', - required:false - } - }, - watch:{ - mainId:{ - immediate: true, - handler(val) { - if(!this.mainId){ - this.clearList() - }else{ - this.queryParam['projectMaintenanceOrderId'] = val - this.loadData(1); - } - } - } - }, - data () { - return { - description: '椤圭洰鎬х淮淇〉闈�', - disableMixinCreated:true, - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } - }, - { - title: '鐘舵��', - align: 'center', - dataIndex: 'typeStatus_dictText' - }, - { - title:'浠诲姟缂栫爜', - align:"center", - dataIndex: 'taskNum' - }, - { - title:'璁惧缂栫爜', - align:"center", - dataIndex: 'equipmentNum' - }, - /* { - title:'璧勪骇缂栫爜', - align:"center", - dataIndex: 'assetNumber' - },*/ - /* { - title:'鐗圭璁惧', - align:"center", - dataIndex: 'specificEquipment_dictText', - },*/ - { - title:'璁惧鍚嶇О', - align:"center", - dataIndex: 'equipmentName' - }, - { - title:'璁惧鍨嬪彿', - align:"center", - dataIndex: 'model' - }, - { - title:'璁惧瑙勬牸', - align:"center", - dataIndex: 'specification' - }, - { - title:'缁翠繚鏂瑰紡', - align:"center", - dataIndex: 'maintenanceMode_dictText' - }, - { - title:'椤圭洰鍐呭', - align:"center", - dataIndex: 'itemName' - }, - { - title:'绱ф�ョ▼搴�', - align:"center", - dataIndex: 'urgency_dictText' - }, - { - title:'璐d换鐝粍', - align:"center", - dataIndex: 'teamId_dictText', - - }, - { - title:'璐d换浜�', - align:"center", - dataIndex: 'userId_dictText', - - }, - { - title:'璁″垝寮�濮嬫椂闂�', - align:"center", - dataIndex: 'planStartTime', - // customRender:function (text) { - // return !text?"":(text.length>10?text.substr(0,10):text) - // } - - }, - { - title:'璁″垝缁撴潫鏃堕棿', - align:"center", - dataIndex: 'planEndTime', - // customRender:function (text) { - // return !text?"":(text.length>10?text.substr(0,10):text) - // } - }, - { - title:'瀹為檯寮�濮嬫椂闂�', - align:"center", - dataIndex: 'actualStartTime', - // customRender:function (text) { - // return !text?"":(text.length>10?text.substr(0,10):text) - // } - }, - { - title:'瀹為檯瀹屾垚鏃堕棿', - align:"center", - dataIndex: 'actualEndTime', - // customRender:function (text) { - // return !text?"":(text.length>10?text.substr(0,10):text) - // } - }, - // { - // title: '鎿嶄綔', - // dataIndex: 'action', - // align:"center", - // fixed:"right", - // width:147, - // scopedSlots: { customRender: 'action' }, - // } - ], - url: { - list: "/eam/projectMaintenanceOrder/listProjectMaintenanceOrderDetailByMainId", - delete: "/eam/projectMaintenanceOrder/deleteProjectMaintenanceOrderDetail", - deleteBatch: "/eam/projectMaintenanceOrder/deleteBatchProjectMaintenanceOrderDetail", - exportXlsUrl: "/eam/projectMaintenanceOrder/exportProjectMaintenanceOrderDetail", - importUrl: "/eam/projectMaintenanceOrder/importProjectMaintenanceOrderDetail", - }, - dictOptions:{ - auditStatus:[], - } - } - }, - created() { - }, - computed: { - importExcelUrl(){ - return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; - } - }, - methods: { - clearList(){ - this.dataSource=[] - this.selectedRowKeys=[] - this.ipagination.current = 1 - } - +export default { + name: "ProjectMaintenanceOrderDetailList", + mixins: [JeecgListMixin], + components: { ProjectMaintenanceOrderDetailModal }, + props: { + mainId: { + type: String, + default: '', + required: false } + }, + watch: { + mainId: { + immediate: true, + handler(val) { + if (!this.mainId) { + this.clearList() + } else { + this.queryParam['projectMaintenanceOrderId'] = val + this.loadData(1); + } + } + } + }, + data() { + return { + description: '椤圭洰鎬х淮淇〉闈�', + disableMixinCreated: true, + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title: '鐘舵��', + align: 'center', + dataIndex: 'typeStatus_dictText' + }, + { + title: '浠诲姟缂栫爜', + align: "center", + dataIndex: 'taskNum' + }, + { + title: '璁惧缂栫爜', + align: "center", + dataIndex: 'equipmentNum' + }, + /* { + title:'璧勪骇缂栫爜', + align:"center", + dataIndex: 'assetNumber' + },*/ + /* { + title:'鐗圭璁惧', + align:"center", + dataIndex: 'specificEquipment_dictText', + },*/ + { + title: '璁惧鍚嶇О', + align: "center", + dataIndex: 'equipmentName' + }, + { + title: '璁惧鍨嬪彿', + align: "center", + dataIndex: 'model' + }, + { + title: '璁惧瑙勬牸', + align: "center", + dataIndex: 'specification' + }, + { + title: '缁翠繚鏂瑰紡', + align: "center", + dataIndex: 'maintenanceMode_dictText' + }, + { + title: '椤圭洰鍐呭', + align: "center", + dataIndex: 'itemName' + }, + { + title: '绱ф�ョ▼搴�', + align: "center", + dataIndex: 'urgency_dictText' + }, + { + title: '璐d换鐝粍', + align: "center", + dataIndex: 'teamId_dictText', + + }, + { + title: '璐d换浜�', + align: "center", + dataIndex: 'userId_dictText', + + }, + { + title: '璁″垝寮�濮嬫椂闂�', + align: "center", + dataIndex: 'planStartTime', + // customRender:function (text) { + // return !text?"":(text.length>10?text.substr(0,10):text) + // } + + }, + { + title: '璁″垝缁撴潫鏃堕棿', + align: "center", + dataIndex: 'planEndTime', + // customRender:function (text) { + // return !text?"":(text.length>10?text.substr(0,10):text) + // } + }, + { + title: '瀹為檯寮�濮嬫椂闂�', + align: "center", + dataIndex: 'actualStartTime', + // customRender:function (text) { + // return !text?"":(text.length>10?text.substr(0,10):text) + // } + }, + { + title: '瀹為檯瀹屾垚鏃堕棿', + align: "center", + dataIndex: 'actualEndTime', + // customRender:function (text) { + // return !text?"":(text.length>10?text.substr(0,10):text) + // } + }, + // { + // title: '鎿嶄綔', + // dataIndex: 'action', + // align:"center", + // fixed:"right", + // width:147, + // scopedSlots: { customRender: 'action' }, + // } + ], + url: { + list: "/eam/projectMaintenanceOrder/listProjectMaintenanceOrderDetailByMainId", + delete: "/eam/projectMaintenanceOrder/deleteProjectMaintenanceOrderDetail", + deleteBatch: "/eam/projectMaintenanceOrder/deleteBatchProjectMaintenanceOrderDetail", + exportXlsUrl: "/eam/projectMaintenanceOrder/exportProjectMaintenanceOrderDetail", + importUrl: "/eam/projectMaintenanceOrder/importProjectMaintenanceOrderDetail", + }, + dictOptions: { + auditStatus: [], + } + } + }, + created() { + }, + computed: { + importExcelUrl() { + return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; + } + }, + methods: { + clearList() { + this.dataSource = [] + this.selectedRowKeys = [] + this.ipagination.current = 1 + } + } +} </script> <style scoped> - @import '~@assets/less/common.less'; +@import '~@assets/less/common.less'; </style> diff --git a/src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderForm.vue b/src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderForm.vue index 413db86..89b0747 100644 --- a/src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderForm.vue +++ b/src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderForm.vue @@ -2,20 +2,47 @@ <a-spin :spinning='confirmLoading'> <j-form-container :disabled='formDisabled'> <!-- 涓昏〃鍗曞尯鍩� --> - <a-form-model ref='form' :model='model' :rules='validatorRules' slot='detail'> + <a-form-model + ref='form' + :model='model' + :rules='validatorRules' + slot='detail' + > <a-row> <a-col :span='12'> - <a-form-model-item label='璁″垝鍗曠紪鍙�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> - <a-input v-model='model.num' placeholder='璇疯緭鍏ヨ鍒掑崟缂栧彿'></a-input> + <a-form-model-item + label='璁″垝鍗曠紪鍙�' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='num' + > + <a-input + v-model='model.num' + placeholder='璇疯緭鍏ヨ鍒掑崟缂栧彿' + ></a-input> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='璁″垝鍚嶇О' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='璁″垝鍚嶇О'> - <a-input v-model='model.name' rows='4' placeholder='璇疯緭鍏ヨ鍒掑悕绉�' /> + <a-form-model-item + label='璁″垝鍚嶇О' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='璁″垝鍚嶇О' + > + <a-input + v-model='model.name' + rows='4' + placeholder='璇疯緭鍏ヨ鍒掑悕绉�' + /> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='璁″垝寮�濮嬫棩鏈�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='planStartTime'> + <a-form-model-item + label='璁″垝寮�濮嬫棩鏈�' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='planStartTime' + > <j-date placeholder='璇烽�夋嫨璁″垝寮�濮嬫棩鏈�' v-model='model.planStartTime' @@ -26,7 +53,12 @@ </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='璁″垝缁撴潫鏃ユ湡' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='planEndTime'> + <a-form-model-item + label='璁″垝缁撴潫鏃ユ湡' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='planEndTime' + > <j-date placeholder='璇烽�夋嫨璁″垝缁撴潫鏃ユ湡' v-model='model.planEndTime' @@ -59,7 +91,12 @@ </a-form-model-item> </a-col> --> <a-col :span='12'> - <a-form-model-item label='闄勪欢' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='annex'> + <a-form-model-item + label='闄勪欢' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='annex' + > <j-image-upload :isMultiple="false" v-model="model.annex" @@ -67,8 +104,17 @@ </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='澶囨敞' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'> - <a-textarea v-model='model.remark' rows='4' placeholder='璇疯緭鍏ュ娉�' /> + <a-form-model-item + label='澶囨敞' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='remark' + > + <a-textarea + v-model='model.remark' + rows='4' + placeholder='璇疯緭鍏ュ娉�' + /> </a-form-model-item> </a-col> @@ -76,39 +122,68 @@ </a-form-model> </j-form-container> <!-- 瀛愯〃鍗曞尯鍩� --> - <a-tabs v-model='activeKey' @change='handleChangeTabs'> - <a-tab-pane tab='椤圭洰鎬х淮淇槑缁�' :key='refKeys[0]' :forceRender='true'> - <j-vxe-table keep-source :ref='refKeys[0]' :loading='projectMaintenanceOrderDetailTable.loading' - :columns='projectMaintenanceOrderDetailTable.columns' - :dataSource='projectMaintenanceOrderDetailTable.dataSource' - :maxHeight='300' - :disabled='formDisabled' :rowNumber='true' :rowSelection='true' :toolbar='true' - :toolbarConfig='toolbarConfig' - :linkage-config='linkageConfig'> + <a-tabs + v-model='activeKey' + @change='handleChangeTabs' + > + <a-tab-pane + tab='椤圭洰鎬х淮淇槑缁�' + :key='refKeys[0]' + :forceRender='true' + > + <j-vxe-table + keep-source + :ref='refKeys[0]' + :loading='projectMaintenanceOrderDetailTable.loading' + :columns='projectMaintenanceOrderDetailTable.columns' + :dataSource='projectMaintenanceOrderDetailTable.dataSource' + :maxHeight='400' + :disabled='formDisabled' + :rowNumber='true' + :rowSelection='true' + :alwaysEdit='true' + :toolbar='true' + :bordered='true' + :toolbarConfig='toolbarConfig' + :linkage-config='linkageConfig' + > <template slot='toolbarPrefix'> - <a-button type='primary' @click='selectEquipmentList' :disabled='formDisabled'>閫夋嫨璁惧 + <a-button + type='primary' + @click='selectEquipmentList' + :disabled='formDisabled' + >閫夋嫨璁惧 </a-button> </template> <template v-slot:supplierId='props'> - <a-select v-model='props.row.supplierId' :options='supplierVoList' - style='width: 100%' - placeholder='璇烽�夋嫨' - @change='(e) => handleChange(e, props.row)' /> + <a-select + v-model='props.row.supplierId' + :options='supplierVoList' + style='width: 100%' + placeholder='璇烽�夋嫨' + @change='(e) => handleChange(e, props.row)' + /> </template> <template v-slot:teamId='props'> - <a-select v-model='props.row.teamId' :options='teamVoList' - style='width: 100%' - placeholder='璇烽�夋嫨' - @change='(e) => handleChange(e, props.row)' /> + <a-select + v-model='props.row.teamId' + :options='teamVoList' + style='width: 100%' + placeholder='璇烽�夋嫨' + @change='(e) => handleChange(e, props.row)' + /> </template> <template v-slot:userId='props'> - <a-select v-model='props.row.userId' :options='userVoList' - style='width: 100%' - placeholder='璇烽�夋嫨' - @change='(e) => handleChange(e, props.row)' /> + <a-select + v-model='props.row.userId' + :options='userVoList' + style='width: 100%' + placeholder='璇烽�夋嫨' + @change='(e) => handleChange(e, props.row)' + /> <!-- <a-select placeholder="璇烽�夋嫨璐d换浜�" allowClear @@ -124,8 +199,11 @@ </j-vxe-table> </a-tab-pane> </a-tabs> - <equipment-select-modal @selectionRows='selectionRows' :equipmentStatus="['2', '3']" - ref='EquipmentSelectModal'></equipment-select-modal> + <equipment-select-modal + @selectionRows='selectionRows' + :equipmentStatus="['2', '3']" + ref='EquipmentSelectModal' + ></equipment-select-modal> </a-spin> </template> @@ -222,7 +300,8 @@ title: '浠诲姟缂栫爜', key: 'taskNum', type: JVXETypes.input, - width: '120px', + width: '180px', + align: "center", fixed: 'left', validateRules: [ { @@ -234,15 +313,16 @@ title: '璁惧缂栫爜', key: 'equipmentNum', type: JVXETypes.normal, - width: '120px', - // placeholder: '璇疯緭鍏�${title}', + width: '140px', + align: "center", fixed: 'left' }, { title: '璧勪骇缂栫爜', key: 'assetNumber', type: JVXETypes.normal, - width: '120px', + width: '140px', + align: "center", fixed: 'left', defaultValue: '' }, @@ -251,7 +331,8 @@ key: 'supplierId', type: JVXETypes.slot, disabled: true, - width: '100px', + width: '140px', + align: "center", slotName: 'supplierId', defaultValue: '' }, @@ -270,7 +351,8 @@ required: true, // 蹇呭~ message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈� }], - width: '100px', + width: '140px', + align: "center", defaultValue: '' }, // { @@ -294,8 +376,8 @@ key: 'equipmentName', type: JVXETypes.normal, disabled: true, - width: '120px', - + width: '140px', + align: "center", defaultValue: '' }, { @@ -303,7 +385,8 @@ key: 'model', type: JVXETypes.normal, disabled: true, - width: '120px', + width: '140px', + align: "center", defaultValue: '' }, { @@ -311,7 +394,8 @@ key: 'specification', type: JVXETypes.normal, disabled: true, - width: '120px', + width: '140px', + align: "center", placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, @@ -320,7 +404,8 @@ key: 'equipmentStatus_dictText', type: JVXETypes.normal, disabled: true, - width: '100px', + width: '140px', + align: "center", // placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, @@ -330,7 +415,8 @@ key: 'technologyStatus_dictText', type: JVXETypes.normal, disabled: true, - width: '100px', + width: '140px', + align: "center", defaultValue: '' }, { @@ -338,12 +424,12 @@ key: 'itemName', type: JVXETypes.input, placeholder: '璇疯緭鍏�${title}', - width: '100px', - validateRules: [ - { - required: true, // 蹇呭~ - message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈� - }], + width: '240px', + validateRules: [{ + required: true, // 蹇呭~ + message: '璇疯緭鍏�${title}' // 鏄剧ず鐨勬枃鏈� + }], + align: "center", defaultValue: '' }, { @@ -352,7 +438,8 @@ type: JVXETypes.select, dictCode: 'urgency', placeholder: '璇疯緭鍏�${title}', - width: '100px', + width: '140px', + align: "center", defaultValue: '' }, { @@ -363,6 +450,7 @@ width: '150px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', + align: "center", slotName: 'teamId' }, { @@ -370,36 +458,36 @@ key: 'teamId', type: JVXETypes.hidden }, - { title: '璐d换浜�', key: 'userId', type: JVXETypes.slot, disabled: true, - width: '100px', + width: '160px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', + align: "center", slotName: 'userId' }, - { title: '璐d换浜�', key: 'userId', type: JVXETypes.hidden }, - { title: '璁″垝寮�濮嬫椂闂�', key: 'planStartTime', type: JVXETypes.datetime, - width: '120px', + width: '140px', + align: "center", placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, { title: '璁″垝瀹屾垚鏃堕棿', key: 'planEndTime', type: JVXETypes.datetime, - width: '120px', + width: '140px', + align: "center", placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, @@ -431,7 +519,7 @@ projectMaintenanceOrderDetail: { list: '/eam/projectMaintenanceOrder/queryProjectMaintenanceOrderDetailByMainId' }, - queryUserByTeamId:'/base/team/queryUserByTeamId' + queryUserByTeamId: '/base/team/queryUserByTeamId' } } }, @@ -500,14 +588,14 @@ this.$set(data, 'userId', data.userId) }) }, - getUserVoList(val){ - getAction(this.url.queryUserByTeamId,{teamId:val}).then(res=>{ - if(res.success){ + getUserVoList(val) { + getAction(this.url.queryUserByTeamId, { teamId: val }).then(res => { + if (res.success) { this.userVoList = res.result } - else{ + else { this.$message.error(res.message); - } + } }) }, handleVerify(parent) { @@ -554,7 +642,7 @@ supplierVoList: this.supplierVoList, userVoList: this.userVoList, teamVoList: this.teamVoList, - userId:data[i].userId + userId: data[i].userId } } @@ -582,7 +670,7 @@ }, //鏍¢獙鎵�鏈変竴瀵逛竴瀛愯〃琛ㄥ崟 validateSubForm(allValues) { - if(this.$refs.projectMaintenanceOrderDetail.getTableData().length == 0){ + if (this.$refs.projectMaintenanceOrderDetail.getTableData().length == 0) { this.$message.warning("璇锋坊鍔犵淮淇槑缁嗭紒") return } diff --git a/src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderModal.vue b/src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderModal.vue index 891cb19..c4c4fc7 100644 --- a/src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderModal.vue +++ b/src/views/eam/modules/projectMaintenanceOrder/ProjectMaintenanceOrderModal.vue @@ -1,62 +1,67 @@ <template> <j-modal :title="title" - :width="1200" + :width="1400" :visible="visible" :maskClosable="false" switchFullscreen @ok="handleOk" :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" - @cancel="handleCancel"> - <project-maintenance-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/> + @cancel="handleCancel" + > + <project-maintenance-order-form + ref="realForm" + @ok="submitCallback" + :disabled="disableSubmit" + /> </j-modal> </template> <script> - import ProjectMaintenanceOrderForm from './ProjectMaintenanceOrderForm.vue' - export default { - name: 'ProjectMaintenanceOrderModal', - components: { - ProjectMaintenanceOrderForm +import ProjectMaintenanceOrderForm from './ProjectMaintenanceOrderForm.vue' +export default { + name: 'ProjectMaintenanceOrderModal', + components: { + ProjectMaintenanceOrderForm + }, + data() { + return { + title: '', + width: 800, + visible: false, + disableSubmit: false + } + }, + methods: { + add() { + this.visible = true + this.$nextTick(() => { + this.$refs.realForm.add(); + }) }, - data() { - return { - title:'', - width:800, - visible: false, - disableSubmit: false - } + edit(record) { + this.visible = true + this.$nextTick(() => { + this.$refs.realForm.edit(record); + }) }, - methods:{ - add () { - this.visible=true - this.$nextTick(()=>{ - this.$refs.realForm.add(); - }) - }, - edit (record) { - this.visible=true - this.$nextTick(()=>{ - this.$refs.realForm.edit(record); - }) - }, - close () { - this.$emit('close'); - this.visible = false; - }, - handleOk () { - this.$refs.realForm.handleOk(); - }, - submitCallback(){ - this.$emit('ok'); - this.visible = false; - }, - handleCancel () { - this.close() - } + close() { + this.$emit('close'); + this.visible = false; + }, + handleOk() { + this.$refs.realForm.handleOk(); + }, + submitCallback() { + this.$emit('ok'); + this.visible = false; + }, + handleCancel() { + this.close() } } +} </script> <style scoped> diff --git a/src/views/eam/modules/repairorder/moudles/RepairOrderActualHoursReport.vue b/src/views/eam/modules/repairorder/moudles/RepairOrderActualHoursReport.vue index c462277..7d45d2a 100644 --- a/src/views/eam/modules/repairorder/moudles/RepairOrderActualHoursReport.vue +++ b/src/views/eam/modules/repairorder/moudles/RepairOrderActualHoursReport.vue @@ -25,6 +25,7 @@ :value="text" :read-only="true" @change="(e) => handleChange(e, record.key, col, index)" + :disabled="repairOrderStatus=='4'" /> <a-input-number :value="text" @@ -32,7 +33,7 @@ :min="0" :max="99999" @change="(e)=>handleChange(e, record.key, col, index)" - :disabled="record.disabled" + :disabled="repairOrderStatus=='4'" /> </div> @@ -41,7 +42,10 @@ slot='action' slot-scope='text, record,index' > - <a @click="handleDeleteFake(index)" v-if="record.isLock=='no'&&mainId.status=='3'">鍒犻櫎</a> + <a + :disabled="repairOrderStatus=='4'" + @click="handleDelete(index)" + >鍒犻櫎</a> </span> </a-table> <a-button @@ -49,8 +53,9 @@ type="dashed" icon="plus" @click="addHour" - :disabled="mainId.status=='4'" + :disabled="this.repairOrderStatus=='4' || this.repairOrderStatus=='2'" >娣诲姞瀹為檯宸ユ椂 + <!-- :disabled="mainId.status=='4'" --> </a-button> <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> <a-row :style="{textAlign:'right'}"> @@ -64,12 +69,12 @@ @click="handleOk(1)" type="primary" :style="{marginRight: '8px'}" - :disabled="mainId.status=='4'" + :disabled="this.repairOrderStatus=='4' || this.repairOrderStatus=='2'" >鏆傚瓨</a-button> <a-button @click="handleOk(0)" type="primary" - :disabled="mainId.status=='4'" + :disabled="this.repairOrderStatus=='4' || this.repairOrderStatus=='2'" >淇濆瓨</a-button> </a-row> <!-- :disabled="false" --> @@ -94,10 +99,29 @@ JEllipsis, ActualHourUserSelect }, + // props: { + // mainId: { + // type: Object, + // required: false, + // default: {} + // } + // }, props: { - mainId: { - type: Object, - } + repairOrderId: { + type: String, + required: false, + default: '-1' + }, + repairOrderStatus: { + type: String, + required: false, + default: '' + }, + teamId: { + type: String, + required: false, + default: '' + }, }, data() { return { @@ -149,6 +173,16 @@ dataSource: [], columns: [ { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { title: '*浜哄憳缂栫爜', dataIndex: 'username', align: "center", @@ -185,30 +219,20 @@ changeIndex: 0 } }, - created() { - // this.queryParam['maintenanceOrderId'] = this.dailyMaintenanceOrderId; - // this.queryParam['equipmentId'] = this.equipmentId - // this.loadData(1); - }, + watch: { - mainId: { + repairOrderId: { immediate: true, handler(val) { - console.log(val) - if (!this.mainId.id) { - - this.clearList() - } else { - - this.queryParam['repairOrderId'] = val.id - this.loadData(1) - } + this.clearList(); + this.queryParam['repairOrderId'] = val + this.loadData(1) } - } + }, }, methods: { addHour() { - this.dataSource.push({ userId: '', repairOrderId: this.mainId.id, actualHour: 0, username: '', realname: '' }) + this.dataSource.push({ userId: '', repairOrderId: this.repairOrderId, actualHour: 0, username: '', realname: '' }) }, handleCancel() { this.$bus.$emit('closeDrawer'); @@ -219,9 +243,10 @@ this.disableSubmit = false; this.visible = false; }, - handleDeleteFake(index) { - this.dataSource.pop(index); + handleDelete(text, record, index) { + this.dataSource.splice(index, 1); }, + handleOk(saveStatus) { const that = this if (saveStatus == 0) { @@ -245,9 +270,10 @@ if (!err) { that.confirmLoading = true let formData = {} - formData.repairOrderId = that.mainId.id; + // formData.repairOrderId = that.mainId.id; + formData.repairOrderId = that.repairOrderId; formData.repairOrderActualWorkHoursList = that.dataSource; - formData.equipmentId = that.equipmentId; + // formData.equipmentId = that.equipmentId; let obj = obj = postAction(this.url.confirmHour, formData) obj.then((res) => { if (res.success) { @@ -281,7 +307,8 @@ }, onSearchUser(index) { this.recordIndex = index - this.$refs.actualUserSelect.list(this.mainId.teamId) + // this.$refs.actualUserSelect.list(this.mainId.teamId) + this.$refs.actualUserSelect.list(this.teamId) this.$refs.actualUserSelect.title = '浜哄憳閫夋嫨' }, sendUserRecord(data, val) { diff --git a/src/views/eam/modules/repairorder/moudles/RepairOrderActualMaterialReport.vue b/src/views/eam/modules/repairorder/moudles/RepairOrderActualMaterialReport.vue index a8af549..36ede0a 100644 --- a/src/views/eam/modules/repairorder/moudles/RepairOrderActualMaterialReport.vue +++ b/src/views/eam/modules/repairorder/moudles/RepairOrderActualMaterialReport.vue @@ -63,7 +63,7 @@ type="dashed" icon="plus" @click="addMaterial" - :disabled="mainId.status=='4'" + :disabled="mainId.status=='4' || mainId.status=='2'" >娣诲姞瀹為檯鐢ㄦ枡</a-button> <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> <a-row :style="{textAlign:'right'}"> @@ -96,7 +96,7 @@ import pick from 'lodash.pick' import JEllipsis from '@/components/jeecg/JEllipsis' import JSelectSparePartModal from './select/JSelectSparePartModal' -import RepairOrderActualMaterialReportModel from './RepairOrderActualMaterialReportModel.vue' +import RepairOrderActualMaterialReportModel from './RepairOrderActualMaterialReportModel.vue' export default { name: 'RepairOrderActualMaterialReport', mixins: [JeecgListMixin], @@ -158,6 +158,16 @@ loading: false, dataSource: [], columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, { title: '棰嗘枡鍑哄簱鍗�', dataIndex: 'num', @@ -253,7 +263,7 @@ // this.queryParam['maintenanceOrderId'] = this.dailyMaintenanceOrderId; // this.queryParam['equipmentId'] = this.equipmentId // this.loadData(1); - console.log("77777777",this.mainId) + console.log("77777777", this.mainId) }, methods: { addMaterial() { diff --git a/src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue b/src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue index 87bd04a..45604a6 100644 --- a/src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue +++ b/src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue @@ -1,5 +1,8 @@ <template> - <a-card :bordered='false' :class="'cust-erp-sub-tab'"> + <a-card + :bordered='false' + :class="'cust-erp-sub-tab'" + > <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form @@ -13,10 +16,16 @@ <!-- 鏌ヨ鍖哄煙-END --> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class='table-operator' v-if='mainId.id'> + <div + class='table-operator' + v-if='mainId.id' + > <a-dropdown v-if='selectedRowKeys.length > 0'> <a-menu slot='overlay'> - <a-menu-item key='1' @click='batchDel'> + <a-menu-item + key='1' + @click='batchDel' + > <a-icon type='delete' /> 鍒犻櫎 </a-menu-item> @@ -45,35 +54,39 @@ :dataSource='dataSource' :pagination='ipagination' :loading='loading' - @change='handleTableChange'> + @change='handleTableChange' + > <!-- :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' --> - - - <span slot='action' slot-scope='text, record'> + <span + slot='action' + slot-scope='text, record' + > <!-- <a @click='handleEdit(record)'>缂栬緫</a> <a-divider type='vertical' /> --> - <a-popconfirm title='纭畾鍒犻櫎鍚�?' @confirm='() => handleDelete(record.id)'> - <a v-if="record.isLock=='no'&&mainId.status=='3'">鍒犻櫎</a> + <a-popconfirm + title='纭畾鍒犻櫎鍚�?' + @confirm='() => handleDelete(record.id)' + > + <a :disabled="mainId.status=='4'">鍒犻櫎</a> </a-popconfirm> </span> </a-table> <a-button - style="width: 100%; margin-top: 16px; margin-bottom: 8px" - type="dashed" - icon="plus" - @click="handleAdd" - :disabled="mainId.status=='4'" - >娣诲姞鏁呴殰鍒嗘瀽 - </a-button> + style="width: 100%; margin-top: 16px; margin-bottom: 8px" + type="dashed" + icon="plus" + @click="handleAdd" + :disabled="mainId.status=='4' ||mainId.status=='2'" + >娣诲姞鏁呴殰鍒嗘瀽 + </a-button> </div> <repair-order-fault-analysis-report-model ref='modalForm' @ok='modalFormOk' ></repair-order-fault-analysis-report-model> </a-card> - </template> @@ -122,7 +135,7 @@ key: 'rowIndex', width: 60, align: 'center', - customRender: function(t, r, index) { + customRender: function (t, r, index) { return parseInt(index) + 1 } }, @@ -192,7 +205,7 @@ this.selectedRowKeys = [] this.ipagination.current = 1 }, - handleAdd: function() { + handleAdd: function () { this.$refs.modalForm.add(this.mainId) this.$refs.modalForm.title = '鏂板' this.$refs.modalForm.disableSubmit = false diff --git a/src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue b/src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue index 6dbccfe..9a89f7c 100644 --- a/src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue +++ b/src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue @@ -170,7 +170,10 @@ </a-form-item> </a-col> </a-row> - <a-row :gutter="24"> + <a-row + hidden + :gutter="24" + > <a-col :span="6"> <a-form-item :labelCol="labelCol" @@ -234,18 +237,18 @@ :repairOrderId="repairOrder.id" :repairOrderStatus="repairOrder.status" ></actual-material-edit-table> --> - <RepairOrderActualMaterialList :mainId="repairOrder"/> + <RepairOrderActualMaterialList :mainId="repairOrder" /> </a-tab-pane> <a-tab-pane tab='瀹為檯宸ユ椂' key="2" class="hightColor" > - <!-- <actual-work-hours-edit-table + <RepairOrderActualWorkHoursList :repairOrderId="repairOrder.id" :repairOrderStatus="repairOrder.status" - ></actual-work-hours-edit-table> --> - <RepairOrderActualWorkHoursList :mainId="repairOrder"/> + :teamId="repairOrder.teamId" + /> </a-tab-pane> <a-tab-pane tab='鏁呴殰鍒嗘瀽' @@ -256,7 +259,7 @@ :repairOrderId="repairOrder.id" :repairOrderStatus="repairOrder.status" ></fault-analysis-edit-table> --> - <RepairOrderFaultAnalysisList :mainId="repairOrder"/> + <RepairOrderFaultAnalysisList :mainId="repairOrder" /> </a-tab-pane> </a-tabs> </a-card> @@ -332,7 +335,7 @@ mounted() { this.$bus.$on('closeDrawer', (data) => { - this.visible = false; + this.handleCancel() }) }, @@ -357,40 +360,117 @@ this.visible = false; //this.repairOrder.id = "-1" }, - handleStart(record) { - putAction(this.url.orderStart, this.repairOrder).then(res => { - if (res.result) { - this.$message.success('寮�宸ユ垚鍔�'); - this.repairOrder.status = '3' - this.$emit('loadData'); - } else { - this.$message.error('寮�宸ュ嚭鐜板紓甯�') - } + // handleStart(record) { + // putAction(this.url.orderStart, this.repairOrder).then(res => { + // if (res.result) { + // this.$message.success('寮�宸ユ垚鍔�'); + // this.repairOrder.status = '3' + // this.$emit('loadData'); + // } else { + // this.$message.error('寮�宸ュ嚭鐜板紓甯�') + // } + // }) + // }, + //寮�宸� + handleStart() { + const that = this; + that.confirmLoading = true; + this.$confirm({ + title: '缁翠慨宸ュ崟寮�宸�', + content: '鎻愮ず锛氬紑宸ュ悗鏃犳硶鎾ゅ洖锛岃璋ㄦ厧鎿嶄綔锛�', + okText: '纭', + cancelText: '鍙栨秷', + onOk() { + putAction(that.url.orderStart, that.repairOrder).then(res => { + if (res.result) { + that.$message.success('寮�宸ユ垚鍔�'); + that.repairOrder.status = '3' + that.$emit('loadData'); + } else { + that.$message.error('寮�宸ュ嚭鐜板紓甯�') + } + }).finally(() => { + that.confirmLoading = false; + // that.close(); + }) + }, }) }, + + // handleReport() { + // putAction(this.url.orderReport, this.repairOrder).then(res => { + // if (res.result) { + // this.$message.success('鎶ュ伐鎴愬姛'); + // this.repairOrder.status = '4' + // this.$emit('loadData'); + // } else { + // this.$message.error('鎶ュ伐鍑虹幇寮傚父') + // } + // }) + // }, + + //鎶ュ伐 handleReport() { - putAction(this.url.orderReport, this.repairOrder).then(res => { - if (res.result) { - this.$message.success('鎶ュ伐鎴愬姛'); - this.repairOrder.status = '4' - this.$emit('loadData'); - } else { - this.$message.error('鎶ュ伐鍑虹幇寮傚父') - } + const that = this; + that.confirmLoading = true; + this.$confirm({ + title: '缁翠慨宸ュ崟鎶ュ伐', + content: '鎻愮ず锛氭姤宸ュ悗缁翠慨瀹屽伐锛岃璋ㄦ厧鎿嶄綔锛�', + okText: '纭', + cancelText: '鍙栨秷', + onOk() { + putAction(that.url.orderReport, that.repairOrder).then(res => { + if (res.result) { + that.$message.success('鎶ュ伐鎴愬姛'); + that.repairOrder.status = '4' + that.$emit('loadData'); + } else { + that.$message.error('鎶ュ伐鍑虹幇寮傚父') + } + }).finally(() => { + that.confirmLoading = false; + // + }) + }, }) }, + // handleRevoke() { + // putAction(this.url.orderRevoke, this.repairOrder).then(res => { + // if (res.result) { + // this.$message.success('鎾ら攢鎴愬姛'); + // this.repairOrder.status = '3' + // this.$emit('loadData'); + // } else { + // this.$message.error('鎾ら攢鍑虹幇寮傚父') + // } + // }) + // }, + + //鎾ら攢 handleRevoke() { - putAction(this.url.orderRevoke, this.repairOrder).then(res => { - if (res.result) { - this.$message.success('鎾ら攢鎴愬姛'); - this.repairOrder.status = '3' - this.$emit('loadData'); - } else { - this.$message.error('鎾ら攢鍑虹幇寮傚父') - } + const that = this; + that.confirmLoading = true; + this.$confirm({ + title: '瀹屽伐鎾ら攢', + content: '鎻愮ず锛氬畬宸ユ挙閿�鍚庡彲缁х画鎶ュ伐鎿嶄綔锛�', + okText: '纭', + cancelText: '鍙栨秷', + onOk() { + putAction(that.url.orderRevoke, that.repairOrder).then(res => { + if (res.result) { + that.$message.success('鎾ら攢鎴愬姛'); + that.repairOrder.status = '3' + that.$emit('loadData'); + } else { + that.$message.error('鎾ら攢鍑虹幇寮傚父') + } + }).finally(() => { + that.confirmLoading = false; + // that.close(); + }) + }, }) }, - }, } diff --git a/src/views/eam/modules/specialtyMaintenanceOrder/ActualWorkHoursEditTable.vue b/src/views/eam/modules/specialtyMaintenanceOrder/ActualWorkHoursEditTable.vue index 6a9cea6..efa03d1 100644 --- a/src/views/eam/modules/specialtyMaintenanceOrder/ActualWorkHoursEditTable.vue +++ b/src/views/eam/modules/specialtyMaintenanceOrder/ActualWorkHoursEditTable.vue @@ -42,7 +42,7 @@ slot='action' slot-scope='text, record,index' > - <a @click="handleDeleteFake(index)">鍒犻櫎</a> + <a @click="handleDelete(index)">鍒犻櫎</a> </span> </a-table> <a-button @@ -230,7 +230,7 @@ }, methods: { addHour() { - this.dataSource.push({ id:this.getUuiD(16),userId: '', maintenanceOrderId: this.dailyMaintenanceOrderId, actualWorkingHourQuota: 0, username: '', realname: '' }) + this.dataSource.push({ id: this.getUuiD(16), userId: '', maintenanceOrderId: this.dailyMaintenanceOrderId, actualWorkingHourQuota: 0, username: '', realname: '' }) }, handleCancel() { this.$bus.$emit('closeDrawer'); @@ -241,9 +241,13 @@ this.disableSubmit = false; this.visible = false; }, - handleDeleteFake(index) { - this.dataSource.splice(index,1); + // handleDeleteFake(index) { + // this.dataSource.splice(index,1); + // }, + handleDelete(text, record, index) { + this.dataSource.splice(index, 1); }, + handleOk(saveStatus) { const that = this if (saveStatus == 0) { @@ -267,7 +271,7 @@ if (!err) { that.confirmLoading = true let formData = {} - formData.maintenanceOrderId = that. specialyMaintenanceOrderId; + formData.maintenanceOrderId = that.specialyMaintenanceOrderId; formData.maintenanceOrderActualWorkingHourList = that.dataSource; formData.equipmentId = that.equipmentId; let obj = obj = postAction(this.url.confirmHour, formData) @@ -322,7 +326,7 @@ this.dataSource = []; this.ipagination.current = 1 }, - getUuiD(randomLength){ + getUuiD(randomLength) { return Number( Math.random() .toString() diff --git a/src/views/eam/repairOrderFinishedReport/modules/JSelectSparePartModal.vue b/src/views/eam/repairOrderFinishedReport/modules/JSelectSparePartModal.vue index 47262fc..2dcb568 100644 --- a/src/views/eam/repairOrderFinishedReport/modules/JSelectSparePartModal.vue +++ b/src/views/eam/repairOrderFinishedReport/modules/JSelectSparePartModal.vue @@ -8,7 +8,7 @@ @cancel="handleCancel" style='top:50px' cancelText='鍏抽棴' - :width='1050' + :width='1250' > <a-card :bordered='false'> <div class='table-page-search-wrapper'> @@ -88,7 +88,7 @@ dataIndex: '', key: 'rowIndex', align: 'center', - customRender: function(t, r, index) { + customRender: function (t, r, index) { return parseInt(index) + 1 }, width: 50 diff --git a/src/views/eam/repairOrderFinishedReport/modules/JSelectUserTeamlModal.vue b/src/views/eam/repairOrderFinishedReport/modules/JSelectUserTeamlModal.vue index 221f80f..51de9fc 100644 --- a/src/views/eam/repairOrderFinishedReport/modules/JSelectUserTeamlModal.vue +++ b/src/views/eam/repairOrderFinishedReport/modules/JSelectUserTeamlModal.vue @@ -8,7 +8,7 @@ @cancel="handleCancel" style='top:50px' cancelText='鍏抽棴' - :width='1050' + :width='1250' > <a-card :bordered='false'> <div class='table-page-search-wrapper'> @@ -81,7 +81,7 @@ data() { return { queryParam: {}, - type:'radio', + type: 'radio', columns: [ { title: '浜哄憳缂栫爜', diff --git a/src/views/spare/SparePartCancellingStocksList.vue b/src/views/spare/SparePartCancellingStocksList.vue index a020619..1bfce17 100644 --- a/src/views/spare/SparePartCancellingStocksList.vue +++ b/src/views/spare/SparePartCancellingStocksList.vue @@ -56,27 +56,13 @@ icon='plus' >鏂板 </a-button> - - - <a-popconfirm - :title='`纭畾瑕佹彁浜ゅ悧?`' - @confirm='handleSubmit'> - <a-button type='primary' icon='check' - v-if="selectedRowKeys.length > 0 && (selectionRows[0].status ==='0' || selectionRows[0].status==='3')"> - 鎻愪氦 - </a-button> - </a-popconfirm> - - - <a-popconfirm - :title='`纭畾瑕佹挙鍥炲悧?`' - @confirm='handleRevocation'> - <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].status==='1'" - type='primary' icon='rollback'>鎾ゅ洖 - </a-button> - </a-popconfirm> - - + <a-button @click='handleSubmit' type='primary' icon='check' + v-if="selectedRowKeys.length > 0 && (selectionRows[0].status ==='0' || selectionRows[0].status==='3')"> + 鎻愪氦 + </a-button> + <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].status==='1'" + @click='handleRevocation' type='primary' icon='rollback'>鎾ゅ洖 + </a-button> </div> <div> @@ -92,39 +78,66 @@ :dataSource='dataSource' :pagination='ipagination' :loading='loading' + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" :customRow='clickThenSelect' @change='handleTableChange' > - <span - slot='action' - slot-scope='text, record' - > - <a v-if="record.status === '0'" @click='handleEdit(record)'>缂栬緫</a> + <!-- <span + slot='action' + slot-scope='text, record' + > + <a v-if="record.status === '0' || record.status === '3'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.status === '1'" @click='handleApprove(record)'>瀹℃壒</a> + + <a-divider v-if="record.status === '0' || record.status === '3'" type='vertical' /> + <a-dropdown v-if="record.status === '0' || record.status === '3'"> + <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>--> + <span + slot='action' + slot-scope='text, record' + > + <a v-if="record.status === '0' || record.status === '3'" @click='handleEdit(record)'>缂栬緫</a> <a v-if="record.status === '1'" @click='handleApprove(record)'>瀹℃壒</a> - - <a-divider v-if="record.status === '0'" type='vertical' /> - <a-dropdown v-if="record.status === '0'"> - <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> + <a-divider + v-if="record.status == '0' || record.status == '3' || record.status == '1'" + 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 v-if="record.status == '0'||record.status == '3'"> + <a-popconfirm + title='纭畾鍒犻櫎鍚�?' + @confirm='() => handleDelete(record.id)' + > + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> </span> - </a-table> <a-tabs type='card' defaultActiveKey='1' > <a-tab-pane - tab='澶囦欢閫�璐ф槑缁嗕俊鎭�' + tab='澶囦欢閫�搴撴槑缁嗕俊鎭�' key='1' > <div diff --git a/src/views/spare/SparePartOutboundList.vue b/src/views/spare/SparePartOutboundList.vue index 0f1283f..dada322 100644 --- a/src/views/spare/SparePartOutboundList.vue +++ b/src/views/spare/SparePartOutboundList.vue @@ -68,25 +68,13 @@ type='primary' icon='plus' >鏂板</a-button> - - - <a-popconfirm - :title='`纭畾瑕佹彁浜ゅ悧?`' - @confirm='handleSubmit'> - <a-button type='primary' icon='check' - v-if="selectedRowKeys.length > 0 && (selectionRows[0].status ==='0' || selectionRows[0].status==='3')"> - 鎻愪氦 - </a-button> - </a-popconfirm> - - <a-popconfirm - :title='`纭畾瑕佹挙鍥炲悧?`' - @confirm='handleRevocation'> - <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].status==='1'" - type='primary' icon='rollback'>鎾ゅ洖 - </a-button> - </a-popconfirm> - + <a-button @click='handleSubmit' type='primary' icon='check' + v-if="selectedRowKeys.length > 0 && (selectionRows[0].status ==='0' || selectionRows[0].status==='3')"> + 鎻愪氦 + </a-button> + <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].status==='1'" + @click='handleRevocation' type='primary' icon='rollback'>鎾ゅ洖 + </a-button> <!-- <a-dropdown v-if='selectedRowKeys.length > 0'> @@ -126,36 +114,40 @@ :columns='columns' :dataSource='dataSource' :pagination='ipagination' + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" :loading='loading' :customRow='clickThenSelect' @change='handleTableChange' > <!-- :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' --> - - <span slot='action' slot-scope='text, record' > - <a v-if="record.status === '0'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.status === '0' || record.status === '3'" @click='handleEdit(record)'>缂栬緫</a> <a v-if="record.status === '1'" @click='handleApprove(record)'>瀹℃壒</a> - - <a-divider v-if="record.status === '0'" type='vertical' /> - <a-dropdown v-if="record.status === '0'"> - <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> + <a-divider + v-if="record.status == '0' || record.status == '3' || record.status == '1'" + 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 v-if="record.status == '0'||record.status == '3'"> + <a-popconfirm + title='纭畾鍒犻櫎鍚�?' + @confirm='() => handleDelete(record.id)' + > + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> </span> - <!-- <span slot='action' slot-scope='text, record' diff --git a/src/views/spare/SparePartPurchaseStorageList.vue b/src/views/spare/SparePartPurchaseStorageList.vue index 2ced304..a1c86d4 100644 --- a/src/views/spare/SparePartPurchaseStorageList.vue +++ b/src/views/spare/SparePartPurchaseStorageList.vue @@ -1,6 +1,6 @@ <template> <a-card - title="澶囦欢鍏ュ簱" + title='澶囦欢鍏ュ簱' :bordered='false' > <div class='table-page-search-wrapper'> @@ -67,28 +67,16 @@ @click='handleAdd' type='primary' icon='plus' - >鏂板</a-button> + >鏂板 + </a-button> - - - <a-popconfirm - :title='`纭畾瑕佹彁浜ゅ悧?`' - @confirm='handleSubmit'> - <a-button type='primary' icon='check' - v-if="selectedRowKeys.length > 0 && (selectionRows[0].status ==='0' || selectionRows[0].status==='3')"> - 鎻愪氦 - </a-button> - </a-popconfirm> - - - <a-popconfirm - :title='`纭畾瑕佹挙鍥炲悧?`' - @confirm='handleRevocation'> - <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].status==='1'" - type='primary' icon='rollback'>鎾ゅ洖 - </a-button> - </a-popconfirm> - + <a-button @click='handleSubmit' type='primary' icon='check' + v-if="selectedRowKeys.length > 0 && (selectionRows[0].status ==='0' || selectionRows[0].status==='3')"> + 鎻愪氦 + </a-button> + <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].status==='1'" + @click='handleRevocation' type='primary' icon='rollback'>鎾ゅ洖 + </a-button> <!-- <a-dropdown v-if='selectedRowKeys.length > 0'> <a-menu slot='overlay'> <a-menu-item @@ -125,81 +113,29 @@ :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" :columns='columns' :dataSource='dataSource' + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" :pagination='ipagination' :loading='loading' :customRow='clickThenSelect' @change='handleTableChange' > - - - <span - slot='action' - slot-scope='text, record' - > - <a v-if="record.status === '0'" @click='handleEdit(record)'>缂栬緫</a> +<span + slot='action' + slot-scope='text, record' +> + <a v-if="record.status === '0' || record.status === '3'" @click='handleEdit(record)'>缂栬緫</a> <a v-if="record.status === '1'" @click='handleApprove(record)'>瀹℃壒</a> - - <a-divider v-if="record.status === '0'" type='vertical' /> - <a-dropdown v-if="record.status === '0'"> - <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> - - - <!-- :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' --> - -<!-- <span - slot='action' - slot-scope='text, record' - > - <a - v-if="record.status === '0'" - @click='handleEdit(record)' - >缂栬緫</a> - - <a-divider - v-if="record.status === '0'" - type='vertical' - /> - <a-popconfirm - title="纭畾鎻愪氦鍏ュ簱鍗曞悧?" - @confirm="() => handleSubmit(record)" - > - <a v-if="record.status === '0'">鎻愪氦</a> - </a-popconfirm> - <a-popconfirm - title="纭畾閫氳繃鍚�?" - @confirm="() => handlePass(record)" - > - <a v-if="record.status === '1'">閫氳繃</a> - </a-popconfirm> - <a-divider - v-if="record.status === '1'" - type="vertical" - /> - <a-popconfirm - title="纭畾鎾ゅ洖鍚�?" - @confirm="() => handleReset(record)" - > - <a v-if="record.status === '1'">鎾ゅ洖</a> - </a-popconfirm> - <a-divider - v-if="record.status === '0'" - type="vertical" - /> - <a-dropdown v-if="record.status === '0'"> + <a-divider + v-if="record.status == '0' || record.status == '3' || record.status == '1'" + 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 v-if="record.status == '0'||record.status == '3'"> <a-popconfirm title='纭畾鍒犻櫎鍚�?' @confirm='() => handleDelete(record.id)' @@ -209,20 +145,77 @@ </a-menu-item> </a-menu> </a-dropdown> - </span>--> + </span> + + + <!-- :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' --> + + <!-- <span + slot='action' + slot-scope='text, record' + > + <a + v-if="record.status === '0'" + @click='handleEdit(record)' + >缂栬緫</a> + + <a-divider + v-if="record.status === '0'" + type='vertical' + /> + <a-popconfirm + title="纭畾鎻愪氦鍏ュ簱鍗曞悧?" + @confirm="() => handleSubmit(record)" + > + <a v-if="record.status === '0'">鎻愪氦</a> + </a-popconfirm> + <a-popconfirm + title="纭畾閫氳繃鍚�?" + @confirm="() => handlePass(record)" + > + <a v-if="record.status === '1'">閫氳繃</a> + </a-popconfirm> + <a-divider + v-if="record.status === '1'" + type="vertical" + /> + <a-popconfirm + title="纭畾鎾ゅ洖鍚�?" + @confirm="() => handleReset(record)" + > + <a v-if="record.status === '1'">鎾ゅ洖</a> + </a-popconfirm> + <a-divider + v-if="record.status === '0'" + type="vertical" + /> + <a-dropdown v-if="record.status === '0'"> + <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> <a-tabs - type="card" - defaultActiveKey="1" + type='card' + defaultActiveKey='1' > <a-tab-pane tab='澶囦欢淇℃伅' - key="1" + key='1' > <div - class="table-operator" - style="margin:-16px" + class='table-operator' + style='margin:-16px' > <spare-part-purchase-storage-detail :sparePartPurchaseStorageId='sparePartPurchaseStorageId' /> </div> @@ -265,54 +258,54 @@ key: 'rowIndex', width: 60, align: 'center', - customRender: function (t, r, index) { + customRender: function(t, r, index) { return parseInt(index) + 1 } }, { title: '鍏ュ簱鍗曠紪鐮�', align: 'center', - dataIndex: 'num', + dataIndex: 'num' }, { title: '鐘舵��', align: 'center', - dataIndex: 'status_dictText', + dataIndex: 'status_dictText' }, { title: '鍏ュ簱绫诲瀷', align: 'center', - dataIndex: 'type_dictText', + dataIndex: 'type_dictText' }, { title: '閲囪喘閮ㄩ棬', align: 'center', - dataIndex: 'departId_dictText', + dataIndex: 'departId_dictText' }, { title: '浠撳簱', align: 'center', - dataIndex: 'warehouseId_dictText', + dataIndex: 'warehouseId_dictText' }, { title: '鍒涘缓浜�', align: 'center', - dataIndex: 'createBy', + dataIndex: 'createBy' }, { title: '鍒涘缓鏃ユ湡', align: 'center', - dataIndex: 'createTime', + dataIndex: 'createTime' }, { title: '鏇存柊浜�', align: 'center', - dataIndex: 'updateBy', + dataIndex: 'updateBy' }, { title: '鏇存柊鏃ユ湡', align: 'center', - dataIndex: 'updateTime', + dataIndex: 'updateTime' }, { title: '鎿嶄綔', @@ -320,14 +313,14 @@ align: 'center', fixed: 'right', scopedSlots: { customRender: 'action' }, - width: 200, + width: 200 } ], url: { list: '/spare/sparePartPurchaseStorage/list', delete: '/spare/sparePartPurchaseStorage/delete', deleteBatch: '/spare/sparePartPurchaseStorage/deleteBatch', - auditOperation: "/spare/sparePartPurchaseStorage/auditOperation", + auditOperation: '/spare/sparePartPurchaseStorage/auditOperation', /*鏂板*/ submit: '/spare/sparePartPurchaseStorage/submit', @@ -380,36 +373,36 @@ this.selectionRows = selectionRows }, -/* handleSubmit(record) { - const that = this; - requestPut(that.url.auditOperation, { id: record.id, status: '1' }).then((res) => { - if (res.success) { - that.$message.success("鎻愪氦鎴愬姛!") - that.loadData() - } else { - that.$message.warning("鎻愪氦澶辫触!") - } - }) - },*/ + /* handleSubmit(record) { + const that = this; + requestPut(that.url.auditOperation, { id: record.id, status: '1' }).then((res) => { + if (res.success) { + that.$message.success("鎻愪氦鎴愬姛!") + that.loadData() + } else { + that.$message.warning("鎻愪氦澶辫触!") + } + }) + },*/ handlePass(record) { - const that = this; + const that = this requestPut(that.url.auditOperation, { id: record.id, status: '2' }).then((res) => { if (res.success) { - that.$message.success("瀹℃牳閫氳繃!") + that.$message.success('瀹℃牳閫氳繃!') that.loadData() } else { - that.$message.warning("瀹℃牳澶辫触!") + that.$message.warning('瀹℃牳澶辫触!') } }) }, handleReset(record) { - const that = this; + const that = this requestPut(that.url.auditOperation, { id: record.id, status: '0' }).then((res) => { if (res.success) { - that.$message.success("鎾ゅ洖鎴愬姛!") + that.$message.success('鎾ゅ洖鎴愬姛!') that.loadData() } else { - that.$message.warning("鎾ゅ洖澶辫触!") + that.$message.warning('鎾ゅ洖澶辫触!') } }) }, @@ -454,14 +447,15 @@ searchReset() { this.sparePartPurchaseStorageId = '-1' this.queryParam = {} - this.loadData(1); - }, + this.loadData(1) + } } } </script> <style scoped> @import '~@assets/less/common.less'; + .table-operator .ant-btn { margin: 10px 8px 8px 10px; } diff --git a/src/views/spare/SparePartReceiveList.vue b/src/views/spare/SparePartReceiveList.vue index 5af30da..8a07acd 100644 --- a/src/views/spare/SparePartReceiveList.vue +++ b/src/views/spare/SparePartReceiveList.vue @@ -32,24 +32,13 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class='table-operator'> <a-button @click='handleAdd' type='primary' icon='plus'>鏂板</a-button> - - <a-popconfirm - :title='`纭畾瑕佹彁浜ゅ悧?`' - @confirm='handleSubmit'> - <a-button type='primary' icon='check' - v-if="selectedRowKeys.length > 0 && (selectionRows[0].status ==='0' || selectionRows[0].status==='3')"> - 鎻愪氦 - </a-button> - </a-popconfirm> - - <a-popconfirm - :title='`纭畾瑕佹挙鍥炲悧?`' - @confirm='handleRevocation'> - <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].status==='1'" - type='primary' icon='rollback'>鎾ゅ洖 - </a-button> - </a-popconfirm> - + <a-button @click='handleSubmit' type='primary' icon='check' + v-if="selectedRowKeys.length > 0 && (selectionRows[0].status ==='0' || selectionRows[0].status==='3')"> + 鎻愪氦 + </a-button> + <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].status==='1'" + @click='handleRevocation' type='primary' icon='rollback'>鎾ゅ洖 + </a-button> </div> <!-- table鍖哄煙-begin --> @@ -96,16 +85,16 @@ </a-button> </template> - <span +<!-- <span slot='action' slot-scope='text, record' > - <a v-if="record.status === '0'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.status === '0' || record.status === '3'" @click='handleEdit(record)'>缂栬緫</a> <a v-if="record.status === '1'" @click='handleApprove(record)'>瀹℃壒</a> - <a-divider v-if="record.status === '0'" type='vertical' /> - <a-dropdown v-if="record.status === '0'"> - <a class='ant-dropdown-link'>鏇村 <a-icon type='down' /></a> + <a-divider v-if="record.status === '0' || record.status === '3'" type='vertical' /> + <a-dropdown v-if="record.status === '0' || record.status === '3'"> + <a class='ant-dropdown-link'>鏇村 <a-icon type='down'/></a> <a-menu slot='overlay'> <a-menu-item> <a-popconfirm title='纭畾鍒犻櫎鍚�?' @@ -116,8 +105,34 @@ </a-menu> </a-dropdown> + </span>--> + <span + slot='action' + slot-scope='text, record' + > + <a v-if="record.status === '0' || record.status === '3'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.status === '1'" @click='handleApprove(record)'>瀹℃壒</a> + <a-divider + v-if="record.status == '0' || record.status == '3' || record.status == '1'" + 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 v-if="record.status == '0'||record.status == '3'"> + <a-popconfirm + title='纭畾鍒犻櫎鍚�?' + @confirm='() => handleDelete(record.id)' + > + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> </span> - </a-table> </div> <a-tabs defaultActiveKey='1'> diff --git a/src/views/spare/SparePartScrapList.vue b/src/views/spare/SparePartScrapList.vue index 50a7033..4caa00e 100644 --- a/src/views/spare/SparePartScrapList.vue +++ b/src/views/spare/SparePartScrapList.vue @@ -39,23 +39,14 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class='table-operator'> <a-button @click='handleAdd' type='primary' icon='plus'>鏂板</a-button> + <a-button @click='handleSubmit' type='primary' icon='check' + v-if="selectedRowKeys.length > 0 && (selectionRows[0].auditStatus==='notSubmitted' || selectionRows[0].auditStatus==='Rejected')"> + 鎻愪氦 + </a-button> + <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].auditStatus==='pendingApproval'" + @click='handleRevocation' type='primary' icon='rollback'>鎾ゅ洖 + </a-button> - - <a-popconfirm - :title='`纭畾瑕佹彁浜ゅ悧?`' - @confirm='handleSubmit'> - <a-button type='primary' icon='check' - v-if="selectedRowKeys.length > 0 && (selectionRows[0].auditStatus==='notSubmitted' || selectionRows[0].auditStatus==='Rejected')"> - 鎻愪氦 - </a-button> - </a-popconfirm> - - - <a-popconfirm :title='`纭畾鎾ゅ洖鍚楋紵`' @confirm='handleRevocation'> - <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].auditStatus==='pendingApproval'" - type='primary' icon='rollback'>鎾ゅ洖 - </a-button> - </a-popconfirm> </div> <!-- table鍖哄煙-begin --> @@ -102,28 +93,53 @@ </a-button> </template> + <!-- <span + slot='action' + slot-scope='text, record' + > + <a v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.auditStatus === 'pendingApproval'" @click='handleApprove(record)'>瀹℃壒</a> + <a-divider v-if="record.auditStatus === 'notSubmitted'|| record.auditStatus === 'Rejected'" type='vertical' /> + <a-dropdown v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'"> + <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>--> + <span slot='action' slot-scope='text, record' > - <a v-if="record.auditStatus === 'notSubmitted'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.auditStatus === 'notSubmitted' || record.auditStatus === 'Rejected'" + @click='handleEdit(record)'>缂栬緫</a> <a v-if="record.auditStatus === 'pendingApproval'" @click='handleApprove(record)'>瀹℃壒</a> - <a-divider v-if="record.auditStatus === 'notSubmitted'" type='vertical' /> - <a-dropdown v-if="record.auditStatus === 'notSubmitted'"> - <a class='ant-dropdown-link'>鏇村 <a-icon type='down' /></a> - <a-menu slot='overlay'> - <a-menu-item> + <a-divider + v-if="record.auditStatus == 'notSubmitted' || record.auditStatus == 'Rejected' || record.auditStatus == 'pendingApproval'" + 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>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - - </a-menu> - </a-dropdown> + <a-menu-item v-if="record.auditStatus == 'notSubmitted'||record.auditStatus == 'Rejected'"> + <a-popconfirm + title='纭畾鍒犻櫎鍚�?' + @confirm='() => handleDelete(record.id)' + > + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> </span> </a-table> </div> diff --git a/src/views/spare/SparePartScrapRequirementList.vue b/src/views/spare/SparePartScrapRequirementList.vue index ae4a42e..58c28ed 100644 --- a/src/views/spare/SparePartScrapRequirementList.vue +++ b/src/views/spare/SparePartScrapRequirementList.vue @@ -33,26 +33,13 @@ <div class='table-operator'> <a-button @click='handleAdd' type='primary' icon='plus'>鏂板</a-button> - - - <a-popconfirm - :title='`纭畾瑕佹彁浜ゅ悧?`' - @confirm='handleSubmit'> - <a-button type='primary' icon='check' - v-if="selectedRowKeys.length > 0 && (selectionRows[0].auditStatus ==='0' || selectionRows[0].auditStatus==='3')"> - 鎻愪氦 - </a-button> - </a-popconfirm> - - - <a-popconfirm - :title='`纭畾瑕佹挙鍥炲悧?`' - @confirm='handleRevocation'> - <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].auditStatus==='1'" - type='primary' icon='rollback'>鎾ゅ洖 - </a-button> - </a-popconfirm> - + <a-button @click='handleSubmit' type='primary' icon='check' + v-if="selectedRowKeys.length > 0 && (selectionRows[0].auditStatus ==='0' || selectionRows[0].auditStatus==='3')"> + 鎻愪氦 + </a-button> + <a-button v-if="selectedRowKeys.length > 0 && selectionRows[0].auditStatus==='1'" + @click='handleRevocation' type='primary' icon='rollback'>鎾ゅ洖 + </a-button> </div> <!-- table鍖哄煙-begin --> <div> @@ -85,22 +72,28 @@ slot='action' slot-scope='text, record' > - <a v-if="record.auditStatus === '0'" @click='handleEdit(record)'>缂栬緫</a> + <a v-if="record.auditStatus === '0' || record.auditStatus === '3'" @click='handleEdit(record)'>缂栬緫</a> <a v-if="record.auditStatus === '1'" @click='handleApprove(record)'>瀹℃壒</a> - - <a-divider v-if="record.auditStatus === '0'" type='vertical' /> - <a-dropdown v-if="record.auditStatus === '0'"> - <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> + <a-divider + v-if="record.auditStatus == '0' || record.auditStatus == '3' || record.auditStatus == '1'" + 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 v-if="record.auditStatus == '0'||record.auditStatus == '3'"> + <a-popconfirm + title='纭畾鍒犻櫎鍚�?' + @confirm='() => handleDelete(record.id)' + > + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> </span> diff --git a/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue b/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue index bec2b86..9dd0fa8 100644 --- a/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue +++ b/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue @@ -19,6 +19,7 @@ :wrapperCol='wrapperCol' > <a-input + :disabled="disableSubmit" placeholder='璇疯緭鍗曟嵁鍙�' v-decorator="['num', validatorRules.num]" /> @@ -41,6 +42,7 @@ <a-select :placeholder="'璇烽�夋嫨棰嗙敤閮ㄩ棬'" :options="this.departs" + :disabled="disableSubmit" style="width: 100%" v-model='model.departId' /> @@ -88,6 +90,7 @@ type='primary' :style="{ marginRight: '8px',marginBottom:'8px' }" :loading='confirmLoading' + :disabled="disableSubmit" @click='selectSparePartInventory()' >澧炲姞澶囦欢搴撳瓨淇℃伅 </a-button> @@ -108,6 +111,7 @@ <div :key='col.dataIndex'> <a-input-number :value='text' + :disabled="disableSubmit" v-if="col.dataIndex == 'mainQuantity'" :min='0' :max='record.outboundMainQuantity' @@ -123,6 +127,7 @@ > <a-popconfirm title='纭畾鍒犻櫎鍚�?' + :disabled="disableSubmit" @confirm='() => handleDelete(text,record, index)' > <a>鍒犻櫎</a> @@ -140,6 +145,7 @@ <a-button @click='handleOk()' type='primary' + :disabled="disableSubmit" :loading='confirmLoading' >纭畾 </a-button> diff --git a/src/views/spare/modules/sparePartOutbound/SparePartOutboundModal.vue b/src/views/spare/modules/sparePartOutbound/SparePartOutboundModal.vue index db933a6..fbf8fa2 100644 --- a/src/views/spare/modules/sparePartOutbound/SparePartOutboundModal.vue +++ b/src/views/spare/modules/sparePartOutbound/SparePartOutboundModal.vue @@ -20,6 +20,7 @@ > <a-input placeholder="璇疯緭鐢宠鍗曠紪鐮�" + :disabled="disableSubmit" v-decorator="['num', validatorRules.num]" /> </a-form-item> @@ -32,6 +33,7 @@ > <a-select :placeholder="'璇烽�夋嫨棰嗙敤閮ㄩ棬'" + :disabled="disableSubmit" :options="this.departs" style="width: 100%" v-decorator="['departId', validatorRules.departId]" @@ -85,6 +87,7 @@ </a-spin> <a-button type="primary" + :disabled="disableSubmit" :style="{ marginRight: '8px',marginBottom:'8px' }" :loading="confirmLoading" @click="selectSparePartInventory()" @@ -106,8 +109,10 @@ <div :key="col.dataIndex"> <a-input-number :value="text" + v-if="col.dataIndex == 'outboundMainQuantity'" :min="0" + :disabled="disableSubmit" :max="record.mainQuantity" @change="(e)=>handleChange(e, record.key, col, index)" /> @@ -117,9 +122,12 @@ <span slot="action" slot-scope="text, record, index" + > <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + :disabled="disableSubmit" @confirm="() => handleDelete(text,record, index)" > <a>鍒犻櫎</a> @@ -136,6 +144,7 @@ <a-button @click="handleOk()" + :disabled="disableSubmit" type="primary" :loading="confirmLoading" >纭畾</a-button> @@ -162,6 +171,7 @@ }, data() { return { + disabled:false, departs: [], columns: [ { diff --git a/src/views/spare/modules/sparePartPurchaseStorage/SparePartPurchaseStorageModal.vue b/src/views/spare/modules/sparePartPurchaseStorage/SparePartPurchaseStorageModal.vue index a4d8c38..8bbd37e 100644 --- a/src/views/spare/modules/sparePartPurchaseStorage/SparePartPurchaseStorageModal.vue +++ b/src/views/spare/modules/sparePartPurchaseStorage/SparePartPurchaseStorageModal.vue @@ -20,6 +20,7 @@ > <a-input placeholder='璇疯緭鍏ュ簱鍗曠紪鍙�' + :disabled="disableSubmit" v-decorator="['num', validatorRules.num]" /> </a-form-item> @@ -42,6 +43,7 @@ :placeholder="'璇烽�夋嫨閲囪喘閮ㄩ棬'" :options="this.departs" style="width: 100%" + :disabled="disableSubmit" v-decorator="['departId', validatorRules.departId]" /> </a-form-item> @@ -89,6 +91,7 @@ type='primary' :style="{ marginRight: '8px',marginBottom:'8px' }" :loading='confirmLoading' + :disabled="disableSubmit" @click='selectSparePart()' >澧炲姞澶囦欢淇℃伅 </a-button> @@ -113,15 +116,17 @@ :options='record.suppliers' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' - :disabled='false' + :disabled="disableSubmit" + /> <a-select v-if="col.dataIndex == 'warehouseAreaId'" :value='text' + :disabled="disableSubmit" :options='record.warehouseAreas' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' - :disabled='false' + /> <a-select v-if="col.dataIndex == 'warehouseLocationId'" @@ -129,22 +134,25 @@ :options='record.warehouseLocations' @change='(e) => handleChange(e, record.key, col, index)' style='width: 100%' - :disabled='false' + :disabled="disableSubmit" /> <a-input-number :value='text' v-if="col.dataIndex == 'mainQuantity'" :min='0' + :disabled="disableSubmit" :max='record.wastageRate' @change='(e)=>handleChange(e, record.key, col, index)' /> <a-input :value='text' + :disabled="disableSubmit" v-if="col.dataIndex == 'batchNum'" @change='(e)=>handleChange(e, record.key, col, index)' /> <a-date-picker :value='text' + :disabled="disableSubmit" v-if="col.dataIndex == 'manufactureDate'" format='YYYY-MM-DD' @change='(e)=>handleChange(e, record.key, col, index)' @@ -159,6 +167,7 @@ > <a-popconfirm title='纭畾鍒犻櫎鍚�?' + :disabled="disableSubmit" @confirm='() => handleDelete(text,record, index)' > <a>鍒犻櫎</a> @@ -176,6 +185,7 @@ <a-button @click='handleOk()' type='primary' + :disabled="disableSubmit" :loading='confirmLoading' >纭畾 </a-button> diff --git a/src/views/spare/modules/sparePartReceive/SparePartReceiveDeatilList.vue b/src/views/spare/modules/sparePartReceive/SparePartReceiveDeatilList.vue index f57304a..e7b36de 100644 --- a/src/views/spare/modules/sparePartReceive/SparePartReceiveDeatilList.vue +++ b/src/views/spare/modules/sparePartReceive/SparePartReceiveDeatilList.vue @@ -15,7 +15,7 @@ size='middle' bordered rowKey='id' - :scroll='{x:true}' + :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" :columns='columns' :dataSource='dataSource' :pagination='ipagination' @@ -149,55 +149,53 @@ title: '澶囦欢缂栫爜', align: 'center', dataIndex: 'spareNum', - width: 150 }, { title: '澶囦欢鍚嶇О', align: 'center', dataIndex: 'spareName', - width: 150 + }, { title: '瑙勬牸', align: 'center', dataIndex: 'specification', - width: 130 + }, { title: '鍨嬪彿', align: 'center', dataIndex: 'model', - width: 150 + }, { title: '涓诲崟浣�', align: 'center', dataIndex: 'mainUnitIdName', - width: 100 + }, { title: '涓绘暟閲�', align: 'center', dataIndex: 'mainQuantity', - width: 100 + }, { title: '杈呭崟浣�', align: 'center', dataIndex: 'auxiliaryUnitIdName', - width: 100 + }, { title: '杈呮暟閲�', align: 'center', dataIndex: 'auxiliaryQuantity', - width: 100 + }, { title: '棰嗙敤鏁伴噺', align: 'center', dataIndex: 'receiveMainQuantity', - width: 100 } ], url: { @@ -217,11 +215,11 @@ } }, methods: { -/* clearList() { + clearList() { this.dataSource = [] this.selectedRowKeys = [] this.ipagination.current = 1 - },*/ + }, loadData(arg) { if (!this.url.list) { diff --git a/src/views/spare/modules/sparePartReceive/SparePartReceiveForm.vue b/src/views/spare/modules/sparePartReceive/SparePartReceiveForm.vue index add1a9b..f5ccd67 100644 --- a/src/views/spare/modules/sparePartReceive/SparePartReceiveForm.vue +++ b/src/views/spare/modules/sparePartReceive/SparePartReceiveForm.vue @@ -60,6 +60,8 @@ <j-vxe-table keep-source :ref='refKeys[0]' + :alwaysEdit='true' + :bordered='bordered' :loading='sparesReceiveDetailTable.loading' :columns='sparesReceiveDetailTable.columns' :dataSource='sparesReceiveDetailTable.dataSource' @@ -99,6 +101,7 @@ }, data() { return { + bordered:true, departs: [], labelCol: { xs: { span: 24 }, @@ -143,6 +146,7 @@ title: '澶囦欢缂栫爜', key: 'spareNum', fixed: 'left', + align:'center', type: JVXETypes.normal, width: '150px', placeholder: '璇疯緭鍏�${title}', @@ -154,12 +158,14 @@ type: JVXETypes.normal, fixed: 'left', width: '150px', + align:'center', placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, { title: '鍨嬪彿', key: 'model', + align:'center', type: JVXETypes.normal, width: '150px', placeholder: '璇疯緭鍏�${title}', @@ -168,6 +174,7 @@ { title: '瑙勬牸', key: 'specification', + align:'center', type: JVXETypes.normal, width: '150px', placeholder: '璇疯緭鍏�${title}', @@ -177,6 +184,7 @@ title: '涓诲崟浣�', key: 'mainUnitIdName', type: JVXETypes.normal, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -185,6 +193,7 @@ title: '涓诲崟浣�', key: 'mainUnitId', type: JVXETypes.hidden, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -193,6 +202,7 @@ title: '杈呭崟浣�', key: 'auxiliaryUnitIdName', type: JVXETypes.normal, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -201,6 +211,7 @@ title: '杈呭崟浣�', key: 'auxiliaryUnitId', type: JVXETypes.hidden, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -209,6 +220,7 @@ title: '涓绘暟閲�', key: 'mainQuantity', type: JVXETypes.normal, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: 0, @@ -243,6 +255,7 @@ { title: '杈呮暟閲�', key: 'auxiliaryQuantity', + align:'center', type: JVXETypes.normal, width: '200px', placeholder: '璇疯緭鍏�${title}', @@ -252,6 +265,7 @@ { title: '棰嗙敤涓绘暟閲�', key: 'receiveMainQuantity', + align:'center', type: JVXETypes.inputNumber, width: '200px', placeholder: '璇疯緭鍏�${title}', @@ -287,6 +301,7 @@ }, { title: '棰嗙敤杈呮暟閲�', + align:'center', key: 'receiveMainQuantity', type: JVXETypes.hidden, width: '200px', @@ -300,12 +315,14 @@ title: '澶囦欢id', key: 'sparePartId', type: JVXETypes.hidden, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, { title: '澶囦欢搴撳瓨id', + align:'center', key: 'sparePartInventoryId', type: JVXETypes.hidden, width: '200px', diff --git a/src/views/spare/modules/sparePartScrap/SparePartScrapDetailList.vue b/src/views/spare/modules/sparePartScrap/SparePartScrapDetailList.vue index dd2330c..c97e5cf 100644 --- a/src/views/spare/modules/sparePartScrap/SparePartScrapDetailList.vue +++ b/src/views/spare/modules/sparePartScrap/SparePartScrapDetailList.vue @@ -15,14 +15,21 @@ size='middle' bordered rowKey='id' - :scroll='{x:true}' + :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" :columns='columns' :dataSource='dataSource' :pagination='ipagination' :loading='loading' @change='handleTableChange' > - + <template slot="scrapReason" slot-scope="text" > + <a-tooltip placement="top" :title="text" trigger="hover"> + <div> + <template slot="title"> </template> + <p style="cusor:pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 130px;">{{ text }}</p> + </div> + </a-tooltip> + </template> <template slot='htmlSlot' slot-scope='text' @@ -100,6 +107,10 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { getAction } from '@api/manage' +function Tooltip(props) { + return null +} + export default { name: 'SparePartScrapDetailList', mixins: [JeecgListMixin], @@ -126,10 +137,12 @@ }, data() { return { + description: '澶囦欢鎶ュ簾绠$悊椤甸潰', disableMixinCreated: true, // 琛ㄥご columns: [ + { title: '#', dataIndex: '', @@ -144,82 +157,87 @@ title: '澶囦欢缂栫爜', align: 'center', dataIndex: 'spareNum', - width: 150 + }, + { title: '澶囦欢鍚嶇О', align: 'center', dataIndex: 'spareName', - width: 150 + }, { title: '瑙勬牸', align: 'center', dataIndex: 'specification', - width: 130 + }, { title: '鍨嬪彿', align: 'center', dataIndex: 'model', - width: 150 + ellipsis: true }, { title: '涓诲崟浣�', align: 'center', dataIndex: 'mainUnitIdName', - width: 100 + }, { title: '搴撳瓨涓绘暟閲�', align: 'center', dataIndex: 'mainQuantity', - width: 100 + }, { title: '杈呭崟浣�', align: 'center', dataIndex: 'auxiliaryUnitIdName', - width: 100 + + ellipsis: true }, { title: '搴撳瓨杈呮暟閲�', align: 'center', dataIndex: 'auxiliaryQuantity', - width: 100 + }, { title: '鎶ュ簾涓绘暟閲�', align: 'center', dataIndex: 'scrapMainQuantity', - width: 100 + }, { title: '鎶ュ簾杈呮暟閲�', align: 'center', dataIndex: 'scrapAuxiliaryQuantity', - width: 100 - }, - { - title: '搴撳尯', - align: 'center', - dataIndex: 'warehouseAreaIdName', - width: 100 - }, - { - title: '搴撲綅', - align: 'center', - dataIndex: 'warehouseLocationIdName', - width: 100 + }, { title: '鎶ュ簾鍘熷洜', align: 'center', dataIndex: 'scrapReason', - width: 100 - } + scopedSlots: { customRender: 'scrapReason' }, //蹇呭啓 + ellipsis: true, + + }, + { + title: '搴撳尯', + align: 'center', + dataIndex: 'warehouseAreaIdName', + + }, + { + title: '搴撲綅', + align: 'center', + dataIndex: 'warehouseLocationIdName', + + }, + ], url: { @@ -239,6 +257,7 @@ } }, methods: { + clearList() { this.dataSource = [] this.selectedRowKeys = [] @@ -279,4 +298,5 @@ </script> <style scoped> @import '~@assets/less/common.less'; + </style> diff --git a/src/views/spare/modules/sparePartScrap/SparePartScrapForm.vue b/src/views/spare/modules/sparePartScrap/SparePartScrapForm.vue index 6d799f3..bf9e454 100644 --- a/src/views/spare/modules/sparePartScrap/SparePartScrapForm.vue +++ b/src/views/spare/modules/sparePartScrap/SparePartScrapForm.vue @@ -56,6 +56,8 @@ <j-vxe-table keep-source :ref='refKeys[0]' + :bordered='bordered' + :alwaysEdit='true' :loading='sparesScrapDetailTable.loading' :columns='sparesScrapDetailTable.columns' :dataSource='sparesScrapDetailTable.dataSource' @@ -96,6 +98,7 @@ data() { return { departs:[], + bordered:true, labelCol: { xs: { span: 24 }, sm: { span: 5 } @@ -137,6 +140,7 @@ key: 'spareNum', fixed: 'left', type: JVXETypes.normal, + align:'center', width: '150px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -144,6 +148,7 @@ { title: '澶囦欢鍚嶇О', key: 'spareName', + align:'center', type: JVXETypes.normal, fixed: 'left', width: '150px', @@ -153,6 +158,7 @@ { title: '鍨嬪彿', key: 'model', + align:'center', type: JVXETypes.normal, width: '150px', placeholder: '璇疯緭鍏�${title}', @@ -162,6 +168,7 @@ title: '瑙勬牸', key: 'specification', type: JVXETypes.normal, + align:'center', width: '150px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -171,6 +178,7 @@ key: 'batchNum', type: JVXETypes.normal, width: '200px', + align:'center', placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, @@ -178,6 +186,7 @@ title: '鍒堕�犲晢', key: 'constructorName', type: JVXETypes.normal, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -186,6 +195,7 @@ title: '鍑哄巶鏃ユ湡', key: 'manufactureDate', type: JVXETypes.normal, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -195,6 +205,7 @@ title: '鏈夋晥鏃ユ湡', key: 'validityPeriod', type: JVXETypes.normal, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -204,6 +215,7 @@ key: 'scrapReason', type: JVXETypes.textarea, width: '200px', + align:'center', placeholder: '璇疯緭鍏�${title}', defaultValue: '', validateRules: [ @@ -218,6 +230,7 @@ key: 'mainUnitIdName', type: JVXETypes.normal, width: '200px', + align:'center', placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, @@ -225,6 +238,7 @@ title: '涓诲崟浣�', key: 'mainUnitId', type: JVXETypes.hidden, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -233,6 +247,7 @@ title: '杈呭崟浣�', key: 'auxiliaryUnitIdName', type: JVXETypes.normal, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -240,6 +255,7 @@ { title: '杈呭崟浣�', key: 'auxiliaryUnitId', + align:'center', type: JVXETypes.hidden, width: '200px', placeholder: '璇疯緭鍏�${title}', @@ -248,6 +264,7 @@ { title: '涓绘暟閲�', key: 'mainQuantity', + align:'center', type: JVXETypes.normal, width: '200px', placeholder: '璇疯緭鍏�${title}', @@ -258,6 +275,7 @@ title: '杈呮暟閲�', key: 'auxiliaryQuantity', type: JVXETypes.normal, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -266,6 +284,7 @@ title: '澶囦欢id', key: 'sparePartId', type: JVXETypes.hidden, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -275,12 +294,14 @@ key: 'sparePartInventoryId', type: JVXETypes.hidden, width: '200px', + align:'center', placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, { title: '鎶ュ簾涓绘暟閲�', key: 'scrapMainQuantity', + align:'center', type: JVXETypes.inputNumber, width: '200px', placeholder: '璇疯緭鍏�${title}', @@ -316,6 +337,7 @@ }, { title: '鎶ュ簾杈呮暟閲�', + align:'center', key: 'scrapAuxiliaryQuantity', type: JVXETypes.normal, width: '200px', @@ -324,6 +346,7 @@ }, { title: '搴撳尯', + align:'center', key: 'warehouseAreaIdName', type: JVXETypes.normal, width: '200px', @@ -332,6 +355,7 @@ }, { title: '搴撳尯id', + align:'center', key: 'warehouseAreaId', type: JVXETypes.hidden, width: '200px', @@ -340,6 +364,7 @@ }, { title: '搴撲綅', + align:'center', key: 'warehouseLocationIdName', type: JVXETypes.normal, width: '200px', @@ -348,6 +373,7 @@ }, { title: '搴撲綅id', + align:'center', key: 'warehouseLocationId', type: JVXETypes.hidden, width: '200px', diff --git a/src/views/spare/modules/sparePartScrapRequirement/SparePartScrapRequirementDetailList.vue b/src/views/spare/modules/sparePartScrapRequirement/SparePartScrapRequirementDetailList.vue index cf79f71..9cb742d 100644 --- a/src/views/spare/modules/sparePartScrapRequirement/SparePartScrapRequirementDetailList.vue +++ b/src/views/spare/modules/sparePartScrapRequirement/SparePartScrapRequirementDetailList.vue @@ -15,7 +15,7 @@ size='middle' bordered rowKey='id' - :scroll='{x:true}' + :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" :columns='columns' :dataSource='dataSource' :pagination='ipagination' @@ -147,55 +147,53 @@ title: '澶囦欢缂栫爜', align: 'center', dataIndex: 'spareNum', - width: 150, }, { title: '澶囦欢鍚嶇О', align: 'center', dataIndex: 'spareName', - width: 150, + }, { title: '瑙勬牸', align: 'center', dataIndex: 'specification', - width: 130, + }, { title: '鍨嬪彿', align: 'center', dataIndex: 'model', - width: 150, + }, { title: '涓诲崟浣�', align: 'center', dataIndex: 'mainUnitIdName', - width: 100, + }, { title: '涓绘暟閲�', align: 'center', dataIndex: 'mainQuantity', - width: 100, + }, { title: '杈呮暟閲�', align: 'center', dataIndex: 'auxiliaryQuantity', - width: 100, + }, { title: '杈呭崟浣�', align: 'center', dataIndex: 'auxiliaryUnitIdName', - width: 100, + }, { title: '闇�姹傛棩鏈�', align: 'center', dataIndex: 'requirementTime', - width: 100, }, ], url: { diff --git a/src/views/spare/modules/sparePartScrapRequirement/SparePartScrapRequirementForm.vue b/src/views/spare/modules/sparePartScrapRequirement/SparePartScrapRequirementForm.vue index bd4fd00..798b1a2 100644 --- a/src/views/spare/modules/sparePartScrapRequirement/SparePartScrapRequirementForm.vue +++ b/src/views/spare/modules/sparePartScrapRequirement/SparePartScrapRequirementForm.vue @@ -51,7 +51,9 @@ :dataSource='sparesScrapRequirementDetailTable.dataSource' :maxHeight='300' :disabled='formDisabled' + :alwaysEdit='true' :rowNumber='true' + :bordered='bordered' :rowSelection='true' :toolbar='true' :toolbarConfig='toolbarConfig' @@ -92,6 +94,7 @@ }, data() { return { + bordered:true, departs: [], labelCol: { xs: { span: 24 }, @@ -133,6 +136,7 @@ title: '澶囦欢缂栫爜', key: 'spareNum', fixed: 'left', + align:'center', type: JVXETypes.normal, width: '200px', placeholder: '璇疯緭鍏�${title}', @@ -141,6 +145,7 @@ { title: '澶囦欢鍚嶇О', key: 'spareName', + align:'center', fixed: 'left', type: JVXETypes.normal, width: '200px', @@ -151,6 +156,7 @@ title: '鍨嬪彿', key: 'model', type: JVXETypes.normal, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -159,6 +165,7 @@ title: '瑙勬牸', key: 'specification', type: JVXETypes.normal, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -168,6 +175,7 @@ title: '涓诲崟浣�', key: 'mainUnitIdName', type: JVXETypes.normal, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -176,6 +184,7 @@ title: '涓诲崟浣�', key: 'mainUnitId', type: JVXETypes.hidden, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -183,6 +192,7 @@ { title: '杈呭崟浣�', key: 'auxiliaryUnitIdName', + align:'center', type: JVXETypes.normal, width: '200px', placeholder: '璇疯緭鍏�${title}', @@ -192,6 +202,7 @@ title: '杈呭崟浣�', key: 'auxiliaryUnitId', type: JVXETypes.hidden, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -200,6 +211,7 @@ title: '涓绘暟閲�', key: 'mainQuantity', type: JVXETypes.inputNumber, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: 0, @@ -236,6 +248,7 @@ key: 'auxiliaryQuantity', type: JVXETypes.normal, width: '200px', + align:'center', placeholder: '璇疯緭鍏�${title}', defaultValue: 0 }, @@ -243,6 +256,7 @@ title: '澶囦欢id', key: 'sparePartId', type: JVXETypes.hidden, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -251,6 +265,7 @@ title: '鎹㈢畻姣斾緥', key: 'conversionRatio', type: JVXETypes.hidden, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' @@ -260,6 +275,7 @@ title: '闇�姹傛棩鏈�', key: 'requirementTime', type: JVXETypes.date, + align:'center', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', diff --git a/src/views/spare/modules/sparePartScrapRequirement/SpareSelectList.vue b/src/views/spare/modules/sparePartScrapRequirement/SpareSelectList.vue index 3c47bd5..a1bcea9 100644 --- a/src/views/spare/modules/sparePartScrapRequirement/SpareSelectList.vue +++ b/src/views/spare/modules/sparePartScrapRequirement/SpareSelectList.vue @@ -128,6 +128,7 @@ { title: '鎹㈢畻姣斾緥', align: 'center', + width: 100, dataIndex: 'conversionRatio' } -- Gitblit v1.9.3