中扬CRM客户关系管理系统
#
LSH
2023-09-11 ef338fb6029251c320431e65a2cd60ead0e8b6e0
#
6个文件已修改
70 ■■■■■ 已修改文件
src/main/java/com/zy/crm/common/utils/FileSaveExampleUtil.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/manager/controller/PlanController.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/cstmr/cstmr.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/order/order.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/plan/plan.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/order/order.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/crm/common/utils/FileSaveExampleUtil.java
@@ -61,19 +61,19 @@
//        }
//    }
    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);
src/main/java/com/zy/crm/manager/controller/PlanController.java
@@ -260,21 +260,21 @@
        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
src/main/webapp/static/js/cstmr/cstmr.js
@@ -405,6 +405,7 @@
            autoRow: true,
            filterable: true,
            remoteSearch: true,
            clickClose: true,
            radio: true,
            remoteMethod: function (val, cb, show) {
                $.ajax({
src/main/webapp/static/js/order/order.js
@@ -150,7 +150,7 @@
            ,{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}
@@ -268,6 +268,9 @@
            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}]); }
@@ -408,6 +411,7 @@
            autoRow: true,
            filterable: true,
            remoteSearch: true,
            clickClose: true,
            radio: true,
            remoteMethod: function (val, cb, show) {
                $.ajax({
@@ -436,6 +440,7 @@
            autoRow: true,
            filterable: true,
            remoteSearch: true,
            clickClose: true,
            radio: true,
            remoteMethod: function (val, cb, show) {
                $.ajax({
src/main/webapp/static/js/plan/plan.js
@@ -488,6 +488,7 @@
                                    autoRow: true,
                                    filterable: true,
                                    remoteSearch: true,
                                    clickClose: true,
                                    radio: true,
                                    remoteMethod: function (val, cb, show) {
                                        let loadIndex = layer.load(2);
@@ -822,6 +823,7 @@
            autoRow: true,
            filterable: true,
            remoteSearch: true,
            clickClose: true,
            radio: true,
            remoteMethod: function (val, cb, show) {
                $.ajax({
@@ -898,6 +900,7 @@
            autoRow: true,
            filterable: true,
            remoteSearch: true,
            clickClose: true,
            radio: true,
            remoteMethod: function (val, cb, show) {
                $.ajax({
@@ -956,6 +959,7 @@
            autoRow: true,
            filterable: true,
            remoteSearch: true,
            clickClose: true,
            radio: true,
            remoteMethod: function (val, cb, show) {
                $.ajax({
src/main/webapp/views/order/order.html
@@ -167,7 +167,7 @@
                <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>