From 4b62098fb4528e3f38df4265e1e2ec081664d4b4 Mon Sep 17 00:00:00 2001 From: zenglf <18502938215@163.com> Date: 星期三, 25 十月 2023 13:18:41 +0800 Subject: [PATCH] 鉴定工单调整 --- src/views/eam/EquipmentCalibrationOrder.vue | 496 +++++++++++++++++--------------- src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal.vue | 357 ++++++++++++---------- src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportModal.vue | 4 src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportDrawerList.vue | 2 4 files changed, 458 insertions(+), 401 deletions(-) diff --git a/src/views/eam/EquipmentCalibrationOrder.vue b/src/views/eam/EquipmentCalibrationOrder.vue index 6189f01..0bc40df 100644 --- a/src/views/eam/EquipmentCalibrationOrder.vue +++ b/src/views/eam/EquipmentCalibrationOrder.vue @@ -1,23 +1,23 @@ <template> <a-card - :bordered="false" - title="鎶�鏈姸鎬侀壌瀹氱鐞�" + :bordered='false' + title='鎶�鏈姸鎬侀壌瀹氱鐞�' > <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper"> + <div class='table-page-search-wrapper'> <a-form - layout="inline" - @keyup.enter.native="searchQuery" + layout='inline' + @keyup.enter.native='searchQuery' > - <a-row :gutter="24"> + <a-row :gutter='24'> <a-col - :md="6" - :sm="8" + :md='6' + :sm='8' > - <a-form-item label="宸ュ崟缂栫爜"> + <a-form-item label='宸ュ崟缂栫爜'> <a-input - placeholder="璇疯緭鍏ュ伐鍗曠紪鐮�" - v-model="queryParam.num" + placeholder='璇疯緭鍏ュ伐鍗曠紪鐮�' + v-model='queryParam.num' ></a-input> </a-form-item> </a-col> @@ -33,23 +33,23 @@ </a-form-item> </a-col> --> <a-col - :md="6" - :sm="8" + :md='6' + :sm='8' > <span - style="float: left;overflow: hidden;" - class="table-page-search-submitButtons" + style='float: left;overflow: hidden;' + class='table-page-search-submitButtons' > <a-button - type="primary" - @click="searchQuery" - icon="search" + type='primary' + @click='searchQuery' + icon='search' >鏌ヨ</a-button> <a-button - type="primary" - @click="searchReset" - icon="reload" - style="margin-left: 8px" + type='primary' + @click='searchReset' + icon='reload' + style='margin-left: 8px' >閲嶇疆</a-button> </span> </a-col> @@ -59,171 +59,190 @@ <!-- 鏌ヨ鍖哄煙-END --> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator"> + <div class='table-operator'> <a-button - @click="handleAdd" - type="primary" - icon="plus" - >鏂板</a-button> + @click='handleAdd' + type='primary' + icon='plus' + >鏂板 + </a-button> </div> <!-- table鍖哄煙-begin --> <div> <div - class="ant-alert ant-alert-info" - style="margin-bottom: 16px;" + 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>椤� + <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" + style='margin-left: 24px' + @click='onClearSelected' >娓呯┖</a> </div> <a-table - ref="table" - size="middle" - :scroll="{ x: 'calc(2000px + 50%)', y: 900 }" + ref='table' + size='middle' + :scroll="{ x: 'calc(700px + 50%)', y: 900 }" bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - class="j-table-force-nowrap" - @change="handleTableChange" - :customRow="clickThenSelect" + rowKey='id' + :columns='columns' + :dataSource='dataSource' + :pagination='ipagination' + :loading='loading' + class='j-table-force-nowrap' + @change='handleTableChange' + :customRow='clickThenSelect' :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" > <span - slot="action" - slot-scope="text, record" + slot='action' + slot-scope='text, record' > - <a-popconfirm - title="纭畾涓嬪彂宸ュ崟鍚�?" - @confirm="() => handleOrderIssue(record)" - > - <a v-if="record.status === '1'">涓嬪彂</a> - </a-popconfirm> - <a-divider - v-if="record.status === '1'" - type="vertical" - /> - <a - v-if="record.status === '1'" - @click="handleEdit(record)" - >缂栬緫</a> - <a-divider - v-if="record.status === '1'" - type="vertical" - /> - <a - v-if="record.status === '2' " - @click="handleOrderExe(record)" - >鎵ц</a> - <a-divider - v-if="record.status === '2'" - type="vertical" - /> - <a - v-if="record.status === '4'" - @click="handleOrderExe(record)" - >鏌ョ湅</a> - <a-divider - v-if="record.status === '4'" - type="vertical" - /> - <a-popconfirm - title="纭畾鎾ゅ洖宸ュ崟鍚�?" - @confirm="() => handleOrderReset(record,'1')" - > - <a v-if="record.status === '2'">鎾ゅ洖</a> - </a-popconfirm> - <a-divider - v-if="record.status === '2'" - type="vertical" - /> - <a-popconfirm - title="纭畾鎾ゅ洖宸ュ崟鍚�?" - @confirm="() => handleOrderReset(record,'2')" - > - <a v-if="record.status === '4'">鎾ゅ洖</a> - </a-popconfirm> - <a-divider - v-if="record.status === '4'" - type="vertical" - /> - <a - v-if="record.status === '4'" - @click="handleFinal(record)" - >褰曞叆缁撴灉</a> - <!-- v-if="record.status === '5'" --> + <a + v-if="record.status === '1'" + @click='handleAddOrderReport(record)' + >缁撴灉褰曞叆</a> <a-divider - v-if="record.status === '4'" - 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 v-if="record.status === '1'">鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> + v-if="record.status === '1'" + type='vertical' + /> + <a @click='handleDetail(record)'>璇︽儏</a> + <!-- <a-popconfirm--> + <!-- title='纭畾涓嬪彂宸ュ崟鍚�?'--> + <!-- @confirm='() => handleOrderIssue(record)'--> + <!-- >--> + <!-- <a v-if="record.status === '1'">涓嬪彂</a>--> + <!-- </a-popconfirm>--> + <!-- <a-divider--> + <!-- v-if="record.status === '1'"--> + <!-- type='vertical'--> + <!-- />--> + <!-- <a--> + <!-- v-if="record.status === '1'"--> + <!-- @click='handleEdit(record)'--> + <!-- >缂栬緫</a>--> + <!-- <a-divider--> + <!-- v-if="record.status === '1'"--> + <!-- type='vertical'--> + <!-- />--> + <!-- <a--> + <!-- v-if="record.status === '2' "--> + <!-- @click='handleOrderExe(record)'--> + <!-- >鎵ц</a>--> + <!-- <a-divider--> + <!-- v-if="record.status === '2'"--> + <!-- type='vertical'--> + <!-- />--> + <!-- <a--> + <!-- v-if="record.status === '4'"--> + <!-- @click='handleOrderExe(record)'--> + <!-- >鏌ョ湅</a>--> + <!-- <a-divider--> + <!-- v-if="record.status === '4'"--> + <!-- type='vertical'--> + <!-- />--> + <!-- <a-popconfirm--> + <!-- title='纭畾鎾ゅ洖宸ュ崟鍚�?'--> + <!-- @confirm="() => handleOrderReset(record,'1')"--> + <!-- >--> + <!-- <a v-if="record.status === '2'">鎾ゅ洖</a>--> + <!-- </a-popconfirm>--> + <!-- <a-divider--> + <!-- v-if="record.status === '2'"--> + <!-- type='vertical'--> + <!-- />--> + <!-- <a-popconfirm--> + <!-- title='纭畾鎾ゅ洖宸ュ崟鍚�?'--> + <!-- @confirm="() => handleOrderReset(record,'2')"--> + <!-- >--> + <!-- <a v-if="record.status === '4'">鎾ゅ洖</a>--> + <!-- </a-popconfirm>--> + <!-- <a-divider--> + <!-- v-if="record.status === '4'"--> + <!-- type='vertical'--> + <!-- />--> + <!-- <a--> + <!-- v-if="record.status === '4'"--> + <!-- @click='handleFinal(record)'--> + <!-- >褰曞叆缁撴灉</a>--> + <!-- <!– v-if="record.status === '5'" –>--> + <!-- <a-divider--> + <!-- v-if="record.status === '4'"--> + <!-- type='vertical'--> + <!-- />--> + <!-- --> + <!-- <a-dropdown>--> + <!-- <a @click='handleDetail(record)'>璇︽儏</a>--> + <!-- <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 v-if="record.status === '1'">鍒犻櫎</a>--> + <!-- </a-popconfirm>--> + <!-- </a-menu-item>--> + <!-- </a-menu>--> + <!-- </a-dropdown>--> </span> <span - slot="num" - slot-scope="text, record" + slot='num' + slot-scope='text, record' > <a v-if="record.status === '3' || record.status === '2' " - class="lot" - @click="handleOrderExe(record)" - >{{record.num}}</a> + class='lot' + @click='handleOrderExe(record)' + >{{ record.num }}</a> - <span v-else>{{record.num}}</span> + <span v-else>{{ record.num }}</span> </span> </a-table> <a-tabs - defaultActiveKey="1" + defaultActiveKey='2' > - <a-tab-pane - key="1" - tab="妫�楠岄」" - > - <equipment-precision-parameters-list ref="PrecisionParametersList" :calibrationOrderId="mainId"></equipment-precision-parameters-list> - </a-tab-pane> + <!-- <a-tab-pane --> + <!-- key="1"--> + <!-- tab="妫�楠岄」"--> + <!-- >--> + <!-- <equipment-precision-parameters-list ref="PrecisionParametersList" :calibrationOrderId="mainId"></equipment-precision-parameters-list>--> + <!-- </a-tab-pane>--> <a-tab-pane - key="2" - tab="妫�瀹氭姤鍛�" + key='2' + tab='妫�瀹氭姤鍛�' > - <equipment-calibration-order-report-list ref="EquipmentCalibrationOrderReportList" :calibrationOrderId="mainId"></equipment-calibration-order-report-list> + <equipment-calibration-order-report-list ref='EquipmentCalibrationOrderReportList' + :calibrationOrderId='mainId'></equipment-calibration-order-report-list> </a-tab-pane> </a-tabs> </div> <equipment-calibration-order-modal - ref="modalForm" - @ok="modalFormOk" + ref='modalForm' + @ok='modalFormOk' ></equipment-calibration-order-modal> <equipment-calibration-order-exe-drawer - ref="EquipmentCalibrationOrderExeDrawer" - @ok="modalFormOk" + ref='EquipmentCalibrationOrderExeDrawer' + @ok='modalFormOk' ></equipment-calibration-order-exe-drawer> - <final-modal ref="finalModal" @ok="modalFormOk"></final-modal> + <final-modal ref='finalModal' @ok='modalFormOk'></final-modal> + + <equipment-calibration-order-report-modal + ref='equipmentCalibrationOrderReportModal' + @ok='modalFormOk' + ></equipment-calibration-order-report-modal> </a-card> </template> @@ -235,9 +254,11 @@ import EquipmentCalibrationOrderExeDrawer from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderExeDrawer' import { getAction, postAction, requestPut } from '@/api/manage' import EquipmentPrecisionParametersList from './modules/equipmentCalibrationOrder/EquipmentPrecisionParametersList' -import EquipmentCalibrationOrderReportList from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList' +import EquipmentCalibrationOrderReportList + from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportList' import FinalModal from './modules/equipmentCalibrationOrder/FinalModal.vue' - +import EquipmentCalibrationOrderReportModal + from './modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportModal' export default { name: 'EquipmentCalibrationOrder', @@ -247,24 +268,24 @@ EquipmentCalibrationOrderExeDrawer, EquipmentPrecisionParametersList, EquipmentCalibrationOrderReportList, + EquipmentCalibrationOrderReportModal, FinalModal }, data() { return { description: '鎶�鏈姸鎬侀壌瀹氱鐞�', - ipagination:{ - current: 1, - pageSize: 5, - pageSizeOptions: ['5', '10', '50'], - showTotal: (total, range) => { - return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" - }, - showQuickJumper: true, - showSizeChanger: true, - total: 0 + ipagination: { + current: 1, + pageSize: 5, + pageSizeOptions: ['5', '10', '50'], + showTotal: (total, range) => { + return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�' + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 }, - dictOptions:{ - }, + dictOptions: {}, /* 鍒嗛〉鍙傛暟 */ // 琛ㄥご columns: [ @@ -273,116 +294,117 @@ dataIndex: '', key: 'rowIndex', width: 60, - align: "center", - customRender: function (t, r, index) { - return parseInt(index) + 1; + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } }, - { - title: '鐘舵��', - align: "center", - dataIndex: 'status_dictText' - }, + { title: '宸ュ崟鍙�', - align: "center", - dataIndex: 'num', + align: 'center', + dataIndex: 'num' // scopedSlots: { customRender: 'num' } }, { title: '妫�瀹氭柟寮�', - align: "center", - dataIndex: 'calibrationType_dictText', + align: 'center', + dataIndex: 'calibrationType_dictText' }, { title: '璁惧缂栫爜', - align: "center", - dataIndex: 'equipmentNum', + align: 'center', + dataIndex: 'equipmentNum' }, { title: '璁惧鍚嶇О', - align: "center", - dataIndex: 'equipmentName', + align: 'center', + dataIndex: 'equipmentName' }, { title: '鍨嬪彿', - align: "center", - dataIndex: 'equipmentModel', + align: 'center', + dataIndex: 'equipmentModel' }, { title: '瑙勬牸', - align: "center", - dataIndex: 'equipmentSpecification', + align: 'center', + dataIndex: 'equipmentSpecification' }, { title: '鍒ゅ畾渚濇嵁', - align: "center", - dataIndex: 'managementMode_dictText', + align: 'center', + dataIndex: 'managementMode_dictText' }, - + { + title: '鐘舵��', + align: 'center', + dataIndex: 'status_dictText' + }, { title: '鍒ゅ畾缁撴灉', - align: "center", - dataIndex: 'calibrationOrderUda6_dictText' + align: 'center', + dataIndex: 'calibrationResult_dictText' }, - { - title: '鍒涘缓浜�', - align: "center", - dataIndex: 'createBy' - }, - { - title: '鍒涘缓鏃ユ湡', - align: "center", - dataIndex: 'createTime' - }, - { - title: '妫�瀹氫汉', - align: "center", - dataIndex: 'calibrationUserId_dictText' - }, + // { + // title: '鍒涘缓浜�', + // align: 'center', + // dataIndex: 'createBy' + // }, + // { + // title: '鍒涘缓鏃ユ湡', + // align: 'center', + // dataIndex: 'createTime' + // }, + // { + // title: '妫�瀹氫汉', + // align: 'center', + // dataIndex: 'calibrationUserId_dictText' + // }, { title: '瀹屾垚鏃堕棿', - align: "center", + align: 'center', dataIndex: 'calibrationTime' }, - { - title: '涓嬪彂鏃堕棿', - align: "center", - dataIndex: 'issueTime' - }, + // { + // title: '涓嬪彂鏃堕棿', + // align: 'center', + // dataIndex: 'issueTime' + // }, { title: '鎿嶄綔', dataIndex: 'action', - align: "center", - fixed: "right", - width: 300, + align: 'center', + fixed: 'right', + width: 120, scopedSlots: { customRender: 'action' } } ], url: { - list: "/eam/calibrationOrder/listNew", - delete: "/eam/calibrationOrder/delete", - edit: "/eam/calibrationOrder/editStatus", + list: '/eam/calibrationOrder/listNew', + delete: '/eam/calibrationOrder/delete', + edit: '/eam/calibrationOrder/editStatus' }, - mainId:'', + mainId: '' } }, computed: { - importExcelUrl: function () { - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } }, methods: { + onSelectChange(selectedRowKeys, selectionRows) { if (selectedRowKeys.length == 1) { - this.mainId = selectedRowKeys[0]; + this.mainId = selectedRowKeys[0] } else { - this.mainId = '-1'; + this.mainId = '-1' } - this.selectedRowKeys = selectedRowKeys; - this.selectionRows = selectionRows; + this.selectedRowKeys = selectedRowKeys + this.selectionRows = selectionRows }, handleOrderExe(record) { @@ -402,44 +424,50 @@ }, handleOrderIssue(record) { - const that = this; + const that = this requestPut(that.url.edit, { id: record.id, status: '2' }).then((res) => { if (res.success) { - that.$message.success("宸ュ崟涓嬪彂鎴愬姛锛�") + that.$message.success('宸ュ崟涓嬪彂鎴愬姛锛�') that.loadData() } else { - that.$message.warning("宸ュ崟涓嬪彂澶辫触锛�") + that.$message.warning('宸ュ崟涓嬪彂澶辫触锛�') } }) }, //鎾ゅ洖 handleOrderReset(record, status) { - const that = this; + const that = this requestPut(that.url.edit, { id: record.id, status: status }).then((res) => { if (res.success) { - that.$message.success("宸ュ崟鎾ゅ洖鎴愬姛锛�") + that.$message.success('宸ュ崟鎾ゅ洖鎴愬姛锛�') that.loadData() } else { - that.$message.warning("宸ュ崟鎾ゅ洖澶辫触锛�") + that.$message.warning('宸ュ崟鎾ゅ洖澶辫触锛�') } }) }, onClearSelected() { - this.selectedRowKeys = []; - this.selectionRows = []; - this.mainId='' + this.selectedRowKeys = [] + this.selectionRows = [] + this.mainId = '' }, clickThenSelect(record) { - return { - on: { - click: () => { - this.onSelectChange(record.id.split(","), [record]); - } + return { + on: { + click: () => { + this.onSelectChange(record.id.split(','), [record]) } } + } }, - handleFinal(record){ - this.$refs.finalModal.edit(record); + // 鐩存帴涓婁紶閴村畾鎶ュ憡 + handleAddOrderReport: function(record) { + this.$refs.equipmentCalibrationOrderReportModal.add(record.id) + this.$refs.equipmentCalibrationOrderReportModal.title = '涓婁紶妫�瀹氭姤鍛�' + this.$refs.equipmentCalibrationOrderReportModal.disableSubmit = false + }, + handleFinal(record) { + this.$refs.finalModal.edit(record) } } } diff --git a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal.vue b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal.vue index f8e7bd6..8580a18 100644 --- a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal.vue +++ b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderModal.vue @@ -1,78 +1,79 @@ <template> <a-modal - :title="title" - :width="1250" - :visible="visible" - :maskClosable="false" - @ok="handleOk" - cancelText="鍏抽棴" - @cancel="handleCancel" - :confirmLoading="confirmLoading" + :title='title' + :width='1250' + :visible='visible' + :maskClosable='false' + @ok='handleOk' + cancelText='鍏抽棴' + @cancel='handleCancel' + :confirmLoading='confirmLoading' > - <a-spin :spinning="confirmLoading"> - <a-form :form="form"> - <a-row :gutter="24"> - <a-col :span="12"> + <a-spin :spinning='confirmLoading'> + <a-form :form='form'> + <a-row :gutter='24'> + <a-col :span='12'> <a-form-item - label="宸ュ崟鍙�" - :labelCol="labelCol" - :wrapperCol="wrapperCol" + label='宸ュ崟鍙�' + :labelCol='labelCol' + :wrapperCol='wrapperCol' > <a-input allow-clear - :disabled="codeDisable" + :disabled='codeDisable' :placeholder="disableSubmit?'':'璇疯緭鍏ュ伐鍗曞彿缂栫爜'" v-decorator="['num', validatorRules.num ]" /> </a-form-item> </a-col> - <a-col :span="12"> + <a-col :span='12'> <a-form-item - label="妫�瀹氭柟寮�" - :labelCol="labelCol" - :wrapperCol="wrapperCol" + label='妫�瀹氭柟寮�' + :labelCol='labelCol' + :wrapperCol='wrapperCol' > <j-dict-select-tag allow-clear - :disabled="disableSubmit" + :disabled='disableSubmit' :placeholder="disableSubmit?'':'璇烽�夋嫨妫�瀹氭柟寮�'" - :triggerChange="true" - dictCode="calibration_type" + :triggerChange='true' + dictCode='calibration_type' v-decorator="['calibrationType', validatorRules.calibrationType]" /> </a-form-item> </a-col> </a-row> - <a-row :gutter="24"> - <a-col :span="12"> + <a-row :gutter='24'> + <a-col :span='12'> <a-form-item - label="璁惧" - :labelCol="labelCol" - :wrapperCol="wrapperCol" + label='璁惧' + :labelCol='labelCol' + :wrapperCol='wrapperCol' > <a-input-search - :disabled="disableSubmit" - placeholder="璇烽�夋嫨璁惧" + :disabled='disableSubmit' + placeholder='璇烽�夋嫨璁惧' enter-button - @search="onEquipmentList()" - :read-only="true" + @search='onEquipmentList()' + :read-only='true' v-decorator="['equipmentName', validatorRules.equipmentName]" /> </a-form-item> </a-col> - <a-col :span="12"> + <a-col :span='12'> <a-form-item - label="鍒ゆ柇渚濇嵁" - :labelCol="labelCol" - :wrapperCol="wrapperCol" + label='鍒ゆ柇渚濇嵁' + :labelCol='labelCol' + :wrapperCol='wrapperCol' > <j-dict-select-tag allow-clear - :disabled="disableSubmit" + :read-only='true' + :disabled='disableSubmit' :placeholder="disableSubmit?'':'璇烽�夋嫨鍒ゆ柇渚濇嵁'" - :triggerChange="true" - dictCode="management_mode" + :triggerChange='true' + dictCode='management_mode' v-decorator="['managementMode', validatorRules.managementMode]" /> </a-form-item> @@ -80,48 +81,48 @@ </a-row> <a-row hidden - :gutter="24" + :gutter='24' > - <a-col :span="12"> + <a-col :span='12'> <a-form-item - label="璁惧Id" - :labelCol="labelCol" - :wrapperCol="wrapperCol" + label='璁惧Id' + :labelCol='labelCol' + :wrapperCol='wrapperCol' > <a-input allow-clear - :disabled="true" + :disabled='true' :placeholder="disableSubmit?'':'璇疯緭鍏ヨ澶囩紪鐮�/鍚嶇О/鍨嬪彿'" v-decorator="['equipmentId', validatorRules.equipmentId ]" /> </a-form-item> </a-col> </a-row> - <a-row :gutter="24"> - <a-col :span="24"> + <a-row :gutter='24'> + <a-col :span='24'> <a-form-item - :labelCol="{span:3}" - :wrapperCol="{span:21}" - label="澶囨敞" + :labelCol='{span:3}' + :wrapperCol='{span:21}' + label='澶囨敞' > <a-textarea allow-clear - :disabled="disableSubmit" + :disabled='disableSubmit' :placeholder="disableSubmit?'':'璇疯緭鍏ュ娉�'" v-decorator="['remark', validatorRules.remark]" /> </a-form-item> </a-col> - <a-col :span="24"> + <a-col :span='24'> <a-form-item - :labelCol="{span:3}" - :wrapperCol="{span:21}" - label="绮惧害鍙傛暟妯℃澘ID" + :labelCol='{span:3}' + :wrapperCol='{span:21}' + label='绮惧害鍙傛暟妯℃澘ID' hidden > <a-textarea allow-clear - :disabled="disableSubmit" + :disabled='disableSubmit' :placeholder="disableSubmit?'':'璇疯緭鍏ョ簿搴﹀弬鏁版ā鏉縄D'" v-decorator="['calibrationOrderUda1', validatorRules.calibrationOrderUda1]" /> @@ -130,36 +131,37 @@ </a-row> </a-form> </a-spin> - <a-table - ref="table" - bordered - size="middle" - rowKey='id' - :columns="columns" - :pagination="ipagination" - :loading="loading" - :dataSource="dataSource" - @change="handleTableChange" + <a-table v-show='false' + ref='table' + bordered + size='middle' + rowKey='id' + :columns='columns' + :pagination='ipagination' + :loading='loading' + :dataSource='dataSource' + @change='handleTableChange' > </a-table> - <template slot="footer"> + <template slot='footer'> <a-button :style="{marginRight: '8px'}" - @click="handleCancel()" + @click='handleCancel()' > 鍏抽棴 </a-button> <a-button - @click="handleOk()" - type="primary" - :loading="confirmLoading" - >纭畾</a-button> + @click='handleOk()' + type='primary' + :loading='confirmLoading' + >纭畾 + </a-button> </template> <equipment-list - ref="EquipmentList" + ref='EquipmentList' @sendEquipmentRecord='sendEquipmentRecord' ></equipment-list> </a-modal> @@ -177,189 +179,216 @@ import Vue from 'vue' export default { - name: "EquipmentCalibrationOrderModal", - mixins:[JeecgListMixin], + name: 'EquipmentCalibrationOrderModal', + mixins: [JeecgListMixin], components: { JMultiSelectTag, Tooltip, EquipmentList }, + data() { return { columns: [ - { - title: '#', - dataIndex:'sort', - width:100, - align:"center", - }, - { - title:'妫�楠岄」鐩悕绉�', - align:"center", - dataIndex: 'precisionParametersName', - width:300 - }, - { - title:'浣嶇疆', - align:"center", - dataIndex: 'precisionParametersUda1', - width:300 - }, - { - title:'鍏佸樊锛坢m锛�', - align:"center", - dataIndex: 'tolerance', - width:300 - }, + { + title: '#', + dataIndex: 'sort', + width: 100, + align: 'center' + }, + { + title: '妫�楠岄」鐩悕绉�', + align: 'center', + dataIndex: 'precisionParametersName', + width: 300 + }, + { + title: '浣嶇疆', + align: 'center', + dataIndex: 'precisionParametersUda1', + width: 300 + }, + { + title: '鍏佸樊锛坢m锛�', + align: 'center', + dataIndex: 'tolerance', + width: 300 + } ], - title: "鎿嶄綔", - precisionParametersTemplateId:'', + title: '鎿嶄綔', + precisionParametersTemplateId: '', visible: false, disableSubmit: false, codeDisable: true, dataSource: [], - model: {}, + num:"", + model: { 'management_mode': 'report', 'calibration_type': 'self' }, labelCol: { xs: { span: 24 }, - sm: { span: 6 }, + sm: { span: 6 } }, wrapperCol: { xs: { span: 24 }, - sm: { span: 18 }, + sm: { span: 18 } }, confirmLoading: false, form: this.$form.createForm(this), validatorRules: { num: { rules: [ - { required: true, message: '璇疯緭鍏ュ伐鍗曠紪鐮�!' }, + { required: true, message: '璇疯緭鍏ュ伐鍗曠紪鐮�!' } ] }, calibrationType: { rules: [ - { required: true, message: '璇烽�夋嫨妫�瀹氭柟寮�!' }, + { required: true, message: '璇烽�夋嫨妫�瀹氭柟寮�!' } ] }, managementMode: { rules: [ - { required: true, message: '璇烽�夋嫨鍒ゅ畾渚濇嵁!' }, + { required: true, message: '璇烽�夋嫨鍒ゅ畾渚濇嵁!' } ] }, equipmentName: { rules: [ - { required: true, message: '璇烽�夋嫨璁惧!' }, + { required: true, message: '璇烽�夋嫨璁惧!' } ] - }, + } }, url: { - add: "/eam/calibrationOrder/addNew", - edit: "/eam/calibrationOrder/editNew", - list: "/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId", - }, + add: '/eam/calibrationOrder/addNew', + edit: '/eam/calibrationOrder/editNew', + list: '/eam/precisionParametersTemplateDetail/listByPrecisionParametersTemplateId', + getNum: '/eam/sysIdentity/getNumNew', + } } }, - + created() { + // this.initNum() + }, methods: { + // 鍒濆鍖栨妧鏈姸鎬侀壌瀹氬伐鍗曞彿 + // initNum(){ + // getAction(this.url.getNum, { type: 'CalibrationOrder', length: '4' }).then((res) => { + // if (res.success) { + // this.num = res.message + // } + // }) + // }, + add() { - this.precisionParametersTemplateId='-1'; - this.edit({}) + this.precisionParametersTemplateId = '-1' + getAction(this.url.getNum, { type: 'CalibrationOrder', length: '4' }).then((res) => { + if (res.success) { + this.num = res.message + } + }) + // 鏂板鏃跺�欒缃壌瀹氱被鍨嬩负鑷銆� 鍒ゅ畾渚濇嵁涓烘姤鍛� + this.edit({ "num":this.num,'calibrationType': 'self', 'managementMode': 'report' }) }, edit(record) { - let that = this; - this.form.resetFields(); - this.model = Object.assign({}, record); - this.visible = true; + let that = this + this.form.resetFields() + this.model = Object.assign({}, record) + this.visible = true this.maintenanceCycles = record.maintenanceCycles if (record.precisionParameterList != undefined) { - this.dataSource = record.precisionParameterList; + this.dataSource = record.precisionParameterList } that.$nextTick(() => { - that.form.setFieldsValue(pick(that.model, 'num', 'equipmentName', 'equipmentId', 'calibrationType', 'managementMode')); - }); + that.form.setFieldsValue(pick(that.model, 'num', 'equipmentName', 'equipmentId', 'calibrationType', 'managementMode')) + }) if (record.id) { - this.codeDisable = true; + this.codeDisable = true } else { - this.codeDisable = false; + this.codeDisable = false } }, close() { - this.$emit('close'); - this.visible = false; + this.$emit('close') + this.visible = false }, handleCancel() { - this.close(); + this.close() }, handleOk() { - const that = this; + const that = this this.form.validateFields((err, values) => { if (!err) { - that.confirmLoading = true; - let formData = Object.assign(this.model, values); - let obj; + that.confirmLoading = true + let formData = Object.assign(this.model, values) + let obj if (!this.model.id) { - obj = postAction(this.url.add, formData); + obj = postAction(this.url.add, formData) } else { - obj = requestPut(this.url.edit, formData, { id: this.model.id }); + obj = requestPut(this.url.edit, formData, { id: this.model.id }) } obj.then((res) => { if (res.success) { - that.$message.success(res.message); - that.$emit('ok'); + that.$message.success(res.message) + that.$emit('ok') } else { - that.$message.warning(res.message); + that.$message.warning(res.message) } }).finally(() => { - that.confirmLoading = false; - that.close(); + that.confirmLoading = false + that.close() }) } }) }, onEquipmentList() { - this.$refs.EquipmentList.list(); - this.$refs.EquipmentList.title = "閫夋嫨璁惧淇℃伅"; + this.$refs.EquipmentList.list() + this.$refs.EquipmentList.title = '閫夋嫨璁惧淇℃伅' }, sendEquipmentRecord(data) { - this.dataSource = []; - let record = data.record; - this.form.setFieldsValue({calibrationOrderUda1:record.precisionParametersTemplateId,equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model }); - this.precisionParametersTemplateId = record.precisionParametersTemplateId; + this.dataSource = [] + let record = data.record + this.form.setFieldsValue({ + calibrationOrderUda1: record.precisionParametersTemplateId, + equipmentId: record.id, + equipmentName: record.num + '/' + record.name + '/' + record.model + }) + this.precisionParametersTemplateId = record.precisionParametersTemplateId }, - clearList(){ - this.dataSource=[] - this.selectedRowKeys=[] - this.ipagination.current = 1 - }, - }, - watch:{ - precisionParametersTemplateId:{ - immediate: true, - handler(val) { - if(!this.precisionParametersTemplateId){ - this.clearList() - }else{ - this.queryParam['precisionParametersTemplateId'] = val; - this.queryParam['delFlag'] = 0; - this.loadData(1); - } + clearList() { + this.dataSource = [] + this.selectedRowKeys = [] + this.ipagination.current = 1 + } + } + , + watch: { + precisionParametersTemplateId: { + immediate: true, + handler(val) { + if (!this.precisionParametersTemplateId) { + this.clearList() + } else { + this.queryParam['precisionParametersTemplateId'] = val + this.queryParam['delFlag'] = 0 + this.loadData(1) } } - }, + } + } } </script> -<style lang="less" scoped> +<style lang='less' scoped> /deep/ .frozenRowClass { color: #c9c9c9; } + .fontweight { font-weight: bold; } + .ant-btn { padding: 0 10px; margin-left: 3px; diff --git a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportDrawerList.vue b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportDrawerList.vue index 5b84f6a..d489128 100644 --- a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportDrawerList.vue +++ b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportDrawerList.vue @@ -199,7 +199,7 @@ { title: '鍒ゅ畾缁撴灉', align: 'center', - dataIndex: 'judgmentResultName' + dataIndex: 'judgmentResult_dicText' }, { title: '鎿嶄綔', diff --git a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportModal.vue b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportModal.vue index 3cc3260..dc6f818 100644 --- a/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportModal.vue +++ b/src/views/eam/modules/equipmentCalibrationOrder/EquipmentCalibrationOrderReportModal.vue @@ -114,7 +114,7 @@ :disabled="disableSubmit" :placeholder="disableSubmit?'':'璇烽�夋嫨鍒ゅ畾缁撴灉'" :triggerChange="true" - dictCode="judgment_result" + dictCode="technology_status" v-decorator="['judgmentResult', validatorRules.judgmentResult]" /> @@ -143,7 +143,7 @@ </a-spin> </a-modal> </template> - + <script> import { getAction, postAction, postFileAction } from '@/api/manage' import Vue from 'vue' -- Gitblit v1.9.3