|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private PlanService planService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/plan/{id}/auth") | 
|---|
|  |  |  | @GetMapping(value = "/plan/{id}/auth") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R get(@PathVariable("id") String id) { | 
|---|
|  |  |  | return R.ok(planService.selectById(String.valueOf(id))); | 
|---|
|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private PlanTypeService planTypeService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/planType/{id}/auth") | 
|---|
|  |  |  | @GetMapping(value = "/planType/{id}/auth") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R get(@PathVariable("id") String id) { | 
|---|
|  |  |  | return R.ok(planTypeService.selectById(String.valueOf(id))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/planType/list/auth") | 
|---|
|  |  |  | @PostMapping(value = "/planType/list/auth") | 
|---|
|  |  |  | public R list() { | 
|---|
|  |  |  | return R.ok().add(planTypeService.selectList(new EntityWrapper<PlanType>().orderBy("id"))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/planType/page/auth") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R list(@RequestParam(defaultValue = "1")Integer curr, | 
|---|
|  |  |  | public R page(@RequestParam(defaultValue = "1")Integer curr, | 
|---|
|  |  |  | @RequestParam(defaultValue = "10")Integer limit, | 
|---|
|  |  |  | @RequestParam(required = false)String orderByField, | 
|---|
|  |  |  | @RequestParam(required = false)String orderByType, | 
|---|
|  |  |  | 
|---|
|  |  |  | name: @pom.build.finalName@ | 
|---|
|  |  |  | datasource: | 
|---|
|  |  |  | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver | 
|---|
|  |  |  | #    url: jdbc:sqlserver://47.97.1.152:51433;databasename=zy_crm | 
|---|
|  |  |  | #    username: sa | 
|---|
|  |  |  | #    password: Zoneyung@zy56$ | 
|---|
|  |  |  | url: jdbc:sqlserver://localhost:1433;databasename=zy_crm | 
|---|
|  |  |  | url: jdbc:sqlserver://47.97.1.152:51433;databasename=zy_crm | 
|---|
|  |  |  | username: sa | 
|---|
|  |  |  | password: sa@123 | 
|---|
|  |  |  | password: Zoneyung@zy56$ | 
|---|
|  |  |  | #    url: jdbc:sqlserver://localhost:1433;databasename=zy_crm | 
|---|
|  |  |  | #    username: sa | 
|---|
|  |  |  | #    password: sa@123 | 
|---|
|  |  |  | mvc: | 
|---|
|  |  |  | static-path-pattern: /** | 
|---|
|  |  |  | redis: | 
|---|
|  |  |  | 
|---|
|  |  |  | var cascader = layui.cascader; | 
|---|
|  |  |  | var tree = layui.tree; | 
|---|
|  |  |  | var dropdown = layui.dropdown; | 
|---|
|  |  |  | var element = layui.element; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | $('#organization').html(localStorage.getItem('nickname') + ' <i class="layui-icon"></i>'); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 添加 | 
|---|
|  |  |  | $("#planAddBtn").click(function () { | 
|---|
|  |  |  | showEditModel(); | 
|---|
|  |  |  | let loadIndex = layer.load(2); | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | url: baseUrl+"/planType/list/auth", | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | if (res.code === 200){ | 
|---|
|  |  |  | admin.open({ | 
|---|
|  |  |  | type: 1, | 
|---|
|  |  |  | area: '300px', | 
|---|
|  |  |  | title: '新建售前规划申请单', | 
|---|
|  |  |  | content: $('#addDialogPre').html(), | 
|---|
|  |  |  | success: function (layero, dIndex) { | 
|---|
|  |  |  | element.init(); | 
|---|
|  |  |  | form.render(); | 
|---|
|  |  |  | layer.close(loadIndex); | 
|---|
|  |  |  | console.log(res.data); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } else if (res.code === 403){ | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | layer.msg(res.msg, {icon: 2}); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 删除 | 
|---|
|  |  |  | 
|---|
|  |  |  | where: searchData, | 
|---|
|  |  |  | page: {curr: 1} | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 监听头工具栏事件 | 
|---|
|  |  |  | table.on('toolbar(plan)', function (obj) { | 
|---|
|  |  |  | var checkStatus = table.checkStatus(obj.config.id).data; | 
|---|
|  |  |  | switch(obj.event) { | 
|---|
|  |  |  | case 'addData': | 
|---|
|  |  |  | showEditModel(); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case 'deleteData': | 
|---|
|  |  |  | if (checkStatus.length === 0) { | 
|---|
|  |  |  | layer.msg('请选择要删除的数据', {icon: 2}); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | del(checkStatus.map(function (d) { | 
|---|
|  |  |  | return d.id; | 
|---|
|  |  |  | })); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 监听行工具事件 | 
|---|
|  |  |  | 
|---|
|  |  |  | #detail .layui-input-block { | 
|---|
|  |  |  | margin-left: 150px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .layui-form-radio { | 
|---|
|  |  |  | display: block; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </style> | 
|---|
|  |  |  | </head> | 
|---|
|  |  |  | <body> | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script type="text/html" id="toolbar"> | 
|---|
|  |  |  | <div class="layui-btn-container"> | 
|---|
|  |  |  | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> | 
|---|
|  |  |  | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> | 
|---|
|  |  |  | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script type="text/html" id="operate"> | 
|---|
|  |  |  | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> | 
|---|
|  |  |  | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> | 
|---|
|  |  |  | 
|---|
|  |  |  | <script type="text/javascript" src="../../static/layui/lay/modules/cascader/citys-data.js" charset="utf-8"></script> | 
|---|
|  |  |  | <script type="text/javascript" src="../../static/js/plan/plan.js" charset="utf-8"></script> | 
|---|
|  |  |  | </body> | 
|---|
|  |  |  | <script type="text/html" id="addDialogPre"> | 
|---|
|  |  |  | <div class="layui-form admin-form"> | 
|---|
|  |  |  | <div class="layui-input-block" style="margin: 20px 0px 20px 30px"> | 
|---|
|  |  |  | <input type="radio" name="gk" value="0" title="公开" checked> | 
|---|
|  |  |  | <input type="radio" name="gk" value="1" title="部分公开"> | 
|---|
|  |  |  | <input type="radio" name="gk" value="2" title="不公开"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <hr class="layui-bg-gray"> | 
|---|
|  |  |  | <div class="layui-form-item text-right" style="margin-right: 20px"> | 
|---|
|  |  |  | <button class="layui-btn" lay-filter="planTypeSubmit" lay-submit="">保存</button> | 
|---|
|  |  |  | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 表单弹窗 --> | 
|---|
|  |  |  | <script type="text/html" id="editDialog"> | 
|---|
|  |  |  | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> | 
|---|
|  |  |  | 
|---|
|  |  |  | var insTb = table.render({ | 
|---|
|  |  |  | elem: '#planTypeTable', | 
|---|
|  |  |  | headers: {token: localStorage.getItem('token')}, | 
|---|
|  |  |  | url: baseUrl+'/planType/list/auth', | 
|---|
|  |  |  | url: baseUrl+'/planType/page/auth', | 
|---|
|  |  |  | page: true, | 
|---|
|  |  |  | limit: 16, | 
|---|
|  |  |  | limits: [16, 30, 50, 100, 200, 500], | 
|---|