| | |
| | | <a-form-item label="设å¤å¶é å" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请è¾å
¥è®¾å¤å¶é å" v-decorator="['equipmentManufacturer']" /> |
| | | </a-form-item> |
| | | <a-form-item label="æ¸
æ´æ¶²æ·»å æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-date-picker |
| | | style="width: 100%" |
| | | placeholder="è¯·éæ©æ¸
æ´æ¶²æ·»å æ¶é´" |
| | | v-decorator="['detergentAddtime']" |
| | | @change="onChangeDetergentAddtimeTime" |
| | | /> |
| | | </a-form-item> |
| | | <a-form-item label="æ¸
æ´æ¶²æ´æ¢æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-date-picker |
| | | style="width: 100%" |
| | |
| | | v-decorator="['detergentChangeCycle']" |
| | | /> |
| | | </a-form-item> --> |
| | | |
| | | <a-form-item label="ååæ¶²æ·»å æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-date-picker |
| | | style="width: 100%" |
| | | placeholder="ååæ¶²æ¸
æ´æ¶²æ·»å æ¶é´" |
| | | v-decorator="['cuttingFluidAddTime']" |
| | | @change="onChangeCuttingFluidAddTime" |
| | | /> |
| | | </a-form-item> |
| | | <a-form-item label="ååæ¶²æ´æ¢æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-date-picker |
| | | style="width: 100%" |
| | |
| | | ProcessSelectData: [], |
| | | record: {}, |
| | | detergentchangetimeDateString: '', |
| | | detergentAddtimeString:'', |
| | | cuttingFluidChangeTimeDateString: '', |
| | | cuttingFluidAddTimeString: '', |
| | | knifeToolChangeTimeDateString: '', |
| | | visible: false, |
| | | confirmLoading: false, |
| | |
| | | record.detergentchangetime != null ? moment(record.detergentchangetime, 'YYYY-MM-DD') : '', |
| | | cuttingFluidChangeTime: |
| | | record.cuttingFluidChangeTime != null ? moment(record.cuttingFluidChangeTime, 'YYYY-MM-DD') : '', |
| | | |
| | | detergentAddtime: |
| | | record.detergentAddtime != null ? moment(record.detergentAddtime, 'YYYY-MM-DD') : '', |
| | | cuttingFluidAddTime: |
| | | record.cuttingFluidAddTime != null ? moment(record.cuttingFluidAddTime, 'YYYY-MM-DD') : '', |
| | | |
| | | cuttingFluidChangeAlertThreshold: record.cuttingFluidChangeAlertThreshold, |
| | | tactTime: record.tactTime |
| | | // knifeToolChangeTime: record.knifeToolChangeTime != null ? moment(record.knifeToolChangeTime, 'YYYY-MM-DD') : '' |
| | | // knifeToolChangeTime:moment(record.knifeToolChangeTime != null ? record.knifeToolChangeTime : "", 'YYYY-MM-DD'), |
| | | }) |
| | | |
| | | //触åäºä»¶ |
| | | this.onChangedetergentchangetime(null,record.detergentchangetime != null ? dateFormat(record.detergentchangetime, 'YYYY-mm-dd') : ''); |
| | | this.onChangecuttingFluidchangetime(null,record.cuttingFluidChangeTime != null ? dateFormat(record.cuttingFluidChangeTime, 'YYYY-mm-dd') : ''); |
| | | this.onChangeCuttingFluidAddTime(null,record.cuttingFluidAddTime != null ? dateFormat(record.cuttingFluidAddTime, 'YYYY-mm-dd') : ''); |
| | | this.onChangeDetergentAddtimeTime(null,record.detergentAddtime != null ? dateFormat(record.detergentAddtime, 'YYYY-mm-dd') : ''); |
| | | }) |
| | | // this.form.getFieldDecorator('detergentchangetime', { initialValue: moment(record.detergentchangetime, 'YYYY-MM-DD') }) |
| | | // this.detergentchangetimeDateString = moment(record.detergentchangetime).format('YYYY-MM-DD') |
| | | // this.form.getFieldDecorator('knifeToolChangeTime', { initialValue: moment(record.knifeToolChangeTime, 'YYYY-MM-DD') }) |
| | | // this.knifeToolChangeTimeDateString = moment(record.knifeToolChangeTime).format('YYYY-MM-DD') |
| | | }, |
| | | handleSubmit() { |
| | | const { |
| | |
| | | } |
| | | } |
| | | values.detergentchangetime = this.detergentchangetimeDateString |
| | | this.record.detergentchangetime = this.detergentchangetimeDateString |
| | | this.record.detergentchangetime = this.detergentAddtimeString |
| | | this.record.detergentAddtime = this.detergentchangetimeDateString |
| | | this.record.cuttingFluidChangeTime = this.cuttingFluidChangeTimeDateString |
| | | this.record.cuttingFluidAddTime = this.cuttingFluidAddTimeString |
| | | |
| | | this.record.cuttingFluidAddTime = this.cuttingFluidAddTimeString |
| | | this.record.detergentAddtime = this.detergentAddtimeString |
| | | |
| | | // values.knifeToolChangeTime = this.knifeToolChangeTimeDateString |
| | | // this.record.knifeToolChangeTime = this.knifeToolChangeTimeDateString |
| | | EquipmentBaseInfoEdit(this.record) |
| | |
| | | //debugger |
| | | this.detergentchangetimeDateString = dateString |
| | | }, |
| | | onChangeDetergentAddtimeTime(date, dateString) { |
| | | //debugger |
| | | this.detergentAddtimeString = dateString |
| | | }, |
| | | |
| | | onChangecuttingFluidchangetime(date, dateString) { |
| | | this.cuttingFluidChangeTimeDateString = dateString |
| | | }, |
| | | onChangeCuttingFluidAddTime(date, dateString) { |
| | | this.cuttingFluidAddTimeString = dateString |
| | | }, |
| | | onChangeknifeToolChangeTime(date, dateString) { |
| | | this.knifeToolChangeTimeDateString = dateString |
| | |
| | | this.record.detergentchangetime = '' |
| | | this.record.cuttingFluidChangeTime = '' |
| | | this.detergentchangetimeDateString = '' |
| | | this.detergentAddtimeString = '' |
| | | this.cuttingFluidChangeTimeDateString = '' |
| | | this.cuttingFluidAddTimeString = '' |
| | | this.visible = false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | title="è®¾å¤æä½åå²è¡¨" |
| | | :width="1200" |
| | | :hight="1200" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | @ok="handleSubmit" |
| | | @cancel="handleCancel" |
| | | > |
| | | |
| | | <x-card :bordered="false"> |
| | | <div slot="content" class="table-page-search-wrapper"> |
| | | |
| | | <a-form :label-col="labelCol" :wrapper-col="wrapperCol"> |
| | | <s-table |
| | | ref="table" |
| | | :columns="columns" |
| | | :rowKey="(record) => record.id" |
| | | </s-table> |
| | | <a-row :gutter="gutter"> |
| | | <a-col :md="colMd" :sm="colSm"> |
| | | <a-form-item label="å·¥åº"> |
| | | <a-select allow-clear style="width: 100%" v-model="queryParam.WorkingProcedure" placeholder="è¯·éæ©"> |
| | | <a-select-option v-for="(item,index) in ProcessSelectData" :key="index" :value="item.code"> |
| | | {{ item.name }} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!-- <a-col :md="colMd" :sm="colSm"> |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-select |
| | | show-search |
| | | option-filter-prop="children" |
| | | :filter-option="filterOption" |
| | | :allowClear="true" |
| | | style="width: 100%" |
| | | v-model="queryParam.EquipmentID" |
| | | placeholder="è¯·éæ©"> |
| | | <a-select-option v-for="(item, index) in equitypeData" :key="index" :value="item.equipmentId">{{ |
| | | item.equipmentName }}</a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> --> |
| | | <a-col :md="colMd" :sm="colSm"> |
| | | <a-form-item label="设å¤åå·"> |
| | | <a-input v-model="queryParam.equipmentModel" allow-clear placeholder="请è¾å
¥è®¾å¤åå·"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="colMd" :sm="colSm" > |
| | | <span class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="$refs.table.refresh(true)" >æ¥è¯¢</a-button> |
| | | <a-button style="margin-left: 8px" @click="() => queryParam = {}">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | </x-card> |
| | | |
| | | <a-card :bordered="false"> |
| | | |
| | | </a-card> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { STable,XCard } from '@/components' |
| | | import moment from 'moment' |
| | | import { EquipmentBaseInfoEdit } from '@/api/modular/main/EquipmentBaseInfoManage' |
| | | import { |
| | | EquipmentBaseInfoPage, |
| | | EquipmentBaseInfoToExcel, |
| | | EquipmentBaseInfoDelete, |
| | | EquipmentBaseInfoSelectDelete, |
| | | getEquipmentName } from '@/api/modular/main/EquipmentBaseInfoManage' |
| | | import { dateFormat } from '@/utils/util' |
| | | export default { |
| | | components: { |
| | | STable, |
| | | XCard |
| | | }, |
| | | data() { |
| | | return { |
| | | Id: 0, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 15 } |
| | | }, |
| | | queryParam:{ |
| | | |
| | | }, |
| | | ProcessSelectData: [], |
| | | record: {}, |
| | | detergentchangetimeDateString: '', |
| | | detergentAddtimeString:'', |
| | | cuttingFluidChangeTimeDateString: '', |
| | | cuttingFluidAddTimeString: '', |
| | | knifeToolChangeTimeDateString: '', |
| | | visible: false, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | |
| | | // 设å¤ä¸ææ¡æ°æ® |
| | | equitypeData: [], |
| | | |
| | | gutter: 36, |
| | | colMd: 6, |
| | | colSm: 18, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 8 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 15 } |
| | | }, |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | width: '50px', |
| | | dataIndex: 'index', |
| | | key: 'index', |
| | | align: 'center', |
| | | customRender: (text, record, index) => `${index + 1}` |
| | | }, |
| | | { |
| | | title: 'å·¥åº', |
| | | align: 'center', |
| | | sorter: true, |
| | | dataIndex: 'workingProcedure' |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: 'center', |
| | | sorter: true, |
| | | dataIndex: 'equipmentId' |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: 'æºåºæ°æ§ç³»ç»åå·', |
| | | align: 'center', |
| | | dataIndex: 'equipmentModel' |
| | | }, |
| | | { |
| | | title: 'äº§åæ°æ®ä¿¡æ¯', |
| | | align: 'center', |
| | | // sorter: true, |
| | | dataIndex: 'equipmentFunction' |
| | | }, |
| | | { |
| | | title: 'æ¸
æ´æ¶²æ´æ¢æ¶é´', |
| | | align: 'center', |
| | | sorter: true, |
| | | dataIndex: 'detergentchangetime' |
| | | }, |
| | | { |
| | | title: 'æ¸
æ´æ¶²æ´æ¢é¢è¦éå¼', |
| | | align: 'center', |
| | | sorter: true, |
| | | dataIndex: 'detergentChangeAlertThreshold' |
| | | }, |
| | | // { |
| | | // title: 'æ¸
æ´æ¶²æ´æ¢å¨æ', |
| | | // align: 'center', |
| | | // sorter: true, |
| | | // dataIndex: 'detergentChangeCycle' |
| | | // }, |
| | | { |
| | | title: 'ååæ¶²æ´æ¢æ¶é´', |
| | | align: 'center', |
| | | sorter: true, |
| | | dataIndex: 'cuttingFluidChangeTime' |
| | | }, |
| | | { |
| | | title: 'ååæ¶²æ´æ¢é¢è¦éå¼', |
| | | align: 'center', |
| | | sorter: true, |
| | | dataIndex: 'cuttingFluidChangeAlertThreshold' |
| | | }, |
| | | { |
| | | title: ' 计åèæ', |
| | | align: 'center', |
| | | sorter: true, |
| | | dataIndex: 'tactTime', |
| | | customRender: (text, record, index) => `${text}s` |
| | | }, |
| | | { |
| | | title: 'IPå°å', |
| | | align: 'center', |
| | | // sorter: true, |
| | | dataIndex: 'equipmentIP' |
| | | }, |
| | | { |
| | | title: '设å¤å¶é å', |
| | | align: 'center', |
| | | // sorter: true, |
| | | dataIndex: 'equipmentManufacturer' |
| | | }, |
| | | { |
| | | title: 'å建æ¶é´', |
| | | align: 'center', |
| | | sorter: true, |
| | | dataIndex: 'createdTime', |
| | | scopedSlots: { |
| | | customRender: 'time' |
| | | } |
| | | } |
| | | ], |
| | | tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' }, |
| | | // å è½½æ°æ®æ¹æ³ å¿
须为 Promise 对象 |
| | | loadData: parameter => { |
| | | return EquipmentBaseInfoPage(Object.assign(parameter, this.switchingDate())).then((res) => { |
| | | return res.data |
| | | }) |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.ProcessSelectData = this.$options.filters['dictData']('process_type') |
| | | }, |
| | | methods: { |
| | | moment, |
| | | // åå§åæ¹æ³ |
| | | edit(record) { |
| | | this.getEquipmentName(); |
| | | console.log(record) |
| | | this.visible = true |
| | | // this.Id = record.id |
| | | this.$nextTick(() => {}) |
| | | // 深度æ·è´ ç§»é¤VUEççå¬ï¼é²æ¢INDEX页é¢å¼åå¨ |
| | | //this.record = JSON.parse(JSON.stringify(record)) |
| | | this.$nextTick(() => { |
| | | // this.form.setFieldsValue({ |
| | | // id: record.id, |
| | | // equipmentId: record.equipmentId, |
| | | // equipmentName: record.equipmentName, |
| | | // workingProcedure: record.workingProcedure, |
| | | // equipmentModel: record.equipmentModel, |
| | | // equipmentIP: record.equipmentIP, |
| | | // equipmentFunction: record.equipmentFunction, |
| | | // equipmentBrand: record.equipmentBrand, |
| | | // equipmentManufacturer: record.equipmentManufacturer, |
| | | // detergentChangeAlertThreshold: record.detergentChangeAlertThreshold, |
| | | // detergentChangeCycle: record.detergentChangeCycle, |
| | | // // knifeToolChangeAlertThreshold: record.knifeToolChangeAlertThreshold, |
| | | // remarks: record.remarks, |
| | | // detergentchangetime: |
| | | // record.detergentchangetime != null ? moment(record.detergentchangetime, 'YYYY-MM-DD') : '', |
| | | // cuttingFluidChangeTime: |
| | | // record.cuttingFluidChangeTime != null ? moment(record.cuttingFluidChangeTime, 'YYYY-MM-DD') : '', |
| | | |
| | | // detergentAddtime: |
| | | // record.detergentAddtime != null ? moment(record.detergentAddtime, 'YYYY-MM-DD') : '', |
| | | // cuttingFluidAddTime: |
| | | // record.cuttingFluidAddTime != null ? moment(record.cuttingFluidAddTime, 'YYYY-MM-DD') : '', |
| | | |
| | | // cuttingFluidChangeAlertThreshold: record.cuttingFluidChangeAlertThreshold, |
| | | // tactTime: record.tactTime |
| | | // }) |
| | | |
| | | // //触åäºä»¶ |
| | | // this.onChangedetergentchangetime(null,record.detergentchangetime != null ? dateFormat(record.detergentchangetime, 'YYYY-mm-dd') : ''); |
| | | // this.onChangecuttingFluidchangetime(null,record.cuttingFluidChangeTime != null ? dateFormat(record.cuttingFluidChangeTime, 'YYYY-mm-dd') : ''); |
| | | // this.onChangeCuttingFluidAddTime(null,record.cuttingFluidAddTime != null ? dateFormat(record.cuttingFluidAddTime, 'YYYY-mm-dd') : ''); |
| | | // this.onChangeDetergentAddtimeTime(null,record.detergentAddtime != null ? dateFormat(record.detergentAddtime, 'YYYY-mm-dd') : ''); |
| | | }) |
| | | }, |
| | | // è®¾å¤æ¥è¯¢æ¡çé |
| | | filterOption(input, option) { |
| | | return ( |
| | | option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 |
| | | ) |
| | | }, |
| | | getEquipmentName() { |
| | | // è·å设å¤åç§° |
| | | getEquipmentName().then(res => { |
| | | this.equitypeData = res.data |
| | | }) |
| | | }, |
| | | handleSubmit() { |
| | | const { |
| | | form: { validateFields } |
| | | } = this |
| | | this.confirmLoading = true |
| | | validateFields((errors, values) => { |
| | | if (!errors) { |
| | | for (const key in values) { |
| | | if (values[key] == null) continue |
| | | if (typeof values[key] === 'object') { |
| | | values[key] = JSON.stringify(values[key]) |
| | | this.record[key] = values[key] |
| | | } else { |
| | | this.record[key] = values[key] |
| | | } |
| | | } |
| | | values.detergentchangetime = this.detergentchangetimeDateString |
| | | this.record.detergentchangetime = this.detergentAddtimeString |
| | | this.record.detergentAddtime = this.detergentchangetimeDateString |
| | | this.record.cuttingFluidChangeTime = this.cuttingFluidChangeTimeDateString |
| | | this.record.cuttingFluidAddTime = this.cuttingFluidAddTimeString |
| | | |
| | | this.record.cuttingFluidAddTime = this.cuttingFluidAddTimeString |
| | | this.record.detergentAddtime = this.detergentAddtimeString |
| | | |
| | | // values.knifeToolChangeTime = this.knifeToolChangeTimeDateString |
| | | // this.record.knifeToolChangeTime = this.knifeToolChangeTimeDateString |
| | | EquipmentBaseInfoEdit(this.record) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.$message.success('ç¼è¾æå') |
| | | this.confirmLoading = false |
| | | this.$emit('ok', this.record) |
| | | this.handleCancel() |
| | | } else { |
| | | this.$message.error('ç¼è¾å¤±è´¥ï¼' + JSON.stringify(res.message)) |
| | | } |
| | | }) |
| | | .finally(res => { |
| | | this.confirmLoading = false |
| | | }) |
| | | } else { |
| | | this.confirmLoading = false |
| | | } |
| | | }) |
| | | }, |
| | | onChangedetergentchangetime(date, dateString) { |
| | | //debugger |
| | | this.detergentchangetimeDateString = dateString |
| | | }, |
| | | onChangeDetergentAddtimeTime(date, dateString) { |
| | | //debugger |
| | | this.detergentAddtimeString = dateString |
| | | }, |
| | | |
| | | onChangecuttingFluidchangetime(date, dateString) { |
| | | this.cuttingFluidChangeTimeDateString = dateString |
| | | }, |
| | | onChangeCuttingFluidAddTime(date, dateString) { |
| | | this.cuttingFluidAddTimeString = dateString |
| | | }, |
| | | onChangeknifeToolChangeTime(date, dateString) { |
| | | this.knifeToolChangeTimeDateString = dateString |
| | | }, |
| | | handleCancel() { |
| | | this.form.resetFields() |
| | | this.record.detergentchangetime = '' |
| | | this.record.cuttingFluidChangeTime = '' |
| | | this.detergentchangetimeDateString = '' |
| | | this.detergentAddtimeString = '' |
| | | this.cuttingFluidChangeTimeDateString = '' |
| | | this.cuttingFluidAddTimeString = '' |
| | | this.visible = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="less"> |
| | | .table-operator { |
| | | margin-bottom: 18px; |
| | | } |
| | | button { |
| | | margin-right: 8px; |
| | | } |
| | | </style> |
| | |
| | | <a-button :disabled="btnDisabled" type="primary" v-if="hasPerm('EquipmentBaseInfo:add')" icon="plus" @click="EquipmentBaseInfoSelectDelete(selectedRows)">æ¹éå é¤éä¸é¡¹</a-button> |
| | | <a-button type="primary" v-if="hasPerm('EquipmentBaseInfo:add')" icon="plus" @click="$refs.addForm.add()">æ°å»º</a-button> |
| | | <a-button style="margin-left: 8px" type="info" icon="download" @click=" EquipmentBaseInfoToExcel()">导åºExcel</a-button> |
| | | <a-button style="margin-left: 8px" type="info" icon="download" @click="$refs.equipmentLogForm.edit()">æ¥çåå²</a-button> |
| | | </template> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a v-if="hasPerm('EquipmentBaseInfo:edit')" @click="$refs.editForm.edit(record)">ç¼è¾</a> |
| | |
| | | </s-table> |
| | | <add-form ref="addForm" @ok="handleOk" /> |
| | | <edit-form ref="editForm" @ok="handleOk" /> |
| | | <equipmentLog-form ref="equipmentLogForm" @ok="handleOk" /> |
| | | </a-card> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | import addForm from './addForm.vue' |
| | | import editForm from './editForm.vue' |
| | | import equipmentLogForm from './equipmentLogForm.vue' |
| | | export default { |
| | | components: { |
| | | STable, |
| | | XCard, |
| | | addForm, |
| | | editForm |
| | | editForm, |
| | | equipmentLogForm |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | ], |
| | | EOP30: [ |
| | | { |
| | | title: 'CH3è´¨é', |
| | | align: 'center', |
| | | sorter: true, |
| | | dataIndex: 'oP30QualityStateCH3Name' |
| | | }, |
| | | { |
| | | title: 'CH4è´¨é', |
| | | align: 'center', |
| | | sorter: true, |
| | | dataIndex: 'oP30QualityStateCH4Name' |
| | | }, |
| | | { |
| | | title: 'CH5è´¨é', |
| | | align: 'center', |
| | | sorter: true, |
| | | dataIndex: 'oP30QualityStateCH5Name' |
| | | }, |
| | | { |
| | | title: 'CH6è´¨é', |
| | | align: 'center', |
| | | sorter: true, |
| | | dataIndex: 'oP30QualityStateCH6Name' |
| | | }, |
| | | { |
| | | title: '涨æåç©', |
| | | align: 'center', |
| | | sorter: true, |