| | |
| | | return R.ok("成功同步"+listener.getTotal()+"条商品数据"); |
| | | } |
| | | |
| | | /*************************************** xm-select ***********************************************/ |
| | | |
| | | // xm-select 搜索商品列表 |
| | | @RequestMapping("/mat/all/get/kv") |
| | | @ManagerAuth |
| | | public R getMatDataKV(@RequestParam(required = false) String condition) { |
| | | LambdaQueryWrapper<Mat> wrapper = new LambdaQueryWrapper<Mat>() |
| | | .like(Mat::getMatnr, condition).or().like(Mat::getMaktx, condition) |
| | | .orderByAsc(Mat::getCreateTime); |
| | | List<Mat> mats = matService.page(new Page<>(1, 30), wrapper).getRecords(); |
| | | List<KeyValueVo> valueVos = new ArrayList<>(); |
| | | for (Mat mat : mats) { |
| | | KeyValueVo vo = new KeyValueVo(); |
| | | vo.setName(mat.getMatnr() + " - " + mat.getMaktx()); |
| | | vo.setValue(mat.getId()); |
| | | valueVos.add(vo); |
| | | } |
| | | return R.ok().add(valueVos); |
| | | } |
| | | |
| | | } |
| | |
| | | // 商品分类数据 |
| | | var insTb = treeTable.render({ |
| | | elem: '#tag', |
| | | url: baseUrl+'/manTag/page/auth', |
| | | url: baseUrl+'/tag/page/auth', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | tree: { |
| | | iconIndex: 2, // 折叠图标显示在第几列 |
| | |
| | | window.loadTree = function(condition){ |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/manTag/tree/auth", |
| | | url: baseUrl+"/tag/tree/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | 'condition': condition |