Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | let filterData = ref({}) |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | printList: [], |
| | | landingSequence:null |
| | | }) |
| | | |
| | | let props = defineProps({ |
| | |
| | | lableType:null,//标签类型 |
| | | titleList:null,//标题 |
| | | switch:null,//判断是否为新打印, |
| | | lastList:[] |
| | | lastList:[], |
| | | landingSequence:null |
| | | }) |
| | | |
| | | const {currentRoute} = useRouter() |
| | |
| | | } |
| | | let lableType = props.lableType |
| | | let switchType = props.switch |
| | | let landingSequence = props.landingSequence |
| | | data.value.printList = JSON.parse(props.list) |
| | | data.value.landingSequence = props.landingSequence |
| | | onMounted(() => { |
| | | request.post(`/processCard/getSelectPrintCustomLabelDetails/${type}/${lableType}`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | type: null,//标签模板 |
| | | lableType: null,//标签类型 |
| | | titleList:null,//标题列表 |
| | | switch:null//判断是否为新打印 |
| | | switch:null,//判断是否为新打印 |
| | | landingSequence:null//标签落架顺序打印 |
| | | }) |
| | | |
| | | //室内室外面 |
| | |
| | | list:null,//勾选的数据 |
| | | faceOrientation:null,//内外面 |
| | | type:null,//标签模板 |
| | | lableType:null//标签类型 |
| | | lableType:null,//标签类型 |
| | | landingSequence:null |
| | | }) |
| | | |
| | | const printContentLabel = ref({ |
| | |
| | | let type = props.type |
| | | let lableTypes = props.lableType |
| | | data.value.printList = JSON.parse(props.list) |
| | | |
| | | let landingSequence = props.landingSequence |
| | | |
| | | const TgaStyleSet = ref([ |
| | | { |
| | |
| | | labelRow.value.type = type |
| | | labelRow.value.lableType = lableType.value |
| | | labelRow.value.switch=true |
| | | labelRow.value.landingSequence = landingSequence |
| | | |
| | | lastList.value = [] |
| | | if (lableTypes == 1) { |
| | | |
| | |
| | | :type="labelRow.type" |
| | | :titleList="labelRow.titleList" |
| | | :switch="labelRow.switch" |
| | | :landingSequence = "labelRow.landingSequence" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | |
| | |
| | | component: () => import('../views/pp/processCard/PrintProjectDetails.vue'), |
| | | }, |
| | | { |
| | | path: 'TagStyleDesigner', |
| | | name: 'TagStyleDesigner', |
| | | component: () => import('../components/pp/TagStyleDesigner.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/processCard/selectProcessCard' |
| | | } |
| | |
| | | |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import {ElCheckbox, ElDatePicker, ElMessage} from "element-plus" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {useRouter} from 'vue-router' |
| | | import {useI18n} from 'vue-i18n' |
| | |
| | | technologyNumber: null, |
| | | process: null |
| | | }) |
| | | |
| | | //落架顺序 |
| | | let landingSequence= ref(1) |
| | | //打印 |
| | | let printRow = ref({ |
| | | list: null, |
| | |
| | | faceOrientation: null,//内外面 |
| | | type: null,//标签模板 |
| | | lableType: null,//标签类型 |
| | | dataType: null//标签类型 |
| | | dataType: null, |
| | | landingSequence:null |
| | | }) |
| | | |
| | | |
| | |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | |
| | | labelRow.value.landingSequence = landingSequence |
| | | labelRow.value.list = JSON.stringify(selectRecords) |
| | | labelRow.value.faceOrientation = faceOrientation |
| | | labelRow.value.type = type |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function onlandingSequenceChange(checked) { |
| | | landingSequence.value = checked ? 0 : 1 |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-checkbox |
| | | :model-value="landingSequence === 0" |
| | | @change="onlandingSequenceChange" |
| | | > |
| | | {{ t('processCard.landingSequence') }} |
| | | </el-checkbox> |
| | | </div> |
| | | |
| | | <div class="main-table"> |
| | |
| | | :lableType="labelRow.lableType" |
| | | :list="labelRow.list" |
| | | :type="labelRow.type" |
| | | :landingSequence="labelRow.landingSequence" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | |
| | |
| | | |
| | | //获取七天前到当前时间 |
| | | 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()) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | const pad = (n) => n.toString().padStart(2, '0'); |
| | | |
| | | const formatDate = (date) => { |
| | | const year = date.getFullYear(); |
| | | const month = pad(date.getMonth() + 1); |
| | | const day = pad(date.getDate()); |
| | | return `${year}-${month}-${day} 08:00:00`; |
| | | }; |
| | | |
| | | const now = new Date(); |
| | | const startDate = new Date(now.getTime() - 3600 * 1000 * 24 * 3); // 三天前 |
| | | const start = formatDate(startDate); |
| | | const end = formatDate(now); |
| | | |
| | | return [start, end]; |
| | | } |
| | | |
| | | |
| | |
| | | let date = new Date(endTime); // 将日期字符串转为 Date 对象 |
| | | // 使用 setDate 方法加一天 |
| | | date.setDate(date.getDate() + 1); |
| | | let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串 |
| | | const pad = (n) => n.toString().padStart(2, '0'); |
| | | let year = date.getFullYear(); |
| | | let month = pad(date.getMonth() + 1); |
| | | let day = pad(date.getDate()); |
| | | let newEndTime = `${year}-${month}-${day} 08:00:00`; |
| | | //第一次加载数据 |
| | | request.post(`/report/teamOutput/1/${total.pageSize}/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value).then((res) => { |
| | | |
| | |
| | | //页脚翻页查询 |
| | | const selectPageList = () => { |
| | | gridOptions.loading = true |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = procseeValue.value |
| | | let date = new Date(endTime); // 将日期字符串转为 Date 对象 |
| | | // 使用 setDate 方法加一天 |
| | | date.setDate(date.getDate() + 1); |
| | | let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串 |
| | | const rawStart = new Date(form.date1[0]); |
| | | const rawEnd = new Date(form.date1[1]); |
| | | // 如果时间部分是 00:00,则设置为 08:00 |
| | | if (rawStart.getHours() === 8 || rawStart.getMinutes() === 0) { |
| | | rawStart.setHours(8, 0, 0, 0); |
| | | } |
| | | if (rawEnd.getHours() === 8 || rawEnd.getMinutes() === 0) { |
| | | rawEnd.setHours(8, 0, 0, 0); |
| | | } |
| | | const startTime = formatDateTime(rawStart); |
| | | const endPlusOne = new Date(rawEnd); |
| | | endPlusOne.setDate(endPlusOne.getDate() + 1); |
| | | const newEndTime = formatDateTime(endPlusOne); |
| | | const selectProcesses = procseeValue.value; |
| | | form.date1 = [startTime, newEndTime]; |
| | | request.post(`/report/teamOutput/${pageNum.value}/${total.pageSize}/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | const formatDateTime = (date) => { |
| | | const year = date.getFullYear(); |
| | | const month = pad(date.getMonth() + 1); |
| | | const day = pad(date.getDate()); |
| | | const hour = pad(date.getHours()); |
| | | const minute = pad(date.getMinutes()); |
| | | return `${year}-${month}-${day} ${hour}:${minute}:00`; |
| | | }; |
| | | |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | gridOptions.loading = true |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = procseeValue.value |
| | | let date = new Date(endTime); // 将日期字符串转为 Date 对象 |
| | | // 使用 setDate 方法加一天 |
| | | date.setDate(date.getDate() + 1); |
| | | let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串 |
| | | // 原始 form.date1 是日期对象数组 |
| | | const rawStart = new Date(form.date1[0]); |
| | | const rawEnd = new Date(form.date1[1]); |
| | | // 如果时间部分是 00:00,则设置为 08:00 |
| | | if (rawStart.getHours() === 8 || rawStart.getMinutes() === 0) { |
| | | rawStart.setHours(8, 0, 0, 0); |
| | | } |
| | | if (rawEnd.getHours() === 8 || rawEnd.getMinutes() === 0) { |
| | | rawEnd.setHours(8, 0, 0, 0); |
| | | } |
| | | const startTime = formatDateTime(rawStart); |
| | | const endPlusOne = new Date(rawEnd); |
| | | endPlusOne.setDate(endPlusOne.getDate() + 1); |
| | | const newEndTime = formatDateTime(endPlusOne); |
| | | const selectProcesses = procseeValue.value; |
| | | form.date1 = [startTime, newEndTime]; |
| | | request.post(`/report/teamOutput/${pageNum.value}/${total.pageSize}/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | |
| | | produceList.forEach(item => { |
| | | item.mmTotal = sumMmValues(item.workProcessName); |
| | | }); |
| | | console.log(produceList) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | |
| | | } |
| | | gridOptions.loading = true |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let date = new Date(endTime); // 将日期字符串转为 Date 对象 |
| | | // 使用 setDate 方法加一天 |
| | | date.setDate(date.getDate() + 1); |
| | | let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串 |
| | | const rawStart = new Date(form.date1[0]); |
| | | const rawEnd = new Date(form.date1[1]); |
| | | // 如果时间部分是 00:00,则设置为 08:00 |
| | | if (rawStart.getHours() === 8 || rawStart.getMinutes() === 0) { |
| | | rawStart.setHours(8, 0, 0, 0); |
| | | } |
| | | if (rawEnd.getHours() === 8 || rawEnd.getMinutes() === 0) { |
| | | rawEnd.setHours(8, 0, 0, 0); |
| | | } |
| | | const startTime = formatDateTime(rawStart); |
| | | const endPlusOne = new Date(rawEnd); |
| | | endPlusOne.setDate(endPlusOne.getDate() + 1); |
| | | const newEndTime = formatDateTime(endPlusOne); |
| | | form.date1 = [startTime, newEndTime]; |
| | | request.post(`/report/teamOutput/1/${total.pageSize}/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | |
| | | v-model="form.date1" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | format="YYYY/MM/DD" |
| | | style="width: 250px" |
| | | format="YYYY/MM/DD HH:mm" |
| | | style="width: 350px" |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD" |
| | | value-format="YYYY/MM/DD HH:mm" |
| | | /> |
| | | |
| | | <el-select v-model="procseeValue" clearable default-value="default_city" style="width: 120px"> |
| | |
| | | request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | total.dataTotal = res.data.total.total * 1 |
| | | total.pageTotal = res.data.total.pageTotal |
| | | pageTotal.value = res.data.total |
| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import cn.hutool.core.date.DateTime; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.dto.pp.*; |
| | |
| | | public Result teamOutput( |
| | | @PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable String selectTime1, |
| | | @PathVariable String selectTime2, |
| | | @PathVariable String selectProcesses, |
| | | @RequestBody TeamOutputDTO teamOutputDTO) { |
| | | return Result.seccess(reportService.teamOutputSv(pageNum, pageSize, selectTime1, selectTime2,selectProcesses, teamOutputDTO)); |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import com.example.erp.dto.pp.*; |
| | | import com.example.erp.entity.pp.Report; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | |
| | | List<YieldDTO> exportYieldMp(List<LocalDate> date, String process); |
| | | |
| | | List<TeamOutputDTO> teamOutputMp(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO); |
| | | List<TeamOutputDTO> teamOutputMp(Integer offset, Integer pageSize, String selectTime1, String selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO); |
| | | |
| | | Map<String, Integer> teamOutputPageTotal(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO); |
| | | Map<String, Integer> teamOutputPageTotal(Integer offset, Integer pageSize, String selectTime1, String selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO); |
| | | |
| | | List<Map<String, String>> workInProgressOrderMp(Integer offset, Integer pageSize, String orderId, String inputProject, String selectProcesses, WorkInProgressDTO workInProgressDTO); |
| | | |
| | |
| | | |
| | | Map<String,Float> damageReportFootSum(Date selectTime1, Date selectTime2, DamageReportDTO damageReportDTO); |
| | | |
| | | Map<String,Float> teamOutputFootSum(Date selectTime1, Date selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO); |
| | | Map<String,Float> teamOutputFootSum(String selectTime1, String selectTime2, String selectProcesses, String laminating, TeamOutputDTO teamOutputDTO); |
| | | |
| | | String getLaminating(String selectProcesses); |
| | | |
| | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.awt.*; |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | } |
| | | |
| | | public Map<String, Object> getSelectPrintCustomLabelDetailsSv(String type, Integer lableType, Map<String, Object> object) { |
| | | String landingSequence = ""; |
| | | if (object.get("landingSequence") != null) { |
| | | landingSequence = object.get("landingSequence").toString(); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (!"1".equals(landingSequence)) { |
| | | // 构造一个先按短边、再按长边的比较器 |
| | | Comparator<Map<String,Object>> comparator = Comparator |
| | | .comparingDouble((Map<String,Object> m) -> { |
| | | Map<String,Object> first = ((List<Map<String,Object>>)m.get("data")).get(0); |
| | | double w = ((Number) first.get("width")).doubleValue(); |
| | | double h = ((Number) first.get("height")).doubleValue(); |
| | | return Math.min(w, h); |
| | | }) |
| | | .thenComparingDouble(m -> { |
| | | Map<String,Object> first = ((List<Map<String,Object>>)m.get("data")).get(0); |
| | | double w = ((Number) first.get("width")).doubleValue(); |
| | | double h = ((Number) first.get("height")).doubleValue(); |
| | | return Math.max(w, h); |
| | | }); |
| | | |
| | | // 对整个 list 排序,并整体反转,短边大→前,短边相同时长边大→前 |
| | | list.sort(comparator.reversed()); |
| | | } |
| | | map.put("data", list); |
| | | map.put("title", flowCardMapper.getPrintTitle(type)); |
| | | return map; |
| | |
| | | return reportMapper.exportYieldMp(date,process); |
| | | } |
| | | |
| | | public Map<String, Object> teamOutputSv(Integer pageNum, Integer pageSize, Date selectTime1, Date selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO) { |
| | | public Map<String, Object> teamOutputSv(Integer pageNum, Integer pageSize, String selectTime1, String selectTime2, String selectProcesses, TeamOutputDTO teamOutputDTO) { |
| | | if (selectProcesses.equals("全部")){ |
| | | selectProcesses=""; |
| | | } |
| | |
| | | ogd.glass_address, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | fc.quantity, |
| | | sum(fc.quantity) as quantity, |
| | | ROUND(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area, |
| | | ifnull(fcs.sort, '') as sort, |
| | | ogd.glass_child, |
| | |
| | | reporting_work as rwk |
| | | on rw.reporting_work_id = rwk.reporting_work_id |
| | | where position(#{process} in rwk.this_process) |
| | | and rwk.this_process!='切割' |
| | | and rw.review_status >= 0 |
| | | GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c |
| | | on c.process_id = fc.process_id |
| | |
| | | on o.order_id = od.order_id |
| | | where o.create_order>0 |
| | | and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num != 0 and odpd.process!='切割' |
| | | odpd.broken_num != 0 and odpd.process!=SUBSTRING_INDEX(ogd.process, '->', 1) |
| | | and position(#{process} in odpd.process) |
| | | and position(ifnull(#{inputVal}, '') in od.order_id) |
| | | and position(ifnull(#{project}, '') in o.project) |
| | |
| | | pp.reporting_work as rwk |
| | | on rw.reporting_work_id = rwk.reporting_work_id |
| | | where position(#{selectProcesses} in rwk.this_process) |
| | | and rwk.this_process!='切割' |
| | | and rw.review_status >= 0 |
| | | GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c |
| | | on c.process_id = fc.process_id |
| | |
| | | on o.order_id = od.order_id |
| | | where o.create_order>0 |
| | | and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num != 0 and odpd.process!='切割' |
| | | odpd.broken_num != 0 and odpd.process!=SUBSTRING_INDEX(ogd.process, '->', 1) |
| | | and position(#{selectProcesses} in odpd.process) |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} in o.project) |
| | |
| | | reporting_work as rwk |
| | | on rw.reporting_work_id = rwk.reporting_work_id |
| | | where position(#{selectProcesses} in rwk.this_process) |
| | | and rwk.this_process!='切割' |
| | | and rw.review_status >= 0 |
| | | GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c |
| | | on c.process_id = fc.process_id |
| | |
| | | on o.order_id = od.order_id |
| | | where o.create_order>0 |
| | | and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num != 0 and odpd.process!='切割' |
| | | odpd.broken_num != 0 and odpd.process!=SUBSTRING_INDEX(ogd.process, '->', 1) |
| | | and position(#{selectProcesses} in odpd.process) |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} in o.project) |
| | |
| | | reporting_work as rwk |
| | | on rw.reporting_work_id = rwk.reporting_work_id |
| | | where position(#{selectProcesses} in rwk.this_process) |
| | | and rwk.this_process!='切割' |
| | | and rw.review_status >= 0 |
| | | GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c |
| | | on c.process_id = fc.process_id |
| | |
| | | on o.order_id = od.order_id |
| | | where o.create_order>0 |
| | | and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num != 0 and odpd.process!='切割' |
| | | odpd.broken_num != 0 and odpd.process!=SUBSTRING_INDEX(ogd.process, '->', 1) |
| | | and position(#{selectProcesses} in odpd.process) |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} in o.project) |