Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
| | |
| | | //scrollX:{ enabled: true,gt:15 },//开启虚拟滚动 |
| | | mouseConfig:{selected: true},//鼠标选中 |
| | | keyboardConfig:{ |
| | | isArrow: true, |
| | | isDel: true, |
| | | isEnter: true, |
| | | isTab: true, |
| | | isEdit: true, |
| | | isChecked: true |
| | | isArrow: true |
| | | }, |
| | | columnConfig: { |
| | | resizable: true, |
| | |
| | | }) |
| | | |
| | | const handleKeyDown = (evnt) =>{ |
| | | |
| | | if(evnt.$event.keyCode === 38 ){ |
| | | let nextRowIndex = xGrid.value.getRowIndex(xGrid.value.getCurrentRecord()) - 1; |
| | | if (nextRowIndex < xGrid.value.getTableData().fullData.length && nextRowIndex>=0) { |
| | |
| | | import {useI18n} from "vue-i18n" |
| | | import request from "@/utils/request" |
| | | import footSum from "@/hook/footSum"; |
| | | import {addListener} from "@/hook/mouseMove"; |
| | | import {addListener,destroyAreaBox} from "@/hook/mouseMove"; |
| | | const { t } = useI18n() |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | virtualScroll: true, // 开启虚拟滚动功能 |
| | | id: 'OrderDetail', |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true,gt:13 },//开启虚拟滚动 |
| | | //scrollX:{ enabled: true,gt:15 },//开启虚拟滚动 |
| | | |
| | |
| | | }, |
| | | mouseConfig:{selected: true},//鼠标选中 |
| | | keyboardConfig:{ |
| | | isArrow: true, |
| | | isDel: true, |
| | | isEnter: true, |
| | | isTab: true, |
| | | isEdit: true, |
| | | isChecked: true |
| | | isArrow: true |
| | | }, |
| | | |
| | | columns:[ |
| | |
| | | } |
| | | |
| | | const handleKeyDown = (evnt) =>{ |
| | | |
| | | if(evnt.$event.keyCode === 38 ){ |
| | | let nextRowIndex = xGrid.value.getRowIndex(xGrid.value.getCurrentRecord()) - 1; |
| | | if (nextRowIndex < xGrid.value.getTableData().fullData.length && nextRowIndex>=0) { |
| | |
| | | |
| | | } |
| | | if(evnt.$event.keyCode === 40 ){ |
| | | |
| | | let nextRowIndex = xGrid.value.getRowIndex(xGrid.value.getCurrentRecord()) + 1; |
| | | if (nextRowIndex < xGrid.value.getTableData().fullData.length) { |
| | | xGrid.value.setCurrentRow(xGrid.value.getTableData().fullData[nextRowIndex]); |
| | |
| | | //cellarea.value = newElement |
| | | //添加多选列 |
| | | nextTick(() => { |
| | | window.addEventListener("keypress", ()=>{ |
| | | window.addEventListener("keydown", ()=>{ |
| | | destroyAreaBox() |
| | | }) |
| | | window.addEventListener("mousedown", tableOutDestroyAreaBox)//给window添加鼠标按下事件,判断是否在表格外,是销毁 |
| | |
| | | |
| | | //鼠标按下事件 |
| | | const tbodymousedown = (event: MouseEvent) => { |
| | | event.stopPropagation()//阻止冒泡 |
| | | //event.stopPropagation()//阻止冒泡 |
| | | getTablexGrid().closeMenu()//手动关闭右键菜单 |
| | | //左键0,中键1,右键2 |
| | | if (event.button === 0) {//左键按下 |
| | |
| | | export { |
| | | addListener, |
| | | toolbarButtonClickEvent, |
| | | exportData |
| | | exportData, |
| | | destroyAreaBox |
| | | } |
| | |
| | | {title: t('basicData.operate'), width: 80, slots: { default: 'button_slot' },fixed:"left"}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'order_id', width: 120, title: t('order.orderId'), filters: [{data: ''}], |
| | | field: 'order_id', title: t('order.orderId'), filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'customer_name', |
| | | width: 120, |
| | | title: t('customer.customerName'), |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | |
| | | }, |
| | | { |
| | | field: 'project', |
| | | width: 120, |
| | | title: t('order.project'), |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'batch', width: 130, title: t('order.batch'), filters: [{data: ''}], |
| | | field: 'batch', title: t('order.batch'), filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'quantity', width: 120, title: t('order.quantity'), filters: [{data: ''}], |
| | | field: 'quantity', title: t('order.quantity'), filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'area', width: 100, title: t('order.area'), filters: [{data: ''}], |
| | | field: 'area', title: t('order.area'), filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'create_time', |
| | | width: 100, |
| | | title: t('processCard.splitFrameTime'), |
| | | type: 'date', |
| | | attrs: {placeholder: '', type: 'date'}, |
| | |
| | | Boolean updateMaterialInventoryInventoryInt(@Param("inventoryId") Long inventoryId, |
| | | @Param("quantity") Integer quantity); |
| | | |
| | | Boolean updateMaterialInventoryInventoryPlanQuantityOut(@Param("inventoryId") Long inventoryId, |
| | | @Param("quantity") Integer quantity); |
| | | Boolean updateMaterialInventoryInventoryPlanQuantityInt(@Param("inventoryId") Long inventoryId, |
| | | @Param("quantity") Integer quantity); |
| | | |
| | | Boolean updateMaterialInventoryAvailableInventoryOut(@Param("inventoryId") Long inventoryId, |
| | | @Param("quantity") Integer quantity); |
| | | |
| | |
| | | List<MaterialOutboundDetail> materialOutboundDetailList = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId); |
| | | if (!materialOutboundDetailList.isEmpty()) { |
| | | for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailList) { |
| | | |
| | | if(materialOutboundDetail.getUseId()!=null){ |
| | | //修改物料库存数量 |
| | | materialInventoryMapper.updateMaterialInventoryInventoryPlanQuantityOut(materialOutboundDetail.getInventoryId(), materialOutboundDetail.getOutboundQuantity()); |
| | | }else{ |
| | | materialInventoryMapper.updateMaterialInventoryInventoryOut(materialOutboundDetail.getInventoryId(), materialOutboundDetail.getOutboundQuantity()); |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | List<MaterialOutboundDetail> materialOutboundDetailList = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId); |
| | | if (!materialOutboundDetailList.isEmpty()) { |
| | | for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailList) { |
| | | |
| | | if(materialOutboundDetail.getUseId()!=null){ |
| | | //修改物料库存数量 |
| | | materialInventoryMapper.updateMaterialInventoryInventoryPlanQuantityInt(materialOutboundDetail.getInventoryId(), materialOutboundDetail.getOutboundQuantity()); |
| | | }else{ |
| | | materialInventoryMapper.updateMaterialInventoryInventoryInt(materialOutboundDetail.getInventoryId(), materialOutboundDetail.getOutboundQuantity()); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryOut"> |
| | | <update id="updateMaterialInventoryInventoryPlanQuantityOut"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity-#{quantity},plan_quantity=if(plan_quantity-#{quantity}>=0,plan_quantity-#{quantity},0),total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryInt"> |
| | | <update id="updateMaterialInventoryInventoryPlanQuantityInt"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity+#{quantity},plan_quantity=plan_quantity+#{quantity},total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryOut"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity-#{quantity},total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryInt"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity+#{quantity},total_area=inventory_quantity*single_piece_area |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableInventoryOut"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity-#{quantity},inventory_quantity=inventory_quantity-#{quantity},total_area=inventory_quantity*single_piece_area |