| | |
| | | // } |
| | | // } |
| | | |
| | | public static void saveFile(MultipartFile file, String savePath) throws IOException { |
| | | // 创建保存文件的目录(如果不存在) |
| | | File directory = new File(savePath); |
| | | if (!directory.exists()) { |
| | | directory.mkdirs(); |
| | | } |
| | | |
| | | // 保存文件 |
| | | String fileName = file.getOriginalFilename(); |
| | | String filePath = savePath + fileName; |
| | | File dest = new File(filePath); |
| | | file.transferTo(dest); |
| | | } |
| | | // public static void saveFile(MultipartFile file, String savePath) throws IOException { |
| | | // // 创建保存文件的目录(如果不存在) |
| | | // File directory = new File(savePath); |
| | | // if (!directory.exists()) { |
| | | // directory.mkdirs(); |
| | | // } |
| | | // |
| | | // // 保存文件 |
| | | // String fileName = file.getOriginalFilename(); |
| | | // String filePath = savePath + fileName; |
| | | // File dest = new File(filePath); |
| | | // file.transferTo(dest); |
| | | // } |
| | | |
| | | public static void deleteFilesInDirectory(String directoryPath) { |
| | | File directory = new File(directoryPath); |
| | |
| | | return ""; |
| | | } |
| | | |
| | | @RequestMapping(value = "/plan/delete/file/auth") |
| | | // @ManagerAuth |
| | | public R deleteFile(@RequestParam("planId") String planId,@RequestParam MultipartFile file){ |
| | | planId="上传文件-20"; |
| | | String[] split = planId.split("-"); |
| | | int id = Integer.parseInt(split[1]); |
| | | System.out.println("---开始---"); |
| | | String savePath = "D:/crm/plan/file/"+id+"/"+file.getName(); // 指定保存文件的路径 |
| | | try{ |
| | | FileSaveExampleUtil.deleteFilesInDirectory(savePath); |
| | | }catch (Exception e){ |
| | | return R.error(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | // @RequestMapping(value = "/plan/delete/file/auth") |
| | | //// @ManagerAuth |
| | | // public R deleteFile(@RequestParam("planId") String planId,@RequestParam MultipartFile file){ |
| | | // planId="上传文件-20"; |
| | | // String[] split = planId.split("-"); |
| | | // int id = Integer.parseInt(split[1]); |
| | | // System.out.println("---开始---"); |
| | | // String savePath = "D:/crm/plan/file/"+id+"/"+file.getName(); // 指定保存文件的路径 |
| | | // try{ |
| | | // FileSaveExampleUtil.deleteFilesInDirectory(savePath); |
| | | // }catch (Exception e){ |
| | | // return R.error(); |
| | | // } |
| | | // return R.ok(); |
| | | // } |
| | | |
| | | @RequestMapping(value = "/plan/view/file/auth") |
| | | // @ManagerAuth |
| | |
| | | autoRow: true, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | clickClose: true, |
| | | radio: true, |
| | | remoteMethod: function (val, cb, show) { |
| | | $.ajax({ |
| | |
| | | ,{field: 'director$', align: 'left',title: '项目负责人', templet:function(d){return emptyShow(d.director$)}} |
| | | ,{field: 'remarks', align: 'left',title: '备注', templet:function(d){return emptyShow(d.remarks)}} |
| | | ,{field: 'createTime$', align: 'left',title: '添加时间'} |
| | | ,{field: 'company$', align: 'left',title: '所属公司', hide: true} |
| | | ,{field: 'company$', align: 'left',title: '所属公司', hide: false} |
| | | ,{field: 'orderProductTypeId$', align: 'left',title: '产品类型', hide: false} |
| | | ,{field: 'province', align: 'left',title: '省', hide: true} |
| | | ,{field: 'city', align: 'left',title: '市', hide: true} |
| | |
| | | success: function (layero, dIndex) { |
| | | let cstmrSel = loadCstmrSel(); |
| | | let companySel = loadCompanySel(); |
| | | if (!mData){ |
| | | companySel.setValue([{name: "浙江中扬立库技术有限公司", value: 4}]); |
| | | } |
| | | if (mData) { |
| | | $('#cascaderVal').val(mData.pcd); |
| | | if (mData.cstmrId) { cstmrSel.setValue([{name: mData.cstmrId$, value: mData.cstmrId}]); } |
| | |
| | | autoRow: true, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | clickClose: true, |
| | | radio: true, |
| | | remoteMethod: function (val, cb, show) { |
| | | $.ajax({ |
| | |
| | | autoRow: true, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | clickClose: true, |
| | | radio: true, |
| | | remoteMethod: function (val, cb, show) { |
| | | $.ajax({ |
| | |
| | | autoRow: true, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | clickClose: true, |
| | | radio: true, |
| | | remoteMethod: function (val, cb, show) { |
| | | let loadIndex = layer.load(2); |
| | |
| | | autoRow: true, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | clickClose: true, |
| | | radio: true, |
| | | remoteMethod: function (val, cb, show) { |
| | | $.ajax({ |
| | |
| | | autoRow: true, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | clickClose: true, |
| | | radio: true, |
| | | remoteMethod: function (val, cb, show) { |
| | | $.ajax({ |
| | |
| | | autoRow: true, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | clickClose: true, |
| | | radio: true, |
| | | remoteMethod: function (val, cb, show) { |
| | | $.ajax({ |
| | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">项目状态 : </label> |
| | | <div class="layui-input-block" > |
| | | <input type="radio" name="status" value="0" title="跟踪中"/> |
| | | <input type="radio" name="status" value="0" title="跟踪中" checked/> |
| | | <input type="radio" name="status" value="1" title="完成"/> |
| | | <input type="radio" name="status" value="2" title="关闭"/> |
| | | </div> |