| | |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="å·¥åç¶æ"> |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | placeholder="è¯·éæ©å·¥åç¶æ" |
| | | :triggerChange="true" |
| | | dictCode="repair_order_status" |
| | | v-model="queryParam.status" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="ç»´æ¤å·¥åç¼ç "> |
| | | <a-input |
| | | placeholder="请è¾å
¥ç»´æ¤å·¥åç¼ç " |
| | |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!-- <a-col |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="ç¹æ£æ¹æ³åç§°"> |
| | | <j-input |
| | | placeholder="请è¾å
¥ç¹æ£æ¹æ³åç§°" |
| | | v-model="queryParam.name" |
| | | ></j-input> |
| | | <a-form-item label="设å¤ç¼ç "> |
| | | <a-input |
| | | placeholder="请è¾å
¥è®¾å¤ç¼ç " |
| | | v-model="queryParam.equipmentNum" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> --> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input |
| | | placeholder="请è¾å
¥è®¾å¤åç§°" |
| | | v-model="queryParam.equipmentName" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button |
| | | <!-- <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | |
| | | type="primary" |
| | | @click="batchAssign" |
| | | style="margin-left: 8px" |
| | | >工忴¾å·¥</a-button> |
| | | >工忴¾å·¥</a-button> --> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | |
| | | ref="PredictiveWorkOrderDrawer" |
| | | @ok="modalFormOk" |
| | | ></predictive-work-order-drawer> |
| | | <order-assign-modal |
| | | ref="OrderAssign" |
| | | @ok="modalFormOk" |
| | | > |
| | | |
| | | </order-assign-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import PredictiveWorkOrderModel from './modules/predictiveWorkOrder/PredictiveWorkOrderModel' |
| | | import PredictiveWorkOrderDrawer from './modules/predictiveWorkOrder/PredictiveWorkOrderDrawer' |
| | | |
| | | |
| | | import OrderAssignModal from './modules/predictiveWorkOrder/OrderAssignModal.vue' |
| | | export default { |
| | | name: 'PredictiveWorkOrderList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | PredictiveWorkOrderModel, |
| | | PredictiveWorkOrderDrawer |
| | | PredictiveWorkOrderDrawer, |
| | | OrderAssignModal |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | deleteBatch: "/eam/specialtyMaintenanceOrder/deleteBatch", |
| | | exportXlsUrl: "/eam/specialtyMaintenanceOrder/exportXls", |
| | | importExcelUrl: "eam/specialtyMaintenanceOrder/importExcel", |
| | | edit: "/eam/specialtyMaintenanceOrder/editStatus", |
| | | orderGet: "/eam/specialtyMaintenanceOrder/orderGet", |
| | | edit: "/eam/predictiveworkorder/editStatus", |
| | | orderGet: "/eam/predictiveworkorder/orderGet", |
| | | }, |
| | | } |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | handleAssignOrder: function (record) { |
| | | this.$refs.SpecialtyMaintenanceOrderAssignModal.edit(record) |
| | | this.$refs.SpecialtyMaintenanceOrderAssignModal.title = 'å·¥åæ¹æ´¾' |
| | | this.$refs.SpecialtyMaintenanceOrderAssignModal.disableSubmit = false |
| | | this.$refs.OrderAssign.edit(record) |
| | | this.$refs.OrderAssign.title = 'å·¥åæ¹æ´¾' |
| | | this.$refs.OrderAssign.disableSubmit = false |
| | | }, |
| | | // modalFormOk() { |
| | | // alert(0) |
| | |
| | | this.selectionRows = [] |
| | | this.planId = '' |
| | | this.equipmentId = '' |
| | | this.isAdd = false |
| | | this.isAdd = falses |
| | | |
| | | }, |
| | | handleDelete: function(id) { |
| | | if (!this.url.delete) { |
| | |
| | | const that = this |
| | | that.confirmLoading = true |
| | | this.$confirm({ |
| | | title: 'æ¥å¸¸ä¿å
»æ åçæ¬çæï¼', |
| | | title: 'çæ¬çæï¼', |
| | | content: 'æç¤ºï¼çæ¬çæåä¸ä¸çæ¬å°èªå¨å¤±æï¼è¯·è°¨æ
æä½ï¼', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | /> |
| | | <a-input-number |
| | | :value="text" |
| | | v-if="col.dataIndex == 'actualQuantity'" |
| | | v-if="col.dataIndex == 'quantity'" |
| | | :min="1" |
| | | :max="99999" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="record.disabled" |
| | | :disabled="record.isLock == 'yes'||orderStatus!='4'" |
| | | /> |
| | | |
| | | </div> |
| | | </template> |
| | | <span |
| | | slot='action' |
| | | slot-scope='text, record,index' |
| | | slot-scope='text, record' |
| | | > |
| | | <a @click="handleDeleteFake(index)">å é¤</a> |
| | | <a-popconfirm |
| | | title="确认éæå?" |
| | | @confirm="() => handleLock(record)" |
| | | > |
| | | <a |
| | | v-has="'specialtyMaintenanceOrder:actualMaterialLock'" |
| | | v-if="record.isLock=='no'&&orderStatus=='4'" |
| | | >éæ</a> |
| | | </a-popconfirm> |
| | | <a-divider |
| | | v-if="record.isLock=='no'" |
| | | type="vertical" |
| | | /> |
| | | <a-popconfirm |
| | | title="è§£éåä¼èªå¨éæ¾åºåï¼ç¡®è®¤è§£éå?" |
| | | @confirm="() => handleUnLock(record)" |
| | | > |
| | | <a |
| | | v-has="'specialtyMaintenanceOrder:actualMaterialLock'" |
| | | v-if="record.isLock=='yes'&&orderStatus=='4'" |
| | | >è§£é</a> |
| | | </a-popconfirm> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a |
| | | v-has="'specialtyMaintenanceOrder:actualMaterialDelete'" |
| | | v-if="record.isLock=='no'&&orderStatus=='4'" |
| | | >å é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | </a-table> |
| | | <a-button |
| | |
| | | type="dashed" |
| | | icon="plus" |
| | | @click="addMaterial" |
| | | :disabled="repairOrderStatus!='3'" |
| | | >æ·»å å®é
ç¨æ |
| | | |
| | | </a-button> |
| | | :disabled="orderStatus!='4'" |
| | | v-has="'specialtyMaintenanceOrder:actualMaterialAdd'" |
| | | >æ·»å å®é
ç¨æ</a-button> |
| | | <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :style="{textAlign:'right'}"> |
| | | <a-button |
| | | <!-- <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel" |
| | | :disabled="repairOrderStatus!='3'" |
| | | > |
| | | æ¸
空 |
| | | </a-button> |
| | | <a-button |
| | | åæ¶ |
| | | </a-button> --> |
| | | <!-- <a-button |
| | | @click="handleOk(1)" |
| | | type="primary" |
| | | :style="{marginRight: '8px'}" |
| | | :disabled="repairOrderStatus!='3'" |
| | | :disabled="orderStatus!='4'" |
| | | >æå</a-button> |
| | | <a-button |
| | | @click="handleOk(0)" |
| | | type="primary" |
| | | :disabled="repairOrderStatus!='3'" |
| | | >ä¿å</a-button> |
| | | :disabled="orderStatus!='4'" |
| | | >ä¿å</a-button> --> |
| | | </a-row> |
| | | <!-- :disabled="false" --> |
| | | </div> |
| | | <actual-material-select |
| | | ref="actualMaterialSelect" |
| | | @sendMaterialRecord="sendMaterialRecord" |
| | | > |
| | | <actual-material-select |
| | | @getSelectRows="getSelectRows" |
| | | ref='JSelectSparePartModal'> |
| | | <!-- @sendMaterialRecord="sendMaterialRecord" --> |
| | | </actual-material-select> |
| | | </a-card> |
| | | </template> |
| | |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | JEllipsis, |
| | | ActualMaterialSelect |
| | | ActualMaterialSelect, |
| | | }, |
| | | props: { |
| | | repairOrderId: { |
| | | type: String, |
| | | required: false, |
| | | default: '-1' |
| | | }, |
| | | repairOrderStatus: { |
| | | orderId: { |
| | | type: String, |
| | | required: false, |
| | | default: '' |
| | | } |
| | | }, |
| | | orderStatus: { |
| | | type: String, |
| | | required: false, |
| | | default: '' |
| | | }, |
| | | equipmentId: { |
| | | type: String, |
| | | required: false, |
| | | default: '' |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "å·¥èºç¡®è®¤", |
| | | flag: false,//主页é¢çæ è®°ä½ ç¨äºåºåæ¯å¦ç¡®è®¤è¿å·¥åå·¥èº æ¥åºåtable页å±ç¤º å·¥åå·¥åº è¿æ¯äº§åå·¥åº |
| | | disableMixiCreated:true, |
| | | title: "å®é
ç¨æ", |
| | | visible: false, |
| | | model: {}, |
| | | obj: {}, |
| | | maskClosable: true, |
| | | confirmLoading: false, |
| | | // specialyMaintenanceOrderStatus: '', |
| | | form: this.$form.createForm(this), |
| | | /* å页忰 */ |
| | | ipagination: { |
| | |
| | | { required: true, message: 'è¯·éæ©ç©æ!' }, |
| | | ] |
| | | }, |
| | | actualQuantity: { |
| | | quantity: { |
| | | rules: [ |
| | | { required: false, message: 'è¯·å¡«åæ°é!' }, |
| | | ] |
| | |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: '颿åºåºåå·', |
| | | { |
| | | title: '颿åºåºå', |
| | | dataIndex: 'num', |
| | | align: "center", |
| | | width: 150, |
| | |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/repairOrder/listRepairOrderActualMaterialByMainId", |
| | | confirmMaterial: "/eam/repairOrder/addRepairOrderActualMaterial" |
| | | list: "/eam/maintenanceOrderActualMaterial/getMaintenanceOrderActualMaterialList", |
| | | confirmMaterial: "/eam/maintenanceOrderActualMaterial/add", |
| | | delete: "/eam/maintenanceOrderActualMaterial/delete", |
| | | addInit: "/eam/maintenanceOrderActualMaterial/addInit", |
| | | lock: "/eam/maintenanceOrderActualMaterial/lock", |
| | | unLock: "/eam/maintenanceOrderActualMaterial/unLock" |
| | | }, |
| | | changeIndex: 0 |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | this.queryParam['repairOrderId'] = this.repairOrderId; |
| | | this.loadData(1); |
| | | watch: { |
| | | orderId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if(this.orderId){ |
| | | alert |
| | | this.queryParam['maintenanceOrderId'] = val |
| | | this.queryParam['equipmentId'] = this.equipmentId |
| | | this.queryParam['delFlag'] = 0 |
| | | this.loadData(1); |
| | | }else{ |
| | | this.clearList(); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | addMaterial() { |
| | | this.dataSource.push({ materialId: '', repairOrderId: this.repairOrderId, actualQuantity: 1, materialNum: '', materialName: '', materialModel: '', materialSpecification: '', unitId_dictText: '' }) |
| | | let ids = []; |
| | | for (let i = 0; i < this.dataSource.length; i++) { |
| | | ids.push(this.dataSource[i].outboundOrderDetailId); |
| | | } |
| | | this.$refs.JSelectSparePartModal.showModals(ids); |
| | | this.$refs.JSelectSparePartModal.title = 'éæ©å¤ä»¶ä¿¡æ¯' |
| | | this.$refs.JSelectSparePartModal.disableSubmit = false |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | this.$bus.$emit('closeDrawer'); |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | |
| | | that.$message.warning("è¯·éæ©ç¬¬" + (i + 1) + "è¡ç©æï¼"); |
| | | return false; |
| | | } |
| | | if (materialDataSource[i].actualQuantity == undefined || materialDataSource[i].actualQuantity == null || materialDataSource[i].actualQuantity == '') { |
| | | if (materialDataSource[i].quantity == undefined || materialDataSource[i].quantity == null || materialDataSource[i].quantity == '') { |
| | | that.$message.warning("请填å第" + (i + 1) + "è¡ç¨ææ°ï¼"); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | if (that.dataSource.length === 0) { |
| | | that.$message.warning("请添å ç©æï¼") |
| | | return |
| | | } |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true |
| | | let formData = {} |
| | | formData.repairOrderId = that.repairOrderId; |
| | | formData.actualMaterialList = that.dataSource; |
| | | formData.maintenanceOrderId = that.specialyMaintenanceOrderId; |
| | | formData.maintenanceOrderActualMaterials = that.dataSource; |
| | | formData.equipmentId = that.equipmentId; |
| | | let obj = obj = postAction(this.url.confirmMaterial, formData) |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | |
| | | }) |
| | | }, |
| | | handleChange(value, key, column, index) { |
| | | let that = this; |
| | | const temp = [...that.dataSource]; |
| | | const target = temp[index]; |
| | | console.log(column) |
| | | const temp = [...this.dataSource] |
| | | const target = temp[index] |
| | | let availableQuantity = target['availableQuantity'] |
| | | if (target) { |
| | | target[column.dataIndex] = value; |
| | | if ('materialId' == column.dataIndex) { |
| | | target['materialId'] = value; |
| | | if (value != undefined && value != null && value != '' && availableQuantity < value) { |
| | | this.$message.error('ä½¿ç¨æ°éä¸è½å¤§äºå¯ç¨æ°é!') |
| | | } else { |
| | | } |
| | | if ('actualQuantity' == column.dataIndex) { |
| | | target['actualQuantity'] = value; |
| | | } |
| | | that.dataSource = temp; |
| | | target[column.dataIndex] = value |
| | | this.dataSource = temp |
| | | } |
| | | }, |
| | | onSearchMaterial(index) { |
| | |
| | | this.$refs.actualMaterialSelect.list() |
| | | this.$refs.actualMaterialSelect.title = 'ç©æéæ©' |
| | | }, |
| | | sendMaterialRecord(data, val) { |
| | | let record = data.record |
| | | const temp = [...this.dataSource] |
| | | const target = temp[this.recordIndex] |
| | | if (target) { |
| | | console.log(target) |
| | | target.materialId = record.id; |
| | | target.materialName = record.name; |
| | | target.materialNum = record.num; |
| | | target.materialModel = record.model; |
| | | target.materialSpecification = record.specification; |
| | | target.unitId_dictText = record.unitId_dictText; |
| | | this.dataSource = temp |
| | | } |
| | | }, |
| | | clearList() { |
| | | this.dataSource = []; |
| | | this.ipagination.current = 1 |
| | | }, |
| | | // getUuiD(randomLength) { |
| | | // return Number( |
| | | // Math.random() |
| | | // .toString() |
| | | // .substr(2, randomLength) + Date.now() |
| | | // ).toString(36) |
| | | // }, |
| | | handleLock(record) { |
| | | let that = this; |
| | | if (record.quantity == null || record.quantity == undefined || record.quantity == '') { |
| | | this.$message.error('请å
å¡«åæ°é!'); |
| | | return false |
| | | } |
| | | if (record.availableQuantity < record.quantity) { |
| | | this.$message.error('ä½¿ç¨æ°éä¸è½å¤§äºå¯ç¨æ°é!'); |
| | | return false; |
| | | } |
| | | this.confirmLoading = true; |
| | | postAction(this.url.lock, record).then(res => { |
| | | if (res.success) { |
| | | this.$message.success("åºåé宿åï¼") |
| | | } else { |
| | | this.$message.error(res.message) |
| | | } |
| | | }).finally(res => { |
| | | that.confirmLoading = false |
| | | that.loadData(); |
| | | }) |
| | | |
| | | }, |
| | | handleUnLock(record) { |
| | | let that = this; |
| | | this.confirmLoading = true; |
| | | postAction(this.url.unLock, record).then(res => { |
| | | if (res.success) { |
| | | this.$message.success("åºåè§£éæåï¼") |
| | | } else { |
| | | this.$message.error(res.message) |
| | | } |
| | | }).finally(res => { |
| | | that.confirmLoading = false |
| | | that.loadData(); |
| | | }) |
| | | }, |
| | | getSelectRows(data){ |
| | | let newActualMaterials = []; |
| | | for (let i = 0; i < data.length; i++) { |
| | | newActualMaterials.push({ |
| | | // id: this.getUuiD(16), |
| | | // num: data[i].num, |
| | | outboundOrderDetailId: data[i].id, |
| | | sparePartId: data[i].sparePartId, |
| | | // sparePartNum: data[i].spareNum, |
| | | // sparePartName: data[i].spareName, |
| | | // specification: data[i].specification, |
| | | // model: data[i].model, |
| | | // constructorName: data[i].constructorName, |
| | | // constructorId: data[i].constructorId, |
| | | // mainUnitName: data[i].mainUnitName, |
| | | // mainUnitId: data[i].mainUnitId, |
| | | mainQuantity: data[i].mainQuantity, |
| | | useQuantity: data[i].useQuantity, |
| | | availableQuantity: data[i].availableQuantity, |
| | | maintenanceOrderId: this.orderId, |
| | | equipmentId: this.equipmentId, |
| | | isLock: 'no' |
| | | }) |
| | | } |
| | | let that = this |
| | | postAction(this.url.addInit, newActualMaterials).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(res => { |
| | | newActualMaterials = [] |
| | | that.loadData(); |
| | | |
| | | }) |
| | | |
| | | } |
| | | }, |
| | | |
| | | watch: { |
| | | repairOrderId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | this.clearList(); |
| | | this.queryParam['repairOrderId'] = val |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | <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> |
| | | </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 |
| | | <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" |
| | | :disabled="orderStatus!='4'" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | /> |
| | | <a-input-number |
| | | :value="text" |
| | | v-if="col.dataIndex == 'actualWorkingHourQuota'" |
| | | :min="0" |
| | | :max="99999" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="record.disabled||orderStatus!='4'" |
| | | /> |
| | | |
| | | </div> |
| | | </template> |
| | | <span |
| | | slot='action' |
| | | slot-scope='text, record,index' |
| | | > |
| | | <a |
| | | v-has="'specialtyMaintenanceOrder:actualWorkHoursDelete'" |
| | | v-if="orderStatus=='4'" |
| | | @click="handleDelete(index)" |
| | | >å é¤</a> |
| | | </span> |
| | | </a-table> |
| | | <a-button |
| | | style="width: 100%; margin-top: 16px; margin-bottom: 8px" |
| | | type="dashed" |
| | | icon="plus" |
| | | @click="addHour" |
| | | :disabled="orderStatus!='4'" |
| | | >æ·»å å®é
å·¥æ¶ |
| | | </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" |
| | | > |
| | | åæ¶ |
| | | </a-button> |
| | | <a-button |
| | | @click="handleOk(1)" |
| | | type="primary" |
| | | :style="{marginRight: '8px'}" |
| | | :disabled="orderStatus!='4'" |
| | | v-has="'specialtyMaintenanceOrder:actualWorkHoursTS'" |
| | | >æå</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> |
| | | :disabled="orderStatus!='4'" |
| | | v-has="'specialtyMaintenanceOrder:actualWorkHoursSave'" |
| | | >ä¿å</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 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: { |
| | | orderId: { |
| | | type: String, |
| | | required: false, |
| | | default: '' |
| | | }, |
| | | repairOrderStatus:{ |
| | | type:String, |
| | | required:false, |
| | | default:'' |
| | | } |
| | | orderStatus: { |
| | | type: String, |
| | | required: false, |
| | | default: '' |
| | | }, |
| | | equipmentId: { |
| | | type: String, |
| | | required: false, |
| | | default: '' |
| | | }, |
| | | teamId: { |
| | | type: String, |
| | | required: false, |
| | | default: '' |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "å·¥èºç¡®è®¤", |
| | | title: "å®é
å·¥æ¶", |
| | | flag: false,//主页é¢çæ è®°ä½ ç¨äºåºåæ¯å¦ç¡®è®¤è¿å·¥åå·¥èº æ¥åºåtable页å±ç¤º å·¥åå·¥åº è¿æ¯äº§åå·¥åº |
| | | visible: false, |
| | | model: {}, |
| | |
| | | }, |
| | | actual_hour: { |
| | | rules: [ |
| | | { required: false, message: '请填åå·¥æ¶!'}, |
| | | { required: false, message: '请填åå·¥æ¶!' }, |
| | | ] |
| | | }, |
| | | }, |
| | |
| | | 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: 'actualWorkingHourQuota', |
| | | align: "center", |
| | | className: 'red', |
| | | scopedSlots: { customRender: 'actualWorkingHourQuota' }, |
| | | width: 250, |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | width: 250, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/repairOrder/listRepairOrderActualWorkHoursByMainId", |
| | | confirmHour:"/eam/repairOrder/addRepairOrderActualWorkHours" |
| | | list: "/eam/maintenanceOrderActualWorkingHour/getMaintenanceOrderActualWorkingHourList", |
| | | confirmHour: "/eam/maintenanceOrderActualWorkingHour/add" |
| | | }, |
| | | changeIndex: 0 |
| | | } |
| | | }, |
| | | created(){ |
| | | this.queryParam['repairOrderId'] = this.repairOrderId; |
| | | created() { |
| | | this.queryParam['maintenanceOrderId'] = this.orderId; |
| | | this.queryParam['equipmentId'] = this.equipmentId |
| | | this.loadData(1); |
| | | }, |
| | | watch: { |
| | | orderId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | this.clearList(); |
| | | this.queryParam['maintenanceOrderId'] = val |
| | | this.queryParam['equipmentId'] = this.equipmentId |
| | | this.loadData(1); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | addHour() { |
| | | this.dataSource.push({userId:'',repairOrderId:this.repairOrderId,actualHour:0,username:'',realname:''}) |
| | | this.dataSource.push({ id: this.getUuiD(16), userId: '', maintenanceOrderId: this.dailyMaintenanceOrderId, actualWorkingHourQuota: 0, username: '', realname: '' }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | this.$bus.$emit('closeDrawer'); |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | |
| | | this.disableSubmit = false; |
| | | this.visible = false; |
| | | }, |
| | | handleDeleteFake(index){ |
| | | this.dataSource.pop(index); |
| | | // handleDeleteFake(index) { |
| | | // this.dataSource.splice(index,1); |
| | | // }, |
| | | handleDelete(text, record, index) { |
| | | this.dataSource.splice(index, 1); |
| | | }, |
| | | |
| | | handleOk(saveStatus) { |
| | | const that = this |
| | | if(saveStatus==0){ |
| | | 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)+"è¡ç»´ä¿®äººåï¼"); |
| | | that.$message.warning("è¯·éæ©ç¬¬" + (i + 1) + "è¡ç»´ä¿®äººåï¼"); |
| | | return false; |
| | | } |
| | | if(workHoursDataSource[i].actualHour == undefined || workHoursDataSource[i].actualHour == null||workHoursDataSource[i].actualHour==''){ |
| | | that.$message.warning("请填å第"+(i+1)+"è¡å®é
å·¥æ¶ï¼"); |
| | | if (workHoursDataSource[i].actualWorkingHourQuota == undefined || workHoursDataSource[i].actualWorkingHourQuota == null || workHoursDataSource[i].actualWorkingHourQuota == '') { |
| | | that.$message.warning("请填å第" + (i + 1) + "è¡å®é
å·¥æ¶ï¼"); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | if (that.dataSource.length === 0) { |
| | | that.$message.warning("è¯·éæ©äººåï¼") |
| | | return |
| | | } |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true |
| | | let formData = {} |
| | | formData.repairOrderId = that.repairOrderId; |
| | | formData.actualHourList = that.dataSource; |
| | | formData.maintenanceOrderId = that.orderId; |
| | | formData.maintenanceOrderActualWorkingHourList = that.dataSource; |
| | | formData.equipmentId = that.equipmentId; |
| | | let obj = obj = postAction(this.url.confirmHour, formData) |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | |
| | | if ('userId' == column.dataIndex) { |
| | | target['userId'] = value; |
| | | } |
| | | if ('actualHour' == column.dataIndex) { |
| | | target['actualHour'] = value; |
| | | if ('actualWorkingHourQuota' == column.dataIndex) { |
| | | target['actualWorkingHourQuota'] = value; |
| | | } |
| | | that.dataSource = temp; |
| | | } |
| | | }, |
| | | onSearchUser(index) { |
| | | this.recordIndex = index |
| | | this.$refs.actualUserSelect.list() |
| | | this.$refs.actualUserSelect.list(this.teamId) |
| | | this.$refs.actualUserSelect.title = '人åéæ©' |
| | | }, |
| | | sendUserRecord(data, val) { |
| | |
| | | this.dataSource = temp |
| | | } |
| | | }, |
| | | clearList(){ |
| | | this.dataSource=[]; |
| | | this.ipagination.current = 1 |
| | | } |
| | | clearList() { |
| | | this.dataSource = []; |
| | | this.ipagination.current = 1 |
| | | }, |
| | | getUuiD(randomLength) { |
| | | return Number( |
| | | Math.random() |
| | | .toString() |
| | | .substr(2, randomLength) + Date.now() |
| | | ).toString(36) |
| | | }, |
| | | }, |
| | | watch:{ |
| | | repairOrderId:{ |
| | | immediate: true, |
| | | handler(val) { |
| | | this.clearList(); |
| | | this.queryParam['repairOrderId'] = val |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :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-form-item |
| | | label="å·¥åç»ä¸ç¼ç " |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥å·¥åç»ä¸ç¼ç '" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="ç»´æ¤æ¥æ" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-date |
| | | :disabled="disableSubmit" |
| | | v-decorator="['planStartTime', validatorRules.planStartTime ]" |
| | | placeholder="è¯·éæ©ä¿å
»æ¶é´" |
| | | style="width: 100%" |
| | | :showTime="true" |
| | | dateFormat="YYYY-MM-DD HH:mm:ss" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="颿µæ§ç»´æ¤æ¹æ¡" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'è¯·éæ©é¢æµæ§ç»´æ¤æ¹æ¡'" |
| | | v-decorator="['planNum', validatorRules.planNum ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="派工æ¹å¼" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'è¯·éæ©æ´¾å·¥æ¹å¼'" |
| | | :triggerChange="true" |
| | | dictCode="assign_mode" |
| | | v-decorator="['assignMode', validatorRules.assignMode]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="责任çç»" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥è´£ä»»çç»'" |
| | | v-decorator="['teamId_dictText', validatorRules.teamId_dictText ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="责任人" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input-search |
| | | :disabled="false" |
| | | placeholder="责任人" |
| | | enter-button |
| | | @search="onDutyUserList()" |
| | | :read-only="true" |
| | | v-decorator="['maintenanceUserId_dictText', validatorRules.maintenanceUserId_dictText]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row |
| | | hidden |
| | | :gutter="24" |
| | | > |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="责任çç»Id" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥è´£ä»»çç»Id'" |
| | | v-decorator="['teamId', validatorRules.teamId ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="责任人/ç¹æ£äººId" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥è´£ä»»äºº/ç¹æ£äºº'" |
| | | v-decorator="['maintenanceUserId', validatorRules.maintenanceUserId ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | |
| | | <template slot="footer"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel()" |
| | | > |
| | | å
³é |
| | | </a-button> |
| | | |
| | | <a-button |
| | | @click="handleOk()" |
| | | type="primary" |
| | | :loading="confirmLoading" |
| | | >ç¡®å®</a-button> |
| | | </template> |
| | | <user-list |
| | | ref="UserList" |
| | | @sendDutyUserRecord='sendDutyUserRecord' |
| | | ></user-list> |
| | | </a-modal> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | import JMultiSelectTag from '@/components/dict/JMultiSelectTag' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import UserList from '../specialtyMaintenanceOrder/UserList.vue' |
| | | export default { |
| | | name: "SpecialtyInspectionOrderModal", |
| | | components: { |
| | | JMultiSelectTag, |
| | | Tooltip, |
| | | UserList, |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | | visible: false, |
| | | disableSubmit: false, |
| | | codeDisable: true, |
| | | model: {}, |
| | | inspectionCycles: [], |
| | | // isHidden: true, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | }, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | num: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥ç¼ç !' }, |
| | | ] |
| | | }, |
| | | planStartTime: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©æ¥æ!' }, |
| | | ] |
| | | }, |
| | | maintenanceUserId_dictText: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©è´£ä»»äºº!' }, |
| | | ] |
| | | }, |
| | | assignMode: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©æ´¾å·¥æ¹å¼!' }, |
| | | ] |
| | | }, |
| | | teamId_dictText: { |
| | | rules: [ |
| | | { required: true, message: 'è¯·éæ©è´£ä»»çç»!' }, |
| | | ] |
| | | }, |
| | | }, |
| | | url: { |
| | | assign: "/eam/predictiveworkorder/assign", |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | edit(record) { |
| | | let that = this; |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | that.$nextTick(() => { |
| | | that.form.setFieldsValue(pick(that.model, 'num', 'planNum', 'assignMode', 'teamId', 'teamId_dictText', 'maintenanceUserId', 'maintenanceUserId_dictText', 'planStartTime')); |
| | | }); |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close(); |
| | | }, |
| | | |
| | | handleOk() { |
| | | const that = this; |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let formData = Object.assign(this.model, values); |
| | | let obj; |
| | | obj = requestPut(this.url.assign, 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.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | onDutyUserList() { |
| | | let data = this.form.getFieldsValue(['teamId']); |
| | | if (data.teamId == null || data.teamId == "") { |
| | | this.$message.warning("请å
ç»´æ¤çç»ï¼"); |
| | | return |
| | | } |
| | | this.$refs.UserList.list(data.teamId); |
| | | this.$refs.UserList.title = "éæ©äººå"; |
| | | }, |
| | | sendDutyUserRecord(data) { |
| | | let record = data.record; |
| | | this.form.setFieldsValue({ maintenanceUserId: record.id, maintenanceUserId_dictText: record.username + "/" + record.realname }); |
| | | }, |
| | | |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | /deep/ .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | </style> |
| | |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.statusName }}</span> |
| | | >{{ this.model.status_dictText }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="ä¿å
»å·¥åå·" |
| | | label="å·¥åç»ä¸ç¼ç " |
| | | class="hightColor" |
| | | > |
| | | <span |
| | |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="ä¿å
»ç±»å" |
| | | label="çæ§ç±»å" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.maintenanceTypeName }}</span> |
| | | >{{ this.model.monitorType_dictText }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="对象é¨é¨" |
| | | label="æ åç¼ç " |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.departName }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | | >-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="8"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="ç»´ä¿æ¹å¼" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hight" |
| | | >{{ this.model.maintenanceMode }}</span> |
| | | >{{ this.model.planNum }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.teamName }}</span> |
| | | >{{ this.model.teamId_dictText }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.equipmentModel }}</span> |
| | | >{{ this.model.model }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | |
| | | defaultActiveKey="1" |
| | | > |
| | | <a-tab-pane |
| | | tab='è§¦åæ¡ä»¶' |
| | | tab='çæ§è®°å½' |
| | | key="1" |
| | | class="hightColor" |
| | | > |
| | |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <predictive-spare-parts :planId='workPlanId' v-show="model.monitorType == 'smkz'"/> |
| | | <!-- v-if="selectionRows[0].monitorType == 'smkz'"--> |
| | | <predictive-parameters :planId='workPlanId' v-show="model.monitorType == 'cskz'"/> |
| | | <predictive-parameters :orderId='model.id' v-show="model.monitorType == 'cskz'"/> |
| | | <!-- v-if="selectionRows[0].monitorType == 'cskz'" --> |
| | | <predictive-warn :planId='workPlanId' v-show="model.monitorType == 'bjkz'"/> |
| | | <predictive-warn :orderId='model.id' v-show="model.monitorType == 'bjkz'"/> |
| | | <!-- v-if="selectionRows[0].monitorType == 'bjkz'"--> |
| | | </div> |
| | | </a-tab-pane> |
| | |
| | | > |
| | | <actual-material-edit-table |
| | | ref="actualMaterialTabel" |
| | | :specialyMaintenanceOrderId="this.model.id" |
| | | :specialyMaintenanceOrderStatus="this.model.status" |
| | | :equipmentId="this.model.equipmentId" |
| | | :orderId="orderId" |
| | | :orderStatus="orderStatus" |
| | | :equipmentId="equipmentId" |
| | | ></actual-material-edit-table> |
| | | </div> |
| | | </a-tab-pane> |
| | |
| | | style="margin:-16px" |
| | | > |
| | | <actual-work-hours-edit-table |
| | | :specialyMaintenanceOrderId="this.model.id" |
| | | :specialyMaintenanceOrderStatus="this.model.status" |
| | | :equipmentId="this.model.equipmentId" |
| | | :teamId="this.model.teamId" |
| | | :orderId="orderId" |
| | | :orderStatus="orderStatus" |
| | | :equipmentId="equipmentId" |
| | | :teamId = "teamId" |
| | | ></actual-work-hours-edit-table> |
| | | </div> |
| | | </a-tab-pane> |
| | |
| | | currentPage: 1, |
| | | pageSize: 1, |
| | | total: 10, |
| | | // |
| | | workPlanId:'', |
| | | orderId:'', |
| | | orderStatus:'', |
| | | equipmentId:'', |
| | | teamId:'', |
| | | // |
| | | title: "ä¸ä¸å·¥åæ§è¡", |
| | | visible: false, |
| | | maskClosable: true, |
| | |
| | | sm: { span: 18 }, |
| | | }, |
| | | url: { |
| | | getEquipmentTotalByOrderId: "/eam/specialtyMaintenanceOrderDetail/getEquipmentTotalByOrderId", |
| | | listMaterial: "/eam/maintenanceOrderActualMaterial/getMaintenanceOrderActualMaterialList", |
| | | listHours: "/eam/maintenanceOrderActualWorkingHour/getMaintenanceOrderActualWorkingHourList", |
| | | getEquipmentTotalByOrderId: "/eam/predictiveworkorder/getEquipmentTotalByOrderId", |
| | | urlDownload: window._CONFIG['staticDomainURL'], |
| | | download: '/sys/upload/downloadFile', |
| | | editStatus: "/eam/specialtyMaintenanceOrder/editStatus", |
| | | revocation: "/eam/specialtyMaintenanceOrder/revocation", |
| | | report: "/eam/specialtyMaintenanceOrder/report", |
| | | editStatus: "/eam/predictiveworkorder/editStatus", |
| | | revocation: "/eam/predictiveworkorder/revocation", |
| | | report: "/eam/predictiveworkorder/report", |
| | | }, |
| | | } |
| | | }, |
| | |
| | | handleShow(record) { |
| | | this.model = Object.assign({}, record); |
| | | this.workPlanId = record.workPlanId; |
| | | this.orderId = record.id; |
| | | this.orderStatus = record.status; |
| | | this.equipmentId = record.equipmentId; |
| | | this.teamId = record.teamId; |
| | | this.visible = true; |
| | | if(record.status=='4'){ |
| | | this.$message.success("工忣卿§è¡å½ä¸ï¼è¯·å¨æ¤è¿ç¨ä¸å½å
¥å®é
ç¨æåå·¥æ¶") |
| | | } |
| | | |
| | | }, |
| | | getEquipmentTotal() { |
| | | var params = this.queryParam;//æ¥è¯¢æ¡ä»¶ |
| | |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: 'ä¿å
»å·¥åå¼å·¥', |
| | | title: 'å·¥åå¼å·¥', |
| | | content: 'æç¤ºï¼å¼å·¥åæ æ³æ¤åï¼è¯·è°¨æ
æä½ï¼', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | requestPut(that.url.editStatus, { id: that.specialtyMaintenanceOrderId, status: '4' }).then((res) => { |
| | | requestPut(that.url.editStatus, { id: that.model.id, status: '4' }).then((res) => { |
| | | if (res.success) { |
| | | that.model.status = '4' |
| | | that.$message.success("å·¥åå¼å·¥æåï¼") |
| | | that.getEquipmentTotal() |
| | | that.buttonDistable = false |
| | | that.revocationDistable = true |
| | | that.SWbuttonDistable = true |
| | |
| | | }, |
| | | //æ¥å·¥ |
| | | handleReport() { |
| | | var actualMaterials = this.$refs.actualMaterialTabel.dataSource; |
| | | for (var i = 0; i < actualMaterials.length; i++) { |
| | | if (actualMaterials[i].isLock == 'no') { |
| | | this.$message.warn("å®é
ç¨æç¬¬" + (i + 1) + "è¡å°æªéæï¼è¯·éæååè¿è¡æ¥å·¥"); |
| | | return false; |
| | | } |
| | | } |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: 'ä¿å
»å·¥åæ¥å·¥', |
| | | content: 'æç¤ºï¼æ¥å·¥åç¹æ£å®å·¥ï¼è¯·è°¨æ
æä½ï¼', |
| | | that.$confirm({ |
| | | title: '工忥工', |
| | | content: 'æç¤ºï¼å¦ææªå¡«åçå¿
填项æå¯¼è´æ¥å·¥å¤±è´¥ï¼ç¡®è®¤æ¥å·¥åï¼', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | requestPut(that.url.report, { id: that.specialtyMaintenanceOrderId, status: '5' }).then((res) => { |
| | | requestPut(that.url.report, { id: that.orderId, status: '5' }).then((res) => { |
| | | if (res.success) { |
| | | that.model.status = '5' |
| | | that.$message.success(res.message) |
| | | that.getEquipmentTotal() |
| | | that.buttonDistable = false |
| | | that.revocationDistable = true |
| | | that.SWbuttonDistable = true |
| | |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | requestPut(that.url.revocation, { id: that.specialtyMaintenanceOrderId, status: '4' }).then((res) => { |
| | | requestPut(that.url.revocation, { id: that.orderId, status: '4' }).then((res) => { |
| | | if (res.success) { |
| | | that.model.status = '4' |
| | | that.orderStatus = '4' |
| | | that.$message.success(res.message) |
| | | that.getEquipmentTotal() |
| | | that.buttonDistable = false |
| | | that.revocationDistable = true |
| | | that.SWbuttonDistable = true |
| | | that.$emit('ok'); |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | |
| | | isDel: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | orderId:{ |
| | | type: String, |
| | | default:'', |
| | | required: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | watch: { |
| | | planId:{ |
| | | orderId:{ |
| | | immediate:true, |
| | | handler(val){ |
| | | if (this.planId) { |
| | | this.queryParam.planId = val |
| | | if (this.orderId) { |
| | | this.queryParam.workOrderId = val |
| | | this.queryParam.delFlag = 0 |
| | | this.loadData(1) |
| | | } |
| | |
| | | }, |
| | | { |
| | | title: 'æ¡ä»¶', |
| | | dataIndex: 'conditionalRelationName', |
| | | dataIndex: 'parameterCondition_dictText', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'åæ°åä½', |
| | | dataIndex: 'unitName', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'åæ°ä¸é', |
| | | title: 'ä¸éå¼', |
| | | dataIndex: 'upperLimitValue', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'åæ°ä¸é', |
| | | title: 'ä¸éå¼', |
| | | dataIndex: 'lowerLimitValue', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'å®é
å¼', |
| | | dataIndex: 'actualValue', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'åä½', |
| | | dataIndex: 'parameterUnit', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'æ£æµæ¶é´', |
| | | dataIndex: 'collectTime', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | |
| | | ], |
| | | url: { |
| | | list: '/eam/predictiveworkplanparameter/pagePredictiveWorkPlanParameter', |
| | | delete: '/eam/predictiveworkplanparameter/delete' |
| | | list: '/eam/predictiveworkplanparameter/getHistoryPage', |
| | | } |
| | | } |
| | | }, |
| | |
| | | isDel: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | orderId:{ |
| | | type: String, |
| | | default:'', |
| | | required: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | watch: { |
| | | planId:{ |
| | | orderId:{ |
| | | immediate:true, |
| | | handler(val){ |
| | | if (this.planId) { |
| | | this.queryParam.planId = val |
| | | if (this.orderId) { |
| | | this.queryParam.workOrderId = val |
| | | this.queryParam.delFlag = 0 |
| | | this.loadData(1) |
| | | } |
| | |
| | | }, |
| | | { |
| | | title: 'æ¡ä»¶', |
| | | dataIndex: 'conditionalRelationName', |
| | | dataIndex: 'parameterCondition_dictText', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'æ¥è¦å¨æ', |
| | | dataIndex: 'warnCycle', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'æ¥è¦å¨æåä½', |
| | | dataIndex: 'cycleUnitName', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | { |
| | | title: 'æ¥è¦æ¬¡æ°', |
| | | dataIndex: 'times', |
| | | title: 'æ£æµæ¶é´', |
| | | dataIndex: 'collectTime', |
| | | align: 'center', |
| | | width:200 |
| | | }, |
| | | ], |
| | | url: { |
| | | list: '/eam/predictiveworkplanwarn/pagePredictiveWorkPlanWarn', |
| | | delete: '/eam/predictiveworkplanwarn/delete' |
| | | list: '/eam/predictiveworkplanwarn/getHistoryPage', |
| | | } |
| | | } |
| | | }, |
| | |
| | | <template> |
| | | <!--æ¯æå
¨å±ç¼©æ¾--> |
| | | <a-modal |
| | | :title="title" |
| | | :width="1000" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | :visible='visible' |
| | | :title='title' |
| | | switchFullscreen |
| | | @ok='handleSubmit' |
| | | @cancel='close' |
| | | style='top:50px' |
| | | cancelText='å
³é' |
| | | :width='1250' |
| | | > |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="ç©æç¼ç "> |
| | | <j-input |
| | | placeholder="请è¾å
¥ç©æç¼ç " |
| | | v-model="queryParam.num" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="ç©æåç§°"> |
| | | <j-input |
| | | placeholder="请è¾å
¥ç©æåç§°" |
| | | v-model="queryParam.name" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="6" |
| | | :sm="8" |
| | | <a-card :bordered='false'> |
| | | <div class='table-page-search-wrapper'> |
| | | <a-form |
| | | layout='inline' |
| | | @keyup.enter.native='searchQuery' |
| | | > |
| | | <a-row :gutter='24'> |
| | | <a-col |
| | | :md='8' |
| | | :sm='6' |
| | | > |
| | | <a-form-item label='åæ®å·'> |
| | | <a-input |
| | | placeholder='请è¾å
¥åæ®å·' |
| | | v-model='queryParam.num' |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md='3'> |
| | | <span |
| | | 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 |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left:8px;" |
| | | @click='searchReset' |
| | | icon='reload' |
| | | style='margin-left: 10px' |
| | | >éç½®</a-button> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <a-table |
| | | ref='table' |
| | | size='middle' |
| | | rowKey='id' |
| | | bordered |
| | | :columns='columns' |
| | | :dataSource='dataSource' |
| | | :pagination='ipagination' |
| | | :rowSelection='rowSelection' |
| | | :loading='loading' |
| | | @change='handleTableChange' |
| | | :scroll="{ x: 'calc(980px)', y: 900 }" |
| | | > |
| | | |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div style="margin-top:8px;"> |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | size="middle" |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio'}" |
| | | @change="handleTableChange" |
| | | :customRow="clickThenCheck" |
| | | > |
| | | </a-table> |
| | | </div> |
| | | </a-form> |
| | | </a-spin> |
| | | </a-table> |
| | | </a-card> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { httpAction, getAction } from '@/api/manage' |
| | | import { filterObj } from '@/utils/util' |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JInput from '@/components/jeecg/JInput' |
| | | |
| | | export default { |
| | | name: "MaterialSelectTable", |
| | | name: 'JSelectSparePartModal', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | JInput |
| | | }, |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | | visible: false, |
| | | model: {}, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | queryParam: {}, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 50, |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | width: 50 |
| | | }, |
| | | { |
| | | title: 'ç©æç¼å·', |
| | | title: 'åæ®å·', |
| | | align: 'center', |
| | | dataIndex: 'num', |
| | | sorter: true, |
| | | dataIndex: 'num' |
| | | }, |
| | | { |
| | | title: 'ç©æåç§°', |
| | | title: 'å¤ä»¶ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'name', |
| | | sorter: true, |
| | | dataIndex: 'spareNum' |
| | | }, |
| | | { |
| | | title: 'ç©æè§æ ¼', |
| | | title: 'å¤ä»¶åç§°', |
| | | align: 'center', |
| | | dataIndex: 'specification', |
| | | sorter: true, |
| | | dataIndex: 'spareName' |
| | | }, |
| | | { |
| | | title: 'ç©æåå·', |
| | | title: 'å¶é å', |
| | | align: 'center', |
| | | dataIndex: 'model', |
| | | sorter: true, |
| | | dataIndex: 'constructorName' |
| | | }, |
| | | { |
| | | title: 'åä½', |
| | | title: 'è§æ ¼', |
| | | align: 'center', |
| | | dataIndex: 'unitId_dictText', |
| | | sorter: true, |
| | | dataIndex: 'specification' |
| | | }, |
| | | |
| | | { |
| | | title: 'åå·', |
| | | align: 'center', |
| | | dataIndex: 'model' |
| | | }, |
| | | { |
| | | title: '主åä½', |
| | | align: 'center', |
| | | dataIndex: 'mainUnitName' |
| | | }, |
| | | { |
| | | title: '主æ°é', |
| | | align: 'center', |
| | | dataIndex: 'mainQuantity' |
| | | }, |
| | | { |
| | | title: 'å¯ç¨æ°é', |
| | | align: 'center', |
| | | dataIndex: 'availableQuantity' |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/base/material/list", |
| | | selectedRowKeys: [], |
| | | oldSelectRows: [], |
| | | dataSource: [], |
| | | selectionRows: [], |
| | | title: 'æ ¹æ®æ¥è¯¢ç»æéæ©äººåä¿¡æ¯', |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['5', '10', '30', '50', '100'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | index: '', |
| | | isorter: { |
| | | column: 'num', |
| | | order: 'desc' |
| | | }, |
| | | visible: false, |
| | | loading: false, |
| | | url: { |
| | | list: '/eam/repairOrder/materialSpareList' |
| | | // list:'/spare/sparePartOutbound/list', |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | searchQuery() { |
| | | this.loadData(1); |
| | | }, |
| | | |
| | | list(index) { |
| | | this.visible = true; |
| | | this.index = index; |
| | | this.loadData(1); |
| | | }, |
| | | |
| | | clickThenCheck(record) { |
| | | computed: { |
| | | rowSelection() { |
| | | return { |
| | | on: { |
| | | click: (e) => { |
| | | this.selectedRowRecord = record; |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.onSelectChange(selectedRows) |
| | | }, |
| | | getCheckboxProps: record => ({ |
| | | props: { |
| | | disabled: record.distable |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | |
| | | onSelectChange(selectedRowKeys, selectedRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectedRowRecord = selectedRows[0]; |
| | | }, |
| | | |
| | | close() { |
| | | this.queryParam = {}; |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.selectedRowKeys = []; |
| | | }, |
| | | |
| | | handleOk() { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | if (that.selectedRowKeys.length > 0) { |
| | | if (that.selectedRowRecord.id != null && that.selectedRowRecord.id != "") { |
| | | that.$emit('sendMaterialRecord', { index: this.index, record: that.selectedRowRecord }); |
| | | that.close(); |
| | | } else { |
| | | that.$message.error("è¯·éæ©ç©æï¼") |
| | | } |
| | | } else { |
| | | that.$message.error("è¯·éæ©ç©æï¼") |
| | | }), |
| | | selectedRowKeys: this.selectedRowKeys |
| | | } |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | async loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | const that = this |
| | | //this.loading = true |
| | | this.queryParam.status = '1' |
| | | let params = this.getQueryParams() |
| | | |
| | | //æ¥è¯¢æ¡ä»¶ |
| | | await getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | for (let i = 0; i < res.result.records.length; i++) { |
| | | if (that.oldSelectRows.indexOf(res.result.records[i].id) > -1) { |
| | | res.result.records[i].distable = true |
| | | } else { |
| | | res.result.records[i].distable = false |
| | | } |
| | | } |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | //this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close(); |
| | | showModals(oldSelectRows) { |
| | | this.selectionRows = [] |
| | | this.oldSelectRows = oldSelectRows |
| | | this.visible = true |
| | | this.loadData(1) |
| | | }, |
| | | getQueryParams() { |
| | | let param = Object.assign({}, this.queryParam, this.isorter) |
| | | param.field = this.getQueryField() |
| | | param.pageNo = this.ipagination.current |
| | | param.pageSize = this.ipagination.pageSize |
| | | return filterObj(param) |
| | | }, |
| | | //æ¥è¯¢æ¡ä»¶å¤ç |
| | | getQueryField() { |
| | | let str = 'id,' |
| | | for (let a = 0; a < this.columns.length; a++) { |
| | | str += ',' + this.columns[a].dataIndex |
| | | } |
| | | return str |
| | | }, |
| | | searchReset(num) { |
| | | let that = this |
| | | this.queryParam = [] |
| | | if (num !== 0) { |
| | | that.loadData(1) |
| | | } |
| | | that.selectborrowIds = [] |
| | | }, |
| | | close() { |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | this.visible = false |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //TODO çé |
| | | |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc' |
| | | } |
| | | this.ipagination = pagination |
| | | this.loadData() |
| | | }, |
| | | handleSubmit() { |
| | | if(this.selectionRows.length==0){ |
| | | this.$message.warn("è¯·éæ©å¤ä»¶"); |
| | | return false; |
| | | } |
| | | |
| | | this.$emit('getSelectRows', this.selectionRows) |
| | | this.close() |
| | | }, |
| | | onSelectChange(selectionRows) { |
| | | this.selectionRows = selectionRows |
| | | }, |
| | | searchQuery() { |
| | | this.loadData(1) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | @import '~@assets/less/common.less'; |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | |
| | | <style scoped> |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .fontweightfrozen { |
| | | font-weight: bold; |
| | | color: #c9c9c9; |
| | | } |
| | | .success { |
| | | color: green; |
| | | } |
| | | .error { |
| | | color: red; |
| | | #components-layout-demo-custom-trigger .trigger { |
| | | font-size: 18px; |
| | | line-height: 64px; |
| | | padding: 0 24px; |
| | | cursor: pointer; |
| | | transition: color 0.3s; |
| | | } |
| | | </style> |