Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
# Conflicts:
# .gitignore
| | |
| | | |
| | | /north-glass-erp/src/test/test.iml |
| | | |
| | | /north-glass-erp/.idea/libraries |
| | | /north-glass-erp/src/main/resources/mapper/sd/OrderGlassDetailMapper.xml |
| | | /north-glass-erp/.idea/.gitignore |
| | | /north-glass-erp/.idea/compiler.xml |
| | | /north-glass-erp/.idea/dataSources.xml |
| | | /north-glass-erp/.idea/encodings.xml |
| | | /north-glass-erp/.idea/google-java-format.xml |
| | | /north-glass-erp/.idea/inspectionProfiles/Project_Default.xml |
| | | /north-glass-erp/.idea/jarRepositories.xml |
| | | /north-glass-erp/.idea/jsLibraryMappings.xml |
| | | /north-glass-erp/.idea/misc.xml |
| | | /north-glass-erp/.idea/north-glass-erp.iml |
| | | /north-glass-erp/.idea/sqldialects.xml |
| | | /north-glass-erp/.idea/uiDesigner.xml |
| | | /north-glass-erp/.idea/vcs.xml |
| | | /north-glass-erp/northglass-erp/public/*.apk |
| | | /north-glass-erp/.idea |
| | | /north-glass-erp/src/.idea |
| | | /north-glass-erp/src/main/main.iml |
| | |
| | | }else{ |
| | | request.post(`/processCard/getSelectPrinting/${merge}/${like}/${merges}`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | load(res.data.data) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | |
| | | <tr v-for="(itemDatile,index) in item.detailList" :key="index"> |
| | | <td>{{ itemDatile.order_number }}</td> |
| | | <td style="font-size: 20px">{{ itemDatile.child_width }}</td> |
| | | <td style="font-size: 20px" v-if="itemDatile.mapNumber===''">{{ itemDatile.child_width }}</td> |
| | | <td style="font-size: 20px" v-else>{{ itemDatile.mapNumber }}</td> |
| | | <td class="item" style="width: 60px;height: 100%"> |
| | | <input v-model="itemDatile.quantity" style="width: 100%;height: 100%;font-size: 17px" @keyup="handleSummary()"/> |
| | | </td> |
| | |
| | | { |
| | | tid: 'custom4', title: '自定义4', data: '', type: 'text', |
| | | options: { |
| | | field: '', |
| | | field: 'custom4', |
| | | testData: '', |
| | | width:270, |
| | | height: 16, |
| | |
| | | { |
| | | tid: 'custom5', title: '自定义5', data: '', type: 'text', |
| | | options: { |
| | | field: '', |
| | | field: 'custom4', |
| | | testData: '', |
| | | width:270, |
| | | height: 16, |
| | |
| | | import {useI18n} from "vue-i18n" |
| | | import request from "@/utils/request" |
| | | import footSum from "@/hook/footSum"; |
| | | import {addListener,destroyAreaBox} from "@/hook/mouseMove"; |
| | | import {addListener,destroyAreaBox} from "@/hook/mouseMoveHomePage"; |
| | | const { t } = useI18n() |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | |
| | | |
| | | //鼠标按下事件 |
| | | const tbodymousedown = (event: MouseEvent) => { |
| | | //event.stopPropagation()//阻止冒泡 |
| | | event.stopPropagation()//阻止冒泡 |
| | | getTablexGrid().closeMenu()//手动关闭右键菜单 |
| | | //左键0,中键1,右键2 |
| | | if (event.button === 0) {//左键按下 |
New file |
| | |
| | | //鼠标滑动选中 |
| | | import {nextTick, ref,reactive} from "vue"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | let isSelecting = ref(false) // 是否正在进行选择操作,默认为false |
| | | let selectionStart = reactive({ rowIndex: -1, cellIndex: -1 }) // 选择操作起始单元格位置 |
| | | let selectionEnd = reactive({ rowIndex: -1, cellIndex: -1 }) // 选择操作结束单元格位置 |
| | | let gridOptions =reactive({ |
| | | rowConfig:{height:30} |
| | | }) |
| | | //获取页面ref节点 |
| | | //获取vxetable表格节点 |
| | | let xGrid = ref() |
| | | let cellarea = ref(` |
| | | <div class="vxe-table--cell-area" style="font-size: 10px;text-align: left" > |
| | | <span class="vxe-table--cell-main-area" > |
| | | <p style="bottom: 0;color: blue;background-color: #5cadfe; margin-top: auto;"></p> |
| | | </span> |
| | | <span class="vxe-table--cell-active-area" ></span> |
| | | </div> |
| | | `) |
| | | let leftfixedcellarea = ref() |
| | | let rightfixedcellarea = ref() |
| | | const getTablexGrid = () => { |
| | | return xGrid.value |
| | | } |
| | | |
| | | //添加事件 |
| | | const addListener = (xGrids,gridOption) => { |
| | | xGrid.value = xGrids |
| | | gridOptions = gridOption |
| | | let newElement = document.createElement('div') |
| | | let leftElement = document.createElement('div') |
| | | const parser = new DOMParser(); |
| | | const htmlDoc = parser.parseFromString(cellarea.value, 'text/html') |
| | | newElement.innerHTML = htmlDoc.body.innerHTML |
| | | leftElement.innerHTML = htmlDoc.body.innerHTML |
| | | //cellarea.value = newElement |
| | | //添加多选列 |
| | | nextTick(() => { |
| | | window.addEventListener("keydown", ()=>{ |
| | | destroyAreaBox() |
| | | }) |
| | | window.addEventListener("mousedown", tableOutDestroyAreaBox)//给window添加鼠标按下事件,判断是否在表格外,是销毁 |
| | | window.addEventListener("mouseup", tbodymouseup)//给window添加鼠标松开事件 |
| | | let tbody = getTablexGrid().$el.querySelector(".vxe-table--main-wrapper table tbody")//获取tbody区域 |
| | | |
| | | if (tbody) { |
| | | tbody.addEventListener("mousedown", tbodymousedown)//给表格中的tbody添加鼠标按下事件 |
| | | tbody.addEventListener("mousemove", tbodymousemove)//给表格中的tbody添加鼠标移动事件 |
| | | tbody.addEventListener("mouseout", throttle(tbodymouseout, 50))//给表格中的tbody添加鼠标移出事件 |
| | | tbody.addEventListener("click", tableCellClick)//添加左键单击事件 |
| | | //tbody.oncontextmenu = tableCellMenuClick//添加右键菜单事件 |
| | | } |
| | | let bodyWrapper = getTablexGrid().$el.querySelector(".vxe-table--main-wrapper .vxe-table--body-wrapper")//获取正常区域的body |
| | | if (bodyWrapper) { |
| | | //注意这里的ref名称,这里是非fixed区域的框的名称 |
| | | bodyWrapper.appendChild(newElement)//添加范围框元素 |
| | | // let geticon = document.getElementById("getIcon") |
| | | // geticon.addEventListener("click", ()=>{ |
| | | // alert(2) |
| | | // }) |
| | | |
| | | } |
| | | setTimeout(() => { |
| | | //#region 左侧固定列 |
| | | let leftfixedtbody = getTablexGrid().$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-left-wrapper .vxe-table--body-wrapper table tbody")//获取fixedtbody区域 |
| | | |
| | | if (leftfixedtbody) { |
| | | leftfixedtbody.addEventListener("mousedown", tbodymousedown)//给表格中的leftfixedtbody添加鼠标按下事件 |
| | | leftfixedtbody.addEventListener("mousemove", tbodymousemove)//给表格中的leftfixedtbody添加鼠标移动事件 |
| | | leftfixedtbody.addEventListener("mouseout", throttle(tbodymouseout, 50))//给表格中的leftfixedtbody添加鼠标移出事件 |
| | | leftfixedtbody.addEventListener("click", tableCellClick)//添加单击事件 |
| | | //leftfixedtbody.oncontextmenu = tableCellMenuClick//添加右键菜单事件 |
| | | } |
| | | |
| | | let leftFixedBodyWrapper = getTablexGrid().$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-left-wrapper .vxe-table--body-wrapper") |
| | | if (leftFixedBodyWrapper) { |
| | | //注意这里的ref名称,这里是fixed区域的框的名称 |
| | | leftFixedBodyWrapper.appendChild(leftElement) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region 右侧固定列 |
| | | /* let rightfixedtbody = getTablexGrid().$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-right-wrapper .vxe-table--body-wrapper table tbody")//获取fixedtbody区域 |
| | | |
| | | if (rightfixedtbody) { |
| | | rightfixedtbody.addEventListener("mousedown", tbodymousedown)//给表格中的rightfixedtbody添加鼠标按下事件 |
| | | rightfixedtbody.addEventListener("mousemove", tbodymousemove)//给表格中的rightfixedtbody添加鼠标移动事件 |
| | | rightfixedtbody.addEventListener("mouseout", throttle(tbodymouseout, 50))//给表格中的rightfixedtbody添加鼠标移出事件 |
| | | rightfixedtbody.addEventListener("click", tableCellClick)//添加单击事件 |
| | | rightfixedtbody.oncontextmenu = tableCellMenuClick//添加右键菜单事件 |
| | | } |
| | | |
| | | let rightFixedBodyWrapper = getTablexGrid().$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-right-wrapper .vxe-table--body-wrapper") |
| | | if (rightFixedBodyWrapper) { |
| | | //注意这里的ref名称,这里是fixed区域的框的名称 |
| | | rightFixedBodyWrapper.appendChild(rightfixedcellarea.value) |
| | | }*/ |
| | | //#endregion |
| | | |
| | | }, 100) |
| | | |
| | | }) |
| | | } |
| | | |
| | | //鼠标按下事件 |
| | | const tbodymousedown = (event: MouseEvent) => { |
| | | //event.stopPropagation()//阻止冒泡 |
| | | getTablexGrid().closeMenu()//手动关闭右键菜单 |
| | | //左键0,中键1,右键2 |
| | | if (event.button === 0) {//左键按下 |
| | | // 记录选择操作起始位置 |
| | | selectionStart = getCellPosition(event.target)//设置选择操作起始单元格位置 |
| | | selectionEnd = selectionStart |
| | | const activeElement = getTablexGrid().$el.querySelector(".vxe-table--main-wrapper .vxe-table--body-wrapper .vxe-table--cell-main-area p") |
| | | const element = xGrid.value.$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-left-wrapper .vxe-table--body-wrapper .vxe-table--cell-main-area p") |
| | | activeElement.innerHTML ='' |
| | | if(element){ |
| | | element.innerHTML ='' |
| | | } |
| | | |
| | | |
| | | isSelecting.value = true//标记为正在选择操作 |
| | | } |
| | | } |
| | | |
| | | //鼠标移动事件 |
| | | //todo 这里要节流操作,只在结束时触发一次 |
| | | const tbodymousemove = (event: MouseEvent) => { |
| | | if (event.button === 0) {//左键移动 |
| | | if (!isSelecting.value) return//如果当前非正在选择操作,直接退出 |
| | | //记录选择操作结束位置 |
| | | selectionEnd = getCellPosition(event.target) |
| | | |
| | | //设置样式,并显示范围框 |
| | | setselectedCellArea() |
| | | |
| | | } |
| | | } |
| | | |
| | | //鼠标按键结束事件,添加在了window中 |
| | | const tbodymouseup = (event: MouseEvent) => { |
| | | if (event.button === 0) {//左键松开 |
| | | isSelecting.value = false//标记为停止选择操作 |
| | | } |
| | | const result = exportData() |
| | | if(!result){ |
| | | return |
| | | } |
| | | const activeElement = getTablexGrid().$el.querySelector(".vxe-table--main-wrapper .vxe-table--body-wrapper .vxe-table--cell-main-area p") |
| | | const element = xGrid.value.$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-left-wrapper .vxe-table--body-wrapper .vxe-table--cell-main-area p") |
| | | |
| | | |
| | | if(result.length<=2 && result[0].length===1){ |
| | | activeElement.innerHTML ='' |
| | | if(element){ |
| | | element.innerHTML ='' |
| | | } |
| | | |
| | | return |
| | | } |
| | | let sum = 0 |
| | | |
| | | result.forEach((item,index) => { |
| | | if(index>0){ |
| | | sum+=item.reduce((a, b) => a*1 + b*1, 0); |
| | | } |
| | | }) |
| | | |
| | | sum=isNaN(sum)?0:sum |
| | | setTimeout(()=>{ |
| | | activeElement.innerHTML ="SUM:"+parseFloat(sum.toFixed(2)) |
| | | if(element){ |
| | | element.innerHTML ="SUM:"+parseFloat(sum.toFixed(2)) |
| | | } |
| | | |
| | | },200) |
| | | |
| | | } |
| | | |
| | | let outevent = ref()//移动事件,不保存,循环定时器内无法监听到新的事件 |
| | | |
| | | //鼠标移出表格事件,只在移动的时候会触发,暂停移动不触发 |
| | | const tbodymouseout = (event: MouseEvent) => { |
| | | outevent.value = event//保存移动事件 |
| | | |
| | | if (isSelecting.value) {//如果正在执行选中操作 |
| | | const timer = setInterval(() => {//开启循环定时器 |
| | | if (isSelecting.value) {//判断当前是否正在选择 |
| | | //获取表格元素 |
| | | var table = getTablexGrid().$el.querySelector(".vxe-table--body-wrapper table")//获取非固定列(和固定列)的table元素 |
| | | if (outevent.value.clientX > table.parentElement.getBoundingClientRect().right - 30) {//判断鼠标x轴是否超出表格右侧,向右滚动 |
| | | var maxScrollPosition = table.parentElement.scrollWidth - table.parentElement.clientWidth//获取滚动条最大位置 |
| | | if (table.parentElement.scrollLeft < maxScrollPosition) {//如果没到滚动条最大位置,执行滚动 |
| | | table.parentElement.scrollLeft += 10//执行水平滚动条向右滚动 |
| | | } |
| | | } else if (outevent.value.clientX < table.parentElement.getBoundingClientRect().left + 30) {//判断鼠标x轴是否超出表格左侧,向左滚动 |
| | | if (table.parentElement.scrollLeft > 0) {//如果没到滚动条最大位置,执行滚动 |
| | | //鼠标移出表格,滚动水平滚动条 |
| | | table.parentElement.scrollLeft -= 10//执行水平滚动条向右滚动 |
| | | } |
| | | } |
| | | |
| | | |
| | | } else { |
| | | clearInterval(timer)//清除循环定时器 |
| | | } |
| | | }, 200)//这里设置滑动速度 |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | //节流函数,todo//改为全局 |
| | | const throttle = (fn: Function, delay: number) => { |
| | | const canRun = ref(true) |
| | | return (...args: any[]) => { |
| | | if (!canRun.value) return |
| | | canRun.value = false |
| | | setTimeout(() => { |
| | | fn(...args) |
| | | canRun.value = true |
| | | }, delay) |
| | | } |
| | | } |
| | | |
| | | // 获取单元格位置(rowIndex, cellIndex) |
| | | const getCellPosition = (cell: any) => { |
| | | |
| | | |
| | | while (cell.tagName !== 'TD') {//将cell指向TD元素 |
| | | cell = cell.parentElement |
| | | } |
| | | |
| | | let visibleColumn = getTablexGrid().getTableColumn().visibleColumn//获取处理条件之后的全量表头列 |
| | | const cellIndex = visibleColumn.findIndex((col: { id: any; }) => {//返回colid相等的visibleColumn全量表头列的索引 |
| | | return col.id == cell.getAttribute("colid") |
| | | }) |
| | | |
| | | let visibleData = getTablexGrid().getTableData().visibleData//获取处理条件之后的全量表体数据 |
| | | |
| | | const rowIndex = visibleData.findIndex((row: { _X_ROW_KEY: any; }) => {//返回rowid相等的visibleData全量表体数据 |
| | | return row._X_ROW_KEY == cell.parentElement.getAttribute("rowid")//返回rowid相等的visibleData全量表体数据的索引 |
| | | }) |
| | | return { rowIndex, cellIndex } |
| | | |
| | | } |
| | | |
| | | //设置框打开 |
| | | const setselectedCellArea = () => { |
| | | var activeElement = getTablexGrid().$el.querySelector(".vxe-table--main-wrapper .vxe-table--body-wrapper .vxe-table--cell-active-area")//正常区域选中边框激活的元素(仅是边框) |
| | | var mainElement = getTablexGrid().$el.querySelector(".vxe-table--main-wrapper .vxe-table--body-wrapper .vxe-table--cell-main-area")//正常区域选中边框内整个范围的元素 |
| | | |
| | | var leftFixedActiveElement = getTablexGrid().$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-left-wrapper .vxe-table--body-wrapper .vxe-table--cell-active-area")//左侧固定列选中边框激活的元素(仅是边框) |
| | | var leftFixedMainElement = getTablexGrid().$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-left-wrapper .vxe-table--body-wrapper .vxe-table--cell-main-area")//左侧固定列选中边框内整个范围的元素 |
| | | |
| | | var rightFixedActiveElement = getTablexGrid().$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-right-wrapper .vxe-table--body-wrapper .vxe-table--cell-active-area")//右侧固定列选中边框激活的元素(仅是边框) |
| | | var rightFixedMainElement = getTablexGrid().$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-right-wrapper .vxe-table--body-wrapper .vxe-table--cell-main-area")//右侧固定列选中边框内整个范围的元素 |
| | | |
| | | |
| | | var elements = [activeElement, mainElement, leftFixedActiveElement, leftFixedMainElement, rightFixedActiveElement, rightFixedMainElement] |
| | | let area = getAreaBoxPosition() |
| | | if (area) { |
| | | var { width, height, left, top, right } = area |
| | | } else { |
| | | return |
| | | } |
| | | elements.forEach((element, index) => { |
| | | if (element) {//设置显示范围框的内部元素的样式 |
| | | element.style.width = `${width}px` |
| | | element.style.height = `${height}px` |
| | | element.style.top = `${top}px` |
| | | element.style.display = "block" |
| | | if(index%2==1){ |
| | | element.style.display = "flex" |
| | | element.style.flexDirection = 'column' |
| | | } |
| | | |
| | | if (index <= elements.length - 1 - 2) {//如果不是rightFixedActiveElement或rightFixedMainElement |
| | | element.style.left = `${left}px` |
| | | } else { |
| | | element.style.right = `${right}px` |
| | | } |
| | | } |
| | | }) |
| | | |
| | | //显示范围框 |
| | | openAreaBox() |
| | | } |
| | | |
| | | //根据开始位置和结束位置的索引计算框的width,height,left,top(左侧固定列和正常区域和右侧固定列使用) |
| | | const getAreaBoxPosition = () => { |
| | | let startRowIndex = selectionStart.rowIndex//获取选中起始行索引 |
| | | let endRowIndex = selectionEnd.rowIndex//获取选中结束行索引 |
| | | let startColumnIndex = selectionStart.cellIndex//获取选中起始列索引 |
| | | let endColumnIndex = selectionEnd.cellIndex//获取选中结束列索引 |
| | | let visibleColumn = getTablexGrid().getTableColumn().visibleColumn//获取处理条件之后的全量表头列 |
| | | let visibleData = getTablexGrid().getTableData().visibleData//获取处理条件之后的全量表体数据 |
| | | if (startColumnIndex < 0 || endColumnIndex < 0 || startRowIndex < 0 || endRowIndex < 0) return |
| | | var maxColumnIndex = visibleColumn.length - 1//最大列索引 |
| | | var maxRowIndex = visibleData.length - 1//最大行索引 |
| | | if (endColumnIndex > maxColumnIndex) {//到最后一列,指向最后一列 |
| | | endColumnIndex = maxColumnIndex |
| | | } |
| | | if (endRowIndex > maxRowIndex) {//到最后一行,指向最后一行 |
| | | endRowIndex = maxRowIndex |
| | | } |
| | | let width = 0, height = 0, left = 0, top = 0, right = 0 |
| | | visibleColumn.forEach((col: { renderWidth: number; }, index: number) => { |
| | | if (startColumnIndex <= endColumnIndex) {//开始列索引小于结束列索引,即从左往右选择 |
| | | if (index < startColumnIndex) { |
| | | left += col.renderWidth//距离表格整体左侧边框距离 |
| | | } |
| | | if (index > endColumnIndex) {//数据索引大于结束列,这里获取距离后面数据的宽度 |
| | | right += col.renderWidth//距离表格整体右侧边框距离,加上当前列 |
| | | } |
| | | if (startColumnIndex <= index && index <= endColumnIndex) {//开始列索引大于数据索引 和 结束列索引小于数据索引,这里获取选中区域的宽度 |
| | | width += col.renderWidth//选中区域的宽度 |
| | | } |
| | | } else {//从右往左选择 |
| | | if (index < endColumnIndex) { |
| | | left += col.renderWidth//距离表格整体左侧边框距离 |
| | | } |
| | | if (index > startColumnIndex) {//数据索引大于开始列,这里获取距离后面数据的宽度 |
| | | right += col.renderWidth//距离表格整体右侧边框距离,加上当前列 |
| | | } |
| | | if (startColumnIndex >= index && index >= endColumnIndex) {//开始列索引大于数据索引 和 结束列索引小于数据索引,这里获取选中区域的宽度 |
| | | width += col.renderWidth//选中区域的宽度 |
| | | } |
| | | } |
| | | |
| | | }) |
| | | if (startRowIndex <= endRowIndex) {//开始行索引小于结束行索引,即从上往下选择 |
| | | height = (endRowIndex - startRowIndex + 1) * gridOptions.rowConfig!.height!//选中区域的高度 |
| | | top = startRowIndex * gridOptions.rowConfig!.height!//距离表格整体顶部边框距离 |
| | | } else { |
| | | height = (startRowIndex - endRowIndex + 1) * gridOptions.rowConfig!.height!//选中区域的高度 |
| | | top = endRowIndex * gridOptions.rowConfig!.height!//距离表格整体顶部边框距离 |
| | | } |
| | | |
| | | |
| | | |
| | | return { width, height, left, top, right } |
| | | |
| | | } |
| | | |
| | | //显示范围框 |
| | | const openAreaBox = () => { |
| | | let element = xGrid.value.$el.querySelector(".vxe-table--main-wrapper .vxe-table--body-wrapper .vxe-table--cell-area") |
| | | if (element) { |
| | | element.style.display = "block" |
| | | } |
| | | element = xGrid.value.$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-left-wrapper .vxe-table--body-wrapper .vxe-table--cell-area") |
| | | if (element) { |
| | | element.style.display = "block" |
| | | } |
| | | element = xGrid.value.$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-right-wrapper .vxe-table--body-wrapper .vxe-table--cell-area") |
| | | if (element) { |
| | | element.style.display = "block" |
| | | } |
| | | } |
| | | |
| | | |
| | | //表格外销毁范围框 |
| | | const tableOutDestroyAreaBox = (event: MouseEvent) => { |
| | | var element = getTablexGrid().$el.querySelector(".vxe-table--render-wrapper") |
| | | if (element) { |
| | | if (event.clientX < element.getBoundingClientRect().left || event.clientX > element.getBoundingClientRect().right |
| | | || event.clientY > element.getBoundingClientRect().top || event.clientY < element.getBoundingClientRect().bottom |
| | | ) { |
| | | destroyAreaBox() |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | //销毁范围框 |
| | | const destroyAreaBox = () => { |
| | | var element = getTablexGrid().$el.querySelector(".vxe-table--main-wrapper .vxe-table--body-wrapper .vxe-table--cell-area") |
| | | if (element) { |
| | | element.style.display = "none" |
| | | } |
| | | element = getTablexGrid().$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-left-wrapper .vxe-table--body-wrapper .vxe-table--cell-area") |
| | | if (element) { |
| | | element.style.display = "none" |
| | | } |
| | | element = getTablexGrid().$el.querySelector(".vxe-table--fixed-wrapper .vxe-table--fixed-right-wrapper .vxe-table--body-wrapper .vxe-table--cell-area") |
| | | if (element) { |
| | | element.style.display = "none" |
| | | } |
| | | } |
| | | |
| | | //表格单元格点击事件 |
| | | const tableCellClick = (e: MouseEvent) => { |
| | | |
| | | if (!isSelecting.value) {//非选中状态 |
| | | try { |
| | | selectionStart = getCellPosition(e.target)//获取单元格位置 |
| | | selectionEnd = selectionStart//结束位置也是自己 |
| | | //设置样式 |
| | | setselectedCellArea() |
| | | } catch (error) { |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | //表格右键点击事件 |
| | | const tableCellMenuClick = (e: MouseEvent) => { |
| | | if (!isSelecting.value) {//非选中状态 |
| | | let currentCellPosition = getCellPosition(e.target)//获取单元格位置 |
| | | var horizontalFlag//是否在范围框的水平判断标记 |
| | | var verticalFlag//是否在范围框的垂直判断标记 |
| | | if (selectionStart.cellIndex <= selectionEnd.cellIndex) {//如果是从左往右选取 |
| | | horizontalFlag = selectionStart.cellIndex <= currentCellPosition.cellIndex && currentCellPosition.cellIndex <= selectionEnd.cellIndex |
| | | } else {//从右往左选取 |
| | | horizontalFlag = selectionEnd.cellIndex <= currentCellPosition.cellIndex && currentCellPosition.cellIndex <= selectionStart.cellIndex |
| | | } |
| | | if (selectionStart.rowIndex <= selectionEnd.rowIndex) {//如果是从上往下选取 |
| | | verticalFlag = selectionStart.rowIndex <= currentCellPosition.rowIndex && currentCellPosition.rowIndex <= selectionEnd.rowIndex |
| | | } else {//从下往上选取 |
| | | verticalFlag = selectionEnd.rowIndex <= currentCellPosition.rowIndex && currentCellPosition.rowIndex <= selectionStart.rowIndex |
| | | } |
| | | |
| | | if (horizontalFlag && verticalFlag) { //判断如果不在选中区域内,触发表格左键单击事件,更新截取单元格,否则如果在正常触发右键菜单 |
| | | |
| | | } else { |
| | | selectionStart = getCellPosition(e.target)//获取单元格位置 |
| | | selectionEnd = selectionStart//结束位置也是自己 |
| | | //设置样式 |
| | | setselectedCellArea() |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | const toolbarButtonClickEvent = () => { |
| | | |
| | | // //我给大家打印处理: |
| | | // console.log("是否正在进行滑动选中操作:", isSelecting.value) |
| | | // //左上角坐标 |
| | | // console.log("单元格起始位置:索引:", selectionStart) |
| | | // //右下角坐标 |
| | | // console.log("单元格结束位置:索引:", selectionEnd) |
| | | if (selectionStart.cellIndex!==selectionEnd.cellIndex){ |
| | | ElMessage.warning("请选择相同一列") |
| | | return false |
| | | } |
| | | |
| | | |
| | | // //这里需要是visibleData |
| | | let tableData = getTablexGrid().getTableData().visibleData//获取处理条件之后的全量表体数据 |
| | | let rowStart = selectionStart.rowIndex//获取选中起始行索引 |
| | | let rowEnd = selectionEnd.rowIndex//获取选中结束行索引 |
| | | let selectRows = tableData.filter((col, index: number) => {//col参数不能改否则会获取不到数据 |
| | | //这里修改从右下往左上拖动的数据显示 |
| | | if (rowStart <= rowEnd) { |
| | | return rowStart <= index && rowEnd >= index |
| | | } else { |
| | | return rowStart >= index && rowEnd <= index |
| | | } |
| | | }) |
| | | // console.log("鼠标选中行:", JSON.stringify(selectRows)) |
| | | |
| | | //这里需要是visibleColumn |
| | | let colStart = selectionStart.cellIndex//获取选中起始列索引 |
| | | let colEnd = selectionEnd.cellIndex//获取选中结束列索引 |
| | | let tableColumn = getTablexGrid().getTableColumn().visibleColumn//获取处理条件之后的全量表头列 |
| | | let selectCols = tableColumn.filter((col, index: number) => {//col参数不能改否则会获取不到数据 |
| | | //这里修改从右下往左上拖动的数据显示 |
| | | if (colStart <= colEnd) { |
| | | return colStart <= index && colEnd >= index |
| | | } else { |
| | | return colStart >= index && colEnd <= index |
| | | } |
| | | }) |
| | | |
| | | |
| | | let result=null |
| | | if(selectRows.length===0){ |
| | | return false |
| | | } |
| | | result = { |
| | | start:selectionStart.rowIndex,//开始行 |
| | | end: selectionEnd.rowIndex,//结束行 |
| | | cell:selectCols[0].field,//选中列, |
| | | row:selectRows |
| | | } |
| | | |
| | | selectionStart.rowIndex=-1 |
| | | selectionStart.cellIndex=-1 |
| | | selectionEnd.rowIndex=-1 |
| | | selectionEnd.cellIndex=-1 |
| | | |
| | | return result |
| | | //console.log("鼠标选中列:", JSON.stringify(selectCols)) |
| | | |
| | | |
| | | } |
| | | const exportData = () => { |
| | | let data = [] |
| | | let title = [] |
| | | try{ |
| | | // //这里需要是visibleData |
| | | if(getTablexGrid().getTableData()?.visibleData===undefined){ |
| | | return null |
| | | } |
| | | let tableData = getTablexGrid().getTableData().visibleData//获取处理条件之后的全量表体数据 |
| | | let rowStart = selectionStart.rowIndex//获取选中起始行索引 |
| | | let rowEnd = selectionEnd.rowIndex//获取选中结束行索引 |
| | | let selectRows = tableData.filter((col, index: number) => {//col参数不能改否则会获取不到数据 |
| | | //这里修改从右下往左上拖动的数据显示 |
| | | if (rowStart <= rowEnd) { |
| | | return rowStart <= index && rowEnd >= index |
| | | } else { |
| | | return rowStart >= index && rowEnd <= index |
| | | } |
| | | }) |
| | | |
| | | //这里需要是visibleColumn |
| | | let colStart = selectionStart.cellIndex//获取选中起始列索引 |
| | | let colEnd = selectionEnd.cellIndex//获取选中结束列索引 |
| | | let tableColumn = getTablexGrid().getTableColumn().visibleColumn//获取处理条件之后的全量表头列 |
| | | let selectCols = tableColumn.filter((col, index: number) => {//col参数不能改否则会获取不到数据 |
| | | //这里修改从右下往左上拖动的数据显示 |
| | | if (colStart <= colEnd) { |
| | | return colStart <= index && colEnd >= index |
| | | } else { |
| | | return colStart >= index && colEnd <= index |
| | | } |
| | | }) |
| | | |
| | | selectCols.forEach((col, index) => { |
| | | title.push(col['title']) |
| | | }) |
| | | data.push(title) |
| | | |
| | | selectRows.forEach((row, index) => { |
| | | let rowData = [] |
| | | selectCols.forEach((col, index) => { |
| | | |
| | | const parts = col['property'].split('.') |
| | | let result = row |
| | | for (const part of parts) { |
| | | if (result && result[part] !== undefined) { |
| | | result = result[part]; |
| | | } else { |
| | | return null; |
| | | } |
| | | } |
| | | rowData.push(result) |
| | | }) |
| | | data.push(rowData) |
| | | }) |
| | | }catch (e) { |
| | | // selectionStart = { rowIndex: -1, cellIndex: -1 } // 选择操作起始单元格位置 |
| | | // selectionEnd = { rowIndex: -1, cellIndex: -1 } |
| | | } |
| | | |
| | | return data |
| | | |
| | | } |
| | | export { |
| | | addListener, |
| | | toolbarButtonClickEvent, |
| | | exportData, |
| | | destroyAreaBox |
| | | } |
| | |
| | | sheet3:'عرض معلومات الشحن', |
| | | sheet5:'إنتاج ومعالجة زجاج منحني واحد (ورقة واحدة)', |
| | | oneClickStorage:'إكمال بنقرة واحدة', |
| | | oneClickReturn:'一键退回', |
| | | |
| | | quantityMount:'数量金额', |
| | | |
| | |
| | | sheet3:'View shipping information', |
| | | sheet5:'Production and processing of single curved glass (single sheet)', |
| | | oneClickStorage:'One-click completion', |
| | | oneClickReturn:'一键退回', |
| | | |
| | | quantityMount:'Quantity and Amount', |
| | | |
| | |
| | | sheet3:'浏览发货信息', |
| | | sheet5:'生产加工单弯钢(单片)', |
| | | oneClickStorage:'一键完工', |
| | | oneClickReturn:'一键退回', |
| | | |
| | | quantityMount:'数量金额', |
| | | |
| | |
| | | sheet3:'浏览发货信息', |
| | | sheet5:'生产加工单弯钢(单片)', |
| | | oneClickStorage:'一键完工', |
| | | oneClickReturn:'一键退回', |
| | | |
| | | quantityMount:'数量金额', |
| | | |
| | |
| | | path: '/register', |
| | | name: 'register', |
| | | component: () => import('../views/RegisterView.vue') |
| | | }, |
| | | { |
| | | path: '/appDownLoad', |
| | | name: 'appDownLoad', |
| | | component: () => import('../views/system/app/appDownload.vue') |
| | | } |
| | | |
| | | ] |
| | |
| | | selectDeliveryDate:ref(["",""]), |
| | | selectOrderListDate:ref(["",""]), |
| | | reportFormDate:ref(["",""]), |
| | | workOrderDate:ref(["",""]) |
| | | workOrderDate:ref(["",""]), |
| | | searchOrderListFilter:ref([]),//订单首页筛选] |
| | | searchOrderFilter:{ |
| | | list:ref([]), |
| | | data:{} |
| | | |
| | | }, |
| | | //流程卡筛选缓存 |
| | | selectProcessCardFilter:{ |
| | | list:ref([]), |
| | | data:{ |
| | | order: { |
| | | project: '' |
| | | }, |
| | | orderDetail: { |
| | | productId: '', |
| | | productName: '', |
| | | computeGrossArea: '', |
| | | processingNote: '', |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | }), |
| | | actions: { |
| | |
| | | this.selectOrderListDate=["",""] |
| | | this.reportFormDate=["",""] |
| | | this.workOrderDate=["",""] |
| | | this.searchOrderFilter={ |
| | | list:[], |
| | | data:{} |
| | | } |
| | | this.selectProcessCardFilter={ |
| | | list:[], |
| | | data:{ |
| | | order: { |
| | | project: '' |
| | | }, |
| | | orderDetail: { |
| | | productId: '', |
| | | productName: '', |
| | | computeGrossArea: '', |
| | | processingNote: '', |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | persist: true |
| | |
| | | const userStore=useUserInfoStore() |
| | | const request = axios.create({ |
| | | baseURL: `http://${config.serverUrl}`, // 注意!! 这里是全局统一加上了 后端接口前缀 前缀,后端必须进行跨域配置! |
| | | timeout: 10000 |
| | | timeout: 30000 |
| | | }) |
| | | |
| | | // |
| | |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | selectDate.value = res.data.selectDate |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | produceList = deepClone(materialStore.value) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | selectDate.value = res.data.selectDate |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | produceList = deepClone(materialStore.value) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | |
| | | const orderId = route.query.orderId |
| | | const productionId = route.query.productionId |
| | | const orderQuantity = route.query.quantity |
| | | |
| | | const orderOtherMoney = ref(null) |
| | | |
| | |
| | | gridLeftOptions.toolbarConfig.buttons[0].disabled=false |
| | | return; |
| | | } |
| | | |
| | | // 计算 $table 里 quantity 字段的总和 |
| | | let totalQuantity = selectRecords.reduce((sum, record) => sum + (Number(record.quantity) || 0), 0); |
| | | // 对比全局变量 orderQuantity |
| | | if (totalQuantity !== orderQuantity*1) { |
| | | ElMessage.warning(`所选数据的数量总和 (${totalQuantity}) 与订单数量 (${orderQuantity}) 不匹配,请检查后重试!`); |
| | | gridLeftOptions.toolbarConfig.buttons[0].disabled = false; |
| | | return; |
| | | } |
| | | // if (leftData.length!=selectRecords.length){ |
| | | // ElMessage.warning('请勾选所有数据进行保存') |
| | | // gridLeftOptions.toolbarConfig.buttons[0].disabled=false |
| | |
| | | <div id="entirety" > |
| | | |
| | | <div class="row1" v-if="item.heat_layout_id!=null"> |
| | | <div class="cell" v-if="item.heat_layout_id!=null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div> |
| | | <span>{{ item.customer_name }}</span> |
| | | <span>{{ item.order_id }}</span> |
| | | <span v-if="item.process.includes('夹胶')||item.process.includes('夹层')">胶片</span> |
| | | <span v-else-if="item.process.includes('中空')">中空</span> |
| | | <span v-else-if="item.process.includes('百叶')">百叶</span> |
| | | <span v-else></span> |
| | | <div class="cell1" v-if="item.stock_id!=null">{{ item.stock_id }}</div> |
| | | </div> |
| | | <div class="row6" v-else> |
| | | <div class="cell" v-if="item.heat_layout_id!=null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div> |
| | | <span>{{ item.customer_name }}</span> |
| | | <span>{{ item.order_id }}</span> |
| | | <span v-if="item.process.includes('夹胶')||item.process.includes('夹层')">胶片</span> |
| | | <span v-else-if="item.process.includes('中空')">中空</span> |
| | | <span v-else-if="item.process.includes('百叶')">百叶</span> |
| | | <span v-else></span> |
| | | <div class="cell1" v-if="item.stock_id!=null">{{ item.stock_id }}</div> |
| | | </div> |
| | | |
| | | |
| | |
| | | <span>{{ item.building_number }}</span> |
| | | <span v-if="item.bend_radius!=null">R={{item.bend_radius}}</span> |
| | | </div> |
| | | <div class="row3" v-if="item.other_columns!=null&&(JSON.parse(item.other_columns).S02!=null)"> <span>{{JSON.parse(item.other_columns).S02}}={{item.quantity}}</span> </div> |
| | | <div class="row3" v-else><span>{{Math.round(item.width)}}x{{Math.round(item.height)}}={{item.quantity}}</span></div> |
| | | <div class="row3" v-if="item.other_columns!=null&&(JSON.parse(item.other_columns).S02!=null)"> |
| | | <span v-if="item.heat_layout_id!==undefined && company.showDeliveryCreator" style="font-size: 7pt;"> |
| | | ({{ item.stock_id }}) {{ item.heat_layout_id }}/{{ item.heat_layout_sort }} |
| | | </span> |
| | | <span v-if="item.stock_id!==undefined && !company.showDeliveryCreator" style="font-size: 7pt"> |
| | | {{ item.stock_id }}/{{ item.polys_id }} |
| | | </span> |
| | | {{JSON.parse(item.other_columns).S02}}={{item.quantity}} |
| | | |
| | | </div> |
| | | <div class="row3" v-else> |
| | | <span v-if="item.heat_layout_id!==undefined && company.showDeliveryCreator" style="font-size: 7pt;"> |
| | | ({{ item.stock_id }}) {{ item.heat_layout_id }}/{{ item.heat_layout_sort }} |
| | | </span> |
| | | <span v-if="item.stock_id!==undefined && !company.showDeliveryCreator" style="font-size: 7pt"> |
| | | {{ item.stock_id }}/{{ item.polys_id }} |
| | | </span> |
| | | {{Math.round(item.width)}}x{{Math.round(item.height)}}={{item.quantity}} |
| | | </div> |
| | | <div class="row5"> |
| | | <span>{{item.glass_child}}</span> |
| | | <span>{{item.processing_note}}</span> |
| | |
| | | .row3 { |
| | | margin-top: -5px; |
| | | height: 35px; |
| | | font-size: 22pt; |
| | | font-size: 20pt; |
| | | font-weight: bolder; |
| | | line-height: 35px; |
| | | } |
| | |
| | | list: null, |
| | | }) |
| | | const getTableRow = (row, type) => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | switch (type) { |
| | | case 'select' : { |
| | | router.push({path: '/main/processCard/SelectDetailProcessCard', query: {processId: row.processId}}) |
| | |
| | | let pageNum = ref(1) |
| | | let pageState = null |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 15) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime()) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | if (orderInfo.workOrderDate[0]=="" && orderInfo.workOrderDate[1]==""){ |
| | | orderInfo.workOrderDate=getNowTime() |
| | | } |
| | | let startTime = orderInfo.workOrderDate[0] |
| | | let endTime = orderInfo.workOrderDate[1] |
| | | let total = reactive({ |
| | | pageTotal: 0, |
| | | dataTotal: 0, |
| | | pageSize: 100 |
| | | }) |
| | | |
| | | const getFlowCardList = async () => { |
| | | //第一次加载数据 |
| | | request.post(`/processCard/flowCard/1/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | await request.post(`/processCard/flowCard/1/${total.pageSize}/${orderInfo.workOrderDate}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total * 1 |
| | | total.pageTotal = res.data.total.pageTotal |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total * 1 |
| | | total.pageTotal = res.data.total.pageTotal |
| | | orderInfo.workOrderDate = res.data.selectDate |
| | | pageTotal.value = res.data.total |
| | | produceList.value = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.loadData(produceList.value) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | onMounted(async () => { |
| | | filterData.value = orderInfo.selectProcessCardFilter.data |
| | | await getFlowCardList() |
| | | orderInfo.selectProcessCardFilter.list.forEach(item =>{ |
| | | xGrid.value.getColumnByField(item.field).filters = item.column.filters |
| | | }) |
| | | }) |
| | | |
| | | //页脚翻页查询 |
| | | const selectPageList = () => { |
| | | let startTime = orderInfo.workOrderDate[0] |
| | | let endTime = orderInfo.workOrderDate[1] |
| | | request.post(`/processCard/flowCard/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | request.post(`/processCard/flowCard/${pageNum.value}/${total.pageSize}/${orderInfo.workOrderDate}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | produceList.value = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList.value) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = orderInfo.workOrderDate[0] |
| | | let endTime = orderInfo.workOrderDate[1] |
| | | request.post(`/processCard/flowCard/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | request.post(`/processCard/flowCard/${pageNum.value}/${total.pageSize}/${orderInfo.workOrderDate}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total * 1 |
| | | total.pageTotal = res.data.total.pageTotal |
| | |
| | | filterData.value[column.property] = value |
| | | } |
| | | |
| | | //获取选中时间 |
| | | let startTime = orderInfo.workOrderDate[0] |
| | | let endTime = orderInfo.workOrderDate[1] |
| | | |
| | | request.post(`/processCard/flowCard/1/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | request.post(`/processCard/flowCard/1/${total.pageSize}/${orderInfo.workOrderDate}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal=parseInt(res.data.total) |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | produceList.value = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList.value) |
| | | gridOptions.loading=false |
| | | orderInfo.selectProcessCardFilter.list = xGrid.value.getCheckedFilters() |
| | | orderInfo.selectProcessCardFilter.data = filterData.value |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | |
| | | <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)"/> |
| | | <input |
| | | v-model="option.data" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({ |
| | | path: '/main/processCard/AddProcessCard', |
| | | query: {orderId: row.order_id, productionId: row.production_id} |
| | | query: {orderId: row.order_id, productionId: row.production_id, quantity:row.quantity} |
| | | }) |
| | | break |
| | | } |
| | |
| | | {field: 'edgingType', width: 110, title: t('order.edgingType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'completedQuantity', width: 90, title: t('reportingWorks.completedQuantity')}, |
| | | {field: 'area', width: 100, title: t('reportingWorks.completedArea')}, |
| | | {field: 'reviewed', title: t('processCard.reviewed')}, |
| | | {field: 'examineTime', title: t('ingredientsStock.reviewedTime')}, |
| | | {field: 'productName', title: t('order.product')}, |
| | | ],//表头按钮 |
| | | |
| | |
| | | let pageNum = $ref(1) |
| | | let pageState = null |
| | | |
| | | //获取3天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 15) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime()) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | const getFirst = () => { |
| | | //第一次加载获取近3天时间和默认状态 |
| | | //form.date1 = getNowTime() |
| | | if (orderInfo.workOrderDate[0]=="" && orderInfo.workOrderDate[1]==""){ |
| | | orderInfo.workOrderDate=getNowTime() |
| | | } |
| | | let startTime = orderInfo.workOrderDate[0] |
| | | let endTime = orderInfo.workOrderDate[1] |
| | | |
| | | let state = optionVal.value |
| | | |
| | | //第一次加载数据 |
| | | request.post(`/workOrder/orderGlassDetail/${startTime}/${endTime}/${state}`, filterData.value).then((res) => { |
| | | request.post(`/workOrder/orderGlassDetail/${orderInfo.workOrderDate}/${state}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | orderInfo.workOrderDate = res.data.selectDate |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = orderInfo.workOrderDate[0] |
| | | let endTime = orderInfo.workOrderDate[1] |
| | | let selectState = optionVal.value |
| | | request.post(`/workOrder/orderGlassDetail/${startTime}/${endTime}/${selectState}`, filterData.value).then((res) => { |
| | | request.post(`/workOrder/orderGlassDetail/${orderInfo.workOrderDate}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | //isButtonDisabled=false |
| | | pageTotal.value = res.data.total |
| | |
| | | } |
| | | |
| | | //获取选中时间和是否转单状态 |
| | | let startTime = orderInfo.workOrderDate[0] |
| | | let endTime = orderInfo.workOrderDate[1] |
| | | |
| | | let selectState = optionVal.value |
| | | |
| | | request.post(`/workOrder/orderGlassDetail/${startTime}/${endTime}/${selectState}`, filterData.value).then((res) => { |
| | | request.post(`/workOrder/orderGlassDetail/${orderInfo.workOrderDate}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | |
| | |
| | | class="product1" |
| | | v-model="productVisible" |
| | | @closed="closeProductDialog" |
| | | :destroy-on-close="true" |
| | | style="width: 80%;height:75%; "> |
| | | <template #header > |
| | | <div class="my-header"> |
| | |
| | | }, |
| | | { |
| | | prefixIcon: 'vxe-icon-repeat', |
| | | name: '一键退回', |
| | | name: t('order.oneClickReturn'), |
| | | children: [ |
| | | // { code: 'sheet1', name: '横版-普通' }, |
| | | { code: 'back1', name: t('searchOrder.createOrder'),disabled:true }, |
| | |
| | | } |
| | | |
| | | |
| | | const getOrderList = () => { |
| | | const getOrderList = async () => { |
| | | //加载请求 |
| | | const config = { |
| | | filter: filterData.value, |
| | | sort: sortData.value |
| | | } |
| | | request.post(`/order/getOrderList/1/${total.value.pageSize}/${orderType.value}/${orderInfo.selectDate}`,config).then((res) => { |
| | | await request.post(`/order/getOrderList/1/${total.value.pageSize}/${orderType.value}/${orderInfo.selectDate}`,config).then((res) => { |
| | | if(res.code==200){ |
| | | total.value = res.data.total |
| | | /*total.dataTotal = res.data.total.dataTotal*1 |
| | |
| | | } |
| | | }) |
| | | } |
| | | onMounted(() => { |
| | | getOrderList() |
| | | onMounted(async () => { |
| | | filterData.value = orderInfo.searchOrderFilter.data |
| | | await getOrderList() |
| | | orderInfo.searchOrderFilter.list.forEach(item =>{ |
| | | xGrid.value.getColumnByField(item.field).filters = item.column.filters |
| | | }) |
| | | }) |
| | | |
| | | const changeFilterEvent = (event, option, $panel) => { |
| | |
| | | } |
| | | |
| | | function filterChanged(column){ |
| | | //console.log(column) |
| | | gridOptions.loading=true |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0]!=undefined?column.datas[0]:'' |
| | |
| | | orderList.value = deepClone(res.data.data) |
| | | xGrid.value.loadData(orderList.value) |
| | | gridOptions.loading=false |
| | | orderInfo.searchOrderFilter.list = xGrid.value.getCheckedFilters() |
| | | orderInfo.searchOrderFilter.data = filterData.value |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
New file |
| | |
| | | <script setup> |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="width: 100vw;height: 100vh;padding-top: 40vh;text-align: center;"> |
| | | <el-link href="/NorthGlass.apk" type="primary">北玻手机扫码APP下载</el-link> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | |
| | | //流程卡管理查询 |
| | | @ApiOperation("流程卡管理查询接口") |
| | | @SaCheckPermission("selectProcessCard.search") |
| | | @PostMapping("/flowCard/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}") |
| | | @PostMapping("/flowCard/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result dateProcess( |
| | | @PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable List<String> selectDate, |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.selectProcessCard(pageNum, pageSize, selectTime1, selectTime2, flowCard)); |
| | | return Result.seccess(flowCardService.selectProcessCard(pageNum, pageSize,selectDate, flowCard)); |
| | | |
| | | } |
| | | |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | |
| | | //查询工单 |
| | | @ApiOperation("查询工单接口") |
| | | @SaCheckPermission("selectWorkOrder.search") |
| | | @PostMapping ("/orderGlassDetail/{selectTime1}/{selectTime2}/{state}") |
| | | @PostMapping ("/orderGlassDetail/{selectDate}/{state}") |
| | | public Result dateWork( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable List<String> selectDate, |
| | | @PathVariable Integer state, |
| | | @RequestBody OrderGlassDetail orderGlassDetail){ |
| | | return Result.seccess(workOrderService.defaultDateWork(selectTime1,selectTime2,state,orderGlassDetail)); |
| | | return Result.seccess(workOrderService.defaultDateWork(selectDate,state,orderGlassDetail)); |
| | | } |
| | | |
| | | //转生产订单查询 |
| | |
| | | return Result.seccess(orderService.processBack(orderId,status)); |
| | | } |
| | | |
| | | @ApiOperation("手机扫码玻璃信息") |
| | | @PostMapping("/scannerGlassInfo/{projectNo}") |
| | | public Result scannerGlassInfo(@PathVariable String projectNo) { |
| | | return Result.seccess(orderService.scannerGlassInfo(projectNo)); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.controller.userInfo; |
| | | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.service.userInfo.AppVersionService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @RestController |
| | | @RequestMapping("/appVersion") |
| | | public class AppVersionController { |
| | | private final AppVersionService appVersionService; |
| | | |
| | | public AppVersionController(AppVersionService appVersionService) { |
| | | this.appVersionService = appVersionService; |
| | | } |
| | | |
| | | |
| | | @PostMapping("searchVersion") |
| | | public Result searchVersion(){ |
| | | return Result.seccess(appVersionService.searchVersion()); |
| | | } |
| | | } |
| | |
| | | private String productName; |
| | | @ExcelProperty("编号") |
| | | private String code; |
| | | @ExcelProperty("审核人") |
| | | private String reviewed; |
| | | @ExcelProperty("审核时间") |
| | | private String examineTime; |
| | | } |
New file |
| | |
| | | package com.example.erp.entity.userInfo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class AppVersion { |
| | | private Long id; |
| | | private String version; |
| | | } |
| | |
| | | @Mapper |
| | | public interface FlowCardMapper extends BaseMapper<FlowCard> { |
| | | //流程卡管理查询 |
| | | List<FlowCard> selectFlowCard(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, FlowCard flowCard); |
| | | List<FlowCard> selectFlowCard(Integer offset, Integer pageSize, String selectTime1, String selectTime2, FlowCard flowCard); |
| | | |
| | | //分页查询 |
| | | Map<String, Integer> getPageTotal(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, FlowCard flowCard); |
| | | Map<String, Integer> getPageTotal(Integer offset, Integer pageSize, String selectTime1, String selectTime2, FlowCard flowCard); |
| | | |
| | | //分架数据查询 |
| | | List<FlowCard> selectFlowCardMp(Date selectTime1, Date selectTime2, FlowCard flowCard); |
| | |
| | | List<Map<String, Object>> getPrintOrderDataDetails(String orderId, Integer orderNumber, Integer printQuantity); |
| | | |
| | | Boolean updatePrintNumberMp(String processId, Integer orderNumber); |
| | | |
| | | String getOrderIdByProcessId(String processId); |
| | | } |
| | |
| | | import com.example.erp.dto.pp.PatchLogDTO; |
| | | import com.example.erp.entity.pp.PatchLog; |
| | | import com.example.erp.entity.pp.ReportingWork; |
| | | import com.example.erp.entity.userInfo.Log; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | Boolean updateReplenishCancel(@Param("patchLog") PatchLog patchLog); |
| | | |
| | | Integer selectProjectCount(String processId); |
| | | Integer selectProjectCount(String processId, String patchId, Integer technologyNumber); |
| | | } |
| | | |
| | |
| | | @Mapper |
| | | public interface WorkOrderMapper { |
| | | //工单管理查询未转工单数据 |
| | | List<OrderGlassDetail> selectWordOrder(Date selectTime1, Date selectTime2, OrderGlassDetail orderGlassDetail); |
| | | List<OrderGlassDetail> selectWordOrder(String selectTime1, String selectTime2, OrderGlassDetail orderGlassDetail); |
| | | |
| | | //查询已转工单数据 |
| | | List<OrderGlassDetail> selectWordOrderNo(Date selectTime1, Date selectTime2, OrderGlassDetail orderGlassDetail); |
| | | List<OrderGlassDetail> selectWordOrderNo(String selectTime1, String selectTime2, OrderGlassDetail orderGlassDetail); |
| | | |
| | | //查询需要转工单明细 |
| | | List<OrderDetail> addWordOrder(String orderId, OrderDetail orderDetail); |
| | |
| | | |
| | | //查询订单入库状态 |
| | | Integer searchOrderWarehousing( String orderId); |
| | | |
| | | Map<String,String> scannerGlassInfo(String projectNo, Integer layoutId, Integer sort, String orderId); |
| | | |
| | | String getProcessIdByOptimizeHeatDetail(String projectId, Integer layoutId, Integer sort); |
| | | } |
New file |
| | |
| | | package com.example.erp.mapper.userInfo; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.userInfo.AppVersion; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface AppVersionMapper extends BaseMapper<AppVersion> { |
| | | } |
| | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | } |
| | | |
| | | //流程卡管理查询 |
| | | public Map<String, Object> selectProcessCard(Integer pageNum, Integer pageSize, Date selectTime1, Date selectTime2, FlowCard flowCard) { |
| | | public Map<String, Object> selectProcessCard(Integer pageNum, Integer pageSize,List<String> selectDate, FlowCard flowCard) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | 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<>(); |
| | | map.put("data", flowCardMapper.selectFlowCard(offset, pageSize, selectTime1, selectTime2, flowCard)); |
| | | map.put("total", flowCardMapper.getPageTotal(offset, pageSize, selectTime1, selectTime2, flowCard)); |
| | | map.put("data", flowCardMapper.selectFlowCard(offset, pageSize, startDate, endDate, flowCard)); |
| | | map.put("total", flowCardMapper.getPageTotal(offset, pageSize, startDate, endDate, flowCard)); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate",list); |
| | | return map; |
| | | } |
| | | |
| | |
| | | if (!patchLoglist.isEmpty()){ |
| | | for (PatchLog patchLog : patchLoglist) { |
| | | //查询是否已生成工程号 |
| | | Integer projectCount = patchMapper.selectProjectCount(patchLog.getProcessId()); |
| | | Integer projectCount = patchMapper.selectProjectCount(patchLog.getProcessId(),patchLog.getPatchId(),patchLog.getTechnologyNumber()); |
| | | //查询流程卡工艺流程 |
| | | String technologicalProcess = reportingWorkMapper.SelectTechnologicalProcess(patchLog.getProcessId(), String.valueOf(patchLog.getTechnologyNumber())); |
| | | if (projectCount == 0){ |
| | |
| | | } |
| | | |
| | | public List exportDamageReportSv(List<LocalDate> dates) { |
| | | if (dates != null && dates.size() > 1) { |
| | | dates.set(1, dates.get(1).plusDays(1)); // 将第二个日期加一天 |
| | | } |
| | | System.out.println(dates); |
| | | return reportMapper.exportDamageReportMp(dates); |
| | | } |
| | | |
| | |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | |
| | |
| | | if (!damageDetail.getResponsibleProcess().equals(reportingWork.getThisProcess()) && qualityInsStatus==2) { |
| | | damageDetail.setQualityInsStatus(1); |
| | | } |
| | | if (isPatch == 1){ |
| | | damageDetail.setQualityInsStatus(2); |
| | | } |
| | | damageDetailsMapper.insert(damageDetail); |
| | | }); |
| | | } |
| | |
| | | String result = processId.substring(index); |
| | | String technologyStr = reportingWork.get("technologyStr"); |
| | | String[] processIdStr = processId.split("/"); |
| | | String nowDate = LocalDate.now().toString(); |
| | | //获取报工工序是否为复合工程 |
| | | String laminating = reportingWorkMapper.getProcessLaminating(thisProcess); |
| | | //合片工序 |
| | | if (thisProcess.equals("夹胶") || thisProcess.equals("中空") || thisProcess.equals("包装")){ |
| | | if (laminating.equals("laminating")){ |
| | | LambdaUpdateWrapper |
| | | <ReportingWork> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper |
| | |
| | | .eq(ReportingWork::getThisProcess, reportingWork.get("process")) |
| | | .eq(ReportingWork::getReviewedState, 0) |
| | | .setSql("reviewed_state =1") |
| | | .set(ReportingWork::getReviewed, userName); |
| | | .set(ReportingWork::getReviewed, userName) |
| | | .set(ReportingWork::getExamineTime, nowDate); |
| | | reportingWorkMapper.update(null, updateWrapper); |
| | | }else { |
| | | reportingWorkMapper.ReviewReportingWorkMp(processIdStr[0],reportingWork.get("process"),technologyStr,userName); |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.Date; |
| | | import java.time.LocalDate; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | WorkOrderMapper workOrderMapper; |
| | | |
| | | //查询工单 |
| | | public Map<String, Object> defaultDateWork(Date selectTime1, Date selectTime2, Integer state, OrderGlassDetail orderGlassDetail) { |
| | | public Map<String, Object> defaultDateWork(List<String> selectDate, Integer state, OrderGlassDetail orderGlassDetail) { |
| | | 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<>(); |
| | | if (state == 1) {//已转工单 |
| | | map.put("data", workOrderMapper.selectWordOrder(selectTime1, selectTime2, orderGlassDetail)); |
| | | map.put("data", workOrderMapper.selectWordOrder(startDate, endDate, orderGlassDetail)); |
| | | } else {//未转工单 |
| | | map.put("data", workOrderMapper.selectWordOrderNo(selectTime1, selectTime2, orderGlassDetail)); |
| | | map.put("data", workOrderMapper.selectWordOrderNo(startDate, endDate, orderGlassDetail)); |
| | | } |
| | | |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate",list); |
| | | return map; |
| | | } |
| | | |
| | |
| | | deliveryDetailMoney=getQuantity.multiply(getPrice).setScale(2, RoundingMode.HALF_UP).doubleValue(); |
| | | deliveryDetailArea=getComputeArea.multiply(getQuantity).doubleValue(); |
| | | |
| | | }else if (calculateType==4){ |
| | | //判断实际单片面积跟结算单片面积是否相等 结算总面积跟实际总面积是否相等 |
| | | if(Objects.equals(orderDetail.getArea(), orderDetail.getComputeArea())&&Objects.equals(orderDetail.getGrossArea(), orderDetail.getComputeGrossArea())){ |
| | | deliveryDetailMoney=getWidth.multiply(getHeight).multiply(getQuantity).multiply(getPrice). |
| | | divide(BigDecimal.valueOf(1000000), 2, RoundingMode.HALF_UP).doubleValue(); |
| | | deliveryDetailArea=getWidth.multiply(getHeight).multiply(getQuantity).divide(BigDecimal.valueOf(1000000), 2, RoundingMode.HALF_UP).doubleValue(); |
| | | }else{ |
| | | deliveryDetailMoney=getComputeArea.multiply(getQuantity).multiply(getPrice).setScale(2, RoundingMode.HALF_UP).doubleValue(); |
| | | deliveryDetailArea=getComputeArea.multiply(getQuantity).doubleValue(); |
| | | } |
| | | } |
| | | /*if (calculateType==1){ |
| | | deliveryDetailMoney=Double.parseDouble(String.format("%.2f",Double.parseDouble( |
| | |
| | | log.setFunction("saveOrderTitle保存表头:"+order.getOrderId()); |
| | | |
| | | Order order1 = orderMapper.selectOrderId(order.getOrderId()); |
| | | //使用订单原本的状态和计算方式 |
| | | order.setCalculateType(order1.getCalculateType()); |
| | | order.setCreateOrder(order1.getCreateOrder()); |
| | | order.setProcessReview(order1.getProcessReview()); |
| | | order.setOrderReview(order1.getOrderReview()); |
| | | order.setProductionOrder(order1.getProductionOrder()); |
| | | order.setProcessingCard(order1.getProcessingCard()); |
| | | order.setWarehousing(order1.getWarehousing()); |
| | | order.setDelivery(order1.getDelivery()); |
| | | |
| | | LambdaUpdateWrapper<Order> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper.eq(Order::getOrderId, order.getOrderId()); |
| | |
| | | log.setFunction("updateOrderMoney金额重置:"+orderId); |
| | | return true; |
| | | } |
| | | |
| | | public Object scannerGlassInfo(String projectNo) { |
| | | String projectId = "p" + projectNo.substring(0,8); |
| | | Integer heatNo = Integer.valueOf(projectNo.substring(8,11)); |
| | | Integer sortNo = Integer.valueOf(projectNo.substring(11,14)); |
| | | String processId = orderMapper.getProcessIdByOptimizeHeatDetail(projectId,heatNo,sortNo); |
| | | String orderId = flowCardMapper.getOrderIdByProcessId(processId); |
| | | return orderMapper.scannerGlassInfo(projectId,heatNo,sortNo,orderId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.example.erp.service.userInfo; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.userInfo.AppVersion; |
| | | import com.example.erp.mapper.userInfo.AppVersionMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @DS("user_info") |
| | | public class AppVersionService { |
| | | private final AppVersionMapper appVersionMapper; |
| | | |
| | | public AppVersionService(AppVersionMapper appVersionMapper) { |
| | | this.appVersionMapper = appVersionMapper; |
| | | } |
| | | |
| | | public AppVersion searchVersion() { |
| | | return appVersionMapper.selectById(1); |
| | | } |
| | | } |
| | |
| | | |
| | | <!-- 分架明细查询--> |
| | | <select id="detailsSelectMp"> |
| | | select od.order_id, |
| | | ogd.production_id, |
| | | od.product_id, |
| | | od.product_name, |
| | | ROUND(SUM(od.quantity)-IFNULL(sum(fc.quantity)/count(fc.technology_number),0)) as quantity, |
| | | SUM(od.compute_gross_area) as compute_gross_area, |
| | | round(sum(od.perimeter), 2) as perimeter |
| | | from sd.order_detail as od |
| | | left join |
| | | (select order_id, order_number,technology_number, production_id, splitting_status |
| | | from sd.order_glass_detail |
| | | GROUP BY order_id, order_number) as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | left join flow_card as fc on fc.order_id = od.order_id and fc.order_number = od.order_number |
| | | and fc.technology_number=ogd.technology_number |
| | | where od.order_id = #{orderId} |
| | | and ogd.splitting_status = 0 |
| | | SELECT |
| | | od.order_id, |
| | | ogd.production_id, |
| | | od.product_id, |
| | | od.product_name, |
| | | ROUND(SUM(od.quantity) - IFNULL(SUM(fc.quantity) / fc.layers_number, 0)) AS quantity, |
| | | SUM(od.compute_gross_area) AS compute_gross_area, |
| | | ROUND(SUM(od.perimeter), 2) AS perimeter |
| | | FROM sd.order_detail AS od |
| | | LEFT JOIN ( |
| | | SELECT order_id, order_number, production_id, splitting_status, |
| | | technology_number |
| | | FROM sd.order_glass_detail |
| | | GROUP BY order_id, order_number, production_id, splitting_status |
| | | ) AS ogd |
| | | ON od.order_id = ogd.order_id |
| | | AND od.order_number = ogd.order_number |
| | | LEFT JOIN ( |
| | | SELECT order_id, order_number, technology_number, SUM(quantity) AS quantity, layers_number |
| | | FROM flow_card |
| | | GROUP BY order_id, order_number, technology_number |
| | | ) AS fc |
| | | ON fc.order_id = od.order_id |
| | | AND fc.order_number = od.order_number |
| | | AND fc.technology_number = ogd.technology_number |
| | | WHERE od.order_id = #{orderId} |
| | | AND ogd.splitting_status = 0 |
| | | GROUP BY od.order_id, ogd.production_id, od.product_id, od.product_name |
| | | ORDER BY od.order_id DESC; |
| | | |
| | | group by od.order_id, ogd.production_id |
| | | order by od.id desc |
| | | </select> |
| | | |
| | | <!-- 更新分架状态--> |
| | |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | p.total_thickness, |
| | | ROUND(od.quantity-IFNULL(sum(fc.quantity)/count(fc.technology_number),0)) as baiscQuantity, |
| | | ROUND(od.quantity-IFNULL(sum(fc.quantity)/fc.layers_number,0)) as baiscQuantity, |
| | | od.compute_gross_area as 'computeGrossArea', |
| | | p.total_thickness AS 'totalThickness', |
| | | ifnull(p.thickness,'') as thickness, |
| | |
| | | from sd.order_detail as od |
| | | left join sd.order_glass_detail as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | left join sd.product as p on od.product_name = p.product_name |
| | | left join sd.product as p on od.product_id = p.id |
| | | left join (SELECT order_id, |
| | | order_number, |
| | | JSON_UNQUOTE(JSON_EXTRACT(other_columns, '$.S01')) AS S01, |
| | |
| | | where process_id = #{processId} |
| | | and order_number = #{orderNumber} |
| | | </select> |
| | | |
| | | <select id="getOrderIdByProcessId"> |
| | | select order_id from pp.flow_card where process_id = #{processId} limit 1; |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | <select id="selectProjectCount"> |
| | | SELECT COUNT(*) |
| | | FROM flow_card |
| | | WHERE process_id= #{processId} and project_no IS not NULL; |
| | | FROM patch_log |
| | | WHERE process_id= #{processId} and patch_id=#{patchId} and technology_number = #{technologyNumber} |
| | | and project_no IS not NULL; |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="area" property="area"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="code" property="code"/> |
| | | <result column="reviewed" property="reviewed"/> |
| | | <result column="examine_time" property="examineTime"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="scheduleProductionScheduleMap" type="com.example.erp.dto.pp.ScheduleProductionScheduleDTO"> |
| | |
| | | left join sd.delivery_detail as dd on dd.order_id = a.order_id and dd.order_number = a.order_number |
| | | where d.create_time >= #{selectTime1} |
| | | AND d.create_time < #{selectTime2} |
| | | and o.create_order>0 |
| | | and d.create_order>0 |
| | | and reportWorkQuantity is not null |
| | | GROUP BY a.order_id |
| | | ORDER BY a.order_id |
| | |
| | | LEFT JOIN damage_details AS dd ON dd.reporting_work_id = rw.reporting_work_id |
| | | AND dd.order_number = ogd.order_number |
| | | AND dd.technology_number = ogd.technology_number |
| | | WHERE date(rw.reporting_work_time) >= #{dates[0]} |
| | | and date(rw.reporting_work_time) <= #{dates[1]} |
| | | WHERE rw.reporting_work_time >= #{dates[0]} |
| | | and rw.reporting_work_time <= #{dates[1]} |
| | | AND dd.available = 0 |
| | | GROUP BY dd.id |
| | | </select> |
| | |
| | | rwd.completed_quantity as completed_quantity, |
| | | ROUND(MAX( ogd.child_width )*MAX( ogd.child_height )*rwd.completed_quantity/1000000,2) as area, |
| | | od.product_name, |
| | | JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS code |
| | | JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS code, |
| | | rw.reviewed, |
| | | rw.examine_time |
| | | FROM |
| | | reporting_work as rw left join reporting_work_detail as rwd on rwd.reporting_work_id=rw.reporting_work_id |
| | | left join flow_card as fc on fc.order_id=rw.order_id and fc.process_id=rw.process_id and fc.order_number=rwd.order_number and fc.technology_number=rwd.technology_number |
| | |
| | | WHERE |
| | | rw.reporting_work_time >= #{selectTime1} |
| | | AND rw.reporting_work_time < #{selectTime2} |
| | | AND dd.available = 0; |
| | | AND dd.available = 0 |
| | | <if test="damageReportDTO.orderId != null and damageReportDTO.orderId != ''"> |
| | | and o.order_id regexp #{damageReportDTO.orderId} |
| | | </if> |
| | |
| | | ifnull(if((d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num)< 0, |
| | | 0, |
| | | (d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num) |
| | | ),0) |
| | | ),0) as num |
| | | from pp.flow_card as a |
| | | left join sd.order_process_detail as b |
| | | on |
| | |
| | | <update id="ReviewReportingWorkMp"> |
| | | update reporting_work as rw |
| | | left join reporting_work_detail as rwd on rw.reporting_work_id = rwd.reporting_work_id |
| | | set rw.reviewed_state = 1 ,rw.reviewed=#{userName} |
| | | set rw.reviewed_state = 1 ,rw.reviewed=#{userName},rw.examine_time=NOW() |
| | | where rw.process_id = #{substring} and rw.this_process=#{process} |
| | | and POSITION(rwd.technology_number in #{result}) and reviewed_state=0 |
| | | </update> |
| | |
| | | </update> |
| | | |
| | | <select id="getDifferentSizeNumber"> |
| | | select if(count(id)>1,1,0) from (select |
| | | a.id |
| | | select if(count(id)>0,1,0) from (select |
| | | a.id,a.child_width,b.width |
| | | from order_glass_detail as a |
| | | left join order_detail as b |
| | | on a.order_id = b.order_id and a.order_number = b.order_number |
| | | and a.child_width != b.width |
| | | where a.order_id = #{orderId} |
| | | and a.order_number = #{orderNumber} |
| | | and(a.child_width != b.width or a.child_height != b.height) |
| | | ) as c |
| | | </select> |
| | | |
| | |
| | | ) as acc |
| | | order by |
| | | <if test="orderBy == null "> |
| | | id desc |
| | | order_id desc |
| | | </if> |
| | | <if test="orderBy == 'desc'"> |
| | | ${field} desc |
| | |
| | | select warehousing from `order` |
| | | where order_id = #{orderId} |
| | | </select> |
| | | |
| | | <select id="getProcessIdByOptimizeHeatDetail"> |
| | | select process_id from pp.optimize_heat_detail as a |
| | | where a.project_no = #{projectId} |
| | | and a.layout_id = #{layoutId} |
| | | and a.sort = #{sort} |
| | | </select> |
| | | |
| | | <select id="scannerGlassInfo"> |
| | | select c.order_id as orderId, |
| | | b.order_number as orderNumber, |
| | | b.technology_number as technologyNumber, |
| | | a.process_id as processId, |
| | | c.customer_name as customerName, |
| | | concat(a.width," * " , a.height) as size, |
| | | b.area, |
| | | b.glass_child as glassChild, |
| | | d.product_name as productName |
| | | from pp.optimize_heat_detail as a |
| | | left join sd.order_glass_detail as b |
| | | on b.order_number = a.order_sort |
| | | and b.technology_number = a. layer |
| | | and b.order_id = #{orderId} |
| | | left join sd.order as c |
| | | on c.order_id = b.order_id |
| | | left join sd.order_detail as d |
| | | on c.order_id = d.order_id |
| | | and d.order_number = a.order_sort |
| | | where a.project_no = #{projectNo} |
| | | and a.layout_id = #{layoutId} |
| | | and a.sort = #{sort} |
| | | </select> |
| | | </mapper> |
| | |
| | | String.valueOf("1.0").replaceAll("\\.0*$|(\\.\\d*?)0+$", "$1"); |
| | | } |
| | | |
| | | @Test |
| | | void test() { |
| | | |
| | | } |
| | | |
| | | } |