src/views/mdc/base/modules/MdcPlanCloseManagement/MdcPlanCloseList.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/mdc/base/modules/MdcUnplannedCloseManagement/MdcUnplannedCloseList.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingForm.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingList.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingModal.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/views/mdc/base/modules/MdcPlanCloseManagement/MdcPlanCloseList.vue
@@ -17,8 +17,7 @@ </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="æ¥æ"> <a-range-picker v-model="dates" format="YYYY-MM-DD" style="width: 100%" @change="dateParamChange"></a-range-picker> <a-range-picker v-model="dates" style="width: 100%" @change="dateParamChange"></a-range-picker> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> src/views/mdc/base/modules/MdcUnplannedCloseManagement/MdcUnplannedCloseList.vue
@@ -17,8 +17,7 @@ </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="æ¥æ"> <a-range-picker v-model="dates" format="YYYY-MM-DD" style="width: 100%" @change="dateParamChange"></a-range-picker> <a-range-picker v-model="dates" style="width: 100%" @change="dateParamChange"></a-range-picker> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingForm.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,191 @@ <template> <a-spin :spinning="confirmLoading"> <j-form-container :disabled="formDisabled"> <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="equipmentIds"> <a-input-search :readOnly="true" v-model="model.equipmentIds" @search="deviceSearch" :disabled="disableSelectDevice" enter-button placeholder="è¯·éæ©è®¾å¤"></a-input-search> </a-form-model-item> </a-col> <a-col :span="24"> <a-form-model-item label="é¶ä»¶å·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partId"> <a-input placeholder="请è¾å ¥é¶ä»¶å·" v-model="model.partId" allowClear/> </a-form-model-item> </a-col> <a-col :span="24"> <a-form-model-item label="æ åå 工工æ¶(min)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardProcessLong"> <a-input-number :min="0" placeholder="请è¾å ¥æ åå 工工æ¶(min)" v-model="model.standardProcessLong" @change="inputNumberChange"/> </a-form-model-item> </a-col> <a-col :span="24"> <a-form-model-item label="å å·¥é¶ä»¶æ°é" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processCount"> <a-input-number :min="0" v-model="model.processCount" placeholder="请è¾å ¥å å·¥é¶ä»¶æ°é" @change="inputNumberChange"></a-input-number> </a-form-model-item> </a-col> <a-col :span="24"> <a-form-model-item label="åæ ¼é¶ä»¶æ°é" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="passCount"> <a-input-number :min="0" v-model="model.passCount" placeholder="请è¾å ¥åæ ¼é¶ä»¶æ°é"></a-input-number> </a-form-model-item> </a-col> <a-col :span="24"> <a-form-model-item label="å å·¥æ»æ¶é¿" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-input v-model="model.totalProcessLong" placeholder="å å·¥é¶ä»¶æ°é X æ åå 工工æ¶" readOnly></a-input> </a-form-model-item> </a-col> <a-col :span="24"> <a-form-model-item label="æ¥æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="theDate"> <a-date-picker v-model="model.theDate" :disabled="disabled" format="YYYY-MM-DD" value-format="YYYY-MM-DD" style="width: 100%"></a-date-picker> </a-form-model-item> </a-col> </a-row> </a-form-model> </j-form-container> <select-device-drawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'éæ©è®¾å¤'"/> </a-spin> </template> <script> import { httpAction, getAction } from '@/api/manage' import SelectDeviceDrawer from '@/views/system/modules/SelectDeviceDrawer' export default { name: 'PartsMatchingForm', components: { SelectDeviceDrawer }, props: { //表åç¦ç¨ disabled: { type: Boolean, default: false, required: false }, disableSelectDevice: { type: Boolean, default: false } }, data() { return { model: { passCount: 0 }, labelCol: { xs: { span: 24 }, sm: { span: 5 } }, wrapperCol: { xs: { span: 24 }, sm: { span: 16 } }, confirmLoading: false, validatorRules: { equipmentIds: [ { required: true, message: 'è¯·éæ©è®¾å¤!' } ], partId: [ { required: true, message: '请è¾å ¥é¶ä»¶å·!' } ], standardProcessLong: [ { required: true, message: '请è¾å ¥æ åå 工工æ¶(min)!' } ], processCount: [ { required: true, message: '请è¾å ¥å å·¥é¶ä»¶æ°é!' } ], passCount: [ { required: true, message: '请è¾å ¥åæ ¼é¶ä»¶æ°é!' } ], theDate: [ { required: true, message: 'è¯·éæ©æ¥æ!' } ] }, url: { add: '/mdc/mdcPartProcessInfo/add', edit: '/mdc/mdcPartProcessInfo/edit' } } }, computed: { formDisabled() { return this.disabled } }, created() { //å¤ä»½modelåå§å¼ this.modelDefault = JSON.parse(JSON.stringify(this.model)) }, methods: { add() { this.edit(this.modelDefault) }, edit(record) { this.model = Object.assign({}, { equipmentIds: record.equipmentId }, record) console.log('model', this.model) this.visible = true }, inputNumberChange() { if (this.model.standardProcessLong && this.model.processCount) { this.model.totalProcessLong = this.model.standardProcessLong * this.model.processCount } }, submitForm() { const that = this // 触å表åéªè¯ this.$refs.form.validate(valid => { if (valid) { that.confirmLoading = true let httpUrl = '' let method = 'post' if (!this.model.id) { httpUrl += this.url.add } else { httpUrl += this.url.edit } httpAction(httpUrl, this.model, method).then((res) => { if (res.success) { that.$notification.success({ message: 'æ¶æ¯', description: res.message }) that.$emit('ok') } else { that.$notification.warning({ message: 'æ¶æ¯', description: res.message }) } }).finally(() => { that.confirmLoading = false }) } }) }, deviceSearch() { this.$refs.selectDeviceDrawer.visible = true this.$refs.selectDeviceDrawer.selectedRowKeys = [] this.$refs.selectDeviceDrawer.selectedRows = [] this.$refs.selectDeviceDrawer.checkedKeys = this.model.equipmentIds ? this.model.equipmentIds.split(',') : [] }, /** * 鿩已æè®¾å¤åç¹å»ç¡®å®æ¶è§¦å * @param data 已鿩çè®¾å¤ */ selectOK(data) { this.$set(this.model, 'equipmentIds', data.join(',')) if (this.model.equipmentIds) this.$refs.form.clearValidate('equipmentIds') } } } </script> <style scoped lang="less"> /deep/ .ant-input-number { width: 100% !important; } </style> src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingList.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,322 @@ <template> <div class="device_list"> <!-- æ¥è¯¢åºå --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="设å¤ç¼å·"> <a-input placeholder="请è¾å ¥è®¾å¤ç¼å·" v-model="queryParam.equipmentId" allowClear/> </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.partId" allowClear/> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="æ¥æ"> <a-range-picker v-model="dates" style="width: 100%" @change="dateParamChange"></a-range-picker> </a-form-item> </a-col> <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> </span> </a-col> </a-row> </a-form> </div> <!-- æ¥è¯¢åºå-END --> <!-- æä½æé®åºå --> <div class="table-operator"> <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> <a-button type="primary" icon="download" @click="importTemplate('é¶ä»¶å 工管ç')">å¯¼å ¥æ¨¡æ¿</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 id="DeviceList" style="flex: 1;overflow: hidden"> <a-table id="planClose" ref="table" size="middle" :scroll="{x:'max-content',y:scrollY}" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" class="j-table-force-nowrap" @change="handleTableChange"> <span slot="action" slot-scope="text, record"> <a @click="handleEdit(record)">ç¼è¾</a> <a-divider 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> </span> </a-table> </div> <PartsMatchingModal ref="modalForm" @ok="modalFormOk"/> </div> </template> <script> import moment from 'moment' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import PartsMatchingModal from './PartsMatchingModal' export default { name: 'PartsMatchingList', mixins: [JeecgListMixin], components: { PartsMatchingModal }, props: { nodeTree: '', Type: '', nodePeople: '' }, data() { return { description: 'partsMatching管ç页é¢', /* å页忰 */ ipagination: { current: 1, pageSize: 30, pageSizeOptions: ['30', '50', '100'], showTotal: (total, range) => { return range[0] + '-' + range[1] + ' å ±' + total + 'æ¡' }, showQuickJumper: true, showSizeChanger: true, total: 0 }, queryParam: {}, disableMixinCreated: true, dates: [moment().subtract(1, 'day'), moment()], // 表头 columns: [ { title: '#', dataIndex: '', key: 'rowIndex', width: 60, align: 'center', customRender: function(t, r, index) { return parseInt(index) + 1 } }, { title: 'æ¥æ', align: 'center', dataIndex: 'theDate', width: 200 }, { title: '设å¤ç¼å·', align: 'center', dataIndex: 'equipmentId', width: 230 }, { title: 'é¶ä»¶å·', align: 'center', dataIndex: 'partId', width: 150 }, { title: 'æ åå 工工æ¶(min)', align: 'center', dataIndex: 'standardProcessLong', width: 150 }, { title: 'å å·¥é¶ä»¶æ°é', align: 'center', dataIndex: 'processCount', width: 150 }, { title: 'åæ ¼é¶ä»¶æ°é', align: 'center', dataIndex: 'passCount', width: 150 }, { title: 'å å·¥æ»æ¶é¿', align: 'center', dataIndex: 'totalProcessLong', width: 150 }, { title: 'æä½', dataIndex: 'action', align: 'center', fixed: 'right', width: 150, scopedSlots: { customRender: 'action' } } ], scrollY: 465, url: { list: '/mdc/mdcPartProcessInfo/list', delete: '/mdc/mdcPartProcessInfo/delete', deleteBatch: '/mdc/mdcPartProcessInfo/deleteBatch', exportXlsUrl: '/mdc/mdcPartProcessInfo/exportXls', importExcelUrl: '/mdc/mdcPartProcessInfo/importExcel' }, } }, watch: { Type(valmath) { this.dataList = [] this.queryParam.typeTree = valmath // console.log(this.queryParam.typeTree) }, nodeTree(val) { //çå¬currSelected ååï¼å°åååçæ°å¼ä¼ éç» getCurrSelected äºä»¶ if (JSON.stringify(val) != '{}') { if (val.equipmentId) { this.queryParam.parentId = '' this.queryParam.equipmentId = val.equipmentId } else { this.queryParam.parentId = val.key this.queryParam.equipmentId = '' } this.searchQuery() } }, nodePeople(val) { if (JSON.stringify(val) != '{}') { if (val.equipmentId) { this.queryParam.parentId = '' this.queryParam.equipmentId = val.equipmentId } else { this.queryParam.parentId = val.key this.queryParam.equipmentId = '' } this.searchQuery() } } }, computed: { importExcelUrl: function() { return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` } }, methods: { dateParamChange(v1, v2) { this.queryParam.startTime = v2[0] this.queryParam.endTime = v2[1] this.dates = [v1[0], v1[1]] }, importTemplate(fileName) { var a = document.createElement('a') a.href = `/static/${fileName}.xls` a.download = `${fileName}.xls` a.style.display = 'none' document.body.appendChild(a) a.click() a.remove() }, searchReset() { this.dates = [moment().subtract(1, 'day'), moment()] this.queryParam = { startTime: this.dates[0].format('YYYY-MM-DD'), endTime: this.dates[1].format('YYYY-MM-DD') } this.loadData(1) }, /** * 彿µè§å¨å¯è§çªå£å°ºå¯¸åçæ¹åæ¶è§¦å */ handleWindowResize() { const boxHeight = +window.getComputedStyle(document.getElementById('DeviceList')).height.slice(0, -2) const tableHeadHeight = +window.getComputedStyle(document.querySelector('.ant-table-thead th')).height.slice(0, -2) this.scrollY = boxHeight - tableHeadHeight - 50 } }, created() { this.queryParam.startTime = this.dates[0].format('YYYY-MM-DD') this.queryParam.endTime = this.dates[1].format('YYYY-MM-DD') this.loadData() }, mounted() { window.addEventListener('resize', this.handleWindowResize) this.handleWindowResize() }, beforeDestroy() { window.removeEventListener('resize', this.handleWindowResize) } } </script> <style scoped> @import '~@assets/less/common.less'; .device_list { display: flex; flex-direction: column; overflow: hidden; } @media screen and (min-width: 1920px) { .device_list { height: 811px !important; } } @media screen and (min-width: 1680px) and (max-width: 1920px) { .device_list { height: 811px !important; } } @media screen and (min-width: 1400px) and (max-width: 1680px) { .device_list { height: 663px !important; } } @media screen and (min-width: 1280px) and (max-width: 1400px) { .device_list { height: 564px !important; } } @media screen and (max-width: 1280px) { .device_list { height: 564px !important; } } </style> src/views/mdc/base/modules/PartsMatchingManagement/PartsMatchingModal.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,64 @@ <template> <j-modal :title="title" :width="width" :visible="visible" switchFullscreen @ok="handleOk" :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @cancel="handleCancel" cancelText="å ³é"> <PartsMatchingForm ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :disableSelectDevice="disableSelectDevice"/> </j-modal> </template> <script> import PartsMatchingForm from './PartsMatchingForm' export default { name: 'PartsMatchingModal', components: { PartsMatchingForm }, data() { return { title: '', width: 800, visible: false, disableSubmit: false, disableSelectDevice: false } }, methods: { add() { this.visible = true this.disableSelectDevice = false this.$nextTick(() => { this.$refs.realForm.add() }) }, edit(record) { this.visible = true this.disableSelectDevice = true this.$nextTick(() => { this.$refs.realForm.edit(record) }) }, close() { this.$emit('close') this.visible = false }, handleOk() { this.$refs.realForm.submitForm() }, submitCallback() { this.$emit('ok') this.visible = false }, handleCancel() { this.close() } } } </script>