| | |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import footSum from "@/hook/footSum"; |
| | |
| | | } |
| | | }) |
| | | |
| | | 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 |
| | | } |
| | | request.post(`/Replenish/getSelectReplenish/${pageNum}/100`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | produceList = deepClone(res.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | //子组件接收参数 |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | //remote: true |
| | | remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {field: 'select',type:'checkbox',title: t('basicData.check'), width: 80,fixed:"left"}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | {field: 'reportingWorkTime', width: 120, title: t('reportingWorks.reportingWorkTime'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'orderId', width: 120, title: t('order.orderId'), showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'processId', width: 140, title: t('processCard.processId'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'project', width: 120, title: t('order.project'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'batch', width: 80, title: t('order.batch'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, showOverflow: "ellipsis",filterMethod:filterChanged}, |
| | | {field: 'orderSort', width: 100, title: t('order.OrderNum'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'technologyNumber', width: 80, title: t('replenish.mark'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, showOverflow: "ellipsis",filterMethod:filterChanged}, |
| | | {field: 'responsibleProcess', width: 120, title: t('reportingWorks.responsibleProcess'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'patchProcesses', width: 120, title: t('reportingWorks.reportingProcess'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'patchType', width: 120, title: t('reportingWorks.breakageType'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'reportingWorkTime', width: 120, title: t('reportingWorks.reportingWorkTime'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'orderId', width: 120, title: t('order.orderId'), showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'processId', width: 140, title: t('processCard.processId'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'project', width: 120, title: t('order.project'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | | {field: 'batch', width: 80, title: t('order.batch'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, showOverflow: "ellipsis"}, |
| | | {field: 'orderSort', width: 100, title: t('order.OrderNum'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'technologyNumber', width: 80, title: t('replenish.mark'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, showOverflow: "ellipsis"}, |
| | | {field: 'responsibleProcess', width: 120, title: t('reportingWorks.responsibleProcess'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'patchProcesses', width: 120, title: t('reportingWorks.reportingProcess'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'patchType', width: 120, title: t('reportingWorks.breakageType'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'patchReason', width: 120, title: t('reportingWorks.breakageReason'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'glassAddress', width: 120, title: t('replenish.sliceMarking'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'patchNum', width: 120, title: t('order.quantity'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'width', width: 80, title: t('order.width'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'height', width: 80, title: t('order.height'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'shape', width: 100, title: t('order.shape'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'responsibleEquipment', width: 120, title: t('reportingWorks.responsibleEquipment'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'responsibleTeam', width: 120, title: t('reportingWorks.responsibleTeam'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'qualityInspector', width: 120, title: t('reportingWorks.qualityInspector'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'productName', width: 120, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'reportingWorkId', width: 120, title: t('reportingWorks.reportingWorkId'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'glassAddress', width: 120, title: t('replenish.sliceMarking'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'patchNum', width: 120, title: t('order.quantity'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'width', width: 80, title: t('order.width'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'height', width: 80, title: t('order.height'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'shape', width: 100, title: t('order.shape'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'responsibleEquipment', width: 120, title: t('reportingWorks.responsibleEquipment'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'responsibleTeam', width: 120, title: t('reportingWorks.responsibleTeam'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'qualityInspector', width: 120, title: t('reportingWorks.qualityInspector'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'productName', width: 120, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'reportingWorkId', width: 120, title: t('reportingWorks.reportingWorkId'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | |
| | | ],//表头按钮 |
| | | |
| | |
| | | <div class="main-div-customer"> |
| | | |
| | | <vxe-grid |
| | | @filter-change="filterChanged" |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.dto.pp.PatchLogAddDTO; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.PatchLog; |
| | | import com.example.erp.entity.pp.Rework; |
| | |
| | | @ApiOperation("补片新增查询接口") |
| | | @SaCheckPermission("AddReplenish.search") |
| | | @PostMapping("/getSelectReplenish/{pageNum}/{pageSize}") |
| | | public Result getSelectReplenish(@PathVariable Integer pageNum, @PathVariable Integer pageSize){ |
| | | return Result.seccess(replenishService.getSelectReplenish(pageNum,pageSize)); |
| | | public Result getSelectReplenish(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@RequestBody PatchLogAddDTO patchLogAddDTO){ |
| | | return Result.seccess(replenishService.getSelectReplenish(pageNum,pageSize,patchLogAddDTO)); |
| | | } |
| | | |
| | | @ApiOperation("补片查询接口") |
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.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class PatchLogAddDTO { |
| | | private String orderId; |
| | | private LocalDate reportingWorkTime; |
| | | private String reportingWorkId; |
| | | private String productionId; |
| | | private String processId; |
| | | private String project; |
| | | private String batch; |
| | | private Long reviewer; |
| | | private String buildingNumber; |
| | | private Integer orderSort; |
| | | private String productName; |
| | | private Integer technologyNumber; |
| | | private String glassAddress; |
| | | private Integer patchNum; |
| | | private Double width; |
| | | private Double height; |
| | | private String shape; |
| | | private String responsibleProcess; |
| | | private String patchProcesses; |
| | | private Integer breakageQuantity; |
| | | private String patchReason; |
| | | private String patchType; |
| | | private String responsiblePersonnel; |
| | | private String responsibleEquipment; |
| | | private String responsibleTeam; |
| | | private String patchArea; |
| | | private String qualityInspector; |
| | | |
| | | |
| | | } |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | import com.example.erp.dto.pp.PatchLogAddDTO; |
| | | import com.example.erp.entity.pp.PatchLog; |
| | | import com.example.erp.entity.pp.ReportingWork; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | |
| | | |
| | | Boolean updateOrderProcessDetail(@Param("patchLog") PatchLog patchLog,@Param("reportingWork") ReportingWork reportingWork ); |
| | | |
| | | List<Map<String,Object>> getSelectReplenish(@Param("offset") Integer offset, @Param("pageSize") Integer pageSiz); |
| | | List<PatchLogAddDTO> getSelectReplenish(@Param("offset") Integer offset, @Param("pageSize") Integer pageSiz,@Param("patchLogAddDTO") PatchLogAddDTO patchLogAddDTO); |
| | | |
| | | |
| | | Boolean deleteReplenishMp(String patchId); |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.example.erp.dto.pp.PatchLogAddDTO; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.PatchLog; |
| | | import com.example.erp.entity.pp.ReportingWork; |
| | |
| | | } |
| | | |
| | | |
| | | public List<Map<String, Object>> getSelectReplenish(Integer pageNum, Integer pageSize) { |
| | | public List<PatchLogAddDTO> getSelectReplenish(Integer pageNum, Integer pageSize,PatchLogAddDTO patchLogAddDTO) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | return patchMapper.getSelectReplenish(offset,pageSize); |
| | | return patchMapper.getSelectReplenish(offset,pageSize,patchLogAddDTO); |
| | | |
| | | } |
| | | |
| | |
| | | left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd |
| | | on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number |
| | | |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.quality_ins_status!=1)) and rw.reviewed_state!=-1 |
| | | and o.create_order>0 |
| | | <where> dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.quality_ins_status!=1)) and rw.reviewed_state!=-1 |
| | | and o.create_order>0 |
| | | <if test="patchLogAddDTO.orderId != null and patchLogAddDTO.orderId != ''"> |
| | | and o.order_id regexp #{patchLogAddDTO.orderId} |
| | | </if> |
| | | <if test="patchLogAddDTO.reportingWorkId != null and patchLogAddDTO.reportingWorkId != ''"> |
| | | and dd.reporting_work_id regexp #{patchLogAddDTO.reportingWorkId} |
| | | </if> |
| | | <if test="patchLogAddDTO.productionId != null and patchLogAddDTO.productionId != ''"> |
| | | and rw.process_id regexp #{patchLogAddDTO.productionId} |
| | | </if> |
| | | <if test="patchLogAddDTO.processId != null and patchLogAddDTO.processId != ''"> |
| | | and o.order_id regexp #{patchLogAddDTO.processId} |
| | | </if> |
| | | <if test="patchLogAddDTO.project != null and patchLogAddDTO.project != ''"> |
| | | and o.project regexp #{patchLogAddDTO.project} |
| | | </if> |
| | | <if test="patchLogAddDTO.batch != null and patchLogAddDTO.batch != ''"> |
| | | and o.batch regexp #{patchLogAddDTO.batch} |
| | | </if> |
| | | <if test="patchLogAddDTO.orderSort != null and patchLogAddDTO.orderSort != ''"> |
| | | and dd.order_number regexp #{patchLogAddDTO.orderSort} |
| | | </if> |
| | | <if test="patchLogAddDTO.productName != null and patchLogAddDTO.productName != ''"> |
| | | and od.product_name regexp #{patchLogAddDTO.productName} |
| | | </if> |
| | | <if test="patchLogAddDTO.technologyNumber != null and patchLogAddDTO.technologyNumber != ''"> |
| | | and dd.technology_number regexp #{patchLogAddDTO.technologyNumber} |
| | | </if> |
| | | <if test="patchLogAddDTO.qualityInspector != null and patchLogAddDTO.qualityInspector != ''"> |
| | | and rw.quality_inspector regexp #{patchLogAddDTO.qualityInspector} |
| | | </if> |
| | | <if test="patchLogAddDTO.width != null and patchLogAddDTO.width != ''"> |
| | | and od.width regexp #{patchLogAddDTO.width} |
| | | </if> |
| | | <if test="patchLogAddDTO.height != null and patchLogAddDTO.height != ''"> |
| | | and od.height regexp #{patchLogAddDTO.height} |
| | | </if> |
| | | <if test="patchLogAddDTO.shape != null and patchLogAddDTO.shape != ''"> |
| | | and od.shape regexp #{patchLogAddDTO.shape} |
| | | </if> |
| | | <if test="patchLogAddDTO.glassAddress != null and patchLogAddDTO.glassAddress != ''"> |
| | | and ogd.glass_address regexp #{patchLogAddDTO.glassAddress} |
| | | </if> |
| | | <if test="patchLogAddDTO.responsibleTeam != null and patchLogAddDTO.responsibleTeam != ''"> |
| | | and dd.responsible_team regexp #{patchLogAddDTO.responsibleTeam} |
| | | </if> |
| | | <if test="patchLogAddDTO.responsibleEquipment != null and patchLogAddDTO.responsibleEquipment != ''"> |
| | | and dd.responsible_equipment regexp #{patchLogAddDTO.responsibleEquipment} |
| | | </if> |
| | | <if test="patchLogAddDTO.responsibleProcess != null and patchLogAddDTO.responsibleProcess != ''"> |
| | | and dd.responsible_process regexp #{patchLogAddDTO.responsibleProcess} |
| | | </if> |
| | | <if test="patchLogAddDTO.patchProcesses != null and patchLogAddDTO.patchProcesses != ''"> |
| | | and rw.this_process regexp #{patchLogAddDTO.patchProcesses} |
| | | </if> |
| | | <if test="patchLogAddDTO.patchType != null and patchLogAddDTO.patchType != ''"> |
| | | and dd.breakage_type regexp #{patchLogAddDTO.patchType} |
| | | </if> |
| | | <if test="patchLogAddDTO.patchReason != null and patchLogAddDTO.patchReason != ''"> |
| | | and dd.breakage_reason regexp #{patchLogAddDTO.patchReason} |
| | | </if> |
| | | </where> |
| | | order by dd.id desc |
| | | </select> |
| | | |