From 3a8223b71d18205d40b894fd0b4c0fa1ca773e86 Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期一, 13 十一月 2023 10:44:11 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/mdc-test' into mdc-test --- src/views/eam/RepairOrderList.vue | 443 +++++++++++++++++++++++++++++------------------------- 1 files changed, 239 insertions(+), 204 deletions(-) diff --git a/src/views/eam/RepairOrderList.vue b/src/views/eam/RepairOrderList.vue index 1af7be6..764d7a9 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,109 @@ ></a-input> </a-form-item> </a-col> - <a-col - :md="4" - :sm="8" + <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-col + :xl="6" + :lg="7" + :md="8" + :sm="24"> + <a-form-item + label="璁惧鎵�灞炲垎绫�" + > + <j-dict-select-tag + dictCode="mom_eam_equipment_category,name,id" + placeholder="璇疯緭鍏ユ悳绱㈡潯浠跺苟閫夋嫨" + v-model="queryParam.equipmentCategoryId" + /> + </a-form-item> + </a-col> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" > - <a-form-item label="璁惧鍚嶇О"> - <a-input - placeholder="璇疯緭鍏ヨ澶囧悕绉�" - v-model="queryParam.equipmentName" - ></a-input> + <a-form-item + label="宸ュ尯" + > + <j-dict-select-tag + allow-clear + placeholder="璇烽�夋嫨璧勫伐鍖�" + :triggerChange="true" + dictCode="mom_base_factory_model,name,id,del_flag!='1'" + v-model="queryParam.factoryModelId" + /> </a-form-item> </a-col> <a-col - :md="4" - :sm="8" + :xl="6" + :lg="7" + :md="8" + :sm="24" > - <a-button - type="primary" - @click="searchQuery" - icon="search" - style="margin-right: 5px" - >鏌ヨ</a-button> - <a-button - @click="searchReset" - icon="reload" - >閲嶇疆</a-button> + <a-form-item + label="鏄惁鍏抽敭璁惧" + > + <j-dict-select-tag + allow-clear + placeholder="璇烽�夋嫨鏄惁鍏抽敭璁惧" + :triggerChange="true" + dictCode="specific_equipment" + v-model="queryParam.specificEquipment" + /> + </a-form-item> </a-col> - </a-row> + </a-row> + <!-- <a-row :gutter="24"> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24"> + <a-form-item + label="宸ュ尯" + > + <j-dict-select-tag + allow-clear + placeholder="璇烽�夋嫨宸ュ尯" + :triggerChange="true" + dictCode="mom_base_area,name,id,del_flag!='1'" + v-model="queryParam.factoryModelId" + /> + </a-form-item> + </a-col> + </a-row> --> + </template> </a-form> </div> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> @@ -93,11 +164,11 @@ key="1" @click="handleAddPre(1)" ><a-icon type="smile" />鑷缓</a-menu-item> - <a-menu-item + <!-- <a-menu-item key="2" @click="handleAddPre(2)" - ><a-icon type="copy" />鍙傜収淇濅慨鏁呴殰鍗�</a-menu-item> - <a-menu-item + ><a-icon type="copy" />鍙傜収鏁呴殰鎶ヤ慨鍗�</a-menu-item> --> + <a-menu-item key="2" @click="handleAddPre(3)" ><a-icon type="copy" />鍙傜収椤圭洰鎬х淮淇�</a-menu-item> @@ -107,6 +178,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" @@ -114,6 +196,11 @@ @click="handleDispatch()" :disabled="selectionRows.length==0" >娲惧伐</a-button> + <a-button + type="primary" + icon="plus" + @click="getReports" + >棰嗗彇</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> @@ -146,118 +233,23 @@ :dataSource="dataSource" :pagination="ipagination" :loading="loading" - :rowSelection="rowSelection" @change="handleTableChange" :customRow="clickThenSelect" > - - <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" + <span slot="jell" slot-scope="text"> + <j-ellipsis :value="text" :length="8" /> + </span> + <span + slot="num" slot-scope="text, record" > - <a-popconfirm - title="纭畾涓嬪彂鍚�?" - @confirm="() => handleDistribute(record)" - > - <a v-if="record.status=='0'">涓嬪彂</a> - </a-popconfirm> - <a-divider - type="vertical" - v-if="record.status=='0'" - /> - <a-popconfirm - title="纭畾鎾ゅ洖鍚�?" - @confirm="() => handleWithdraw(record)" - > - <a v-if="record.status=='1'">鎾ゅ洖</a> - </a-popconfirm> - <a-divider - type="vertical" - v-if="record.status=='1'" - /> - <a-popconfirm - title="纭畾棰嗗彇鍚�?" - @confirm="() => handleReceive(record)" - > - <a v-if="record.status=='1'">棰嗗彇</a> - </a-popconfirm> - <a-divider - type="vertical" - v-if="record.status=='1'" - /> <a - v-if="record.status === '2' || record.status === '3' ||record.status === '4'" + v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' " + class="lot" @click="handleOrderExe(record)" - >鎵ц</a> - <a-divider - type="vertical" - v-if="record.status === '2' || record.status === '3' ||record.status === '4'" - /> - <a - @click="handleEditPre(record)" - v-if="record.status=='0'" - >缂栬緫</a> - <a-divider - type="vertical" - v-if="record.status=='0'" - /> - <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> --> + ><j-ellipsis :value="text" :length="15"/></a> + <span v-else> <j-ellipsis :value="text" :length="15"/></span> + </span> <span slot="action" slot-scope="text, record" @@ -292,10 +284,10 @@ v-if="record.status == '1' && record.dispatchMethod == '1' " @click="handleAssignOrder(record)" >娲惧伐</a> - <a + <!-- <a v-if="record.status == '2' && record.dispatchMethod != null " @click="handleAssignOrder(record)" - >鏀规淳</a> + >鏀规淳</a> --> <a-divider v-if="record.status == '1' || record.status == '2' " type="vertical" @@ -345,7 +337,7 @@ tab="鏁呴殰鎻忚堪" key="1" > - <FaultDescriptionList ref="FaultDescriptionList"/> + <FaultDescriptionList ref="FaultDescriptionList" /> </a-tab-pane> <a-tab-pane tab="缁翠慨瑕佹眰" @@ -424,15 +416,20 @@ <repair-order-excute-drawer ref="repairOrderExcuteDrawer" @ok="modalFormOk" + :repairOrderId="repairOrderFaultAnalysisMainId" :repairOrder="excuteRepairOrder" > </repair-order-excute-drawer> + <fault-report-repair + ref="FaultReportRepair" + ></fault-report-repair> </a-card> </template> <script> import { JeecgListMixin } from '@/mixins/JeecgListMixin' import RepairOrderModal from './modules/repairorder/RepairOrderModal' import { getAction } from '@/api/manage' +import JEllipsis from '@/components/jeecg/JEllipsis' import RepairOrderDetailList from './RepairOrderDetailList' import RepairOrderRiskPreventionList from './RepairOrderRiskPreventionList' import RepairOrderFaultAnalysisList from './RepairOrderFaultAnalysisList' @@ -442,13 +439,26 @@ import EquipmentDocumentList from './RepairOrderEquipmentDocumentList' import '@/assets/less/TableExpand.less' import { putAction } from '../../api/manage' -import RepairOrderAssignTask from './modules/repairorder/RepairOrderAssignTask.vue' -import RepairOrderExcuteDrawer from './modules/repairorder/repairOrderExcuteDrawer.vue' +import RepairOrderAssignTask from './modules/repairorder/RepairOrderAssignTask' +import RepairOrderExcuteDrawer from './modules/repairorder/repairOrderExcuteDrawer' import FaultDescriptionList from './FaultDescriptionList' +import FaultReportRepair from './modules/repairorder/moudles/select/FaultReportRepair.vue' +import store from '@/store' +import { + ACCESS_TOKEN, + USER_NAME, + USER_INFO, + USER_AUTH, + SYS_BUTTON_AUTH, + UI_CACHE_DB_DICT_DATA, + TENANT_ID, + CACHE_INCLUDED_ROUTES +} from '@/store/mutation-types' export default { name: "RepairOrderList", mixins: [JeecgListMixin], components: { + JEllipsis, RepairOrderDetailList, RepairOrderRiskPreventionList, RepairOrderFaultAnalysisList, @@ -459,13 +469,25 @@ RepairOrderModal, RepairOrderAssignTask, RepairOrderExcuteDrawer, - FaultDescriptionList + FaultDescriptionList, + FaultReportRepair, + store }, data() { return { description: '缁翠慨宸ュ崟绠$悊椤甸潰', // 琛ㄥご columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, { title: '鐘舵��', align: "center", @@ -474,13 +496,14 @@ { title: '鍗曟嵁鍙�', align: "center", - dataIndex: 'num' + dataIndex: 'num', + scopedSlots: { customRender: 'num' } }, - { - title: '涓氬姟绫诲瀷', - align: "center", - dataIndex: 'businessType_dictText' - }, + // { + // title: '涓氬姟绫诲瀷', + // align: "center", + // dataIndex: 'businessType_dictText' + // }, { title: '璁惧缂栫爜', align: "center", @@ -501,25 +524,28 @@ align: "center", dataIndex: 'departId_dictText' }, + // { + // title: '绱ф�ョ▼搴�', + // align: "center", + // dataIndex: 'urgency_dictText' + // }, + // { + // title: '缁翠繚鏂瑰紡', + // align: "center", + // dataIndex: 'maintenanceMethod_dictText' + // }, + // { + // title: '澶栧鍗曚綅', + // align: "center", + // dataIndex: 'outsourcingUnitName' + // }, { - title: '绱ф�ョ▼搴�', + title: '缁翠慨鐝粍', align: "center", - dataIndex: 'urgency_dictText' - }, - { - title: '缁翠繚鏂瑰紡', - align: "center", - dataIndex: 'maintenanceMethod_dictText' - }, - { - title: '濮斿鍗曚綅', - align: "center", - dataIndex: 'outsourcingUnitName' - }, - { - title: '璐d换鐝粍', - align: "center", - dataIndex: 'teamId_dictText' + dataIndex: 'teamId_dictText', + scopedSlots: { + customRender: 'jell' + } }, { title: '璐d换浜�', @@ -539,7 +565,30 @@ { title: '鏁呴殰鎻忚堪', align: "center", - dataIndex: 'faultDescription' + dataIndex: 'faultDescription', + scopedSlots: { + customRender: 'jell' + } + }, + { + title: '鏁呴殰鍘熷洜', + align: "center", + dataIndex: 'faultReason' + }, + { + title: '鏁呴殰鐜拌薄', + align: "center", + dataIndex: 'faultPhenomenon' + }, + { + title: '鏁呴殰鎺掗櫎', + align: "center", + dataIndex: 'faultRemove' + }, + { + title: '棰勯槻鎺柦', + align: "center", + dataIndex: 'preventiveMeasure' }, // { // title: '鏁呴殰鏃堕棿', @@ -557,11 +606,11 @@ // align: "center", // dataIndex: 'isStop_dictText' // }, - { - title: '宸ユ椂瀹氶', - align: "center", - dataIndex: 'workingHourQuota' - }, + // { + // title: '宸ユ椂瀹氶', + // align: "center", + // dataIndex: 'workingHourQuota' + // }, { title: '瀹為檯宸ユ椂', align: "center", @@ -618,8 +667,6 @@ orderReceive: "eam/repairOrder/receive", orderStart: "eam/repairOrder/start" }, - dictOptions: { - }, /* 鍒嗛〉鍙傛暟 */ ipagination: { current: 1, @@ -647,9 +694,6 @@ sonsAddStatus: false, } }, - // created() { - // this.getSuperFieldList(); - // }, computed: { importExcelUrl: function () { return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; @@ -742,6 +786,7 @@ } this.onClearSelected() this.queryParam.repairOrderType = 0; + this.queryParam.userId = store.getters.userInfo.id var params = this.getQueryParams();//鏌ヨ鏉′欢 this.loading = true; getAction(this.url.list, params).then((res) => { @@ -754,24 +799,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 +812,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); @@ -856,6 +887,10 @@ this.onClearSelected() this.$refs.FaultDescriptionList.faultId = '-1' }, + getReports(){ + this.$refs.FaultReportRepair.title = '鏁呴殰鎶ヤ慨鍗�'; + this.$refs.FaultReportRepair.visible = true; + } }, } -- Gitblit v1.9.3