guoyuji
2024-01-22 b3f7434579733ff774e94120164e8da570cee9e0
修改部分界面
4个文件已修改
41 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/ProductService.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/Product.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
@@ -80,7 +80,7 @@
  }
  if(pageState!==null){
    gridOptions.loading=true
    request.post(`/product/${pageNum}/100`,filterData.value).then((res) => {
    request.post(`/product/${pageNum}/100/${productGlassTypeStore.GlassType}`,filterData.value).then((res) => {
      try{
        if(res.code==200){
          if(pageState){
@@ -106,11 +106,7 @@
  }
    //后端获取有多少页,超过多少页不再请求
    /*if(pageNum>5){
      console.log(newVal.pageNum)
      return
    }*/
})
request.post("/product/1/100/"+productGlassTypeStore.GlassType,filterData.value).then((res) => {
@@ -177,7 +173,7 @@
    showStatus: true
  },
  columns:[
    {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
    {type:'expand',fixed:"left",slots: { content:'content' },width: 60},
    {type: 'seq',fixed:"left", title: '自序', width: 80 },
    {title: '操作', width: 110, slots: { default: 'button_slot' },fixed:"left"},
    {field: 'id', title: '编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: false},
@@ -201,7 +197,7 @@
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
          return '页数:'
        }
        return ''
      })
north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
@@ -17,7 +17,7 @@
    @PostMapping  ("/{pageNum}/{pageSize}/{glassType}")
    public Result defaultDateProduct(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> glassType, @RequestBody Product product){
        return Result.seccess(productService.defaultDateProduct(pageNum,pageSize,glassType,product));
    }
}
north-glass-erp/src/main/java/com/example/erp/service/sd/ProductService.java
@@ -6,19 +6,25 @@
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("sd")
public class ProductService {
    @Autowired
    ProductMapper productMapper;
    public List<Product> defaultDateProduct(Integer pageNum,Integer pageSize,List<String> glassType,Product product) {
    public Map<String,Object> defaultDateProduct(Integer pageNum, Integer pageSize, List<String> glassType, Product product) {
        Integer offset = (pageNum-1)*pageSize;
        String glassTypeId = null;
        if(glassType.size()>1){
            glassTypeId = glassType.get(1);
        }
        return productMapper.defaultProduct(offset,pageSize,glassTypeId,product);
        Map<String,Object> map = new HashMap<>();
        map.put("list",productMapper.defaultProduct(offset,pageSize,glassTypeId,product));
        map.put("pageNum",pageNum);
        return map;
    }
}
north-glass-erp/src/main/resources/mapper/sd/Product.xml
@@ -33,7 +33,6 @@
    </resultMap>
    <select id="defaultProduct" resultMap="productmap">
<<<<<<< HEAD
        select a.id as id,
        a.product_name,
        a.total_thickness,
@@ -71,22 +70,6 @@
                and date(a.create_time) regexp #{product.createTime}
            </if>
        </where>
=======
        select a.id                as id,
               a.product,
               a.total_thickness,
               a.thickness,
               a.query,
               a.remarks,
               a.state,
               a.creator,
               date(a.create_time) as create_time,
               a.update_time       as update_time,
               bgt.type_id         as type_id,
               bgt.type            as type
        from product as a
                 left join glass_type bgt on bgt.type_id = a.type_id
>>>>>>> 2bf272a9d41a2b6c67910b23371af9537a9153a5
        order by id desc
        limit #{offset},#{pageSize}