Ver código fonte

web端新功能发布

liuwei5815 5 anos atrás
pai
commit
d1d497e206

+ 73 - 0
admin-ui/app/whepi/lingyun/editPhone.js

@@ -0,0 +1,73 @@
+define(function (require) {
+    return function (context) {
+
+        var $dlg, $form, $coma;
+
+
+        return {
+            xtype: 'dialog',
+            dialogId: 'dialogEnvLog',
+            title:  '手机号变更',
+            width: 450,
+            height: 300,
+            onOpen: function () {
+                $dlg = $(this);
+                $form.formSet({houseId:context.houseId,linkman:context.linkman,phone:context.phone});
+            },
+            center: {
+                items: {
+                    width: 450,
+                    height: 400,
+                    autoSizeColumns: true,
+                    xtype: 'formgroup',
+                    onRender: function () {
+                        $form = $(this);
+                    },
+                    items: [
+                        [
+                            {name: 'houseId', xtype: 'hidden'},
+                            {
+                                name: 'linkman',
+                                label: '姓名',
+                                disabled: true,
+                                maxlength: 60,
+                                width: 350,
+                            },
+                            {
+                                name: 'phone',
+                                label: '手机号',
+                                required: true,
+                                maxlength: 60,
+                                width: 350,
+                            },
+
+
+                        ]
+                    ],
+                }
+            },
+            buttons: [
+                {
+                    text: "保存", iconCls: "fa fa-save", onClick: function () {
+                        $.yvan.postForm($form, {
+                            url: api('/user/editPhone'),
+                            success: function (data) {
+                                if (data.data > 0) {
+                                    $.yvan.msg('保存成功');
+                                    $dlg.window('close');
+                                    if ($.type(context.confirm) === 'function') {
+                                        context.confirm();
+                                    }
+                                }
+                            }
+                        });
+                    }
+                }, {
+                    text: "关闭", iconCls: "fa fa-times", onClick: function () {
+                        $dlg.dialog('close');
+                    }
+                }
+            ]
+        };
+    };
+});

+ 28 - 0
admin-ui/app/whepi/lingyun/lingyunUserOnJob.js

@@ -229,6 +229,34 @@ define(function (require) {
                         }
                       },
 
+
+
+
+                        {
+                            text: '手机号变更', iconCls: 'fa fa fa-pencil-square-o fa-lg', onClick: function () {
+
+                            var row = $grid1.rowData();
+                            if ( row == null || row == undefined || row.userId == null || row.userId == "") {
+                                $.yvan.msg('请选择数据');
+                                return
+                            }
+
+                            $.yvan.showDialog(this,
+                                require('/app/whepi/lingyun/editUser.js')({
+                                    isEdit: false,
+                                    houseId: row.houseId,
+                                    linkman: row.linkman,
+                                    phone: row.phone,
+                                    confirm: function () {
+                                        queryGrid1();
+                                    }
+                                })
+                            );
+                        }
+                        },
+
+
+
                       {
                         text: '部门变更', iconCls: 'fa fa fa-pencil-square-o fa-lg', onClick: function () {
 

+ 7 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/ScanAdminController.java

@@ -462,6 +462,13 @@ public class ScanAdminController {
         return Model.newSuccess(uptownHouseMapper.updateById(uptownHouse));
     }
 
+
+    @ApiOperation("手机号变更")
+    @PostMapping("/whepi/user/editPhone")
+    public Model editPhone(@JsonBody UptownHome uptownHome) {
+        return Model.newSuccess(uptownHomeMapper.updateById(uptownHome));
+    }
+
     @ApiOperation("小区进出二维码")
     @PostMapping("/whepi/qrImg/scanQrImg")
     public Model<List<UptownDoor>> scanQrImg(HttpParameterParser parser, PageDb pagination) throws IOException, WriterException {