Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | } |
| | | |
| | | |
| | | request.get("/FinishedGoodsInventory/getselet/1/100").then((res) => { |
| | | |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | orderDetail:{ |
| | | orderNumber:'', |
| | | productName:'', |
| | | productId:'', |
| | | width:'', |
| | | height:'' |
| | | }, |
| | | order:{ |
| | | orderId:'', |
| | | orderType:'', |
| | | project:'' |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getselet/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | produceList = produceList.value.concat(deepClone(res.data)) |
| | | |
| | | xGrid.value.reloadData(produceList) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | let pageState = null |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | 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("/FinishedGoodsInventory/getselet/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '50'}, |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '60'}, |
| | | // { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | // {title: '操作', width: '220', slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'orderDetail.orderNumber', width:'150', title: '订单序号', filters:[{ data: '' }],editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'order.orderId', width: '150',title: '销售单号',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.project', width: '120',title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.orderType', width: '100',title: '订单类型', filters:[{ data: '' }]}, |
| | | {field: 'orderDetail.product.productName', width: '100',title: '产品名称', filters:[{ data: '' }]}, |
| | | {field: 'orderDetail.product.id',width: '100', title: '产品编号', filters:[{ data: '' }]}, |
| | | {field: 'order.orderType', width: '100',title: '订单类型', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.product.productName', width: '100',title: '产品名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.product.id',width: '100', title: '产品编号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | |
| | | {field: 'orderDetail.width', width: '100',title: '宽度',filters:[{ data: '' }]}, |
| | | {field: 'orderDetail.height',width: '100', title: '高度', filters:[{ data: '' }]}, |
| | | {field: 'inventory',width: '140', title: '库存数量', filters:[{ data: '' }]}, |
| | | {field: 'quantityAvailable',width: '140', title: '可用数量', filters:[{ data: '' }]}, |
| | | {field: 'orderDetail.width', width: '100',title: '宽度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.height',width: '100', title: '高度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'inventory',width: '140', title: '库存数量', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'quantityAvailable',width: '140', title: '可用数量', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | |
| | | {field: 'actualSignalArea',width: '140', title: '实际单片面积', filters:[{ data: '' }]}, |
| | | {field: 'area',width: '100', title: '总面积', filters:[{ data: '' }]}, |
| | | {field: 'actualSignalArea',width: '140', title: '实际单片面积', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'area',width: '100', title: '总面积', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | |
| | | {field: 'warehouseNumber',width: '100', title: '仓库编号', filters:[{ data: '' }]}, |
| | | {field: 'storageRegion',width: '100', title: '库存区域', filters:[{ data: '' }]}, |
| | | {field: 'status',width: '100', title: '状态', filters:[{ data: '' }]}, |
| | | {field: 'warehouseNumber',width: '100', title: '仓库编号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'storageRegion',width: '100', title: '库存区域', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'status',width: '100', title: '状态', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | |
| | | {field: 'enterStorageTime',width: '140', title: '入库时间', filters:[{ data: '' }]}, |
| | | {field: 'updateTime',width: '140', title: '修改时间', filters:[{ data: '' }]}, |
| | | {field: 'endTime',width: '100', title: '出库时间', filters:[{ data: '' }]}, |
| | | {field: 'remark',width: '80', title: '备注', filters:[{ data: '' }]}, |
| | | {field: 'enterStorageTime',width: '140', title: '入库时间', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'updateTime',width: '140', title: '修改时间', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'endTime',width: '100', title: '出库时间', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'remark',width: '80', title: '备注', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | |
| | | return '' |
| | | }) |
| | | ] |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.service.mm.FinishedGoodsInventoryService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | |
| | | @RestController |
| | | @RequestMapping("/FinishedGoodsInventory") |
| | |
| | | @Autowired |
| | | FinishedGoodsInventoryService finishedGoodsInventoryService; |
| | | |
| | | @GetMapping("/getselet/{pageNum}/{pageSize}") |
| | | public Result defaultDateFinishedGoodsInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize){ |
| | | return Result.seccess(finishedGoodsInventoryService.defaultDateFinishedGoodsInventory(pageNum,pageSize)); |
| | | @PostMapping("/getselet/{pageNum}/{pageSize}") |
| | | public Result defaultDateFinishedGoodsInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedGoodsInventory finishedGoodsInventory){ |
| | | System.out.println(finishedGoodsInventory); |
| | | return Result.seccess(finishedGoodsInventoryService.defaultDateFinishedGoodsInventory(pageNum,pageSize,finishedGoodsInventory)); |
| | | } |
| | | } |
| | |
| | | package com.example.erp.mapper.mm; |
| | | |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.sd.Product; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | |
| | | @Mapper |
| | | public interface FinishedGoodsInventoryMapper { |
| | | List<FinishedGoodsInventory> defaultfinishedGoodsInventory(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize); |
| | | List<FinishedGoodsInventory> defaultfinishedGoods(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("finishedGoodsInventory") FinishedGoodsInventory finishedGoodsInventory); |
| | | |
| | | Integer getPageTotal(Integer offset, Integer pageSize,FinishedGoodsInventory finishedGoodsInventory); |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @DS("mm") |
| | | public class FinishedGoodsInventoryService { |
| | | @Autowired |
| | | FinishedGoodsInventoryMapper finishedGoodsInventoryMapper; |
| | | public List<FinishedGoodsInventory> defaultDateFinishedGoodsInventory(Integer pageNum, Integer pageSize) { |
| | | public Map<String,Object> defaultDateFinishedGoodsInventory(Integer pageNum, Integer pageSize,FinishedGoodsInventory finishedGoodsInventory) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | return finishedGoodsInventoryMapper.defaultfinishedGoodsInventory(offset,pageSize); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",finishedGoodsInventoryMapper.defaultfinishedGoods(offset,pageSize,finishedGoodsInventory)); |
| | | map.put("total",finishedGoodsInventoryMapper.getPageTotal(offset,pageSize,finishedGoodsInventory)); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | </resultMap> |
| | | <select id="defaultfinishedGoodsInventory" resultMap="selectFinishedGoodsInventory"> |
| | | <select id="defaultfinishedGoods" resultMap="selectFinishedGoodsInventory"> |
| | | select od.order_number, |
| | | o.order_id, |
| | | o.project, |
| | |
| | | fgi.`status`, |
| | | fgi.update_time, |
| | | fgi.enter_storage_time, |
| | | fgi.end_time |
| | | fgi.end_time, |
| | | fgi.remark |
| | | from finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_number = od.order_number |
| | | inner join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedGoodsInventory.orderDetail.width} |
| | | </if> |
| | | <if test="finishedGoodsInventory.orderDetail.orderNumber != null and finishedGoodsInventory.orderDetail.orderNumber != ''"> |
| | | and od.order_number regexp #{finishedGoodsInventory.orderDetail.orderNumber} |
| | | </if> |
| | | <if test="finishedGoodsInventory.order.orderId != null and finishedGoodsInventory.order.orderId != ''"> |
| | | and o.order_id regexp #{finishedGoodsInventory.order.orderId} |
| | | </if> |
| | | <if test="finishedGoodsInventory.order.project != null and finishedGoodsInventory.order.project != ''"> |
| | | and o.project regexp #{finishedGoodsInventory.order.project} |
| | | </if> |
| | | <if test="finishedGoodsInventory.order.orderType != null and finishedGoodsInventory.order.orderType != ''"> |
| | | and o.order_type regexp #{finishedGoodsInventory.order.orderType} |
| | | </if> |
| | | <if test="finishedGoodsInventory.orderDetail.height != null and finishedGoodsInventory.orderDetail.height != ''"> |
| | | and od.height regexp #{finishedGoodsInventory.orderDetail.height} |
| | | </if> |
| | | <if test="finishedGoodsInventory.inventory != null and finishedGoodsInventory.inventory != ''"> |
| | | and fgi.inventory regexp #{finishedGoodsInventory.inventory} |
| | | </if> |
| | | <if test="finishedGoodsInventory.quantityAvailable != null and finishedGoodsInventory.quantityAvailable != ''"> |
| | | and fgi.quantity_available regexp #{finishedGoodsInventory.quantityAvailable} |
| | | </if> |
| | | <if test="finishedGoodsInventory.actualSignalArea != null and finishedGoodsInventory.actualSignalArea != ''"> |
| | | and fgi.actual_signal_area regexp #{finishedGoodsInventory.actualSignalArea} |
| | | </if> |
| | | <if test="finishedGoodsInventory.area != null and finishedGoodsInventory.area != ''"> |
| | | and fgi.area regexp #{finishedGoodsInventory.area} |
| | | </if> |
| | | <if test="finishedGoodsInventory.warehouseNumber != null and finishedGoodsInventory.warehouseNumber != ''"> |
| | | and fgi.warehouse_number regexp #{finishedGoodsInventory.warehouseNumber} |
| | | </if> |
| | | <if test="finishedGoodsInventory.storageRegion != null and finishedGoodsInventory.storageRegion != ''"> |
| | | and fgi.storage_region regexp #{finishedGoodsInventory.storageRegion} |
| | | </if> |
| | | <if test="finishedGoodsInventory.status != null and finishedGoodsInventory.status != ''"> |
| | | and fgi.`status` regexp #{finishedGoodsInventory.status} |
| | | </if> |
| | | <if test="finishedGoodsInventory.enterStorageTime != null and finishedGoodsInventory.enterStorageTime != ''"> |
| | | and fgi.enter_storage_time regexp #{finishedGoodsInventory.enterStorageTime} |
| | | </if> |
| | | <if test="finishedGoodsInventory.updateTime != null and finishedGoodsInventory.updateTime != ''"> |
| | | and fgi.update_time regexp #{finishedGoodsInventory.updateTime} |
| | | </if> |
| | | <if test="finishedGoodsInventory.endTime != null and finishedGoodsInventory.endTime != ''"> |
| | | and fgi.end_time regexp #{finishedGoodsInventory.endTime} |
| | | </if> |
| | | <if test="finishedGoodsInventory.remark != null and finishedGoodsInventory.remark != ''"> |
| | | and fgi.remark regexp #{finishedGoodsInventory.remark} |
| | | </if> |
| | | |
| | | </where> |
| | | order by fgi.id |
| | | |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | |
| | | <select id="getPageTotal" > |
| | | select |
| | | CEILING(count(fgi.id)/#{pageSize}) |
| | | from finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_number = od.order_number |
| | | inner join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedGoodsInventory.orderDetail.width} |
| | | </if> |
| | | <if test="finishedGoodsInventory.orderDetail.orderNumber != null and finishedGoodsInventory.orderDetail.orderNumber != ''"> |
| | | and od.order_number regexp #{finishedGoodsInventory.orderDetail.orderNumber} |
| | | </if> |
| | | <if test="finishedGoodsInventory.order.orderId != null and finishedGoodsInventory.order.orderId != ''"> |
| | | and o.order_id regexp #{finishedGoodsInventory.order.orderId} |
| | | </if> |
| | | <if test="finishedGoodsInventory.order.project != null and finishedGoodsInventory.order.project != ''"> |
| | | and o.project regexp #{finishedGoodsInventory.order.project} |
| | | </if> |
| | | <if test="finishedGoodsInventory.order.orderType != null and finishedGoodsInventory.order.orderType != ''"> |
| | | and o.order_type regexp #{finishedGoodsInventory.order.orderType} |
| | | </if> |
| | | <if test="finishedGoodsInventory.orderDetail.height != null and finishedGoodsInventory.orderDetail.height != ''"> |
| | | and od.height regexp #{finishedGoodsInventory.orderDetail.height} |
| | | </if> |
| | | <if test="finishedGoodsInventory.inventory != null and finishedGoodsInventory.inventory != ''"> |
| | | and fgi.inventory regexp #{finishedGoodsInventory.inventory} |
| | | </if> |
| | | <if test="finishedGoodsInventory.quantityAvailable != null and finishedGoodsInventory.quantityAvailable != ''"> |
| | | and fgi.quantity_available regexp #{finishedGoodsInventory.quantityAvailable} |
| | | </if> |
| | | <if test="finishedGoodsInventory.actualSignalArea != null and finishedGoodsInventory.actualSignalArea != ''"> |
| | | and fgi.actual_signal_area regexp #{finishedGoodsInventory.actualSignalArea} |
| | | </if> |
| | | <if test="finishedGoodsInventory.area != null and finishedGoodsInventory.area != ''"> |
| | | and fgi.area regexp #{finishedGoodsInventory.area} |
| | | </if> |
| | | <if test="finishedGoodsInventory.warehouseNumber != null and finishedGoodsInventory.warehouseNumber != ''"> |
| | | and fgi.warehouse_number regexp #{finishedGoodsInventory.warehouseNumber} |
| | | </if> |
| | | <if test="finishedGoodsInventory.storageRegion != null and finishedGoodsInventory.storageRegion != ''"> |
| | | and fgi.storage_region regexp #{finishedGoodsInventory.storageRegion} |
| | | </if> |
| | | <if test="finishedGoodsInventory.status != null and finishedGoodsInventory.status != ''"> |
| | | and fgi.`status` regexp #{finishedGoodsInventory.status} |
| | | </if> |
| | | <if test="finishedGoodsInventory.enterStorageTime != null and finishedGoodsInventory.enterStorageTime != ''"> |
| | | and fgi.enter_storage_time regexp #{finishedGoodsInventory.enterStorageTime} |
| | | </if> |
| | | <if test="finishedGoodsInventory.updateTime != null and finishedGoodsInventory.updateTime != ''"> |
| | | and fgi.update_time regexp #{finishedGoodsInventory.updateTime} |
| | | </if> |
| | | <if test="finishedGoodsInventory.endTime != null and finishedGoodsInventory.endTime != ''"> |
| | | and fgi.end_time regexp #{finishedGoodsInventory.endTime} |
| | | </if> |
| | | <if test="finishedGoodsInventory.remark != null and finishedGoodsInventory.remark != ''"> |
| | | and fgi.remark regexp #{finishedGoodsInventory.remark} |
| | | </if> |
| | | |
| | | </where> |
| | | |
| | | order by fgi.id desc |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | |
| | | </resultMap> |
| | | <select id="defaultfinishedGoodsInventory" resultMap="selectFinishedGoodsInventory"> |
| | | <select id="defaultfinishedGoods" resultMap="selectFinishedGoodsInventory"> |
| | | select od.order_number, |
| | | o.order_id, |
| | | o.project, |
| | |
| | | from finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_number = od.order_number |
| | | inner join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedGoodsInventory.orderDetail.width} |
| | | </if> |
| | | |
| | | </where> |
| | | order by fgi.id |
| | | |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | |
| | | <select id="getPageTotal" > |
| | | select |
| | | CEILING(count(fgi.id)/#{pageSize}) |
| | | from finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_number = od.order_number |
| | | inner join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedGoodsInventory.orderDetail.width} |
| | | </if> |
| | | |
| | | </where> |
| | | |
| | | order by fgi.id desc |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | </mapper> |