| | |
| | | component: () => import('../views/pp/reportingWorks/ReportingWorks.vue'), |
| | | children:[ |
| | | |
| | | { |
| | | path: 'selectReportingWorks', |
| | | name: 'selectReportingWorks', |
| | | component: () => import('../views/pp/reportingWorks/SelectReportingWorks.vue'), |
| | | }, |
| | | |
| | | { |
| | | path: 'addReportingWork', |
| | | name: 'addReportingWork', |
| | | component: () => import('../views/pp/reportingWorks/AddReportingWork.vue'), |
| | | }, |
| | | { |
| | | path: 'selectReportingWorks', |
| | | name: 'selectReportingWorks', |
| | | component: () => import('../views/pp/reportingWorks/SelectReportingWorks.vue'), |
| | | }, |
| | | { |
| | | path: 'qualityInspectionReview', |
| | |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/reportingWorks/SelectReportingWorks' |
| | | redirect:'/main/reportingWorks/AddReportingWork' |
| | | } |
| | | ] |
| | | }, |
| | |
| | | import {VXETable} from "vxe-table"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let productGlassTypeStore = useProductGlassTypeStore() |
| | |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['', '', '', '', ''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["baiscQuantity",'computeGrossArea','weight','perimeter'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = [''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["quantity",'goodsQuantity','area','perimeter'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | item.processId = processId |
| | | item.landingSequence = index |
| | | item.baiscQuantity = item.baiscQuantity - checkedNum.value |
| | | item.computeGrossArea = item.computeGrossArea - item.width * item.height * checkedNum.value / 1000000 |
| | | item.computeGrossArea = (item.computeGrossArea - item.width * item.height * checkedNum.value / 1000000).toFixed(2) |
| | | |
| | | //删除key |
| | | let key = item._X_ROW_KEY |
| | |
| | | //数量 |
| | | rightData[filterIndex].baiscQuantity = rightData[filterIndex].baiscQuantity * 1 + checkedNum.value * 1 |
| | | //面积 |
| | | rightData[filterIndex].computeGrossArea=rightData[filterIndex].width*rightData[filterIndex].height*rightData[filterIndex].baiscQuantity/1000000 |
| | | rightData[filterIndex].computeGrossArea=(rightData[filterIndex].width*rightData[filterIndex].height*rightData[filterIndex].baiscQuantity/1000000).toFixed(2) |
| | | //如果左边数量为0时删除此条数据 |
| | | //删除key |
| | | let key = item._X_ROW_KEY |
| | |
| | | } else { |
| | | //右边表格没有此条数据则往右边表格插入数据 |
| | | item.baiscQuantity = checkedNum.value |
| | | item.computeGrossArea=item.width*item.height*checkedNum.value/1000000 |
| | | item.computeGrossArea=(item.width*item.height*checkedNum.value/1000000).toFixed(2) |
| | | if (item.quantity === 0) { |
| | | $gridLeft.remove(item) |
| | | } |
| | |
| | | if (filterIndex > -1) { |
| | | rightData[filterIndex].baiscQuantity = rightData[filterIndex].baiscQuantity * 1 + item.quantity * 1 |
| | | //面积 |
| | | rightData[filterIndex].computeGrossArea=rightData[filterIndex].width*rightData[filterIndex].height*rightData[filterIndex].baiscQuantity/1000000 |
| | | rightData[filterIndex].computeGrossArea=(rightData[filterIndex].width*rightData[filterIndex].height*rightData[filterIndex].baiscQuantity/1000000).toFixed(2) |
| | | |
| | | } else { |
| | | delete item._X_ROW_KEY |
| | | $grid.insert(item) |
| | | console.log(item) |
| | | //$grid.insert(item) |
| | | } |
| | | |
| | | $gridLeft.remove(item) |
| | |
| | | //判断可用数量是否大于等于输入的数量,不满足则抛出异常 |
| | | if (item.baiscQuantity * 1 < checkedNum.value * 1) throw new Error("请输入小于等于待分数量的数字"); |
| | | item.baiscQuantity = item.baiscQuantity - checkedNum.value |
| | | item.computeGrossArea=item.computeGrossArea-item.width*item.height*checkedNum.value/1000000 |
| | | item.computeGrossArea=(item.computeGrossArea-item.width*item.height*checkedNum.value/1000000).toFixed(2) |
| | | //定义key值保持 |
| | | let key = item._X_ROW_KEY |
| | | //左边表格数据 |
| | |
| | | //如果右边表格数据中存在当前数据则数量相加 |
| | | if (filterIndex >= 0) { |
| | | leftData[filterIndex].quantity = leftData[filterIndex].quantity * 1 + checkedNum.value * 1 |
| | | leftData[filterIndex].computeGrossArea=leftData[filterIndex].computeGrossArea-leftData[filterIndex].width*leftData[filterIndex].height*leftData[filterIndex].baiscQuantity/1000000 |
| | | leftData[filterIndex].computeGrossArea=(leftData[filterIndex].computeGrossArea-leftData[filterIndex].width*leftData[filterIndex].height*leftData[filterIndex].baiscQuantity/1000000).toFixed(2) |
| | | |
| | | if (item.baiscQuantity === 0) { |
| | | $grid.remove(checkedList) |
| | |
| | | item.quantity = checkedNum.value |
| | | item.processId = checkedListLeft[0].processId |
| | | item.landingSequence = checkedListLeft[0].landingSequence |
| | | item.computeGrossArea=item.computeGrossArea-checkedListLeft[0].width*checkedListLeft[0].height*checkedNum.value/1000000 |
| | | item.computeGrossArea=(item.computeGrossArea-checkedListLeft[0].width*checkedListLeft[0].height*checkedNum.value/1000000).toFixed(2) |
| | | delete item._X_ROW_KEY |
| | | $gridLeft.insert(item) |
| | | item._X_ROW_KEY = key |
| | |
| | | for (let i = 0; i < leftData.length; i++) { |
| | | if (leftData[i].orderNumber === item.orderNumber && leftData[i].processId === item.processId) { |
| | | leftData[i].quantity = leftData[i].quantity * 1 + checkedNum.value * 1 |
| | | leftData[i].computeGrossArea=leftData[i].computeGrossArea-leftData[i].width*leftData[i].height*leftData[i].baiscQuantity/1000000 |
| | | leftData[i].computeGrossArea=(leftData[i].computeGrossArea-leftData[i].width*leftData[i].height*leftData[i].baiscQuantity/1000000).toFixed(2) |
| | | |
| | | break |
| | | } else if (leftData[i].orderNumber === item.orderNumber && leftData[i].processId !== item.processId) { |
| | |
| | | item.processId = checkedListLeft[0].processId |
| | | item.landingSequence = checkedListLeft[0].landingSequence |
| | | item.quantity = checkedListLeft[0].baiscQuantity |
| | | item.computeGrossArea=item.computeGrossArea-checkedListLeft[0].width*checkedListLeft[0].height*checkedListLeft[0].baiscQuantity/1000000 |
| | | item.computeGrossArea=(item.computeGrossArea-checkedListLeft[0].width*checkedListLeft[0].height*checkedListLeft[0].baiscQuantity/1000000).toFixed(2) |
| | | |
| | | delete item._X_ROW_KEY |
| | | }) |
| | |
| | | import {toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import PrintProcess from '@/views/pp/processCard/PrintProcess.vue' |
| | | import PrintLabel from '@/views/pp/processCard/PrintLabel.vue' |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | |
| | | data: null,//表格数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['data.orderDetail.quantity', 'data.orderDetail.computeGrossArea'] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["quantity",'total_area',] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | if (res.code == 200) { |
| | | |
| | | produceList.value = deepClone(res.data.data) |
| | | console.log(produceList.value) |
| | | handleGetQRCode() |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | <td>{{ itemDatile.total_area }}</td> |
| | | <td>{{ itemDatile.perimeter }}</td> |
| | | <td>{{ itemDatile.bend_radius }}</td> |
| | | <td>{{ itemDatile.order_number }}</td> |
| | | <td>{{ itemDatile.remarks }}</td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import useProductGlassTypeStore from "@/stores/sd/product/productGlassType" |
| | | import footSum from "@/hook/footSum" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import GlassType from "@/components/sd/product/GlassType.vue" |
| | |
| | | import Sortable from 'sortablejs' |
| | | import BasicTable from '@/components/sd/product/BasicTable.vue' |
| | | import {VXETable} from "vxe-table"; |
| | | |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | import {useI18n} from "vue-i18n"; |
| | | let productGlassTypeStore = useProductGlassTypeStore() |
| | | const { t } = useI18n() |
| | | const userStore = useUserInfoStore() |
| | | let router = useRouter() |
| | | let props = defineProps({ |
| | | rowIndex:{} |
| | |
| | | |
| | | ],//table body实际数据 |
| | | //脚部求和 |
| | | // footerMethod ({ columns, data }) {//页脚函数 |
| | | // return[ |
| | | // columns.map((column, columnIndex) => { |
| | | // if (columnIndex === 0) { |
| | | // return '合计:' |
| | | // } |
| | | // // if (props.tableProp.footList.includes(column.field)) { |
| | | // // return sumNum(data, column.field) |
| | | // // } |
| | | // return '' |
| | | // }) |
| | | // ] |
| | | // } |
| | | |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | const List = ["quantity",'area'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | |
| | |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = [] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["quantity",'area',] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | import {useI18n} from 'vue-i18n' |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | import {toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | const userStore = useUserInfoStore() |
| | |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['', '',] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["quantity",'orderDetail.computeGrossArea'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | const userStore = useUserInfoStore() |
| | |
| | | data: null,//表格数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['data.orderDetail.quantity', 'data.orderDetail.computeGrossArea'] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["quantity",'compute_gross_area','perimeter'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | {type:'expand',fixed:"left",width: 80}, |
| | | {type: 'seq',fixed:"left", title: '自序', width: 80 }, |
| | | {field: 'reportingWork.reportingWorkTime', width: 120, title: '报工时间',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: 'reportingWork.thisProcess',width: 120, title: '报工工序', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'responsibleProcess',width: 120, title: '责任工序', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'responsibleTeam', width: 130,title: '责任班组', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'breakageType', width: 100,title: '次破类型', sortable: true,showOverflow:"ellipsis"}, |
| | |
| | | url :'/report/crossProcessBreaking', |
| | | exportUrl :'/report/exportCrossProcessBreaking', |
| | | exportName:'跨工序次破报表', |
| | | footList:['quantity','grossArea','computeGrossArea','perimeter','price','grossAmount'] |
| | | footList:['breakageQuantity','area'] |
| | | }) |
| | | |
| | | </script> |
| | |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import exportExcel from "@/hook/exportExcel"; |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | }, |
| | |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = [''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["breakageQuantity",'area',] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import exportExcel from "@/hook/exportExcel"; |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = [''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["quantity",'completionsNum','area','received_quantity','receivedNo'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = [''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["quantity",'childArea','actualArea','completeNum','completeArea','incompleteNum','incompleteArea'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import exportExcel from "@/hook/exportExcel"; |
| | | import footSum from "@/hook/footSum" |
| | | |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | }, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = [''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["quantity",'quantityMax','breakage_quantity','patch_num','received_quantity'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | </ul> |
| | | </template> |
| | | |
| | | |
| | | <template #toolbar_buttons> |
| | | <vxe-button style="margin-right: 0.5rem" |
| | | @click="exportExcel('/report/exportQualityReport', |
| | | '品质报表', |
| | | form.date1)"> |
| | | 导出</vxe-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import exportExcel from "@/hook/exportExcel"; |
| | | import footSum from "@/hook/footSum" |
| | | |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | }, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = [''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["quantity",'area',] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #toolbar_buttons> |
| | | <vxe-button style="margin-right: 0.5rem" |
| | | @click="exportExcel('/report/exportRawMaterialRequisition', |
| | | '原片领料报表', |
| | | form.date1)"> |
| | | 导出</vxe-button> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | |
| | | <el-menu-item index="/main/report/DamageReport">次破报表</el-menu-item> |
| | | <el-menu-item index="/main/report/CrossProcessBreaking">跨工序次破</el-menu-item> |
| | | </el-sub-menu> |
| | | |
| | | <el-menu-item index="/main/report/TeamOutput">班组产量</el-menu-item> |
| | | <el-menu-item index="/main/report/SplittingDetailsOutside">分架明细</el-menu-item> |
| | | <el-menu-item index="/main/report/TaskCompletionStatus">任务完成情况</el-menu-item> |
| | | <el-menu-item index="/main/report/RawMaterialRequisition">原片领料</el-menu-item> |
| | |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import footSum from "@/hook/footSum" |
| | | |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | |
| | | zoom: true, |
| | | custom: true |
| | |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = [''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["quantity",'area',] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input type="text" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | <vxe-button style="margin-right: 0.5rem" |
| | | @click="exportExcel('/report/exportTaskCompletionStatus', |
| | | '任务完成情况报表', |
| | | form.date1)"> |
| | | time.date1)"> |
| | | 导出</vxe-button> |
| | | </template> |
| | | |
| | |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'setType':{ |
| | | alert('我接收到子组件传送的反审状态') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | let filterData = ref({}) |
| | | //提交的表单 |
| | | const form = reactive({ |
| | | date1: '', |
| | | orderId: '', |
| | | project: '' |
| | | }) |
| | | |
| | | //工序 |
| | | const value = ref('切割') |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | //定义滚动条高度 |
| | | let scrollTop = ref(null) |
| | | let scrollHeight = ref(null) |
| | | let clientHeight = ref(null) |
| | | const scrollEvnt = (row) => { |
| | | // 内容高度 |
| | | scrollTop.value = row.$event.target.scrollTop |
| | | scrollHeight.value = row.$event.target.scrollHeight |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = ref(1) |
| | | let pageState = null |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime() + 3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | |
| | | let total = reactive({ |
| | | pageTotal: 0, |
| | | dataTotal: 0, |
| | | pageSize: 100 |
| | | }) |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | processType: [], |
| | | }) |
| | | //第一次加载数据 |
| | | request.post(`/report/teamOutput/1/${total.pageSize}/${startTime}/${endTime}/${selectProcesses}`, 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)) |
| | | titleSelectJson.value.processType = res.data.process |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //页脚翻页查询 |
| | | const selectPageList = () => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | |
| | | |
| | | request.post(`/report/teamOutput/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${selectProcesses}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | |
| | | request.post(`/report/teamOutput/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${selectProcesses}`, 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 |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({currentPage, pageSize}) => { |
| | | pageNum.value = currentPage |
| | | total.pageTotal = pageSize |
| | | selectPageList() |
| | | } |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | function filterChanged(column){ |
| | | //gridOptions.loading=true |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0]!=undefined?column.datas[0]:'' |
| | | value = value.trim() |
| | | //判断是否存在外键 |
| | | if (column.property.indexOf('.')>-1){ |
| | | const columnArr = column.property.split('.') |
| | | filterData.value[columnArr[0]] = { |
| | | [columnArr[1]]:value |
| | | } |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | gridOptions.loading = true |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | request.post(`/report/teamOutput/1/${total.pageSize}/${startTime}/${endTime}/${selectProcesses}`, 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) |
| | | gridOptions.loading=false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: '1', width: 120, title: '报工时间',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: '2',width: 120, title: '工序', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '3', width: 130,title: '班组名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '4',width: 120, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '5', width: 100,title: '流程卡号', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: '6', width: 100,title: '产品大类', sortable: true}, |
| | | {field: '7',width: 100, title: '产品小类', sortable: true}, |
| | | {field: '8',width: 120, title: '在制品名称', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: '9', width: 110,title: '磨边类型', sortable: true}, |
| | | {field: '10', width: 100,title: '形状', sortable: true}, |
| | | {field: '11',width: 100, title: '厚度', sortable: true}, |
| | | {field: '12',width: 110, title: '完工数量', sortable: true}, |
| | | {field: '13',width: 110, title: '完工面积', sortable: true}, |
| | | {field: '14',width: 110, title: '平方毫米(天)', sortable: true}, |
| | | {field: '15',width: 110, title: '包装方式', sortable: true}, |
| | | {type: 'seq', fixed: "left", title: '自序', width: 40}, |
| | | { |
| | | field: 'reportingWorkTime', width: 160, title: '报工时间', |
| | | }, |
| | | { |
| | | field: 'thisProcess', |
| | | width: 100, |
| | | title: '报工工序', |
| | | showOverflow: "ellipsis", |
| | | filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | }, |
| | | { |
| | | field: 'teamsGroupsName', width: 100, title: '报工班组',filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | }, |
| | | { |
| | | field: 'project', width: 120, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | }, |
| | | { |
| | | field: 'processId', width: 140, title: '流程卡号',filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | }, |
| | | {field: 'orderNumber', width: 60, title: '序号'}, |
| | | {field: 'width', width: 100, title: '宽'}, |
| | | {field: 'height', width: 100, title: '高'}, |
| | | {field: 'shape', width: 90, title: '形状'}, |
| | | {field: 'thickness', width: 90, title: '厚度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'edgingType', width: 110, title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'completedQuantity', width: 90, title: '完工数量'}, |
| | | {field: 'area', width: 100, title: '完工面积'}, |
| | | {field: 'productName', width: 150, title: '产品名称'}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | }, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 1:'2023-01-01', |
| | | 2:'钢化', |
| | | 3:'钢化一班', |
| | | 4:'银川大楼', |
| | | 5:'NG23010121A01', |
| | | 6:'中空玻璃', |
| | | 7:'平中空夹胶', |
| | | 8:'5mmLYE-70平钢(外)+20mmA(密)+5mm超白平钢(内)', |
| | | 9:'精磨', |
| | | 10:'普型', |
| | | 11:'5', |
| | | 12:'11', |
| | | 13:'41.14', |
| | | 14:'123.33', |
| | | 15:'', |
| | | |
| | | }, |
| | | { |
| | | 1:'2023-01-01', |
| | | 2:'钢化', |
| | | 3:'钢化一班', |
| | | 4:'银川大楼', |
| | | 5:'NG23010121A01', |
| | | 6:'中空玻璃', |
| | | 7:'平中空夹胶', |
| | | 8:'5mmLYE-70平钢(外)+20mmA(密)+5mm超白平钢(内)', |
| | | 9:'精磨', |
| | | 10:'普型', |
| | | 11:'5', |
| | | 12:'11', |
| | | 13:'41.14', |
| | | 14:'123.33', |
| | | 15:'', |
| | | |
| | | }, |
| | | { |
| | | 1:'2023-01-01', |
| | | 2:'钢化', |
| | | 3:'钢化一班', |
| | | 4:'银川大楼', |
| | | 5:'NG23010121A01', |
| | | 6:'中空玻璃', |
| | | 7:'平中空夹胶', |
| | | 8:'5mmLYE-70平钢(外)+20mmA(密)+5mm超白平钢(内)', |
| | | 9:'精磨', |
| | | 10:'普型', |
| | | 11:'5', |
| | | 12:'11', |
| | | 13:'41.14', |
| | | 14:'123.33', |
| | | 15:'', |
| | | |
| | | }, |
| | | { |
| | | 1:'2023-01-01', |
| | | 2:'钢化', |
| | | 3:'钢化一班', |
| | | 4:'银川大楼', |
| | | 5:'NG23010121A01', |
| | | 6:'中空玻璃', |
| | | 7:'平中空夹胶', |
| | | 8:'5mmLYE-70平钢(外)+20mmA(密)+5mm超白平钢(内)', |
| | | 9:'精磨', |
| | | 10:'普型', |
| | | 11:'5', |
| | | 12:'11', |
| | | 13:'41.14', |
| | | 14:'123.33', |
| | | 15:'', |
| | | |
| | | }, |
| | | ],//table body实际数据 |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['12','13','14'] |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["completedQuantity",'area',] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | |
| | | }) |
| | | |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: 'Option1', |
| | | label: 'Option1', |
| | | }, |
| | | { |
| | | value: 'Option2', |
| | | label: 'Option2', |
| | | }, |
| | | { |
| | | value: 'Option3', |
| | | label: 'Option3', |
| | | }, |
| | | ] |
| | | function exportExcel(url, fileName,date) { |
| | | let processes = value.value |
| | | if(date===null){ |
| | | ElMessage.warning("请先选择日期") |
| | | return |
| | | } |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | desc: '', |
| | | if(processes===null){ |
| | | ElMessage.warning("请先选择工序") |
| | | return |
| | | } |
| | | |
| | | const date1 = new Date(date[0]); |
| | | const date2 = new Date(date[1]); |
| | | const timeDiff = Math.abs(date2.getTime() - date1.getTime()); |
| | | const daysDiff = timeDiff / (1000 * 3600 * 24); |
| | | if(Math.floor(daysDiff)>180){ |
| | | ElMessage.warning("导出的筛选时间不能超过180天") |
| | | return |
| | | } |
| | | let dataMp = ref({ |
| | | date: date, |
| | | processes: processes |
| | | }) |
| | | request.post(url,dataMp.value,{responseType :'blob'}).then(res => { |
| | | const blob = new Blob([res]) |
| | | if ('download' in document.createElement('a')) { // 非IE下载 |
| | | const elink = document.createElement('a') |
| | | elink.download = `${fileName}.xlsx` |
| | | elink.style.display = 'none' |
| | | elink.href = URL.createObjectURL(blob) |
| | | document.body.appendChild(elink) |
| | | elink.click() |
| | | URL.revokeObjectURL(elink.href) // 释放URL 对象 |
| | | document.body.removeChild(elink) |
| | | } else { // IE10+下载 |
| | | navigator.msSaveBlob(blob, fileName) |
| | | } |
| | | |
| | | }) |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | :default-time="defaultTime" |
| | | format="YYYY/MM/DD" |
| | | start-placeholder="开始时间" |
| | | style="width: 100px" |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD" |
| | | /> |
| | | |
| | | <el-select v-model="value" class="m-2" placeholder="查询类型"> |
| | | <el-select v-model="value" clearable default-value="default_city" style="width: 120px"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | v-for="item in titleSelectJson['processType']" |
| | | :key="item.id" |
| | | :label="item.basic_name" |
| | | :value="item.basic_name" |
| | | /> |
| | | </el-select> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button type="primary" @click="getWorkOrder">查询</el-button> |
| | | </el-row> |
| | | |
| | | </div> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | |
| | | > |
| | |
| | | </ul> |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button> |
| | | <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">反审</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #toolbar_buttons> |
| | | <vxe-button style="margin-right: 0.5rem" |
| | | @click="exportExcel('/report/exportTeamOutput', |
| | | '班组产量明细', |
| | | form.date1)"> |
| | | 导出</vxe-button> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | |
| | | #selectForm { |
| | | width: 60%; |
| | | text-align: center; |
| | |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | |
| | | // pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | titleSelectJson.value.processType = res.data.process |
| | | titleSelectJson.value.processType.splice(0,1) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = [''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["quantity",'stockNum','stockArea',] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import footSum from "@/hook/footSum" |
| | | |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | }, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = [''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["finishedArea",'brokenArea','area',] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | |
| | | }) |
| | | |
| | | function exportExcel(url, fileName,date) { |
| | | let processes = value.value |
| | | |
| | | if(date===null){ |
| | | ElMessage.warning("请先选择日期") |
| | | return |
| | | } |
| | | |
| | | if(processes===null){ |
| | | ElMessage.warning("请先选择工序") |
| | | return |
| | | } |
| | | |
| | | const date1 = new Date(date[0]); |
| | | const date2 = new Date(date[1]); |
| | | const timeDiff = Math.abs(date2.getTime() - date1.getTime()); |
| | | const daysDiff = timeDiff / (1000 * 3600 * 24); |
| | | if(Math.floor(daysDiff)>180){ |
| | | ElMessage.warning("导出的筛选时间不能超过180天") |
| | | return |
| | | } |
| | | let dataMp = ref({ |
| | | date: date, |
| | | processes: processes, |
| | | }) |
| | | request.post(url,dataMp.value,{responseType :'blob'}).then(res => { |
| | | const blob = new Blob([res]) |
| | | if ('download' in document.createElement('a')) { // 非IE下载 |
| | | const elink = document.createElement('a') |
| | | elink.download = `${fileName}.xlsx` |
| | | elink.style.display = 'none' |
| | | elink.href = URL.createObjectURL(blob) |
| | | document.body.appendChild(elink) |
| | | elink.click() |
| | | URL.revokeObjectURL(elink.href) // 释放URL 对象 |
| | | document.body.removeChild(elink) |
| | | } else { // IE10+下载 |
| | | navigator.msSaveBlob(blob, fileName) |
| | | } |
| | | |
| | | }) |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | </ul> |
| | | </template> |
| | | |
| | | |
| | | <template #toolbar_buttons> |
| | | <vxe-button style="margin-right: 0.5rem" |
| | | @click="exportExcel('/report/exportYield', |
| | | '成品率报表', |
| | | form.date1)"> |
| | | 导出</vxe-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import userInfo from "@/stores/userInfo" |
| | | import { useI18n } from 'vue-i18n' |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | let brokenVisible = ref(false) |
| | |
| | | }, |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['', '', '', '', ''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["quantity_card",'quantity','completedQuantity','completed','onceBroken'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import { useI18n } from 'vue-i18n' |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | let router = useRouter() |
| | |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | let router=useRouter() |
| | |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {title: '操作', width: 120, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {type:'expand',fixed:"left",slots: { content:'content' }}, |
| | | {title: '操作', width: 100, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序',}, |
| | | |
| | | {field: 'reportingWorkId',width: 130, title: '报工编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, }, |
| | | {field: 'reportingWorkTime',width: 120, title: '报工时间',showOverflow:"ellipsis" }, |
| | |
| | | ],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['',''] |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["thisCompletedQuantity",'thisWornQuantity','area','perimeter'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | <div id="main"> |
| | | <div id="div-title"> |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/reportingWorks/SelectReportingWorks' }">{{$t('reportingWorks.WorkReportingManagement')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/reportingWorks/AddReportingWork' }">{{$t('reportingWorks.addReportingWorks')}}</el-breadcrumb-item> |
| | | |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/reportingWorks/AddReportingWork' }">{{$t('reportingWorks.addReportingWorks')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/reportingWorks/SelectReportingWorks' }">{{$t('reportingWorks.WorkReportingManagement')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/reportingWorks/QualityInspectionReview' }">{{$t('reportingWorks.qualityInspectionReview')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item :to="{ path: '/main/processCard/SelectPrintFlowCard' }" style="display: none">打印</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | |
| | | import { useI18n } from 'vue-i18n' |
| | | import SelectProduct from "@/views/sd/product/SelectProduct.vue"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import footSum from "@/hook/footSum" |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['','','',''] |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["thisCompletedQuantity",'completedArea','thisWornQuantity','wornArea'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | import {VXETable} from "vxe-table"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | let router = useRouter() |
| | |
| | | data: null,//表格数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['total', 'totalArea'] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["quantity",'computeGrossArea'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | import {VXETable} from "vxe-table"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | const userStore = useUserInfoStore() |
| | |
| | | }, |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['', '', ''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["orderDetail.grossArea",'orderDetail.quantity'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | return Result.seccess(reportService.rawMaterialRequisitionSv(selectTime1, selectTime2, report)); |
| | | } |
| | | |
| | | @ApiOperation("班组产量明细报表") |
| | | @SaCheckPermission("DamageReport.search") |
| | | @PostMapping("/teamOutput/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}/{selectProcesses}") |
| | | public Result teamOutput( |
| | | @PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable String selectProcesses, |
| | | @RequestBody TeamOutputDTO teamOutputDTO) { |
| | | return Result.seccess(reportService.teamOutputSv(pageNum, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO)); |
| | | |
| | | } |
| | | @ApiOperation("跨工序次破报表导出") |
| | | @PostMapping("/exportCrossProcessBreaking") |
| | | public void exportCrossProcessBreaking(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | |
| | | DownExcel.download(response, WorkInProgressDTO.class, reportService.exportWorkInProgressSv(dates), "WorkInProgress"); |
| | | } |
| | | |
| | | // |
| | | |
| | | @ApiOperation("任务完成情况导出") |
| | | @PostMapping("/exportTaskCompletionStatus") |
| | | public void exportTaskCompletionStatus(HttpServletResponse response, |
| | | public void exportTaskCompletionStatus(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, TaskCompletionStatusDTO.class, reportService.exportDamageReportSv(dates), "TaskCompletionStatus"); |
| | | } |
| | | |
| | | @ApiOperation("原片领料导出") |
| | | @PostMapping("/exportRawMaterialRequisition") |
| | | public void exportRawMaterialRequisition(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, RawMaterialRequisitionDTO.class, reportService.exportRawMaterialRequisitionSv(dates), "RawMaterialRequisition"); |
| | | } |
| | | |
| | | @ApiOperation("品质报表导出") |
| | | @PostMapping("/exportQualityReport") |
| | | public void exportQualityReport(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, QualityReportDTO.class, reportService.exportQualityReportSv(dates), "QualityReport"); |
| | | } |
| | | |
| | | @ApiOperation("成品率报表导出") |
| | | @PostMapping("/exportYield") |
| | | public void exportYield(HttpServletResponse response, |
| | | @RequestBody Map<String,Object> dates) |
| | | throws IOException, IllegalAccessException, InstantiationException { |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, WorkInProgressDTO.class, reportService.exportWorkInProgressSv(dates), "WorkInProgress"); |
| | | DownExcel.download(response, YieldDTO.class, reportService.exportYieldSv(dates), "Yield"); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.dto.pp; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class TeamOutputDTO { |
| | | @ExcelProperty("报工时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime reportingWorkTime; |
| | | @ExcelProperty("报工工序") |
| | | private String thisProcess; |
| | | @ExcelProperty("报工班组") |
| | | private String teamsGroupsName; |
| | | @ExcelProperty("项目名称") |
| | | private String project; |
| | | @ExcelProperty("流程卡号") |
| | | private String processId; |
| | | @ExcelProperty("序号") |
| | | private String orderNumber; |
| | | @ExcelProperty("宽") |
| | | private String width; |
| | | @ExcelProperty("高") |
| | | private String height; |
| | | @ExcelProperty("形状") |
| | | private String shape; |
| | | @ExcelProperty("厚度") |
| | | private String thickness; |
| | | @ExcelProperty("磨边类型") |
| | | private String edgingType; |
| | | @ExcelProperty("完工数量") |
| | | private String completedQuantity; |
| | | @ExcelProperty("完工面积") |
| | | private String area; |
| | | @ExcelProperty("产品名称") |
| | | private String productName; |
| | | } |
| | |
| | | |
| | | List<WorkInProgressDTO> exportWorkInProgressMp(List<LocalDate> date, String process, String inputVal, String project); |
| | | |
| | | List<TaskCompletionStatusDTO> exportTaskCompletionStatusMp(Map<String, Object> dates); |
| | | |
| | | List<RawMaterialRequisitionDTO> exportRawMaterialRequisitionMp(List<LocalDate> dates); |
| | | |
| | | List<QualityReportDTO> exportQualityReportSv(List<LocalDate> dates); |
| | | |
| | | List<YieldDTO> exportYieldMp(List<LocalDate> date, String process); |
| | | |
| | | List<TeamOutputDTO> teamOutputMp(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO); |
| | | |
| | | Map<String, Integer> teamOutputPageTotal(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO); |
| | | |
| | | |
| | | // Map<String, Integer> getWorkInProgressTotal( |
| | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | |
| | | import com.example.erp.dto.pp.DamageReportDTO; |
| | | import com.example.erp.dto.pp.TeamOutputDTO; |
| | | import com.example.erp.entity.pp.DamageDetails; |
| | | import com.example.erp.entity.pp.Report; |
| | | import com.example.erp.mapper.pp.ProductionSchedulingMapper; |
| | |
| | | return reportMapper.exportWorkInProgressMp(date,process,inputVal,project); |
| | | } |
| | | |
| | | public List exportTaskCompletionStatusSv(Map<String, Object> dates) { |
| | | return reportMapper.exportTaskCompletionStatusMp(dates); |
| | | } |
| | | |
| | | public List exportRawMaterialRequisitionSv(List<LocalDate> dates) { |
| | | return reportMapper.exportRawMaterialRequisitionMp(dates); |
| | | } |
| | | |
| | | public List exportQualityReportSv(List<LocalDate> dates) { |
| | | return reportMapper.exportQualityReportSv(dates); |
| | | } |
| | | |
| | | public List exportYieldSv(Map<String, Object> dates) { |
| | | List<LocalDate> date= (List<LocalDate>) dates.get("date"); |
| | | String process= (String) dates.get("processes"); |
| | | return reportMapper.exportYieldMp(date,process); |
| | | } |
| | | |
| | | public Map<String, Object> teamOutputSv(Integer pageNum, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", reportMapper.teamOutputMp(offset, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO)); |
| | | map.put("process", productionSchedulingMapper.selectProcess()); |
| | | map.put("total", reportMapper.teamOutputPageTotal(offset, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO)); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | od.product_name, |
| | | SUM( od.quantity) as quantity, |
| | | SUM(od.compute_gross_area) as compute_gross_area, |
| | | sum(od.perimeter) as perimeter |
| | | round(sum(od.perimeter),2) as perimeter |
| | | from sd.order_detail as od left join |
| | | (select order_id,order_number,production_id,splitting_status from sd.order_glass_detail |
| | | GROUP BY order_id,order_number |
| | |
| | | <result column="glass_child" property="glassChild"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="teamOutputMap" type="com.example.erp.dto.pp.TeamOutputDTO"> |
| | | <result column="reporting_work_time" property="reportingWorkTime"/> |
| | | <result column="this_process" property="thisProcess"/> |
| | | <result column="teams_groups_name" property="teamsGroupsName"/> |
| | | <result column="project" property="project"/> |
| | | <result column="process_id" property="processId"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="thickness" property="thickness"/> |
| | | <result column="edging_type" property="edgingType"/> |
| | | <result column="completed_quantity" property="completedQuantity"/> |
| | | <result column="area" property="area"/> |
| | | <result column="product_name" property="productName"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 流程卡进度--> |
| | | <select id="processCardProgressMp"> |
| | |
| | | select rw.reporting_work_id,rw.reporting_work_time,dd.responsible_process,dd.responsible_team, |
| | | dd.breakage_type,dd.breakage_reason,ROUND((dd.breakage_quantity)) as breakage_quantity, |
| | | round(ogd.child_width*ogd.child_height*(dd.breakage_quantity)/1000000,2) as area,rw.this_process, |
| | | o.project,o.order_id,ogd.glass_child |
| | | o.project,o.order_id,ogd.glass_child,rw.this_process |
| | | from |
| | | damage_details as dd |
| | | left join reporting_work as rw |
| | |
| | | fc.technology_number, |
| | | od.product_name, |
| | | od.quantity, |
| | | MAX(opd.reporting_work_num_count) as quantityMax, |
| | | ifnull(MAX(opd.reporting_work_num_count),0) as quantityMax, |
| | | IFNULL(SUM(distinct dd.breakage_quantity), 0) as breakage_quantity, |
| | | IFNULL(sum(distinct pl.patch_num), 0) as patch_num, |
| | | fc.received_quantity, |
| | | ifnull(fc.received_quantity,0) as received_quantity, |
| | | CONCAT(ROUND(ROUND(od.quantity / MAX(opd.reporting_work_num_count), 2) * 100), '%') as finished |
| | | FROM sd.`order` AS o |
| | | LEFT JOIN sd.order_detail AS od ON od.order_id = o.order_id |
| | |
| | | o.area, |
| | | date(fc.create_time) as create_time, |
| | | date(orw.startTime) as startTime, |
| | | oopd.completionsNum, |
| | | ifnull(oopd.completionsNum,0) as completionsNum, |
| | | sum( DISTINCT fc.received_quantity ) AS received_quantity, |
| | | sum( DISTINCT fc.quantity - fc.received_quantity ) AS receivedNo, |
| | | o.quantity-sum( DISTINCT fc.received_quantity ) AS receivedNo, |
| | | IF(fc.quantity=fc.received_quantity,'已清单','') as accomplish, |
| | | DATEDIFF( |
| | | MAX( rw.reporting_work_time ), |
| | |
| | | order by fc.process_id, fc.order_number, fc.technology_number |
| | | </select> |
| | | |
| | | <select id="exportTaskCompletionStatusMp"> |
| | | select d.customer_name as customerName, |
| | | d.project, |
| | | d.batch, |
| | | c.order_id as orderId, |
| | | d.quantity, |
| | | d.area, |
| | | dd.quantity as shippedQuantity, |
| | | dd.area as shippedArea, |
| | | e.reportWorkQuantity, |
| | | e.reportWorkQuantityCount |
| | | |
| | | from sd.`order` as d |
| | | left join flow_card as c on c.order_id = d.order_id |
| | | 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 mm.finished_goods_inventory as f |
| | | on c.order_id = f.order_id and f.order_number = c.order_number |
| | | left join (SELECT process_id, |
| | | technology_number, |
| | | sum(a.broken_num) as broken_num, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", ifnull(reporting_work_num,0), "\"")), |
| | | '}' |
| | | ) as reportWorkQuantity, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", ifnull(reporting_work_num,0), "\"")), |
| | | '}' |
| | | ) as reportWorkQuantityCount |
| | | FROM sd.order_process_detail as a |
| | | left join sd.`order` as o on o.order_id = a.order_id |
| | | where date(o.create_time) >= #{date[0]} |
| | | and date(o.create_time) <= #{date[1]} |
| | | GROUP BY process_id,a.technology_number |
| | | ) as e |
| | | on e.process_id = c.process_id |
| | | and e.technology_number = c.technology_number |
| | | 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 and date(o.create_time) >= #{dates[0]} |
| | | and date(o.create_time) <= #{dates[1]} and reportWorkQuantity is not null |
| | | GROUP BY a.order_id |
| | | ORDER BY a.order_id |
| | | </select> |
| | | |
| | | <select id="exportRawMaterialRequisitionMp"> |
| | | SELECT fc.project_no, |
| | | modl.material_name, |
| | | modl.producer, |
| | | ou.width, |
| | | ou.height, |
| | | modl.date_of_manufacture, |
| | | SUM(distinct modl.outbound_quantity) as quantity, |
| | | ROUND(SUM(modl.outbound_quantity) * SUM(modl.single_piece_area), 2) as area, |
| | | date(mo.material_requisition_date) as date |
| | | FROM mm.material_outbound_detail AS modl |
| | | left join mm.material_outbound as mo on mo.material_outbound_id = modl.material_outbound_id |
| | | LEFT JOIN optimize_use AS ou ON modl.use_id = ou.id and ou.raw_stock_code = modl.inventory_id |
| | | LEFT JOIN flow_card AS fc ON ou.project_no = fc.project_no |
| | | where modl.use_id IS NOT NULL |
| | | and |
| | | date(mo.material_requisition_date) >= #{dates[0]} |
| | | and date(mo.material_requisition_date) <= #{dates[1]} |
| | | GROUP BY ou.width, ou.height, material_code |
| | | </select> |
| | | |
| | | <select id="exportQualityReportSv"> |
| | | SELECT o.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | | fc.order_number, |
| | | fc.technology_number, |
| | | od.product_name, |
| | | od.quantity, |
| | | MAX(opd.reporting_work_num_count) as quantityMax, |
| | | IFNULL(SUM(distinct dd.breakage_quantity), 0) as breakage_quantity, |
| | | IFNULL(sum(distinct pl.patch_num), 0) as patch_num, |
| | | fc.received_quantity, |
| | | CONCAT(ROUND(ROUND(od.quantity / MAX(opd.reporting_work_num_count), 2) * 100), '%') as finished |
| | | FROM sd.`order` AS o |
| | | LEFT JOIN sd.order_detail AS od ON od.order_id = o.order_id |
| | | |
| | | LEFT JOIN flow_card AS fc ON o.order_id = fc.order_id |
| | | AND fc.order_number = od.order_number |
| | | |
| | | LEFT JOIN damage_details AS dd ON dd.process_id = fc.process_id |
| | | AND dd.order_number = fc.order_number |
| | | AND dd.technology_number = fc.technology_number |
| | | and dd.available != 1 |
| | | |
| | | LEFT JOIN patch_log AS pl ON pl.order_id = fc.order_id |
| | | AND pl.process_id = fc.process_id |
| | | AND pl.order_sort = fc.order_number |
| | | AND pl.technology_number = fc.technology_number |
| | | |
| | | LEFT JOIN sd.order_process_detail AS opd ON opd.order_id = fc.order_id |
| | | AND opd.order_number = fc.order_number |
| | | AND opd.technology_number = fc.technology_number |
| | | |
| | | WHERE |
| | | date(o.create_time) >= #{dates[0]} |
| | | and date(o.create_time) <= #{dates[1]} |
| | | GROUP BY o.order_id, |
| | | fc.order_number, |
| | | fc.technology_number |
| | | ORDER BY fc.order_number |
| | | </select> |
| | | |
| | | <select id="exportYieldMp"> |
| | | SELECT opd.process, |
| | | o.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | | od.product_name, |
| | | ROUND(SUM(distinct opd.reporting_work_num) * od.area, 2) as finishedArea |
| | | , |
| | | ROUND(SUM(distinct opd.broken_num) * od.area, 2) as brokenArea, |
| | | (ROUND(SUM(distinct opd.reporting_work_num) * od.area, 2) + |
| | | ROUND(SUM(distinct opd.broken_num) * od.area, 2)) as area, |
| | | CONCAT(ROUND(ROUND(ROUND(SUM(distinct opd.reporting_work_num) * od.area, 2) / |
| | | (ROUND(SUM(distinct opd.reporting_work_num) * od.area, 2) + |
| | | ROUND(SUM(distinct opd.broken_num) * od.area, 2)), 2) * 100), '%') as finished |
| | | FROM sd.`order` AS o |
| | | LEFT JOIN sd.order_detail AS od ON od.order_id = o.order_id |
| | | LEFT JOIN flow_card AS fc ON fc.order_id = od.order_id |
| | | AND fc.order_number = fc.order_number |
| | | LEFT JOIN sd.order_process_detail AS opd ON opd.order_id = fc.order_id |
| | | AND opd.process_id = fc.process_id |
| | | AND opd.order_number = fc.order_number |
| | | AND opd.technology_number = fc.technology_number |
| | | WHERE opd.reporting_work_num > 0 |
| | | and date(o.create_time) >= #{date[0]} |
| | | and date(o.create_time) <= #{date[1]} |
| | | AND position(#{process} IN opd.process) |
| | | GROUP BY opd.process, o.order_id |
| | | </select> |
| | | |
| | | <select id="teamOutputMp" resultMap="teamOutputMap"> |
| | | SELECT |
| | | rw.reporting_work_time, |
| | | rw.this_process, |
| | | rw.teams_groups_name, |
| | | o.project, |
| | | rw.process_id, |
| | | rwd.order_number, |
| | | MAX( ogd.child_width ) as width, |
| | | MAX( ogd.child_height ) as height, |
| | | od.shape, |
| | | sum( pd.thickness ) as thickness, |
| | | od.edging_type, |
| | | rwd.completed_quantity, |
| | | ROUND(MAX( ogd.child_width )*MAX( ogd.child_height )*rwd.completed_quantity/1000000,2) as area, |
| | | od.product_name |
| | | FROM |
| | | reporting_work AS rw |
| | | LEFT JOIN reporting_work_detail AS rwd ON rw.reporting_work_id = rwd.reporting_work_id |
| | | LEFT JOIN sd.`order` AS o ON o.order_id = rw.order_id |
| | | LEFT JOIN sd.order_detail AS od ON od.order_id = o.order_id |
| | | AND od.order_number = rwd.order_number |
| | | LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = o.order_id |
| | | AND ogd.order_number = rwd.order_number |
| | | AND ogd.technology_number = rwd.technology_number |
| | | AND ogd.order_number = od.order_number |
| | | LEFT JOIN ( |
| | | SELECT |
| | | prod_id, |
| | | glass_sort, |
| | | REPLACE ( JSON_UNQUOTE( JSON_EXTRACT( separation, '$.thickness' )), 'mm', '' ) AS thickness |
| | | FROM |
| | | sd.product_detail |
| | | WHERE |
| | | detail_type = "glass" |
| | | ) AS pd ON pd.prod_id = od.product_id |
| | | AND pd.glass_sort = rwd.technology_number |
| | | where rw.reviewed_state=1 and rw.reporting_work_time between #{selectTime1} and #{selectTime2} |
| | | and rw.this_process=#{selectProcesses} |
| | | <if test="teamOutputDTO.thisProcess != null and teamOutputDTO.thisProcess != ''"> |
| | | and rw.this_process regexp #{teamOutputDTO.thisProcess} |
| | | </if> |
| | | <if test="teamOutputDTO.teamsGroupsName != null and teamOutputDTO.teamsGroupsName != ''"> |
| | | and rw.teams_groups_name regexp #{teamOutputDTO.teamsGroupsName} |
| | | </if> |
| | | <if test="teamOutputDTO.project != null and teamOutputDTO.project != ''"> |
| | | and o.project regexp #{teamOutputDTO.project} |
| | | </if> |
| | | <if test="teamOutputDTO.processId != null and teamOutputDTO.processId != ''"> |
| | | and rw.process_id regexp #{teamOutputDTO.processId} |
| | | </if> |
| | | <if test="teamOutputDTO.thickness != null and teamOutputDTO.thickness != ''"> |
| | | and thickness regexp #{teamOutputDTO.thickness} |
| | | </if> |
| | | <if test="teamOutputDTO.edgingType != null and teamOutputDTO.edgingType != ''"> |
| | | and od.edging_type regexp #{teamOutputDTO.edgingType} |
| | | </if> |
| | | |
| | | GROUP BY |
| | | rwd.order_number, |
| | | rw.this_process, |
| | | rw.teams_groups_name, |
| | | rw.process_id, |
| | | rw.reporting_work_id |
| | | ORDER BY |
| | | rw.this_process, |
| | | rw.reporting_work_time, |
| | | rw.teams_groups_name, |
| | | rw.process_id |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="teamOutputPageTotal"> |
| | | SELECT |
| | | CEILING(count(rw.reporting_work_id)/#{pageSize}) as 'pageTotal', |
| | | count(distinct rw.reporting_work_id) as 'total' |
| | | FROM |
| | | reporting_work AS rw |
| | | LEFT JOIN reporting_work_detail AS rwd ON rw.reporting_work_id = rwd.reporting_work_id |
| | | LEFT JOIN sd.`order` AS o ON o.order_id = rw.order_id |
| | | LEFT JOIN sd.order_detail AS od ON od.order_id = o.order_id |
| | | AND od.order_number = rwd.order_number |
| | | LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = o.order_id |
| | | AND ogd.order_number = rwd.order_number |
| | | AND ogd.technology_number = rwd.technology_number |
| | | AND ogd.order_number = od.order_number |
| | | LEFT JOIN ( |
| | | SELECT |
| | | prod_id, |
| | | glass_sort, |
| | | REPLACE ( JSON_UNQUOTE( JSON_EXTRACT( separation, '$.thickness' )), 'mm', '' ) AS thickness |
| | | FROM |
| | | sd.product_detail |
| | | WHERE |
| | | detail_type = "glass" |
| | | ) AS pd ON pd.prod_id = od.product_id |
| | | AND pd.glass_sort = rwd.technology_number |
| | | where rw.reviewed_state=1 and rw.reporting_work_time between #{selectTime1} and #{selectTime2} |
| | | and rw.this_process=#{selectProcesses} |
| | | <if test="teamOutputDTO.thisProcess != null and teamOutputDTO.thisProcess != ''"> |
| | | and rw.this_process regexp #{teamOutputDTO.thisProcess} |
| | | </if> |
| | | <if test="teamOutputDTO.teamsGroupsName != null and teamOutputDTO.teamsGroupsName != ''"> |
| | | and rw.teams_groups_name regexp #{teamOutputDTO.teamsGroupsName} |
| | | </if> |
| | | <if test="teamOutputDTO.project != null and teamOutputDTO.project != ''"> |
| | | and o.project regexp #{teamOutputDTO.project} |
| | | </if> |
| | | <if test="teamOutputDTO.processId != null and teamOutputDTO.processId != ''"> |
| | | and rw.process_id regexp #{teamOutputDTO.processId} |
| | | </if> |
| | | <if test="teamOutputDTO.thickness != null and teamOutputDTO.thickness != ''"> |
| | | and thickness regexp #{teamOutputDTO.thickness} |
| | | </if> |
| | | <if test="teamOutputDTO.edgingType != null and teamOutputDTO.edgingType != ''"> |
| | | and od.edging_type regexp #{teamOutputDTO.edgingType} |
| | | </if> |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | </mapper> |