From 59eb5746394c73b4eb7396fe695d0cdb1f0c071e Mon Sep 17 00:00:00 2001 From: “linengliang” <vanSuperEnergy@163.com> Date: 星期三, 25 十月 2023 17:04:27 +0800 Subject: [PATCH] 已经处理的问题 --- src/views/system/UserList.vue | 8 src/views/system/modules/UserModal.vue | 12 src/views/eam/RepairOrderList.vue | 229 +++++++++------- src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue | 371 +++++++++++++------------- src/views/eam/modules/repairorder/moudles/select/FaultReportRepair.vue | 136 ++++++-- src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue | 32 +- src/views/eam/MalfunctionRepair.vue | 48 --- 7 files changed, 447 insertions(+), 389 deletions(-) diff --git a/src/views/eam/MalfunctionRepair.vue b/src/views/eam/MalfunctionRepair.vue index ea0a7f5..5227684 100644 --- a/src/views/eam/MalfunctionRepair.vue +++ b/src/views/eam/MalfunctionRepair.vue @@ -79,52 +79,6 @@ @change="handleTableChange" :customRow="clickThenSelect" > - <!-- :rowSelection="rowSelection" --> - <!-- :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" --> - - <!-- <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" @@ -206,7 +160,7 @@ class="table-operator" style="margin-top: 0px" > - <FaultDescriptionList ref="FaultDescriptionList" /> + <FaultDescriptionList ref="FaultDescriptionList" @ok="modalFormOk"/> </div> </a-tab-pane> diff --git a/src/views/eam/RepairOrderList.vue b/src/views/eam/RepairOrderList.vue index 79a36cc..3cae629 100644 --- a/src/views/eam/RepairOrderList.vue +++ b/src/views/eam/RepairOrderList.vue @@ -82,7 +82,77 @@ ></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="杞﹂棿" + > + <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 + :xl="6" + :lg="7" + :md="8" + :sm="24" + > + <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 :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> @@ -94,10 +164,10 @@ 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-icon type="copy" />鍙傜収鏁呴殰鎶ヤ慨鍗�</a-menu-item> --> <a-menu-item key="2" @click="handleAddPre(3)" @@ -126,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> @@ -161,14 +236,13 @@ @change="handleTableChange" :customRow="clickThenSelect" > - <!-- :rowSelection="rowSelection" --> - + <span slot="jell" slot-scope="text"> + <j-ellipsis :value="text" :length="8" /> + </span> <span slot="num" slot-scope="text, record" > - - <a v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' " class="lot" @@ -176,71 +250,6 @@ ><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" - > - <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'" - @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> --> <span slot="action" slot-scope="text, record" @@ -275,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" @@ -407,9 +416,13 @@ <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> @@ -429,6 +442,7 @@ import RepairOrderAssignTask from './modules/repairorder/RepairOrderAssignTask.vue' import RepairOrderExcuteDrawer from './modules/repairorder/repairOrderExcuteDrawer.vue' import FaultDescriptionList from './FaultDescriptionList' +import FaultReportRepair from './modules/repairorder/moudles/select/FaultReportRepair.vue' export default { name: "RepairOrderList", mixins: [JeecgListMixin], @@ -444,7 +458,8 @@ RepairOrderModal, RepairOrderAssignTask, RepairOrderExcuteDrawer, - FaultDescriptionList + FaultDescriptionList, + FaultReportRepair }, data() { return { @@ -472,11 +487,11 @@ dataIndex: 'num', scopedSlots: { customRender: 'num' } }, - { - title: '涓氬姟绫诲瀷', - align: "center", - dataIndex: 'businessType_dictText' - }, + // { + // title: '涓氬姟绫诲瀷', + // align: "center", + // dataIndex: 'businessType_dictText' + // }, { title: '璁惧缂栫爜', align: "center", @@ -497,25 +512,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换浜�', @@ -535,7 +553,10 @@ { title: '鏁呴殰鎻忚堪', align: "center", - dataIndex: 'faultDescription' + dataIndex: 'faultDescription', + scopedSlots: { + customRender: 'jell' + } }, { title: '鏁呴殰鍘熷洜', @@ -573,11 +594,11 @@ // align: "center", // dataIndex: 'isStop_dictText' // }, - { - title: '宸ユ椂瀹氶', - align: "center", - dataIndex: 'workingHourQuota' - }, + // { + // title: '宸ユ椂瀹氶', + // align: "center", + // dataIndex: 'workingHourQuota' + // }, { title: '瀹為檯宸ユ椂', align: "center", @@ -853,6 +874,10 @@ this.onClearSelected() this.$refs.FaultDescriptionList.faultId = '-1' }, + getReports(){ + this.$refs.FaultReportRepair.title = '鏁呴殰鎶ヤ慨鍗�'; + this.$refs.FaultReportRepair.visible = true; + } }, } diff --git a/src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue b/src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue index 45604a6..0032a54 100644 --- a/src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue +++ b/src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue @@ -1,217 +1,218 @@ <template> <a-card - :bordered='false' - :class="'cust-erp-sub-tab'" + :bordered=true > - <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper"> + <a-spin :spinning='confirmLoading'> <a-form - layout="inline" - @keyup.enter.native="searchQuery" - > - <a-row :gutter="24"> + :form="form" + > + <a-row> + <a-col + :span='12' + > + <a-form-item + label='鏁呴殰绫诲瀷' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + > + <j-dict-select-tag + allow-clear + placeholder='璇烽�夋嫨鏁呴殰绫诲瀷' + :triggerChange='true' + :disabled="isEdit" + dictCode="mom_eam_fault_type,name,id,del_flag!='1'" + v-decorator="['faultTypeId', validatorRules.faultTypeId ]" + /> + </a-form-item> + </a-col> + <a-col :span='12'> + <a-form-item + label='鏁呴殰鍒嗘瀽' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + > + <a-textarea + placeholder='璇疯緭鍏ユ晠闅滃垎鏋�' + v-decorator="['faultCause', validatorRules.faultCause]" + :disabled="isEdit" + ></a-textarea> + </a-form-item> + </a-col> </a-row> - </a-form> - </div> - <!-- 鏌ヨ鍖哄煙-END --> - - <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <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-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' - > - <!-- :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' --> - - <span - slot='action' - slot-scope='text, record' - > - <!-- <a @click='handleEdit(record)'>缂栬緫</a> - <a-divider type='vertical' /> --> - <a-popconfirm - title='纭畾鍒犻櫎鍚�?' - @confirm='() => handleDelete(record.id)' - > - <a :disabled="mainId.status=='4'">鍒犻櫎</a> - </a-popconfirm> - </span> - - </a-table> + <a-row> + <a-col :span='12'> + <a-form-item + label='缁翠慨鎺柦' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + > + <a-textarea + placeholder='璇疯緭鍏ョ淮淇帾鏂�' + v-decorator="['maintenanceMeasures', validatorRules.maintenanceMeasures]" + :disabled="isEdit" + ></a-textarea> + </a-form-item> + </a-col> + <a-col :span='12'> + <a-form-item + label='缁翠繚鎰忚' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + > + <a-textarea + v-decorator="['suggestion', validatorRules.suggestion]" + placeholder='璇疯緭鍏ョ淮淇濇剰瑙�' + :disabled="isEdit" + ></a-textarea> + </a-form-item> + </a-col> + </a-row> <a-button - style="width: 100%; margin-top: 16px; margin-bottom: 8px" - type="dashed" - icon="plus" - @click="handleAdd" - :disabled="mainId.status=='4' ||mainId.status=='2'" - >娣诲姞鏁呴殰鍒嗘瀽 + :style="{marginRight: '8px'}" + @click='handleEdit2()' + > + 缂栬緫 </a-button> - </div> - <repair-order-fault-analysis-report-model - ref='modalForm' - @ok='modalFormOk' - ></repair-order-fault-analysis-report-model> + + <a-button + @click='handleOk()' + type='primary' + :loading='confirmLoading' + >淇濆瓨 + </a-button> + </a-form> + </a-spin> </a-card> - </template> - <script> - -import { JeecgListMixin } from '@/mixins/JeecgListMixin' - - -import RepairOrderFaultAnalysisReportModel from './RepairOrderFaultAnalysisReportModel.vue' - +import pick from 'lodash.pick' +import { postAction, requestPut } from '@/api/manage' +import { duplicateCheck } from '@/api/api' +import { getAction } from '../../../../../api/manage' export default { name: 'RepairOrderFaultAnalysisList', - mixins: [JeecgListMixin], - components: { RepairOrderFaultAnalysisReportModel }, + components: { }, props: { - mainId: { - type: Object, + repairOrderId: { + type: String, + default:'', } }, - watch: { - mainId: { - immediate: true, - handler(val) { - console.log(val) - if (!this.mainId.id) { - - this.clearList() - } else { - - this.queryParam['repairOrderId'] = val.id - this.loadData(1) + watch:{ + repairOrderId:{ + immediate: true, + handler(val) { + this.form.resetFields(); + if(!this.repairOrderId){ + this.isEdit = false; + }else{ + this.loadData(val); + } } } - } }, - 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: 'faultCauseName', - align: 'center', - width: 150, - ellipsis: true, - }, - { - title: '鏁呴殰绫诲瀷', - dataIndex: 'faultTypeName', - align: 'center', - width: 150, - ellipsis: true, - }, - { - title: '鏁呴殰鍒嗘瀽', - dataIndex: 'faultCause', - align: 'center', - width: 150, - ellipsis: true, - }, - { - title: '缁翠慨鎺柦', - dataIndex: 'maintenanceMeasures', - align: 'center', - width: 150, - ellipsis: true, - }, - { - title: '缁翠繚鏀硅繘鎰忚', - dataIndex: 'suggestion', - align: 'center', - width: 150, - ellipsis: true, - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align: 'center', - width: 147, - scopedSlots: { customRender: 'action' } - } - ], + confirmLoading:false, + model:{}, + form: this.$form.createForm(this), url: { - list: '/eam/repairOrder/listRepairOrderFaultAnalysisByMainId', - delete: '/eam/repairOrder/deleteRepairOrderFaultAnalysis', - deleteBatch: '/eam/repairOrder/deleteBatchRepairOrderFaultAnalysis', - exportXlsUrl: '/eam/repairOrder/exportRepairOrderFaultAnalysis', - importUrl: '/eam/repairOrder/importRepairOrderFaultAnalysis' + add:'/eam/repairOrderFaultAnalysis/add', + edit: '/eam/repairOrderFaultAnalysis/edit', + getInfo:'/eam/repairOrderFaultAnalysis/list', }, - dictOptions: {} - } - }, - created() { - }, - computed: { - importExcelUrl() { - return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId.id}` + dictOptions: {}, + isEdit:false, + validatorRules: { + faultCause: { + rules: [ + { required: true, message: '璇疯緭鍏ユ晠闅滃垎鏋�!' }, + { min: 2, max: 1000, message: '闀垮害鍦� 2 鍒� 1000 涓瓧绗�', trigger: 'blur' }, + ] + }, + faultCauseId: { + rules: [ + { required: true, message: '璇烽�夋嫨鏁呴殰鍘熷洜!' }, + ] + }, + faultTypeId: { + rules: [ + { required: true, message: '璇烽�夋嫨鏁呴殰绫诲瀷!' }, + ] + }, + suggestion:{ + rules: [ + { required: true, message: '璇疯緭鍏ョ淮淇濇剰瑙�!' }, + { min: 2, max: 1000, message: '闀垮害鍦� 2 鍒� 1000 涓瓧绗�', trigger: 'blur' }, + ] + }, + maintenanceMeasures:{ + rules: [ + { required: true, message: '璇疯緭鍏ョ淮淇帾鏂�!' }, + { min: 2, max: 1000, message: '闀垮害鍦� 2 鍒� 1000 涓瓧绗�', trigger: 'blur' }, + ] + }, + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + }, } }, methods: { - clearList() { - this.dataSource = [] - this.selectedRowKeys = [] - this.ipagination.current = 1 + handleOk() { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.form.validateFields((err, values) => { + if (!err) { + that.confirmLoading = true; + let formData = Object.assign(this.model, values); + let obj; + if (!this.model.id) { + formData.repairOrderId = this.repairOrderId; + obj = postAction(this.url.add, formData); + } else { + obj = requestPut(this.url.edit, formData, { id: this.model.id }); + } + obj.then((res) => { + if (res.success) { + that.$message.success(res.message); + that.$emit('ok'); + } else { + that.$message.warning(res.message); + } + }).finally(() => { + that.loadData(that.repairOrderId); + that.confirmLoading = false; + }) + } + }) }, - handleAdd: function () { - this.$refs.modalForm.add(this.mainId) - this.$refs.modalForm.title = '鏂板' - this.$refs.modalForm.disableSubmit = false + loadData(repairOrderId){ + let that = this; + getAction(that.url.getInfo,{repairOrderId:repairOrderId}).then(res=>{ + if(res.success){ + if(res.result.records.length!==0){ + that.isEdit=true; + that.form.setFieldsValue(pick(res.result.records[0], 'faultCause', 'faultTypeId', 'suggestion', 'maintenanceMeasures','id')) + that.model = Object.assign({}, res.result.records[0]); + that.isEdit=true; + }else{ + that.isEdit=false; + } + } + }) }, + handleEdit2(){ + this.isEdit=false; + } + }, - } } </script> <style scoped> diff --git a/src/views/eam/modules/repairorder/moudles/select/FaultReportRepair.vue b/src/views/eam/modules/repairorder/moudles/select/FaultReportRepair.vue index cd9a830..bb3e7d0 100644 --- a/src/views/eam/modules/repairorder/moudles/select/FaultReportRepair.vue +++ b/src/views/eam/modules/repairorder/moudles/select/FaultReportRepair.vue @@ -1,7 +1,7 @@ <template> <a-modal :title="title" - :width="1250" + :width="1600" :visible="visible" :confirmLoading="confirmLoading" :okButtonProps="{ props: {disabled: disableSubmit} }" @@ -72,12 +72,14 @@ :columns="columns" :dataSource="dataSource" :pagination="ipagination" - :loading="loading" + :loading="confirmLoading" @change="handleTableChange" :customRow="clickThenCheck" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" > - + <span slot="faultDescription" slot-scope="text"> + <j-ellipsis :value="text" :length="10" /> + </span> </a-table> </div> </a-form> @@ -94,6 +96,16 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import JEllipsis from '@/components/jeecg/JEllipsis'//寮曞叆杩囬暱瑁佸壀 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: "FaultReportRepair", @@ -102,6 +114,7 @@ JDate, Tooltip, JEllipsis, + store }, data() { return { @@ -134,29 +147,59 @@ confirmLoading: false, form: this.$form.createForm(this), columns: [ - { + { title: '#', dataIndex: '', key: 'rowIndex', - align: 'center', + width: 60, + align: "center", customRender: function (t, r, index) { - return parseInt(index) + 1 + return parseInt(index) + 1; } }, { + title: '鐘舵��', + align: "center", + dataIndex: 'statusName', + }, + { title: '鍗曟嵁鍙�', - align: 'center', - dataIndex: 'num', + align: "center", + dataIndex: 'num' + }, + { + title: '璁惧缂栫爜', + align: "center", + dataIndex: 'equipmentNum' }, { title: '璁惧鍚嶇О', - align: 'center', + align: "center", dataIndex: 'equipmentName', + }, + { + title: '璁惧鍨嬪彿', + align: "center", + dataIndex: 'equipmentModel', + }, + { + title: '瑙勬牸', + align: "center", + dataIndex: 'equipmentSpecification', + }, + { + title: '浣跨敤閮ㄩ棬', + align: "center", + dataIndex: 'departName', }, { title: '鏁呴殰鎻忚堪', align: "center", - dataIndex: 'faultDescription' + dataIndex: 'faultDescription', + scopedSlots: { + customRender: 'faultDescription' + } + }, { title: '鏁呴殰鏃堕棿', @@ -164,13 +207,32 @@ dataIndex: 'faultTime' }, { - title: '绱ф�ョ▼搴�', - align: 'center', - dataIndex: 'urgency_dictText', + title: '鏄惁鍋滄満寰呬慨', + align: "center", + dataIndex: 'isStopName', + }, + { + title: '鍒涘缓浜�', + align: "center", + dataIndex: 'createBy' + }, + { + title: '鍒涘缓鏃堕棿', + align: "center", + dataIndex: 'createTime', + }, + { + title: '澶囨敞', + align: "center", + dataIndex: 'remark', + scopedSlots: { + customRender: 'faultDescription' + } }, ], url: { - list: "/eam/equipmentReportRepair/list", + list: "/eam/equipmentReportRepair/getReportRepairList", + add: "/eam/repairOrder/addBySelectReport" }, } }, @@ -187,6 +249,8 @@ if (arg === 1) { this.ipagination.current = 1 } + this.queryParam.status = '1'; + this.queryParam.userId = store.getters.userInfo.id var params = this.getQueryParams() //鏌ヨ鏉′欢 this.loading = true params.isCreateOrder = 0 @@ -207,19 +271,12 @@ this.loading = false }) }, - searchQuery() { this.loadData(1); }, searchReset() { this.queryParam = {}; this.loadData(1) - }, - list(params) { - this.selectedRowKeys = []; - this.selectedRowRecord = []; - this.visible = true; - this.loadData(1); }, clickThenCheck(record) { return { @@ -231,9 +288,9 @@ } }; }, - onSelectChange(selectedRowKeys, selectedRows) { + onSelectChange(selectedRowKeys, selectionRows) { this.selectedRowKeys = selectedRowKeys; - this.selectedRowRecord = selectedRows[0]; + this.selectionRows = selectionRows; }, close() { this.queryParam = {}; @@ -243,18 +300,22 @@ handleOk() { const that = this; // 瑙﹀彂琛ㄥ崟楠岃瘉 - if (that.selectedRowKeys.length > 0) { - if (that.selectedRowRecord.id != null && that.selectedRowRecord.id != "") { - that.$emit('sendFaultReportRepairRecord', { record: that.selectedRowRecord }); - that.close(); - } else { - that.$message.error("璇烽�夋嫨鏁呴殰鎶ヤ慨淇℃伅锛�") - } - } else { - that.$message.error("璇烽�夋嫨鏁呴殰鎶ヤ慨淇℃伅锛�") + if (that.selectedRowKeys.length === 0) { + that.$message.error("璇烽�夋嫨鏁呴殰鎶ヤ慨鍗曞悗鎻愪氦锛�") + return false; } + postAction(this.url.add,this.selectionRows).then(res=>{ + if(res.success){ + that.$message.success("棰嗗彇鎴愬姛锛�") + that.$emit('ok'); + }else{ + that.$message.error("棰嗗彇鍑虹幇寮傚父锛�") + } + }).finally(res=>{ + that.confirmLoading = false; + that.close(); + }); }, - handleCancel() { this.close(); }, @@ -311,8 +372,7 @@ height: 90% !important; overflow-y: hidden; } - -/deep/ .notshow { + .notshow { display: none; } @@ -330,9 +390,7 @@ } .dataUnKnow { color: #1890ff; -} - -/deep/ .frozenRowClass { +} .frozenRowClass { color: #c9c9c9; } </style> \ No newline at end of file diff --git a/src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue b/src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue index 9a89f7c..b01384d 100644 --- a/src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue +++ b/src/views/eam/modules/repairorder/repairOrderExcuteDrawer.vue @@ -228,20 +228,20 @@ type="card" defaultActiveKey="1" > - <a-tab-pane - tab='瀹為檯鐢ㄦ枡' + <a-tab-pane + tab='鏁呴殰鍒嗘瀽' key="1" class="hightColor" > - <!-- <actual-material-edit-table + <!-- <fault-analysis-edit-table :repairOrderId="repairOrder.id" :repairOrderStatus="repairOrder.status" - ></actual-material-edit-table> --> - <RepairOrderActualMaterialList :mainId="repairOrder" /> + ></fault-analysis-edit-table> --> + <RepairOrderFaultAnalysisList :repairOrderId="repairOrderId" /> </a-tab-pane> <a-tab-pane tab='瀹為檯宸ユ椂' - key="2" + key="3" class="hightColor" > <RepairOrderActualWorkHoursList @@ -251,15 +251,15 @@ /> </a-tab-pane> <a-tab-pane - tab='鏁呴殰鍒嗘瀽' - key="3" + tab='瀹為檯鐢ㄦ枡' + key="2" class="hightColor" > - <!-- <fault-analysis-edit-table + <!-- <actual-material-edit-table :repairOrderId="repairOrder.id" :repairOrderStatus="repairOrder.status" - ></fault-analysis-edit-table> --> - <RepairOrderFaultAnalysisList :mainId="repairOrder" /> + ></actual-material-edit-table> --> + <RepairOrderActualMaterialList :mainId="repairOrder" /> </a-tab-pane> </a-tabs> </a-card> @@ -284,9 +284,9 @@ import Tooltip from 'ant-design-vue/es/tooltip' import ActualMaterialEditTable from './moudles/ActualMaterialEditTable.vue' import ActualWorkHoursEditTable from './moudles/ActualWorkHoursEditTable.vue' -import FaultAnalysisEditTable from './moudles/FaultAnalysisEditTable.vue' -import RepairOrderActualMaterialList from './moudles/RepairOrderActualMaterialReport.vue' -import RepairOrderActualWorkHoursList from './moudles/RepairOrderActualHoursReport.vue' +import FaultAnalysisEditTable from './moudles/FaultAnalysisEditTable' +import RepairOrderActualMaterialList from './moudles/RepairOrderActualMaterialReport' +import RepairOrderActualWorkHoursList from './moudles/RepairOrderActualHoursReport' import RepairOrderFaultAnalysisList from './moudles/RepairOrderFaultAnalysisReport.vue' export default { name: 'RepairOrderExcuteDrawer', @@ -305,6 +305,10 @@ type: Object, required: false, default: {} + }, + repairOrderId: { + type: String, + default:'', } }, data() { diff --git a/src/views/system/UserList.vue b/src/views/system/UserList.vue index 47e9d00..6e4d7d2 100644 --- a/src/views/system/UserList.vue +++ b/src/views/system/UserList.vue @@ -114,7 +114,7 @@ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> - <template slot="avatarslot" slot-scope="text, record, index"> + <template slot="avatarslot" slot-scope="text, record"> <div class="anty-img-wrap"> <a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/> </div> @@ -436,6 +436,12 @@ dataIndex: 'productionName' }, { + title: '鐝粍', + align: "center", + width: 240, + dataIndex: 'teamId_dictText' + }, + { title: '鐘舵��', align: "center", width: 80, diff --git a/src/views/system/modules/UserModal.vue b/src/views/system/modules/UserModal.vue index d46bccf..7ba6715 100644 --- a/src/views/system/modules/UserModal.vue +++ b/src/views/system/modules/UserModal.vue @@ -66,6 +66,14 @@ <a-form-model-item label="杞﹂棿鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled"> <j-select-production v-model="model.selectedProduction" :multi="true" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-production> </a-form-model-item> + <a-form-model-item label="鐝粍鍒嗛厤" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="teamId"> + <j-dict-select-tag + v-model="model.teamId" + :triggerChange="true" + dictCode="mom_base_team,name,id,del_flag = 0" + placeholder="璇风淮鎶ょ彮缁�" + ></j-dict-select-tag> + </a-form-model-item> <a-form-model-item label="璐熻矗閮ㄩ棬" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="departIdShow==true"> <j-multi-select-tag @@ -166,7 +174,9 @@ roles:{}, workNo:[ { required: true, message: '璇疯緭鍏ュ伐鍙�' }, { validator: this.validateWorkNo }], - telephone: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '璇疯緭鍏ユ纭殑搴ф満鍙风爜' },] + telephone: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '璇疯緭鍏ユ纭殑搴ф満鍙风爜' },], + teamId:[ { required: true, message: '璇风淮鎶ょ彮缁�' }] + }, departIdShow:false, title:"鎿嶄綔", -- Gitblit v1.9.3