| | |
| | | // {title: '操作', width: '220', slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'SalesOrderNumber', width: '150',title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'floorNumber', width: '120',title: '楼层编号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedProductNumber',width: '100', title: '成品编号', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'finishedProductName', width: '100',title: ' 成品名称', sortable: true}, |
| | | {field: 'finishedProductNumber',width: '100', title: '产品编号', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'productName',width: '100', title: '产品名称', sortable: true}, |
| | | {field: 'length', width: '100',title: '长度', sortable: true}, |
| | | {field: 'width',width: '100', title: '宽度', sortable: true}, |
| | | {field: 'salesperson', width: '100',title: '业务员', sortable: true}, |
| | | {field: 'customerName',width: '100', title: '客户名称', sortable: true}, |
| | | {field: 'projectName', width: '100',title: '项目名称', sortable: true}, |
| | | {field: 'orderNumber',width: '140', title: '订序', sortable: true}, |
| | | {field: 'totalOrders',width: '140', title: '订单总数', sortable: true}, |
| | |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | let router=useRouter() |
| | | let produceList = ref([]) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | const hasDecimal=(value)=>{ |
| | | const regex=/\./ // 定义正则表达式,查找小数点 |
| | | return regex.test(value) //返回true/false |
| | | } |
| | | |
| | | const hasDecimalhtml=(item,row)=>{ |
| | | let aa=item.split('.').length |
| | | if (aa===2){ |
| | | return row[item.split('.')[0]][item.split('.')[1]] |
| | | }else if(aa===3){ |
| | | return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]] |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | request.get("/FinishedGoodsInventory/getselet/1/100").then((res) => { |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | produceList = produceList.value.concat(deepClone(res.data)) |
| | | |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | |
| | | // { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | // {title: '操作', width: '220', slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'OrderNumber', width:'150', title: '订单序号', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'SalesOrderNumber', width: '150',title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'ProjectName', width: '120',title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'OrderType', width: '100',title: '订单类型', sortable: true}, |
| | | {field: 'ProcessCardNumber',width: '100', title: '流程卡号', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'ProductName', width: '100',title: '产品名称', sortable: true}, |
| | | {field: 'ProductNumber',width: '100', title: '产品编号', sortable: true}, |
| | | {field: 'CustomerNumber', width: '100',title: '客户编号', sortable: true}, |
| | | {field: 'CustomerName',width: '100', title: '客户名称', sortable: true}, |
| | | {field: 'Length', width: '100',title: '长度', sortable: true}, |
| | | {field: 'Width',width: '100', title: '宽度', sortable: true}, |
| | | {field: 'Thickness', width: '100',title: '厚度', sortable: true}, |
| | | {field: 'InventoryCount',width: '140', title: '库存数', sortable: true}, |
| | | {field: 'ActualSingleArea',width: '140', title: '实际单片面积', sortable: true}, |
| | | {field: 'Area',width: '100', title: '面积', sortable: true}, |
| | | {field: 'SettlementSingleArea',width: '140', title: '结算单片面积', sortable: true}, |
| | | {field: 'SettlementTotalArea',width: '140', title: '结算总面积', sortable: true}, |
| | | {field: 'AvailableQuantity',width: '100', title: '可用数量', sortable: true}, |
| | | {field: 'FloorNumber',width: '100', title: '楼层编号', sortable: true}, |
| | | {field: 'DeliveryAddress',width: '100', title: '送货地址', sortable: true}, |
| | | {field: 'Batch',width: '100', title: '批次', sortable: true}, |
| | | {field: 'Salesman',width: '100', title: '业务员', sortable: true}, |
| | | {field: 'OrdinaryMillimeter',width: '100', title: '平凡毫米', sortable: true}, |
| | | {field: 'Weight',width: '100', title: '重量', sortable: true}, |
| | | {field: 'LastWarehousingDate',width: '140', title: '最后入库日期', sortable: true}, |
| | | {field: 'LocationNumber',width: '100', title: '库位编号', sortable: true}, |
| | | {field: 'StorageArea',width: '100', title: '存储区域', sortable: true}, |
| | | {field: 'Location',width: '100', title: '库位', sortable: true}, |
| | | {field: 'DocumentStatus',width: '100', title: '单据状态', sortable: true}, |
| | | {field: 'remark',width: '80', title: '备注', sortable: true}, |
| | | {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: '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: 'actualSignalArea',width: '140', title: '实际单片面积', filters:[{ data: '' }]}, |
| | | {field: 'area',width: '100', title: '总面积', filters:[{ data: '' }]}, |
| | | |
| | | {field: 'warehouseNumber',width: '100', title: '仓库编号', filters:[{ data: '' }]}, |
| | | {field: 'storageRegion',width: '100', title: '库存区域', filters:[{ data: '' }]}, |
| | | {field: 'status',width: '100', title: '状态', filters:[{ data: '' }]}, |
| | | |
| | | {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: '' }]}, |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | "OrderNumber": "1", |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "OrderType": "普通订单", |
| | | "ProcessCardNumber": "NG23072003A01", |
| | | "ProductName": '', |
| | | "ProductNumber": "06040000022", |
| | | "CustomerNumber": "KD0071", |
| | | "CustomerName": "件", |
| | | "Length": "1075.00", |
| | | "Width": "440.00", |
| | | "Thickness": "3.00", |
| | | "InventoryCount": "360", |
| | | "ActualSingleArea": "0.473000", |
| | | "Area": "170.28", |
| | | "SettlementSingleArea": "0.47", |
| | | "SettlementTotalArea": "170.28", |
| | | "AvailableQuantity": "360", |
| | | "FloorNumber": "10927769", |
| | | "DeliveryAddress": "上海", |
| | | "Batch": "测试", |
| | | "OrdinaryMillimeter": "陈宗凯", |
| | | "Weight": "1915.6500", |
| | | "LastWarehousingDate": "2023-09-22 08:31:17", |
| | | "LocationNumber": "成品库", |
| | | "StorageArea": "测试", |
| | | "Location": "2", |
| | | "DocumentStatus": "1", |
| | | "Remarks": "测试", |
| | | }, |
| | | { |
| | | "OrderNumber": "1", |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "OrderType": "普通订单", |
| | | "ProcessCardNumber": "NG23072003A01", |
| | | "ProductName": '', |
| | | "ProductNumber": "06040000022", |
| | | "CustomerNumber": "KD0071", |
| | | "CustomerName": "件", |
| | | "Length": "1075.00", |
| | | "Width": "440.00", |
| | | "Thickness": "3.00", |
| | | "InventoryCount": "360", |
| | | "ActualSingleArea": "0.473000", |
| | | "Area": "170.28", |
| | | "SettlementSingleArea": "0.47", |
| | | "SettlementTotalArea": "170.28", |
| | | "AvailableQuantity": "360", |
| | | "FloorNumber": "10927769", |
| | | "DeliveryAddress": "上海", |
| | | "Batch": "测试", |
| | | "OrdinaryMillimeter": "陈宗凯", |
| | | "Weight": "1915.6500", |
| | | "LastWarehousingDate": "2023-09-22 08:31:17", |
| | | "LocationNumber": "成品库", |
| | | "StorageArea": "测试", |
| | | "Location": "2", |
| | | "DocumentStatus": "1", |
| | | "Remarks": "测试", |
| | | },{ |
| | | "OrderNumber": "1", |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "OrderType": "普通订单", |
| | | "ProcessCardNumber": "NG23072003A01", |
| | | "ProductName": '', |
| | | "ProductNumber": "06040000022", |
| | | "CustomerNumber": "KD0071", |
| | | "CustomerName": "件", |
| | | "Length": "1075.00", |
| | | "Width": "440.00", |
| | | "Thickness": "3.00", |
| | | "InventoryCount": "360", |
| | | "ActualSingleArea": "0.473000", |
| | | "Area": "170.28", |
| | | "SettlementSingleArea": "0.47", |
| | | "SettlementTotalArea": "170.28", |
| | | "AvailableQuantity": "360", |
| | | "FloorNumber": "10927769", |
| | | "DeliveryAddress": "上海", |
| | | "Batch": "测试", |
| | | "OrdinaryMillimeter": "陈宗凯", |
| | | "Weight": "1915.6500", |
| | | "LastWarehousingDate": "2023-09-22 08:31:17", |
| | | "LocationNumber": "成品库", |
| | | "StorageArea": "测试", |
| | | "Location": "2", |
| | | "DocumentStatus": "1", |
| | | "Remarks": "测试", |
| | | }, |
| | | ],//table body实际数据 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
New file |
| | |
| | | package com.example.erp.controller.mm; |
| | | |
| | | 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; |
| | | |
| | | @RestController |
| | | @RequestMapping("/FinishedGoodsInventory") |
| | | public class FinishedGoodsInventoryController { |
| | | @Autowired |
| | | FinishedGoodsInventoryService finishedGoodsInventoryService; |
| | | |
| | | @GetMapping("/getselet/{pageNum}/{pageSize}") |
| | | public Result defaultDateFinishedGoodsInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize){ |
| | | return Result.seccess(finishedGoodsInventoryService.defaultDateFinishedGoodsInventory(pageNum,pageSize)); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.example.erp.entity.sd.Customer; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.*; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private String orderId; |
| | | private Integer orderNumber; |
| | | private Order order; |
| | | private OrderDetail orderDetail; |
| | | private Integer inventory ; |
| | | private Double actualSignalArea; |
| | | private Double area; |
| | | private Integer quantityAvailable; |
| | | private String warehouseNumber; |
| | | private LocalDate storageRegion; |
| | | private String storageRegion; |
| | | private Integer status; |
| | | private LocalDate enterStorageTime; |
| | | private String remark; |
| | |
| | | |
| | | @Mapper |
| | | public interface FinishedGoodsInventoryMapper { |
| | | List<FinishedGoodsInventory> defaultProduct(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize); |
| | | List<FinishedGoodsInventory> defaultfinishedGoodsInventory(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize); |
| | | } |
New file |
| | |
| | | package com.example.erp.service.mm; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @DS("mm") |
| | | public class FinishedGoodsInventoryService { |
| | | @Autowired |
| | | FinishedGoodsInventoryMapper finishedGoodsInventoryMapper; |
| | | public List<FinishedGoodsInventory> defaultDateFinishedGoodsInventory(Integer pageNum, Integer pageSize) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | return finishedGoodsInventoryMapper.defaultfinishedGoodsInventory(offset,pageSize); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.example.erp.mapper.mm.FinishedGoodsInventoryMapper" > |
| | | |
| | | <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedGoodsInventory" > |
| | | <id column="id" property="id"/> |
| | | <result column="inventory" property="inventory"/> |
| | | <result column="area" property="area"/> |
| | | <result column="actual_signal_area" property="actualSignalArea"/> |
| | | <result column="quantity_available" property="quantityAvailable"/> |
| | | <result column="warehouse_number" property="warehouseNumber"/> |
| | | <result column="storage_region" property="storageRegion"/> |
| | | <result column="status" property="status"/> |
| | | <result column="enter_storage_time" property="enterStorageTime"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="end_time" property="endTime"/> |
| | | |
| | | |
| | | <result column="order_id" property="order.orderId"/> |
| | | <result column="project" property="order.project"/> |
| | | <result column="order_type" property="order.orderType"/> |
| | | |
| | | |
| | | <result column="order_number" property="orderDetail.orderNumber"/> |
| | | <result column="width" property="orderDetail.width"/> |
| | | <result column="height" property="orderDetail.height"/> |
| | | <result column="product_name" property="orderDetail.product.productName"/> |
| | | <result column="product_id" property="orderDetail.product.id"/> |
| | | |
| | | |
| | | |
| | | </resultMap> |
| | | <select id="defaultfinishedGoodsInventory" resultMap="selectFinishedGoodsInventory"> |
| | | select od.order_number, |
| | | o.order_id, |
| | | o.project, |
| | | o.order_type, |
| | | od.product_name, |
| | | od.product_id, |
| | | od.width, |
| | | od.height, |
| | | fgi.inventory, |
| | | fgi.quantity_available, |
| | | fgi.actual_signal_area, |
| | | fgi.area, |
| | | fgi.warehouse_number, |
| | | fgi.storage_region, |
| | | fgi.`status`, |
| | | fgi.update_time, |
| | | fgi.enter_storage_time, |
| | | fgi.end_time |
| | | 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 |
| | | |
| | | order by fgi.id |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.mm.FinishedOperateLogMapper"> |
| | | <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedOperateLog" > |
| | | <id column="id" property="id"/> |
| | | <result column="operation_order_number" property="operationOrderNumber"/> |
| | | <result column="product_number" property="productNumber"/> |
| | | <result column="operation_number" property="operationNumber"/> |
| | | <result column="operate_type" property="operateType"/> |
| | | <result column="operator" property="operator"/> |
| | | <result column="operate_time" property="operateTime"/> |
| | | |
| | | <!--<result column="g_typeId" property="glassTypes.typeId"/> |
| | | <result column="g_type" property="glassTypes.type"/>--> |
| | | |
| | | </resultMap> |
| | | <select id="defaultFinishedGoodsInventory" resultMap="selectFinishedGoodsInventory"> |
| | | select |
| | | a.id, |
| | | prodID, |
| | | product, |
| | | glassType, |
| | | typeName, |
| | | totalThickness, |
| | | thickness, |
| | | Query, |
| | | remarks, |
| | | state, |
| | | creator, |
| | | date(a.createTime) as 'createTime', |
| | | updateTime |
| | | from |
| | | product as a |
| | | left join basic_glass_type bgt on bgt.typeID = a.glassType |
| | | |
| | | order by id desc |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | </select> |
| | | </mapper> |