| | |
| | | } |
| | | 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){ |
| | |
| | | } |
| | | |
| | | |
| | | //后端获取有多少页,超过多少页不再请求 |
| | | /*if(pageNum>5){ |
| | | console.log(newVal.pageNum) |
| | | return |
| | | }*/ |
| | | |
| | | |
| | | }) |
| | | request.post("/product/1/100/"+productGlassTypeStore.GlassType,filterData.value).then((res) => { |
| | |
| | | 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}, |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return '页数:' |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | </resultMap> |
| | | |
| | | <select id="defaultProduct" resultMap="productmap"> |
| | | <<<<<<< HEAD |
| | | select a.id as id, |
| | | a.product_name, |
| | | a.total_thickness, |
| | |
| | | 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} |