From 752030a34315629a07810faff9bcd6522c1ebf41 Mon Sep 17 00:00:00 2001 From: cuikaidong <ckd2942379034@163.com> Date: 星期五, 23 五月 2025 09:08:51 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/eam/spare/modules/EamSpareParts/EamSparePartsModal.vue | 2 src/views/tms/OutboundOrderList.vue | 8 src/views/tms/OutboundDetailList.vue | 22 src/views/eam/spare/EamSparePartsList.vue | 29 + src/views/eam/maintenance/modules/EamThirdMaintenanceOrderModal.vue | 153 +++++++- src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue | 59 ++ src/views/eam/spare/modules/EamSpareParts/EamSparePartInventoryList.vue | 22 src/views/eam/spare/modules/EamSpareParts/EamSparePartIntoModal.vue | 233 ++++++++++++ src/views/tms/modules/outBound/OutboundOrderModal.vue | 2 src/views/flowable/workflow/FlowCompleted.vue | 22 + src/views/flowable/workflow/FlowTodo.vue | 17 src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue | 493 +++++++++++++++++++++++++++ 12 files changed, 1,011 insertions(+), 51 deletions(-) diff --git a/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue b/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue index 7f28ac9..8c99c2a 100644 --- a/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue +++ b/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue @@ -78,25 +78,26 @@ :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" + :scroll="{x:'max-content'}" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> <span slot="action" slot-scope="text, record"> - <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE' && isShowAuth('eam:secondMaintenance:edit')"> - <a @click="handleEdit(record)">缂栬緫</a> + <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'"> + <a @click="handleEdit(record)" v-if="isShowAuth('eam:thirdMaintenance:edit')">缂栬緫</a> - <a-divider type="vertical" /> + <a-divider type="vertical" v-if="isShowAuth('eam:thirdMaintenance:edit')" /> - <a-popconfirm title="纭畾棰嗗彇鍚�?" @confirm="() => handlerCollect(record.id)"> + <a-popconfirm title="纭畾棰嗗彇鍚�?" @confirm="() => handlerCollect(record.id)" v-if="isShowAuth('eam:thirdMaintenance:collect')"> <a>棰嗗彇</a> </a-popconfirm> - <a-divider type="vertical" /> + <a-divider type="vertical" v-if="isShowAuth('eam:thirdMaintenance:collect')" /> <a-dropdown> <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> <a-menu slot="overlay"> - <a-menu-item> + <a-menu-item v-if="isShowAuth('eam:thirdMaintenance:abolish')"> <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handlerAbolish(record.id)"> <a>浣滃簾</a> </a-popconfirm> @@ -205,6 +206,16 @@ dataIndex: 'operator_dictText' }, { + title: '绮惧害妫�楠屼汉', + align: 'center', + dataIndex: 'precisionChecker_dictText' + }, + { + title: '绮惧害妫�楠屾椂闂�', + align: 'center', + dataIndex: 'precisionCheckTime' + }, + { title: '淇濆吇鐘舵��', align: 'center', dataIndex: 'maintenanceStatus_dictText' @@ -215,6 +226,42 @@ dataIndex: 'creationMethod_dictText' }, { + title: '鏈哄姩鍔炵‘璁�', + align: 'center', + dataIndex: 'confirmUser_dictText', + width: 60 + }, + { + title: '鏈哄姩鍔炵‘璁ゆ椂闂�', + align: 'center', + dataIndex: 'confirmTime', + width: 60 + }, + { + title: '鏈哄姩鍔炴剰瑙�', + align: 'center', + dataIndex: 'confirmComment', + width: 60 + }, + { + title: '纭棰嗗', + align: 'center', + dataIndex: 'confirmLeader_dictText', + width: 60 + }, + { + title: '棰嗗纭鏃堕棿', + align: 'center', + dataIndex: 'leaderConfirmTime', + width: 60 + }, + { + title: '棰嗗鎰忚', + align: 'center', + dataIndex: 'leaderConfirmComment', + width: 60 + }, + { title: '澶囨敞', align: 'center', dataIndex: 'remark' diff --git a/src/views/eam/maintenance/modules/EamThirdMaintenanceOrderModal.vue b/src/views/eam/maintenance/modules/EamThirdMaintenanceOrderModal.vue index 7623401..e246065 100644 --- a/src/views/eam/maintenance/modules/EamThirdMaintenanceOrderModal.vue +++ b/src/views/eam/maintenance/modules/EamThirdMaintenanceOrderModal.vue @@ -57,21 +57,38 @@ </a-form-model-item> </a-row> <a-row :gutter="24"> - <a-spin :spinning="detail.loading"> - <j-vxe-table - ref="editableDetailTable" - :rowNumber="true" - :rowSelection="true" - :bordered="true" - :alwaysEdit="true" - :toolbar="true" - :toolbarConfig="detail.toolbarConfig" - keep-source - :height="300" - :dataSource="detail.dataSource" - :columns="detail.columns" - style="margin-top: 8px;" /> - </a-spin> + <a-tabs v-model="activeTabKey"> + <a-tab-pane key="1" tab="淇濆吇椤�" :forceRender="true"> + <j-vxe-table + ref="editableDetailTable" + :rowNumber="true" + :rowSelection="true" + :bordered="true" + :alwaysEdit="true" + :toolbar="true" + :toolbarConfig="detail.toolbarConfig" + keep-source + :height="300" + :dataSource="detail.dataSource" + :columns="detail.columns" + style="margin-top: 8px;" /> + </a-tab-pane> + <a-tab-pane key="2" tab="绮惧害鍙傛暟" :forceRender="true"> + <j-vxe-table + ref="editablePrecisionDetailTable" + :rowNumber="true" + :rowSelection="true" + :bordered="true" + :alwaysEdit="true" + :toolbar="false" + :toolbarConfig="precisionDetail.toolbarConfig" + keep-source + :height="300" + :dataSource="precisionDetail.dataSource" + :columns="precisionDetail.columns" + style="margin-top: 8px;" /> + </a-tab-pane> + </a-tabs> </a-row> </a-form-model> </a-spin> @@ -111,6 +128,8 @@ }, confirmLoading: false, spinning: false, + activeTabKey: '1', + maintenanceOperatorOptions: [], validatorRules: { equipmentId: [ { required: true, message: '璇烽�夋嫨璁惧!' } @@ -124,7 +143,9 @@ edit: '/eam/thirdMaintenanceOrder/edit', standardDetail: '/eam/eamMaintenanceStandardDetail/queryList', detail: '/eam/thirdMaintenanceOrderDetail/queryList', - userSelect: '/eam/user_select/list' + userSelect: '/eam/user_select/list', + precisionDetail: '/eam/equipmentPrecisionParameters/queryList', + precisionCheckDetail: '/eam/precisionCheckDetail/queryList', }, detail: { loading: false, @@ -184,6 +205,59 @@ // add 鏂板鎸夐挳锛況emove 鍒犻櫎鎸夐挳锛沜learSelection 娓呯┖閫夋嫨鎸夐挳 btn: ['add', 'remove', 'clearSelection'] } + }, + precisionDetail: { + loading: false, + dataSource: [], + columns: [ + { + title: 'ID', + key: 'id', + type: JVXETypes.hidden + }, + { + title: 'orderId', + key: 'orderId', + type: JVXETypes.hidden + }, + { + title: 'equipmentId', + key: 'equipmentId', + type: JVXETypes.hidden + }, + { + title: 'parameterId', + key: 'parameterId', + type: JVXETypes.hidden + }, + { + title: '妫�娴嬮」鐩�', + key: 'parameterId_dictText', + type: JVXETypes.normal, + width: '25%', + align: 'center' + }, + { + title: '鍙傛暟缂栫爜', + key: 'parameterCode_dictText', + type: JVXETypes.normal, + width: '20%', + align: 'center', + }, + { + title: '鍏佸樊鍊�', + key: 'parameterValue', + type: JVXETypes.normal, + width: '30%', + align: 'center', + } + ], + toolbarConfig: { + // prefix 鍓嶇紑锛泂uffix 鍚庣紑 + slot: ['prefix', 'suffix'], + // add 鏂板鎸夐挳锛況emove 鍒犻櫎鎸夐挳锛沜learSelection 娓呯┖閫夋嫨鎸夐挳 + btn: ['add', 'remove', 'clearSelection'] + } } } }, @@ -191,6 +265,7 @@ }, methods: { add() { + this.initParams(); //鍒濆鍖栭粯璁ゅ�� this.model = {} this.visible = true @@ -198,11 +273,13 @@ this.detail.dataSource = [] }, edit(record) { + this.initParams(); this.model = Object.assign({}, record) this.visible = true this.editable = true this.detail.dataSource = [] this.loadDetail(record.id) + this.loadPrecisionDetail(record.id) }, close() { this.$emit('close') @@ -223,6 +300,11 @@ let removeData = that.$refs.editableDetailTable.getDeleteData() that.model.tableDetailList = [...tableData] that.model.removeDetailList = [...removeData] + + let precisionDetailList = that.$refs.editablePrecisionDetailTable.getTableData() + let removePrecisionDetailList = that.$refs.editablePrecisionDetailTable.getDeleteData() + that.model.precisionDetailList = [...precisionDetailList] + that.model.removePrecisionDetailList = [...removePrecisionDetailList] that.confirmLoading = true let httpurl = '' @@ -272,6 +354,7 @@ if (!this.model.equipmentId) delete this.model.operator if (!this.model.id) { this.loadStandardDetail(selectObj.id) + this.loadPrecisionParameterList(selectObj.equipmentId) } this.loadMaintenanceOperatorList(this.model.equipmentId) }, @@ -331,8 +414,42 @@ .catch(err => { if (that.model.operator) delete that.model.operator }) - } - + }, + loadPrecisionParameterList(equipmentId) { + this.precisionDetail.dataSource = [] + if (equipmentId) { + this.spinning = true + getAction(this.url.precisionDetail, { equipmentId: equipmentId }) + .then(res => { + if (res.success) { + this.precisionDetail.dataSource = res.result.map(item => ({ + equipmentId: item.equipmentId, + parameterId: item.parameterId, + parameterId_dictText: item.parameterId_dictText, + parameterCode_dictText: item.parameterCode_dictText, + parameterValue: item.parameterValue, + })) + } + }) + .finally(() => { + this.spinning = false + }) + } + }, + loadPrecisionDetail(orderId) { + if (orderId) { + getAction(this.url.precisionCheckDetail, { orderId: orderId }).then(res => { + if (res.success) { + this.precisionDetail.dataSource = [...res.result] + } + }) + } + }, + initParams() { + this.detail.dataSource = [] + this.precisionDetail.dataSource = [] + this.activeTabKey = '1' + }, } } </script> diff --git a/src/views/eam/spare/EamSparePartsList.vue b/src/views/eam/spare/EamSparePartsList.vue index e5f9d88..249bec8 100644 --- a/src/views/eam/spare/EamSparePartsList.vue +++ b/src/views/eam/spare/EamSparePartsList.vue @@ -98,6 +98,12 @@ type="primary" icon="plus" >鏂板</a-button> + + <a-button + @click="handleInto" + type="primary" + icon="plus" + >鍏ュ簱</a-button> <!-- <a-button type="primary" icon="download" @@ -198,6 +204,11 @@ ref="modalForm" @ok="modalFormOk" ></eamSpareParts-modal> + + <eamSpare-part-into-modal + ref="intoModalForm" + @ok="modalFormOk" + ></eamSpare-part-into-modal> </a-card> </template> @@ -205,6 +216,7 @@ import '@assets/less/TableExpand.less' import EamSparePartsModal from './modules/EamSpareParts/EamSparePartsModal.vue' import EamSparePartInventoryList from './modules/EamSpareParts/EamSparePartInventoryList.vue' +import EamSparePartIntoModal from './modules/EamSpareParts/EamSparePartIntoModal.vue' import { JeecgListMixin } from '@/mixins/JeecgListMixin' export default { @@ -212,7 +224,8 @@ mixins: [JeecgListMixin], components: { EamSparePartsModal, - EamSparePartInventoryList + EamSparePartInventoryList, + EamSparePartIntoModal }, data() { return { @@ -281,6 +294,11 @@ dataIndex: 'inventoryWarning' }, { + title: '搴撳瓨鎬绘暟', + align: "center", + dataIndex: 'totalQuantity' + }, + { title: '鎿嶄綔', dataIndex: 'action', align: "center", @@ -302,11 +320,20 @@ } }, methods: { + + handleInto() { + this.$refs.intoModalForm.add(); + this.$refs.intoModalForm.title = "鍏ュ簱"; + }, searchReset() { this.queryParam = {} this.onClearSelected() this.loadData(1); }, + searchQuery() { + this.onClearSelected() + this.loadData(1); + }, clickThenSelect(record) { return { on: { diff --git a/src/views/eam/spare/modules/EamSpareParts/EamSparePartIntoModal.vue b/src/views/eam/spare/modules/EamSpareParts/EamSparePartIntoModal.vue new file mode 100644 index 0000000..33b41a5 --- /dev/null +++ b/src/views/eam/spare/modules/EamSpareParts/EamSparePartIntoModal.vue @@ -0,0 +1,233 @@ +<template> + <j-modal + :title="title" + :width="1500" + :visible="visible" + :confirmLoading="confirmLoading" + switchFullscreen + centered + :mask-closable="false" + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴" + > + + <a-spin :spinning="spinning"> + <a-form-model + ref="form" + :model="model" + :rules="validatorRules" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-row :gutter="24"> + <j-vxe-table + ref="editableDetailTable" + :rowNumber="true" + :rowSelection="true" + :bordered="true" + :alwaysEdit="true" + :toolbar="true" + keep-source + :height="300" + :loading="detail.loading" + :dataSource="detail.dataSource" + :columns="detail.columns" + style="margin-top: 8px;" + /> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> +import { getAction, httpAction } from '@/api/manage' +import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' +import { JVXETypes } from '@/components/jeecg/JVxeTable' + +export default { + name: 'EamSparePartIntoModal', + mixins: [JVxeTableModelMixin], + components: {}, + data() { + return { + title: '鎿嶄綔', + visible: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 6 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 15 } + }, + confirmLoading: false, + spinning: false, + disabled: false, + validatorRules: {}, + url: { + add: '/eam/eamSparePartInventory/add', + edit: '/eam/eamSparePartInventory/edit', + }, + detail: { + loading: false, + dataSource: [], + columns: [ + { + title: '鏉ユ簮绫诲瀷', + key: 'sparePartIntoType', + type: JVXETypes.hidden, + width: '12%', + align: 'center', + defaultValue: '1', + validateRules: [ + { required: true, message: '澶囦欢涓嶈兘涓虹┖锛�' } + ] + }, + { + title: '澶囦欢', + key: 'sparePartId', + type: JVXETypes.select, + width: '12%', + align: 'center', + dictCode: 'eam_spare_parts,part_name,id, del_flag!=\'1\'', + validateRules: [ + { required: true, message: '澶囦欢涓嶈兘涓虹┖锛�' } + ] + }, + { + title: '鎵规鍙�', + key: 'batchNum', + type: JVXETypes.input, + width: '10%', + align: 'center', + validateRules: [ + { required: true, message: '鎵规鍙蜂笉鑳戒负绌猴紒' } + ] + }, + { + title: '鏁伴噺', + key: 'inventory', + type: JVXETypes.inputNumber, + width: '10%', + align: 'center', + validateRules: [ + { required: true, message: '鏁伴噺涓嶈兘涓虹┖锛�' } + ] + }, + { + title: '鍑哄巶鏃ユ湡(鐢熶骇鏃ユ湡)', + key: 'manufactureDate', + type: JVXETypes.datetime, + width: '16%', + align: 'center', + validateRules: [ + { required: false, message: '鍑哄巶鏃ユ湡(鐢熶骇鏃ユ湡)涓嶈兘涓虹┖锛�' } + ] + }, + { + title: '渚涘簲鍟�', + key: 'supplier', + type: JVXETypes.textarea, + width: '15%', + align: 'center', + validateRules: [ + { required: false, message: '渚涘簲鍟嗕笉鑳戒负绌猴紒' } + ] + }, + { + title: '鎴鏈夋晥鏈�', + key: 'expirationOfValidity', + type: JVXETypes.datetime, + width: '16%', + align: 'center', + validateRules: [ + { required: false, message: '鎴鏈夋晥鏈熶笉鑳戒负绌猴紒' } + ] + }, + { + title: '瀛樻斁浣嶇疆', + key: 'location', + type: JVXETypes.textarea, + width: '13%', + align: 'center', + validateRules: [ + { required: false, message: '瀛樻斁浣嶇疆涓嶈兘涓虹┖锛�' } + ] + }, + ] + } + } + }, + created() { + }, + methods: { + add() { + this.model = {} + this.detail.dataSource = [] + this.visible = true + }, + + + async handleOk() { + const that = this + let errMap = await that.$refs.editableDetailTable.validateTable() + if (errMap) { + this.$message.warning('鏁版嵁鏍¢獙澶辫触锛�') + return + } + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + let tableData = that.$refs.editableDetailTable.getTableData() + let removeData = that.$refs.editableDetailTable.getDeleteData() + that.model.eamSparePartInventories = [...tableData] + that.model.removeDetailList = [...removeData] + + that.confirmLoading = that.spinning = true + let httpurl = '' + let method = '' + if (!this.model.id) { + httpurl += this.url.add + method = 'post' + } else { + httpurl += this.url.edit + method = 'put' + } + httpAction(httpurl, this.model, method).then((res) => { + + if (res.success) { + that.$message.success(res.message) + that.$emit('ok') + that.close() + } else { + that.$message.warning(res.message) + } + }).finally(() => { + that.confirmLoading = that.spinning = false + }) + } else { + return false + } + }) + }, + + + + handleCancel() { + this.close() + }, + + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + } + } +} +</script> + +<style lang="less" scoped> +</style> \ No newline at end of file diff --git a/src/views/eam/spare/modules/EamSpareParts/EamSparePartInventoryList.vue b/src/views/eam/spare/modules/EamSpareParts/EamSparePartInventoryList.vue index edfc5b8..80dbf4f 100644 --- a/src/views/eam/spare/modules/EamSpareParts/EamSparePartInventoryList.vue +++ b/src/views/eam/spare/modules/EamSpareParts/EamSparePartInventoryList.vue @@ -81,11 +81,11 @@ return parseInt(index) + 1; } }, - // { - // title: '澶囧搧澶囦欢ID', - // align: "center", - // dataIndex: 'sparePartId' - // }, + { + title: '鏉ユ簮绫诲瀷', + align: "center", + dataIndex: 'sparePartIntoType_dictText' + }, { title: '鎵规鍙�', align: "center", @@ -116,12 +116,12 @@ align: "center", dataIndex: 'location' }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align: "center", - scopedSlots: { customRender: 'action' }, - } + // { + // title: '鎿嶄綔', + // dataIndex: 'action', + // align: "center", + // scopedSlots: { customRender: 'action' }, + // } ], url: { list: "/eam/eamSparePartInventory/list", diff --git a/src/views/eam/spare/modules/EamSpareParts/EamSparePartsModal.vue b/src/views/eam/spare/modules/EamSpareParts/EamSparePartsModal.vue index b80a52f..dbfe962 100644 --- a/src/views/eam/spare/modules/EamSpareParts/EamSparePartsModal.vue +++ b/src/views/eam/spare/modules/EamSpareParts/EamSparePartsModal.vue @@ -1,7 +1,7 @@ <template> <j-modal :title="title" - :width="800" + :width="900" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen diff --git a/src/views/flowable/workflow/FlowCompleted.vue b/src/views/flowable/workflow/FlowCompleted.vue index bbeb956..48bacaf 100644 --- a/src/views/flowable/workflow/FlowCompleted.vue +++ b/src/views/flowable/workflow/FlowCompleted.vue @@ -67,6 +67,8 @@ <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" :selectShenpiData="selectWeekMaintenanceData"/> <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData"/> + + <out-bound-order-handle ref="outBoundOrderHandle" :selectShenpiData="selectOutBoundOrderData"/> </a-card> </template> @@ -81,6 +83,7 @@ import InspectionOrderHandle from './InspectionOrder/InspectionOrderHandle' import WeekMaintenanceApprovalModal from './weekMaintenance/WeekMaintenanceApprovalModal' import RepairOrderApprovalModal from './repairOrder/RepairOrderApprovalModal' + import OutBoundOrderHandle from '@views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue' export default { name: 'NcDeviceCharactersList', @@ -91,7 +94,8 @@ RepairOrderApprovalModal, WeekMaintenanceApprovalModal, InspectionOrderHandle, - JDictSelectTag + JDictSelectTag, + OutBoundOrderHandle }, data() { return { @@ -161,7 +165,8 @@ selectDispatchFileXqData:{}, selectWeekMaintenanceData: {}, selectInspectionOrderXqData: {}, - selectRepairOrderData: {} + selectRepairOrderData: {}, + selectOutBoundOrderData: {} } }, created() { @@ -193,6 +198,9 @@ break case 'eam_repair': this.handleRepairOrder(item) + break + case 'toolOutStorageApproval': + this.handleToolOutStorageApproval(item) break default: alert('娌℃壘鍒拌娴佺▼') @@ -264,6 +272,16 @@ processInstanceId: procInsId }) this.$refs.repairOrderApprovalModal.getBasicInformation(record) + }, + + handleToolOutStorageApproval(item) { + this.selectOutBoundOrderData = Object.assign({}, item) + item.procInstId = item.procInsId + item.processInstanceId = item.procInsId + this.selectOutBoundOrderData.assignee_dictText = item.todoUsers_dictText + this.$refs.outBoundOrderHandle.auditVisible = false + this.$refs.outBoundOrderHandle.clearTableSource() + this.$refs.outBoundOrderHandle.getAllApproveData(item) } } } diff --git a/src/views/flowable/workflow/FlowTodo.vue b/src/views/flowable/workflow/FlowTodo.vue index 4380406..58dd734 100644 --- a/src/views/flowable/workflow/FlowTodo.vue +++ b/src/views/flowable/workflow/FlowTodo.vue @@ -111,6 +111,8 @@ @searchReset="searchReset"></week-maintenance-approval-modal> <repair-order-approval-modal ref="repairOrderApprovalModal" @searchReset="searchReset" :selectShenpiData="selectRepairOrderData"></repair-order-approval-modal> + <out-bound-order-handle ref="outBoundOrderHandle" :selectShenpiData="selectOutBoundOrderData" + @searchReset="searchReset"></out-bound-order-handle> <!--鎵归噺澶勭悊--> <inspection-order-batch-handle ref="inspectionOrderBatchHandleRef" @searchReset="searchReset" @@ -144,7 +146,7 @@ import AssignFileStreamHandle from '@views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue' import DispatchFileHandle from '@views/flowable/workflow/dispatchFile/DispatchFileHandle.vue' import DispatchFileBachHandleStyle from '@views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle#Drawer.vue' - + import OutBoundOrderHandle from '@views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue' import EquipmentLeanOutApprovalModal from '@views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue' import SecondMaintenanceApprovalModal from '@views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue' import ThirdMaintenanceApprovalModal from '@views/flowable/workflow/thirdMaintenance/ThirdMaintenanceApprovalModal.vue' @@ -165,6 +167,7 @@ EquipmentLeanOutApprovalModal, SecondMaintenanceApprovalModal, ThirdMaintenanceApprovalModal, + OutBoundOrderHandle, EquipmentSealUpApprovalModal, }, data() { @@ -247,6 +250,7 @@ selectThirdMaintenanceData: {}, selectBachData: {}, selectRepairOrderData: {}, + selectOutBoundOrderData: {}, //涓氬姟淇℃伅ID dataId: undefined } @@ -326,6 +330,9 @@ break case 'third_maintenance': this.handleThirdMaintenance(item) + break + case 'toolOutStorageApproval': + this.handleToolOutStorageApproval(item) break case 'equipment_seal_up': this.handleEquipmentSealUp(item) @@ -436,6 +443,14 @@ this.$refs.thirdMaintenanceApprovalModal.disableSubmit = false } }, + handleToolOutStorageApproval(item) { + if (item && item.dataId) { + this.selectOutBoundOrderData = Object.assign({}, item) + this.$refs.outBoundOrderHandle.auditVisible = true + this.$refs.outBoundOrderHandle.clearTableSource() + this.$refs.outBoundOrderHandle.getAllApproveData(item) + } + } handleEquipmentSealUp(item) { this.$refs.equipmentSealUpApprovalModelRef.visible = true this.$refs.equipmentSealUpApprovalModelRef.title = item.name diff --git a/src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue b/src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue new file mode 100644 index 0000000..d84210a --- /dev/null +++ b/src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue @@ -0,0 +1,493 @@ +<!-- + Description: 宸ヤ綔娴�-鍑哄簱鐢宠鍗曞鎵瑰鐞嗛〉闈� List + Author: 浣滆�� liuyh + Date: 2025-02-27 +--> +<template> + <a-modal + :title="title" + :width="width" + :visible="visible" + :footer="null" + @cancel="handCancel" + > + <a-card :bordered="false"> + <div> + <b>{{ selectShenpiData.description }}</b> + <br> + <br> + <a-tag color="blue"> + 澶勭悊浜� {{ selectShenpiData.assignee_dictText }} + </a-tag> + <a-tag color="blue"> + 鍒涘缓鏃堕棿 {{ selectShenpiData.createTime }} + </a-tag> + <br> + <br> + <button @click="fetchAndShowBmp" class="btn-custom">鎵撳紑娴佺▼鍥�</button> + <div v-if="imageSrc"> + <img :src="imageSrc" alt="Fetched Image" /> + </div> + <hr class="shallow-hr"> + </div> + <div> + <b>鐢宠璇︽儏</b> + <br> + <a-form :form='form'> + <a-spin :spinning="spinning"> + <a-tabs default-active-key='1' @change='callback'> + <a-tab-pane key='1' tab='鐢宠鍩烘湰淇℃伅'> + <a-form-model ref='form' :model='tableRowRecord'> + <a-row> + <a-col :span='span'> + <a-form-model-item label='鍑哄簱鍗曠紪鍙�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='outNum'> + <a-input :disabled='coldisabled' v-model='tableRowRecord.outNum'></a-input> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label='鍑哄簱绫诲瀷' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='outStorehouseType'> + <j-dict-select-tag :disabled="coldisabled" type="list" v-model="tableRowRecord.outStorehouseType" dictCode="out_storehouse_type" /> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span='span'> + <a-form-model-item label='鍑哄簱鏃堕棿' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='outboundTime'> + <j-date :disabled="coldisabled" v-model="tableRowRecord.outboundTime" :show-time="true" dateFormat="YYYY-MM-DD HH:mm" style="width: 100%"/> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label='棰嗙敤浜嬬敱' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='subjectMatter'> + <a-input :disabled='coldisabled' v-model='tableRowRecord.subjectMatter'></a-input> + </a-form-model-item> + </a-col> + </a-row> + <a-row> + <a-col :span='span'> + <a-form-model-item label='缁忔墜浜�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='handler'> + <a-input :disabled='coldisabled' v-model='tableRowRecord.handler_dictText'></a-input> + </a-form-model-item> + </a-col> + <a-col :span='span'> + <a-form-model-item label='澶囨敞' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'> + <a-textarea :disabled="coldisabled" v-model="tableRowRecord.remark" rows="4" /> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-tab-pane> + <a-tab-pane key='2' tab='鐢宠鏄庣粏淇℃伅'> + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :scroll="{x:'max-content'}" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="null"> + </a-table> + </a-tab-pane> + <a-tab-pane key='3' tab='娴佺▼鑺傜偣'> + <a-timeline> + <a-timeline-item v-for="(item,index) in hitaskDataSource" :key="index"> + <div> + <h3 style="font-weight: bold;">{{item.taskName}}</h3> + <div>澶勭悊浜猴細{{item.assignee_dictText}}</div> + <div v-if="index !==0">澶勭悊鏃堕暱锛歿{item.duration}}</div> + <div v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</div> + <div v-if="item.description">澶勭悊鎰忚锛歿{item.description}}</div> + </div> + </a-timeline-item> + </a-timeline> + </a-tab-pane> + </a-tabs> + </a-spin> + </a-form> + </div> + <div v-if="auditVisible"> + <hr class="shallow-hr"> + <br> + <b>瀹℃壒璇︽儏</b> + <br> + <a-form-model ref="form" :model="approveData" :rules="validatorRules" slot="detail"> + <a-row> + <a-col ::span='span'> + <a-form-model-item label="鐢宠浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop='handler_dictText'> + <a-input :disabled='coldisabled' v-model='tableRowRecord.handler_dictText'></a-input> + </a-form-model-item > + </a-col> + <a-col ::span='span'> + <a-form-model-item label="鐢宠鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createTime"> + <a-input :disabled='coldisabled' v-model='tableRowRecord.createTime'></a-input> + </a-form-model-item > + </a-col> + <a-col :span="24" class="btxx"> + <a-form-item label="瀹℃壒鐘舵��" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-select v-model='assignFileStream.status' placeholder="璇烽�夋嫨瀹℃壒缁撴灉"> + <a-select-option value="3">閫氳繃</a-select-option> + <a-select-option value="4">椹冲洖</a-select-option> + </a-select> + </a-form-item> + </a-col> + <a-col :span="24" class="btxx"> + <a-form-model-item label="瀹℃壒鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-textarea v-model="assignFileStream.approvalOpinion" rows="4" placeholder="璇疯緭鍏ュ鎵规剰瑙�"/> + </a-form-model-item > + </a-col> + </a-row> + <div class="table-operator" style="text-align: right;"> + <a-button @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button> + <a-button @click="submitForm">鎻� 浜�</a-button> + </div> + </a-form-model> + </div> + </a-card> + + + </a-modal> +</template> + +<script> + +import '@assets/less/TableExpand.less' +import { mixinDevice } from '@/utils/mixin' +import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' +export default { + name: 'FlowShenPi', + mixins: [mixinDevice], + props: { + selectShenpiData: { + type: Object, + required: true + } + }, + + data() { + return { + form: this.$form.createForm(this), + span: 12, + span1: 8, + coldisabled: true, + spinning: false, + tableRowRecord: {}, + assignFileStream:{}, + tableDataSource: [], + usageDataSource: [], + hitaskDataSource:[], + dataSource: [], + bomForm: {}, + imageSrc: null, + drawerVisible: true, + auditVisible: true, + loading: false, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 } + }, + wrapperCol: { + xs: { span: 30 }, + sm: { span: 16 } + }, + /* 鍒嗛〉鍙傛暟 */ + ipagination:{ + current: 1, + pageSize: 5, + pageSizeOptions: ['5', '10', '50'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title:'宸ュ叿缂栫爜', + align:"left", + dataIndex: 'toolNum' + }, + { + title:'宸ュ叿缂栧彿', + align:"left", + dataIndex: 'toolId' + }, + { + title:'宸ュ叿绫诲瀷', + align:"center", + dataIndex: 'applicationType_dictText' + }, + { + title:'涓枃鍚嶇О', + align:"center", + dataIndex: 'chineseName' + }, + { + title:'鍨嬪彿/鍥惧彿', + align:"left", + dataIndex: 'toolModel' + }, + { + title:'鍒�鍏锋潗鏂�', + align:"center", + dataIndex: 'toolMaterial' + }, + { + title:'闆朵欢鏉愭枡', + align:"center", + dataIndex: 'partMaterial' + }, + { + title:'鍘傚', + align:"center", + dataIndex: 'supplierId' + }, + { + title:'浠撳簱', + align:"center", + dataIndex: 'warehouseName' + }, + { + title:'鍑哄簱搴撲綅', + align:"center", + dataIndex: 'outboundLocation' + }, + { + title:'鍙敤搴撳瓨鏁伴噺', + align:"left", + dataIndex: 'quantity' + }, + { + title:'鐢宠鍑哄簱鏁伴噺', + align:"left", + dataIndex: 'outboundQuantity' + }, + { + title:'鍒涘缓鏃堕棿', + align:"left", + dataIndex: 'createTime' + } + ], + validatorRules: { + status: { + rules: [ + { required: true, message: '璇烽�夋嫨瀹℃壒鐘舵��!'}, + ] + }, + }, + approveData: {}, + flowData: {}, + title: '瀹℃壒椤甸潰', + width: 1200, + visible: false, + // 琛ㄥご + url: { + queryOutBoundOrder: '/tms/outboundOrder/queryById', + queryOutBoundDetailList: '/tms/outboundOrder/listOutboundDetailByMainId', + diagramView: '/assign/flow/diagramView', + queryHisTaskList:'/assign/flow/queryHisTaskList', + approve:"/tms/outboundOrder/approval", + }, + dictOptions: {}, + superFieldList: [], + workflowSource: [] + } + }, + created() { + }, + computed: {}, + methods: { + callback() { + }, + handCancel() { + this.visible = false + }, + clearTableSource() { + this.tableDataSource = [] + this.usageDataSource = [] + }, + fetchAndShowBmp() { + console.log('flowData----->', this.flowData) + try { + let parm = { + processDefinitionId: this.flowData.processDefinitionId, + processInstanceId:this.flowData.processInstanceId, + TaskDefinitionKey:this.flowData.processDefinitionKey + } + downFile(this.url.diagramView,parm,'get').then((res=>{ + console.log('Pica------>',res) + const urlObject = window.URL.createObjectURL(new Blob([res])) + this.imageSrc = urlObject + })) + } catch (error) { + console.error('Error fetching image blob:', error) + alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�') + } + }, + handleQueXiaoTask(){ + this.visible = false + this.routeReload() + }, + submitForm () { + const that = this; + if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){ + this.$message.warning('璇烽�夋嫨瀹℃壒鐘舵�侊紒') + return false; + } + if (!that.assignFileStream.approvalOpinion==null || that.assignFileStream.approvalOpinion===undefined) { + this.$message.warning('璇疯緭鍏ュ鎵规剰瑙侊紒') + return false; + } + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.form.validateFields((err, values) => { + if (!err) { + that.confirmLoading = true; + let url=this.url.approve + let method = 'post'; + let flowTaskVo = {} + flowTaskVo.status=that.assignFileStream.status; + flowTaskVo.approvalOpinion =that.assignFileStream.approvalOpinion; + flowTaskVo.comment =that.assignFileStream.approvalOpinion; + flowTaskVo.dataId = this.selectShenpiData.dataId + flowTaskVo.taskId = this.selectShenpiData.id + flowTaskVo.userId = this.selectShenpiData.assignee + flowTaskVo.instanceId = this.selectShenpiData.procInstId + flowTaskVo.targetKey = this.selectShenpiData.taskDefKey + flowTaskVo.values = this.selectShenpiData.variables + flowTaskVo.assignee = this.selectShenpiData.assignee + console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo) + httpAction(url,flowTaskVo,method).then((res)=>{ + if(res.success){ + that.$message.success(res.message); + that.visible = false + //鍒锋柊琛ㄦ牸 + that.$emit('searchReset') + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + }) + } + + }) + }, + getAllApproveData(item) { + this.visible = true + this.loading = true + console.log('selectShenpiData----->', this.selectShenpiData) + this.flowData = item + getAction(this.url.queryHisTaskList, {procInstId: item.procInstId}).then(res=>{ + if(res.success){ + this.hitaskDataSource = res.result + } + }) + getAction(this.url.queryOutBoundOrder, {id: item.dataId}).then((res => { + if (res.success) { + this.tableRowRecord = res.result + } + })) + getAction(this.url.queryOutBoundDetailList, {outStorehouseId: item.dataId}).then(res => { + if (res.success) { + this.dataSource = res.result.records + if (res.result.total) { + this.ipagination.total = res.result.total + } else { + this.ipagination.total = 0 + } + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + } + } +} +</script> +<style scoped> +.shallow-hr { + border: 0; + height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */ + background-color: rgba(0, 0, 0, 0.1); /* 浣跨敤 RGBA 棰滆壊锛屽苟璁剧疆杈冧綆鐨勯�忔槑搴� */ + margin: 20px 0; /* 鍒嗙晫绾夸笂涓嬬殑澶栬竟璺� */ +} +.btn-custom { + background-color: #4CAF50; /* 缁胯壊鑳屾櫙 */ + color: white; /* 鐧借壊鏂囧瓧 */ + border: none; /* 鏃犺竟妗� */ + padding: 5px 15px; /* 鍐呰竟璺� */ + text-align: center; /* 鏂囧瓧灞呬腑 */ + text-decoration: none; /* 鏃犱笅鍒掔嚎 */ + display: inline-block; /* 琛屽唴鍧楀厓绱� */ + font-size: 12px; /* 瀛椾綋澶у皬 */ + margin: 4px 2px; /* 澶栬竟璺� */ + cursor: pointer; /* 榧犳爣鎮仠鏃舵樉绀烘墜鍨� */ + border-radius: 4px; /* 鍦嗚杈规 */ +} + +.bold-large-label { + font-weight: bold; + font-size: 20px; /* 鎴栦綘闇�瑕佺殑浠讳綍澶у皬 */ +} +.left_qiu{ + position: absolute; + left: -74px; + top: 0; + width:54px; + border-radius: 50%; + height:54px; + font-size: 13px; + margin: auto; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: center; + background: #0099ff; + transform: translate(0, 0); +} +/deep/ .ant-timeline-item-tail{ + left: -29px !important; +} +.left_qiu span{ + width: 3em; + display: block; + color: #fff; + text-align: center; +} +.img{ + width: 75%; +} + +.wrap{ + clear: both; + width: 100%; + display: flex; + height: 50px; + border: 1px solid #ccc; + /* background-color: aqua; */ +} +.box{ + width:21%; + height:50px; + border-right: 1px solid #ccc; + line-height: 50px; + /* background: red; */ + text-align:center; + margin: auto; +} + +@import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/src/views/tms/OutboundDetailList.vue b/src/views/tms/OutboundDetailList.vue index 94181cc..623cd6d 100644 --- a/src/views/tms/OutboundDetailList.vue +++ b/src/views/tms/OutboundDetailList.vue @@ -131,9 +131,14 @@ } }, { - title:'鍒�鍏风紪鐮�', - align:"center", + title:'宸ュ叿缂栫爜', + align:"left", dataIndex: 'toolNum' + }, + { + title:'宸ュ叿缂栧彿', + align:"left", + dataIndex: 'toolId' }, { title:'宸ュ叿绫诲瀷', @@ -147,7 +152,7 @@ }, { title:'鍨嬪彿/鍥惧彿', - align:"center", + align:"left", dataIndex: 'toolModel' }, { @@ -176,13 +181,18 @@ dataIndex: 'outboundLocation' }, { + title:'鍙敤搴撳瓨鏁伴噺', + align:"left", + dataIndex: 'quantity' + }, + { title:'鐢宠鍑哄簱鏁伴噺', - align:"center", + align:"left", dataIndex: 'outboundQuantity' }, { title:'瀹為檯鍑哄簱鏁伴噺', - align:"center", + align:"left", dataIndex: 'outActualCount' }, { @@ -192,7 +202,7 @@ }, { title:'鍒涘缓鏃堕棿', - align:"center", + align:"left", dataIndex: 'createTime' }, // { diff --git a/src/views/tms/OutboundOrderList.vue b/src/views/tms/OutboundOrderList.vue index 0b58b9c..e6faa94 100644 --- a/src/views/tms/OutboundOrderList.vue +++ b/src/views/tms/OutboundOrderList.vue @@ -154,7 +154,7 @@ }, { title:'鍑哄簱鍗曠紪鍙�', - align:"center", + align:"left", dataIndex: 'outNum' }, { @@ -174,7 +174,7 @@ }, { title:'瀹℃牳鏃堕棿', - align:"center", + align:"left", dataIndex: 'auditDate' }, { @@ -184,7 +184,7 @@ }, { title:'鐢宠鍑哄簱鏃堕棿', - align:"center", + align:"left", dataIndex: 'outboundTime' }, { @@ -209,7 +209,7 @@ }, { title:'鍒涘缓鏃堕棿', - align:"center", + align:"left", dataIndex: 'createTime' }, { diff --git a/src/views/tms/modules/outBound/OutboundOrderModal.vue b/src/views/tms/modules/outBound/OutboundOrderModal.vue index fc2e217..ec09ece 100644 --- a/src/views/tms/modules/outBound/OutboundOrderModal.vue +++ b/src/views/tms/modules/outBound/OutboundOrderModal.vue @@ -37,7 +37,7 @@ <a-row> <a-col :span="12"> <a-form-model-item label="瀹℃牳浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reviewer"> - <j-select-user-by-dep :disabled="disableSubmit" v-model="model.reviewer" :store="'id'" :text="'realname'" :multi="false" /> + <j-select-user-by-dep :disabled="disableSubmit" v-model="model.reviewer" :store="'username'" :text="'realname'" :multi="false" /> </a-form-model-item> </a-col> <a-col :span="12"> -- Gitblit v1.9.3