| | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | :scroll="{ x: 'calc(2800px + 50%)', y: 900 }" |
| | | :scroll="{ x: 'calc(3500px + 50%)', y: 900 }" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | |
| | | <span v-else>{{record.num}}</span> |
| | | </span> |
| | | |
| | | <span |
| | | slot="notPassReason" |
| | | slot-scope="text" |
| | | > |
| | | <j-ellipsis |
| | | :value="text" |
| | | :length="15" |
| | | /> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | |
| | | import EquipmentTechnologyStatusModal from './modules/daily3MaintenanceOrder/EquipmentTechnologyStatusModal' |
| | | import Maintenance3ReceiptModal from './modules/daily3MaintenanceOrder/Maintenance3ReceiptModal.vue' |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import JEllipsis from "@/components/jeecg/JEllipsis"; |
| | | |
| | | export default { |
| | | name: 'DailyMaintenanceOrderList', |
| | |
| | | MaintenanceOrderChangeModal, |
| | | StoveCategoryModal, |
| | | EquipmentTechnologyStatusModal, |
| | | Maintenance3ReceiptModal |
| | | Maintenance3ReceiptModal, |
| | | JEllipsis |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | dataIndex: 'equipmentModel', |
| | | }, |
| | | { |
| | | title: '保养标准编码', |
| | | title: '验收状态', |
| | | align: "center", |
| | | dataIndex: 'maintenanceStandardNum', |
| | | dataIndex: 'checkStatusName', |
| | | }, |
| | | { |
| | | title: '未通过原因', |
| | | align: "center", |
| | | dataIndex: 'notPassReason', |
| | | scopedSlots: { customRender: 'notPassReason' } |
| | | }, |
| | | // { |
| | | // title: '保养标准编码', |
| | | // align: "center", |
| | | // dataIndex: 'maintenanceStandardNum', |
| | | // }, |
| | | |
| | | { |
| | | title: '使用部门', |
| | |
| | | <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> |
| | |
| | | </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> |
| | |
| | | <!-- 查询区域-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> |
| | | |
| | |
| | | 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', |
| | |
| | | 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: [ |
| | |
| | | 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) { |
| | |
| | | }, |
| | | |
| | | 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) |
| | | } |
| | | } |
| | | } |
| | |
| | | @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" |
| | |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | <span slot="faultDescription" slot-scope="text"> |
| | | <j-ellipsis :value="text" :length="10" /> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | |
| | | class="table-operator" |
| | | style="margin-top: 0px" |
| | | > |
| | | <FaultDescriptionList ref="FaultDescriptionList" /> |
| | | <FaultDescriptionList ref="FaultDescriptionList" @ok="modalFormOk"/> |
| | | </div> |
| | | |
| | | </a-tab-pane> |
| | |
| | | import MalfunctionRepairModal from './modules/malfunctionRepair/MalfunctionRepaireModal' |
| | | import FaultDescriptionList from './modules/malfunctionRepair/FaultDescriptionList' |
| | | import ApprovelModal from './modules/malfunctionRepair/ApprovelModal' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | |
| | | export default { |
| | | name: 'MalfunctionRepairList', |
| | |
| | | components: { |
| | | MalfunctionRepairModal, |
| | | FaultDescriptionList, |
| | | ApprovelModal |
| | | ApprovelModal, |
| | | JEllipsis |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | align: "center", |
| | | dataIndex: 'departName', |
| | | }, |
| | | { |
| | | title: '紧急程度', |
| | | align: "center", |
| | | dataIndex: 'urgencyName', |
| | | }, |
| | | // { |
| | | // title: '紧急程度', |
| | | // align: "center", |
| | | // dataIndex: 'urgencyName', |
| | | // }, |
| | | { |
| | | title: '故障描述', |
| | | align: "center", |
| | | dataIndex: 'faultDescription' |
| | | dataIndex: 'faultDescription', |
| | | scopedSlots: { |
| | | customRender: 'faultDescription' |
| | | } |
| | | |
| | | }, |
| | | // { |
| | | // title: '故障拍照', |
| | |
| | | // dataIndex: 'photo', |
| | | // scopedSlots: { customRender: 'imgSlot' } |
| | | // }, |
| | | { |
| | | title: '故障原因', |
| | | align: "center", |
| | | dataIndex: 'faultReason' |
| | | }, |
| | | // { |
| | | // title: '故障原因', |
| | | // align: "center", |
| | | // dataIndex: 'faultReason' |
| | | // }, |
| | | { |
| | | title: '故障时间', |
| | | align: "center", |
| | |
| | | align: "center", |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | // { |
| | | // title: '操作', |
| | | // dataIndex: 'action', |
| | | // align: "center", |
| | | // fixed: "right", |
| | | // width: 200, |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | ], |
| | | url: { |
| | | list: "/eam/equipmentReportRepair/getReportRepairList", |
| | |
| | | <template> |
| | | <a-card :bordered="false" :class="'cust-erp-sub-tab'"> |
| | | <a-card :bordered='false' :class="'cust-erp-sub-tab'"> |
| | | <!-- 查询区域 --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <div class='table-page-search-wrapper'> |
| | | <a-form layout='inline' @keyup.enter.native='searchQuery'> |
| | | <a-row :gutter='24'> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- 查询区域-END --> |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <div class="table-operator" v-if="mainId"> |
| | | <div class='table-operator' v-if='mainId'> |
| | | <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('实际工时')">导出</a-button> --> |
| | | <!-- <a-upload |
| | |
| | | @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-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-button style='margin-left: 8px'> 批量操作 |
| | | <a-icon type='down' /> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | |
| | | </div> --> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | ref='table' |
| | | size='middle' |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange"> |
| | | rowKey='id' |
| | | :scroll='{x:true}' |
| | | :columns='columns' |
| | | :dataSource='dataSource' |
| | | :pagination='ipagination' |
| | | :loading='loading' |
| | | @change='handleTableChange'> |
| | | <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" --> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | <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 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> |
| | | <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)"> |
| | | :ghost='true' |
| | | type='primary' |
| | | icon='download' |
| | | size='small' |
| | | @click='downloadFile(text)'> |
| | | 下载 |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | <a-divider type="vertical" /> |
| | | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
| | | <span slot='action' slot-scope='text, record'> |
| | | <a @click='handleEdit(record)'>编辑</a> |
| | | <a-divider type='vertical' /> |
| | | <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'> |
| | | <a>删除</a> |
| | | </a-popconfirm> |
| | | </span> |
| | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <repairOrderActualWorkHours-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></repairOrderActualWorkHours-modal> |
| | | <repairOrderActualWorkHours-modal ref='modalForm' @ok='modalFormOk' |
| | | :mainId='mainId'></repairOrderActualWorkHours-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import RepairOrderActualWorkHoursModal from './modules/repairorder/RepairOrderActualWorkHoursModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import RepairOrderActualWorkHoursModal from './modules/repairorder/RepairOrderActualWorkHoursModal' |
| | | |
| | | export default { |
| | | name: "RepairOrderActualWorkHoursList", |
| | | mixins:[JeecgListMixin], |
| | | components: { RepairOrderActualWorkHoursModal }, |
| | | props:{ |
| | | mainId:{ |
| | | type:String, |
| | | default:'', |
| | | required:false |
| | | } |
| | | }, |
| | | watch:{ |
| | | mainId:{ |
| | | immediate: true, |
| | | handler(val) { |
| | | if(!this.mainId){ |
| | | this.clearList() |
| | | }else{ |
| | | this.queryParam['repairOrderId'] = val |
| | | this.loadData(1); |
| | | } |
| | | export default { |
| | | name: 'RepairOrderActualWorkHoursList', |
| | | mixins: [JeecgListMixin], |
| | | components: { RepairOrderActualWorkHoursModal }, |
| | | props: { |
| | | mainId: { |
| | | type: String, |
| | | default: '', |
| | | required: false |
| | | } |
| | | }, |
| | | watch: { |
| | | mainId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if (!this.mainId) { |
| | | this.clearList() |
| | | } else { |
| | | this.queryParam['repairOrderId'] = val |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '维修工单管理页面', |
| | | disableMixinCreated:true, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | } |
| | | }, |
| | | 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: 'username', |
| | | align: 'center', |
| | | align: 'center' |
| | | |
| | | }, |
| | | { |
| | | title: '人员名称', |
| | | dataIndex: 'realname', |
| | | align: 'center', |
| | | align: 'center' |
| | | |
| | | }, |
| | | |
| | | { |
| | | title: '主承修人', |
| | | dataIndex: 'principalContractor_dictText', |
| | | align: 'center' |
| | | |
| | | }, |
| | | // { |
| | |
| | | { |
| | | title: '实际工时', |
| | | dataIndex: 'actualHour', |
| | | align: 'center', |
| | | align: 'center' |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/eam/repairOrder/listRepairOrderActualWorkHoursByMainId", |
| | | delete: "/eam/repairOrder/deleteRepairOrderActualWorkHours", |
| | | deleteBatch: "/eam/repairOrder/deleteBatchRepairOrderActualWorkHours", |
| | | exportXlsUrl: "/eam/repairOrder/exportRepairOrderActualWorkHours", |
| | | importUrl: "/eam/repairOrder/importRepairOrderActualWorkHours", |
| | | }, |
| | | dictOptions:{ |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | clearList(){ |
| | | this.dataSource=[] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | } |
| | | |
| | | { |
| | | title: '开始时间', |
| | | dataIndex: 'startTime', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '结束时间', |
| | | dataIndex: 'endTime', |
| | | align: 'center' |
| | | }, |
| | | |
| | | { |
| | | title: '理论工时', |
| | | dataIndex: 'theoreticalTime', |
| | | align: 'center' |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/repairOrder/listRepairOrderActualWorkHoursByMainId', |
| | | delete: '/eam/repairOrder/deleteRepairOrderActualWorkHours', |
| | | deleteBatch: '/eam/repairOrder/deleteBatchRepairOrderActualWorkHours', |
| | | exportXlsUrl: '/eam/repairOrder/exportRepairOrderActualWorkHours', |
| | | importUrl: '/eam/repairOrder/importRepairOrderActualWorkHours' |
| | | }, |
| | | dictOptions: {} |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}` |
| | | } |
| | | }, |
| | | methods: { |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less' |
| | | @import '~@assets/less/common.less' |
| | | </style> |
| | |
| | | ></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> |
| | |
| | | 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)" |
| | |
| | | @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> |
| | |
| | | @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" |
| | |
| | | ><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" |
| | |
| | | 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" |
| | |
| | | <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> |
| | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { putAction } from '../../api/manage' |
| | | import RepairOrderAssignTask from './modules/repairorder/RepairOrderAssignTask.vue' |
| | | import RepairOrderExcuteDrawer from './modules/repairorder/repairOrderExcuteDrawer.vue' |
| | | import RepairOrderExcuteDrawer from './modules/repairorder/repairOrderExcuteDrawer' |
| | | import FaultDescriptionList from './FaultDescriptionList' |
| | | import FaultReportRepair from './modules/repairorder/moudles/select/FaultReportRepair.vue' |
| | | 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: "RepairOrderList", |
| | | mixins: [JeecgListMixin], |
| | |
| | | RepairOrderModal, |
| | | RepairOrderAssignTask, |
| | | RepairOrderExcuteDrawer, |
| | | FaultDescriptionList |
| | | FaultDescriptionList, |
| | | FaultReportRepair, |
| | | store |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | dataIndex: 'num', |
| | | scopedSlots: { customRender: 'num' } |
| | | }, |
| | | { |
| | | title: '业务类型', |
| | | align: "center", |
| | | dataIndex: 'businessType_dictText' |
| | | }, |
| | | // { |
| | | // title: '业务类型', |
| | | // align: "center", |
| | | // dataIndex: 'businessType_dictText' |
| | | // }, |
| | | { |
| | | title: '设备编码', |
| | | align: "center", |
| | |
| | | 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: '责任班组', |
| | | align: "center", |
| | | dataIndex: 'teamId_dictText' |
| | | dataIndex: 'teamId_dictText', |
| | | scopedSlots: { |
| | | customRender: 'jell' |
| | | } |
| | | }, |
| | | { |
| | | title: '责任人', |
| | |
| | | { |
| | | title: '故障描述', |
| | | align: "center", |
| | | dataIndex: 'faultDescription' |
| | | dataIndex: 'faultDescription', |
| | | scopedSlots: { |
| | | customRender: 'jell' |
| | | } |
| | | }, |
| | | { |
| | | title: '故障原因', |
| | |
| | | // align: "center", |
| | | // dataIndex: 'isStop_dictText' |
| | | // }, |
| | | { |
| | | title: '工时定额', |
| | | align: "center", |
| | | dataIndex: 'workingHourQuota' |
| | | }, |
| | | // { |
| | | // title: '工时定额', |
| | | // align: "center", |
| | | // dataIndex: 'workingHourQuota' |
| | | // }, |
| | | { |
| | | title: '实际工时', |
| | | align: "center", |
| | |
| | | } |
| | | this.onClearSelected() |
| | | this.queryParam.repairOrderType = 0; |
| | | this.queryParam.userId = store.getters.userInfo.id |
| | | var params = this.getQueryParams();//查询条件 |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | |
| | | this.onClearSelected() |
| | | this.$refs.FaultDescriptionList.faultId = '-1' |
| | | }, |
| | | getReports(){ |
| | | this.$refs.FaultReportRepair.title = '故障报修单'; |
| | | this.$refs.FaultReportRepair.visible = true; |
| | | } |
| | | |
| | | }, |
| | | } |
| | |
| | | </div> |
| | | </template> |
| | | </a-table> |
| | | <!-- <div :style="{height: '140px',width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :gutter="24"> |
| | | <div :style="{height: '140px',width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <!-- <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | |
| | | > |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-row> --> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="{span:3}" |
| | | :wrapperCol="{span:21}" |
| | | label="备注" |
| | | label="验收未通过原因" |
| | | > |
| | | <a-textarea |
| | | allow-clear |
| | | :rows='5' |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请输入备注'" |
| | | v-decorator="['remark', {}]" |
| | | :placeholder="disableSubmit?'':'请输入验收未通过原因'" |
| | | v-decorator="['notPassReason', {}]" |
| | | /> |
| | | |
| | | |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> --> |
| | | </div> |
| | | </a-form> |
| | | </a-spin> |
| | | |
| | |
| | | this.visible = true; |
| | | this.getMaintenance3Receipt() |
| | | that.$nextTick(() => { |
| | | // that.form.setFieldsValue(pick(that.model, 'num', 'teamId', 'remark')); |
| | | that.form.setFieldsValue(pick(that.model, 'notPassReason')); |
| | | }); |
| | | |
| | | }, |
| | |
| | | <a-row> |
| | | <a-col :span='24'> |
| | | <a-form-item label='文档类型编码' :labelCol='labelCol' :wrapperCol='wrapperCol'> |
| | | <a-input placeholder='请输入文档类型编码' v-decorator="['num', validatorRules.num]"></a-input> |
| | | <a-input placeholder='将由系统自动生成' v-decorator="['num', validatorRules.num]" disabled></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span='24'> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | url: { |
| | | add: '/momEamDocumentType/add', |
| | | edit: '/momEamDocumentType/edit', |
| | | queryById: '/momEamDocumentType/queryById' |
| | | queryById: '/momEamDocumentType/queryById', |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | | alterFlag: '' |
| | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'num', 'name', 'remark')) |
| | | }) |
| | | if (record.id) { |
| | | if (this.model.id) { |
| | | this.codeDisable = true |
| | | } else { |
| | | this.codeDisable = false |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'DocumentType', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | <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> |
| | |
| | | </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?'':'请输入精度参数模板ID'" |
| | | v-decorator="['calibrationOrderUda1', validatorRules.calibrationOrderUda1]" |
| | | /> |
| | |
| | | </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> |
| | |
| | | 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:'允差(mm)', |
| | | 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: '允差(mm)', |
| | | 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; |
| | |
| | | { |
| | | title: '判定结果', |
| | | align: 'center', |
| | | dataIndex: 'judgmentResultName' |
| | | dataIndex: 'judgmentResult_dicText' |
| | | }, |
| | | { |
| | | title: '操作', |
| | |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请选择判定结果'" |
| | | :triggerChange="true" |
| | | dictCode="judgment_result" |
| | | dictCode="technology_status" |
| | | v-decorator="['judgmentResult', validatorRules.judgmentResult]" |
| | | /> |
| | | |
| | |
| | | </a-spin> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { getAction, postAction, postFileAction } from '@/api/manage' |
| | | import Vue from 'vue' |
| | |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请输入设备分类编号'" |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'将由系统自动生成'" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | |
| | | url: { |
| | | add: "/eam/equipmentCategory/add", |
| | | edit: "/eam/equipmentCategory/edit", |
| | | list: "/eam/equipmentCategory/getAllChildren" |
| | | list: "/eam/equipmentCategory/getAllChildren", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | columns: [ |
| | | { |
| | |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'EquipmentCategory', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | <a-input |
| | | v-model="model.num" |
| | | placeholder="将由系统自动生成" |
| | | disabled |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | }) |
| | | }, |
| | | created() { |
| | | this.initNum() |
| | | }, |
| | | methods: { |
| | | |
| | | initNum() { |
| | | getAction(this.url.getNum, { type: 'EquipmentScrap', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | //选择设备 |
| | | selectEquipmentList() { |
| | |
| | | if (this.model.id) { |
| | | let params = { equipmentChangeId: this.model.id } |
| | | this.requestSubTableData(this.url.equipmentScrapDetail.list, params, this.equipmentScrapDetailTable) |
| | | }else{ |
| | | getAction(this.url.getNum, { type: 'EquipmentScrap', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | //校验所有一对一子表表单 |
| | |
| | | target.removeRows(rowId) |
| | | }, |
| | | // 重写add 方法 默认不增加一行 |
| | | add(num = 0, forceScrollToBottom = false) { |
| | | if (num < 1) return |
| | | // let timestamp = new Date().getTime() |
| | | let rows = this.rows |
| | | let row |
| | | for (let i = 0; i < num; i++) { |
| | | rows = this.push({}, false, rows) |
| | | row = rows[rows.length - 1] |
| | | } |
| | | this.rows = rows |
| | | // add(num = 0, forceScrollToBottom = false) { |
| | | // if (num < 1) return |
| | | // // let timestamp = new Date().getTime() |
| | | // let rows = this.rows |
| | | // let row |
| | | // for (let i = 0; i < num; i++) { |
| | | // rows = this.push({}, false, rows) |
| | | // row = rows[rows.length - 1] |
| | | // } |
| | | // this.rows = rows |
| | | |
| | | this.$nextTick(() => { |
| | | this.updateFormValues() |
| | | }) |
| | | // 触发add事件 |
| | | this.$emit('added', { |
| | | row: (() => { |
| | | let r = Object.assign({}, row) |
| | | r.id = this.getCleanId(r.id) |
| | | return r |
| | | })(), |
| | | target: this |
| | | }) |
| | | // 设置滚动条位置 |
| | | let tbody = this.getElement('tbody') |
| | | let offsetHeight = tbody.offsetHeight |
| | | let realScrollTop = tbody.scrollTop + offsetHeight |
| | | if (forceScrollToBottom) { |
| | | this.$nextTick(() => { |
| | | this.resetScrollTop(this.$refs.scrollView.scrollHeight) |
| | | }) |
| | | } |
| | | } |
| | | // this.$nextTick(() => { |
| | | // this.updateFormValues() |
| | | // }) |
| | | // // 触发add事件 |
| | | // this.$emit('added', { |
| | | // row: (() => { |
| | | // let r = Object.assign({}, row) |
| | | // r.id = this.getCleanId(r.id) |
| | | // return r |
| | | // })(), |
| | | // target: this |
| | | // }) |
| | | // // 设置滚动条位置 |
| | | // let tbody = this.getElement('tbody') |
| | | // let offsetHeight = tbody.offsetHeight |
| | | // let realScrollTop = tbody.scrollTop + offsetHeight |
| | | // if (forceScrollToBottom) { |
| | | // this.$nextTick(() => { |
| | | // this.resetScrollTop(this.$refs.scrollView.scrollHeight) |
| | | // }) |
| | | // } |
| | | // } |
| | | |
| | | } |
| | | } |
| | |
| | | <a-input |
| | | v-model="model.num" |
| | | placeholder="将由系统自动生成" |
| | | disabled |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | // import EquipmentSelection from '@/components/tools/EquipmentSelection.vue' |
| | | import EquipmentSelectModal from './EquipmentSelectModal.vue' |
| | | import { getAction, postAction, requestPut } from '@api/manage' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import { getRefPromise, VALIDATE_FAILED } from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.initNum() |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('selectionRows', (data) => { |
| | |
| | | }, |
| | | methods: { |
| | | |
| | | initNum() { |
| | | getAction(this.url.getNum, { type: 'EquipmentSeal', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | } |
| | | }) |
| | | }, |
| | | handleChange(value, data) { |
| | | this.$nextTick(() => { |
| | | this.$set(data, 'maintenanceAfterUnseal', data.maintenanceAfterUnseal) |
| | |
| | | if (this.model.id) { |
| | | let params = { equipmentChangeId: this.model.id } |
| | | this.requestSubTableData(this.url.equipmentSealDetail.list, params, this.equipmentSealDetailTable) |
| | | }else{ |
| | | getAction(this.url.getNum, { type: 'EquipmentSeal', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | //校验所有一对一子表表单 |
| | |
| | | <a-input |
| | | v-model="model.num" |
| | | placeholder="将由系统自动生成" |
| | | disabled |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | }) |
| | | }, |
| | | created() { |
| | | this.initNum() |
| | | }, |
| | | methods: { |
| | | |
| | | initNum() { |
| | | getAction(this.url.getNum, { type: 'EquipmentUnseal', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | } |
| | | }) |
| | | }, |
| | | //选择设备 |
| | | selectEquipmentList() { |
| | | let ids = [] |
| | |
| | | if (this.model.id) { |
| | | let params = { equipmentChangeId: this.model.id } |
| | | this.requestSubTableData(this.url.equipmentUnsealDetail.list, params, this.equipmentUnsealDetailTable) |
| | | }else{ |
| | | getAction(this.url.getNum, { type: 'EquipmentUnseal', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | //校验所有一对一子表表单 |
| | |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | :disabled="true" |
| | | allow-clear |
| | | :placeholder="disableSubmit?'':'请输入故障原因编号'" |
| | | :placeholder="disableSubmit?'':'将由系统自动生成'" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | }, |
| | | url: { |
| | | add: "/eam/faultCause/add", |
| | | edit: "/eam/faultCause/edit" |
| | | edit: "/eam/faultCause/edit", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | | alterFlag: "" |
| | |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'FaultCause', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="codeDisable" |
| | | :placeholder="disableSubmit?'':'请输入故障类型编号'" |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'将由系统自动生成'" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | }, |
| | | url: { |
| | | add: "/eam/faultType/add", |
| | | edit: "/eam/faultType/edit" |
| | | edit: "/eam/faultType/edit", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | | alterFlag: "" |
| | |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'FaultType', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :placeholder="'请输入维保专业编码'" |
| | | :placeholder="'将由系统自动生成'" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | disabled |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | url: { |
| | | add: '/maintenanceSpecialty/maintenanceSpecialty/add', |
| | | edit: '/maintenanceSpecialty/maintenanceSpecialty/edit', |
| | | queryById: '/maintenanceSpecialty/maintenanceSpecialty/queryById' |
| | | queryById: '/maintenanceSpecialty/maintenanceSpecialty/queryById', |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | | alterFlag: '' |
| | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'num', 'name', 'remark')) |
| | | }) |
| | | if (record.id) { |
| | | if (this.model.id) { |
| | | this.codeDisable = true |
| | | } else { |
| | | this.codeDisable = false |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'MaintenanceSpecialty', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | handleCancel() { |
| | | this.close(); |
| | | }, |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list属性!') |
| | | return |
| | | } |
| | | //加载数据 若传入参数1则加载第一页的内容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | this.onClearSelected() |
| | | this.queryParam.equipmentStatus = '1'; |
| | | var params = this.getQueryParams()//查询条件 |
| | | this.loading = true |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | }, |
| | | } |
| | |
| | | height: 90% !important; |
| | | overflow-y: hidden; |
| | | } |
| | | |
| | | /deep/ .notshow { |
| | | .notshow { |
| | | display: none; |
| | | } |
| | | |
| | |
| | | .dataUnKnow { |
| | | color: #1890ff; |
| | | } |
| | | |
| | | /deep/ .frozenRowClass { |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | </style> |
| | |
| | | add: "/eam/equipmentReportRepair/add", |
| | | edit: "/eam/equipmentReportRepair/edit", |
| | | queryById: "/eam/equipmentReportRepair/queryById", |
| | | equipmentList: '/eam/equipment/list' |
| | | equipmentList: '/eam/equipment/list', |
| | | getNum:'/eam/sysIdentity/getNumNew' |
| | | }, |
| | | isMaintenance: [ |
| | | { label: '是', value: true }, |
| | |
| | | add() { |
| | | this.modelDefault.status = 1 |
| | | this.modelDefault.isStop = false |
| | | this.edit(this.modelDefault); |
| | | let that = this; |
| | | let param = { |
| | | type: 'EquipmentReportRepair', |
| | | length: 4 |
| | | }; |
| | | getAction(this.url.getNum,param).then(res=>{ |
| | | if(res.success){ |
| | | that.modelDefault.num = res.result; |
| | | that.edit(that.modelDefault); |
| | | } |
| | | }) |
| | | }, |
| | | async edit(record) { |
| | | await this.fetchList() |
| | | this.model = Object.assign({}, record); |
| | | if (this.model.id) { |
| | | |
| | | this.selectStatus = Number(record.status) |
| | | record.isStop == 'true' ? this.isStop = true : this.isStop = false |
| | | this.equipmentId = String(record.equipmentId) |
| | |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | :disabled="true" |
| | | placeholder="请输入单据号" |
| | | v-decorator="['num', validatorRules.num]" |
| | | /> |
| | |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请选择是否停机维修'" |
| | | :triggerChange="true" |
| | | dictCode="is_stop" |
| | |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-date |
| | | :disabled="disableSubmit" |
| | | :disabled="true" |
| | | style="width: 100%" |
| | | placeholder="请选择故障时间" |
| | | :showTime="true" |
| | |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <!-- <a-row :gutter="24"> |
| | | <a-col :span="24/2"> |
| | | <a-form-item |
| | | label="紧急程度" |
| | |
| | | v-decorator="['urgency', validatorRules.urgency]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24/2" v-show="false"> |
| | | </a-col> --> |
| | | <!-- <a-col :span="24/2" v-show="false"> |
| | | <a-form-item |
| | | label="故障原因" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | :disabled="disableSubmit" |
| | | enter-button |
| | | v-decorator="['faultReason', validatorRules.faultReason]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-col> --> |
| | | <!-- </a-row> --> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24/2"> |
| | | <a-form-item |
| | |
| | | // import JImageUpload from '@/components/jeecg/JImage2Upload' |
| | | import EquipmentList from './EquipmentList' |
| | | import Vue from 'vue' |
| | | import dayjs from 'dayjs' |
| | | |
| | | |
| | | export default { |
| | | name: "MalfunctionRepaireModal", |
| | |
| | | JMultiSelectTag, |
| | | Tooltip, |
| | | // JImageUpload, |
| | | EquipmentList |
| | | EquipmentList, |
| | | dayjs |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | { required: true, message: '请选择故障时间!' }, |
| | | ] |
| | | }, |
| | | faultDescription:{ |
| | | rules: [ |
| | | { required: true, message: '请描述故障!' }, |
| | | { max: 1000, min:1,message: '最多可描述1000字!' }, |
| | | ] |
| | | }, |
| | | }, |
| | | url: { |
| | | add: "/eam/equipmentReportRepair/add", |
| | | edit: "/eam/equipmentReportRepair/edit", |
| | | getSysDeparts: "/eam/equipment/getSysDeparts", |
| | | getNum:'/eam/sysIdentity/getNumNew' |
| | | }, |
| | | |
| | | dataSource: [], |
| | | } |
| | | }, |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | add() { |
| | | this.edit({}) |
| | | let that = this; |
| | | let param = { |
| | | type: 'EquipmentReportRepair', |
| | | length: 4 |
| | | }; |
| | | let modelDefault = {}; |
| | | getAction(this.url.getNum,param).then(res=>{ |
| | | if(res.success){ |
| | | modelDefault.num = res.result; |
| | | modelDefault.isStop = '2' |
| | | modelDefault.faultTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'); |
| | | that.edit(modelDefault); |
| | | } |
| | | }) |
| | | }, |
| | | edit(record) { |
| | | let that = this; |
| | |
| | | <a-row> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='操作证编号' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> |
| | | <a-input v-model='model.num' placeholder='请输入操作证编号'></a-input> |
| | | <a-input v-model='model.num' placeholder='请输入操作证编号' disabled></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | |
| | | <a-row> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='申请单编号' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> |
| | | <a-input v-model='model.num' placeholder="将由系统生成"></a-input> |
| | | <a-input v-model='model.num' placeholder="将由系统生成" disabled></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.initNum() |
| | | }, |
| | | methods: { |
| | | |
| | | initNum(){ |
| | | getAction(this.url.getNum, { type: 'OperationCertificateApply', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | } |
| | | }) |
| | | }, |
| | | addBefore() { |
| | | this.operationCertificateApplyDetailTable.dataSource = [] |
| | | }, |
| | |
| | | if (this.model.id) { |
| | | let params = { id: this.model.id } |
| | | this.requestSubTableData(this.url.operationCertificateApplyDetail.list, params, this.operationCertificateApplyDetailTable) |
| | | }else{ |
| | | getAction(this.url.getNum, { type: 'OperationCertificateApply', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | //校验所有一对一子表表单 |
| | |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | placeholder="请输入参数分类编号" |
| | | placeholder="将由系统自动生成" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | disabled |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | add: "/eam/precisionParametersCategory/add", |
| | | edit: "/eam/precisionParametersCategory/edit", |
| | | loadPrecisionParametersCategoryTree: '/eam/precisionParametersCategory/loadTree', |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | precisionParametersCategoryTree: [], |
| | | } |
| | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'parentId', 'num', 'name', 'remark')); |
| | | }); |
| | | if (!record.id) { |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'PrecisionParametersCategory', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | handleOk() { |
| | |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="codeDisable" |
| | | :placeholder="disableSubmit?'':'请输入精度参数编号'" |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'将由系统自动生成'" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | }, |
| | | url: { |
| | | add: "/eam/precisionParameters/add", |
| | | edit: "/eam/precisionParameters/edit" |
| | | edit: "/eam/precisionParameters/edit", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | | alterFlag: "" |
| | |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'PrecisionParameters', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | > |
| | | <a-input |
| | | allowClear |
| | | :disabled="codeDisable" |
| | | :placeholder="disableSubmit?'':'请输入精度参数模板编码'" |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'将由系统自动生成'" |
| | | v-decorator="[ 'num', validatorRules.num]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | add: "/eam/precisionParametersTemplate/add", |
| | | edit: "/eam/precisionParametersTemplate/edit", |
| | | loadTree: "/eam/precisionParameters/loadTree", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | treeData: [], |
| | | TemplateDetailDataSource: [], |
| | |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'PrecisionParametersTemplate', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | placeholder="请输入参数分类编号" |
| | | placeholder="将由系统自动生成" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | disabled |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | add: "/eam/processParametersCategory/add", |
| | | edit: "/eam/processParametersCategory/edit", |
| | | loadProcessParametersCategoryTree: '/eam/processParametersCategory/loadTree', |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | processParametersCategoryTree: [], |
| | | } |
| | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'parentId', 'num', 'name', 'remark')); |
| | | }); |
| | | if (!record.id) { |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'ProcessParametersCategory', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | handleOk() { |
| | |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="codeDisable" |
| | | :placeholder="disableSubmit?'':'请输入工艺参数编号'" |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'将由系统自动生成'" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | }, |
| | | url: { |
| | | add: "/eam/processParameters/add", |
| | | edit: "/eam/processParameters/edit" |
| | | edit: "/eam/processParameters/edit", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | | alterFlag: "" |
| | |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'ProcessParameters', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | > |
| | | <a-input |
| | | allowClear |
| | | :disabled="codeDisable" |
| | | :placeholder="disableSubmit?'':'请输入工艺参数模板编码'" |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'将由系统自动生成'" |
| | | v-decorator="[ 'num', validatorRules.num]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | add: "/eam/processParametersTemplate/add", |
| | | edit: "/eam/processParametersTemplate/edit", |
| | | loadTree: "/eam/processParameters/loadTree", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | treeData: [], |
| | | TemplateDetailDataSource: [], |
| | |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'ProcessParametersTemplate', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | <template> |
| | | <a-card :bordered="false" :class="'cust-erp-sub-tab'"> |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | @change="handleTableChange" |
| | | > |
| | | <template |
| | | v-for="col in columns" |
| | | :slot="col.dataIndex" |
| | | slot-scope='text, record, index' |
| | | > |
| | | <div :key="col.dataIndex"> |
| | | <a-input-search |
| | | v-if="col.dataIndex == 'username'" |
| | | enter-button |
| | | @search="onSearchUser(index)" |
| | | :value="text" |
| | | :read-only="true" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | /> |
| | | <a-input-number |
| | | :value="text" |
| | | v-if="col.dataIndex == 'actualHour'" |
| | | :min="1" |
| | | :max="99999" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="record.disabled" |
| | | /> |
| | | |
| | | </div> |
| | | </template> |
| | | <span slot='action' slot-scope='text, record,index'> |
| | | <a @click="handleDeleteFake(index)">删除</a> |
| | | <a-card :bordered='false' :class="'cust-erp-sub-tab'"> |
| | | <a-table |
| | | ref='table' |
| | | bordered |
| | | rowKey='id' |
| | | :columns='columns' |
| | | :dataSource='dataSource' |
| | | :pagination='ipagination' |
| | | @change='handleTableChange' |
| | | > |
| | | <template |
| | | v-for='col in columns' |
| | | :slot='col.dataIndex' |
| | | slot-scope='text, record, index' |
| | | > |
| | | <div :key='col.dataIndex'> |
| | | <a-input-search |
| | | v-if="col.dataIndex == 'username'" |
| | | enter-button |
| | | @search='onSearchUser(index)' |
| | | :value='text' |
| | | :read-only='true' |
| | | @change='(e) => handleChange(e, record.key, col, index)' |
| | | /> |
| | | <a-input-number |
| | | :value='text' |
| | | v-if="col.dataIndex == 'actualHour'" |
| | | :min='1' |
| | | :max='99999' |
| | | @change='(e)=>handleChange(e, record.key, col, index)' |
| | | :disabled='record.disabled' |
| | | /> |
| | | |
| | | </div> |
| | | </template> |
| | | <span slot='action' slot-scope='text, record,index'> |
| | | <a @click='handleDeleteFake(index)'>删除</a> |
| | | </span> |
| | | </a-table> |
| | | <a-button |
| | | style="width: 100%; margin-top: 16px; margin-bottom: 8px" |
| | | type="dashed" |
| | | icon="plus" |
| | | @click="addHour" |
| | | :disabled="repairOrderStatus!='3'" |
| | | >添加实际工时 |
| | | </a-button> |
| | | <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :style="{textAlign:'right'}"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel" |
| | | :disabled="repairOrderStatus!='3'" |
| | | > |
| | | 清空 |
| | | </a-button> |
| | | <a-button |
| | | @click="handleOk(1)" |
| | | type="primary" |
| | | :style="{marginRight: '8px'}" |
| | | :disabled="repairOrderStatus!='3'" |
| | | >暂存</a-button> |
| | | <a-button |
| | | @click="handleOk(0)" |
| | | type="primary" |
| | | </a-table> |
| | | <a-button |
| | | style='width: 100%; margin-top: 16px; margin-bottom: 8px' |
| | | type='dashed' |
| | | icon='plus' |
| | | @click='addHour' |
| | | :disabled="repairOrderStatus!='3'" |
| | | >添加实际工时 |
| | | </a-button> |
| | | <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :style="{textAlign:'right'}"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click='handleCancel' |
| | | :disabled="repairOrderStatus!='3'" |
| | | >保存</a-button> |
| | | </a-row> |
| | | <!-- :disabled="false" --> |
| | | </div> |
| | | <actual-hour-user-select |
| | | ref="actualUserSelect" |
| | | @sendUserRecord="sendUserRecord" |
| | | > |
| | | </actual-hour-user-select> |
| | | </a-card> |
| | | > |
| | | 清空 |
| | | </a-button> |
| | | <a-button |
| | | @click='handleOk(1)' |
| | | type='primary' |
| | | :style="{marginRight: '8px'}" |
| | | :disabled="repairOrderStatus!='3'" |
| | | >暂存 |
| | | </a-button> |
| | | <a-button |
| | | @click='handleOk(0)' |
| | | type='primary' |
| | | :disabled="repairOrderStatus!='3'" |
| | | >保存 |
| | | </a-button> |
| | | </a-row> |
| | | <!-- :disabled="false" --> |
| | | </div> |
| | | <actual-hour-user-select |
| | | ref='actualUserSelect' |
| | | @sendUserRecord='sendUserRecord' |
| | | > |
| | | </actual-hour-user-select> |
| | | </a-card> |
| | | </template> |
| | | <script> |
| | | import { postAction, getAction } from '@/api/manage' |
| | |
| | | import pick from 'lodash.pick' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import ActualHourUserSelect from './select/ActualHourUserSelect.vue' |
| | | |
| | | export default { |
| | | name: 'ActualWorkHoursEditTable', |
| | | mixins: [JeecgListMixin], |
| | | name: 'ActualWorkHoursEditTable', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | JEllipsis, |
| | | ActualHourUserSelect |
| | | }, |
| | | props:{ |
| | | repairOrderId:{ |
| | | type:String, |
| | | required:false, |
| | | default:'' |
| | | props: { |
| | | repairOrderId: { |
| | | type: String, |
| | | required: false, |
| | | default: '' |
| | | }, |
| | | repairOrderStatus:{ |
| | | type:String, |
| | | required:false, |
| | | default:'' |
| | | repairOrderStatus: { |
| | | type: String, |
| | | required: false, |
| | | default: '' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "工艺确认", |
| | | title: '维修工单-实际工时', |
| | | flag: false,//主页面的标记位 用于区分是否确认过工单工艺 来区分table页展示 工单工序 还是产品工序 |
| | | visible: false, |
| | | model: {}, |
| | | obj: {}, |
| | | maskClosable: true, |
| | |
| | | pageSize: 99, |
| | | pageSizeOptions: ['99', '199'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " 共" + total + "条" |
| | | return range[0] + '-' + range[1] + ' 共' + total + '条' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | |
| | | validatorRules: { |
| | | userId: { |
| | | rules: [ |
| | | { required: true, message: '请选择人员!' }, |
| | | { required: true, message: '请选择人员!' } |
| | | ] |
| | | }, |
| | | actual_hour: { |
| | | rules: [ |
| | | { required: false, message: '请填写工时!'}, |
| | | { required: false, message: '请填写工时!' } |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 7 }, |
| | | sm: { span: 7 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | drawerWidth: "100%", |
| | | drawerWidth: '100%', |
| | | visible: false, |
| | | disableSubmit: false, |
| | | disableSelect: false, |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: '*人员编码', |
| | | dataIndex: 'username', |
| | | align: "center", |
| | | scopedSlots: { customRender: 'username' }, |
| | | className: 'red', |
| | | width: 250, |
| | | }, |
| | | { |
| | | title: '人员名称', |
| | | dataIndex: 'realname', |
| | | align: "center", |
| | | width: 250, |
| | | }, |
| | | { |
| | | title: '*实际工时', |
| | | dataIndex: 'actualHour', |
| | | align: "center", |
| | | className: 'red', |
| | | scopedSlots: { customRender: 'actualHour' }, |
| | | width: 250, |
| | | }, |
| | | { |
| | | { |
| | | title: '*人员编码', |
| | | dataIndex: 'username', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'username' }, |
| | | className: 'red', |
| | | width: 250 |
| | | }, |
| | | { |
| | | title: '人员名称', |
| | | dataIndex: 'realname', |
| | | align: 'center', |
| | | width: 250 |
| | | }, |
| | | |
| | | { |
| | | title: '*实际工时', |
| | | dataIndex: 'actualHour', |
| | | align: 'center', |
| | | className: 'red', |
| | | scopedSlots: { customRender: 'actualHour' }, |
| | | width: 250 |
| | | }, |
| | | |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | width: 250, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/repairOrder/listRepairOrderActualWorkHoursByMainId", |
| | | confirmHour:"/eam/repairOrder/addRepairOrderActualWorkHours" |
| | | list: '/eam/repairOrder/listRepairOrderActualWorkHoursByMainId', |
| | | confirmHour: '/eam/repairOrder/addRepairOrderActualWorkHours' |
| | | }, |
| | | changeIndex: 0 |
| | | } |
| | | }, |
| | | created(){ |
| | | this.queryParam['repairOrderId'] = this.repairOrderId; |
| | | this.loadData(1); |
| | | created() { |
| | | this.queryParam['repairOrderId'] = this.repairOrderId |
| | | this.loadData(1) |
| | | }, |
| | | methods: { |
| | | addHour() { |
| | | this.dataSource.push({userId:'',repairOrderId:this.repairOrderId,actualHour:0,username:'',realname:''}) |
| | | this.dataSource.push({ userId: '', repairOrderId: this.repairOrderId, actualHour: 0, username: '', realname: '' }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | | this.$emit('close') |
| | | this.dataSource = [] |
| | | this.disableSubmit = false; |
| | | this.visible = false; |
| | | this.disableSubmit = false |
| | | this.visible = false |
| | | }, |
| | | handleDeleteFake(index){ |
| | | this.dataSource.pop(index); |
| | | handleDeleteFake(index) { |
| | | this.dataSource.pop(index) |
| | | }, |
| | | handleOk(saveStatus) { |
| | | const that = this |
| | | if(saveStatus==0){ |
| | | let workHoursDataSource = that.dataSource; |
| | | if (saveStatus == 0) { |
| | | let workHoursDataSource = that.dataSource |
| | | for (let i = 0; i < workHoursDataSource.length; i++) { |
| | | if (workHoursDataSource[i].userId == undefined || workHoursDataSource[i].userId == null || workHoursDataSource[i].userId == '') { |
| | | that.$message.warning("请选择第"+(i+1)+"行维修人员!"); |
| | | return false; |
| | | that.$message.warning('请选择第' + (i + 1) + '行维修人员!') |
| | | return false |
| | | } |
| | | if(workHoursDataSource[i].actualHour == undefined || workHoursDataSource[i].actualHour == null||workHoursDataSource[i].actualHour==''){ |
| | | that.$message.warning("请填写第"+(i+1)+"行实际工时!"); |
| | | return false; |
| | | if (workHoursDataSource[i].actualHour == undefined || workHoursDataSource[i].actualHour == null || workHoursDataSource[i].actualHour == '') { |
| | | that.$message.warning('请填写第' + (i + 1) + '行实际工时!') |
| | | return false |
| | | } |
| | | } |
| | | } |
| | |
| | | if (!err) { |
| | | that.confirmLoading = true |
| | | let formData = {} |
| | | formData.repairOrderId = that.repairOrderId; |
| | | formData.actualHourList = that.dataSource; |
| | | formData.repairOrderId = that.repairOrderId |
| | | formData.actualHourList = that.dataSource |
| | | let obj = obj = postAction(this.url.confirmHour, formData) |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | that.loadData(1); |
| | | that.loadData(1) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleChange(value, key, column, index) { |
| | | let that = this; |
| | | const temp = [...that.dataSource]; |
| | | const target = temp[index]; |
| | | let that = this |
| | | const temp = [...that.dataSource] |
| | | const target = temp[index] |
| | | if (target) { |
| | | target[column.dataIndex] = value; |
| | | target[column.dataIndex] = value |
| | | if ('userId' == column.dataIndex) { |
| | | target['userId'] = value; |
| | | target['userId'] = value |
| | | } |
| | | if ('actualHour' == column.dataIndex) { |
| | | target['actualHour'] = value; |
| | | target['actualHour'] = value |
| | | } |
| | | that.dataSource = temp; |
| | | that.dataSource = temp |
| | | } |
| | | }, |
| | | onSearchUser(index) { |
| | |
| | | const target = temp[this.recordIndex] |
| | | if (target) { |
| | | console.log(record) |
| | | target.userId = record.id; |
| | | target.username = record.username; |
| | | target.realname = record.realname; |
| | | target.userId = record.id |
| | | target.username = record.username |
| | | target.realname = record.realname |
| | | this.dataSource = temp |
| | | } |
| | | }, |
| | | clearList(){ |
| | | this.dataSource=[]; |
| | | this.ipagination.current = 1 |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.ipagination.current = 1 |
| | | } |
| | | }, |
| | | watch:{ |
| | | repairOrderId:{ |
| | | watch: { |
| | | repairOrderId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | this.clearList(); |
| | | this.queryParam['repairOrderId'] = val |
| | | this.loadData(1); |
| | | } |
| | | handler(val) { |
| | | this.clearList() |
| | | this.queryParam['repairOrderId'] = val |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | :bordered='false' |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <a-table |
| | | ref="table" |
| | | ref='table' |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | @change="handleTableChange" |
| | | rowKey='id' |
| | | :columns='columns' |
| | | :dataSource='dataSource' |
| | | :pagination='ipagination' |
| | | @change='handleTableChange' |
| | | > |
| | | <template |
| | | v-for="col in columns" |
| | | :slot="col.dataIndex" |
| | | v-for='col in columns' |
| | | :slot='col.dataIndex' |
| | | slot-scope='text, record, index' |
| | | > |
| | | <div :key="col.dataIndex"> |
| | | <div :key='col.dataIndex'> |
| | | <a-input-search |
| | | v-if="col.dataIndex == 'username'" |
| | | enter-button |
| | | @search="onSearchUser(index)" |
| | | :value="text" |
| | | :read-only="true" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | @search='onSearchUser(index)' |
| | | :value='text' |
| | | :read-only='true' |
| | | @change='(e) => handleChange(e, record.key, col, index)' |
| | | :disabled="repairOrderStatus=='4'" |
| | | /> |
| | | <a-input-number |
| | | :value="text" |
| | | :value='text' |
| | | v-if="col.dataIndex == 'actualHour'" |
| | | :min="0" |
| | | :max="99999" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :min='0' |
| | | :max='99999' |
| | | @change='(e)=>handleChange(e, record.key, col, index)' |
| | | :disabled="repairOrderStatus=='4'" |
| | | /> |
| | | |
| | | <!-- <a-switch @change='(e)=>onChange(e, record.key, col, index)' :value='text' :disabled="repairOrderStatus=='4'"--> |
| | | <!-- v-if="col.dataIndex == 'principalContractor'" />--> |
| | | <a-select default-value='0' :value='text' :disabled="repairOrderStatus=='4'" |
| | | v-if="col.dataIndex == 'principalContractor'" |
| | | @change='(e)=>handleChange(e, record.key, col, index)'> |
| | | <a-select-opt-group> |
| | | <a-select-option value='1'> |
| | | 是 |
| | | </a-select-option> |
| | | <a-select-option value='0'> |
| | | 否 |
| | | </a-select-option> |
| | | </a-select-opt-group> |
| | | |
| | | </a-select> |
| | | <!-- <a-range-picker--> |
| | | <!-- :ranges="{ Today: [moment(), moment()], 'This Month': [moment(), moment().endOf('month')] }"--> |
| | | <!-- :show-time="{ format: 'HH:mm' }"--> |
| | | <!-- format="YYYY-MM-DD HH:mm"--> |
| | | <!-- :placeholder="['Start Time', 'End Time']"--> |
| | | <!-- v-if="col.dataIndex == 'startTime'" @change='onDateChange'--> |
| | | <!-- />--> |
| | | <a-date-picker |
| | | :disabled="repairOrderStatus=='4'" |
| | | :value='text' |
| | | format='YYYY-MM-DD HH:mm' |
| | | :show-time="{ defaultValue: moment('00:00', 'HH:mm') }" |
| | | v-if="col.dataIndex == 'startTime'" @change='(e)=>handleChange(e, record.key, col, index)' |
| | | /> |
| | | <!-- :disabled="repairOrderStatus=='4'"--> |
| | | <a-date-picker |
| | | :value='text' |
| | | format='YYYY-MM-DD HH:mm' |
| | | :show-time="{ defaultValue: moment('00:00', 'HH:mm') }" |
| | | v-if="col.dataIndex == 'endTime'" @change='(e)=>handleChange(e, record.key, col, index)' |
| | | /> |
| | | |
| | | <!-- <a-input-number--> |
| | | <!-- :value='text'--> |
| | | <!-- v-if="col.dataIndex == 'theoreticalTime'"--> |
| | | <!-- :min='0'--> |
| | | <!-- :max='99999'--> |
| | | <!-- :read-only='true'--> |
| | | <!-- @change='(e)=>handleChange(e, record.key, col, index)'--> |
| | | <!-- :disabled="true"--> |
| | | <!-- />--> |
| | | </div> |
| | | </template> |
| | | <span |
| | |
| | | > |
| | | <a |
| | | :disabled="repairOrderStatus=='4'" |
| | | @click="handleDelete(index)" |
| | | @click='handleDelete(index)' |
| | | >删除</a> |
| | | </span> |
| | | </a-table> |
| | | <a-button |
| | | style="width: 100%; margin-top: 16px; margin-bottom: 8px" |
| | | type="dashed" |
| | | icon="plus" |
| | | @click="addHour" |
| | | style='width: 100%; margin-top: 16px; margin-bottom: 8px' |
| | | type='dashed' |
| | | icon='plus' |
| | | @click='addHour' |
| | | :disabled="this.repairOrderStatus=='4' || this.repairOrderStatus=='2'" |
| | | >添加实际工时 |
| | | <!-- :disabled="mainId.status=='4'" --> |
| | |
| | | <a-row :style="{textAlign:'right'}"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel" |
| | | @click='handleCancel' |
| | | > |
| | | 取消 |
| | | </a-button> |
| | | <a-button |
| | | @click="handleOk(1)" |
| | | type="primary" |
| | | @click='handleOk(1)' |
| | | type='primary' |
| | | :style="{marginRight: '8px'}" |
| | | :disabled="this.repairOrderStatus=='4' || this.repairOrderStatus=='2'" |
| | | >暂存</a-button> |
| | | >暂存 |
| | | </a-button> |
| | | <a-button |
| | | @click="handleOk(0)" |
| | | type="primary" |
| | | @click='handleOk(0)' |
| | | type='primary' |
| | | :disabled="this.repairOrderStatus=='4' || this.repairOrderStatus=='2'" |
| | | >保存</a-button> |
| | | >保存 |
| | | </a-button> |
| | | </a-row> |
| | | <!-- :disabled="false" --> |
| | | </div> |
| | | <actual-hour-user-select |
| | | ref="actualUserSelect" |
| | | @sendUserRecord="sendUserRecord" |
| | | ref='actualUserSelect' |
| | | @sendUserRecord='sendUserRecord' |
| | | > |
| | | </actual-hour-user-select> |
| | | </a-card> |
| | |
| | | import pick from 'lodash.pick' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import ActualHourUserSelect from './select/ActualHourUserSelect.vue' |
| | | import moment from 'moment' |
| | | |
| | | export default { |
| | | name: 'RepairOrderActualWorkHoursList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | JEllipsis, |
| | | ActualHourUserSelect |
| | | |
| | | }, |
| | | // props: { |
| | | // mainId: { |
| | |
| | | type: String, |
| | | required: false, |
| | | default: '' |
| | | }, |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "实际工时", |
| | | title: '实际工时', |
| | | flag: false,//主页面的标记位 用于区分是否确认过工单工艺 来区分table页展示 工单工序 还是产品工序 |
| | | visible: false, |
| | | model: {}, |
| | | obj: {}, |
| | | maskClosable: true, |
| | |
| | | pageSize: 99, |
| | | pageSizeOptions: ['99', '199'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " 共" + total + "条" |
| | | return range[0] + '-' + range[1] + ' 共' + total + '条' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | |
| | | validatorRules: { |
| | | userId: { |
| | | rules: [ |
| | | { required: true, message: '请选择人员!' }, |
| | | { required: true, message: '请选择人员!' } |
| | | ] |
| | | }, |
| | | actual_hour: { |
| | | rules: [ |
| | | { required: false, message: '请填写工时!' }, |
| | | { required: false, message: '请填写工时!' } |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 7 }, |
| | | sm: { span: 7 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | drawerWidth: "100%", |
| | | drawerWidth: '100%', |
| | | visible: false, |
| | | disableSubmit: false, |
| | | disableSelect: false, |
| | |
| | | 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: '*人员编码', |
| | | dataIndex: 'username', |
| | | align: "center", |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'username' }, |
| | | className: 'red', |
| | | width: 250, |
| | | width: 250 |
| | | }, |
| | | { |
| | | title: '人员名称', |
| | | dataIndex: 'realname', |
| | | align: "center", |
| | | width: 250, |
| | | align: 'center', |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: '主承修人', |
| | | dataIndex: 'principalContractor', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'principalContractor' }, |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: '*实际工时', |
| | | dataIndex: 'actualHour', |
| | | align: "center", |
| | | align: 'center', |
| | | className: 'red', |
| | | scopedSlots: { customRender: 'actualHour' }, |
| | | width: 250, |
| | | width: 120 |
| | | }, |
| | | { |
| | | title: '开始时间', |
| | | dataIndex: 'startTime', |
| | | scopedSlots: { customRender: 'startTime' }, |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '结束时间', |
| | | dataIndex: 'endTime', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'endTime' } |
| | | }, |
| | | |
| | | { |
| | | title: '理论工时', |
| | | dataIndex: 'theoreticalTime', |
| | | align: 'center' |
| | | // scopedSlots: { customRender: 'theoreticalTime' }, |
| | | }, |
| | | { |
| | | title: '操作', |
| | |
| | | ], |
| | | url: { |
| | | list: '/eam/repairOrder/listRepairOrderActualWorkHoursByMainId', |
| | | confirmHour: '/eam/repairOrderActualHours/add', |
| | | confirmHour: '/eam/repairOrderActualHours/add' |
| | | }, |
| | | changeIndex: 0 |
| | | } |
| | |
| | | repairOrderId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | this.clearList(); |
| | | this.clearList() |
| | | this.queryParam['repairOrderId'] = val |
| | | this.loadData(1) |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | moment, |
| | | onChange(checked) { |
| | | console.log(`a-switch to ${checked}`) |
| | | }, |
| | | //时间选择修改 |
| | | onStartTimeChange() { |
| | | console.log() |
| | | |
| | | }, |
| | | onEndTimeChange() { |
| | | console.log() |
| | | |
| | | }, |
| | | addHour() { |
| | | this.dataSource.push({ userId: '', repairOrderId: this.repairOrderId, actualHour: 0, username: '', realname: '' }) |
| | | }, |
| | | handleCancel() { |
| | | this.$bus.$emit('closeDrawer'); |
| | | this.$bus.$emit('closeDrawer') |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | | this.$emit('close') |
| | | this.dataSource = [] |
| | | this.disableSubmit = false; |
| | | this.visible = false; |
| | | this.disableSubmit = false |
| | | this.visible = false |
| | | }, |
| | | handleDelete(text, record, index) { |
| | | this.dataSource.splice(index, 1); |
| | | this.dataSource.splice(index, 1) |
| | | }, |
| | | |
| | | handleOk(saveStatus) { |
| | | const that = this |
| | | if (saveStatus == 0) { |
| | | let workHoursDataSource = that.dataSource; |
| | | let workHoursDataSource = that.dataSource |
| | | for (let i = 0; i < workHoursDataSource.length; i++) { |
| | | if (workHoursDataSource[i].userId == undefined || workHoursDataSource[i].userId == null || workHoursDataSource[i].userId == '') { |
| | | that.$message.warning("请选择第" + (i + 1) + "行维修人员!"); |
| | | return false; |
| | | that.$message.warning('请选择第' + (i + 1) + '行维修人员!') |
| | | return false |
| | | } |
| | | if (workHoursDataSource[i].actualHour == undefined || workHoursDataSource[i].actualHour == null || workHoursDataSource[i].actualHour == '') { |
| | | that.$message.warning("请填写第" + (i + 1) + "行实际工时!"); |
| | | return false; |
| | | that.$message.warning('请填写第' + (i + 1) + '行实际工时!') |
| | | return false |
| | | } |
| | | } |
| | | } |
| | | if (that.dataSource.length === 0) { |
| | | that.$message.warning("请选择人员!") |
| | | that.$message.warning('请选择人员!') |
| | | return |
| | | } |
| | | this.form.validateFields((err, values) => { |
| | |
| | | that.confirmLoading = true |
| | | let formData = {} |
| | | // formData.repairOrderId = that.mainId.id; |
| | | formData.repairOrderId = that.repairOrderId; |
| | | formData.repairOrderActualWorkHoursList = that.dataSource; |
| | | formData.repairOrderId = that.repairOrderId |
| | | formData.repairOrderActualWorkHoursList = that.dataSource |
| | | for (let i = 0; i < formData.repairOrderActualWorkHoursList.length; i++) { |
| | | const start = formData.repairOrderActualWorkHoursList[i].startTime |
| | | const end = formData.repairOrderActualWorkHoursList[i].endTime |
| | | formData.repairOrderActualWorkHoursList[i].startTime = moment(start).format('yyyy-MM-DD HH:mm') |
| | | formData.repairOrderActualWorkHoursList[i].endTime = moment(end).format('yyyy-MM-DD HH:mm') |
| | | } |
| | | // formData.equipmentId = that.equipmentId; |
| | | let obj = obj = postAction(this.url.confirmHour, formData) |
| | | obj.then((res) => { |
| | |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.close() |
| | | that.loadData(1); |
| | | that.loadData(1) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleChange(value, key, column, index) { |
| | | let that = this; |
| | | const temp = [...that.dataSource]; |
| | | const target = temp[index]; |
| | | let that = this |
| | | const temp = [...that.dataSource] |
| | | const target = temp[index] |
| | | if (target) { |
| | | target[column.dataIndex] = value; |
| | | target[column.dataIndex] = value |
| | | if ('userId' == column.dataIndex) { |
| | | target['userId'] = value; |
| | | target['userId'] = value |
| | | } |
| | | if ('principalContractor' == column.dataIndex) { |
| | | target['principalContractor'] = value |
| | | } |
| | | |
| | | if ('actualHour' == column.dataIndex) { |
| | | target['actualHour'] = value; |
| | | target['actualHour'] = value |
| | | } |
| | | that.dataSource = temp; |
| | | // if ('theoreticalTime' == column.dataIndex) { |
| | | // target['theoreticalTime'] = value |
| | | // } |
| | | if ('startTime' == column.dataIndex) { |
| | | |
| | | if (target['endTime'] == null) { |
| | | target['startTime'] = value |
| | | } else if (target['startTime'] != null && target['endTime'] != null) { |
| | | const diffInHours = this.getTimeDiff(target['startTime'], target['endTime']) |
| | | if (diffInHours < 0) { |
| | | target['startTime'] = '' |
| | | target['theoreticalTime'] = '' |
| | | that.$message.error('请检查第' + (index + 1) + '行开始时间不能小于结束时间,请重新选择') |
| | | } else { |
| | | target['startTime'] = value |
| | | target['theoreticalTime'] = diffInHours |
| | | } |
| | | } else if (target['startTime'] == null && target['endTime'] != null) { |
| | | const diffInHours = this.getTimeDiff(value, target['endTime']) |
| | | if (diffInHours < 0) { |
| | | target['startTime'] = '' |
| | | target['theoreticalTime'] = '' |
| | | that.$message.error('请检查第' + (index + 1) + '行开始时间不能小于结束时间,请重新选择') |
| | | |
| | | } else { |
| | | target['startTime'] = value |
| | | target['theoreticalTime'] = diffInHours |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | if ('endTime' == column.dataIndex) { |
| | | if (target['startTime'] == null) { |
| | | target['endTime'] = value |
| | | } else if (target['startTime'] != null && target['endTime'] != null) { |
| | | const diffInHours = this.getTimeDiff(target['startTime'], target['endTime']) |
| | | if (diffInHours < 0) { |
| | | target['endTime'] = '' |
| | | target['theoreticalTime'] = '' |
| | | that.$message.error('请检查第' + (index + 1) + '行开始时间不能小于结束时间,请重新选择') |
| | | } else { |
| | | target['endTime'] = value |
| | | target['theoreticalTime'] = diffInHours |
| | | } |
| | | |
| | | } else if (target['startTime'] != null && target['endTime'] == null) { |
| | | const diffInHours = this.getTimeDiff(target['startTime'], value) |
| | | if (diffInHours < 0) { |
| | | target['endTime'] = '' |
| | | target['theoreticalTime'] = '' |
| | | that.$message.error('请检查第' + (index + 1) + '行开始时间不能小于结束时间,请重新选择') |
| | | |
| | | } else { |
| | | target['endTime'] = value |
| | | target['theoreticalTime'] = diffInHours |
| | | } |
| | | } |
| | | } |
| | | that.dataSource = temp |
| | | } |
| | | }, |
| | | onSearchUser(index) { |
| | |
| | | const target = temp[this.recordIndex] |
| | | if (target) { |
| | | console.log(record) |
| | | target.userId = record.id; |
| | | target.username = record.username; |
| | | target.realname = record.realname; |
| | | target.userId = record.id |
| | | target.username = record.username |
| | | target.realname = record.realname |
| | | this.dataSource = temp |
| | | } |
| | | }, |
| | | clearList() { |
| | | this.dataSource = []; |
| | | this.dataSource = [] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | // 获取开始时间和结束时间的时间差 |
| | | getTimeDiff(startTime, endTime) { |
| | | const start = moment(startTime, 'YYYY-MM-DD HH:mm:ss') |
| | | const end = moment(endTime, 'YYYY-MM-DD HH:mm:ss') |
| | | const diff = end.diff(start) |
| | | var duration = moment.duration(diff) |
| | | var diffInHours = duration.asHours() |
| | | return diffInHours.toFixed(1) |
| | | } |
| | | }, |
| | | } |
| | | |
| | | } |
| | | </script> |
| | |
| | | <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> |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="1250" |
| | | :width="1600" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ props: {disabled: disableSubmit} }" |
| | |
| | | :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> |
| | |
| | | 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", |
| | |
| | | JDate, |
| | | Tooltip, |
| | | JEllipsis, |
| | | store |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | 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: '故障时间', |
| | |
| | | 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" |
| | | }, |
| | | } |
| | | }, |
| | |
| | | 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 |
| | |
| | | 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 { |
| | |
| | | } |
| | | }; |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectedRows) { |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectedRowRecord = selectedRows[0]; |
| | | this.selectionRows = selectionRows; |
| | | }, |
| | | close() { |
| | | this.queryParam = {}; |
| | |
| | | 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(); |
| | | }, |
| | |
| | | height: 90% !important; |
| | | overflow-y: hidden; |
| | | } |
| | | |
| | | /deep/ .notshow { |
| | | .notshow { |
| | | display: none; |
| | | } |
| | | |
| | |
| | | } |
| | | .dataUnKnow { |
| | | color: #1890ff; |
| | | } |
| | | |
| | | /deep/ .frozenRowClass { |
| | | } .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | </style> |
| | |
| | | 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 |
| | |
| | | /> |
| | | </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> |
| | |
| | | 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', |
| | |
| | | type: Object, |
| | | required: false, |
| | | default: {} |
| | | }, |
| | | repairOrderId: { |
| | | type: String, |
| | | default:'', |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="危险源编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num"> |
| | | <a-input v-model="model.num" placeholder="请输入危险源编码" ></a-input> |
| | | <a-input v-model="model.num" placeholder="将由系统自动生成" disabled ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | |
| | | url: { |
| | | add: '/eam/riskPrevention/add', |
| | | edit: '/eam/riskPrevention/edit', |
| | | queryById: '/eam/riskPrevention/queryById' |
| | | queryById: '/eam/riskPrevention/queryById', |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | } |
| | | } |
| | | }, |
| | |
| | | edit(record) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | if (!record.id) { |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'RiskPrevention', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | submitForm() { |
| | | const that = this |
| | |
| | | <a-row> |
| | | <a-col :span='24'> |
| | | <a-form-item label='危险源编码' :labelCol='labelCol' :wrapperCol='wrapperCol'> |
| | | <a-input placeholder='请输入危险源编码' v-decorator="['num', validatorRules.num]"></a-input> |
| | | <a-input placeholder='将由系统自动生成' v-decorator="['num', validatorRules.num]" disabled></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span='24'> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | url: { |
| | | add: '/eam/riskPrevention/add', |
| | | edit: '/eam/riskPrevention/edit', |
| | | queryById: '/eam/riskPrevention/queryById' |
| | | queryById: '/eam/riskPrevention/queryById', |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | | alterFlag: '' |
| | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'num', 'name', 'remark','description','measure')) |
| | | }) |
| | | if (record.id) { |
| | | if (this.model.id) { |
| | | this.codeDisable = true |
| | | } else { |
| | | this.codeDisable = false |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'RiskPrevention', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | :wrapperCol="{span:18}" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :readOnly="true" |
| | | allow-clear |
| | | placeholder="请输入工区编号" |
| | | placeholder="将由系统自动生成" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | }, |
| | | url: { |
| | | add: "/base/area/add", |
| | | edit: "/base/area/edit" |
| | | edit: "/base/area/edit", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | disableSubmit: false, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'num', 'name', 'teamId', 'deptId', 'remark')) |
| | | }); |
| | | if (!record.id) { |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'Area', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | |
| | | :wrapperCol="{span:18}" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :readOnly="true" |
| | | allow-clear |
| | | placeholder="请输入工段编号" |
| | | placeholder="将由系统自动生成" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | }, |
| | | url: { |
| | | add: "/base/productionLine/add", |
| | | edit: "/base/productionLine/edit" |
| | | edit: "/base/productionLine/edit", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | disableSubmit: false, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'num', 'name', 'shiftCategoryId', 'remark')) |
| | | }); |
| | | if (!record.id) { |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'ProductionLine', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | |
| | | :wrapperCol="{span:18}" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :readOnly="true" |
| | | allow-clear |
| | | placeholder="请输入工厂编号" |
| | | placeholder="将由系统自动生成" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | }, |
| | | url: { |
| | | add: "/base/site/add", |
| | | edit: "/base/site/edit" |
| | | edit: "/base/site/edit", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | disableSubmit: false, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'num', 'name', 'remark')) |
| | | }); |
| | | if (!record.id) { |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'Site', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="codeDisable" |
| | | :placeholder="disableSubmit?'':'请输入增减方式编号'" |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'将由系统自动生成'" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | }, |
| | | url: { |
| | | add: "/eam/transferMethod/add", |
| | | edit: "/eam/transferMethod/edit" |
| | | edit: "/eam/transferMethod/edit", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | | alterFlag: "" |
| | |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'TransferMethod', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | <a-input |
| | | placeholder="将由系统生成" |
| | | v-decorator="['num', validatorRules.num]" |
| | | disabled |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | // this.$nextTick(() => { |
| | | // getAction(this.url.getNum, { type: 'SparePart', length: '4' }).then((res) => { |
| | | // if (res.success) { |
| | | // this.form.setFieldsValue({ num: res.message }); |
| | | // } |
| | | // }) |
| | | // }); |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'SparePart', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | handleOk() { |
| | | const that = this; |
| | | // 触发表单验证 |
| | | this.form.validateFields(async (err, values) => { |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let formData = Object.assign(this.model, values); |
| | | let obj; |
| | | if (!this.model.id) { |
| | | if(!formData.num){ |
| | | await getAction(this.url.getNum, { type: 'SparePart', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | formData.num = res.message; |
| | | } |
| | | }); |
| | | } |
| | | // if(!formData.num){ |
| | | // await getAction(this.url.getNum, { type: 'SparePart', length: '4' }).then((res) => { |
| | | // if (res.success) { |
| | | // formData.num = res.message; |
| | | // } |
| | | // }); |
| | | // } |
| | | formData.sparePartCategoryId = this.sparePartCategoryId |
| | | obj = postAction(this.url.add, formData); |
| | | } else { |
| | |
| | | }, |
| | | created() { |
| | | this.initOptions(); |
| | | this.initNum() |
| | | }, |
| | | methods: { |
| | | initNum() { |
| | | getAction(this.url.getNum, { type: 'SparePartReceive', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | |
| | | /* this.model.setFieldsValue({ num: res.message }); */ |
| | | } |
| | | }) |
| | | }, |
| | | getSysDeparts() { |
| | | getAction(this.url.getSysDeparts).then((res) => { |
| | | if (res.success) { |
| | |
| | | if (this.model.id) { |
| | | let params = { id: this.model.id } |
| | | this.requestSubTableData(this.url.sparesReceiveDetail.list, params, this.sparesReceiveDetailTable) |
| | | }else{ |
| | | getAction(this.url.getNum, { type: 'SparePartReceive', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | //校验所有一对一子表表单 |
| | |
| | | }, |
| | | created() { |
| | | this.initOptions() |
| | | this.initNum() |
| | | }, |
| | | methods: { |
| | | initNum() { |
| | | getAction(this.url.getNum, { type: 'SparePartScrap', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | } |
| | | }) |
| | | }, |
| | | initOptions() { |
| | | getAction(this.url.loadOptions).then(res => { |
| | | if (res.success) { |
| | |
| | | if (this.model.id) { |
| | | let params = { id: this.model.id } |
| | | this.requestSubTableData(this.url.sparesScrapDetail.list, params, this.sparesScrapDetailTable) |
| | | }else{ |
| | | getAction(this.url.getNum, { type: 'SparePartScrap', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | //校验所有一对一子表表单 |
| | |
| | | }, |
| | | created() { |
| | | this.initOptions() |
| | | this.initNum() |
| | | }, |
| | | methods: { |
| | | |
| | |
| | | }); |
| | | } |
| | | }, */ |
| | | |
| | | initNum() { |
| | | getAction(this.url.getNum, { type: 'SparePartRequirement', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | |
| | | /* this.model.setFieldsValue({ num: res.message }); */ |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | initOptions() { |
| | | getAction(this.url.loadOptions).then(res => { |
| | |
| | | if (this.model.id) { |
| | | let params = { id: this.model.id } |
| | | this.requestSubTableData(this.url.sparesScrapRequirementDetail.list, params, this.sparesScrapRequirementDetailTable) |
| | | }else{ |
| | | getAction(this.url.getNum, { type: 'SparePartRequirement', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | //校验所有一对一子表表单 |
| | |
| | | :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> |
| | |
| | | dataIndex: 'productionName' |
| | | }, |
| | | { |
| | | title: '班组', |
| | | align: "center", |
| | | width: 240, |
| | | dataIndex: 'teamId_dictText' |
| | | }, |
| | | { |
| | | title: '状态', |
| | | align: "center", |
| | | width: 80, |
| | |
| | | <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 |
| | |
| | | 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:"操作", |