Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
| | |
| | | terminationNo:'取消终止', |
| | | updateProcessMsg:'保存失败!请检查变更工序是否报工', |
| | | termination:'终止', |
| | | |
| | | notTermination:'隐藏终止', |
| | | printProgressProcessCard:'流程卡进度打印', |
| | | quantity:'工程用数量', |
| | | print1:'11列4行', |
| | | print2:'6行3列', |
| | |
| | | terminationNo:'取消终止', |
| | | updateProcessMsg:'保存失败!请检查变更工序是否报工', |
| | | termination:'终止', |
| | | |
| | | notTermination:'隐藏终止', |
| | | printProgressProcessCard:'流程卡进度打印', |
| | | quantity:'工程用数量', |
| | | print1:'11列4行', |
| | | print2:'6行3列', |
| | |
| | | terminationNo:'取消终止', |
| | | updateProcessMsg:'保存失败!请检查变更工序是否报工', |
| | | termination:'终止', |
| | | |
| | | notTermination:'隐藏终止', |
| | | printProgressProcessCard:'流程卡进度打印', |
| | | quantity:'工程用数量', |
| | | print1:'11列4行', |
| | | print2:'6行3列', |
| | |
| | | terminationNo:'取消终止', |
| | | updateProcessMsg:'保存失败!请检查变更工序是否报工', |
| | | termination:'终止', |
| | | |
| | | notTermination:'隐藏终止', |
| | | printProgressProcessCard:'流程卡进度打印', |
| | | quantity:'工程用数量', |
| | | print1:'11列4行', |
| | | print2:'6行3列', |
| | |
| | | terminationNo:'取消终止', |
| | | updateProcessMsg:'保存失败!请检查变更工序是否报工', |
| | | termination:'终止', |
| | | notTermination:'隐藏终止', |
| | | printProgressProcessCard:'流程卡进度打印', |
| | | |
| | | quantity:'工程用数量', |
| | | print1:'11列4行', |
| | |
| | | name: 'printProjectDetailSmallPiece', |
| | | component: () => import('../views/pp/processCard/PrintProjectDetailSmallPiece.vue'), |
| | | }, |
| | | |
| | | { |
| | | path: 'PrintProgressProcessCard', |
| | | name: 'PrintProgressProcessCard', |
| | | component: () => import('../views/pp/processCard/PrintProgressProcessCard.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/processCard/selectProcessCard' |
| | |
| | | <script setup> |
| | | |
| | | import BasicTable from "@/components/BasicTable.vue" |
| | | import BasicTable from "@/components/BrokenReportTemplate.vue" |
| | | import request from "@/utils/request" |
| | | import { ref} from "vue" |
| | | import { useI18n } from 'vue-i18n' |
| | | import companyInfo from "@/stores/sd/companyInfo"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | |
| | | const company = companyInfo() |
| | | const childrenData = ref({ |
| | | columns:[ |
| | | {type: 'seq',fixed:"left", title: t('basicData.Number'), width: '80' }, |
| | |
| | | {field: 'staterOperationOrderNumber', width: '150',title: t('productStock.staterOperationOrderNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'endOperationOrderNumber', width: '100',title: t('productStock.endOperationOrderNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'operator', width: '100',title: t('productStock.creator'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'operateTime', width:'140', title: t('productStock.productionDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'operateTime', width:'140', title: t('productStock.storageTime'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'processId', width:'140', title: t('processCard.processId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'type', width:'140', title: t('productStock.typeClaim'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'reviewed', width: '100',title: t('productStock.reviewed'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | |
| | | ],//表格表头字段 |
| | | data:[],//表格数据 |
| | | url :'/finishedGoodsInventory/getSelectFinishedOperateLogReport/入库', |
| | | exportUrl :'/finishedGoodsInventory/exportFinishedOperateLogReport/入库', |
| | | exportUrl :`/finishedGoodsInventory/exportFinishedOperateLogReportByDatetime/入库`, |
| | | exportName:t('stockReport.finishedProductInventoryReport'), |
| | | footList:['quantity','area','money','squareMillimeter'] |
| | | }) |
| | |
| | | }
|
| | | adjustGrayRectangles(layoutIndex);
|
| | | } else {
|
| | | // 旋转失败,恢复原始尺寸
|
| | | glassDetail.width = originalState.width;
|
| | | glassDetail.height = originalState.height;
|
| | | ElMessage.warning('无法旋转,存在重叠或超出边界');
|
| | |
|
| | | // 尝试向上移动并旋转
|
| | | const upResult = tryMoveAndRotate(layoutIndex, rectIndex, 'up');
|
| | | if (!upResult) {
|
| | | ElMessage.warning('无法旋转,即使移动后仍存在重叠或超出边界');
|
| | | }
|
| | | }
|
| | | };
|
| | |
|
| | | // 辅助方法:尝试移动并旋转
|
| | | const tryMoveAndRotate = (layoutIndex, rectIndex, direction) => {
|
| | | // 保存原始状态
|
| | | const layout = layouts.value[layoutIndex];
|
| | | const glassDetail = layout.glassDetails[rectIndex];
|
| | | const originalPosition = {
|
| | | x: glassDetail.x,
|
| | | y: glassDetail.y,
|
| | | width: glassDetail.width,
|
| | | height: glassDetail.height
|
| | | };
|
| | |
|
| | | let success = false;
|
| | |
|
| | | if (direction === 'up') {
|
| | | // 尝试向上移动并旋转
|
| | | moveRectAndRotate(layoutIndex, rectIndex, 'down');
|
| | |
|
| | | // 检查是否成功
|
| | | const otherRects = layout.glassDetails.filter(r => !r.isRemain && r !== glassDetail);
|
| | | let hasOverlap = false;
|
| | |
|
| | | otherRects.forEach(otherRect => {
|
| | | if (checkOverlap(glassDetail, otherRect)) {
|
| | | hasOverlap = true;
|
| | | }
|
| | | });
|
| | |
|
| | | if (!hasOverlap &&
|
| | | glassDetail.x + glassDetail.width <= layout.width &&
|
| | | glassDetail.y + glassDetail.height <= layout.height &&
|
| | | glassDetail.x >= 0 && glassDetail.y >= 0) {
|
| | | success = true;
|
| | | // 如果向上移动并旋转成功,则再向下移动,让矩形靠近底部
|
| | | moveRect(layoutIndex, rectIndex, 'up');
|
| | | } else {
|
| | | // 向上移动并旋转失败,恢复原始状态
|
| | | glassDetail.x = originalPosition.x;
|
| | | glassDetail.y = originalPosition.y;
|
| | | glassDetail.width = originalPosition.width;
|
| | | glassDetail.height = originalPosition.height;
|
| | | }
|
| | | } else if (direction === 'down') {
|
| | | // 尝试向下移动并旋转
|
| | | moveRectAndRotate(layoutIndex, rectIndex, 'up');
|
| | |
|
| | | // 检查是否成功
|
| | | const otherRects = layout.glassDetails.filter(r => !r.isRemain && r !== glassDetail);
|
| | | let hasOverlap = false;
|
| | |
|
| | | otherRects.forEach(otherRect => {
|
| | | if (checkOverlap(glassDetail, otherRect)) {
|
| | | hasOverlap = true;
|
| | | }
|
| | | });
|
| | |
|
| | | if (!hasOverlap &&
|
| | | glassDetail.x + glassDetail.width <= layout.width &&
|
| | | glassDetail.y + glassDetail.height <= layout.height &&
|
| | | glassDetail.x >= 0 && glassDetail.y >= 0) {
|
| | | success = true;
|
| | | // 如果向下移动并旋转成功,则再向上移动,让矩形靠近顶部
|
| | | moveRect(layoutIndex, rectIndex, 'down');
|
| | | } else {
|
| | | // 向下移动并旋转失败,恢复原始状态
|
| | | glassDetail.x = originalPosition.x;
|
| | | glassDetail.y = originalPosition.y;
|
| | | glassDetail.width = originalPosition.width;
|
| | | glassDetail.height = originalPosition.height;
|
| | | }
|
| | | }
|
| | |
|
| | | return success;
|
| | | };
|
| | |
|
| | | //移动旋转方法
|
| | | const moveRectAndRotate = (layoutIndex, rectIndex, direction) => {
|
| | | const layout = layouts.value[layoutIndex];
|
| | | const glassDetail = layout.glassDetails[rectIndex];
|
| | | const grayRects = layout.glassDetails.filter(r => r.isRemain);
|
| | |
|
| | | // 先移动
|
| | | moveRect(layoutIndex, rectIndex, direction);
|
| | |
|
| | | // 再旋转
|
| | | const originalState = { ...glassDetail };
|
| | | const temp = glassDetail.width;
|
| | | glassDetail.width = glassDetail.height;
|
| | | glassDetail.height = temp;
|
| | |
|
| | | const canPlace = grayRects.some(grayRect => {
|
| | | return grayRect.width >= glassDetail.width && grayRect.height >= glassDetail.height;
|
| | | const otherRects = layout.glassDetails.filter(r => !r.isRemain && r !== glassDetail);
|
| | | let isValidRotation = true;
|
| | |
|
| | | otherRects.forEach(otherRect => {
|
| | | if (checkOverlap(glassDetail, otherRect)) {
|
| | | isValidRotation = false;
|
| | | }
|
| | | });
|
| | |
|
| | | if (!canPlace) {
|
| | | const temp = glassDetail.width;
|
| | | glassDetail.width = glassDetail.height;
|
| | | glassDetail.height = temp;
|
| | | ElMessage.warning('无法旋转,没有足够的空间');
|
| | | return;
|
| | | if (glassDetail.x + glassDetail.width > layout.width || glassDetail.y + glassDetail.height > layout.height) {
|
| | | isValidRotation = false;
|
| | | }
|
| | |
|
| | | adjustGrayRectangles(layoutIndex);
|
| | | moveRect(layoutIndex, rectIndex, direction);
|
| | | if (isValidRotation) {
|
| | | // 更新glassPoint坐标(如果存在)
|
| | | if (glassDetail.glassPoint && Array.isArray(glassDetail.glassPoint)) {
|
| | | const originalPoints = JSON.parse(JSON.stringify(glassDetail.glassPoint));
|
| | | glassDetail.glassPoint.forEach((point, index) => {
|
| | | const relX = originalPoints[index].X - originalState.x;
|
| | | const relY = originalPoints[index].Y - originalState.y;
|
| | | point.X = originalState.x + relY;
|
| | | point.Y = originalState.y + (originalState.width - relX);
|
| | | point.X = parseFloat(point.X.toFixed(2));
|
| | | point.Y = parseFloat(point.Y.toFixed(2));
|
| | | });
|
| | | }
|
| | | adjustGrayRectangles(layoutIndex);
|
| | | } else {
|
| | | // 旋转失败,恢复原始尺寸和位置
|
| | | glassDetail.width = originalState.width;
|
| | | glassDetail.height = originalState.height;
|
| | | // 恢复移动前的位置
|
| | | moveRect(layoutIndex, rectIndex, getReverseDirection(direction));
|
| | | ElMessage.warning('无法旋转,存在重叠或超出边界');
|
| | | }
|
| | | };
|
| | |
|
| | | // 获取反向方向的辅助函数
|
| | | const getReverseDirection = (direction) => {
|
| | | switch (direction) {
|
| | | case 'up': return 'down';
|
| | | case 'down': return 'up';
|
| | | case 'left': return 'right';
|
| | | case 'right': return 'left';
|
| | | default: return direction;
|
| | | }
|
| | | };
|
| | |
|
| | | //移动方法
|
| | |
| | | printRow.value.flashback = flashback.value |
| | | printRow.value.landingSequence=landingSequence.value |
| | | printRow.value.compound = compound.value |
| | | console.log(printRow.value) |
| | | // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}}) |
| | | if(company.companyName=='常州市吉利玻璃有限公司'){ |
| | | dialogTableVisibleStraight.value = true |
| New file |
| | |
| | | <script setup> |
| | | |
| | | import request from "@/utils/request" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import {useRoute, useRouter} from 'vue-router' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {addListener} from "@/hook/mouseMove"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import footSum from "@/hook/footSum"; |
| | | import {VxeUI} from "vxe-pc-ui"; |
| | | import useOrderInfoStore from "@/stores/sd/order/orderInfo" |
| | | import {Printer} from "@element-plus/icons-vue/global"; |
| | | import PrintProcess from "@/components/pp/PrintProcess.vue"; |
| | | import PrintCustomLabelXJ from "@/components/pp/PrintCustomLabelTwo.vue"; |
| | | import companyInfo from "@/stores/sd/companyInfo"; |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | let router=useRouter() |
| | | const route = useRoute() |
| | | const orderInfo = useOrderInfoStore() |
| | | const company = companyInfo() |
| | | |
| | | const dialogTableVisible = ref(false) |
| | | const dialogTableVisibleLabel = ref(false) |
| | | |
| | | let props = defineProps({ |
| | | orderId:null |
| | | }) |
| | | onMounted(()=>{ |
| | | getTags() |
| | | filterData.value = orderInfo.selectProcessCardFilter.data |
| | | orderInfo.selectProcessCardFilter.list.forEach(item =>{ |
| | | xGrid.value.getColumnByField(item.field).filters = item.column.filters |
| | | }) |
| | | //启用表格拖动选中 |
| | | addListener(xGrid.value, gridOptions) |
| | | if(props.orderId===null || props.orderId===undefined || props.orderId===''){ |
| | | |
| | | }else{ |
| | | form.orderId = props.orderId |
| | | getWorkOrder() |
| | | } |
| | | if(route.query.orderId===null || route.query.orderId===undefined || route.query.orderId===''){ |
| | | |
| | | }else { |
| | | form.orderId = route.query.orderId |
| | | getWorkOrder() |
| | | } |
| | | |
| | | }) |
| | | |
| | | //打印流程卡条件 |
| | | let printRow = ref({ |
| | | list: null,//选中的数据 |
| | | printMergeVal: null, |
| | | like: null, |
| | | merge: null, |
| | | printFc:null, |
| | | flashback:null, |
| | | landingSequence:null, |
| | | compound:null |
| | | }) |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | order: { |
| | | project: '' |
| | | }, |
| | | orderDetail: { |
| | | productId: '', |
| | | productName: '', |
| | | computeGrossArea: '', |
| | | processingNote: '', |
| | | } |
| | | }) |
| | | |
| | | |
| | | //需要合并的列 |
| | | let column = [1,3,8] |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | gridOptions.loading = true |
| | | gridOptions.columns = gridOptions.columns.slice(0, 17); //清除动态生成的列重新查询 |
| | | request.post(`/processCard/PrintProgressProcessCard/${orderInfo.workOrderDate}`, column).then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.data.data.length === 0) { |
| | | ElMessage.warning(t('report.noDataFoundForThisOrder')) |
| | | return |
| | | } |
| | | orderInfo.workOrderDate = res.data.selectDate |
| | | const processList = { |
| | | title:t('report.workingProcedure'), |
| | | field:'process', |
| | | children:[] |
| | | } |
| | | // 动态添加列 |
| | | res.data.title.forEach((item,index) =>{ |
| | | let column = { |
| | | slots: { default: 'quantitySum' }, |
| | | width: 100, |
| | | title: item.process, |
| | | field: `dynamicColumn${index}` // 为动态列添加唯一的 field |
| | | } |
| | | processList.children.push(column) |
| | | |
| | | }) |
| | | gridOptions.columns.push(processList) |
| | | res.data.data.forEach(item => { |
| | | item.reportWorkQuantity=JSON.parse(item.reportWorkQuantity) |
| | | item.reportWorkQuantityCount=JSON.parse(item.reportWorkQuantityCount) |
| | | item.reportWorkQuantityShow=JSON.parse(item.reportWorkQuantityShow) |
| | | }) |
| | | gridOptions.loading = false |
| | | //mergeCells.value = res.data.mergeCell |
| | | xGrid.value.loadData(res.data.data) |
| | | } else { |
| | | gridOptions.loading = false |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const footSumDynamic = (data, columnTitle) => { |
| | | let sum = 0; |
| | | data.forEach(item => { |
| | | const value = Number(item.reportWorkQuantity[columnTitle]) || 0; // 从 reportWorkQuantity 中提取值并转换为数字 |
| | | sum += value; |
| | | }); |
| | | return sum.toFixed(2); |
| | | } |
| | | |
| | | const quantitySum = ( row,column )=>{ |
| | | const reportWorkQuantityCount = row.reportWorkQuantityCount[column.title] || '' |
| | | const reportWorkQuantityShow = row.reportWorkQuantityShow[column.title] || '' |
| | | if(reportWorkQuantityShow === reportWorkQuantityCount ){ |
| | | return reportWorkQuantityShow |
| | | } |
| | | |
| | | return (reportWorkQuantityShow |
| | | +'(' |
| | | +reportWorkQuantityCount |
| | | +')' ) |
| | | } |
| | | |
| | | const tags = ref([]) |
| | | |
| | | const tag = ref({ |
| | | id: null, |
| | | name: null, |
| | | type: 1, |
| | | tagWidth: null, |
| | | tagHeight: null, |
| | | value: null, |
| | | size: null |
| | | }) |
| | | const getTags = () => { |
| | | request.get('tagStyle/getTagList').then(res => { |
| | | res.data.forEach(item => { |
| | | item.value = JSON.parse(item.value) |
| | | }) |
| | | tags.value = res.data |
| | | }) |
| | | } |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | loading: false, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'ProcessCardProgress', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns : [ |
| | | |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | {field: 'order_id', width: 120, |
| | | title: t('order.orderId'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | {field: 'project', width: 150, |
| | | title: t('order.project'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | {field: 'customer_name', width: 150, |
| | | title: t('customer.customerName'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | {field: 'product_name', width: 150, |
| | | title: t('order.product'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | {field: 'glass_child',width: 130, title: t('reportingWorks.glassChild') ,filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | {field: 'order_type', width: 120,title: t('order.orderType'),filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | {field: 'process_id',width: 150, title: t('processCard.processId'),filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | {field: 'print_status', width: 120,title: t('processCard.numberTimesProcessCardPrinted')}, |
| | | {field: 'print_number', width: 110,title: t('processCard.numberLabelPrintingOperations')}, |
| | | {field: 'order_number', width: 100,title: t('order.OrderNum'),showOverflow:"ellipsis",filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | // {field: 'glassNumber', width: 110,title: t('reportingWorks.glassNumber'),showOverflow:"ellipsis",filters: [{data: ''}], |
| | | // slots: {filter: 'num1_filter'}, |
| | | // filterMethod: filterChanged}, |
| | | {field: 'technology_number', width: 110,title: t('processCard.technologyNumber'),showOverflow:"ellipsis",filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | |
| | | {field: 'quantity', width: 90,title: t('order.quantity')}, |
| | | {field: 'grossArea', width: 90,title: t('order.area')}, |
| | | {field: 'broken_num',width: 90, title: t('reportingWorks.quantityBroken')}, |
| | | // {field: 'shippedQuantity',width: 120, title: t('report.shippedQuantity')}, |
| | | {field: 'Storage',width: 120, title: t('report.inventoryNum')}, |
| | | {field: 'StorageAreaShow',width: 120, title: t('report.inventoryArea')}, |
| | | ], |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'print', name: t('processCard.print'), status: 'primary'}, |
| | | {code: 'printLabel', name: t('processCard.printLabel'), status: 'primary'}, |
| | | ], |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | ],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) { |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["quantity", "broken_num", "inventory", "inventoryArea","gross_area"]; // 静态列的求和 |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | // 动态列的求和 |
| | | if (column.field && column.field.startsWith('dynamicColumn')) { |
| | | return footSumDynamic(data, column.title) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | }) |
| | | |
| | | const gridEvents = { |
| | | async toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | selectRecords = $grid.getCheckboxRecords() |
| | | // selectRecords.forEach(obj => { |
| | | // delete obj.print_status; |
| | | // }); |
| | | let type = tag.value.name |
| | | let faceOrientation = stateValue.value |
| | | let lableTypes = lableType.value |
| | | let lableTitle = lableType.text |
| | | if ($grid) { |
| | | switch (code) { |
| | | //打印流程卡 |
| | | case 'print': { |
| | | if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) { |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | |
| | | let id = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | | id += selectRecords[i].id |
| | | } else { |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | printRow.value.list = JSON.stringify(selectRecords) |
| | | printRow.value.printMergeVal = printMerge.value |
| | | printRow.value.like = null |
| | | printRow.value.merge = company.flowCardMerge |
| | | printRow.value.printFc= printFc |
| | | printRow.value.flashback = flashback.value |
| | | printRow.value.landingSequence=landingSequence.value |
| | | printRow.value.compound = compound.value |
| | | dialogTableVisible.value = true |
| | | |
| | | |
| | | break |
| | | } |
| | | case 'printLabel': { |
| | | if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) { |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | if (tag.value.name === null || tag.value.name === '' || tag.value.name === undefined) { |
| | | ElMessage.warning(t('processCard.pleaseSelectCustomPrintLabelStyle')) |
| | | return |
| | | } |
| | | |
| | | let id = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | | id += selectRecords[i].id |
| | | } else { |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | |
| | | labelRow.value.list = JSON.stringify(selectRecords) |
| | | labelRow.value.faceOrientation = faceOrientation |
| | | labelRow.value.type = tag.value.name |
| | | labelRow.value.lableType = lableTypes |
| | | labelRow.value.dataType = 1 |
| | | dialogTableVisibleLabel.value = true |
| | | |
| | | |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | |
| | | |
| | | const form = reactive({ |
| | | orderId: '', |
| | | |
| | | }) |
| | | |
| | | const mergeCells = ref([ |
| | | |
| | | ]) |
| | | |
| | | |
| | | const handleCellDblClick = ({ row, column, cell, $event }) => { |
| | | VxeUI.clipboard.copy(row[column.property]) |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="width: 100%;height: 100%"> |
| | | <div class="head"> |
| | | <el-date-picker |
| | | v-model="orderInfo.workOrderDate" |
| | | :default-time="defaultTime" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | format="YYYY/MM/DD" |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | | |
| | | <el-button |
| | | :disabled="props.orderId" |
| | | @click="getWorkOrder" |
| | | id="select" |
| | | type="primary" :icon="Search">{{$t('basicData.search')}} |
| | | |
| | | </el-button> |
| | | |
| | | <label>{{ $t('processCard.labelStyle') }}:</label> |
| | | <el-select v-model="tag" :placeholder="$t('processCard.pleaseSelect')" style="width: 140px" @change="changeTag"> |
| | | <el-option |
| | | v-for="(tag,index) in tags" |
| | | :key="index" |
| | | :label="tag.name" |
| | | :value="tag" |
| | | /> |
| | | </el-select> |
| | | |
| | | </div> |
| | | <div class="main-table"> |
| | | <vxe-grid |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | :merge-cells="mergeCells" |
| | | @cell-dblclick="handleCellDblClick" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | |
| | | |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" |
| | | type="text" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #quantitySum="{ row,column }"> |
| | | <span>{{ quantitySum(row,column) }} </span> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | <!-- 流程卡打印 --> |
| | | <el-dialog |
| | | id="sizePrintCalrd" |
| | | v-model="dialogTableVisible" |
| | | :title="$t('processCard.print')" |
| | | destroy-on-close |
| | | style="width: 75%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button v-print="printContent" :icon="Printer" circle @click="printNumber"/> |
| | | </template> |
| | | <print-process |
| | | id="child" |
| | | :printLike="printRow.like" |
| | | :printList="printRow.list" |
| | | :printMerge="printRow.printMergeVal" |
| | | :printFc="printRow.printFc" |
| | | :merges="printRow.merge" |
| | | :flashback = "printRow.flashback" |
| | | :landingSequence = "printRow.landingSequence" |
| | | :compound = "printRow.compound" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | |
| | | <!-- 成品标签--> |
| | | <el-dialog |
| | | id="sizeCustom" |
| | | v-model="dialogTableVisibleLabel" |
| | | :title="$t('processCard.printLabel')" |
| | | destroy-on-close |
| | | style="width: 80%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-tooltip |
| | | class="box-item" |
| | | effect="dark" |
| | | :content="$t('processCard.yesTitle')" |
| | | placement="top" |
| | | > |
| | | <el-button :icon="Printer" circle @click="printOrder(1)"/> |
| | | </el-tooltip> |
| | | <el-tooltip |
| | | class="box-item" |
| | | effect="dark" |
| | | :content="$t('processCard.noTitle')" |
| | | placement="top" |
| | | > |
| | | <el-button @click="printOrder(3)"> |
| | | <i class="vxe-icon-print"></i> |
| | | </el-button> |
| | | </el-tooltip> |
| | | </template> |
| | | <print-custom-label-x-j id="childLabel" |
| | | :faceOrientation="labelRow.faceOrientation" |
| | | :lableType="labelRow.lableType" |
| | | :list="labelRow.list" |
| | | :lastList='lastList' |
| | | :type="labelRow.type" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .head{ |
| | | width: 100%; |
| | | height: 35px; |
| | | } |
| | | |
| | | .main-table{ |
| | | width: 100%; |
| | | height: calc(100% - 35px); |
| | | } |
| | | |
| | | .vxe-grid { |
| | | /* 禁用浏览器默认选中 */ |
| | | -webkit-user-select: none; |
| | | -moz-user-select: none; |
| | | -ms-user-select: none; |
| | | user-select: none; |
| | | } |
| | | </style> |
| | |
| | | <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/processCard/productionScheduling' }">{{$t('processCard.scheduling')}} |
| | | </el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/processCard/selectPrintFlowCard' }" >{{ $t('basicData.print') }}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(5)" :class="indexFlag===5?'indexTag':''" :to="{ path: '/main/processCard/selectPrintProject' }" >{{$t('processCard.engineeringPrinting')}}</el-breadcrumb-item> |
| | | <!-- <el-breadcrumb-item @click="changeRouter(5)" :class="indexFlag===5?'indexTag':''" :to="{ path: '/main/processCard/printProgressProcessCard' }" >{{ $t('processCard.printProgressProcessCard') }}</el-breadcrumb-item>--> |
| | | <el-breadcrumb-item @click="changeRouter(6)" :class="indexFlag===6?'indexTag':''" :to="{ path: '/main/processCard/selectPrintProject' }" >{{$t('processCard.engineeringPrinting')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/processCard/selectPrintFlowCard' }" style="display: none">{{ $t('basicData.print') }}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | |
| | | :model-value="terminationVal === 0" |
| | | @change="onlandingTerminationChange" |
| | | > |
| | | {{ t('processCard.termination') }} |
| | | {{ t('processCard.notTermination') }} |
| | | </el-checkbox> |
| | | |
| | | <el-button type="primary" @click="getWorkOrder">{{$t('basicData.search')}}</el-button> |
| | |
| | | const List = ["quantity",'stockNum','stockArea',] |
| | | if (List.includes(column.field)) { |
| | | //return footSum(data, column.field) |
| | | return footSum(data, column.field) |
| | | return total.value?.[column.field] ?? 0 |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | :model-value="terminationVal === 0" |
| | | @change="onlandingTerminationChange" |
| | | > |
| | | {{ t('processCard.termination') }} |
| | | {{ t('processCard.notTermination') }} |
| | | </el-checkbox> |
| | | |
| | | <el-button type="primary" @click="getWorkOrder">{{$t('basicData.search')}}</el-button> |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | return Result.success(finishedGoodsInventoryService.getSelectFinishedOperateLogReport(type,pageNum,pageSize,selectDate,finishedOperateLog)); |
| | | } |
| | | |
| | | @ApiOperation("成品库存记录查询接口日期时间查询") |
| | | @SaCheckPermission("warehouseReport.search") |
| | | @PostMapping("/getSelectFinishedOperateLogReport/{type}/{pageNum}/{pageSize}/{selectDate}/{reportTime}") |
| | | public Result getSelectFinishedOperateLogReportByDatetime(@PathVariable String type,@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate,@PathVariable String reportTime, @RequestBody FinishedOperateLog finishedOperateLog){ |
| | | return Result.success(finishedGoodsInventoryService.getSelectFinishedOperateLogReportByDateTime(type,pageNum,pageSize,selectDate,reportTime,finishedOperateLog)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("成品报表导出") |
| | | @PostMapping("/exportFinishedOperateLogReport/{type}") |
| | | public void exportFinishedOperateLogReport(@PathVariable String type,HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | |
| | | DownExcel.download(response, FinishedOperateLogDTO.class, finishedGoodsInventoryService.exportFinishedOperateLogReport(dates,type),"orderReport"); |
| | | } |
| | | |
| | | @ApiOperation("成品报表导出日期时间") |
| | | @PostMapping("/exportFinishedOperateLogReportByDatetime/{type}") |
| | | public void exportFinishedOperateLogReportByDatetime( |
| | | @PathVariable String type,HttpServletResponse response, |
| | | @RequestBody List<String> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, FinishedOperateLogDTO.class, finishedGoodsInventoryService.exportFinishedOperateLogReportByDatetime(dates,type),"orderReport"); |
| | | } |
| | | |
| | | |
| | | /*订单一键入库*/ |
| | | @ApiOperation("订单一键入库") |
| | |
| | | } |
| | | |
| | | |
| | | @PostMapping("/calculate") |
| | | @PostMapping("/mesCalculate") |
| | | public ResponseEntity<Map<String, Object>> receiveOptimizeRequest( |
| | | @RequestBody Map<String, Object> requestData) { |
| | | |
| | |
| | | response.put("msg", "success"); |
| | | response.put("data", ""); |
| | | |
| | | // 异步处理计算任务 |
| | | // todo 异步处理计算任务 |
| | | // glassOptimizeService.processExternalOptimizeRequest(requestData); |
| | | System.out.println(requestData); |
| | | |
| | |
| | | public Result selectProcessCardProgress(@RequestBody Map<String, String> object) { |
| | | return flowCardService.selectProcessCardProgressSv(object); |
| | | } |
| | | |
| | | @ApiOperation("流程卡进度打印") |
| | | @PostMapping("/PrintProgressProcessCard/{selectDate}") |
| | | public Result PrintProgressProcessCard(@PathVariable List<String> selectDate, @RequestBody List<String> columns) { |
| | | return Result.success(flowCardService.PrintProgressProcessCardSv(selectDate, columns)); |
| | | } |
| | | } |
| | |
| | | |
| | | List<FinishedOperateLog> getSelectFinishedOperateLogReport(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog,String type); |
| | | @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog,String type, |
| | | @Param("dateType") String dateType); |
| | | |
| | | Map<String,Integer> getSelectFinishedOperateLogReportPageTotal(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog,String type); |
| | | @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog, |
| | | String type, |
| | | @Param("dateType") String dateType); |
| | | |
| | | List<FinishedOperateLogDTO> exportFinishedOperateLogReport(List<LocalDate> dates,String type); |
| | | |
| | | List<FinishedOperateLogDTO> exportFinishedOperateLogReportByDatetime(List<String> dates,String type); |
| | | Boolean insertOrderFinishedOperateLog(@Param("orderDetail") OrderDetail orderDetail,@Param("userName") String userName, |
| | | @Param("oddNumber") String oddNumber,@Param("processId") String processId); |
| | | |
| | |
| | | List<Map<String, Object>> getNewProcessMp(String processId, String orderNumber, String technologyNumber); |
| | | |
| | | Map<String, Object> getProcessInfo( String processName); |
| | | |
| | | List<Map<String, String>> OrderProcess(); |
| | | |
| | | List<Map<String, String>> PrintProgressProcessCardData(String startDate, String endDate); |
| | | } |
| | |
| | | public interface ReportingWorkMapper extends MPJBaseMapper<ReportingWork> { |
| | | |
| | | |
| | | ReportingWork AddSelectLastWorkMp(String processIdStr, String technologyStr, String previousProcess, String nextProcess, String process, String reportType); |
| | | ReportingWork AddSelectLastWorkMp(String processIdStr, |
| | | String technologyStr, |
| | | String previousProcess, |
| | | String nextProcess, |
| | | String process, |
| | | String reportType); |
| | | |
| | | List<BasicDataProduce> SelectWorkBasicDeviceMp(String process); |
| | | |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | |
| | | } |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", finishedOperateLogMapper.getSelectFinishedOperateLogReport(offset, pageSize,startDate, endDate, finishedOperateLog,type)); |
| | | map.put("total", finishedOperateLogMapper.getSelectFinishedOperateLogReportPageTotal(offset, pageSize,startDate, endDate, finishedOperateLog,type)); |
| | | map.put("data", finishedOperateLogMapper.getSelectFinishedOperateLogReport(offset, pageSize,startDate, endDate, finishedOperateLog,type,"date")); |
| | | map.put("total", finishedOperateLogMapper.getSelectFinishedOperateLogReportPageTotal(offset, pageSize,startDate, endDate, finishedOperateLog,type,"date")); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | |
| | | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getSelectFinishedOperateLogReportByDateTime(String type, Integer pageNum, Integer pageSize, List<String> selectDate, String reportTime, FinishedOperateLog finishedOperateLog) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | String startDate = toReportTime(LocalDate.now().minusDays(7).toString(), reportTime); |
| | | String endDate = toReportTime(LocalDate.now().toString(), reportTime); |
| | | |
| | | // 如果前端传了时间,就用前端日期 + reportTime |
| | | if (selectDate != null && selectDate.size() == 2) { |
| | | if (selectDate.get(0) != null && !selectDate.get(0).isEmpty()) { |
| | | startDate = toReportTime(selectDate.get(0), reportTime); |
| | | } |
| | | if (selectDate.get(1) != null && !selectDate.get(1).isEmpty()) { |
| | | endDate = toReportTime(selectDate.get(1), reportTime); |
| | | } |
| | | } |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", finishedOperateLogMapper.getSelectFinishedOperateLogReport(offset, pageSize,startDate, endDate, finishedOperateLog,type,"datetime")); |
| | | map.put("total", finishedOperateLogMapper.getSelectFinishedOperateLogReportPageTotal(offset, pageSize,startDate, endDate, finishedOperateLog,type,"datetime")); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate",list); |
| | | return map; |
| | | } |
| | | |
| | | private static final DateTimeFormatter DATE_TIME_FMT = |
| | | DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | private String toReportTime(String dateStr, String reportTime) { |
| | | if (dateStr == null || dateStr.isEmpty()) { |
| | | return null; |
| | | } |
| | | |
| | | // 只保留 yyyy-MM-dd,防止前端传完整时间导致 parse 异常 |
| | | String onlyDate = dateStr.length() > 10 ? dateStr.substring(0, 10) : dateStr; |
| | | |
| | | |
| | | String[] parts = reportTime.split(":"); |
| | | int hour = Integer.parseInt(parts[0]); |
| | | int minute = parts.length > 1 ? Integer.parseInt(parts[1]) : 0; |
| | | int second = parts.length > 2 ? Integer.parseInt(parts[2]) : 0; |
| | | |
| | | LocalDate date = LocalDate.parse(onlyDate); |
| | | LocalTime time = LocalTime.of(hour, minute, second); |
| | | |
| | | return LocalDateTime.of(date, time).format(DATE_TIME_FMT); |
| | | } |
| | | |
| | | public List<FinishedOperateLogDTO> exportFinishedOperateLogReportByDatetime(List<String> dates, String type) { |
| | | return finishedOperateLogMapper.exportFinishedOperateLogReportByDatetime(dates,type); |
| | | } |
| | | } |
| | |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | public Map<String, Object> PrintProgressProcessCardSv(List<String> selectDate, List<String> columns) { |
| | | String endDate = LocalDate.now().toString(); |
| | | String startDate = LocalDate.now().minusDays(15).toString(); |
| | | if(selectDate !=null && selectDate.size()==2){ |
| | | if(!selectDate.get(0).isEmpty()){ |
| | | startDate = selectDate.get(0); |
| | | } |
| | | if(!selectDate.get(1).isEmpty()){ |
| | | endDate = selectDate.get(1); |
| | | } |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //获取表格内容数据 |
| | | List<Map<String, String>> dataList = flowCardMapper.PrintProgressProcessCardData(startDate, endDate); |
| | | //获取表头工序筛选数据 |
| | | List<Map<String, String>> uniqueList = flowCardMapper.OrderProcess(); |
| | | map.put("title", uniqueList); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate",list); |
| | | map.put("data",dataList ); |
| | | return map; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | totalSumMap.put("stockNum", totalStockNum); |
| | | totalSumMap.put("stockArea", totalStockArea); |
| | | totalSumMap.put("stockArea", Double.valueOf(String.format("%.2f", totalStockArea))); |
| | | |
| | | map.put("data", resultList); |
| | | map.put("total", totalSumMap); |
| | |
| | | left join sd.`order` o on o.order_id=fol.order_id |
| | | left join sd.product p on p.id=od.product_id |
| | | <where> |
| | | date(fol.operate_time)>=#{startDate} and date(fol.operate_time) <= #{endDate} and fol.operate_type=#{type} |
| | | <if test="dateType=='date'"> |
| | | date(fol.operate_time)>=#{startDate} and date(fol.operate_time) <= #{endDate} |
| | | </if> |
| | | <if test="dateType=='datetime'"> |
| | | fol.operate_time>=#{startDate} and fol.operate_time <= #{endDate} |
| | | </if> |
| | | and fol.operate_type=#{type} |
| | | |
| | | <if test="finishedOperateLog.operateType != null and finishedOperateLog.operateType != ''"> |
| | | and fol.operate_type regexp #{finishedOperateLog.operateType} |
| | | </if> |
| | |
| | | left join sd.`order` o on o.order_id=fol.order_id |
| | | left join sd.product p on p.id=od.product_id |
| | | <where> |
| | | date(fol.operate_time)>=#{startDate} and date(fol.operate_time) <= #{endDate} and fol.operate_type=#{type} |
| | | <if test="dateType=='date'"> |
| | | date(fol.operate_time)>=#{startDate} and date(fol.operate_time) <= #{endDate} |
| | | </if> |
| | | <if test="dateType=='datetime'"> |
| | | fol.operate_time>=#{startDate} and fol.operate_time <= #{endDate} |
| | | </if> |
| | | and fol.operate_type=#{type} |
| | | |
| | | |
| | | <if test="finishedOperateLog.operateType != null and finishedOperateLog.operateType != ''"> |
| | | and fol.operate_type regexp #{finishedOperateLog.operateType} |
| | | </if> |
| | |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | left join sd.`order` o on o.order_id=fol.order_id |
| | | left join sd.product p on p.id=od.product_id |
| | | where date(fol.operate_time)>=#{dates[0]} and date(fol.operate_time) <= #{dates[1]} and fol.operate_type=#{type} |
| | | where |
| | | date(fol.operate_time)>=#{dates[0]} and date(fol.operate_time) <= #{dates[1]} |
| | | |
| | | and fol.operate_type=#{type} |
| | | |
| | | </select> |
| | | |
| | | <select id="exportFinishedOperateLogReportByDatetime"> |
| | | select fol.id, |
| | | fol.operation_order_number, |
| | | fol.order_id, |
| | | fol.operate_type, |
| | | fol.process_id, |
| | | fol.operation_number, |
| | | fol.quantity, |
| | | fol.operator, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.width, |
| | | od.height, |
| | | fol.stater_operation_order_number, |
| | | fol.end_operation_order_number, |
| | | fol.operate_time, |
| | | fol.`status`, |
| | | fol.is_state, |
| | | fol.reviewed, |
| | | fol.reviewed_time, |
| | | fol.type, |
| | | fol.remarks, |
| | | fol.area, |
| | | fol.money, |
| | | o.customer_name, |
| | | o.project, |
| | | od.price, |
| | | o.order_type, |
| | | p.thickness * fol.area as square_millimeter |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.status!='已作废') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | left join sd.`order` o on o.order_id=fol.order_id |
| | | left join sd.product p on p.id=od.product_id |
| | | where |
| | | fol.operate_time>=#{dates[0]} and fol.operate_time <= #{dates[1]} |
| | | |
| | | and fol.operate_type=#{type} |
| | | |
| | | </select> |
| | | |
| | |
| | | select basic_name as process,sort FROM sd.basic_data as bd |
| | | where bd.basic_category='process' and bd.basic_name = #{processName} |
| | | </select> |
| | | <select id="OrderProcess"> |
| | | select DISTINCT basic_name as process,nickname,sort from sd.basic_data where basic_category = 'process' |
| | | </select> |
| | | |
| | | <select id="PrintProgressProcessCardData"> |
| | | select a.product_name, |
| | | b.glass_child, |
| | | d.order_type, |
| | | c.process_id, |
| | | c.process_id as 'processId', |
| | | c.order_id, |
| | | c.order_number, |
| | | c.technology_number, |
| | | b.child_width, |
| | | b.child_height, |
| | | c.quantity, |
| | | |
| | | c.quantity-ifnull(c.termination_quantity,0) as thisQuantity,/*用于判断是否改变颜色*/ |
| | | e.reportWorkQuantity, |
| | | e.reportWorkQuantityShow, |
| | | e.reportWorkQuantityCount, |
| | | e.reportWorkTime, |
| | | e.broken_num, |
| | | c.quantity-ifnull(c.termination_quantity,0) as glassQuantity, |
| | | |
| | | c.quantity-ifnull(c.termination_quantity,0) as quantityShow, |
| | | round( (c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,2) as grossAreaShow, |
| | | ifnull(c.received_quantity, 0) as StorageShow, |
| | | ifnull(dd.quantity, 0) as shippedQuantityShow, -- 发货数量 |
| | | round(ifnull(dd.quantity, 0)*a.compute_area,2) as shippedAreaShow, -- 发货面积 |
| | | round((ifnull(c.received_quantity, 0))*a.compute_area,2) as StorageAreaShow,-- 入库面积 |
| | | |
| | | round((c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,2)as grossArea, |
| | | ifnull(c.received_quantity, 0) as Storage, |
| | | ifnull(dd.quantity, 0) as shippedQuantity, |
| | | round(ifnull(dd.quantity, 0)*a.compute_area,2) as shippedArea, |
| | | round((ifnull(c.received_quantity, 0))*a.compute_area,2) as StorageArea, |
| | | |
| | | |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber, |
| | | b.`group`, |
| | | c.print_status, |
| | | c.print_number, |
| | | o.project, |
| | | o.customer_name |
| | | |
| | | from pp.flow_card as c |
| | | left join |
| | | sd.order_detail as a |
| | | on c.order_id = a.order_id |
| | | and c.order_number = a.order_number |
| | | left join sd.order_glass_detail as b |
| | | on c.order_id = b.order_id |
| | | and b.order_number = c.order_number |
| | | and c.technology_number = b.technology_number |
| | | left join sd.`order` as d |
| | | on c.order_id = d.order_id |
| | | # left join mm.finished_goods_inventory as f |
| | | # on c.order_id = f.order_id and f.order_number = c.order_number |
| | | left join sd.delivery_detail as dd on dd.order_id = a.order_id and dd.order_number = a.order_number |
| | | left join (SELECT a.process_id, |
| | | a.order_number, |
| | | a.technology_number, |
| | | sum(a.broken_num) as broken_num, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", if(a.technology_number!=1 and (bd.nickname='stepD' || bd.nickname='stepB' ) ,0,reporting_work_num), "\"")), |
| | | '}' |
| | | ) as reportWorkQuantity, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num, "\"")), |
| | | '}' |
| | | ) as reportWorkQuantityShow, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num_count, "\"")), |
| | | '}' |
| | | ) as reportWorkQuantityCount, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", IFNULL(date(a.update_time),''), "\"")), |
| | | '}' |
| | | ) as reportWorkTime |
| | | FROM sd.order_process_detail as a |
| | | left join (SELECT DISTINCT basic_name,nickname from sd.basic_data as bd where bd.basic_category = 'process') as bd |
| | | on a.process = bd.basic_name |
| | | left join pp.flow_card as fc on fc.process_id=a.process_id and fc.order_number=a.order_number and fc.technology_number=a.technology_number |
| | | where (fc.create_time) >= #{startDate} and (fc.create_time) <= #{endDate} |
| | | GROUP BY a.process_id, a.order_number, a.technology_number |
| | | |
| | | |
| | | ) as e |
| | | on e.process_id = c.process_id |
| | | and e.technology_number = c.technology_number |
| | | and e.order_number = c.order_number |
| | | left join sd.`order` as o on o.order_id =c.order_id |
| | | where (c.create_time) >= #{startDate} and (c.create_time) <= #{endDate} |
| | | and d.create_order>0 and c.quantity-ifnull(c.termination_quantity,0)>0 |
| | | group by c.order_number, |
| | | c.technology_number, |
| | | c.process_id |
| | | order by c.process_id, c.order_number, c.technology_number |
| | | </select> |
| | | </mapper> |
| | |
| | | from |
| | | ( |
| | | SELECT (od.quantity) AS quantity, |
| | | d.numCounts + d.patchNumSum - d.numCount -d.broken_num as stockNum, |
| | | if(d.numCounts + d.patchNumSum - d.numCount -d.broken_num - fc.termination_quantity <0,0,d.numCounts + d.patchNumSum - d.numCount -d.broken_num - fc.termination_quantity) as stockNum, |
| | | ROUND(ogd.child_width * ogd.child_height * |
| | | (d.numCounts + d.patchNumSum - d.numCount - |
| | | d.broken_num) / 1000000, 2) as stockArea |
| | | (if(d.numCounts + d.patchNumSum - d.numCount -d.broken_num - fc.termination_quantity <0,0,d.numCounts + d.patchNumSum - d.numCount -d.broken_num - fc.termination_quantity)) / 1000000, 2) as stockArea |
| | | FROM |
| | | sd.order_detail AS od |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | |
| | | and position(#{selectProcesses} in d.process) |
| | | left join sd.`order` as o on o.order_id=od.order_id |
| | | where o.create_order>0 |
| | | and d.numCounts +d.patchNumSum - d.numCount - d.broken_num != 0 |
| | | and if(d.numCounts + d.patchNumSum - d.numCount -d.broken_num - fc.termination_quantity <0,0,d.numCounts + d.patchNumSum - d.numCount -d.broken_num - fc.termination_quantity) != 0 |
| | | and d.process!=SUBSTRING_INDEX(ogd.process, '->', 1) |
| | | and position(#{selectProcesses} in d.process) |
| | | and position(#{orderId} in od.order_id) |
| | |
| | | od.quantity, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | d.numCounts + d.patchNumSum - d.numCount -d.broken_num as stockNum, |
| | | if(d.numCounts + d.patchNumSum - d.numCount -d.broken_num-ifnull(fc.termination_quantity,0)<0,0,d.numCounts + d.patchNumSum - d.numCount -d.broken_num-ifnull(fc.termination_quantity,0)) as stockNum, |
| | | ROUND(ogd.child_width * ogd.child_height * |
| | | (d.numCounts + d.patchNumSum - d.numCount - |
| | | d.broken_num) / 1000000, 2) as stockArea, |
| | | (if(d.numCounts + d.patchNumSum - d.numCount -d.broken_num-ifnull(fc.termination_quantity,0)<0,0,d.numCounts + d.patchNumSum - d.numCount -d.broken_num-ifnull(fc.termination_quantity,0))) / 1000000, 2) as stockArea, |
| | | od.product_name, |
| | | od.bend_radius, |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') AS glassNumber |
| | |
| | | left join sd.`order` as o on o.order_id=od.order_id |
| | | LEFT JOIN sd.basic_data AS bd ON bd.basic_name = d.process |
| | | where o.create_order>0 |
| | | and d.numCounts +d.patchNumSum - d.numCount - d.broken_num != 0 |
| | | and if(d.numCounts + d.patchNumSum - d.numCount -d.broken_num-ifnull(fc.termination_quantity,0)<0,0,d.numCounts + d.patchNumSum - d.numCount -d.broken_num-ifnull(fc.termination_quantity,0)) != 0 |
| | | and d.process!=SUBSTRING_INDEX(ogd.process, '->', 1) |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} in o.project) |
| | |
| | | SELECT g.* |
| | | ,GROUP_CONCAT(g.glass_child SEPARATOR '+') as childName |
| | | from( SELECT f.*, |
| | | e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num as quantity, |
| | | (e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num)*f.area as glassArea |
| | | if(e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity<0, |
| | | 0,e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity) as quantity, |
| | | round(if(e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity<0,0, |
| | | e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity)*f.area/1000000,2) as glassArea |
| | | from (SELECT a.order_id, |
| | | if(a.batch!="",CONCAT(a.project,'(',a.batch,')'),a.project) as project, |
| | | C.product_id, |
| | |
| | | d.`group` , |
| | | b.broken_num, |
| | | b.id, |
| | | c.area, |
| | | d.child_width * d.child_height as area, |
| | | d.glass_child, |
| | | ifnull(cb.patchNumSum,0) as patchNumSum |
| | | ifnull(cb.patchNumSum,0) as patchNumSum, |
| | | fc.termination_quantity |
| | | |
| | | FROM sd.`order` as a |
| | | LEFT JOIN sd.order_process_detail as b |
| | |
| | | f.technology_number ORDER BY f.process_id, f.order_number, |
| | | f.technology_number) as g |
| | | <choose> |
| | | <when test="laminating == 'stepC' and process == '预压'"> |
| | | <when test="laminating == 'stepB'"> |
| | | GROUP BY g.process_id, g.order_number, g.technology_number |
| | | </when> |
| | | <when test="laminating == 'stepC'"> |
| | |
| | | |
| | | |
| | | ) as h |
| | | where h.quantity >0 |
| | | <choose> |
| | | <when test="optionVal == 1"> |
| | | GROUP BY thisProcess |
| | |
| | | SELECT g.* |
| | | ,GROUP_CONCAT(g.glass_child SEPARATOR '+') as childName |
| | | from( SELECT f.*, |
| | | e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num as quantity, |
| | | (e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num)*f.area as glassArea |
| | | if(e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity<0,0,e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity) as quantity, |
| | | round(if(e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity<0,0,e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num-f.termination_quantity)*f.area/1000000,2) as glassArea |
| | | from (SELECT a.order_id, |
| | | a.project, |
| | | C.product_id, |
| | |
| | | d.`group` , |
| | | b.broken_num, |
| | | b.id, |
| | | c.area, |
| | | d.child_width * d.child_height as area, |
| | | d.glass_child, |
| | | ifnull(cb.patchNumSum,0) as patchNumSum |
| | | ifnull(cb.patchNumSum,0) as patchNumSum, |
| | | fc.termination_quantity |
| | | |
| | | FROM sd.`order` as a |
| | | LEFT JOIN sd.order_process_detail as b |
| | |
| | | on e.id=(f.id-1) and e.process_id = f.process_id and e.order_number = f.order_number and e.technology_number =f.technology_number |
| | | where |
| | | e.id is not null |
| | | and e.reporting_work_num_count-f.reporting_work_num_count>0 group by f.process_id, f.order_number, |
| | | and (e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num)>0 group by f.process_id, f.order_number, |
| | | f.technology_number ORDER BY f.process_id, f.order_number, |
| | | f.technology_number) as g |
| | | <choose> |
| | | <when test="laminating == 'stepC' and process == '预压'"> |
| | | <when test="laminating == 'stepB'"> |
| | | GROUP BY g.process_id, g.order_number, g.technology_number |
| | | </when> |
| | | <when test="laminating == 'stepC'"> |
| | |
| | | e.id is not null |
| | | and (e.reporting_work_num_count+f.patchNumSum-f.reporting_work_num_count-f.broken_num)>0 ) as g |
| | | <choose> |
| | | <when test="laminating == 'stepC' and process == '预压'"> |
| | | <when test="laminating == 'stepB'"> |
| | | GROUP BY g.process_id, g.order_number, g.technology_number |
| | | </when> |
| | | <when test="laminating == 'stepC'"> |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | if(od.shape=1,'普形',if(od.shape=2,'异形','')) as shape, |
| | | fc.quantity -fc.export_number + ifnull(patch.patch_num,0) -odpd.reporting_work_num -odpd.broken_num - ifnull(fc.termination_quantity,0) as quantity, |
| | | fc.quantity -fc.export_number + ifnull(patch.patch_num,0) -odpd.reporting_work_num -odpd.broken_num - ifnull(fc.termination_quantity,0) as completedQuantity, |
| | | IF(odpd.reporting_work_num>=fc.quantity-fc.termination_quantity, |
| | | (fc.quantity -fc.export_number + ifnull(patch.patch_num,0) -odpd.reporting_work_num -odpd.broken_num), |
| | | IF((fc.quantity - ifnull(fc.termination_quantity,0) -fc.export_number + ifnull(patch.patch_num,0) -odpd.reporting_work_num -odpd.broken_num )<0,0, |
| | | (fc.quantity - ifnull(fc.termination_quantity,0) -fc.export_number + ifnull(patch.patch_num,0) -odpd.reporting_work_num -odpd.broken_num))) |
| | | as quantity, |
| | | IF(odpd.reporting_work_num>=fc.quantity-fc.termination_quantity, |
| | | (fc.quantity -fc.export_number + ifnull(patch.patch_num,0) -odpd.reporting_work_num -odpd.broken_num), |
| | | IF((fc.quantity - ifnull(fc.termination_quantity,0) -fc.export_number + ifnull(patch.patch_num,0) -odpd.reporting_work_num -odpd.broken_num )<0,0, |
| | | (fc.quantity - ifnull(fc.termination_quantity,0) -fc.export_number + ifnull(patch.patch_num,0) -odpd.reporting_work_num -odpd.broken_num))) as completedQuantity, |
| | | odpd.reporting_work_num as completed, |
| | | odpd.broken_num as onceBroken, |
| | | if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag, -- 判断是否已经完成,已经完成不序号和同序号数量相同才能提交 |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | if(od.shape=1,'普形',if(od.shape=2,'异形','')) as shape, |
| | | if((odpds.reporting_work_num_count + ifnull(c.patchNumSum,0) -odpd.reporting_work_num_count -odpd.broken_num ) < 0, |
| | | 0, |
| | | odpds.reporting_work_num_count + ifnull(c.patchNumSum,0) -odpd.reporting_work_num_count -odpd.broken_num) as quantity, |
| | | if((odpds.reporting_work_num_count + ifnull(c.patchNumSum,0) -odpd.reporting_work_num_count -odpd.broken_num) < 0, |
| | | 0, |
| | | odpds.reporting_work_num_count + ifnull(c.patchNumSum,0) -odpd.reporting_work_num_count -odpd.broken_num) as completedQuantity, |
| | | IF( |
| | | odpds.reporting_work_num_count + ifnull( c.patchNumSum, 0 ) - odpd.reporting_work_num_count - odpd.broken_num<=fc.quantity-fc.termination_quantity, |
| | | IF(odpds.reporting_work_num_count + ifnull( c.patchNumSum, 0 ) - odpd.reporting_work_num_count - odpd.broken_num=fc.termination_quantity,0, |
| | | odpds.reporting_work_num_count + ifnull( c.patchNumSum, 0 ) - odpd.reporting_work_num_count - odpd.broken_num), |
| | | IF(odpds.reporting_work_num_count + ifnull( c.patchNumSum, 0 ) - odpd.reporting_work_num_count - odpd.broken_num-fc.termination_quantity<0 |
| | | ,0, |
| | | odpds.reporting_work_num_count + ifnull( c.patchNumSum, 0 ) - odpd.reporting_work_num_count - odpd.broken_num-fc.termination_quantity) |
| | | ) |
| | | AS quantity, |
| | | IF( |
| | | odpds.reporting_work_num_count + ifnull( c.patchNumSum, 0 ) - odpd.reporting_work_num_count - odpd.broken_num<=fc.quantity-fc.termination_quantity, |
| | | IF(odpds.reporting_work_num_count + ifnull( c.patchNumSum, 0 ) - odpd.reporting_work_num_count - odpd.broken_num=fc.termination_quantity,0, |
| | | odpds.reporting_work_num_count + ifnull( c.patchNumSum, 0 ) - odpd.reporting_work_num_count - odpd.broken_num), |
| | | IF(odpds.reporting_work_num_count + ifnull( c.patchNumSum, 0 ) - odpd.reporting_work_num_count - odpd.broken_num-fc.termination_quantity<0 |
| | | ,0, |
| | | odpds.reporting_work_num_count + ifnull( c.patchNumSum, 0 ) - odpd.reporting_work_num_count - odpd.broken_num-fc.termination_quantity) |
| | | ) AS completedQuantity, |
| | | odpd.reporting_work_num as completed, |
| | | odpd.broken_num as onceBroken, |
| | | ogd.`group`, |