src/views/flowable/workflow/FlowCompleted.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/flowable/workflow/FlowTodo.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/tms/modules/inbound/InboundApplyDetailList.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/tms/modules/outBound/OutboundDetailSelectList.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/tms/modules/outBound/OutboundOrderSelectList.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/views/flowable/workflow/FlowCompleted.vue
@@ -161,6 +161,11 @@ ref='equipmentScrapApprovalModelRef' @searchReset='searchReset' /> <spare-part-apply-handle ref='sparePartApplyModal' @searchReset='searchReset' :selectSparePartApplyData='selectSparePartApplyData' ></spare-part-apply-handle> </a-card> </template> @@ -182,6 +187,7 @@ import EquipmentSealUpApprovalModal from '@views/flowable/workflow/sealUp/EquipmentSealUpApprovalModal.vue' import EquipmentTransferApprovalModal from '@views/flowable/workflow/transfer/EquipmentTransferApprovalModal.vue' import EquipmentScrapApprovalModal from '@views/flowable/workflow/scrap/EquipmentScrapApprovalModal.vue' import SparePartApplyHandle from '@views/flowable/workflow/sparePartApply/SparePartApplyHandle.vue' export default { name: 'NcDeviceCharactersList', @@ -199,7 +205,8 @@ EquipmentLeanOutApprovalModal, EquipmentSealUpApprovalModal, EquipmentTransferApprovalModal, EquipmentScrapApprovalModal EquipmentScrapApprovalModal, SparePartApplyHandle }, data() { return { @@ -273,6 +280,7 @@ selectOutBoundOrderData: {}, selectLossBoundOrderData: {}, selectStocktakingBoundOrderData: {}, selectSparePartApplyData: {}, // selectEquipmentLeanOutData: {}, // selectEquipmentSealUpData: {}, // selectEquipmentTransferData: {}, @@ -333,6 +341,9 @@ break case 'equipment_scrap': this.handleEquipmentScrap(item) break case 'spare_part_apply': this.handleSparePartApplyApproval(item) break default: alert('没找到该流程') @@ -469,6 +480,15 @@ this.$refs.equipmentScrapApprovalModelRef.handleDetail(item) this.$refs.equipmentScrapApprovalModelRef.disableSubmit = true }, handleSparePartApplyApproval(item) { this.selectSparePartApplyData = Object.assign({}, item) item.procInstId = item.procInsId item.processInstanceId = item.procInsId this.selectSparePartApplyData.assignee_dictText = item.todoUsers_dictText this.$refs.sparePartApplyModal.auditVisible = false this.$refs.sparePartApplyModal.clearTableSource() this.$refs.sparePartApplyModal.getAllApproveData(item) }, } } </script> src/views/flowable/workflow/FlowTodo.vue
@@ -757,6 +757,7 @@ }, handleSparePartApplyApproval(item) { if (item && item.dataId) { debugger this.selectSparePartApplyData = Object.assign({}, item) this.$refs.sparePartApplyModal.auditVisible = true this.$refs.sparePartApplyModal.clearTableSource() src/views/tms/modules/inbound/InboundApplyDetailList.vue
@@ -138,7 +138,7 @@ }, mounted() { this.$bus.$on('getToolingStorageData', (data) => { this.queryParam.inboundOrderId = data.id; this.queryParam.inboundOrderId = data[0].id; this.searchQuery(); }) } src/views/tms/modules/outBound/OutboundDetailSelectList.vue
@@ -16,21 +16,31 @@ <template v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record, index"> <div :key="col.dataIndex"> <a-input-number v-if="col.dataIndex === 'ratedLife'" :disabled="record.accuracyClass != '1'" :disabled="record.accuracyClass !== '1'" :value="text" @change="(e) => handleChange(e, record.key, col, index)" :min="1" /> <div v-if="col.dataIndex === 'ratedLife' && record.accuracyClass === '1' && isFieldEmpty(record.ratedLife)" style="color: #ff4d4f; font-size: 12px;"> 必填 </div> <a-input-number v-if="col.dataIndex === 'useLife'" :disabled="record.accuracyClass != '1'" :disabled="record.accuracyClass !== '1'" :value="text" @change="(e) => handleChange(e, record.key, col, index)" :min="1" /> <div v-if="col.dataIndex === 'useLife' && record.accuracyClass === '1' && isFieldEmpty(record.useLife)" style="color: #ff4d4f; font-size: 12px;"> 必填 </div> </div> </template> @@ -208,6 +218,9 @@ } }, methods: { isFieldEmpty(value) { return value === undefined || value === null || value === ''; }, onSelectChange(selectedRowKeys, selectionRows) { this.selectedRowKeys = selectedRowKeys; this.selectionRows = selectionRows; @@ -219,15 +232,19 @@ this.ipagination.current = 1 }, handleOutbound(record) { console.log(this.mainId) console.log(record) // 先进行必填校验 const errors = this.validateRequiredFields(record); if (errors.length > 0) { this.$message.error(errors.join(',')); return; } const params = [ { outBoundOrderId: this.mainId, outboundDetailId: record.id, outboundQuantity: record.outboundQuantity, ratedLife:record.ratedLife, useLife:record.useLife ratedLife: record.ratedLife, useLife: record.useLife } ] postAction(this.url.outbound, params).then(res=>{ @@ -249,8 +266,19 @@ this.dataSource = temp } }, validateRequiredFields(record) { const errors = []; // 只有在不禁用状态下才需要校验必填 if (record.accuracyClass === '1') { if (this.isFieldEmpty(record.ratedLife)) { errors.push('额定寿命为必填项'); } if (this.isFieldEmpty(record.useLife)) { errors.push('使用寿命为必填项'); } } return errors; } } } </script> src/views/tms/modules/outBound/OutboundOrderSelectList.vue
@@ -252,6 +252,24 @@ this.$message.warning("请选择明细后再出库!") return } // 先验证所有选中项 const validationErrors = []; for (let i = 0; i < this.selectionRows.length; i++) { const item = this.selectionRows[i]; // 检查必填字段 if (item.accuracyClass === '1') { // 只有在不禁用状态下才需要校验必填 if (this.$refs.outboundDetailSelectList.isFieldEmpty(item.ratedLife)) { validationErrors.push(`明细第${i+1}行:额定寿命为必填项`); } if (this.$refs.outboundDetailSelectList.isFieldEmpty(item.useLife)) { validationErrors.push(`明细第${i+1}行:使用寿命为必填项`); } } } if (validationErrors.length > 0) { this.$message.error(validationErrors.join(';')); return; } const params = this.selectionRows.map((item) => { return { outBoundOrderId: this.selectedMainId,