| | |
| | | </a-upload> |
| | | <a-button :disabled="selectedRowKeys.length==0" @click="handleUpdateABC" type="primary" icon="font-colors" v-has="'equipmentAccount:add&delete&import&Edit'">ABCæ è¯åæ´</a-button> |
| | | <a-button :disabled="selectedRowKeys.length==0" @click="handleUpdateWarranty" type="primary" icon="calendar" v-has="'equipmentAccount:add&delete&import&Edit'">è´¨ä¿æåæ´</a-button> |
| | | <a-button @click="handleUpdateKeyEquipment" type="primary" icon="calendar" v-has="'equipmentAccount:add&delete&import&Edit'">设置å
³é®è®¾å¤æ è¯</a-button> |
| | | </div> |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | |
| | | <aBC-update-edit-model @ok="modalFormOk" :updateList="selectionRows" ref="updateABC"></aBC-update-edit-model> |
| | | <warranty-update-model :updateList="selectionRows" ref="updateWarranty"></warranty-update-model> |
| | | <EquipmentSparePartsModal ref="modalFormSpareParts" @ok="modalFormOk" /> |
| | | <key-equipment-update-model @ok="modalFormOk" :updateList="selectionRows" ref="keyEquipmentUpdate"></key-equipment-update-model> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import EquipmentUpdateABCList from './modules/equipmentNew/EquipmentUpdateABCList' |
| | | import EquipmentUpdateWarrantyList from './modules/equipmentNew/EquipmentUpdateWarrantyList.vue' |
| | | import ABCUpdateEditModel from './modules/equipmentNew/edit/ABCUpdateEditModel' |
| | | import WarrantyUpdateModel from './modules/equipmentNew/edit/WarrantyUpdateModel.vue' |
| | | import WarrantyUpdateModel from './modules/equipmentNew/edit/WarrantyUpdateModel' |
| | | import EquipmentSpareParts from './modules/equipmentNew/EquipmentSpareParts' |
| | | import EquipmentSparePartsModal from './modules/equipmentNew/EquipmentSparePartsModal' |
| | | import StandardOfInspection from './modules/equipmentNew/StandardOfInspection.vue' |
| | |
| | | import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue' |
| | | import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue' |
| | | import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue' |
| | | import KeyEquipmentUpdateModel from './modules/equipmentNew/edit/KeyEquipmentUpdateModel.vue' |
| | | |
| | | export default { |
| | | name: "EquipmentList", |
| | | mixins:[JeecgListMixin,mixinDevice], |
| | |
| | | DailyMaintenanceList, |
| | | SecondMaintenanceList, |
| | | ThirdMaintenanceList, |
| | | KeyEquipmentUpdateModel, |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | }, |
| | | handleEditSpareParts(record){ |
| | | this.$refs.modalFormSpareParts.edit(record); |
| | | } |
| | | |
| | | }, |
| | | handleUpdateKeyEquipment(){ |
| | | this.$refs.keyEquipmentUpdate.add(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | > |
| | | <a-form-item label="ç»ä¸ç¼å·ç¾¤"> |
| | | <a-textarea |
| | | placeholder="请è¾å
¥ææç»ä¸ç¼ç ,é¡»ç¨ç©ºæ ¼éå¼,å¦åå¯è½æ¥è¯¢åºé误信æ¯" |
| | | placeholder="请è¾å
¥ææç»ä¸ç¼ç ,é¡»ç¨æ¢è¡éå¼,å¦åå¯è½æ¥è¯¢åºé误信æ¯" |
| | | v-model="queryParam.nums" |
| | | :auto-size="{ minRows: 2, maxRows:2 }" |
| | | ></a-textarea> |
| | |
| | | icon="plus" |
| | | v-has="'report:add&edit'" |
| | | >æ°å¢</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('æ
éæ¥ä¿®')">导åº</a-button> |
| | | </div> |
| | | |
| | | <div> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--æ¯æå
¨å±ç¼©æ¾--> |
| | | <a-modal |
| | | :visible="visible" |
| | | :title="title" |
| | | switchFullscreen |
| | | @ok="handleSubmit" |
| | | @cancel="close" |
| | | style="top:50px" |
| | | cancelText="å
³é" |
| | | :width="1400" |
| | | > |
| | | <a-card :bordered="false"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-col |
| | | :md="8" |
| | | :sm="6" |
| | | > |
| | | <a-form-item label="ç»ä¸ç¼ç "> |
| | | <a-input |
| | | placeholder="请è¾å
¥ç»ä¸ç¼ç " |
| | | v-model="queryParam.num" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="8" |
| | | :sm="6" |
| | | > |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input |
| | | placeholder="设å¤åç§°" |
| | | v-model="queryParam.name" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="8" |
| | | :sm="6" |
| | | > |
| | | <a-form-item |
| | | label="ç»ä¸ç¼å·ç¾¤" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-textarea |
| | | placeholder="请è¾å
¥ææç»ä¸ç¼ç ,é¡»ç¨æ¢è¡éå¼,å¦åå¯è½æ¥è¯¢åºé误信æ¯" |
| | | v-model="queryParam.nums" |
| | | :auto-size="{ minRows: 2, maxRows:2 }" |
| | | ></a-textarea> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="3"> |
| | | <span |
| | | style="float: left;overflow: hidden;" |
| | | class="table-page-search-submitButtons" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left: 10px" |
| | | >éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <a-table |
| | | ref="table" |
| | | :scroll="scrollTrigger" |
| | | size="middle" |
| | | rowKey="id" |
| | | bordered |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :rowSelection="rowSelection" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | <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> |
| | | </a-table> |
| | | </a-card> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { filterObj } from '@/utils/util' |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | export default { |
| | | name: 'EquipmentSelectModel', |
| | | mixins: [JeecgListMixin], |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | queryParam: {}, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: 'id', |
| | | key: 'rowIndex', |
| | | width: 50, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'ç»ä¸ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'num', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | dataIndex: 'name', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | | align: 'center', |
| | | dataIndex: 'model', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: '设å¤è§æ ¼', |
| | | align: 'center', |
| | | dataIndex: 'specification', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'ABCæ è¯', |
| | | align: "center", |
| | | dataIndex: 'equipmentImportanceId', |
| | | width:100 |
| | | }, |
| | | { |
| | | title: 'å
³é®è®¾å¤æ è¯', |
| | | align: "center", |
| | | dataIndex: 'specificEquipment_dictText', |
| | | width:100 |
| | | }, |
| | | { |
| | | title: '设å¤ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'equipmentStatus_dictText', |
| | | width:100 |
| | | }, |
| | | { |
| | | title: 'ææ¯ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'technologyStatus_dictText', |
| | | width:100 |
| | | }, |
| | | ], |
| | | selectedRowKeys: [], |
| | | oldSelectRows: [], |
| | | scrollTrigger: {}, |
| | | dataSource: [], |
| | | selectionRows: [], |
| | | title: 'éæ©è®¾å¤', |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['5', '10', '30', '50', '100'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | isorter: { |
| | | column: 'num', |
| | | order: 'desc' |
| | | }, |
| | | visible: false, |
| | | loading: false, |
| | | url: { |
| | | list: '/eam/equipment/getEquipmentList' |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | rowSelection() { |
| | | return { |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.onSelectChange(selectedRows) |
| | | }, |
| | | getCheckboxProps: record => ({ |
| | | props: { |
| | | disabled: record.distable |
| | | } |
| | | }), |
| | | selectedRowKeys: this.selectedRowKeys |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | async loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | let that = this |
| | | this.loading = true |
| | | this.queryParam.equipmentImportanceId = 'A'; |
| | | let params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | // params.equipmentStatus = '1' |
| | | await getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | for (let i = 0; i < res.result.records.length; i++) { |
| | | if (that.oldSelectRows.indexOf(res.result.records[i].id) > -1) { |
| | | res.result.records[i].distable = true |
| | | } else { |
| | | res.result.records[i].distable = false |
| | | } |
| | | } |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | showModals(oldSelectRows) { |
| | | this.oldSelectRows = oldSelectRows |
| | | this.visible = true |
| | | this.loadData(1) |
| | | }, |
| | | getQueryParams() { |
| | | let param = Object.assign({}, this.queryParam, this.isorter) |
| | | param.field = this.getQueryField() |
| | | param.pageNo = this.ipagination.current |
| | | param.pageSize = this.ipagination.pageSize |
| | | return filterObj(param) |
| | | }, |
| | | //æ¥è¯¢æ¡ä»¶å¤ç |
| | | getQueryField() { |
| | | let str = 'id,' |
| | | for (let a = 0; a < this.columns.length; a++) { |
| | | str += ',' + this.columns[a].dataIndex |
| | | } |
| | | return str |
| | | }, |
| | | searchReset(num) { |
| | | let that = this |
| | | this.queryParam = [] |
| | | if (num !== 0) { |
| | | that.loadData(1) |
| | | } |
| | | that.selectborrowIds = [] |
| | | }, |
| | | close() { |
| | | this.searchReset(0) |
| | | this.selectedRowKeys = [] |
| | | this.visible = false |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //TODO çé |
| | | |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc' |
| | | } |
| | | this.ipagination = pagination |
| | | this.loadData() |
| | | }, |
| | | handleSubmit() { |
| | | this.$emit('selectionRows', this.selectionRows) |
| | | this.searchReset(0) |
| | | this.close() |
| | | }, |
| | | onSelectChange(selectionRows) { |
| | | this.selectionRows = selectionRows |
| | | }, |
| | | searchQuery() { |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | #components-layout-demo-custom-trigger .trigger { |
| | | font-size: 18px; |
| | | line-height: 64px; |
| | | padding: 0 24px; |
| | | cursor: pointer; |
| | | transition: color 0.3s; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="'è´¨ä¿æåæ´'" |
| | | :width="1515" |
| | | :height="600" |
| | | :visible="visible" |
| | | :maskClosable="true" |
| | | :fullscreen="true" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handleCancel"> |
| | | <key-equipment-update-table |
| | | ref="realForm" |
| | | @ok="submitCallback" |
| | | :disabled="disableSubmit"/> |
| | | </j-modal> |
| | | </template> |
| | | <script> |
| | | import KeyEquipmentUpdateTable from './KeyEquipmentUpdateTable.vue' |
| | | |
| | | export default { |
| | | name: 'KeyEquipmentUpdateModel', |
| | | components: { |
| | | KeyEquipmentUpdateTable |
| | | }, |
| | | props:{ |
| | | }, |
| | | data() { |
| | | return { |
| | | title:'', |
| | | width:1500, |
| | | visible: false, |
| | | disableSubmit: false |
| | | } |
| | | }, |
| | | methods:{ |
| | | add () { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.addBefore(); |
| | | }) |
| | | }, |
| | | edit (record) { |
| | | this.visible=true |
| | | this.$nextTick(()=>{ |
| | | this.$refs.realForm.edit(record); |
| | | }) |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.$refs.realForm.warrantyUpdateTable.dataSource=[]; |
| | | |
| | | }, |
| | | handleOk () { |
| | | this.$refs.realForm.handleOk(); |
| | | }, |
| | | submitCallback(){ |
| | | this.$emit('ok'); |
| | | this.$bus.$emit('loadData') |
| | | this.visible = false; |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <j-form-container :disabled="formDisabled"> |
| | | <!-- 主表ååºå --> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | </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="keyEquipmentUpdateList.loading" |
| | | :columns="keyEquipmentUpdateList.columns" |
| | | :dataSource="keyEquipmentUpdateList.dataSource" |
| | | :maxHeight="1000" |
| | | :disabled="formDisabled" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :toolbar="true" |
| | | :alwaysEdit="true" |
| | | :toolbarConfig="toolbarConfig" |
| | | > |
| | | <template slot="toolbarPrefix"> |
| | | <a-button type="primary" @click="selectEquipmentList" :disabled="formDisabled">éæ©è®¾å¤ |
| | | </a-button> |
| | | </template> |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <equipment-select-model ref="EquipmentSelectModal" @selectionRows="addSelectedEquipments"></equipment-select-model> |
| | | </a-spin> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { getAction } from '@/api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { duplicateCheck } from '@/api/api' |
| | | import { JVXETypes } from '@/components/jeecg/JVxeTable' |
| | | import { getRefPromise,VALIDATE_FAILED} from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | import JFormContainer from '@/components/jeecg/JFormContainer' |
| | | import dayjs from 'dayjs' |
| | | import EquipmentSelectModel from './EquipmentSelectModel' |
| | | export default { |
| | | name: 'KeyEquipmentUpdateTable', |
| | | mixins: [JVxeTableModelMixin], |
| | | components: { |
| | | JFormContainer, |
| | | dayjs, |
| | | EquipmentSelectModel |
| | | }, |
| | | data() { |
| | | return { |
| | | toolbarConfig: { |
| | | // prefix åç¼ï¼suffix åç¼ |
| | | slot: ['prefix', 'suffix'], |
| | | // add æ°å¢æé®ï¼remove å 餿é®ï¼clearSelection æ¸
ç©ºéæ©æé® |
| | | btn: ['remove', 'clearSelection'] |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | model:{ |
| | | }, |
| | | // æ°å¢æ¶å表é»è®¤æ·»å å è¡ç©ºæ°æ® |
| | | addDefaultRowNum: 0, |
| | | validatorRules: { |
| | | }, |
| | | refKeys: ['keyEquipmentUpdateTable', ], |
| | | tableKeys:['keyEquipmentUpdateTable', ], |
| | | activeKey: 'keyEquipmentUpdateTable', |
| | | keyEquipmentUpdateList: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: 'id', |
| | | key: 'id', |
| | | type: JVXETypes.hidden, |
| | | disabled:true, |
| | | align:'center', |
| | | }, |
| | | { |
| | | title: 'ç»ä¸ç¼ç ', |
| | | key: 'num', |
| | | type: JVXETypes.normal, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | disabled:true, |
| | | align:'center', |
| | | defaultValue:'', |
| | | |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | key: 'name', |
| | | type: JVXETypes.normal, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | disabled:true, |
| | | align:'center', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | | key: 'model', |
| | | type: JVXETypes.normal, |
| | | width:"200px", |
| | | placeholder: '请è¾å
¥${title}', |
| | | disabled:true, |
| | | align:'center', |
| | | defaultValue:'', |
| | | }, |
| | | { |
| | | title: 'å
³é®è®¾å¤æ è¯ï¼æ§ï¼', |
| | | key: 'oldSpecificEquipment', |
| | | type: JVXETypes.select, |
| | | width:"200px", |
| | | placeholder: 'æ æ§æ è¯', |
| | | align:'center', |
| | | disabled:true, |
| | | dictCode:'specific_equipment', |
| | | options:[], |
| | | }, |
| | | { |
| | | title: 'å
³é®è®¾å¤æ è¯ï¼æ°ï¼', |
| | | key: 'specificEquipment', |
| | | type: JVXETypes.select, |
| | | width:"200px", |
| | | dictCode:'specific_equipment', |
| | | options:[], |
| | | placeholder: '请è¾å
¥æ°æ è¯', |
| | | align:'center', |
| | | defaultValue:365, |
| | | validateRules: [ |
| | | { |
| | | required: true, // å¿
å¡« |
| | | message: '请è¾å
¥${title}' // æ¾ç¤ºçææ¬ |
| | | }, |
| | | { handler({ cellValue, row, column }, callback, target) { |
| | | if (cellValue==row.oldSpecificEquipment) { |
| | | callback(false, '${title}ä¸è½ä¸æ§æ°æ®é·å') // false = æªéè¿ï¼å¯ä»¥è·èªå®ä¹æç¤º |
| | | } else { |
| | | callback(true) // true = éè¿éªè¯ |
| | | } |
| | | }, |
| | | message: '${title}é»è®¤æç¤º' |
| | | }, |
| | | ] |
| | | }, |
| | | ] |
| | | }, |
| | | url: { |
| | | // add: "/tooling/toolingMakeAccountMain/add", |
| | | add: "/eam/equipment/updateKeyEquipment", |
| | | // queryById: "/tooling/toolingMakeAccountMain/queryById", |
| | | keyEquipmentUpdateList: { |
| | | list: '/eam/equipment/list' |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | props: { |
| | | //表åç¦ç¨ |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | }, |
| | | }, |
| | | computed: { |
| | | formDisabled(){ |
| | | return this.disabled |
| | | }, |
| | | }, |
| | | created () { |
| | | }, |
| | | methods: { |
| | | addBefore(){ |
| | | this.keyEquipmentUpdateList.dataSource=[] |
| | | }, |
| | | getAllTable() { |
| | | let values = this.tableKeys.map(key => getRefPromise(this, key)) |
| | | return Promise.all(values) |
| | | }, |
| | | /** è°ç¨å®edit()æ¹æ³ä¹åä¼èªå¨è°ç¨æ¤æ¹æ³ */ |
| | | editAfter() { |
| | | this.$nextTick(() => { |
| | | }) |
| | | // å è½½åè¡¨æ°æ® |
| | | if (this.model.id) { |
| | | let params = { equipmentId: this.model.id } |
| | | this.requestSubTableData(this.url.keyEquipmentUpdateList.list, params, this.keyEquipmentUpdateList) |
| | | } |
| | | }, |
| | | //æ ¡éªææä¸å¯¹ä¸å表表å |
| | | validateSubForm(allValues){ |
| | | return new Promise((resolve,reject)=>{ |
| | | Promise.all([ |
| | | ]).then(() => { |
| | | resolve(allValues) |
| | | }).catch(e => { |
| | | if (e.error === VALIDATE_FAILED) { |
| | | // å¦æææªéè¿è¡¨åéªè¯çå表ï¼å°±èªå¨è·³è½¬å°å®æå¨çtab |
| | | this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index] |
| | | } else { |
| | | console.error(e) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | /** æ´çæformData */ |
| | | classifyIntoFormData(allValues) { |
| | | let main = Object.assign(this.model, allValues.formValue) |
| | | return { |
| | | ...main, // å±å¼ |
| | | keyEquipmentUpdateList: allValues.tablesValue[0].tableData, |
| | | } |
| | | }, |
| | | validateError(msg){ |
| | | this.$message.error(msg) |
| | | }, |
| | | changeDate(target){ |
| | | console.log(target) |
| | | if(target.columnIndex==7){ |
| | | target.row.nextCheckDate=dayjs().add(target.value,'day').format('YYYY-MM-DD') |
| | | } |
| | | }, |
| | | //éæ©è®¾å¤ |
| | | selectEquipmentList() { |
| | | let ids = [] |
| | | let tableData = this.$refs.keyEquipmentUpdateTable.getTableData() |
| | | for (let i = 0; i < tableData.length; i++) { |
| | | ids.push(tableData[i].equipmentId) |
| | | } |
| | | this.$refs.EquipmentSelectModal.showModals(ids) |
| | | this.$refs.EquipmentSelectModal.title = 'éæ©è®¾å¤' |
| | | this.$refs.EquipmentSelectModal.disableSubmit = false |
| | | }, |
| | | addSelectedEquipments(data) { |
| | | let tableData = this.$refs.keyEquipmentUpdateTable.getTableData() |
| | | // const seletedEquipmentIds = tableData. |
| | | var tableStr = JSON.stringify(tableData) |
| | | const addRows = [] |
| | | for (let i = 0; i < data.length; i++) { |
| | | var equipment = {} |
| | | if (tableStr.indexOf(data[i].id)==-1) { |
| | | equipment = { |
| | | id:data[i].id, |
| | | equipmentId: data[i].id, |
| | | num: data[i].num, |
| | | name: data[i].name, |
| | | model:data[i].model, |
| | | oldSpecificEquipment:data[i].specificEquipment, |
| | | } |
| | | } |
| | | addRows.push(equipment) |
| | | } |
| | | this.$refs.keyEquipmentUpdateTable.pushRows(addRows) |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
| | |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="å
³é®è®¾å¤?" |
| | | label="å
³é®è®¾å¤" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | |
| | | //å¼å·¥ |
| | | handleStart() { |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: '维修工åå¼å·¥', |
| | | content: 'æç¤ºï¼å¼å·¥åæ æ³æ¤åï¼è¯·è°¨æ
æä½ï¼', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | that.confirmLoading = true; |
| | | putAction(that.url.orderStart, that.repairOrder).then(res => { |
| | | if (res.result) { |
| | | that.$message.success('å¼å·¥æå'); |
| | |
| | | }, |
| | | handleReport() { |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: 'ç»´ä¿®å·¥åæ¥å·¥', |
| | | content: 'æç¤ºï¼æ¥å·¥åç»´ä¿®å®å·¥ï¼è¯·è°¨æ
æä½ï¼', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | that.confirmLoading = true; |
| | | putAction(that.url.orderReport, that.repairOrder).then(res => { |
| | | if (res.result) { |
| | | that.$message.success('æ¥å·¥æå'); |
| | |
| | | //æ¤é |
| | | handleRevoke() { |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: 'å®å·¥æ¤é', |
| | | content: 'æç¤ºï¼å®å·¥æ¤éåå¯ç»§ç»æ¥å·¥æä½ï¼', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | that.confirmLoading = true; |
| | | putAction(that.url.orderRevoke, that.repairOrder).then(res => { |
| | | if (res.result) { |
| | | that.$message.success('æ¤éæå'); |
| | |
| | | }, |
| | | handleSpare(){ |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: 'çéè´ä»¶', |
| | | content: 'æç¤ºï¼è¯¥æä½ä¸å¯æ¤éï¼ç¡®è®¤å¼å§çéè´ä»¶?', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | that.confirmLoading = true; |
| | | putAction(that.url.handleSpare, that.repairOrder).then(res => { |
| | | if (res.result) { |
| | | that.$message.success('æä½æå'); |
| | |
| | | }, |
| | | handleSpareStop(){ |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: '忢çéè´ä»¶', |
| | | content: 'æç¤ºï¼è¯¥æä½ä¸å¯æ¤éï¼ç¡®è®¤åæ¢çéè´ä»¶?', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | that.confirmLoading = true; |
| | | putAction(that.url.handleSpareStop, that.repairOrder).then(res => { |
| | | if (res.result) { |
| | | that.$message.success('æä½æå'); |
| | |
| | | }, |
| | | handlePart(){ |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: 'çéè´ä»¶', |
| | | content: 'æç¤ºï¼è¯¥æä½ä¸å¯æ¤éï¼ç¡®è®¤çéè´ä»¶?', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | that.confirmLoading = true; |
| | | putAction(that.url.handlePart, that.repairOrder).then(res => { |
| | | if (res.result) { |
| | | that.$message.success('æä½æå'); |
| | |
| | | }, |
| | | handlePartStop(){ |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: '忢çéè´ä»¶', |
| | | content: 'æç¤ºï¼è¯¥æä½ä¸å¯æ¤éï¼ç¡®è®¤åæ¢çéè´ä»¶?', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | that.confirmLoading = true; |
| | | putAction(that.url.handlePartStop, that.repairOrder).then(res => { |
| | | if (res.result) { |
| | | that.$message.success('æä½æå'); |