Browse Source

Merge branch 'master' of http://git.yvanui.com/hust/wuhan_epi

maoyunfeng 5 years ago
parent
commit
3c904a720a
100 changed files with 23569 additions and 0 deletions
  1. 1326 0
      admin-ui/app.js
  2. 10 0
      admin-ui/app/404.html
  3. 126 0
      admin-ui/app/sys/account/dialogAccount.js
  4. 146 0
      admin-ui/app/sys/account/queryAccount.js
  5. 115 0
      admin-ui/app/sys/app/dialogApp.js
  6. 242 0
      admin-ui/app/sys/app/dialogAppFile.js
  7. 88 0
      admin-ui/app/sys/app/dialogAppFileInfo.js
  8. 127 0
      admin-ui/app/sys/app/dialogAppVer.js
  9. 396 0
      admin-ui/app/sys/app/queryApp.js
  10. 3 0
      admin-ui/app/sys/env.js
  11. 80 0
      admin-ui/app/sys/excel/dialogImport.js
  12. 346 0
      admin-ui/app/sys/excel/queryImport.js
  13. 135 0
      admin-ui/app/sys/home.html
  14. 75 0
      admin-ui/app/sys/idRule/dialogId.js
  15. 139 0
      admin-ui/app/sys/idRule/queryId.js
  16. 313 0
      admin-ui/app/sys/index.html
  17. 214 0
      admin-ui/app/sys/menu/dialogMenu.js
  18. 134 0
      admin-ui/app/sys/menu/dialogMenuSort.js
  19. 296 0
      admin-ui/app/sys/menu/queryMenu.js
  20. 6 0
      admin-ui/app/sys/queryDept.js
  21. 6 0
      admin-ui/app/sys/queryMenu.js
  22. 6 0
      admin-ui/app/sys/queryUser.js
  23. 82 0
      admin-ui/app/sys/role/dialogRole.js
  24. 83 0
      admin-ui/app/sys/role/dialogRoleMenu.js
  25. 142 0
      admin-ui/app/sys/role/queryRole.js
  26. 75 0
      admin-ui/app/sys/sysCode/dialogId.js
  27. 140 0
      admin-ui/app/sys/sysCode/queryId.js
  28. 65 0
      admin-ui/app/sys/sysDictTp/dialogDictList.js
  29. 122 0
      admin-ui/app/sys/sysDictTp/dialogDictSort.js
  30. 131 0
      admin-ui/app/sys/sysDictTp/dialogDictTp.js
  31. 134 0
      admin-ui/app/sys/sysDictTp/dialogDictTpDet.js
  32. 429 0
      admin-ui/app/sys/sysDictTp/queryDictTp.js
  33. 117 0
      admin-ui/app/sys/sysLogin/querySysLogin.js
  34. 280 0
      admin-ui/app/sys/sysRole/dialogHrUserRole.js
  35. 124 0
      admin-ui/app/sys/sysRole/dialogSysRole.js
  36. 86 0
      admin-ui/app/sys/sysRole/dialogSysRoleMenu.js
  37. 349 0
      admin-ui/app/sys/sysRole/querySysRole.js
  38. 116 0
      admin-ui/app/sys/sysUnit/dialogSysUnit.js
  39. 106 0
      admin-ui/app/sys/sysUnit/dialogSysUnitConver.js
  40. 119 0
      admin-ui/app/sys/sysUnit/dialogSysUnitSort.js
  41. 122 0
      admin-ui/app/sys/sysUnit/dialogUnitConver.js
  42. 348 0
      admin-ui/app/sys/sysUnit/querySysUnit.js
  43. 103 0
      admin-ui/app/sys/system/dialogSystem.js
  44. 184 0
      admin-ui/app/sys/system/querySystem.js
  45. 76 0
      admin-ui/app/sys/user/dialogUser.js
  46. 181 0
      admin-ui/app/sys/user/queryUser.js
  47. 119 0
      admin-ui/app/sys/wf/dialogWf.js
  48. 218 0
      admin-ui/app/sys/wf/dialogWfStep.js
  49. 0 0
      admin-ui/app/sys/wf/dialogWfStepCause.js
  50. 0 0
      admin-ui/app/sys/wf/dialogWfStepJudge.js
  51. 123 0
      admin-ui/app/sys/wf/dialogWfStepSort.js
  52. 0 0
      admin-ui/app/sys/wf/dialogWfStepUser.js
  53. 174 0
      admin-ui/app/sys/wf/dialogWfTask.js
  54. 223 0
      admin-ui/app/sys/wf/queryWf.js
  55. 416 0
      admin-ui/app/sys/wf/queryWfStep.js
  56. 218 0
      admin-ui/app/sys/wf/queryWfStepUser.js
  57. 224 0
      admin-ui/app/sys/wf/queryWfTask.js
  58. 32 0
      admin-ui/app/sys/widget/selectHrUser.js
  59. 72 0
      admin-ui/app/view/dialogWarnShow.js
  60. 62 0
      admin-ui/app/view/dialogWarnShow105.js
  61. 62 0
      admin-ui/app/view/dialogWarnShow80.js
  62. 309 0
      admin-ui/app/view/queryBatch.js
  63. 322 0
      admin-ui/app/view/queryBatchRoom.js
  64. 237 0
      admin-ui/app/view/queryCorp.js
  65. 168 0
      admin-ui/app/view/queryFarmUser.js
  66. 323 0
      admin-ui/app/view/queryMatInfo.js
  67. 194 0
      admin-ui/app/view/queryOrg.js
  68. 147 0
      admin-ui/app/view/queryPgh.js
  69. 428 0
      admin-ui/app/view/queryStock.js
  70. 252 0
      admin-ui/app/view/queryStockKeep.js
  71. 327 0
      admin-ui/app/view/queryStockMatMiss.js
  72. 325 0
      admin-ui/app/view/queryStockMiss.js
  73. 54 0
      admin-ui/app/view/queryStockQj.js
  74. 154 0
      admin-ui/app/view/queryUserAddress.js
  75. 265 0
      admin-ui/app/view/queryWmsInAbnormal.js
  76. 409 0
      admin-ui/app/view/queryWmsOutWpf.js
  77. 27 0
      admin-ui/callMessage.js
  78. 12 0
      admin-ui/demoIndex.html
  79. 3 0
      admin-ui/fileApi.js
  80. 2598 0
      admin-ui/format.js
  81. 148 0
      admin-ui/homeLink.js
  82. 11 0
      admin-ui/index.html
  83. 750 0
      admin-ui/index.js
  84. 813 0
      admin-ui/js-big-decimal.js
  85. 180 0
      admin-ui/message.js
  86. 600 0
      admin-ui/static/css/date.css
  87. 141 0
      admin-ui/static/css/hust.css
  88. 122 0
      admin-ui/static/css/login.css
  89. 143 0
      admin-ui/static/css/role_home.css
  90. 162 0
      admin-ui/static/css/themes/cropper/ImgCropping.css
  91. 10 0
      admin-ui/static/css/themes/cropper/cropper.min.css
  92. 3949 0
      admin-ui/static/css/themes/default/easyui.css
  93. BIN
      admin-ui/static/css/themes/default/icons/back.png
  94. BIN
      admin-ui/static/css/themes/default/icons/blank.gif
  95. BIN
      admin-ui/static/css/themes/default/icons/cancel.png
  96. BIN
      admin-ui/static/css/themes/default/icons/clear.png
  97. BIN
      admin-ui/static/css/themes/default/icons/cut.png
  98. BIN
      admin-ui/static/css/themes/default/icons/edit_add.png
  99. BIN
      admin-ui/static/css/themes/default/icons/edit_remove.png
  100. 0 0
      admin-ui/static/css/themes/default/icons/filesave.png

File diff suppressed because it is too large
+ 1326 - 0
admin-ui/app.js


+ 10 - 0
admin-ui/app/404.html

@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title></title>
+</head>
+<body>
+<h2>此功能稍后开放</h2>
+</body>
+</html>

+ 126 - 0
admin-ui/app/sys/account/dialogAccount.js

@@ -0,0 +1,126 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form;
+
+    var widgets = {
+      // 人员搜索
+      selectHrUserWidget: {
+        url: '/app/sys/widget/selectHrUser.js',
+        bind: {
+          userId: 'userId',
+          userName: 'name'
+        }
+      },
+      // 机构搜索
+      selectOrgWidget: {
+        url: '/app/hr/widget/selectOrg.js',
+        bind: {
+          deptId: 'orgId',
+          orgName: 'orgName'
+        }
+      }
+    };
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogAccount',
+      title: '用户名信息',
+      width: 650,
+      height: 350,
+      onOpen: function () {
+        loadingMask: false,
+          $dlg = $(this);
+        if (context.isEdit) {
+          $.yvan.ajax({
+            type: 'GET',
+            url: api('/sys/account/getById'),
+            data: {
+              accId: context.accId
+            },
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet(data.data);
+            }
+          });
+        } else {
+          // 点击新增按钮时操作:
+          /*$(this).up('power').down('formgroup').formSet({
+            // bcuId: context.bcuId,
+            userId: context.userId,
+            userName: context.userName
+          });*/
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          subLabelWidth: '100',
+          subControlWidth: '200',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [[
+            {name: 'accId', xtype: 'hidden'},
+            {label: '登录用户名', name: 'account', required: true, ff: 500},
+            {
+              label: '类型',
+              name: 'accType',
+              xtype: 'yvselect',
+              required: true,
+              data: $.yvan.sysDict('accType').combo()
+            },// 需要在字典管理菜单设置值
+            {label: '登录密码', name: 'pwd', xtype: 'passwordbox', required: true},
+            {label: '姓名ID', name: 'userId', xtype: 'hidden', widget: widgets.selectHrUserWidget},
+            {
+              label: '人员',
+              name: 'userName',
+              xtype: 'searchbox', /*required: true, editable: false,*/
+              widget: widgets.selectHrUserWidget
+            },
+            {label: '部门ID', name: 'deptId', xtype: 'hidden', widget: widgets.selectOrgWidget},
+            {label: '部门', name: 'orgName', xtype: 'searchbox', /*editable: false,*/ widget: widgets.selectOrgWidget},
+            {
+              label: '启用状态',
+              name: 'status',
+              xtype: 'yvselect',
+              required: true,
+              value: 1,
+              data: $.yvan.sysDict('accountStatus').combo()
+            }// 通过value赋值提供下拉框默认值
+          ]]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            var userId = $form.formGet().userId;
+            var deptId = $form.formGet().deptId;
+            if (('' == userId || null == userId || undefined == userId) && ('' == deptId || null == deptId || undefined == deptId)) {
+              $.yvan.msg('帐号必须关联一个人员或者部门');
+              return;
+            }
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/account/update') : api('/sys/account/insert')),
+              success: function () {
+                $.yvan.msg('操作成功');
+                if (context.isEdit) {
+                  $dlg.window('close');
+                }
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              },
+              error: function (data) {
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 146 - 0
admin-ui/app/sys/account/queryAccount.js

@@ -0,0 +1,146 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid, $form;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 查询列表
+    function queryGrid1() {
+      var queryUrl = '/sys/account/query';// 自行替换此参数
+      $grid.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryForm
+      });
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '帐号管理';
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '姓名/用户名';
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1},
+        },
+        {
+          xtype: 'yvselect', label: '启用状态', name: 'status', labelWidth: 'auto', width: 180, editable: false,
+          data: $.yvan.sysDict('accountStatus').combowithAll(), value: '',
+          onChange: function () {
+            queryGrid1();
+          }
+        },
+      ]]
+    };
+
+    // 列表增删改查按钮
+    var gridToolbarTitle = '帐号列表';
+    var gridToolbar = {
+      xtype: 'toolbar', title: gridToolbarTitle,
+      items: [
+        {
+          text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+            var dlg = require('/app/sys/account/dialogAccount.js')({// 自行替换此参数
+              isEdit: false,
+              confirm: function () {
+                queryGrid1();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }, {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid.rowData();
+            if (!row) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            var dlg = require('/app/sys/account/dialogAccount.js')({// 自行替换此参数
+              isEdit: true,
+              accId: row.accId,// 自行替换此参数
+              confirm: function () {
+                queryGrid1();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }
+      ]
+    }
+
+    return {
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          idField: "accId",
+          toolbar: {
+            xtype: 'div',
+            items: [
+              queryToolbar,
+              queryForm,
+              gridToolbar
+            ]
+          },
+          columns: [[
+            {title: '账号ID', field: 'accId', hidden: true},
+            {title: '用户名', field: 'account'},
+            {title: '类型', field: 'accType', formatter: $.fn.fmatter.accTypeSrc},// 需要在format.js文件中设置此方法
+            {title: '用户ID', field: 'userId', hidden: true},
+            {title: '人员', field: 'userName'},
+            {title: '部门ID', field: 'deptId', hidden: true},
+            {title: '部门', field: 'orgName'},
+            {title: '启用状态', field: 'status', hidden: true},
+            {title: '启用状态', field: 'statusView', formatter: $.fn.fmatter.accountStatusView},
+            {title: '新增人', field: 'userCreate', hidden: true},
+            {title: '新增时间', field: 'timeCreate', formatter: 'ts'},
+            {title: '更新人', field: 'userUpdate', hidden: true},
+            {title: '更新时间', field: 'timeUpdate', formatter: 'ts'}
+          ]]
+        }
+      }
+    };
+  };
+});

+ 115 - 0
admin-ui/app/sys/app/dialogApp.js

@@ -0,0 +1,115 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form;
+
+    //获取平台列表
+    function getSysList() {
+      var _datas = [];
+      $.yvan.ajax({
+        url: api('/sys/system/query'),
+        data: {status: 1},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].sysId,
+                "text": data.data[i].sysName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogApp',
+      title: '应用程序信息',
+      width: 650,
+      height: 400,
+      onOpen: function () {
+        $dlg = $(this);
+        if (context.isEdit) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/sysApp/getById'),
+            type: 'GET',
+            data: {
+              appId: context.appId
+            },
+            success: function (data) {
+              $dlg.find('form');
+              if (!isNotNull(data) || !isNotNull(data.data)) {
+                return;
+              }
+
+              $form.formSet(data.data);
+            }
+          });
+        } else {
+          $form.formSet({
+            beActive: 'Y',
+            status: 1,
+            sysId: context.sysId
+          });
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [{name: 'appId', xtype: 'hidden'},
+            [{
+              name: 'sysId',
+              label: '所属平台',
+              xtype: 'yvselect',
+              required: true,
+              width: 350,
+              //disabled: context.isEdit ? "disabled" : "",
+              data: getSysList()
+            }],
+            {name: 'appName', label: '程序名称', required: true, span: 2},
+            [{name: 'appCode', label: '程序编码', required: true, span: 2}],
+            [{
+              name: 'appType', label: '程序类型', xtype: 'yvselect', required: true,
+              data: $.yvan.bizDict('appType').combo()
+            }, {
+              name: 'status', label: '启用状态', xtype: 'yvselect', required: true,
+              data: $.yvan.bizDict('status').combo()
+            }],
+            [{name: 'appExe', label: '文件名'}, {name: 'appKey', label: 'key'}],
+            {name: 'appDesp', label: '文件描述', span: 2, height: '90px', multiline: true},
+          ]
+        }
+      },
+      buttons: [
+        {
+          text: "保存", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/sysApp/update') : api('/sys/sysApp/insert')),
+              success: function () {
+                $.yvan.msg('保存成功');
+                $dlg.window('close');
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              },
+              error: function (data) {
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 242 - 0
admin-ui/app/sys/app/dialogAppFile.js

@@ -0,0 +1,242 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid1, $form, $dlg;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        //如果按下回车键,就发出确认
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    function queryGrid1() {
+      var obj = $form.formGet();
+      obj.verId = context.verId;
+      obj.appId = context.appId;
+      obj.guid = '700cbc18ab1049e19b88d8fd29410bb6';
+      $grid1.reload({
+        url: api('/sys/sysAppFile/query'),//  /term/hd/verCheck  /sys/sysAppFile/query
+        mtype: 'POST',
+        queryParams: obj
+      }, true);
+    }
+
+    function saveFile(file) {
+      $.yvan.ajax({
+        url: api('/sys/sysAppFile/insert'),
+        data: {
+          verId: context.verId,
+          appId: context.appId,
+          fileName: file.fileName,
+          ext: file.ext,
+          filePath: file.filePath,
+          md5: file.md5,
+          size: file.size
+        },
+        method: 'post',
+        success: function (data) {
+          if (close) {
+            $.yvan.msg('操作成功');
+          }
+          if ($.type(context.confirm) === 'function') {
+            context.confirm();
+          }
+        }
+      });
+    }
+
+    //编辑
+    function editRow1(obj) {
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('选择一行数据');
+        return;
+      }
+      var dlg = require('/app/sys/app/dialogAppFileInfo.js')({
+        isEdit: true,
+        fileId: row.fileId,
+        verId: row.verId,
+        appId: row.appId,
+        confirm: function () {
+          $grid1.reload();
+        }
+      });
+      $.yvan.showDialog(obj, dlg);
+    }
+
+    //删除
+    function deleteRow1() {
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      $.yvan.confirm('确定删除 [' + row.fileName + "] ?", {
+        yes: function (index) {
+          $.yvan.ajax({
+            url: api('/sys/sysAppFile/delete'),
+            data: {
+              fileId: row.fileId,
+            },
+            method: 'post',
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid1.reload();
+            }
+          });
+        }
+      });
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '应用程序管理';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            $dlg.window('close');
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: '文件名称/文件路径/文件版本/MD5',
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1}
+        }
+      ]]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle1 = '程序文件列表';// 自行替换此参数
+    var gridToolbar1 = {
+      xtype: 'toolbar', title: gridToolbarTitle1, items: [
+        {
+          name: 'file',
+          text: '文件上传',
+          iconCls: 'fa fa-cloud-upload',
+          // accept: 'image/jpeg,image/png',
+          accept: {
+            title: 'file',
+            // extensions: 'jpg,mp4,pdf,png,ppt,doc,xls,docx,xlsx,pptx',
+            // mimeTypes: 'image/jpeg,video/mp4,application/pdf,image/png,application/vnd.ms-powerpoint,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.presentationml.presentation'
+            extensions: '*',
+            mimeTypes: '*/*'
+          },
+          onClick: function () {
+            var _data = $form.formGet();
+            //onsole.log(_data.appFileType);
+            if (_data.appFileType == 0) {
+              $.yvan.msg('请先选择文件类型');
+              return;
+            }
+            $.yvan.showUploadWindow($(this), {
+              url: fileUrl('/file/appUpload'), //上传路径
+              param: JSON.stringify({busiId: context.verId, busiType: _data.fileType}),
+              uploadSuccess: function (file) {
+                //已弃用
+              },
+              success: function (data) {
+                //上传一个文件,成功之后的回调.
+                //如果有多个文件会回调多次
+                saveFile(data.data);
+              }
+            });
+          }
+        }, {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            editRow1(this);
+          }
+        }, {
+          text: '删除', iconCls: 'fa fa-trash-o fa-lg', onClick: function () {
+            deleteRow1();
+          }
+        },
+      ]
+    };
+
+    //界面
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialog3',
+      title: '版本文件信息',
+      width: '100%',
+      height: '100%',
+      onOpen: function () {
+        $dlg = $(this);
+        debugger
+        $form.formSet({
+          "verId": context.verId,
+          "appId": context.appId,
+          "fileType": 11,
+          "appFileType": 1
+        });
+      },
+      north: {
+        height: 90,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm
+        ]
+      },
+      center: {
+        width: "100%",
+        border: false,
+        split: true,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar1,
+          pagination: false,
+          autoSizeColumns: true,
+          //idField: 'fileId',
+          title: '应用程序列表',
+          columns: [[
+            {field: 'fileId', hidden: true},
+            {field: 'verId', hidden: true},
+            {field: 'appId', hidden: true},
+            {field: 'filePath', title: '文件相对路径'},
+            {field: 'fileName', title: '文件名称'},
+            {field: 'fileMd5', title: '文件MD5'},
+            {
+              field: 'fileSize', width: 100, title: '大小(KB)', align: 'right', formatter: function (value, row, index) {
+                return Math.round(row.rowData.fileSize / 1024);
+              }
+            },
+            {field: 'fileUrl', title: '文件下载地址'},
+            {field: 'timeCreate', title: '新增时间', formatter: 'ts'}
+          ]]
+        }
+      }
+    };
+  };
+});

+ 88 - 0
admin-ui/app/sys/app/dialogAppFileInfo.js

@@ -0,0 +1,88 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form;
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialog5',
+      title: '文件信息',
+      width: 650,
+      height: 350,
+      onOpen: function () {
+        $dlg = $(this);
+        if (context.isEdit) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/sysAppFile/getById'),
+            type: 'GET',
+            data: {
+              fileId: context.fileId
+              // verId: context.verId,
+              // appId: context.appId
+            },
+            success: function (data) {
+              $dlg.find('form');
+              // 日期格式化
+              $form.formSet(data.data);
+              //$('body').item('appName').textbox('setValue', curSysApp.appName);
+            }
+          });
+        } else {
+          //文件上传这里没有新增的情况
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [
+            {name: 'fileId', xtype: 'hidden'},
+            {name: 'verId', xtype: 'hidden'},
+            {name: 'appName', label: '程序名称', xtype: 'hidden', readonly: true},
+            {name: 'appId', label: '程序编号', xtype: 'hidden'},
+            [{name: 'fileName', label: '文件名称', span: 2, readonly: true}],
+            [{name: 'fileMd5', label: 'MD5', span: 2, readonly: true}],
+            [{
+              name: 'fileSize', label: '大小(字节)', readonly: true, formatter: function (value) {
+                return value;
+              }
+            }],
+            [{name: 'fileUrl', label: '文件下载路径', span: 2, required: true}],
+            [{name: 'filePath', label: '文件存放路径', span: 2, required: true}],
+            // {
+            //   name: 'verType',
+            //   label: '文件类型',
+            //   xtype: 'yvselect',
+            //   required: true,
+            //   data: $.yvan.bizDict('appFileType').combo()
+            // },
+            //{name: 'timeCreate', label: '新增时间', readonly: true},
+          ]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: api('/sys/sysAppFile/update'),
+              success: function () {
+                $.yvan.msg('操作成功');
+                $dlg.window('close');
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 127 - 0
admin-ui/app/sys/app/dialogAppVer.js

@@ -0,0 +1,127 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form;
+    var curSysApp;
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogAppVer',
+      title: '程序版本信息',
+      width: 650,
+      height: 400,
+      onOpen: function () {
+        $dlg = $(this);
+        if (context.isEdit) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/sysAppVer/getById'),
+            type: 'GET',
+            data: {
+              verId: context.verId
+            },
+            success: function (data) {
+              if (!isNotNull(data) || !isNotNull(data.data)) {
+                return;
+              }
+              curSysApp = data.data.sysApp;
+              console.log(curSysApp);
+              $dlg.find('form');
+              // 日期格式化
+              data.data.timeTest = $.yvan.ts(data.data.timeTest);
+              data.data.timePublish = $.yvan.ts(data.data.timePublish);
+              $form.formSet(data.data);
+              $('body').item('appName').textbox('setValue', curSysApp.appName);
+            }
+          });
+        } else {
+          //$('body').item('appId').textbox('setValue', context.appId);
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/sysAppVer/getNewAppVer'),
+            type: 'GET',
+            data: {
+              appId: context.appId
+            },
+            success: function (data) {
+              curSysApp = data.data.sysApp;
+              console.log(curSysApp);
+              $dlg.find('form');
+              $form.formSet(data.data);
+              $('body').item('appName').textbox('setValue', curSysApp.appName);
+            }
+          });
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [
+            {name: 'verId', xtype: 'hidden'},
+            {name: 'appId', label: '程序编号', xtype: 'hidden'},
+            [{name: 'appName', label: '程序名称', span: 2, readonly: true}],
+            [{name: 'guid', label: 'guid', xtype: 'hidden', readonly: true, span: 2}],
+            [{name: 'verCode', label: '版本编码', required: true},
+              {name: 'verNo', label: '版本号', required: true, maxlength: 9,disabled: context.isEdit ? "disabled" : "",}],
+            [{
+              name: 'verType',
+              label: '版本类型',
+              xtype: 'yvselect',
+              required: true,
+              data: $.yvan.bizDict('appVerType').combo()
+            },
+              {
+                name: 'status',
+                label: '发布状态',
+                xtype: 'yvselect',
+                required: true,
+                data: $.yvan.bizDict('appVerStatus').combo()
+              }],
+            {name: 'comVer', label: '通用组件', xtype: 'hidden'},
+            // [{
+            //   name: 'comVer', label: '通用组件', xtype: 'searchbox', width: '400px',
+            //   widget: {
+            //     url: '/app/sys/app/dialogAppVerBindCom.js',
+            //     bind: {
+            //       matcQc: 'matcId',
+            //       matcName: 'matcName'
+            //     },
+            //     queryParams: {matcBusi: MATC_BUSI_检验}
+            //   },
+            //   labelWidth: '120px',
+            //   width: '350px',
+            // }],
+            [{name: 'timeTest', label: '内测时间', xtype: 'datebox', labelWidth: '120px'},
+              {name: 'timePublish', label: '发布时间', xtype: 'datebox', labelWidth: '120px'}],
+            [{name: 'verDesp', label: '版本介绍', span: 2, height: '60px', multiline: true}]
+          ]
+        }
+      },
+      buttons: [
+        {
+          text: "保存", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/sysAppVer/update') : api('/sys/sysAppVer/insert')),
+              success: function () {
+                $.yvan.msg('保存成功');
+                $dlg.window('close');
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              },
+              error: function (data) {
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 396 - 0
admin-ui/app/sys/app/queryApp.js

@@ -0,0 +1,396 @@
+define(function (require) {
+  return function () {
+
+    var $grid1, $grid2, $form;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        //如果按下回车键,就发出确认
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    function queryGrid1() {
+      $grid1.reload({
+        url: api('/sys/sysApp/query'),
+        mtype: 'POST',
+        queryParams: $form.formGet()
+      }, true);
+      if ($grid2 != undefined) {
+        $grid2.jqGrid("clearGridData");
+      }
+    }
+
+    function queryGrid2(rowid) {
+      var row = $grid1.rowData(rowid);
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var queryData = {appId: row.appId};// 多个参数自行新增
+      $grid2.reload({
+        mtype: 'POST',
+        url: api('/sys/sysAppVer/query'),
+        queryParams: queryData
+      });
+    }
+
+    //删除
+    function deleteRow1() {
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      $.yvan.confirm('确定删除 [' + row.appName + "] ?", {
+        yes: function (index) {
+          $.yvan.ajax({
+            url: api('/sys/sysApp/delete'),
+            data: {
+              appId: row.appId,
+            },
+            method: 'post',
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid1.reload();
+              $grid2.reload();
+            }
+          });
+        }
+      });
+    }
+
+    //删除
+    function deleteRow2() {
+      var row = $grid2.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      $.yvan.confirm('确定删除 [' + row.verCode + "] ?", {
+        yes: function (index) {
+          $.yvan.ajax({
+            url: api('/sys/sysAppVer/delete'),
+            data: {
+              verId: row.verId,
+            },
+            method: 'post',
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid2.reload();
+            }
+          });
+        }
+      });
+    }
+
+    // 更新启停用状态
+    function updateStatus() {
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var obj = {};
+      obj.name = row.appName; //自行替换此参数
+      obj.status = row.status;
+      obj = setStatusMsg(obj); //返回rtnStatus
+      $.yvan.confirm(obj.msg, {
+        yes: function (index) {
+          $.yvan.ajax({
+            method: 'post',
+            url: api("/sys/sysApp/updateStatus"), //自行替换此参数
+            data: {
+              appId: row.appId, //自行替换此参数
+            },
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid1.reload();
+            }
+          });
+        }
+      });
+    }
+
+    function updateStatusVer() {
+      var row = $grid2.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      // TODO:发布和停用功能
+      alert('此功能暂未实现');
+    }
+
+    //获取平台列表
+    function getSysList() {
+      var _datas = [];
+      _datas.push({
+        "id": "",
+        "text": "全部",
+        "selected": true
+      });
+      $.yvan.ajax({
+        url: api('/sys/system/query'),
+        data: {status: 1},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].sysId,
+                "text": data.data[i].sysName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '应用程序管理';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: '程序名称/文件名称/描述',
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1}
+        }, {
+          xtype: 'yvselect',
+          label: '所属平台',
+          name: 'sysId',
+          labelWidth: 'auto',
+          width: 280,
+          data: getSysList(),
+          onChange: function () {
+            queryGrid1();
+          }
+        }, {
+          xtype: 'yvselect', label: '程序类型', name: 'appType', labelWidth: 'auto', width: 200, value: '',
+          data: $.yvan.sysDict('appType').combowithAll(),
+          onChange: function () {
+            queryGrid1();
+          }
+        },
+        {
+          xtype: 'yvselect',
+          label: '启用状态',
+          name: 'status',
+          labelWidth: 'auto',
+          width: 180,
+          data: $.yvan.sysDict('status').combowithAll(),
+          onChange: function () {
+            queryGrid1();
+          }
+        }
+      ]]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle1 = '应用程序列表';// 自行替换此参数
+    var gridToolbar1 = {
+      xtype: 'toolbar', title: gridToolbarTitle1, items: [
+        {
+          text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+            var dlg = require('/app/sys/app/dialogApp.js')({
+              isEdit: false,
+              confirm: function () {
+                $grid1.reload();
+              },
+              sysId: $form.formGet().sysId
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }, {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid1.rowData();
+            if (!row) {
+              $.yvan.msg('选择一行数据');
+              return;
+            }
+            var dlg = require('/app/sys/app/dialogApp.js')({
+              isEdit: true,
+              appId: row.appId,
+              confirm: function () {
+                $grid1.reload();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }, {
+          text: '启用/停用', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+            updateStatus();
+          }
+        }
+      ]
+    };
+
+    // 列表2增删改查按钮
+    var gridToolbarTitle2 = '版本信息';// 自行替换此参数
+    var gridToolbar2 = {
+      xtype: 'toolbar', title: gridToolbarTitle2, items: [
+        {
+          text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+            var row = $grid1.rowData();
+            if (!row) {
+              $.yvan.msg('选择一行数据');
+              return;
+            }
+            var dlg = require('/app/sys/app/dialogAppVer.js')({
+              isEdit: false,
+              appId: row.appId,
+              confirm: function () {
+                $grid2.reload();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }, {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid2.rowData();
+            if (!row) {
+              $.yvan.msg('选择一行数据');
+              return;
+            }
+            var dlg = require('/app/sys/app/dialogAppVer.js')({
+              isEdit: true,
+              verId: row.verId,
+              confirm: function () {
+                $grid2.reload();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }, {
+          text: '发布/停用', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+            updateStatusVer();
+          }
+        }, {
+          text: '文件管理', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+            var row = $grid2.rowData();
+            if (!row) {
+              $.yvan.msg('选择一行数据');
+              return;
+            }
+            var dlg = require('/app/sys/app/dialogAppFile.js')({
+              //isEdit: true,
+              verId: row.verId,
+              appId: row.appId,
+              confirm: function () {
+                $grid2.reload();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }, {
+          text: '删除', iconCls: 'fa fa-trash-o fa-lg', onClick: function () {
+            deleteRow2();
+          }
+        }
+      ]
+    };
+
+    //界面
+    return {
+      north: {
+        height: 90,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm
+        ]
+      },
+      west: {
+        width: "50%",
+        border: false,
+        split: true,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar1,
+          pagination: false,
+          autoSizeColumns: true,
+          idField: 'appId',
+          title: '应用程序列表',
+          columns: [[
+            {field: 'appId', hidden: true},
+            {field: 'sysId', hidden: true},
+            {field: 'appCode', hidden: true},
+            {field: 'status', hidden: true},
+            {field: 'appName', title: '程序名称', width: 120},
+            {field: 'appType', title: '程序类型', align: 'center', width: 60, formatter: $.fn.fmatter.appType},
+            {field: 'appExe', title: '文件名', width: 80},
+            {field: 'sysName', title: '所属平台', width: 120},
+            {field: 'statusView', title: '启用状态', align: 'center', width: 50, formatter: $.fn.fmatter.statusView},
+            {field: 'verNum', title: '版本数', align: 'center', width: 60},
+            {field: 'timeUpdate', title: '更新时间', formatter: 'ts', hidden: true}
+          ]],
+          onSelectRow: function (rowid) {
+            queryGrid2(rowid);
+          }
+        }
+      },
+      center: {
+        width: '50%',
+        items: {
+          onRender: function () {
+            $grid2 = $(this);
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar2,
+          pagination: false,
+          idField: 'verId',
+          title: '版本信息列表',
+          columns: [[
+            {field: 'verId', hidden: true},
+            {field: 'appId', hidden: true},
+            {field: 'guid', title: 'GUID', hidden: true},
+            {field: 'verCode', title: '版本编码'},
+            {field: 'verNo', title: '版本号', align: 'center'},
+            {field: 'verType', title: '版本类型', align: 'center'},
+            {field: 'status', title: '发布状态', align: 'center', formatter: $.fn.fmatter.status},
+            {field: 'fileNum', title: '文件数', align: 'center'},
+            {field: 'timeTest', title: '内测时间', formatter: $.fn.fmatter.ts, hidden: true},
+            {field: 'timePublish', title: '发布时间', formatter: $.fn.fmatter.ts, hidden: true}
+          ]]
+        }
+      }
+    };
+  };
+});

+ 3 - 0
admin-ui/app/sys/env.js

@@ -0,0 +1,3 @@
+function api(url) {
+  return url;
+}

+ 80 - 0
admin-ui/app/sys/excel/dialogImport.js

@@ -0,0 +1,80 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form;
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogImport',
+      title: 'Excel导入信息',
+      width: 650,
+      height: 350,
+      onOpen: function () {
+        loadingMask: false,
+          $dlg = $(this);
+        if (context.isEdit) {
+          $.yvan.ajax({
+            type: 'GET',
+            url: api('/sys/sysImport/getById'),
+            data: {
+              importId: context.importId
+            },
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet(data.data);
+            }
+          });
+        } else {
+          // 点击新增按钮时操作:
+          /*$(this).up('power').down('formgroup').formSet({
+            // bcuId: context.bcuId,
+            userId: context.userId,
+            userName: context.userName
+          });*/
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          subLabelWidth: '100',
+          subControlWidth: '200',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [[
+            {name: 'id', xtype: 'hidden'},
+            {
+              label: '表名',
+              name: 'tbName',
+              ff: 500,
+              xtype: 'yvselect',
+              required: true,
+              data: $.yvan.sysDict('tbName').combo()
+            },// 需要在字典管理菜单设置值
+            {label: '启用状态', name: 'status', xtype: 'hidden', value: 0}// 通过value赋值提供下拉框默认值
+          ]]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/sysImport/updateCaoGao') : api('/sys/sysImport/insert')),
+              success: function () {
+                $.yvan.msg('操作成功');
+                $dlg.window('close');
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 346 - 0
admin-ui/app/sys/excel/queryImport.js

@@ -0,0 +1,346 @@
+define(function (require) {
+  return function () {
+
+    var $grid1, $grid2, $form;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 查询列表
+    function queryGrid1() {
+      var queryUrl = '/sys/sysImport/query';// 自行替换此参数
+      $grid1.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid1.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryForm
+      }, true);
+    }
+
+    function queryGrid2(rowid) {
+      var row = $grid1.rowData(rowid);
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var queryUrl = '/sys/sysImportItem/query';// 自行替换此参数
+      var queryData = {importId: row.importId/*, ownerId: $form.formGet().ownerId*/};// 多个参数自行添加
+      $grid2.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryData
+      });
+    }
+
+    // 更新启用停用状态
+    function updateStatus(aurl, acurstatus, atostatus, row) {
+      var aname = $.fn.fmatter.tbNameSrc(row.tbName);
+      var obj = {};
+      obj.name = aname;// 自行替换此参数
+      obj.status = acurstatus;
+      obj.tostatus = atostatus;
+      obj.isTree = 0;// 树为1,非树为0
+      obj = setStatusMsg(obj); //返回rtnStatus
+      var msg = obj.msg;
+      // var status = obj.rtnStatus;
+      /*|-----------------------自行替换start-----------------------*/
+      var apiUrl = aurl;// 自行替换此参数
+      var apiData = {
+        importId: row.importId,// 自行替换此参数
+        status: atostatus
+      };
+      /*-----------------------自行替换end-----------------------|*/
+      $.yvan.confirm(msg, {
+        yes: function (index) {
+          $.yvan.ajax({
+            method: 'post',
+            url: api(apiUrl),
+            data: apiData,
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid1.reload();
+            }
+          });
+        }
+      });
+    }
+
+    // 删除//status整体状态:-2删除、-1停用、0草稿、1发布
+    function shanChu() {
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      if (0 != row.status) {
+        $.yvan.msg('只有草稿状态的数据才能删除');
+        return;
+      }
+      var acurstatus = row.status;
+      var atostatus = -2;
+      var aurl = '/sys/sysImport/updateShanChu';
+      updateStatus(aurl, acurstatus, atostatus, row);
+    }
+
+    // 发布
+    function faBu() {
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      if (0 == row.status) {
+      } else {
+        $.yvan.msg('只有草稿状态的数据才能发布');
+        return;
+      }
+      if (parseInt(row.dataNum) == 0) {
+        $.yvan.msg('不能发布未导入Excel详情数据的记录');
+        return;
+      }
+      var acurstatus = row.status;
+      var atostatus = 1;
+      var aurl = '/excel/pms/pmsPgh/faBu';
+      updateStatus(aurl, acurstatus, atostatus, row);
+    }
+
+    // 导出
+    function exportExcel() {
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      if (0 == row.status) {
+      } else {
+        $.yvan.msg('只有草稿状态的数据才能导出');
+        return;
+      }
+      if (parseInt(row.dataNum) == 0) {
+        $.yvan.msg('不能导出未导入Excel详情数据的记录');
+        return;
+      }
+      var apiUrl = '/excel/pms/pmsPgh/exportData';// 自行替换此参数
+      var apiData = {
+        importId: row.importId,// 自行替换此参数
+        // status: atostatus
+      };
+      $.yvan.download({
+        method: 'get',
+        url: api('/excel/pms/pmsPgh/exportData?importId=' + row.importId),
+        // url: api('/excel/pms/pmsPgh/exportData'),
+        data: apiData,
+        fileName: '派工号导出-' + $.yvan.getMoment().format('YYYY-MM-DD HH:mm:ss') + '.xlsx'
+      });
+    }
+
+
+    // 搜索按钮
+    var queryToolbarTitle = 'Excel导入管理';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '表名';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1},
+        },
+        {
+          xtype: 'yvselect', label: '整体状态', name: 'status', labelWidth: 'auto', width: 180,
+          data: $.yvan.sysDict('allStatus').combowithAll(), value: '',
+          onChange: function () {
+            queryGrid1();
+          }
+        },
+      ]]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle1 = 'Excel导入列表';// 自行替换此参数
+    var gridToolbar1 = {
+      xtype: 'toolbar',
+      title: gridToolbarTitle1,
+      items: [
+        {
+          text: '临时数据删除', iconCls: 'fa fa-trash-o fa-lg', onClick: function () {
+            shanChu();
+          }
+        }
+      ]
+    };
+
+    // 列表2增删改查按钮
+    var gridToolbarTitle2 = 'Excel详情列表';// 自行替换此参数
+    var gridToolbar2 = {
+      xtype: 'toolbar',
+      title: gridToolbarTitle2
+    };
+
+    return {
+      north: {
+        height: 90,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm
+        ]
+      },
+      west: {
+        width: "40%",
+        split: true,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar1,
+          idField: 'importId',
+          columns: [[
+            {title: 'id', field: 'importId', hidden: true},
+            {title: '表名', field: 'tbName'},
+            {title: '用户ID', field: 'userId', hidden: true},
+            {title: '业务ID', field: 'busiId', hidden: true},
+            {title: '业务类型', field: 'busiType', hidden: true},
+            {title: '系统ID', field: 'sysId', hidden: true},
+            {title: '数据量', field: 'dataNum'},
+            {
+              title: '发布时间', field: 'pubTime', formatter: function (value, row, index) {
+                if (row.rowData.status == 1) {
+                  return $.fn.fmatter.ts(row.rowData.pubTime);
+                } else {
+                  return "";
+                }
+              }, hidden: true
+            },
+            {title: '整体状态', field: 'status', hidden: true},
+            {title: '整体状态', field: 'allStatusView', formatter: $.fn.fmatter.allStatusView},
+            {title: '新增人', field: 'userCreate', hidden: true},
+            {title: '新增时间', field: 'timeCreate', formatter: 'ts', hidden: true},
+            {title: '更新人', field: 'userUpdate', hidden: true},
+            {title: '更新时间', field: 'timeUpdate', formatter: 'ts', hidden: true},
+            {title: '备注', field: 'desp'}
+          ]],
+          onSelectRow: function (rowid) {
+            queryGrid2(rowid);
+          }
+        }
+      },
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid2 = $(this);
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar2,
+          idField: 'id',
+          autoSizeColumns: false,
+          columns: [[
+            {title: '派工ID', field: 'id', hidden: true},
+            {title: '派工ID', field: 'importId', hidden: true},
+            {title: '文本1', field: 'txt1'},
+            {title: '文本2', field: 'txt2'},
+            {title: '文本3', field: 'txt3'},
+            {title: '文本4', field: 'txt4'},
+            {title: '文本5', field: 'txt5'},
+            {title: '文本6', field: 'txt6'},
+            {title: '文本7', field: 'txt7'},
+            {title: '文本8', field: 'txt8'},
+            {title: '文本9', field: 'txt9'},
+            {title: '数字1', field: 'num1'},
+            {title: '数字2', field: 'num2'},
+            {title: '数字3', field: 'num3'},
+            {title: '数字4', field: 'num4'},
+            {title: '数字5', field: 'num5'},
+            {title: '数字6', field: 'num6'},
+            {title: '数字7', field: 'num7'},
+            {title: '数字8', field: 'num8'},
+            {title: '数字9', field: 'num9'},
+            {
+              title: '日期1', field: 'time1', formatter: function (value, row, index) {
+                if ('-2209017943000' == value) {
+                  return "";
+                } else {
+                  return $.fn.fmatter.tsymd(value);
+                }
+              }
+            },
+            {
+              title: '日期2', field: 'time2', formatter: function (value, row, index) {
+                if ('-2209017943000' == value) {
+                  return "";
+                } else {
+                  return $.fn.fmatter.tsymd(value);
+                }
+              }
+            }, {
+              title: '日期3', field: 'time3', formatter: function (value, row, index) {
+                if ('-2209017943000' == value) {
+                  return "";
+                } else {
+                  return $.fn.fmatter.tsymd(value);
+                }
+              }
+            }, {
+              title: '日期4', field: 'time4', formatter: function (value, row, index) {
+                if ('-2209017943000' == value) {
+                  return "";
+                } else {
+                  return $.fn.fmatter.tsymd(value);
+                }
+              }
+            }, {
+              title: '日期5', field: 'time5', formatter: function (value, row, index) {
+                if ('-2209017943000' == value) {
+                  return "";
+                } else {
+                  return $.fn.fmatter.tsymd(value);
+                }
+              }
+            },
+
+            {title: '状态', field: 'status', hidden: true},
+            {title: '状态', field: 'excelStatusView', formatter: $.fn.fmatter.excelStatusView},
+            {title: '错误描述', field: 'desp', width: 180},
+          ]]
+        }
+      }
+    };
+  };
+});

+ 135 - 0
admin-ui/app/sys/home.html

@@ -0,0 +1,135 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>看图2</title>
+    <link rel="stylesheet" href="/static/plugins/viewer/viewer.min.css">
+    <style>
+        * {
+            margin: 0;
+            padding: 0;
+        }
+
+        ul.viewer {
+            width: 100%;
+            margin: 0 auto;
+            font-size: 20px;
+        }
+
+        ul.viewer li {
+            display: inline-block;
+            width: 200px;
+            margin-left: 20px;
+            padding-top: 100px;
+        }
+
+        ul.viewer li img {
+            width: 100%;
+        }
+    </style>
+</head>
+<body>
+<h1 align="center">
+    请选择您要进入的系统
+</h1>
+<ul id="sys_list" name="sys_list" class="viewer">
+    <!--<li><img src="/static/images/demo/1-thumb.jpg" onclick="promission('/sys/test/promission1');"><h4 align="center">权限111</h4></li>-->
+    <!--<li><img src="/static/images/demo/1-thumb.jpg" onclick="promission('/sys/test/promission2');"><h4 align="center">权限222</h4></li>-->
+    <!--<li><img src="/static/images/demo/1-thumb.jpg" onclick="promission('/sys/test/promission3');"><h4 align="center">权限333</h4></li>-->
+</ul>
+</body>
+</html>
+
+<!-- jQuery相关引用 -->
+<script type="text/javascript" src="/static/plugins/jquery/jquery.min.js"></script>
+<script type="text/javascript" src="/static/plugins/jquery/jquery.cookie.js"></script>
+<script type="text/javascript" src="/static/plugins/moment/moment.min.js"></script>
+<script type="text/javascript" src="/static/plugins/vue/vue.min.js"></script>
+<script type="text/javascript" src="/static/plugins/echarts4.2.0/echarts.common.min.js"></script>
+<script type="text/javascript" src="/static/plugins/jquery-easyui-1.6.10/jquery.easyui.min.js"></script>
+<script type="text/javascript" src="/static/plugins/pinyin/pinyin.js"></script>
+<script type="text/javascript" src="/static/plugins/sea/sea.js"></script>
+<script type="text/javascript" src="/static/plugins/jquery-easyui-1.6.10/jquery.easyui.min.js"></script>
+<script type="text/javascript" src="/static/plugins/jqgrid_4.15.6/jquery.jqgrid.min.js"></script>
+<script type="text/javascript" src="/static/plugins/jqgrid_4.15.6/i18n/grid.locale-cn.js"></script>
+
+<!-- yvanui start -->
+<script type="text/javascript" src="/yvanui/yvanui.edatagrid.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.treesearch.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.calendar.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.datebox.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.core.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.combobox.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.toolbar.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.radiobutton.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.checkbox.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.checkgroup.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.radiogroup.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.msg.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.power.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.echarts.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.vm.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.dialog.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.dict.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.widget.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.shortcut.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.valid.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.time.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.grid.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.searchbox.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.grid.edit.js"></script>
+<script type="text/javascript" src="/yvanui/locale/zh_cn.js"></script>
+<script type="text/javascript" src="/static/plugins/webuploader-0.1.5/webuploader.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.upload.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.excel.js"></script>
+<!-- yvanui end -->
+
+<script type="text/javascript" src="/app.js"></script>
+<script type="text/javascript" src="/format.js"></script>
+<script type="text/javascript" src="/app/sys/env.js"></script>
+
+<script type="text/javascript">
+
+  function promission(url) {
+    $.yvan.ajax({
+      url: api(url),
+      type: 'GET',
+      success: function (data) {
+        $.yvan.msg(data.msg);
+      },
+      error: function () {
+        alert("网络异常");
+      }
+    });
+  }
+
+  function choosedPlace(system) {
+    top.window.location.href = jumpApi(system.sysUrl);
+  }
+
+  $(function () {
+
+    $.yvan.ajax({
+      url: api('/sys/system/currentSystem'),
+      type: 'GET',
+      success: function (data) {
+        if (data.success) {
+          for (var i = 0; i < data.data.length; i++) {
+            var row = data.data[i];
+            $("#sys_list").append("<li>" +
+              "<img src=\"/static/images/demo/1-thumb.jpg\" onclick='choosedPlace(" + JSON.stringify(row) + ");'>" +
+              "<h4 align=\"center\">" + row.sysName +
+              "</h4>" +
+              "</li>");
+          }
+        } else {
+          $.yvan.msg(data.msg);
+        }
+      },
+      error: function () {
+        alert("网络异常");
+      }
+    });
+  });
+
+</script>
+

+ 75 - 0
admin-ui/app/sys/idRule/dialogId.js

@@ -0,0 +1,75 @@
+define(function (require) {
+  return function (context) {
+    var $dlg;
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogId',
+      title: context.isEdit ? '新增' : '编辑' + 'ID标识',
+      width: 400,
+      height: 460,
+      onOpen: function () {
+        console.log('onBeforeClose');
+        $dlg = $(this);
+        $dlg.formSet(context.row);
+      },
+      center: {
+        items: {
+          xtype: 'form',
+          items: [
+            [{name: 'idName', label: 'ID标识', required: true}],
+            [{name: 'idDesc', label: '标识说明', required: true}],
+            [{name: 'idType', label: '编号生成规则', labelWidth: 'auto'}],
+            [{name: 'idExpress', label: '序号类型', required: true}]
+          ]
+        }
+      },
+      buttons: [
+        {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            //关闭方法
+            $dlg.window('close');
+          }
+        },
+        {
+          text: '保存', iconCls: 'fa fa-save', onClick: function () {
+            var newData = $dlg.formGet();
+            if (newData.idName === null || newData.idName === '') {
+              $.yvan.msg('请填ID标识');
+              return;
+            }
+            if (newData.idDesc === null || newData.idDesc === '') {
+              $.yvan.msg('请填标识说明');
+              return;
+            }
+            // if (newData.idType === null || newData.idType === '') {
+            //     $.yvan.msg('请填编号生成规则');
+            //     return;
+            // }
+            if (newData.idExpress === null || newData.idExpress === '') {
+              $.yvan.msg('请填序号类型');
+              return;
+            }
+            var url = '/sys/id_rule/edit';
+            if (context.isEdit === false) {
+              url = '/sys/id_rule/add';
+            }
+            $.yvan.ajax({
+              url: api(url),
+              contentType: "application/json; charset=utf-8",
+              data: JSON.stringify(newData),
+              method: 'post',
+              success: function (data) {
+                $.yvan.msg(data.msg);
+                $dlg.window('close');
+                context.ok();
+              },
+              error: function (data) {
+                $.yvan.msg(data.msg);
+              }
+            });
+          }
+        }
+      ]
+    }
+  }
+});

+ 139 - 0
admin-ui/app/sys/idRule/queryId.js

@@ -0,0 +1,139 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid, $form;
+
+    function queryGrid1() {
+      $grid.jqGrid("clearGridData"); // 清除表格数据
+      var obj = $form.formGet();
+      $grid.reload({
+        url: api('/sys/id_rule/query'),
+        mtype: 'POST',
+        queryParams: obj
+      });
+    }
+
+    return {
+      onRender: function () {
+        queryGrid1();
+      },
+      north: {
+        border: false,
+        split: true,
+        height: 90,
+        items: [{
+          xtype: 'toolbar',
+          title: 'ID管理',
+          items: [
+            {
+              text: '查询', iconCls: 'fa fa-search', onClick: function () {
+                queryGrid1();
+              }
+            },
+            {
+              text: '重置', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+                $form.formClear();
+                queryGrid1();
+              }
+            },
+            {
+              text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+                var dlg = require('/app/sys/idRule/dialogId.js')({
+                  isEdit: false,
+                  ok: function () {
+                    $grid.reload();
+                  }
+                });
+                $.yvan.showDialog(this, dlg);
+              }
+            },
+            {
+              text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+                var row = $grid.rowData();
+                if (!row) {
+                  $.yvan.msg('请选择一行数据');
+                }
+                var dlg = require('/app/sys/idRule/dialogId.js')({
+                  isEdit: true,
+                  row: row,
+                  ok: function () {
+                    $grid.reload();
+                  }
+                });
+                $.yvan.showDialog(this, dlg);
+              }
+            },
+            {
+              text: '删除', iconCls: 'fa fa-trash-o fa-lg', onClick: function () {
+                var row = $grid.rowData();
+                if (!row) {
+                  $.yvan.msg('请先选择一行数据');
+                  return;
+                }
+
+                $.yvan.confirm('确定删除ID标识[' + row.idName + "] ?", {
+                  yes: function () {
+                    $.yvan.ajax({
+                      url: api('/sys/id_rule/delete'),
+                      data: {
+                        idName: row.idName
+                      },
+                      method: 'post',
+                      success: function (data) {
+                        $.yvan.msg(data.msg);
+                        $grid.reload();
+                      },
+                      error: function (data) {
+                        $.yvan.msg(data.msg);
+                      }
+                    });
+                  }
+                });
+              }
+            },
+            {
+              text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+                App.closeMe();
+              }
+            }
+          ]
+        }, {
+          xtype: 'form',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [[
+            {name: 'idName', label: 'ID标识'},
+            {name: 'idDesc', label: '标识说明'}
+          ]]
+        }]
+      },
+      center: {
+        border: true,
+        split: true,
+        items: {
+          xtype: 'grid',
+          onRender: function () {
+            $grid = $(this);
+          },
+          // dataProcess: function (root) {
+          //   for (var i = 0; i < root.data.length; i++) {
+          //     root.data[i].idDesc = root.data[i].idDesc + "aaa";
+          //   }
+          // },
+          toolbar: {
+            xtype: 'toolbar',
+            title: 'ID列表'
+          },
+          idField: 'idName',
+          columns: [[
+            {field: 'idName', title: 'ID标识'},
+            {field: 'idDesc', title: '标识说明'},
+            {field: 'idType', title: '编号生成规则'},
+            {field: 'idExpress', title: '序号类型'}
+          ]]
+        }
+      }
+    }
+  }
+});

+ 313 - 0
admin-ui/app/sys/index.html

@@ -0,0 +1,313 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+    <!-- 避免IE使用兼容模式 -->
+    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
+    <meta name="renderer" content="webkit">
+    <link rel="shortcut icon" href="/static/logo.png"/>
+    <title>系统管理平台</title>
+    <link type="text/css" rel="stylesheet" href="/static/css/themes/default/easyui.css"/>
+    <link type="text/css" rel="stylesheet" href="/static/plugins/jquery-ui-1.12.1.custom/jquery-ui.min.css"/>
+    <link type="text/css" rel="stylesheet" href="/static/plugins/jqgrid_4.15.6/css/ui.jqgrid.min.css"/>
+    <link type="text/css" rel="stylesheet" href="/static/plugins/font-awesome/css/font-awesome.min.css"/>
+    <link type="text/css" rel="stylesheet" href="/static/css/themes/default/yvanui.grid.css"/>
+    <link type="text/css" rel="stylesheet" href="/static/plugins/webuploader-0.1.5/webuploader.css"/>
+    <link type="text/css" rel="stylesheet" href="/static/css/themes/default/yvanui.css"/>
+    <link type="text/css" rel="stylesheet" href="/yvanui/themes/default/protal.css"/>
+    <link type="text/css" rel="stylesheet" href="/static/css/date.css"/>
+    <link type="text/css" rel="stylesheet" href="/static/plugins/jqwidgets/styles/jqx.base.css"/>
+    <link type="text/css" rel="stylesheet" href="/static/plugins/jqwidgets/styles/jqx.classic.css"/>
+    <link type="text/css" rel="stylesheet" href="/static/plugins/daterangepicker/daterangepicker.css"/>
+    <link type="text/css" rel="stylesheet" href="/static/plugins/select2-3.5/select2.css"/>
+    <link type="text/css" rel="stylesheet" href="/static/plugins/toastr/toastr.min.css"/>
+    <link type="text/css" rel="stylesheet" href="/static/css/hust.css"/>
+    <style>
+        .ii{
+            /*display: none;*/
+            background: #f00;
+            width: 80px;
+            height: 18px;
+            border-radius: 10px;
+            color: white;
+            text-align: center;
+            margin-top: -20px;
+            margin-left: 10px;
+            /*border-radius: 50%;*/
+            -moz-border-radius: 50%;
+            /*-webkit-border-radius: 50%;*/
+            z-index: 99999;
+
+        }
+        .circle{
+            width: 20px;
+            height: 18px;
+            margin-top: -2px;
+            padding-top: 2px;
+            background-color:red;
+            color: white;
+            text-align: center;
+            border-radius: 50%;
+            -moz-border-radius: 50%;
+            -webkit-border-radius: 50%;
+            float: right;
+        }
+        .circle1{
+            width: 20px;
+            height: 18px;
+            margin-left: -10px;
+            margin-top: 5px;
+            padding-top: 2px;
+            background-color:red;
+            color: white;
+            text-align: center;
+            border-radius: 50%;
+            -moz-border-radius: 50%;
+            -webkit-border-radius: 50%;
+            vertical-align: middle;
+            float: right;
+        }
+    </style>
+</head>
+<body>
+
+<div id="loading" class="loading-wrap" style="top:0;left:0;bottom:0;right:0">
+    <div class="loading-content">
+        <div class="loading-round"></div>
+        <div class="loading-dot"></div>
+    </div>
+</div>
+
+<div id='body' class="easyui-layout" data-options="fit:true">
+    <div data-options="region:'north',border:false,bodyCls:'theme-header-layout'" style="height:65px;padding: 0;">
+        <div class="logo"></div>
+        <div id="topBar" class="theme-navigate" style="display: flex;justify-content: flex-end">
+
+            <div id="csMenu" class="right hide">
+                <ul class="easyui-menu hide dropdown-menu user-menu"></ul>
+                <a href="javascript:;" class="easyui-menubutton admin"
+                   data-options="hasDownArrow:false,menuAlign:'right',menu:'#csMenuList',showEvent:'click'">
+                    <i class="yvan-icon fa fa-bank"></i>
+                    <span>CS端</span>
+                    <i class="yvan-icon fa fa-caret-down"></i>
+                </a>
+                <ul id="csMenuList" class="dropdown-menu user-menu hide">
+                    <li>
+                        <a id="csMenuTest1">
+                            <i class="yvan-icon fa fa-cog"></i> 调用CS-Test
+                        </a>
+                    </li>
+                </ul>
+            </div>
+
+            <div class="right">
+                <ul id="switSysMenu" class="easyui-menu hide dropdown-menu user-menu"></ul>
+                <a href="javascript:;" class="easyui-menubutton admin"
+                   data-options="hasDownArrow:false,menuAlign:'right',menu:'#systemList',showEvent:'click'">
+                    <i class="yvan-icon fa fa-bank"></i>
+                    <span id="sys-name">${staffName()!系统设置}</span>
+                    <i class="yvan-icon fa fa-caret-down"></i>
+                </a>
+                <ul id="systemList" class="dropdown-menu user-menu hide">
+
+                </ul>
+            </div>
+
+            <div id="roleSwith" class="right">
+                <ul id="switRoleMenu" class="easyui-menu hide dropdown-menu user-menu"></ul>
+                <a id="roleSwithButton" href="javascript:;" class="easyui-menubutton admin"
+                   data-options="hasDownArrow:false,menuAlign:'right',menu:'#roleList',showEvent:'click',hideEvent:'closeSB'">
+                    <i class="yvan-icon fa fa-address-book-o"></i>
+                    <span id="role-name"></span>
+                    <i class="yvan-icon fa fa-caret-down"></i>
+                </a>
+                <ul id="roleList" class="dropdown-menu user-menu hide">
+
+                </ul>
+            </div>
+            <span id="role-name-num" class="circle1"></span>
+
+            <div class="right">
+                <ul id="switchWhMenu" class="easyui-menu hide dropdown-menu user-menu"></ul>
+                <a href="javascript:;" class="easyui-menubutton admin"
+                   data-options="hasDownArrow:false,menuAlign:'right',menu:'#profile',showEvent:'click'">
+                    <span id="user-name">${staffName()!系统设置}</span>
+                    <i class="yvan-icon fa fa-caret-down"></i>
+                </a>
+                <ul id="profile" class="dropdown-menu user-menu hide">
+                    <li>
+                        <a onclick="App.resetPWD()">
+                            <i class="yvan-icon fa fa-cog"></i> 修改密码
+                        </a>
+                    </li>
+                    <li>
+                        <a onclick="App.onFullScreen()" class="full-screen">
+                            <i class="yvan-icon fa fa-arrows-alt"></i> <span>全屏显示</span>
+                        </a>
+                    </li>
+                    <li class="divider"></li>
+                    <li>
+                        <a onclick="App.logout()">
+                            <i class="yvan-icon fa fa-power-off"></i> 退出登录
+                        </a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+    </div>
+
+    <div data-options="region:'west',title:'',split:true,title:'系统功能导航'"
+         style="width:300px; padding:5px;overflow-x: hidden;">
+        <input id='treesearch' class="easyui-searchbox" style="width:100%;"/>
+        <ul id="menutree" class="easyui-tree" style="margin: 5px -5px">
+        </ul>
+    </div>
+
+    <div data-options="region:'center',border:false">
+        <div id="tt" class="easyui-tabs" data-options="fit:true">
+        </div>
+
+        <div id="mm" class="easyui-menu" style="width:140px; display: none;">
+            <div id="Div1" name="1" iconCls="fa fa-close">关闭</div>
+            <div class="menu-sep"></div>
+            <div id="mm-tabcloseother" name="3">关闭其他</div>
+            <div id="mm-tabcloseall" name="2">关闭全部</div>
+        </div>
+    </div>
+
+    <!--<div data-options="region:'south',border:false"-->
+         <!--style="height:30px;border-top: 1px solid rgb(220, 220, 220);line-height: 20px;padding: 6px 0 6px 8px;background-color: #fff;overflow: hidden">-->
+        <!--华中科技大学系统所 Copyright © 2018 - 2019 All Rights Reserved-->
+        <!--<span style="float:right;padding-right:5px;width:30%;text-align: right;" id='yvanVersion'></span>-->
+        <!--<div class="ui-jqgrid ui-widget ui-widget-content ui-corner-all" style="position:absolute;top:-9999px">-->
+            <!--<div class="ui-jqgrid-view">-->
+                <!--<div class="ui-jqgrid-bdiv">-->
+                    <!--<div style="position: relative;">-->
+                        <!--<table cellspacing="0" cellpadding="0" border="0">-->
+                            <!--<tr class="ui-widget-content jqgrow ui-row-ltr" style="table-layout:table">-->
+                                <!--<td id="tdCompute" style="background:#eee;width:auto"></td>-->
+                            <!--</tr>-->
+                        <!--</table>-->
+                    <!--</div>-->
+                <!--</div>-->
+            <!--</div>-->
+        <!--</div>-->
+    <!--</div>-->
+</div>
+
+<!--[if lte IE 8]>
+<div id="ie6-warning">
+    <p>您正在使用低版本浏览器,在本页面可能会导致部分功能无法使用,建议您升级到
+        <a href="http://www.microsoft.com/china/windows/internet-explorer/" target="_blank">IE9或以上版本的浏览器</a>
+        或使用<a href="http://se.360.cn/" target="_blank">360安全浏览器</a>的极速模式浏览
+    </p>
+</div>
+<![endif]-->
+
+</body>
+
+</html>
+<!-- jQuery相关引用 -->
+<script type="text/javascript" src="/static/plugins/jquery/jquery.min.js"></script>
+<script type="text/javascript" src="/static/plugins/jquery/jquery.cookie.js"></script>
+<script type="text/javascript" src="/static/plugins/moment/moment.min.js"></script>
+<script type="text/javascript" src="/static/plugins/vue/vue.min.js"></script>
+<script type="text/javascript" src="/static/plugins/echarts4.2.0/echarts.common.min.js"></script>
+<script type="text/javascript" src="/static/plugins/jquery-easyui-1.6.10/jquery.easyui.min.js"></script>
+<script type="text/javascript" src="/static/plugins/pinyin/pinyin.js"></script>
+<script type="text/javascript" src="/static/plugins/sea/sea.js"></script>
+<script type="text/javascript" src="/static/plugins/jquery-easyui-1.6.10/jquery.easyui.min.js"></script>
+<script type="text/javascript" src="/static/plugins/jqgrid_4.15.6/jquery.jqgrid.min.js"></script>
+<script type="text/javascript" src="/static/plugins/jqgrid_4.15.6/i18n/grid.locale-cn.js"></script>
+<script type="text/javascript" src="/static/plugins/jqwidgets/jqx-all.js"></script>
+<script type="text/javascript" src="/static/plugins/select2-3.5/select2.js"></script>
+<script type="text/javascript" src="/static/plugins/select2-3.5/select2_locale_zh-CN.js"></script>
+<script type="text/javascript" src="/static/plugins/toastr/toastr.min.js"></script>
+<script type="text/javascript" src="/static/plugins/daterangepicker/daterangepicker.js"></script>
+
+<!-- yvanui start -->
+<script type="text/javascript" src="/yvanui/yvanui.edatagrid.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.treesearch.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.searchbox.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.yvselect.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.calendar.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.datebox.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.core.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.combobox.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.toolbar.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.radiobutton.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.checkbox.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.checkgroup.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.radiogroup.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.msg.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.power.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.echarts.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.vm.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.dialog.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.dict.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.widget.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.shortcut.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.valid.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.time.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.grid.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.grid.edit.js"></script>
+<script type="text/javascript" src="/static/plugins/webuploader-0.1.5/webuploader.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.upload.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.excel.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.iframe.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.md5.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.yvgrid.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.yvtreegrid.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.yvgrid.edit.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.yvgrid.selection.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.yvgrid.filter.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.yvsearch.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.yvnumber.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.yvdate.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.yvcheck.js"></script>
+<script type="text/javascript" src="/yvanui/yvanui.yvsearch.widget.js"></script>
+<script type="text/javascript" src="/yvanui/locale/zh_cn.js"></script>
+<script type="text/javascript" src="/static/language/cn/local-ui-CN.js"></script>
+<!-- yvanui end -->
+
+<!-- Device -->
+<script type="text/javascript" src='/device/deviceHandler.js'></script>
+<script type="text/javascript" src='/device/deviceConnection.js'></script>
+<script type="text/javascript" src='/device/camera/camera.js'></script>
+<script type="text/javascript" src='/device/labelPrinter/labelPrinter.js'></script>
+<!-- Device end -->
+
+<script type="text/javascript" src="/app.js"></script>
+<script type="text/javascript" src="/fileApi.js"></script>
+<script type="text/javascript" src="/format.js"></script>
+<script type="text/javascript" src="/app/sys/env.js"></script>
+<script type="text/javascript">
+  var version = "190723";
+  seajs.config({
+    base: "/",
+    map: [
+      ['.js', '.js?v=' + version]
+    ]
+  });
+
+  // $(function () {
+  //
+  //   ('#wrap')
+  //   {
+  //     display: flex;
+  //     justify - content
+  //   :
+  //     flex - start;
+  //   }
+  //   });
+
+</script>
+<script type="text/javascript" src="/js-big-decimal.js"></script>
+<script type="text/javascript" src="/index.js"></script>
+<script type="text/javascript" src="/message.js"></script>
+<script type="text/javascript" src="/callMessage.js"></script>
+
+
+
+
+

+ 214 - 0
admin-ui/app/sys/menu/dialogMenu.js

@@ -0,0 +1,214 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form, $comb;
+
+    //自动生成助记码
+    function onblurCustomerName() {
+      $('body').item('menuName').textbox('setValue', $(this).val());
+      var customerName = $('body').item('menuName').textbox("getValue");
+      if (null != customerName && "" != customerName && undefined != customerName) {
+        $('body').item('menuNamePy').val(top.pinyin.getCamelChars(customerName));
+        var a = $('body').item('menuNamePy').val();
+        $('body').item('menuNamePy').textbox('setValue', a);
+      }
+    }
+
+    //获取平台列表
+    function getDataSysList() {
+      var _datas = [];
+      $.yvan.ajax({
+        url: api('/sys/system/query'),
+        data: {status: 1},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].sysId,
+                "text": data.data[i].sysName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //获取一级菜单列表
+    function getDataMenuList() {
+      var _datas = [];
+      _datas.push({
+        "id": "0",
+        "text": "一级菜单",
+        "selected": true
+      });
+      var sysId = null;
+      if ($form) {
+        sysId = $form.formGet().sysId;
+      }
+      $.yvan.ajax({
+        url: api('/sys/menu/queryAll'),
+        data: {treeLev: 1, status: 1, sysId: sysId},
+        method: 'get',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].menuId,
+                "text": data.data[i].menuName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogMenu',
+      title: '维护菜单信息',
+      width: 620,
+      height: 400,
+      onOpen: function () {
+        $dlg = $(this);
+        if (context.isEdit) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/menu/queryById'),
+            type: 'GET',
+            data: {
+              menuId: context.menuId
+            },
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet(data.data);
+            }
+          });
+        } else {
+          $form.formSet({
+            status: '1',
+            beActive: 'Y',
+            sysId: context.sysId
+          });
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [
+            [
+              {
+                name: 'sysId',
+                label: '所属平台',
+                xtype: 'yvselect',
+                required: true,
+                width: 350,
+                disabled: context.isEdit ? "disabled" : "",
+                data: getDataSysList(),
+                onChange: function () {
+                  $comb.yvselect({'data': getDataMenuList()});
+                }
+              }
+            ],
+            [
+              {
+                name: 'treeUp',
+                label: '上级菜单',
+                xtype: 'yvselect',
+                panelHeight: 220,
+                width: 350,
+                required: true,
+                disabled: context.isEdit ? "disabled" : "",
+                data: getDataMenuList(),
+                onRender: function () {
+                  $comb = $(this);
+                },
+              }
+            ],
+            [
+              {name: 'menuId', label: '菜单ID', xtype: 'hidden'},
+              {name: 'menuName', label: '菜单名称', required: true, events: {blur: onblurCustomerName}},
+              {name: 'menuNamePy', label: '菜单拼音', xtype: 'hidden'},
+              {
+                name: 'status',
+                label: '启用状态',
+                xtype: 'yvselect',
+                required: true,
+                data: $.yvan.sysDict('status').combo()
+              },
+              {name: 'menuCode', label: '菜单编码'},
+              {
+                name: 'menuIcon', label: '图标', xtype: 'yvselect', panelHeight: 200, data: [
+                  {id: 'fa fa-desktop', text: '桌面'},
+                  {id: 'fa fa-file-o', text: '文件'},
+                  {id: 'fa fa-wpforms', text: '日历'},
+                  {id: 'fa fa-th-list', text: '一级菜单'},
+                  {id: 'fa fa-list-ul', text: '二级菜单'},
+                  {id: 'fa fa-bars', text: '列表'},
+                  {id: 'fa fa-search', text: '搜索'},
+                  {id: 'fa fa-database', text: '数据库'},
+                  {id: 'fa fa-history', text: '历史'},
+                  {id: 'fa fa-globe', text: '地球'},
+                  {id: 'fa fa-flag', text: '旗帜'},
+                  {id: 'fa fa-filter', text: '漏斗'},
+                  {id: 'fa fa-envelope', text: '信封'},
+                  {id: 'fa fa-diamond', text: '钻石'},
+                  {id: 'fa fa-cubes', text: '立方体'},
+                  {id: 'fa fa-coffee', text: '咖啡'},
+                  {id: 'fa fa-cogs', text: '齿轮组'},
+                  {id: 'fa fa-cog', text: '齿轮'},
+                  {id: 'fa fa-cart-plus', text: '购物车'},
+                  {id: 'fa fa-bell', text: '铃铛'},
+                  {id: 'fa fa-barcode', text: '长形码'},
+                  {id: 'fa fa-university', text: '大学'},
+                  {id: 'fa fa-balance-scale', text: '天秤'},
+                  {id: 'fa fa-asterisk', text: '雪花'},
+                  {id: 'fa fa-podcast', text: '广播'},
+                  {id: 'fa fa-truck', text: '卡车'},
+                  {id: 'fa fa-shopping-basket', text: '购物栏'},
+                  {id: 'fa fa-plug', text: '插头'},
+                  {id: 'fa fa-pie-chart', text: '饼图'},
+                  {id: 'fa fa-magnet', text: '磁铁'},
+                  {id: 'fa fa-user-circle', text: '用户'},
+                  {id: 'fa fa-users', text: '用户组'}
+                ]
+              },
+              {name: 'menuUrl', label: '功能URL', span: 2},
+              {name: 'remark', label: '备注', span: 2},
+            ]]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/menu/update') : api('/sys/menu/insert')),
+              success: function () {
+                $.yvan.msg('操作成功');
+                if (context.isEdit) {
+                  $dlg.window('close');
+                }
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              },
+              error: function (data) {
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 134 - 0
admin-ui/app/sys/menu/dialogMenuSort.js

@@ -0,0 +1,134 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $grid;
+
+    // 查询列表
+    function queryGrid1() {
+      var queryUrl = '/sys/menu/queryAll';// 自行替换此参数
+      $grid.jqGrid("clearGridData");
+      $grid.reload({
+        mtype: 'GET',
+        url: api(queryUrl),
+        queryParams: {"sysId": context.sysId, "menuId": context.treeUp, "treeUp": context.treeUp}
+      });
+    }
+
+    //编辑工具栏
+    var gridToolbarTitle = '菜单列表';// 自行替换此参数
+    var gridToolbar = {
+      xtype: 'toolbar', title: gridToolbarTitle, items: [
+        {
+          text: '上移', iconCls: 'fa fa-arrow-up', onClick: function () {
+            $grid.moveUp();
+          }
+        },
+        {
+          text: '下移', iconCls: 'fa fa-arrow-down', onClick: function () {
+            $grid.moveDown();
+          }
+        },
+        {
+          text: '保存排序', iconCls: 'fa fa-check-square', onClick: function () {
+            moveGrid();
+          }
+        }
+      ]
+    }
+
+    //保存排序
+    function moveGrid() {
+      var gridData = $grid.jqGrid("getRowData");
+      var list = [];
+      for (var i = 0; i < gridData.length; i++) {
+        list.push(gridData[i].menuId);
+      }
+      var treeCode = "";
+      if (context.treeLev > 1) {
+        treeCode = context.treeCode.substr(0, 3);
+      }
+      saveSort("sysMenu", list, context.sysId, treeCode);
+    }
+
+    function saveSort(name, ids, sysid, codeup) {
+      var data = {
+        "ids": "",
+        "name": name,
+        "sysId": sysid,
+        "codeUp": codeup,
+      };
+      for (var i = 0; i < ids.length; i++) {
+        data.ids += ids[i] + ","
+      }
+      data.ids = data.ids.substr(0, data.ids.length - 1);
+      if (data.ids == "") {
+        return;
+      }
+      $.yvan.ajax({
+        url: api('/core/app/updateCoreSortCode'),
+        method: 'post',
+        data: data,
+        beforeSend: function () {
+          $.yvan.progress();
+        },
+        success: function () {
+          $.yvan.msg('操作成功');
+          $.yvan.progress();
+          $dlg.window('close');
+          if ($.type(context.confirm) === 'function') {
+            context.confirm();
+          }
+        },
+        complete: function () {
+          $.yvan.closep();
+        }
+      });
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogMenuSort',
+      title: '维护菜单排序',
+      width: 900,
+      height: 650,
+      onOpen: function () {
+        $dlg = $(this);
+      },
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          pagination: false,
+          idField: "sysMenuSort",
+          toolbar: {
+            xtype: 'div',
+            items: [
+              gridToolbar
+            ]
+          },
+          columns: [[
+            {title: '菜单ID', field: 'menuId', hidden: true},
+            {title: '平台ID', field: 'sysId', hidden: true},
+            {
+              title: '图标', field: 'menuIcon', align: "center", formatter: function (v) {
+                return "<i class='" + v + "'></i>";
+              }
+            },
+            {title: '菜单名称', field: 'menuName', hidden: true},
+            {title: '菜单名称', field: 'menuNameView', formatter: $.fn.fmatter.treeNameView},// 树结构需要fmatter
+            {title: '菜单编码', field: 'menuCode', hidden: true},
+            {title: '功能URL', field: 'menuUrl'},
+            {title: '备注', field: 'remark'},
+            {title: '上级', field: 'treeUp', hidden: true},
+            {title: '级别', field: 'treeLev', hidden: true},
+            {title: '排序', field: 'treeSort', hidden: true},
+          ]]
+        }
+      }
+    };
+  };
+});

+ 296 - 0
admin-ui/app/sys/menu/queryMenu.js

@@ -0,0 +1,296 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid, $form, $comb, $s1, $s2;
+
+    function queryGrid1() {
+      var queryUrl = '/sys/menu/queryAll';// 自行替换此参数
+      $grid.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid.reload({
+        mtype: 'GET',
+        url: api(queryUrl),
+        queryParams: queryForm
+      });
+    }
+
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 更新启用停用状态
+    function updateStatus() {
+      var row = $grid.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var obj = {};
+      obj.name = row.menuName;// 自行替换此参数
+      obj.status = row.status;
+      obj.isTree = 1;// 树为1,非树为0
+      obj = setStatusMsg(obj); //返回rtnStatus
+      var msg = obj.msg;
+      var status = obj.rtnStatus;
+      /*|-----------------------自行替换start-----------------------*/
+      var apiUrl = '/sys/menu/updateStatus';// 自行替换此参数
+      var apiData = {
+        menuId: row.menuId,// 自行替换此参数
+        status: status
+      };
+      /*-----------------------自行替换end-----------------------|*/
+      $.yvan.confirm(msg, {
+        yes: function (index) {
+          $.yvan.ajax({
+            method: 'post',
+            url: api(apiUrl),
+            data: apiData,
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid.reload();
+            }
+          });
+        }
+      });
+    }
+
+    //获取平台列表
+    function getDataSysList() {
+      var _datas = [];
+      $.yvan.ajax({
+        url: api('/sys/system/query'),
+        data: {status: 1},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].sysId,
+                "text": data.data[i].sysName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //获取一级菜单列表
+    function getDataMenuList() {
+      var _datas = [];
+      var sysId = null;
+      if ($form) {
+        sysId = $form.formGet().sysId;
+      }
+      $.yvan.ajax({
+        url: api('/sys/menu/queryAll'),
+        data: {status: 1, treeLev: 1, sysId: sysId},
+        method: 'get',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].menuId,
+                "text": data.data[i].menuName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //检索工具栏
+    var queryToolbarTitle = '菜单管理';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe();
+          }
+        }
+      ]
+    };
+
+    //检索条件表单
+    var queryFormPrompt = '菜单名称/功能URL/备注';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          onRender:function(){
+            $s1 = $(this)
+          },
+          events: {keydown: enterQueryGrid1}
+        },
+        {
+          xtype: 'yvselect',
+          label: '所属平台',
+          name: 'sysId',
+          labelWidth: 'auto',
+          width: 260,
+          data: getDataSysList(),
+          onChange: function () {
+            queryGrid1();
+            $comb.yvselect({'data': getDataMenuList()});
+          }
+        },
+        {
+          xtype: 'yvselect',
+          label: '一级菜单',
+          name: 'treeUp',
+          labelWidth: 'auto',
+          panelHeight: 300,
+          width: 220,
+          data: getDataMenuList(),
+          onRender: function () {
+            $comb = $(this);
+          },
+          onChange: function () {
+            queryGrid1();
+          }
+        },
+        {
+          xtype: 'yvselect', label: '启用状态', name: 'status', labelWidth: 'auto', width: 180, value: '',
+          data: $.yvan.sysDict('status').combowithAll(),
+          onChange: function () {
+            queryGrid1();
+          }
+        }
+      ]]
+    };
+
+    //编辑工具栏
+    var gridToolbarTitle = '菜单列表';// 自行替换此参数
+    var gridToolbar = {
+      xtype: 'toolbar', title: gridToolbarTitle, items: [
+        {
+          text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+            $.yvan.showDialog(this,
+              require('/app/sys/menu/dialogMenu.js')({
+                confirm: function () {
+                  $grid.reload();
+                },
+                isEdit: false,
+                sysId: $form.formGet().sysId,
+              })
+            );
+          }
+        }, {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid.rowData();
+            if (!row) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            $.yvan.showDialog(this,
+              require('/app/sys/menu/dialogMenu.js')({
+                confirm: function () {
+                  $grid.reload();
+                },
+                isEdit: true,
+                menuId: row.menuId,
+              })
+            );
+          }
+        }, {
+          text: '菜单排序', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid.rowData();
+            if (!row) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            $.yvan.showDialog(this,
+              require('/app/sys/menu/dialogMenuSort.js')({
+                confirm: function () {
+                  $grid.reload();
+                },
+                sysId: row.sysId,
+                treeLev: row.treeLev,
+                treeUp: row.treeUp,
+                treeCode: row.treeCode,
+              })
+            );
+          }
+        }, {
+          text: '启用/停用', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+            updateStatus();
+          }
+        }, {
+          text: '打印', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+            updateStatus();
+          }
+        }
+      ]
+    }
+
+    return {
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+          },
+          xtype: 'grid',
+          pagination: false,
+          idField: "menuId",
+          toolbar: {
+            xtype: 'div',
+            items: [
+              queryToolbar,
+              queryForm,
+              gridToolbar
+            ]
+          },
+          columns: [[
+            {title: '菜单ID', field: 'menuId', hidden: true},
+            {title: '平台ID', field: 'sysId', hidden: true},
+            {
+              title: '图标', field: 'menuIcon', align: "center", formatter: function (v) {
+                return "<i class='" + v + "'></i>";
+              }
+            },
+            {title: '菜单名称', field: 'menuName', hidden: true},
+            {title: '菜单名称', field: 'menuNameView', formatter: $.fn.fmatter.treeNameView},// 树结构需要fmatter
+            {title: '菜单编码', field: 'menuCode'},//align:"center","left","right"
+            {title: '菜单拼音', field: 'menuNamePy', hidden: true},
+            {title: '功能URL', field: 'menuUrl'},
+            {title: '所属平台', field: 'sysName', hidden: true},
+            {title: '备注', field: 'remark'},
+            {title: '上级', field: 'treeUp', hidden: true},
+            {title: '级别', field: 'treeLev', hidden: true},
+            {title: '树编码', field: 'treeCode', hidden: true},
+            {title: '排序', field: 'treeSort', hidden: true},
+            {title: '状态', field: 'status', hidden: true},
+            {title: '启用状态', field: 'statusView', align: "center", formatter: $.fn.fmatter.statusView},
+            {title: '新增时间', field: 'timeCreate', formatter: 'ts', align: "center"},
+            {title: '更新日期', field: 'timeUpdate', formatter: 'ts', align: "center"}
+          ]]
+        }
+      }
+    };
+  };
+});

+ 6 - 0
admin-ui/app/sys/queryDept.js

@@ -0,0 +1,6 @@
+define({
+  center: {
+    title: '部门管理',
+    border: false
+  }
+});

+ 6 - 0
admin-ui/app/sys/queryMenu.js

@@ -0,0 +1,6 @@
+define({
+  center: {
+    title: '菜单管理',
+    border: false
+  }
+});

+ 6 - 0
admin-ui/app/sys/queryUser.js

@@ -0,0 +1,6 @@
+define({
+  center: {
+    title: '用户管理',
+    border: false
+  }
+});

+ 82 - 0
admin-ui/app/sys/role/dialogRole.js

@@ -0,0 +1,82 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form;
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogRole',
+      title: '角色基本属性',
+      width: 610,
+      height: 250,
+      onOpen: function () {
+        $dlg = $(this);
+        if (context.isEdit) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/role/getById'),
+            type: 'GET',
+            data: {
+              roleId: context.roleId
+            },
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet(data.data);
+            }
+          });
+        } else {
+          $form.formSet({
+            beActive: 'Y'
+          });
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [
+            [
+              {name: 'roleId', xtype: 'hidden'},
+              {name: 'roleName', label: '角色名称', required: true, ff: 500},
+              {
+                name: 'beActive', label: '启用状态', xtype: 'yvselect', required: true, data: [
+                  {id: 'Y', text: '启用'},
+                  {id: 'N', text: '禁用'},
+                  {id: 'D', text: '删除'}
+                ]
+              }
+            ], [
+              {name: 'roleDes', label: '角色描述', span: 2},
+            ]
+          ]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/role/update') : api('/sys/role/insert')),
+              success: function () {
+                $.yvan.msg('操作成功');
+                if (context.isEdit) {
+                  $dlg.window('close');
+                }
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              },
+              error: function (data) {
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 83 - 0
admin-ui/app/sys/role/dialogRoleMenu.js

@@ -0,0 +1,83 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $tree;
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogRoleMenu',
+      title: '角色权限',
+      width: 500,
+      height: 650,
+      onOpen: function () {
+        $dlg = $(this);
+        $.yvan.ajax({
+          loadingMask: false,
+          url: api('/sys/role/getMenuByRoleId'),
+          type: 'GET',
+          data: {
+            roleId: context.roleId
+          },
+          success: function (data) {
+            $dlg.find('form');
+            $dlg.down('tree').tree({
+              checkbox: true,
+              data: data.data
+            }).tree('collapseAll');
+          }
+        });
+      },
+      toolbar: {
+        xtype: 'toolbar',
+        items: [
+          {
+            text: '全部折叠', onClick: function () {
+              $tree.tree('collapseAll');
+            }
+          }, {
+            text: '全部展开', onClick: function () {
+              $tree.tree('expandAll');
+            }
+          }
+        ]
+      },
+      center: {
+        css: {'overflow-x': 'hidden'},
+        items: {
+          onRender: function () {
+            $tree = $(this);
+          },
+          xtype: 'tree',
+          css: {'margin': '5px 10px'}
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            var nodeIds = $tree.tree('getChecked', ['checked', 'indeterminate']).map(function (r) {
+              return r.id;
+            });
+            $.yvan.postJson({
+              url: api('/sys/role/saveRoleMenu'),
+              data: {
+                roleId: context.roleId,
+                treedata: nodeIds
+              },
+              success: function (data) {
+                $.yvan.msg('操作成功');
+                $dlg.window('close');
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 142 - 0
admin-ui/app/sys/role/queryRole.js

@@ -0,0 +1,142 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid, $form;
+
+    function queryGrid1() {
+      $grid.jqGrid("clearGridData");
+      var obj = $form.formGet();
+      $grid.reload({
+        url: api('/sys/role/query'),
+        mtype: 'POST',
+        queryParams: obj
+      });
+    }
+
+    //删除
+    function deleteRow() {
+      var row = $grid.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      $.yvan.confirm('确定删除 [' + row.roleName + "] ?", {
+        yes: function (index) {
+          $.yvan.ajax({
+            url: api('/sys/role/delete'),
+            data: {
+              roleId: row.roleId,
+            },
+            method: 'post',
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid.reload();
+            }
+          });
+        }
+      });
+    }
+
+    return {
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+          },
+          xtype: 'grid',
+          idField: "roleId",
+          toolbar: {
+            xtype: 'div',
+            items: [
+              {
+                xtype: 'toolbar', title: '角色管理', items: [
+                  {
+                    text: '查询', iconCls: 'fa fa-search', onClick: function () {
+                      queryGrid1();
+                    }
+                  }, {
+                    text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+                      $form.formClear();
+                      queryGrid1();
+                    }
+                  }, {
+                    text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+                      $.yvan.showDialog(this,
+                        require('/app/sys/role/dialogRole.js')({
+                          confirm: function () {
+                            $grid.reload();
+                          },
+                          isEdit: false
+                        })
+                      );
+                    }
+                  }, {
+                    text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+                      var row = $grid.rowData();
+                      if (!row) {
+                        $.yvan.msg('请先选择一行数据');
+                        return;
+                      }
+
+                      $.yvan.showDialog(this,
+                        require('/app/sys/role/dialogRole.js')({
+                          confirm: function () {
+                            $grid.reload();
+                          },
+                          isEdit: true,
+                          roleId: row.roleId
+                        })
+                      );
+                    }
+                  }, {
+                    text: '编辑权限', iconCls: 'fa fa-check-square', onClick: function () {
+                      var row = $grid.rowData();
+                      if (!row) {
+                        $.yvan.msg('请先选择一行数据');
+                        return;
+                      }
+                      $.yvan.showDialog(this,
+                        require('/app/sys/role/dialogRoleMenu.js')({
+                          isEdit: true,
+                          roleId: row.roleId
+                        })
+                      );
+                    }
+                  }, {
+                    text: '删除', iconCls: 'fa fa-trash-o fa-lg', onClick: function () {
+                      deleteRow();
+                    }
+                  }, {
+                    text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+                      App.closeMe();
+                    }
+                  }
+                ]
+              },
+              {
+                onRender: function () {
+                  $form = $(this);
+                },
+                xtype: 'form',
+                items: [[
+                  {xtype: 'textbox', label: '角色名称', name: 'roleName', labelWidth: 'auto'},
+                  {xtype: 'textbox', label: '角色备注', name: 'roleDes', labelWidth: 'auto'}
+                ]]
+              },
+              {xtype: 'toolbar', title: '角色列表'}
+            ]
+          },
+          columns: [[
+            {title: '角色ID', field: 'roleId'},
+            {title: '角色名称', field: 'roleName'},
+            {title: '角色描述', field: 'roleDes'},
+            {title: '是否活动', field: 'beActive', formatter: 'ba'},
+            {title: '建立时间', field: 'createAt', formatter: 'ts'},
+            {title: '更新日期', field: 'updateAt', formatter: 'ts'}
+          ]]
+        }
+      }
+    };
+  };
+});

+ 75 - 0
admin-ui/app/sys/sysCode/dialogId.js

@@ -0,0 +1,75 @@
+define(function (require) {
+  return function (context) {
+    var $dlg;
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogld',
+      title: context.isEdit ? '新增' : '编辑' + 'ID标识',
+      width: 400,
+      height: 460,
+      onOpen: function () {
+        console.log('onBeforeClose');
+        $dlg = $(this);
+        $dlg.formSet(context.row);
+      },
+      center: {
+        items: {
+          xtype: 'form',
+          items: [
+            [{name: 'idName', label: 'ID标识', required: true}],
+            [{name: 'idDesc', label: '标识说明', required: true}],
+            [{name: 'idType', label: '编号生成规则', labelWidth: 'auto'}],
+            [{name: 'idExpress', label: '序号类型', required: true}]
+          ]
+        }
+      },
+      buttons: [
+        {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            //关闭方法
+            $dlg.window('close');
+          }
+        },
+        {
+          text: '保存', iconCls: 'fa fa-save', onClick: function () {
+            var newData = $dlg.formGet();
+            if (newData.idName === null || newData.idName === '') {
+              $.yvan.msg('请填ID标识');
+              return;
+            }
+            if (newData.idDesc === null || newData.idDesc === '') {
+              $.yvan.msg('请填标识说明');
+              return;
+            }
+            // if (newData.idType === null || newData.idType === '') {
+            //     $.yvan.msg('请填编号生成规则');
+            //     return;
+            // }
+            if (newData.idExpress === null || newData.idExpress === '') {
+              $.yvan.msg('请填序号类型');
+              return;
+            }
+            var url = '/sys/Code/edit';
+            if (context.isEdit === false) {
+              url = '/sys/Code/add';
+            }
+            $.yvan.ajax({
+              url: api(url),
+              contentType: "application/json; charset=utf-8",
+              data: JSON.stringify(newData),
+              method: 'post',
+              success: function (data) {
+                $.yvan.msg(data.msg);
+                $dlg.window('close');
+                context.ok();
+              },
+              error: function (data) {
+                $.yvan.msg(data.msg);
+              }
+            });
+          }
+        }
+      ]
+    }
+  }
+});

+ 140 - 0
admin-ui/app/sys/sysCode/queryId.js

@@ -0,0 +1,140 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid, $form;
+
+    //列表查询
+    function queryGrid1() {
+      $grid.jqGrid("clearGridData"); // 清除表格数据
+      var obj = $form.formGet();
+      $grid.reload({
+        url: api('/sys/Code/query'),
+        mtype: 'POST',
+        queryParams: obj
+      });
+    }
+
+    return {
+      onRender: function () {
+        queryGrid1();
+      },
+      north: {
+        border: false,
+        split: true,
+        height: 90,
+        items: [{
+          xtype: 'toolbar',
+          title: 'ID管理',
+          items: [
+            {
+              text: '查询', iconCls: 'fa fa-search', onClick: function () {
+                queryGrid1();
+              }
+            },
+            {
+              text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+                $form.formClear();
+                queryGrid1();
+              }
+            },
+            {
+              text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+                var dlg = require('/app/sys/sysCode/dialogId.js')({
+                  isEdit: false,
+                  ok: function () {
+                    $grid.reload();
+                  }
+                });
+                $.yvan.showDialog(this, dlg);
+              }
+            },
+            {
+              text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+                var row = $grid.rowData();
+                if (!row) {
+                  $.yvan.msg('请选择一行数据');
+                }
+                var dlg = require('/app/sys/sysCode/dialogId.js')({
+                  isEdit: true,
+                  row: row,
+                  ok: function () {
+                    $grid.reload();
+                  }
+                });
+                $.yvan.showDialog(this, dlg);
+              }
+            },
+            {
+              text: '删除', iconCls: 'fa fa-trash-o fa-lg', onClick: function () {
+                var row = $grid.rowData();
+                if (!row) {
+                  $.yvan.msg('请先选择一行数据');
+                  return;
+                }
+
+                $.yvan.confirm('确定删除ID标识[' + row.idName + "] ?", {
+                  yes: function () {
+                    $.yvan.ajax({
+                      url: api('/sys/Code/delete'),
+                      data: {
+                        idName: row.idName
+                      },
+                      method: 'post',
+                      success: function (data) {
+                        $.yvan.msg(data.msg);
+                        $grid.reload();
+                      },
+                      error: function (data) {
+                        $.yvan.msg(data.msg);
+                      }
+                    });
+                  }
+                });
+              }
+            },
+            {
+              text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+                App.closeMe();
+              }
+            }
+          ]
+        }, {
+          xtype: 'form',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [[
+            {name: 'idName', label: 'ID标识'},
+            {name: 'idDesc', label: '标识说明'}
+          ]]
+        }]
+      },
+      center: {
+        border: true,
+        split: true,
+        items: {
+          xtype: 'grid',
+          onRender: function () {
+            $grid = $(this);
+          },
+          // dataProcess: function (root) {
+          //   for (var i = 0; i < root.data.length; i++) {
+          //     root.data[i].idDesc = root.data[i].idDesc + "aaa";
+          //   }
+          // },
+          toolbar: {
+            xtype: 'toolbar',
+            title: 'ID列表'
+          },
+          idField: 'idName',
+          columns: [[
+            {field: 'idName', title: 'ID标识'},
+            {field: 'idDesc', title: '标识说明'},
+            {field: 'idType', title: '编号生成规则'},
+            {field: 'idExpress', title: '序号类型'}
+          ]]
+        }
+      }
+    }
+  }
+});

+ 65 - 0
admin-ui/app/sys/sysDictTp/dialogDictList.js

@@ -0,0 +1,65 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg;
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogDictList',
+      title: '添加字典详情',
+      width: 360,
+      height: 400,
+      onOpen: function () {
+        $dlg = $(this);
+        $dlg.formSet(context.row);
+      },
+      center: {
+        items: {
+          xtype: 'form',
+          items: [
+            [{name: 'dictCode', xtype: 'hidden'}],
+            [{label: '字典内容', name: 'dictList', required: true}],
+            [{label: '字典值', name: 'dictValue', required: true}],
+            [{label: '自定义1', name: 'udf1'}],
+            [{label: '自定义2', name: 'udf2'}],
+            [{label: '自定义3', name: 'udf3'}]
+          ]
+        }
+      },
+      buttons: [
+        {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            $dlg.window('close');
+          }
+        },
+        {
+          text: '保存', iconCls: 'fa fa-save', onClick: function () {
+            var newData = $dlg.formGet();
+            if (newData.dictValue == null || newData.dictValue === '') {
+              $.yvan.msg('字典值必填');
+              return;
+            }
+            if (newData.dictList == null || newData.dictList === '') {
+              $.yvan.msg('字典内容必填');
+              return
+            }
+            $.yvan.ajax({
+              url: api('/sys/dict/addList'),
+              contentType: 'application/json; charset=utf-8',
+              data: JSON.stringify(newData),
+              method: 'post',
+              success: function (data) {
+                $.yvan.msg(data.msg);
+                $dlg.window('close');
+                context.confirm();
+              },
+              error: function (data) {
+                $.yvan.msg(data.msg);
+              }
+            })
+          }
+        }
+      ]
+    }
+  }
+});

+ 122 - 0
admin-ui/app/sys/sysDictTp/dialogDictSort.js

@@ -0,0 +1,122 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $grid;
+
+    // 查询列表
+    function queryGrid1() {
+      var queryUrl = '/sys/sysDictTpDet/query';// 自行替换此参数
+      $grid.jqGrid("clearGridData");
+      $grid.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: {"dictTp": context.dictTp, "treeUp": context.treeUp}
+      });
+    }
+
+    //编辑工具栏
+    var gridToolbarTitle = '字典列表';// 自行替换此参数
+    var gridToolbar = {
+      xtype: 'toolbar', title: gridToolbarTitle, items: [
+        {
+          text: '上移', iconCls: 'fa fa-arrow-up', onClick: function () {
+            $grid.moveUp();
+          }
+        },
+        {
+          text: '下移', iconCls: 'fa fa-arrow-down', onClick: function () {
+            $grid.moveDown();
+          }
+        },
+        {
+          text: '保存排序', iconCls: 'fa fa-check-square', onClick: function () {
+            moveGrid();
+          }
+        }
+      ]
+    }
+
+    //保存排序
+    function moveGrid() {
+      var gridData = $grid.jqGrid("getRowData");
+      var list = [];
+      for (var i = 0; i < gridData.length; i++) {
+        list.push(gridData[i].dictId);
+      }
+      var treeCode = "";
+      if (context.treeLev > 1) {
+        treeCode = context.treeCode.substr(0, 3);
+      }
+      saveSort("sysDict", list, context.dictTp, treeCode);
+    }
+
+    function saveSort(name, ids, dicttp, codeup) {
+      var data = {
+        "ids": "",
+        "name": name,
+        "sysId": dicttp,
+        "codeUp": codeup,
+      };
+      for (var i = 0; i < ids.length; i++) {
+        data.ids += ids[i] + ","
+      }
+      data.ids = data.ids.substr(0, data.ids.length - 1);
+      if (data.ids == "") {
+        return;
+      }
+      $.yvan.ajax({
+        url: api('/core/app/updateCoreSortCode'),
+        method: 'post',
+        data: data,
+        beforeSend: function () {
+          $.yvan.progress();
+        },
+        success: function () {
+          $.yvan.msg('操作成功');
+          $dlg.window('close');
+          if ($.type(context.confirm) === 'function') {
+            context.confirm();
+          }
+        },
+        complete: function () {
+          $.yvan.closep();
+        }
+      });
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogWfStepSort',
+      title: '维护字典排序',
+      width: 500,
+      height: 650,
+      onOpen: function () {
+        $dlg = $(this);
+      },
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          pagination: false,
+          idField: "sysDictSort",
+          toolbar: {
+            xtype: 'div',
+            items: [
+              gridToolbar
+            ]
+          },
+          columns: [[
+            {title: '字典ID', field: 'dictId', hidden: true},
+            {title: '字典名称', field: 'dictName'},
+            {title: '字典值', field: 'dictCode'},
+            {title: '启用状态', field: 'status', align: 'center', formatter: $.fn.fmatter.statusView}, //增加字典,显示正常
+          ]]
+        }
+      }
+    };
+  };
+});

+ 131 - 0
admin-ui/app/sys/sysDictTp/dialogDictTp.js

@@ -0,0 +1,131 @@
+define(function (require) {
+  return function (context) {
+    // alert(context.sysId);
+    var $dlg, $form;
+
+    //自动生成助记码
+    function onblurCustomerName() {
+      $('body').item('tpName').textbox('setValue', $(this).val());
+      var customerName = $('body').item('tpName').textbox("getValue");
+      if (null != customerName && "" != customerName && undefined != customerName) {
+        $('body').item('tpCodeM').val(top.pinyin.getCamelChars(customerName));
+        $('body').item('tpNamePy').val(top.pinyin.getFullChars(customerName));
+        var a = $('body').item('tpCodeM').val();
+        var b = $('body').item('tpNamePy').val();
+        $('body').item('tpCodeM').textbox('setValue', a);
+        $('body').item('tpNamePy').textbox('setValue', b);
+      }
+    }
+
+    //获取平台列表
+    function getDataSysList() {
+      var _datas = [];
+      $.yvan.ajax({
+        url: api('/sys/system/query'),
+        data: {status: 1},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].sysId,
+                "text": data.data[i].sysName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogDictTp',
+      title: '分类基本属性',
+      width: 650,
+      height: 350,
+      onOpen: function () {
+        $dlg = $(this);
+        if (context.isEdit) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/sysDictTp/getById'),
+            type: 'GET',
+            data: {
+              dictTp: context.dictTp
+            },
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet(data.data);
+            }
+          });
+        } else {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/sysDictTp/getTpCode'),
+            type: 'GET',
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet({
+                beActive: 'Y',
+                status: 1,
+                isBase: 0,
+                sysId: context.sysId
+              });
+            }
+          });
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [[
+            {name: 'dictTp', xtype: 'hidden'},
+            {
+              name: 'sysId',
+              label: '所属平台',
+              xtype: 'yvselect',
+              required: true,
+              disabled: context.isEdit ? "disabled" : "",
+              data: getDataSysList(),
+            },
+            {name: 'status', label: '启用状态', xtype: 'yvselect', required: true, data: $.yvan.sysDict('status').combo()},
+            {name: 'tpName', label: '分类名称', required: true, ff: 10, events: {blur: onblurCustomerName}},
+            {name: 'tpNamePy', label: '名称拼音', readonly: true},
+            {name: 'tpCode', label: '分类编码', required: true, ff: 10},
+            {name: 'tpCodeM', label: '助记码', readonly: true},
+            {name: 'remark', label: '备注', span: 2, height: '60px', multiline: true},
+          ]]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/sysDictTp/update') : api('/sys/sysDictTp/insert')),
+              success: function () {
+                $.yvan.msg('操作成功');
+                if (context.isEdit) {
+                  $dlg.window('close');
+                }
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              },
+              error: function (data) {
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 134 - 0
admin-ui/app/sys/sysDictTp/dialogDictTpDet.js

@@ -0,0 +1,134 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form;
+
+    //自动生成助记码
+    function onblurName() {
+      $('body').item('dictName').textbox('setValue', $(this).val());
+      var customerName = $('body').item('dictName').textbox("getValue");
+      if (null != customerName && "" != customerName && undefined != customerName) {
+        $('body').item('dictCodeM').val(top.pinyin.getCamelChars(customerName));
+        $('body').item('dictNamePy').val(top.pinyin.getFullChars(customerName));
+        var a = $('body').item('dictCodeM').val();
+        var b = $('body').item('dictNamePy').val();
+        $('body').item('dictCodeM').textbox('setValue', a);
+        $('body').item('dictNamePy').textbox('setValue', b);
+      }
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogDictTpDet',
+      title: '维护字典信息',
+      width: 620,
+      height: 320,
+      onOpen: function () {
+        $dlg = $(this);
+        if (context.dictId > 0) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/sysDictTpDet/getById'),
+            type: 'GET',
+            data: {
+              dictId: context.dictId
+            },
+            success: function (data) {
+              $dlg.find('form');
+              if (!isNotNull(data) || !isNotNull(data.data)) {
+                return;
+              }
+              $form.formSet(data.data);
+            }
+          });
+        }
+        else if (context.treeUp > 0) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/sysDictTpDet/getNewDictLev'),
+            type: 'GET',
+            data: {
+              dictTp: context.dictTp,
+              treeUp: context.treeUp
+            },
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet(data.data);
+            }
+          });
+        } else {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/sysDictTpDet/getNewDict'),
+            type: 'GET',
+            data: {
+              dictTp: context.dictTp
+            },
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet(data.data);
+            }
+          });
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [
+            [{name: 'dictId', xtype: 'hidden'}],
+            [{name: 'dictTp', xtype: 'hidden'}],
+            [{name: 'treeUp', xtype: 'hidden'}],
+            [{name: 'treePath', xtype: 'hidden'}],
+            [{name: 'treeLev', xtype: 'hidden'}],
+            [{name: 'treeCode', label: '字典编号', xtype: 'hidden'}],
+            [
+              {name: 'dictName', label: '字典名称', required: true, ff: 500, events: {blur: onblurName}},
+              {name: 'dictNamePy', label: '拼音', readonly: true}
+            ],
+            [
+              {name: 'dictCode', label: '字典编码', required: true},
+              {name: 'dictCodeM', label: '助记码', readonly: true}
+            ],
+            [
+              {name: 'treeSort', label: '序号'},
+              {
+                name: 'status',
+                label: '状态',
+                xtype: 'yvselect',
+                data: $.yvan.bizDict('status').combo()
+              }
+            ],
+            [{name: 'remark', label: '备注', span: 2, ff: 500, height: '60px', multiline: true}]
+          ]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/sysDictTpDet/update') : api('/sys/sysDictTpDet/insert')),
+              success: function () {
+                $.yvan.msg('操作成功');
+                if (context.isEdit) {
+                  $dlg.window('close');
+                }
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              },
+              error: function (data) {
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 429 - 0
admin-ui/app/sys/sysDictTp/queryDictTp.js

@@ -0,0 +1,429 @@
+define(function (require) {
+  return function () {
+
+    var inputParam = Message.getTempParamData();
+
+    // if (inputParam) {
+    //   $.yvan.msg('缓存的数据:' + inputParam.sysId);
+    // }
+    var $grid1, $grid2, $form;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    function queryGrid1() {
+      if (inputParam) {
+        $form.formSet({sysId: inputParam.sysId});
+      }
+      $grid1.jqGrid("clearGridData");
+      $grid1.reload({
+        url: api('/sys/sysDictTp/query'),
+        mtype: 'POST',
+        queryParams: $form.formGet()
+      }, true);
+      if ($grid2 != undefined) {
+        $grid2.jqGrid("clearGridData");
+      }
+    }
+
+    function queryGrid2(rowid) {
+      var row = $grid1.rowData(rowid);
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var queryUrl = '/sys/sysDictTpDet/query';// 自行替换此参数
+      var queryData = {dictTp: row.dictTp};// 多个参数自行新增
+      $grid2.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryData
+      });
+    }
+
+    //删除
+    function deleteRow1() {
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      $.yvan.confirm('确定删除 [' + row.tpName + "] ?", {
+        yes: function (index) {
+          $.yvan.ajax({
+            url: api('/sys/sysDictTp/delete'),
+            data: {
+              dictTp: row.dictTp,
+            },
+            method: 'post',
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid1.reload();
+              $grid2.reload();
+            }
+          });
+        }
+      });
+    }
+
+    //删除
+    function deleteRow2() {
+      var row = $grid2.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      $.yvan.confirm('确定删除 [' + row.dictName + "] ?", {
+        yes: function (index) {
+          $.yvan.ajax({
+            url: api('/sys/sysDictTpDet/delete'),
+            data: {
+              dictId: row.dictId,
+            },
+            method: 'post',
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid2.reload();
+            }
+          });
+        }
+      });
+    }
+
+    //获取平台列表
+    function getDataSysList() {
+      var _datas = [];
+      _datas.push({
+        "id": "",
+        "text": "全部",
+        "selected": true
+      });
+      _datas.push({
+        "id": "0",
+        "text": "公共字典"
+      });
+      $.yvan.ajax({
+        url: api('/sys/system/query'),
+        data: {status: 1},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].sysId,
+                "text": data.data[i].sysName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '字典分类管理';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '分类名称/编码/备注';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1}
+        },
+        {
+          xtype: 'yvselect',
+          label: '所属平台',
+          name: 'sysId',
+          labelWidth: 'auto',
+          width: 260,
+          data: getDataSysList(),
+          onChange: function () {
+            queryGrid1();
+          }
+        },
+        {
+          xtype: 'yvselect',
+          label: '启用状态',
+          name: 'status',
+          labelWidth: 'auto',
+          width: 180,
+          data: $.yvan.sysDict('status').combowithAll(),
+          onChange: function () {
+            queryGrid1();
+          }
+        }
+      ]]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle1 = '字典分类列表';// 自行替换此参数
+    var gridToolbar1 = {
+      xtype: 'toolbar', title: gridToolbarTitle1, items: [
+        {
+          text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+            var dlg = require('/app/sys/sysDictTp/dialogDictTp.js')({
+              isEdit: false,
+              confirm: function () {
+                $grid1.reload();
+              },
+              sysId: $form.formGet().sysId
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        },
+        {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid1.rowData();
+            if (!row) {
+              $.yvan.msg('选择一行数据');
+              return;
+            }
+            var dlg = require('/app/sys/sysDictTp/dialogDictTp.js')({
+              isEdit: true,
+              dictTp: row.dictTp,
+              confirm: function () {
+                $grid1.reload();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        },
+        {
+          text: '删除', iconCls: 'fa fa-trash-o fa-lg', onClick: function () {
+            deleteRow1();
+          }
+        }
+      ]
+    };
+
+    // 列表2增删改查按钮
+    var gridToolbarTitle2 = '字典详情';// 自行替换此参数
+    var gridToolbar2 = {
+      xtype: 'toolbar', title: gridToolbarTitle2, items: [
+        {
+          text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+            var row1 = $grid1.rowData();
+            if (!row1) {
+              $.yvan.msg('选择一行数据');
+              return;
+            }
+            var dictTp = row1.dictTp;
+            var row2 = $grid2.rowData();
+            if (row2) {
+              dictTp = row2.dictTp;
+            }
+            var dlg = require('/app/sys/sysDictTp/dialogDictTpDet.js')({
+              isEdit: false,
+              dictTp: dictTp,
+              confirm: function () {
+                $grid1.reload();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        },
+        // {
+        //   text: '新增下级', iconCls: 'fa fa-plus-circle', onClick: function () {
+        //     var row1 = $grid1.rowData();
+        //     if (!row1) {
+        //       $.yvan.msg('选择一行数据');
+        //       return;
+        //     }
+        //     var row2 = $grid2.rowData();
+        //     if (!row2) {
+        //       $.yvan.msg('选择一行数据');
+        //       return;
+        //     }
+        //     if (row2.treeLev == 2) {
+        //       $.yvan.msg('无法新增下级');
+        //       return;
+        //     }
+        //     var dlg = require('/app/sys/sysDictTp/dialogDictTpDet.js')({
+        //       isEdit: false,
+        //       dictTp: row2.dictTp,
+        //       treeUp: row2.dictId,
+        //       confirm: function () {
+        //         $grid1.reload();
+        //       }
+        //     });
+        //     $.yvan.showDialog(this, dlg);
+        //   }
+        // },
+        {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid2.rowData();
+            if (!row) {
+              $.yvan.msg('选择一行数据');
+              return;
+            }
+            var dlg = require('/app/sys/sysDictTp/dialogDictTpDet.js')({
+              isEdit: true,
+              dictId: row.dictId,
+              confirm: function () {
+                $grid1.reload();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }, {
+          text: '排序', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row1 = $grid1.rowData();
+            if (!row1) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            var row2 = $grid2.rowData();
+            $.yvan.showDialog(this,
+              require('/app/sys/sysDictTp/dialogDictSort.js')({
+                confirm: function () {
+                  $grid2.reload();
+                },
+                dictTp: row1.dictTp,
+                treeLev: row2.treeLev,
+                treeUp: row2.treeUp,
+                treeCode: row2.treeCode,
+              })
+            );
+          }
+        },
+        {
+          text: '删除', iconCls: 'fa fa-trash-o fa-lg', onClick: function () {
+            deleteRow2();
+          }
+        }
+      ]
+    };
+
+    //界面
+    return {
+      north: {
+        height: 90,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm
+        ]
+      },
+      west: {
+        width: "50%",
+        border: false,
+        split: true,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar1,
+          pagination: false,
+          idField: 'dictTp',
+          sortable: true,
+          sortname: 'dictTp',
+          sortorder: 'asc',
+          title: '字典分类列表',
+          columns: [[
+            //{field: 'dictTp', hidden: true},
+            {field: 'dictTp', title: '分类ID',sortable: true,frozen: true, sortorder: 'asc'},//排序打开
+            {field: 'tpName', title: '分类名称'},
+            {field: 'tpCode', title: '分类编码'},
+            {field: 'tpCodeM', title: '分类助记码', hidden: true},
+            {field: 'tpNamePy', title: '分类名称拼音', hidden: true},
+            {field: 'dictNum', title: '字典数', align: "center"},
+            {field: 'status', title: '启用状态', align: "center", formatter: $.fn.fmatter.status},
+            {field: 'sysName', title: '所属平台'},
+            {field: 'remark', title: '备注'},
+            {field: 'timeUpdate', title: '更新时间', formatter: 'ts', hidden: true}
+          ]],
+          onSelectRow: function (rowid) {
+            queryGrid2(rowid);
+          },
+          loadComplete: function () {
+            if ($grid1) {
+              $grid1.jqGrid('setFrozenColumns');
+              var num = $grid1.records(); //获取当前数据量
+              if (num <= 0) {
+                if ($grid2) {
+                  //清空表格数据
+                  $grid2.clearData();
+                }
+              }
+            }
+          },
+          //排序代码
+          onSortCol: function (index, colindex, sortorder) {
+            // //注释 index 字段名(field),colindex 当前行首的值,sortorder 排序方式(asc、desc 切换)
+            // debugger
+          }
+        }
+      },
+      center: {
+        width: '50%',
+        items: {
+          onRender: function () {
+            $grid2 = $(this);
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar2,
+          pagination: false,
+          idField: 'dictId',
+          title: '字典信息列表',
+          columns: [[
+            {field: 'dictId', hidden: true},
+            {field: 'dictTp', title: '字典分类ID', hidden: true},
+            {field: 'dictName', title: '字典名称', hidden: true},
+            {field: 'dictNameView', title: '字典名称', formatter: $.fn.fmatter.treeNameView},// 树结构需要fmatter
+            {field: 'dictCode', title: '字典值', align: "center"},
+            {field: 'dictCodeM', title: '字典助记码', hidden: true},
+            {field: 'dictNamePy', title: '拼音', hidden: true},
+            {field: 'treeCode', title: '树编码', hidden: true},
+            {field: 'treeUp', title: '上级ID', hidden: true},
+            {field: 'treeLev', title: '树级别', hidden: true},
+            {field: 'treePath', title: '树路径', hidden: true},
+            {field: 'treeSort', title: '树排序', hidden: true},
+            {field: 'status', title: '启用状态', align: "center", formatter: $.fn.fmatter.status},
+            {field: 'remark', title: '备注'},
+            {field: 'userCreate', title: '新增人', hidden: true},
+            {field: 'timeCreate', title: '新增时间', formatter: $.fn.fmatter.ts, hidden: true},
+            {field: 'userUpdate', title: '修改人', hidden: true},
+            {field: 'timeUpdate', title: '修改时间', formatter: $.fn.fmatter.ts, hidden: true}
+          ]]
+        }
+      }
+    };
+  };
+});

+ 117 - 0
admin-ui/app/sys/sysLogin/querySysLogin.js

@@ -0,0 +1,117 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid, $form;
+
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    //刷新
+    function queryGrid1() {
+      $grid.jqGrid("clearGridData");
+      var obj = $form.formGet();
+      $grid.reload({
+        url: api('/sys/sysLogin/query'),
+        mtype: 'POST',
+        queryParams: obj
+      });
+    }
+
+    // 搜索按钮  页面第一行
+    var queryToolbarTitle = '登录日志';
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件  页面第二行
+    var queryFormPrompt = '姓名/登录账号';
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1},
+        },
+        {
+          xtype: 'yvselect', label: '账号类型', name: 'accType', labelWidth: 'auto', width: 200, value: '',
+          data: $.yvan.sysDict('accType').combowithAll(),
+          onChange: function () {
+            queryGrid1();
+          }
+        },
+        {
+          xtype: 'yvselect', label: '程序类型', name: 'appType', labelWidth: 'auto', width: 200, value: '',
+          data: $.yvan.sysDict('appType').combowithAll(),
+          onChange: function () {
+            queryGrid1();
+          }
+        },
+      ]]
+    };
+
+    return {
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+            queryGrid1(); //初始化数据
+          },
+          xtype: 'grid',
+          idField: "logId",
+          toolbar: {
+            xtype: 'div',
+            items: [
+              queryToolbar,
+              queryForm,
+            ]
+          },
+          columns: [[
+            {title: '登录流水', field: 'logId', hidden: true},
+            {title: '姓名', field: 'name'},
+            {title: '登录账号', field: 'accId', hidden: true},
+            {title: '登录账号', field: 'account'},
+            {title: '账号类型', field: 'accType', align: 'center', formatter: $.fn.fmatter.accType},
+            {title: '登录令牌', field: 'tid'},
+            {title: '程序Id', field: 'appId', hidden: true},
+            {title: '程序名称', field: 'appName'},
+            {title: '程序类型', field: 'appType', hidden: true},
+            {title: '程序版本Id', field: 'verId', hidden: true},
+            {title: '程序版本', field: 'verCode'},
+            {title: '终端IP', field: 'termId', hidden: true},
+            {title: '终端号', field: 'termCode'},
+            {title: '登录时间', field: 'timeCreate', formatter: 'ts'}
+          ]]
+        }
+      }
+    };
+  };
+})
+;

+ 280 - 0
admin-ui/app/sys/sysRole/dialogHrUserRole.js

@@ -0,0 +1,280 @@
+define(function (require) {
+    return function (context) {
+
+      var $grid1, $grid2, $dlg, $form;
+      var tabIndex = 0, tabSelect = 1;
+      var search = [{
+        queryProperties: ''
+      }, {
+        queryProperties: ''
+      }];
+
+      // 输入搜索文本后点击回车按钮查询列表
+      function enterQueryGrid1(e) {
+        if (e.keyCode === 13) {
+          var tmp = $(this).val();
+          $form.formSet({queryProperties: tmp});
+          queryGrid1();
+          queryGrid2();
+        }
+      }
+
+      //左侧列表
+      function queryGrid1() {
+        $grid1.jqGrid("clearGridData");
+        var obj = $form.formGet();
+        obj.roleId = context.roleId;
+        $grid1.reload({
+          url: api('/hr/userRole/querySys'),
+          mtype: 'POST',
+          queryParams: obj
+        });
+        if ($grid2 != undefined) {
+          $grid2.jqGrid("clearGridData");
+        }
+      }
+
+      //右侧列表
+      function queryGrid2() {
+        $grid2.jqGrid("clearGridData");
+        var obj = $form.formGet();
+        obj.roleId = context.roleId;
+        $grid2.reload({
+          url: api('/sys/sysRole/querySysRoleNot'),
+          mtype: 'POST',
+          queryParams: obj
+        });
+      }
+
+      return {
+        xtype: 'dialog',
+        dialogId: 'dialogHrUserRole',
+        title: '分配角色人员',
+        width: '100%',
+        height: '100%',
+        onOpen: function () {
+          $dlg = $(this);
+          if (context.isEdit) {
+          }
+        },
+        north: {
+          height: 90,
+          split: true,
+          border: false,
+          items: [
+            {
+              xtype: 'toolbar', title: '', items: [
+                {
+                  text: '查询', iconCls: 'fa fa-search', onClick: function () {
+                    if (tabIndex == 0) {
+                      queryGrid1();
+                    } else if (tabIndex == 1) {
+                      queryGrid2();
+                    }
+                  }
+                }, {
+                  text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+                    $form.formClear();
+                    if (tabIndex == 0) {
+                      queryGrid1();
+                    } else if (tabIndex == 1) {
+                      queryGrid2();
+                    }
+                  }
+                }, {
+                  text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+                    $dlg.window('close');
+                  }
+                }
+              ]
+            }, {
+              xtype: 'form',
+              onRender: function () {
+                $form = $(this);
+              },
+              items: [[
+                {name: 'roleId', label: '当前角色 》', labelWidth: 'auto', value: context.roleName, readonly: true},
+                {
+                  xtype: 'textbox',
+                  label: '检索条件',
+                  name: 'queryProperties',
+                  prompt: '姓名/用户名/手机号/部门',
+                  labelWidth: 'auto', events: {keydown: enterQueryGrid1}
+                },
+                {
+                  xtype: 'yvselect', label: '是否分配角色', name: 'hasRole', labelWidth: 'auto', width: 220,
+                  data: [{"id": '', "text": '全部'}, {"id": '0', "text": '未分配'}, {"id": '1', "text": '已分配'}], value: '',
+                  onChange: function () {
+                    if (tabIndex == 0) {
+                      queryGrid1();
+                    } else if (tabIndex == 1) {
+                      queryGrid2();
+                    }
+                  }
+                },
+              ]]
+            }
+          ]
+        },
+        center: {
+          items: {
+            xtype: 'tabs',
+            onRender: function () {
+              var $tabs = $(this);
+              $tabs.tabs('select', tabSelect);
+            },
+            //切换tabs事件
+            onSelect: function (title, index) { //得到第几个grid被选中
+              var obj = $form.formGet();
+              search[0].queryProperties = obj.queryProperties;
+              search[1].queryProperties = obj.queryProperties;
+              var _data = search[index];
+              $form.formSet({
+                queryProperties: _data.queryProperties
+              });
+              tabIndex = index;
+            },
+            items:
+              [
+                {
+                  title: '已选择',
+                  lazy: true,
+                  items: {
+                    onRender: function () {
+                      $grid1 = $(this);
+                      queryGrid1(); //初始化数据
+                    },
+                    xtype: 'grid',
+                    pagination: true,
+                    toolbar: {
+                      xtype: 'toolbar',
+                      title: '已选择的人员',
+                      items: [
+                        {
+                          text: '移除人员', iconCls: 'fa fa-times', onClick: function () {
+                            var row = $grid1.rowData();
+                            if (!row) {
+                              $.yvan.msg('请先选择一行数据');
+                              return;
+                            }
+                            if (row.hurId == undefined || row.hurId == null) {
+                              $.yvan.msg('请先选择一行数据');
+                              return;
+                            }
+                            $.yvan.confirm('确定移除 [' + row.name + ']吗?', {
+                              yes: function () {
+                                $.yvan.ajax({
+                                  url: api('/hr/userRole/delete'),
+                                  method: 'post',
+                                  data: {
+                                    hurId: row.hurId,
+                                      roleName: context.roleName,
+                                      userId:row.userId,
+                                      roleId:row.roleId,
+                                  },
+                                  success: function () {
+                                    $.yvan.msg('操作成功');
+                                    $grid1.reload();
+                                    if ($grid2 != undefined && $grid2 != null) {
+                                      $grid2.reload();
+                                    }
+                                    context.confirm();
+                                  }
+                                });
+                              }
+                            });
+                          }
+                        }
+                      ]
+                    },
+                    columns: [[
+                      {field: 'hurId', title: '选择', hidden: true},
+                      {field: 'sysId', title: '用户ID', hidden: true},
+                      {field: 'userId', title: '用户ID', hidden: true},
+                      {field: 'roleId', title: '用户ID', hidden: true},
+                      {field: 'name', title: '姓名'},
+                      {field: 'gender', title: '性别', align: 'center', formatter: $.fn.fmatter.genderSrc},
+                      {field: 'account', title: '用户名'},
+                      {field: 'mobile', title: '手机号'},
+                      {field: 'deptName', title: '所属部门'},
+                      {field: 'roleName', title: '拥有角色'},
+                      {field: 'timeCreate', title: '加入时间', align: 'center', formatter: 'ts'},
+                    ]],
+                  }
+                },
+                {
+                  title: '待选择',
+                  lazy: true,
+                  items: {
+                    onRender: function () {
+                      $grid2 = $(this);
+                      queryGrid2(); //初始化数据
+                    },
+                    xtype: 'grid',
+                    toolbar: {
+                      xtype: 'toolbar',
+                      title: '待选择的人员', items: [
+                        {
+                          text: '新增人员', iconCls: 'fa fa-plus-circle', onClick: function () {
+                            var row = $grid2.rowData();
+                            if (!row) {
+                              $.yvan.msg('请先选择一行数据');
+                              return;
+                            }
+                            if (row.userId == undefined || row.userId == null) {
+                              $.yvan.msg('请先选择一行数据');
+                              return;
+                            }
+                            var obj = $form.formGet();
+                            if (obj.farmId == "" || obj.farmId == 0) {
+                              $.yvan.msg('请先选择加入的库区');
+                              return;
+                            }
+                            $.yvan.ajax({
+                              url: api('/hr/userRole/insert'),
+                              method: 'post',
+                              data: {
+                                userId: row.userId,
+                                roleId: context.roleId,
+                                sysId: obj.sysId,
+                                  name:row.name,
+                                  roleName:row.roleNames,
+                                  mobile:row.mobile,
+                                  deptNames:row.deptNames,
+                                  jobcard:row.jobcard,
+                                  gender:row.gender,
+                                  xtRoleName:context.roleName,
+                              },
+                              success: function () {
+                                $.yvan.msg('操作成功');
+                                $grid1.reload();
+                                $grid2.reload();
+                                context.confirm();
+                              }
+                            });
+                          }
+                        }
+                      ]
+                    },
+                    columns: [[
+                      {field: 'userId', title: '用户ID', hidden: true},
+                      {field: 'name', title: '姓名'},
+                      {field: 'gender', title: '性别', align: 'center', formatter: $.fn.fmatter.genderSrc},
+                      {field: 'gender', title: '性别', hidden: true},
+                      {field: 'account', title: '用户名'},
+                      {field: 'mobile', title: '手机号'},
+                      {field: 'deptNames', title: '所属部门'},
+                      {field: 'roleNames', title: '拥有角色'},
+                      {field: 'jobcard', title: '职工号', hidden: true},
+                      {field: 'userCreate', title: '新增人', hidden: true},
+                      {field: 'timeCreate', title: '新增时间', hidden: true},
+                    ]]
+                  }
+                }
+              ]
+          }
+        }
+      };
+    };
+  }
+);

+ 124 - 0
admin-ui/app/sys/sysRole/dialogSysRole.js

@@ -0,0 +1,124 @@
+define(function (require) {
+  return function (context) {
+    var $dlg, $form;
+
+    //生成拼音
+    function onblurCustomerName() {
+      $('body').item('roleName').textbox('setValue', $(this).val());
+      var customerName = $('body').item('roleName').textbox("getValue");
+      if (null != customerName && "" != customerName && undefined != customerName) {
+        $('body').item('roleNamePy').val(top.pinyin.getFullChars(customerName));
+        var pinyin = $('body').item('roleNamePy').val();
+        $('body').item('roleNamePy').textbox('setValue', pinyin);
+      }
+    }
+
+    //获取平台列表
+    function getSysList() {
+      var _datas = [];
+      $.yvan.ajax({
+        url: api('/sys/system/query'),
+        data: {status: 1},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].sysId,
+                "text": data.data[i].sysName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogSysRole',
+      title: '角色信息',
+      width: 500,
+      height: 300,
+      onOpen: function () {
+        $dlg = $(this);
+        if (context.isEdit) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/sysRole/getById'),
+            type: 'GET',
+            data: {
+              roleId: context.roleId
+            },
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet(data.data);
+            }
+          });
+        } else {
+          $form.formSet({
+            beActive: 'Y',
+            status: 1,
+            isBase: 0,
+            sysId: context.sysId
+          });
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [
+            [
+              {name: 'roleId', xtype: 'hidden'},
+              {name: 'status', xtype: 'hidden'},
+              {name: 'roleNamePy', xtype: 'hidden'},
+              {
+                name: 'sysId', label: '所属平台', xtype: 'yvselect', width: 400, required: true,
+                disabled: context.isEdit ? "disabled" : "",
+                data: getSysList()
+              },
+              {
+                name: 'roleName',
+                label: '角色名称',
+                required: true,
+                width: 400,
+                maxlength: 50,
+                events: {blur: onblurCustomerName}
+              },
+              {name: 'roleCode', label: '角色编码', required: true, width: 400, maxlength: 20},
+              {name: 'remark', label: '备注', width: 400, maxlength: 200}
+            ]
+          ]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/sysRole/update') : api('/sys/sysRole/insert')),
+              success: function () {
+                $.yvan.msg('操作成功');
+                if (context.isEdit) {
+                  $dlg.window('close');
+                }
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              },
+              error: function (data) {
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 86 - 0
admin-ui/app/sys/sysRole/dialogSysRoleMenu.js

@@ -0,0 +1,86 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $tree;
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogRoleMenu',
+      title: '分配角色菜单',
+      width: 480,
+      height: 600,
+      onOpen: function () {
+        $dlg = $(this);
+        $.yvan.ajax({
+          loadingMask: false,
+          url: api('/sys/sysRole/getMenuBySysIdRoleId'),
+          type: 'GET',
+          data: {
+            operation: context.operation,
+            roleId: context.roleId,
+            sysId: context.sysId
+          },
+          success: function (data) {
+            $dlg.find('form');
+            $dlg.down('tree').tree({
+              checkbox: true,
+              data: data.data
+            }).tree('collapseAll');
+          }
+        });
+      },
+      toolbar: {
+        xtype: 'toolbar',
+        items: [
+          {
+            text: '全部折叠', onClick: function () {
+              $tree.tree('collapseAll');
+            }
+          }, {
+            text: '全部展开', onClick: function () {
+              $tree.tree('expandAll');
+            }
+          }
+        ]
+      },
+      center: {
+        css: {'overflow-x': 'hidden'},
+        items: {
+          onRender: function () {
+            $tree = $(this);
+          },
+          xtype: 'tree',
+          css: {'margin': '5px 10px'}
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            var nodeIds = $tree.tree('getChecked', ['checked', 'indeterminate']).map(function (r) {
+              return r.id;
+            });
+            $.yvan.postJson({
+              url: api('/sys/sysRole/saveSysRoleMenu'),
+              data: {
+                roleId: context.roleId,
+                operation: context.operation,
+                treedata: nodeIds
+              },
+              success: function (data) {
+                $.yvan.msg('操作成功');
+                $dlg.window('close');
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 349 - 0
admin-ui/app/sys/sysRole/querySysRole.js

@@ -0,0 +1,349 @@
+define(function (require) {
+  return function () {
+
+    var $grid1, $grid2, $form;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 查询列表
+    function queryGrid1() {
+      var queryUrl = '/sys/sysRole/query';// 自行替换此参数
+      $grid1.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid1.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryForm
+      }, true);
+      if ($grid2 != undefined) {
+        $grid2.jqGrid("clearGridData");
+      }
+    }
+
+    function queryGrid2(rowid) {
+      var row = $grid1.rowData(rowid);
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var queryUrl = '/hr/userRole/querySys';// 自行替换此参数
+      var queryData = {roleId: row.roleId/*, ownerId: $form.formGet().ownerId*/};// 多个参数自行新增
+      $grid2.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryData
+      });
+    }
+
+    // 更新启停用状态表单1
+    function updateStatus() {
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var obj = {};
+      obj.name = row.roleName; //自行替换此参数
+      obj.status = row.status;
+      obj = setStatusMsg(obj); //返回rtnStatus
+      $.yvan.confirm(obj.msg, {
+        yes: function (index) {
+          $.yvan.ajax({
+            method: 'post',
+            url: api('/sys/sysRole/updateRoleStatus'),
+            data: {
+              roleId: row.roleId, //自行替换此参数
+              status: obj.rtnStatus //自行替换此参数
+            },
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid1.reload();
+            }
+          });
+        }
+      });
+    }
+
+    //更新检验依据状态表单2
+    function updateRoleStatus() {
+      var row = $grid2.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var obj = {};
+      obj.name = row.name;
+      obj.status = row.status;
+      obj = setStatusMsg(obj); //返回rtnStatus
+      $.yvan.confirm(obj.msg, {
+        yes: function (index) {
+          $.yvan.ajax({
+            method: 'post',
+            url: api("/hr/userRole/updateRoleStatus"),
+            data: {
+              hurId: row.hurId,// 自行替换此参数
+              status: obj.rtnStatus   // 自行替换此参数
+            },
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid2.reload();
+            }
+          });
+        }
+      });
+    }
+
+    //获取平台列表
+    function getSysList() {
+      var _datas = [];
+      _datas.push({'id': '', text: '全部'});
+      $.yvan.ajax({
+        url: api('/sys/system/query'),
+        data: {status: 1},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].sysId,
+                "text": data.data[i].sysName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '角色管理';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '角色名称/编码';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1},
+        }, {
+          xtype: 'yvselect',
+          label: '所属平台',
+          name: 'sysId',
+          labelWidth: 'auto',
+          width: 260,
+          data: getSysList(),
+          onChange: function () {
+            queryGrid1();
+          }
+        }, {
+          xtype: 'yvselect', label: '启用状态', name: 'status', labelWidth: 'auto', width: 180, value: '',
+          data: $.yvan.sysDict('status').combowithAll(),
+          onChange: function () {
+            queryGrid1();
+          }
+        }
+      ]]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle1 = '角色列表';// 自行替换此参数
+    var gridToolbar1 = {
+      xtype: 'toolbar',
+      title: gridToolbarTitle1,
+      items: [
+        {
+          text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+            $.yvan.showDialog(this,
+              require('/app/sys/sysRole/dialogSysRole.js')({
+                isEdit: false,
+                confirm: function () {
+                  $grid1.reload();
+                },
+                sysId: $form.formGet().sysId,
+              })
+            );
+          }
+        }, {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid1.rowData();
+            if (!row) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            $.yvan.showDialog(this,
+              require('/app/sys/sysRole/dialogSysRole.js')({
+                confirm: function () {
+                  $grid1.reload();
+                },
+                isEdit: true,
+                roleId: row.roleId
+              })
+            );
+          }
+        }, {
+          text: '启用/停用', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+            updateStatus();
+          }
+        }, {
+          text: '分配权限', iconCls: 'fa fa-check-square', onClick: function () {
+            var row = $grid1.rowData();
+            if (!row) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            $.yvan.showDialog(this,
+              require('/app/sys/sysRole/dialogSysRoleMenu.js')({
+                confirm: function () {
+                  $grid1.reload();
+                },
+                isEdit: true,
+                operation: 1,
+                roleId: row.roleId,
+                sysId: row.sysId
+              })
+            );
+          }
+        }, {
+              text: '分配可写权限', iconCls: 'fa fa-check-square', onClick: function () {
+                  var row = $grid1.rowData();
+                  if (!row) {
+                      $.yvan.msg('请先选择一行数据');
+                      return;
+                  }
+                  $.yvan.showDialog(this,
+                      require('/app/sys/sysRole/dialogSysRoleMenu.js')({
+                          confirm: function () {
+                              $grid1.reload();
+                          },
+                          isEdit: true,
+                          operation: 2,
+                          roleId: row.roleId,
+                          sysId: row.sysId
+                      })
+                  );
+              },
+              onRender: function () {
+                  $2 = $(this);
+                  // $2.closest('.vv').hide();
+              },
+          }
+      ]
+    };
+
+    // 列表2增删改查按钮
+    var gridToolbarTitle2 = '人员列表';// 自行替换此参数
+    var gridToolbar2 = {
+      xtype: 'toolbar',
+      title: gridToolbarTitle2,
+      items: [
+        {
+          text: '启用/停用', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+            updateRoleStatus();
+          }
+        }
+      ]
+    };
+
+    return {
+      north: {
+        height: 90,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm
+        ]
+      },
+      west: {
+        width: "60%",
+        split: true,
+        border: false,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+          },
+          xtype: 'grid',
+          pagination: false,
+          toolbar: gridToolbar1,
+          idField: 'roleId',
+          title: '角色列表',
+          columns: [[
+            {title: '角色ID', field: 'roleId', hidden: true},
+            {title: '平台ID', field: 'sysId', hidden: true},
+            {title: '角色名称', field: 'roleName'},
+            {title: '角色编码', field: 'roleCode'},
+            {title: '备注', field: 'remark'},
+            {title: '人数', field: 'numUser', align: "right"},
+            {title: '菜单数', field: 'numMenu', align: "right"},
+            {title: '所属平台', field: 'sysName', hidden: true},
+            {title: '状态', field: 'status', hidden: true},
+            {title: '启用状态', field: 'statusCN', align: "center", formatter: $.fn.fmatter.statusView},
+            {title: '新增时间', field: 'timeCreate', formatter: 'ts', align: "center"},
+            {title: '更新时间', field: 'timeUpdate', formatter: 'ts', align: "center"}
+          ]],
+          onSelectRow: function (rowid) {
+            queryGrid2(rowid);
+          }
+        }
+      },
+      center: {
+        height: '40%',
+        items: {
+          onRender: function () {
+            $grid2 = $(this);
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar2,
+          idField: 'hurId',
+          title: '人员列表',
+          columns: [[
+            {title: '账号ID', field: 'hurId', hidden: true},
+            {title: '登录账号', field: 'sysId', hidden: true},
+            {title: '用户ID', field: 'userId', hidden: true},
+            {title: '姓名', field: 'name'},
+            {title: '启用状态', field: 'status', hidden: true},
+            {title: '启用状态', field: 'statusView', align: "center", formatter: $.fn.fmatter.accountStatusView},
+            {title: '新增人', field: 'userCreate', hidden: true},
+            {title: '加入时间', field: 'timeCreate', formatter: 'ts', align: "center"},
+            {title: '更新人', field: 'userUpdate', hidden: true},
+            {title: '更新时间', field: 'timeUpdate', formatter: 'ts', align: "center"}
+          ]]
+        }
+      }
+    };
+  };
+});

+ 116 - 0
admin-ui/app/sys/sysUnit/dialogSysUnit.js

@@ -0,0 +1,116 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form;
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogSysUnit',
+      title: '单位信息维护',
+      width: 650,
+      height: 350,
+      onOpen: function () {
+        $dlg = $(this);
+        if (context.isEdit) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/sysUnit/getById'),
+            type: 'GET',
+            data: {
+              unitId: context.unitId
+            },
+            success: function (data) {
+              $dlg.find('form');
+              if (!isNotNull(data) || !isNotNull(data.data)) {
+                return;
+              }
+              $form.formSet(data.data);
+            }
+          });
+        } else {
+          $form.formSet({
+            beActive: 'Y',
+            status: 1,
+            isBase: 0,
+            unitType: context.unitType
+          });
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          subLabelWidth: '100',
+          subControlWidth: '200',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [[
+            {name: 'unitId', xtype: 'hidden'},   // no hidden: true
+            {
+              name: 'unitType', label: '单位类型', xtype: 'yvselect', required: true,
+              data: $.yvan.sysDict('unitType').combo(),
+              onChange: function (data) {
+                var apiData = {
+                  unitType: $form.formGet().unitType
+                };
+                $.yvan.ajax({
+                  method: 'get',
+                  url: api('/sys/sysUnit/getUnitBase'),
+                  data: apiData,
+                  success: function (data) {
+                    var unitName = "";
+                    if (data.data != null) {
+                      unitName = data.data.unitName;
+                      $form.formSet({
+                        unitBase: unitName,
+                        isBase: 0
+                      });
+                    }
+                  }
+                });
+              }
+            },
+            {
+              name: 'isBase', label: '基础单位', xtype: 'yvselect', required: true,
+              data: $.yvan.sysDict('yesOrNo').combo()
+            },
+            {name: 'unitName', label: '单位名称', required: true, ff: 500},
+            {name: 'unitMark', label: '符号', required: true, ff: 500},
+            {name: 'unitVal', label: '转换值'},
+            {name: 'unitBase', label: '基础单位', readonly: true},
+            {name: 'sort', label: '排序'},
+            {
+              name: 'status', label: '状态', xtype: 'yvselect', required: true,
+              data: $.yvan.sysDict('status').combo()
+            },
+            {name: 'remark', label: '备注', span: 2, height: 45, multiline: true, ff: 500},
+          ]]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/sysUnit/update') : api('/sys/sysUnit/insert')),
+              success: function () {
+                $.yvan.msg('操作成功');
+                if (context.isEdit) {
+                  $dlg.window('close');
+                }
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              },
+              error: function (data) {
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 106 - 0
admin-ui/app/sys/sysUnit/dialogSysUnitConver.js

@@ -0,0 +1,106 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form;
+
+    //获取单位信息
+    function getUnitList() {
+      var _datas = [];
+      $.yvan.ajax({
+        url: api('/sys/sysUnit/queryAll'),
+        data: {unitType: context.unitType, unitId: context.unitIdA},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].unitId,
+                "text": data.data[i].unitName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogSysUnitConver',
+      title: '换算信息',
+      width: 900,
+      height: 200,
+      onOpen: function () {
+        $dlg = $(this);
+        if (context.isEdit) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/sysUnitCv/getById'),  // 需要改,不然不能显示非数据库中的字段信息
+            type: 'GET',
+            data: {
+              converId: context.converId,
+            },
+            success: function (data) {
+              $dlg.find('form');
+              if (!isNotNull(data) || !isNotNull(data.data)) {
+                return;
+              }
+
+              $form.formSet(data.data);
+            }
+          });
+        } else {
+          $form.formSet({
+            beActive: 'Y'
+          });
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [[
+            {name: 'converId', xtype: 'hidden'},
+            {name: 'numa', label: '转换单位A', required: true},
+            {name: 'unitIda', label: '转换单位A', value: context.unitIdA, xtype: 'hidden'},
+            {name: 'numb', label: context.unitNameA + '=', required: true},
+            {
+              name: 'unitIdb',
+              label: '转换单位B',
+              xtype: 'yvselect',
+              required: true,
+              panelHeight: 220,
+              data: getUnitList(),
+              ff: 500,
+            },
+          ]]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/sysUnitCv/update') : api('/sys/sysUnitCv/insert')),
+              success: function () {
+                $.yvan.msg('操作成功');
+                if (context.isEdit) {
+                  $dlg.window('close');
+                }
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 119 - 0
admin-ui/app/sys/sysUnit/dialogSysUnitSort.js

@@ -0,0 +1,119 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $grid;
+
+    // 查询列表
+    function queryGrid1() {
+      var queryUrl = '/sys/sysUnit/queryAll';// 自行替换此参数
+      $grid.jqGrid("clearGridData");
+      $grid.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: {"unitType": context.unitType}
+      });
+    }
+
+    //编辑工具栏
+    var gridToolbarTitle = '单位列表';// 自行替换此参数
+    var gridToolbar = {
+      xtype: 'toolbar', title: gridToolbarTitle, items: [
+        {
+          text: '上移', iconCls: 'fa fa-arrow-up', onClick: function () {
+            $grid.moveUp();
+          }
+        },
+        {
+          text: '下移', iconCls: 'fa fa-arrow-down', onClick: function () {
+            $grid.moveDown();
+          }
+        },
+        {
+          text: '保存排序', iconCls: 'fa fa-check-square', onClick: function () {
+            moveGrid();
+          }
+        }
+      ]
+    }
+
+    //保存排序
+    function moveGrid() {
+      var gridData = $grid.jqGrid("getRowData");
+      var list = [];
+      for (var i = 0; i < gridData.length; i++) {
+        list.push(gridData[i].unitId);
+      }
+      saveSort("sysUnit", list);
+    }
+
+    function saveSort(name, ids) {
+      var data = {
+        "ids": "",
+        "name": name
+      };
+      for (var i = 0; i < ids.length; i++) {
+        data.ids += ids[i] + ","
+      }
+      data.ids = data.ids.substr(0, data.ids.length - 1);
+      if (data.ids == "") {
+        return;
+      }
+      $.yvan.ajax({
+        url: api('/core/app/updateCoreSort'),
+        method: 'post',
+        data: data,
+        beforeSend: function () {
+          $.yvan.progress();
+        },
+        success: function () {
+          $.yvan.msg('操作成功');
+          $dlg.window('close');
+          if ($.type(context.confirm) === 'function') {
+            context.confirm();
+          }
+        },
+        complete: function () {
+          $.yvan.closep();
+        }
+      });
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogSysUnitSort',
+      title: '维护单位排序',
+      width: 700,
+      height: 600,
+      onOpen: function () {
+        $dlg = $(this);
+      },
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          pagination: false,
+          idField: "sysUnitSort",
+          toolbar: {
+            xtype: 'div',
+            items: [
+              gridToolbar
+            ]
+          },
+          columns: [[
+            {title: '单位Id', field: 'unitId', hidden: true},
+            {title: '单位类型', field: 'unitType', hidden: true},
+            {title: '单位名称', field: 'unitName'},
+            {title: '单位编码', field: 'unitMark'},
+            {title: '基础单位', field: 'isBase', align: 'center', formatter: $.fn.fmatter.yesOrNo},
+            {title: '启用状态', field: 'status', align: 'center', formatter: $.fn.fmatter.statusView}, //增加字典,显示正常
+            {title: '备注', field: 'remark'},
+          ]]
+        }
+      }
+    };
+  };
+});

+ 122 - 0
admin-ui/app/sys/sysUnit/dialogUnitConver.js

@@ -0,0 +1,122 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form;
+
+    //获取单位信息
+    function getUnitList() {
+      var _datas = [];
+      $.yvan.ajax({
+        url: api('/sys/sysUnit/queryAll'),
+        data: {unitType: context.unitType},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].unitName,
+                "text": data.data[i].unitName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    function unitConver() {
+      var unitVal = $form.formGet().unitVal;
+      var unitA = $form.formGet().unitA;
+      var unitB = $form.formGet().unitB;
+      if (unitA == "" || unitB == "" || unitVal == "")
+        return;
+      var apiData = {
+        unitVal: $form.formGet().unitVal,
+        unitA: $form.formGet().unitA,
+        unitB: $form.formGet().unitB,
+      };
+      $.yvan.ajax({
+        method: 'post',
+        url: api('/sys/sysUnitCv/getConverVal'),
+        data: apiData,
+        success: function (data) {
+          //$form.setValue("unitConver", data.data.unitCv)
+          //$.yvan.msg(data.data);
+          $form.formSet({
+            unitConver: data.data
+          });
+        }
+      });
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogUnitConver',
+      title: '换算信息',
+      width: 900,
+      height: 200,
+      onOpen: function () {
+        $dlg = $(this);
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [[
+            {
+              name: 'unitVal', label: '换算值', required: true,
+              onChange: function () {
+                unitConver();
+              }
+            },
+            {
+              name: 'unitA',
+              label: '',
+              xtype: 'yvselect',
+              required: true,
+              value: context.unitA,
+              panelHeight: 220,
+              width: 100,
+              data: getUnitList(),
+              onChange: function () {
+                unitConver();
+              }
+            },
+            {
+              name: 'unitB',
+              label: '',
+              xtype: 'yvselect',
+              required: true,
+              panelHeight: 220,
+              width: 100,
+              data: getUnitList(),
+              onChange: function () {
+                unitConver();
+              }
+            },
+            {name: 'unitConver', label: '换算率'},
+          ]]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: api('/sys/sysUnitCv/getConverVal'),
+              success: function (data) {
+                alert(data);
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 348 - 0
admin-ui/app/sys/sysUnit/querySysUnit.js

@@ -0,0 +1,348 @@
+define(function (require) {
+  return function () {
+
+    var $grid1, $grid2, $form;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 查询列表
+    function queryGrid1() {
+      clearGrid($grid1);
+      clearGrid($grid2);
+      $grid1.reload({
+        mtype: 'POST',
+        url: api('/sys/sysUnit/query'),
+        queryParams: $form.formGet()
+      }, true);
+    }
+
+    function queryGrid2(rowid) {
+      var row = $grid1.rowData(rowid);
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      clearGrid($grid2);
+      //控制分页界面里的数据显示
+      var queryUrl = '/sys/sysUnitCv/query';// 自行替换此参数
+      var queryData = {unitIdA: row.unitId, unitNameA: row.unitName,};// 多个参数自行新增
+      $grid2.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryData
+      });
+    }
+
+    // 删除
+    function deleteRow1() {
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      $.yvan.confirm('确定要删除[' + row.unitName + ']吗?', {
+        yes: function (index) {
+          $.yvan.ajax({
+            method: 'post',
+            url: api('/sys/sysUnit/delete'),
+            data: {
+              unitId: row.unitId,
+              flagDel: 1
+            },
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid1.reload();
+            }
+          });
+        }
+      });
+    }
+
+    // 删除
+    function deleteRow2() {
+      var row = $grid2.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      $.yvan.confirm('确定要删除该单位换算吗?', {
+          yes: function (index) {
+            $.yvan.ajax({
+              method: 'post',
+              url: api('/sys/sysUnitCv/delete'),
+              data: {
+                converId: row.converId,
+              },
+              success: function (data) {
+                $.yvan.msg(data.msg);
+                $grid1.reload();
+              }
+            });
+          }
+        }
+      );
+    }
+
+    // 搜索按钮  页面第一行
+    var queryToolbarTitle = '物资单位管理';
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件  页面第二行
+    var queryFormPrompt = '单位名称/编码';
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1},
+        },
+        {
+          xtype: 'yvselect', label: '单位类型', name: 'unitType', labelWidth: 'auto', width: 180, value: '',
+          data: $.yvan.sysDict('unitType').combowithAll(),
+          onChange: function () {
+            queryGrid1();
+          }
+        },
+        {
+          xtype: 'yvselect', label: '启用状态', name: 'status', labelWidth: 'auto', width: 180, value: '',
+          data: $.yvan.sysDict('status').combowithAll(),  //字典值不对应吗
+          onChange: function () {
+            queryGrid1();
+          }
+        },
+      ]]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle = '单位列表';
+    var gridToolbar1 = {
+      xtype: 'toolbar', title: gridToolbarTitle,
+      items: [
+        {
+          text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+            var dlg = require('/app/sys/sysUnit/dialogSysUnit.js')({// 自行替换此参数
+              isEdit: false,
+              unitType: $form.formGet().unitType,
+              confirm: function () {
+                $grid1.reload();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }, {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid1.rowData();
+            if (!row) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            var dlg = require('/app/sys/sysUnit/dialogSysUnit.js')({// 自行替换此参数
+              isEdit: true,
+              unitId: row.unitId,// 自行替换此参数
+              unitType: $form.formGet().unitType,
+              confirm: function () {
+                $grid1.reload();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }, {
+          text: '单位排序', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid1.rowData();
+            if (!row) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            $.yvan.showDialog(this,
+              require('/app/sys/sysUnit/dialogSysUnitSort.js')({
+                confirm: function () {
+                  $grid1.reload();
+                },
+                unitType: row.unitType,
+              })
+            );
+          }
+        },
+        // {
+        //   text: '维护', iconCls: 'fa fa-plus-circle', onClick: function () {
+        //     var row = $grid1.rowData();
+        //     if (!row) {
+        //       $.yvan.msg('请先选择一行数据');
+        //       return;
+        //     }
+        //     var dlg = require('/app/sys/sysUnit/dialogUnitConver.js')({// 自行替换此参数
+        //       unitA: row.unitId,// 自行替换此参数
+        //       unitType: row.unitType,
+        //       confirm: function () {
+        //         queryGrid1();
+        //       }
+        //     });
+        //     $.yvan.showDialog(this, dlg);
+        //   }
+        // },
+        {
+          text: '删除', iconCls: 'fa fa-trash-o fa-lg', onClick: function () {
+            deleteRow1();  //调用前面的函数
+          }
+        }
+      ]
+    }
+
+    // 列表2增删改查按钮
+    var gridToolbarTitle2 = '换算列表';// 自行替换此参数
+    var gridToolbar2 = {
+      xtype: 'toolbar',
+      title: gridToolbarTitle2,
+      items: [
+        {
+          text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+            var row = $grid1.rowData();
+            if (!row) {
+              $.yvan.msg('请选中一条单位信息后,再进行该操作');
+              return;
+            }
+            $.yvan.showDialog(this,
+              require('/app/sys/sysUnit/dialogSysUnitConver.js')({
+                isEdit: false,
+                unitIdA: row.unitId, //imp
+                unitType: row.unitType, //imp
+                unitNameA: row.unitName, //imp
+                confirm: function () {
+                  $grid1.reload();
+                }
+              })
+            );
+          }
+        },
+        {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row1 = $grid1.rowData();
+            if (!row1) {
+              $.yvan.msg('请选中一条单位信息后,再进行该操作');
+              return;
+            }
+            var row2 = $grid2.rowData();
+            if (!row2) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            $.yvan.showDialog(this,
+              require('/app/sys/sysUnit/dialogSysUnitConver.js')({
+                isEdit: true,
+                converId: row2.converId,
+                unitIdA: row1.unitId, //imp
+                unitType: row1.unitType, //imp
+                unitNameA: row1.unitName, //imp
+                confirm: function () {
+                  $grid1.reload();
+                }
+              })
+            );
+          }
+        },
+        {
+          text: '删除', iconCls: 'fa fa-trash-o fa-lg', onClick: function () {
+            deleteRow2();
+          }
+        }
+      ]
+    };
+
+    return {
+      north: {
+        height: 90,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm
+        ]
+      },
+      west: {
+        width: "55%",
+        split: true,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar1,
+          idField: "unitId",
+          title: '单位列表',
+          columns: [[
+            {title: '单位Id', field: 'unitId', hidden: true},
+            {title: '单位类型', field: 'unitType', align: 'center', formatter: $.fn.fmatter.unitType},
+            {title: '单位类型', field: 'unitType', hidden: true},
+            {title: '单位名称', field: 'unitName'},
+            {title: '单位编码', field: 'unitMark'},
+            {title: '转换值', field: 'unitVal'},
+            {title: '基础单位', field: 'isBase', align: 'center', formatter: $.fn.fmatter.yesOrNo},
+            {title: '转换数', field: 'num', align: 'center'},
+            {title: '排序', field: 'sort', align: 'center'},
+            {title: '启用状态', field: 'status', align: 'center', formatter: $.fn.fmatter.statusView}, //增加字典,显示正常
+            {title: '备注', field: 'remark'},
+            {title: '新增人', field: 'userCreate', hidden: true},
+            {title: '新增时间', field: 'timeCreate', align: 'center', formatter: 'ts'},
+            {title: '修改人', field: 'userUpdate', hidden: true},
+            {title: '修改时间', field: 'timeUpdate', align: 'center', formatter: 'ts'}, //同步时间
+          ]],
+          onSelectRow: function (rowid) {
+            queryGrid2(rowid);
+          }
+        }
+      },
+      center: {
+        height: '45%',
+        border: false,
+        items: {
+          onRender: function () {
+            $grid2 = $(this);
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar2,
+          idField: 'converId',
+          title: '换算信息',
+          columns: [[
+            {title: '换算Id', field: 'converId', hidden: true},
+            {title: '数值A', field: 'numa', align: 'center', hidden: true},
+            {title: '单位A', field: 'unitNameA', align: 'center', hidden: true},
+            {title: '转换值', field: 'numb', align: 'right'},
+            {title: '转换单位', field: 'unitNameB', align: 'center'},
+          ]]
+        }
+      }
+    };
+  };
+});

+ 103 - 0
admin-ui/app/sys/system/dialogSystem.js

@@ -0,0 +1,103 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form;
+
+    //生成拼音
+    function onblurCustomerName() {
+      $('body').item('sysName').textbox('setValue', $(this).val());
+      var customerName = $('body').item('sysName').textbox("getValue");
+      if (null != customerName && "" != customerName && undefined != customerName) {
+        $('body').item('sysNamePy').val(top.pinyin.getFullChars(customerName));
+        var pinyin = $('body').item('sysNamePy').val();
+        $('body').item('sysNamePy').textbox('setValue', pinyin);
+      }
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogSystem',
+      title: '平台信息',
+      width: 610,
+      height: 350,
+      onOpen: function () {
+        $dlg = $(this);
+        if (context.isEdit) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/system/getById'),
+            type: 'GET',
+            data: {
+              sysId: context.sysId
+            },
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet(data.data);
+            }
+          });
+        } else {
+          $form.formSet({
+            status: '1'
+          });
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [
+            [
+              {name: 'sysId', xtype: 'hidden'},
+              {name: 'sysCode', label: '平台编码', required: true, disabled: context.isEdit ? "disabled" : ""},
+              {
+                name: 'status',
+                label: '启用状态',
+                xtype: 'yvselect',
+                required: true,
+                data: $.yvan.bizDict('status').combo()
+              }
+            ],
+            [
+              {name: 'sysName', label: '平台名称', required: true, events: {blur: onblurCustomerName}},
+              {name: 'sysNamePy', label: '名称拼音', readonly: true}
+            ],
+            [
+              {name: 'sysUrl', label: 'URL地址', width: '560px', required: true, prompt: ':8000/index.html'}
+            ],
+            [
+              {
+                name: 'sysDesp', label: '说明', width: '560px', height: '90px', multiline: true
+              }
+            ]
+          ]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/system/update') : api('/sys/system/insert')),
+              success: function () {
+                $.yvan.msg('操作成功');
+                if (context.isEdit) {
+                  $dlg.window('close');
+                }
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              },
+              error: function (data) {
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 184 - 0
admin-ui/app/sys/system/querySystem.js

@@ -0,0 +1,184 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid, $form;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 查询列表
+    function queryGrid1() {
+      var queryUrl = '/sys/system/query';// 自行替换此参数
+      $grid.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryForm
+      });
+    }
+
+    // 更新启用停用状态
+    function updateStatus() {
+      var row = $grid.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var obj = {};
+      obj.name = row.sysName;// 自行替换此参数
+      obj.status = row.status;
+      obj.isTree = 0;// 树为1,非树为0
+      obj = setStatusMsg(obj); //返回rtnStatus
+      var msg = obj.msg;
+      var status = obj.rtnStatus;
+      /*|-----------------------自行替换start-----------------------*/
+      var apiUrl = '/sys/system/updateStatus';// 自行替换此参数
+      var apiData = {
+        sysId: row.sysId,// 自行替换此参数
+        status: status
+      };
+      /*-----------------------自行替换end-----------------------|*/
+      $.yvan.confirm(msg, {
+        yes: function (index) {
+          $.yvan.ajax({
+            method: 'post',
+            url: api(apiUrl),
+            data: apiData,
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid.reload();
+            }
+          });
+        }
+      });
+    }
+
+    //检索工具栏
+    var queryToolbarTitle = '平台管理';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe();
+          }
+        }
+      ]
+    };
+
+    //检索条件表单
+    var queryFormPrompt = '平台名称/编码/说明';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1}
+        }, {
+          xtype: 'yvselect', label: '启用状态', name: 'status', labelWidth: 'auto', width: 180, value: '',
+          data: $.yvan.sysDict('status').combowithAll(),
+          onChange: function () {
+            queryGrid1();
+          }
+        }
+      ]]
+    };
+
+    //编辑工具栏
+    var gridToolbarTitle = '平台列表';// 自行替换此参数
+    var gridToolbar = {
+      xtype: 'toolbar', title: gridToolbarTitle, items: [
+        {
+          text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+            $.yvan.showDialog(this,
+              require('/app/sys/system/dialogSystem.js')({
+                confirm: function () {
+                  $grid.reload();
+                },
+                isEdit: false
+              })
+            );
+          }
+        }, {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid.rowData();
+            if (!row) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            $.yvan.showDialog(this,
+              require('/app/sys/system/dialogSystem.js')({
+                confirm: function () {
+                  $grid.reload();
+                },
+                isEdit: true,
+                sysId: row.sysId
+              })
+            );
+          }
+        }, {
+          text: '启用/停用', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+            updateStatus();
+          }
+        }
+      ]
+    }
+
+    return {
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+            queryGrid1(); //初始化数据
+          },
+          xtype: 'grid',
+          idField: "sysId",
+          toolbar: {
+            xtype: 'div',
+            items: [
+              queryToolbar,
+              queryForm,
+              gridToolbar
+            ]
+          },
+          columns: [[
+            {title: '平台ID', field: 'sysId', hidden: true},
+            {title: '平台名称', field: 'sysName'},
+            {title: '平台编码', field: 'sysCode', align: "center"},
+            {title: 'URL地址', field: 'sysUrl'},
+            {title: '助记码', field: 'sysCodeM', hidden: true},
+            {title: '名称拼音', field: 'sysNamePy', hidden: true},
+            {title: '说明', field: 'sysDesp'},
+            {title: '状态', field: 'status', hidden: true},
+            {title: '启用状态', field: 'statusCN', align: "center", formatter: $.fn.fmatter.statusView},
+            {title: '新增时间', field: 'timeCreate', formatter: 'ts', align: "center"},
+            {title: '更新时间', field: 'timeUpdate', formatter: 'ts', align: "center"}
+          ]]
+        }
+      }
+    };
+  };
+});

+ 76 - 0
admin-ui/app/sys/user/dialogUser.js

@@ -0,0 +1,76 @@
+define(function (require) {
+    return function (context) {
+
+      var $dlg;
+
+      return {
+        xtype: 'dialog',
+        dialogId: 'dialogUser',
+        title: context.isEdit ? '新增' : '编辑' + '用户代理',
+        width: 400,
+        height: 460,
+        onOpen: function () {
+          console.log('onBeforeClose');
+          $dlg = $(this);
+          $dlg.formSet(context.row);
+        },
+        center: {
+          items: {
+            xtype: 'form',
+            items: [
+              [{name: 'userAgentId', xtype: 'hidden'}],
+              [{name: 'branchId', label: '子机构代码', required: true}],
+              [{
+                name: 'beActive',
+                label: '启用状态',
+                required: true,
+                xtype: 'yvselect',
+                data: [{id: 'Y', text: '启用'}, {id: 'N', text: '禁用'}, {id: 'D', text: '删除'}]
+              }],
+              [{name: 'loginName', label: '账号', required: true}],
+              [{name: 'loginType', label: '登录类型', required: true, xtype: 'yvselect', data: [{id: 'pwd', text: '账号密码'}]}],
+              [{name: 'agentType', label: '登录账户类型', required: true}],
+              [{name: 'dataId', label: '实体ID', required: true}],
+              [{name: 'linkName', label: '显示名称', required: true}],
+            ]
+          }
+        },
+        buttons: [
+          {
+            text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+              //关闭方法
+              $dlg.window('close');
+            }
+          },
+          {
+            text: '保存', iconCls: 'fa fa-save', onClick: function () {
+              var newData = $dlg.formGet();
+              if (newData.branchId === null || newData.branchId === '') {
+                $.yvan.msg('请填写子机构代码');
+                return;
+              }
+              var url = '/sys/userAgent/edit';
+              if (context.isEdit === false) {
+                url = '/sys/userAgent/add';
+              }
+              $.yvan.ajax({
+                url: api(url),
+                contentType: "application/json; charset=utf-8",
+                data: JSON.stringify(newData),
+                method: 'post',
+                success: function (data) {
+                  $.yvan.msg(data.msg);
+                  $dlg.window('close');
+                  context.ok();
+                },
+                error: function (data) {
+                  $.yvan.msg(data.msg);
+                }
+              });
+            }
+          }
+        ]
+      }
+    }
+  }
+);

+ 181 - 0
admin-ui/app/sys/user/queryUser.js

@@ -0,0 +1,181 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid, $form;
+
+    function queryGrid1() {
+      $grid.jqGrid("clearGridData"); // 清除表格数据
+      var obj = $form.formGet();
+      $grid.reload({
+        url: api('/sys/userAgent/query'),
+        mtype: 'POST',
+        queryParams: obj
+      });
+    }
+
+    return {
+      onRender: function () {
+        queryGrid1();
+      },
+      north: {
+        border: false,
+        split: true,
+        height: 90,
+        items: [{
+          xtype: 'toolbar',
+          title: '用户管理',
+          items: [
+            {
+              text: '查询', iconCls: 'fa fa-search', onClick: function () {
+                queryGrid1();
+              }
+            },
+            {
+              text: '重置', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+                $form.formClear();
+                queryGrid1();
+              }
+            },
+            {
+              text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+                var dlg = require('/app/sys/user/dialogUser.js')({
+                  isEdit: false,
+                  ok: function () {
+                    $grid.reload();
+                  }
+                });
+                $.yvan.showDialog(this, dlg);
+              }
+            },
+            {
+              text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+                var row = $grid.rowData();
+                if (!row) {
+                  $.yvan.msg('请选择一行数据');
+                }
+                var dlg = require('/app/sys/user/dialogUser.js')({
+                  isEdit: true,
+                  row: row,
+                  ok: function () {
+                    $grid.reload();
+                  }
+                });
+                $.yvan.showDialog(this, dlg);
+              }
+            },
+            {
+              text: '删除', iconCls: 'fa fa-trash-o fa-lg', onClick: function () {
+                var row = $grid.rowData();
+                if (!row) {
+                  $.yvan.msg('请先选择一行数据');
+                  return;
+                }
+                $.yvan.confirm('确定删除[' + row.loginName + "] ?", {
+                  yes: function () {
+                    $.yvan.ajax({
+                      url: api('/sys/userAgent/delete'),
+                      data: {
+                        userAgentId: row.userAgentId
+                      },
+                      method: 'post',
+                      success: function (data) {
+                        $.yvan.msg(data.msg);
+                        $grid.reload();
+                      },
+                      error: function (data) {
+                        $.yvan.msg(data.msg);
+                      }
+                    });
+                  }
+                });
+              }
+            },
+            {
+              text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+                App.closeMe();
+              }
+            }
+          ]
+        }, {
+          xtype: 'form',
+          onRender: function () {
+            $form = $(this);//
+          },
+          items: [[
+            {name: 'loginType', label: '登录类型', xtype: 'yvselect', data: [{id: 'pwd', text: '账号密码'}]},
+            {name: 'loginName', label: '登录账号'},
+            {
+              name: 'beActive',
+              label: '启用状态',
+              xtype: 'yvselect',
+              data: [{id: 'Y', text: '启用'}, {id: 'N', text: '禁用'}, {id: 'D', text: '删除'}]
+            }
+          ]]
+        }]
+      },
+      center: {
+        border: true,
+        split: true,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+          },
+          xtype: 'tabs',
+          onSelect: function (title, index) {
+          },
+          items: [{
+            title: '主信息',
+            // lazy: true,
+            items: {
+              xtype: 'grid',
+              toolbar: {
+                xtype: 'toolbar',
+                title: '用户列表'
+              },
+              idField: 'userAgentId',
+              columns: [[
+                {field: 'userAgentId', hidden: true},
+                {field: 'branchId', title: '子机构代码'},
+                {field: 'loginName', title: '账号'},
+                {field: 'loginType', title: '登录类型', formatter: 'lt'},
+                {field: 'agentType', title: '登录账户类型'},
+                {field: 'dataId', title: '实体ID'},
+                {field: 'linkName', title: '显示名称'},
+                {field: 'tokenVersion', title: 'token版本号'},
+                {field: 'loginCount', title: '登录次数'},
+                {field: 'beActive', title: '是否删除', formatter: 'ba'},
+                {field: 'lastLoginTime', title: '最后登陆时间', formatter: 'ts'}
+              ]]
+            }
+          }, {
+            title: '主信息2',
+            onRender: function () {
+            },
+            // lazy: true,
+            items: {
+              xtype: 'grid',
+              toolbar: {
+                xtype: 'toolbar',
+                title: '用户列表'
+              },
+              idField: 'userAgentId',
+              columns: [[
+                {field: 'userAgentId', hidden: true},
+                {field: 'branchId', title: '子机构代码'},
+                {field: 'loginName', title: '账号'},
+                {field: 'loginType', title: '登录类型', formatter: 'lt'},
+                {field: 'agentType', title: '登录账户类型'},
+                {field: 'dataId', title: '实体ID'},
+                {field: 'linkName', title: '显示名称'},
+                {field: 'tokenVersion', title: 'token版本号'},
+                {field: 'loginCount', title: '登录次数'},
+                {field: 'beActive', title: '是否删除', formatter: 'ba'},
+                {field: 'lastLoginTime', title: '最后登陆时间', formatter: 'ts'}
+              ]]
+            }
+          }]
+        }
+      }
+    }
+  }
+});

+ 119 - 0
admin-ui/app/sys/wf/dialogWf.js

@@ -0,0 +1,119 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form;
+
+    //获取平台列表
+    function getSysList() {
+      var _datas = [];
+      $.yvan.ajax({
+        url: api('/sys/system/query'),
+        data: {status: 1},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].sysId,
+                "text": data.data[i].sysName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogWf',
+      title: '业务流程信息',
+      width: 620,
+      height: 300,
+      onOpen: function () {
+        $dlg = $(this);
+        if (context.isEdit) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/wf/getById'),
+            type: 'GET',
+            data: {
+              wfId: context.wfId
+            },
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet(data.data);
+            }
+          });
+        } else {
+          $form.formSet({
+            status: '1',
+            sysId: context.sysId
+          });
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [
+            [
+              {
+                name: 'sysId',
+                label: '所属平台',
+                xtype: 'yvselect',
+                required: true,
+                disabled: context.isEdit ? "disabled" : "",
+                data: getSysList()
+              },
+              {
+                name: 'status',
+                label: '启用状态',
+                xtype: 'yvselect',
+                required: true,
+                data: $.yvan.sysDict('status').combo()
+              },
+            ],
+            [
+              {name: 'wfId', xtype: 'hidden'},
+              {name: 'wfName', label: '流程名称', required: true},
+              {name: 'wfCode', label: '流程编码', required: true}
+            ],
+            [
+              {
+                name: 'wfDesp', label: '流程说明', span: 2, height: '60px', multiline: true
+              }
+            ]
+          ]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/wf/update') : api('/sys/wf/insert')),
+              success: function () {
+                $.yvan.msg('操作成功');
+                if (context.isEdit) {
+                  $dlg.window('close');
+                }
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              },
+              error: function (data) {
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 218 - 0
admin-ui/app/sys/wf/dialogWfStep.js

@@ -0,0 +1,218 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form;
+
+    //获取任务列表
+    function getTaskList() {
+      var _datas = [];
+      _datas.push({
+        "id": "0",
+        "text": "-选择-",
+        "selected": true
+      });
+      $.yvan.ajax({
+        url: api('/sys/wfTask/queryAll'),
+        data: {status: 1, sysId: context.sysId},
+        method: 'get',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].taskType,
+                "text": data.data[i].taskName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //获取角色列表
+    function getRoleList() {
+      var _datas = [];
+      _datas.push({
+        "id": "0",
+        "text": "-选择-",
+        "selected": true
+      });
+      $.yvan.ajax({
+        url: api('/sys/sysRole/query'),
+        data: {status: 1, sysId: context.sysId},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].roleId,
+                "text": data.data[i].roleName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //获取菜单列表
+    function getMenuList() {
+      var _datas = [];
+      _datas.push({
+        "id": "0",
+        "text": "-选择-",
+        "selected": true
+      });
+      $.yvan.ajax({
+        url: api('/sys/menu/query'),
+        data: {status: 1, sysId: context.sysId},
+        method: 'get',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].menuId,
+                "text": data.data[i].menuName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogMenu',
+      title: '业务步骤信息',
+      width: 610,
+      height: 370,
+      onOpen: function () {
+        $dlg = $(this);
+        if (context.stepId > 0) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/wfStep/getById'),
+            type: 'GET',
+            data: {
+              stepId: context.stepId
+            },
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet(data.data);
+            }
+          });
+        }
+        else if (context.treeUp > 0) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/wfStep/getNewStepUp'),
+            type: 'GET',
+            data: {
+              wfId: context.wfId,
+              treeUp: context.treeUp
+            },
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet(data.data);
+            }
+          });
+        } else {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/wfStep/getNewStep'),
+            type: 'GET',
+            data: {
+              wfId: context.wfId
+            },
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet(data.data);
+            }
+          });
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [
+            [
+              {name: 'stepId', xtype: 'hidden'},
+              {name: 'wfId', xtype: 'hidden'},
+              {name: 'stepUp', xtype: 'hidden'},
+              {name: 'treeUp', xtype: 'hidden'},
+              {name: 'treePath', xtype: 'hidden'},
+              {name: 'stepName', label: '步骤名称', required: true},
+              {name: 'stepCode', label: '步骤编码'}
+            ],
+            [
+              {
+                name: 'taskType',
+                label: '流程任务',
+                xtype: 'yvselect',
+                panelHeight: 220,
+                //disabled: context.isEdit ? "disabled" : context.treeUp > 0 ? "disabled" : "",
+                data: getTaskList()
+              },
+              {
+                name: 'status', label: '启用状态', xtype: 'yvselect', required: true, data: [
+                  {id: '1', text: '启用', selected: true},
+                  {id: '-1', text: '停用'}
+                ]
+              }
+            ],
+            [
+              {
+                name: 'stepRole',
+                label: '步骤角色',
+                xtype: 'yvselect',
+                panelHeight: 220,
+                data: getRoleList()
+              },
+              {
+                name: 'menuId',
+                label: '步骤菜单',
+                xtype: 'yvselect',
+                panelHeight: 220,
+                data: getMenuList()
+              }
+            ],
+            [
+              {name: 'stepDesp', label: '步骤说明', span: 2, height: '90px', multiline: true}
+            ]
+          ]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/wfStep/update') : api('/sys/wfStep/insert')),
+              success: function () {
+                $.yvan.msg('操作成功');
+                if (context.isEdit) {
+                  $dlg.window('close');
+                }
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              },
+              error: function (data) {
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 0 - 0
admin-ui/app/sys/wf/dialogWfStepCause.js


+ 0 - 0
admin-ui/app/sys/wf/dialogWfStepJudge.js


+ 123 - 0
admin-ui/app/sys/wf/dialogWfStepSort.js

@@ -0,0 +1,123 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $grid;
+
+    // 查询列表
+    function queryGrid1() {
+      var queryUrl = '/sys/wfStep/queryAll';// 自行替换此参数
+      $grid.jqGrid("clearGridData");
+      $grid.reload({
+        mtype: 'GET',
+        url: api(queryUrl),
+        queryParams: {"wfId": context.wfId, "stepId": context.treeUp, "treeUp": context.treeUp}
+      });
+    }
+
+    //编辑工具栏
+    var gridToolbarTitle = '业务流程列表';// 自行替换此参数
+    var gridToolbar = {
+      xtype: 'toolbar', title: gridToolbarTitle, items: [
+        {
+          text: '上移', iconCls: 'fa fa-arrow-up', onClick: function () {
+            $grid.moveUp();
+          }
+        },
+        {
+          text: '下移', iconCls: 'fa fa-arrow-down', onClick: function () {
+            $grid.moveDown();
+          }
+        },
+        {
+          text: '保存排序', iconCls: 'fa fa-check-square', onClick: function () {
+            moveGrid();
+          }
+        }
+      ]
+    }
+
+    //保存排序
+    function moveGrid() {
+      var gridData = $grid.jqGrid("getRowData");
+      var list = [];
+      for (var i = 0; i < gridData.length; i++) {
+        list.push(gridData[i].stepId);
+      }
+      var treeCode = "";
+      if (context.treeLev > 1) {
+        treeCode = context.treeCode.substr(0, 3);
+      }
+      saveSort("sysWfStep", list, context.wfId, treeCode);
+    }
+
+    function saveSort(name, ids, sysid, codeup) {
+      var data = {
+        "ids": "",
+        "name": name,
+        "sysId": sysid,
+        "codeUp": codeup,
+      };
+      for (var i = 0; i < ids.length; i++) {
+        data.ids += ids[i] + ","
+      }
+      data.ids = data.ids.substr(0, data.ids.length - 1);
+      if (data.ids == "") {
+        return;
+      }
+      $.yvan.ajax({
+        url: api('/core/app/updateCoreSortCode'),
+        method: 'post',
+        data: data,
+        beforeSend: function () {
+          $.yvan.progress();
+        },
+        success: function () {
+          $.yvan.msg('操作成功');
+          $dlg.window('close');
+          if ($.type(context.confirm) === 'function') {
+            context.confirm();
+          }
+        },
+        complete: function () {
+          $.yvan.closep();
+        }
+      });
+    }
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogWfStepSort',
+      title: '维护业务流程排序',
+      width: 900,
+      height: 650,
+      onOpen: function () {
+        $dlg = $(this);
+      },
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          pagination: false,
+          idField: "WfStepSort",
+          toolbar: {
+            xtype: 'div',
+            items: [
+              gridToolbar
+            ]
+          },
+          columns: [[
+            {title: '步骤ID', field: 'stepId', hidden: true},
+            {title: '步骤名称', field: 'stepName'},
+            {title: '步骤编码', field: 'stepCode'},
+            // {title: '流程名称', field: 'taskType'},
+            {title: '启用状态', field: 'status', align: 'center', formatter: $.fn.fmatter.statusView}, //增加字典,显示正常
+          ]]
+        }
+      }
+    };
+  };
+});

+ 0 - 0
admin-ui/app/sys/wf/dialogWfStepUser.js


+ 174 - 0
admin-ui/app/sys/wf/dialogWfTask.js

@@ -0,0 +1,174 @@
+define(function (require) {
+  return function (context) {
+
+    var $dlg, $form, $comb;
+    var sysId = 0;
+
+    //获取平台列表
+    function getSysList() {
+      var _datas = [];
+      $.yvan.ajax({
+        url: api('/sys/system/query'),
+        data: {status: 1},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].sysId,
+                "text": data.data[i].sysName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //获取角色列表
+    function getRoleList() {
+      var _datas = [];
+      _datas.push({
+        "id": "0",
+        "text": "-选择-",
+        "selected": true
+      });
+      if ($form) {
+        sysId = $form.formGet().sysId;
+      }
+      if (sysId == 0 || sysId == undefined) {
+        sysId = context.sysId;
+      }
+      if (sysId == 0 || sysId == undefined) {
+        return _datas;
+      }
+      $.yvan.ajax({
+        url: api('/sys/sysRole/query'),
+        data: {},
+        method: 'get',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].roleId,
+                "text": data.data[i].roleName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+    
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogWfTask',
+      title: '流程任务信息',
+      width: 620,
+      height: 350,
+      onOpen: function () {
+        $dlg = $(this);
+        if (context.isEdit) {
+          $.yvan.ajax({
+            loadingMask: false,
+            url: api('/sys/wfTask/getById'),
+            type: 'GET',
+            data: {
+              taskType: context.taskType
+            },
+            success: function (data) {
+              $dlg.find('form');
+              $form.formSet(data.data);
+              sysId = data.data.sysId;
+            }
+          });
+        } else {
+          $form.formSet({
+            status: '1',
+            sysId: context.sysId
+          });
+        }
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [
+            [
+              {
+                name: 'sysId',
+                label: '所属平台',
+                xtype: 'yvselect',
+                required: true,
+                disabled: context.isEdit ? "disabled" : "",
+                data: getSysList(),
+                onChange: function () {
+                  $comb.yvselect({'data': getRoleList()});
+                }
+              },
+              {
+                name: 'taskRole',
+                label: '对应角色',
+                xtype: 'yvselect',
+                panelHeight: 220,
+                onRender: function () {
+                  $comb = $(this);
+                }
+              }
+            ],
+            [
+              {name: 'taskType', xtype: 'hidden'},
+              {name: 'taskName', label: '任务名称', required: true},
+              {name: 'taskCode', label: '任务编码', required: true}
+            ],
+            [
+              {
+                name: 'taskTable', label: '对应表格'
+              },
+              {
+                name: 'status',
+                label: '启用状态',
+                xtype: 'yvselect',
+                required: true,
+                data: $.yvan.sysDict('status').combo()
+              }
+            ],
+            [
+              {
+                name: 'taskDesp', label: '任务说明', width: '560px', height: '90px', multiline: true
+              }
+            ]
+          ]
+        }
+      },
+      buttons: [
+        {
+          text: "提交", iconCls: "fa fa-save", onClick: function () {
+            $.yvan.postForm($form, {
+              url: (context.isEdit ? api('/sys/wfTask/update') : api('/sys/wfTask/insert')),
+              success: function () {
+                $.yvan.msg('操作成功');
+                if (context.isEdit) {
+                  $dlg.window('close');
+                }
+                if ($.type(context.confirm) === 'function') {
+                  context.confirm();
+                }
+              },
+              error: function (data) {
+              }
+            });
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 223 - 0
admin-ui/app/sys/wf/queryWf.js

@@ -0,0 +1,223 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid, $form;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        //如果按下回车键,就发出确认
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 查询列表
+    function queryGrid1() {
+      var queryUrl = '/sys/wf/query';// 自行替换此参数
+      $grid.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid.reload({
+        mtype: 'GET',
+        url: api(queryUrl),
+        queryParams: queryForm
+      });
+    }
+
+    // 更新启用停用状态
+    function updateStatus() {
+      var row = $grid.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var obj = {};
+      obj.name = row.wfName;// 自行替换此参数
+      obj.status = row.status;
+      obj.isTree = 0;// 树为1,非树为0
+      obj = setStatusMsg(obj); //返回rtnStatus
+      var msg = obj.msg;
+      var status = obj.rtnStatus;
+      /*|-----------------------自行替换start-----------------------*/
+      var apiUrl = '/sys/wf/updateStatus';// 自行替换此参数
+      var apiData = {
+        wfId: row.wfId,// 自行替换此参数
+        status: status
+      };
+      /*-----------------------自行替换end-----------------------|*/
+      $.yvan.confirm(msg, {
+        yes: function (index) {
+          $.yvan.ajax({
+            method: 'post',
+            url: api(apiUrl),
+            data: apiData,
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid.reload();
+            }
+          });
+        }
+      });
+    }
+
+    //获取平台列表
+    function getDataSysList() {
+      var _datas = [];
+      _datas.push({
+        "id": "",
+        "text": "全部",
+        "selected": true
+      });
+      $.yvan.ajax({
+        url: api('/sys/system/query'),
+        data: {status: 1},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].sysId,
+                "text": data.data[i].sysName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //检索工具栏
+    var queryToolbarTitle = '业务流程管理';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe();
+          }
+        }
+      ]
+    };
+
+    //检索条件表单
+    var queryFormPrompt = '流程名称/编码/说明';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1}
+        }, {
+          xtype: 'yvselect',
+          label: '所属平台',
+          name: 'sysId',
+          labelWidth: 'auto',
+          width: 260,
+          data: getDataSysList(),
+          onChange: function () {
+            queryGrid1();
+          }
+        }, {
+          xtype: 'yvselect', label: '启用状态', name: 'status', labelWidth: 'auto', width: 180, value: '',
+          data: $.yvan.sysDict('status').combowithAll(),
+          onChange: function () {
+            queryGrid1();
+          }
+        }
+      ]]
+    };
+
+    //编辑工具栏
+    var gridToolbarTitle = '业务流程列表';// 自行替换此参数
+    var gridToolbar = {
+      xtype: 'toolbar', title: gridToolbarTitle, items: [
+        {
+          text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+            $.yvan.showDialog(this,
+              require('/app/sys/wf/dialogWf.js')({  // 自行替换此参数
+                confirm: function () {
+                  $grid.reload();
+                },
+                isEdit: false,
+                sysId: $form.formGet().sysId,
+              })
+            );
+          }
+        }, {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid.rowData();
+            if (!row) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            $.yvan.showDialog(this,
+              require('/app/sys/wf/dialogWf.js')({  // 自行替换此参数
+                confirm: function () {
+                  $grid.reload();
+                },
+                isEdit: true,
+                wfId: row.wfId     // 自行替换此参数
+              })
+            );
+          }
+        }, {
+          text: '启用/停用', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+            updateStatus();
+          }
+        }
+      ]
+    }
+
+    return {
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+            //queryGrid1(); //初始化数据
+          },
+          xtype: 'grid',
+          idField: "wfId",
+          toolbar: {
+            xtype: 'div',
+            items: [
+              queryToolbar,
+              queryForm,
+              gridToolbar
+            ]
+          },
+          columns: [[
+            {title: '业务流程ID', field: 'wfId', hidden: true},
+            {title: '流程名称', field: 'wfName'},
+            {title: '流程编码', field: 'wfCode'},
+            {title: '步骤数', field: 'stepNum', align: "center", hidden: true},
+            {title: '任务种类', field: 'taskNum', align: "center", hidden: true},
+            {title: '所属平台', field: 'sysName', hidden: true},
+            {title: '状态', field: 'status', hidden: true},
+            {title: '启用状态', field: 'statusView', align: "center", formatter: $.fn.fmatter.statusView},
+            {title: '流程说明', field: 'wfDesp'},
+            {title: '新增时间', field: 'timeCreate', formatter: 'ts', align: "center"},
+            {title: '更新时间', field: 'timeUpdate', formatter: 'ts', align: "center"}
+          ]]
+        }
+      }
+    };
+  };
+});

+ 416 - 0
admin-ui/app/sys/wf/queryWfStep.js

@@ -0,0 +1,416 @@
+define(function (require) {
+  return function () {
+
+    var $grid1, $grid2, $form;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    function queryGrid1() {
+      $grid1.reload({
+        url: api('/sys/wf/query'),
+        mtype: 'GET',
+        queryParams: $form.formGet()
+      }, true);
+      if ($grid2 != undefined) {
+        $grid2.jqGrid("clearGridData");
+      }
+    }
+
+    function queryGrid2(rowid) {
+      var row = $grid1.rowData(rowid);
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var queryUrl = '/sys/wfStep/query';// 自行替换此参数
+      var queryData = {wfId: row.wfId};// 多个参数自行新增
+      $grid2.reload({
+        mtype: 'GET',
+        url: api(queryUrl),
+        queryParams: queryData
+      });
+    }
+
+    //获取平台列表
+    function getSysList() {
+      var _datas = [];
+      _datas.push({
+        "id": "",
+        "text": "全部",
+        "selected": true
+      });
+      $.yvan.ajax({
+        url: api('/sys/system/query'),
+        data: {status: 1},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].sysId,
+                "text": data.data[i].sysName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    // 更新启用停用状态
+    function updateStatus() {
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var obj = {};
+      obj.name = row.wfName;// 自行替换此参数
+      obj.status = row.status;
+      obj.isTree = 0;// 树为1,非树为0
+      obj = setStatusMsg(obj); //返回rtnStatus
+      var msg = obj.msg;
+      var status = obj.rtnStatus;
+      /*|-----------------------自行替换start-----------------------*/
+      var apiUrl = '/sys/wf/updateStatus';// 自行替换此参数
+      var apiData = {
+        wfId: row.wfId,// 自行替换此参数
+        status: status
+      };
+      /*-----------------------自行替换end-----------------------|*/
+      $.yvan.confirm(msg, {
+        yes: function (index) {
+          $.yvan.ajax({
+            method: 'post',
+            url: api(apiUrl),
+            data: apiData,
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid1.reload();
+            }
+          });
+        }
+      });
+    }
+
+    // 更新启用停用状态
+    function updateStatusStep() {
+      var row = $grid2.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var obj = {};
+      obj.name = row.stepName;// 自行替换此参数
+      obj.status = row.status;
+      obj.isTree = 1;// 树为1,非树为0
+      obj = setStatusMsg(obj); //返回rtnStatus
+      var msg = obj.msg;
+      var status = obj.rtnStatus;
+      /*|-----------------------自行替换start-----------------------*/
+      var apiUrl = '/sys/wfStep/updateStatus';// 自行替换此参数
+      var apiData = {
+        stepId: row.stepId,// 自行替换此参数
+        status: status
+      };
+      /*-----------------------自行替换end-----------------------|*/
+      $.yvan.confirm(msg, {
+        yes: function (index) {
+          $.yvan.ajax({
+            method: 'post',
+            url: api(apiUrl),
+            data: apiData,
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid2.reload();
+            }
+          });
+        }
+      });
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '业务流程管理';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '任务编码/名称/说明';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1}
+        }, {
+          xtype: 'yvselect',
+          label: '所属平台',
+          name: 'sysId',
+          labelWidth: 'auto',
+          width: 280,
+          data: getSysList(),
+          onChange: function () {
+            queryGrid1();
+          }
+        }
+      ]]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle1 = '业务流程列表';// 自行替换此参数
+    var gridToolbar1 = {
+      xtype: 'toolbar', title: gridToolbarTitle1, items: [
+        {
+          text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+            var dlg = require('app/sys/wf/dialogWf.js')({
+              isEdit: false,
+              confirm: function () {
+                $grid1.reload();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        },
+        {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid1.rowData();
+            if (!row) {
+              $.yvan.msg('选择一行数据');
+              return;
+            }
+            var dlg = require('/app/sys/wf/dialogWf.js')({
+              isEdit: true,
+              wfId: row.wfId,
+              confirm: function () {
+                $grid1.reload();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }, {
+          text: '启用/停用', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+            updateStatus();
+          }
+        }
+      ]
+    };
+
+    // 列表2增删改查按钮
+    var gridToolbarTitle2 = '业务流程步骤列表';// 自行替换此参数
+    var gridToolbar2 = {
+      xtype: 'toolbar', title: gridToolbarTitle2, items: [
+        {
+          text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+            var sysId = 0, wfId = 0, treeUp = 0;
+            var row1 = $grid1.rowData();
+            if (!row1) {
+              $.yvan.msg('选择一行数据');
+              return;
+            }
+            sysId = row1.sysId;
+            wfId = row1.wfId;
+            var row2 = $grid2.rowData();
+            if (row2) {
+              treeUp = row2.treeUp;
+            }
+            var dlg = require('/app/sys/wf/dialogWfStep.js')({
+              isEdit: false,
+              sysId: sysId,
+              wfId: wfId,
+              treeUp: treeUp,
+              confirm: function () {
+                $grid2.reload();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }, {
+          text: '新增下级', iconCls: 'fa fa-plus-circle', onClick: function () {
+            var row1 = $grid1.rowData();
+            if (!row1) {
+              $.yvan.msg('选择一行数据');
+              return;
+            }
+            var row2 = $grid2.rowData();
+            if (!row2) {
+              $.yvan.msg('选择一行数据');
+              return;
+            }
+            if (row2.treeLeaf == 1) {
+              $.yvan.msg('无法添加下级');
+              return;
+            }
+            var dlg = require('/app/sys/wf/dialogWfStep.js')({
+              isEdit: false,
+              sysId: row1.sysId,
+              wfId: row1.wfId,
+              taskType: row2.taskType,
+              treeUp: row2.stepId,
+              confirm: function () {
+                $grid2.reload();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }, {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row1 = $grid1.rowData();
+            if (!row1) {
+              $.yvan.msg('选择一行数据');
+              return;
+            }
+            var row2 = $grid2.rowData();
+            if (!row2) {
+              $.yvan.msg('选择一行数据');
+              return;
+            }
+            var dlg = require('/app/sys/wf/dialogWfStep.js')({
+              isEdit: true,
+              sysId: row1.sysId,
+              stepId: row2.stepId,
+              confirm: function () {
+                $grid1.reload();
+              }
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }, {
+          text: '同级排序', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row1 = $grid1.rowData();
+            if (!row1) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            var row2 = $grid2.rowData();
+            $.yvan.showDialog(this,
+              require('/app/sys/wf/dialogWfStepSort.js')({
+                confirm: function () {
+                  $grid2.reload();
+                },
+                // stepId: row2.stepId,
+                wfId: row1.wfId,
+                treeLev: row2.treeLev,
+                treeUp: row2.treeUp,
+                treeCode: row2.treeCode,
+              })
+            );
+          }
+        }, {
+          text: '启用/停用', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+            updateStatusStep();
+          }
+        }
+      ]
+    };
+
+    //界面
+    return {
+      north: {
+        height: 90,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm
+        ]
+      },
+      west: {
+        width: "50%",
+        border: false,
+        split: true,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+            //queryGrid1();
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar1,
+          pagination: false,
+          idField: 'wfId',
+          title: '业务流程列表',
+          columns: [[
+            {title: '业务流程ID', field: 'wfId', hidden: true},
+            {title: '系统ID', field: 'sysId', hidden: true},
+            {title: '流程编码', field: 'wfCode'},
+            {title: '流程名称', field: 'wfName'},
+            {title: '流程说明', field: 'wfDesp'},
+            {title: '步骤数', field: 'stepNum', hidden: true},
+            {title: '任务种类', field: 'taskNum', hidden: true},
+            {title: '启用状态', field: 'status', hidden: true},
+            {title: '启用状态', field: 'statusView', align: "center", formatter: $.fn.fmatter.statusView},
+            {title: '新增时间', field: 'timeCreate', formatter: 'ts', hidden: true},
+            {title: '更新时间', field: 'timeUpdate', formatter: 'ts', hidden: true}
+          ]],
+          onSelectRow: function (rowid) {
+            queryGrid2(rowid);
+          }
+        }
+      },
+      center: {
+        width: '50%',
+        items: {
+          onRender: function () {
+            $grid2 = $(this);
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar2,
+          pagination: false,
+          idField: 'stepId',
+          title: '业务流程步骤列表',
+          columns: [[
+            {field: 'stepId', hidden: true},
+            {field: 'stepSort', title: '步骤排序', hidden: true},
+            {field: 'stepName', title: '步骤名称', hidden: true},
+            {field: 'stepNameView', title: '步骤', formatter: $.fn.fmatter.treeNameView},// 树结构需要fmatter
+            {field: 'taskType', title: '任务类型', hidden: true},
+            {field: 'stepCode', title: '步骤编码'},
+            {field: 'taskName', title: '任务类型'},
+            {field: 'treeCode', title: '树编码', hidden: true},
+            {field: 'treeUp', title: '上级ID', hidden: true},
+            {field: 'treeLev', title: '树级别', hidden: true},
+            {field: 'treePath', title: '树路径', hidden: true},
+            {field: 'treeSort', title: '树排序', hidden: true},
+            {field: 'treeLeaf', title: '树叶子', hidden: true},
+            {field: 'status', title: '启用状态', hidden: true},
+            {field: 'statusView', title: '启用状态', align: "center", formatter: $.fn.fmatter.statusView},
+            {field: 'userCreate', title: '新增人', hidden: true},
+            {field: 'timeCreate', title: '新增时间', formatter: $.fn.fmatter.ts, hidden: true},
+            {field: 'userUpdate', title: '修改人', hidden: true},
+            {field: 'timeUpdate', title: '修改时间', formatter: $.fn.fmatter.ts, hidden: true}
+          ]]
+        }
+      }
+    };
+  };
+});

+ 218 - 0
admin-ui/app/sys/wf/queryWfStepUser.js

@@ -0,0 +1,218 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid, $form;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 查询列表
+    function queryGrid1() {
+      var queryUrl = '/sys/wfStep/query';// 自行替换此参数
+      $grid.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid.reload({
+        mtype: 'GET',
+        url: api(queryUrl),
+        queryParams: queryForm
+      });
+    }
+
+    //获取流程列表
+    function getWfList() {
+      var _datas = [];
+      _datas.push({
+        "id": "",
+        "text": "全部",
+        "selected": true
+      });
+      $.yvan.ajax({
+        url: api('/sys/wf/query'),
+        data: {status: 1},
+        method: 'get',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].wfId,
+                "text": data.data[i].wfName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //获取任务列表
+    function getWfTaskList() {
+      var _datas = [];
+      _datas.push({
+        "id": "",
+        "text": "全部",
+        "selected": true
+      });
+      $.yvan.ajax({
+        url: api('/sys/wfTask/query'),
+        data: {status: 1},
+        method: 'get',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].taskType,
+                "text": data.data[i].taskName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //检索工具栏
+    var queryToolbarTitle = '步骤管理';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe();
+          }
+        }
+      ]
+    };
+
+    //检索条件表单
+    var queryFormPrompt = '步骤名称/流程名称/任务名称';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1}
+        }, {
+          xtype: 'yvselect',
+          label: '所属流程',
+          name: 'wfId',
+          labelWidth: 'auto',
+          width: 280,
+          data: getWfList(),
+          onChange: function () {
+            queryGrid1();
+          }
+        }, {
+          xtype: 'yvselect',
+          label: '所属任务',
+          name: 'taskType',
+          labelWidth: 'auto',
+          width: 280,
+          data: getWfTaskList(),
+          onChange: function () {
+            queryGrid1();
+          }
+        }
+      ]]
+    };
+
+    //编辑工具栏
+    var gridToolbarTitle = '业务流程列表';// 自行替换此参数
+    var gridToolbar = {
+      xtype: 'toolbar', title: gridToolbarTitle, items: [
+        {
+          text: '维护人员', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid.rowData();
+            if (!row) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            $.yvan.showDialog(this,
+              require('/app/sys/wf/dialogWfStepUser.js')({  // 自行替换此参数
+                confirm: function () {
+                  $grid.reload();
+                },
+                isEdit: true,
+                stepId: row.stepId     // 自行替换此参数
+              })
+            );
+          }
+        }, {
+          text: '维护步骤判定', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid.rowData();
+            if (!row) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            $.yvan.showDialog(this,
+              require('/app/sys/wf/dialogWfStepJudge.js')({  // 自行替换此参数
+                confirm: function () {
+                  $grid.reload();
+                },
+                isEdit: true,
+                stepId: row.stepId     // 自行替换此参数
+              })
+            );
+          }
+        }
+      ]
+    }
+
+    return {
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+            queryGrid1(); //初始化数据
+          },
+          xtype: 'grid',
+          idField: "wfId",
+          toolbar: {
+            xtype: 'div',
+            items: [
+              queryToolbar,
+              queryForm,
+              gridToolbar
+            ]
+          },
+          columns: [[
+            {title: '业务流程ID', field: 'wfId', hidden: true},
+            {title: '流程编码', field: 'wfCode'},
+            {title: '流程名称', field: 'wfName'},
+            {title: '流程说明', field: 'wfDesp'},
+            {title: '所属平台', field: 'sysName'},
+            {title: '步骤数', field: 'stepNum'},
+            {title: '任务种类', field: 'taskNum'},
+            {title: '状态', field: 'status', hidden: true},
+            {title: '启用状态', field: 'statusView', formatter: $.fn.fmatter.statusView},
+            {title: '新增时间', field: 'timeCreate', formatter: 'ts'},
+            {title: '更新时间', field: 'timeUpdate', formatter: 'ts'}
+          ]]
+        }
+      }
+    };
+  };
+});

+ 224 - 0
admin-ui/app/sys/wf/queryWfTask.js

@@ -0,0 +1,224 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid, $form;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 查询列表
+    function queryGrid1() {
+      var queryUrl = '/sys/wfTask/query';// 自行替换此参数
+      $grid.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid.reload({
+        mtype: 'GET',
+        url: api(queryUrl),
+        queryParams: queryForm
+      });
+    }
+
+    // 更新启用停用状态
+    function updateStatus() {
+      var row = $grid.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var obj = {};
+      obj.name = row.taskName;// 自行替换此参数
+      obj.status = row.status;
+      obj.isTree = 0;// 树为1,非树为0
+      obj = setStatusMsg(obj); //返回rtnStatus
+      var msg = obj.msg;
+      var status = obj.rtnStatus;
+      /*|-----------------------自行替换start-----------------------*/
+      var apiUrl = '/sys/wfTask/updateStatus';// 自行替换此参数
+      var apiData = {
+        taskType: row.taskType,// 自行替换此参数
+        status: status
+      };
+      /*-----------------------自行替换end-----------------------|*/
+      $.yvan.confirm(msg, {
+        yes: function (index) {
+          $.yvan.ajax({
+            method: 'post',
+            url: api(apiUrl),
+            data: apiData,
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid.reload();
+            }
+          });
+        }
+      });
+    }
+
+    //获取平台列表
+    function getDataSysList() {
+      var _datas = [];
+      _datas.push({
+        "id": "",
+        "text": "全部",
+        "selected": true
+      });
+      $.yvan.ajax({
+        url: api('/sys/system/query'),
+        data: {status: 1},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].sysId,
+                "text": data.data[i].sysName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //检索工具栏
+    var queryToolbarTitle = '业务流程管理';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe();
+          }
+        }
+      ]
+    };
+
+    //检索条件表单
+    var queryFormPrompt = '任务名称/编码/说明';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1}
+        }, {
+          xtype: 'yvselect',
+          label: '所属平台',
+          name: 'sysId',
+          labelWidth: 'auto',
+          width: 280,
+          data: getDataSysList(),
+          onChange: function () {
+            queryGrid1();
+          }
+        }, {
+          xtype: 'yvselect', label: '启用状态', name: 'status', labelWidth: 'auto', width: 180, value: '',
+          data: $.yvan.sysDict('status').combowithAll(),
+          onChange: function () {
+            queryGrid1();
+          }
+        }
+      ]]
+    };
+
+    //编辑工具栏
+    var gridToolbarTitle = '业务流程列表';// 自行替换此参数
+    var gridToolbar = {
+      xtype: 'toolbar', title: gridToolbarTitle, items: [
+        {
+          text: '新增', iconCls: 'fa fa-plus-circle', onClick: function () {
+            $.yvan.showDialog(this,
+              require('/app/sys/wf/dialogWfTask.js')({  // 自行替换此参数
+                confirm: function () {
+                  $grid.reload();
+                },
+                isEdit: false,
+                sysId: $form.formGet().sysId,
+              })
+            );
+          }
+        }, {
+          text: '编辑', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+            var row = $grid.rowData();
+            if (!row) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            $.yvan.showDialog(this,
+              require('/app/sys/wf/dialogWfTask.js')({  // 自行替换此参数
+                confirm: function () {
+                  $grid.reload();
+                },
+                isEdit: true,
+                sysId: row.sysId,
+                taskType: row.taskType     // 自行替换此参数
+              })
+            );
+          }
+        }, {
+          text: '启用/停用', iconCls: 'fa fa-circle-o-notch', onClick: function () {
+            updateStatus();
+          }
+        }
+      ]
+    }
+
+    return {
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+            //queryGrid1(); //初始化数据
+          },
+          xtype: 'grid',
+          idField: "taskType",
+          toolbar: {
+            xtype: 'div',
+            items: [
+              queryToolbar,
+              queryForm,
+              gridToolbar
+            ]
+          },
+          columns: [[
+            {title: '任务类型', field: 'taskType', hidden: true},
+            {title: '任务名称', field: 'taskName'},
+            {title: '任务编码', field: 'taskCode'},
+            {title: '对应表格', field: 'taskTable', hidden: true},
+            {title: '处理角色', field: 'roleName'},
+            {title: '平台ID', field: 'sysId', hidden: true},
+            {title: '所属平台', field: 'sysName', hidden: true},
+            {title: '任务说明', field: 'taskDesp'},
+            {title: '状态', field: 'status', hidden: true},
+            {title: '启用状态', field: 'statusView', align: "center", formatter: $.fn.fmatter.statusView},
+            {title: '新增时间', field: 'timeCreate', formatter: 'ts', align: "center"},
+            {title: '更新时间', field: 'timeUpdate', formatter: 'ts', align: "center"}
+          ]]
+        }
+      }
+    };
+  };
+});

+ 32 - 0
admin-ui/app/sys/widget/selectHrUser.js

@@ -0,0 +1,32 @@
+define(function (require) {
+  return function (context) {
+
+    //context.sender 发送者
+    //context.query 查询词
+    //context.confirm(row) 确认方法
+    return {
+      xtype: 'widget',
+      title: '人员信息搜索',
+      width: 800,
+      height: 450,
+      grid: {
+        url: api('/hr/user/queryWidget'),
+        mtype: 'POST',
+        queryParams: {query: context.query},
+        idField: 'userId',
+        columns: [[
+          {title: '用户编号', field: 'userId', hidden: true},
+          {title: '姓名', field: 'name'},
+          {title: '姓名拼音', field: 'namePy', hidden: true},
+          {title: '性别', field: 'gender', formatter: $.fn.fmatter.genderSrc},
+          {title: '头像ID', field: 'imgId', hidden: true},
+          {title: '手机号', field: 'mobile'},
+          {title: '座机', field: 'tel', hidden: true},
+          {title: '邮箱', field: 'email', hidden: true},
+          {title: '是否在职', field: 'status', hidden: true},
+          {title: '是否在职', field: 'userStatusView', formatter: $.fn.fmatter.userStatusView},
+        ]]
+      }
+    };
+  };
+});

+ 72 - 0
admin-ui/app/view/dialogWarnShow.js

@@ -0,0 +1,72 @@
+//包装单的分包数  预警
+define(function (require) {
+  return function (context) {
+    var $dlg, $form;
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogSjShow',
+      title: '包装单数量',
+      width: 360,
+      height: 240,
+      onOpen: function () {
+        loadingMask: false,
+          $dlg = $(this);
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [[
+            {
+              label: '打包数量', name: 'num', labelWidth: 'auto', width: 280,
+            },
+            {
+              label: '打印张数', name: 'numPage', labelWidth: 'auto', width: 280,
+            },
+          ]]
+        }
+      },
+      buttons: [
+        {
+          text: "打印", iconCls: "fa fa-save", onClick: function () {
+            if ($form.formGet().num == null || $form.formGet().num == undefined || $form.formGet().num == '') {
+              return $.yvan.msg('请先选择打包数量');
+            }
+            if ($form.formGet().numPage == null || $form.formGet().numPage == undefined || $form.formGet().numPage == '') {
+              return $.yvan.msg('请先选择打印张数');
+            }
+            $.yvan.ajax({
+              method: 'post',
+              url: api('/pdf/printWarnOrder'),
+              data: {
+                batchId: context.batchId,
+                num: $form.formGet().num,
+                numPage: $form.formGet().numPage,
+              },
+              success: function (data) {
+                // alert(data.data);
+                if (data.data != null && data.data != undefined && data.data != '') {
+                  // console.log(data.data);
+                  // callCsPrintHGZ(data.data);
+                  for (var i = 0; i < data.data.length; i++) {
+                    LabelPrinter.printLabel(data.data[i]);
+                  }
+                } else {
+                  $.yvan.msg("数据为空")
+                }
+              }
+            });
+            $dlg.dialog('close');
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 62 - 0
admin-ui/app/view/dialogWarnShow105.js

@@ -0,0 +1,62 @@
+//包装单的分包数  预警
+define(function (require) {
+  return function (context) {
+    var $dlg, $form;
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogSjShow105',
+      title: '包装单数量',
+      width: 360,
+      height: 160,
+      onOpen: function () {
+        loadingMask: false,
+          $dlg = $(this);
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [[
+            {
+              label: '打包数量', name: 'num', labelWidth: 'auto', width: 280,
+            },
+          ]]
+        }
+      },
+      buttons: [
+        {
+          text: "打印", iconCls: "fa fa-save", onClick: function () {
+            if($form.formGet().num==null ||$form.formGet().num==undefined ||$form.formGet().num==''){
+              return $.yvan.msg('请先选择打包数量');
+            }
+            $.yvan.ajax({
+              method: 'post',
+              url: api('/pdf/printWarnOrder105'),
+              data: {
+                batchId: context.batchId,
+                num:$form.formGet().num,
+              },
+              success: function (data) {
+                // alert(data.data);
+                if (data.data != null && data.data != undefined && data.data != '') {
+                  console.log(data.data);
+                  callCsPrintHGZ(data.data);
+                } else {
+                  $.yvan.msg("数据为空")
+                }
+              }
+            });
+            $dlg.dialog('close');
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 62 - 0
admin-ui/app/view/dialogWarnShow80.js

@@ -0,0 +1,62 @@
+//包装单的分包数  预警
+define(function (require) {
+  return function (context) {
+    var $dlg, $form;
+
+    return {
+      xtype: 'dialog',
+      dialogId: 'dialogSjShow80',
+      title: '包装单数量',
+      width: 360,
+      height: 160,
+      onOpen: function () {
+        loadingMask: false,
+          $dlg = $(this);
+      },
+      center: {
+        items: {
+          xtype: 'formgroup',
+          onRender: function () {
+            $form = $(this);
+          },
+          items: [[
+            {
+              label: '打包数量', name: 'num', labelWidth: 'auto', width: 280,
+            },
+          ]]
+        }
+      },
+      buttons: [
+        {
+          text: "打印", iconCls: "fa fa-save", onClick: function () {
+            if($form.formGet().num==null ||$form.formGet().num==undefined ||$form.formGet().num==''){
+              return $.yvan.msg('请先选择打包数量');
+            }
+            $.yvan.ajax({
+              method: 'post',
+              url: api('/pdf/printWarnOrder80'),
+              data: {
+                batchId: context.batchId,
+                num:$form.formGet().num,
+              },
+              success: function (data) {
+                // alert(data.data);
+                if (data.data != null && data.data != undefined && data.data != '') {
+                  console.log(data.data);
+                  callCsPrintHGZ(data.data);
+                } else {
+                  $.yvan.msg("数据为空")
+                }
+              }
+            });
+            $dlg.dialog('close');
+          }
+        }, {
+          text: "关闭", iconCls: "fa fa-times", onClick: function () {
+            $dlg.dialog('close');
+          }
+        }
+      ]
+    };
+  };
+});

+ 309 - 0
admin-ui/app/view/queryBatch.js

@@ -0,0 +1,309 @@
+//物资信息查询页面
+define(function (require) {
+  return function () {
+
+    var $grid1, $grid2, $form;
+
+    // 弹框的方式
+    var widgets = {
+      // 搜索分类检索
+      selectCatalogWidget: {
+        url: '/app/mat/widget/selectCatalog.js',
+        bind: {
+          matcId: 'matcId',
+          matcName: 'matcName'
+        },
+        queryParams: {matcBusi: MATC_BUSI_检验, status: 1}
+      },
+      // 搜索供应商检索
+      selectCorpWidget: {
+        url: '/app/mat/widget/selectCorp.js',
+        bind: {
+          corpId: 'corpId',
+          corpName: 'corpName'
+        },
+        queryParams: {corpType: CORP_TYPE_供应商}
+      }
+    };
+
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    function queryGrid1() {
+      var queryUrl = '/mat/matBatch/queryBatchView';// 自行替换此参数
+      $grid1.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid1.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryForm
+      }, true);
+      if ($grid2 != undefined && $grid2 != null) {
+        $grid2.jqGrid("clearGridData");
+      }
+    }
+
+    function queryGrid2() {
+      if ($grid2 == undefined || $grid2 == null)
+        return;
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var queryUrl = '/stock/stockCell/queryByStockId';// 自行替换此参数
+      var obj = $form.formGet();
+      obj.matId = row.matId;
+      obj.batchId = row.batchId;
+      $grid2.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: obj
+      });
+    }
+
+    //获取仓库信息
+    function getRoomList() {
+      var _datas = [];
+      var qd = {};
+      // if (App.currentRoomId > 0) {
+      //   qd = {roomId: App.currentRoomId};
+      //   _datas = [];
+      // } else {
+      qd = {roomType: ROOM_TYPE_CK};
+      // }
+      $.yvan.ajax({
+        url: api('/wms/whRoom/queryAll'),
+        data: qd,
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].roomId,
+                "text": data.data[i].roomName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '批次查询';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '批次号/物资编码/图号型号/物资名称';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [
+        [
+          {xtype: 'hidden', name: 'matcId'},
+          {xtype: 'hidden', name: 'corpId'},
+          {
+            xtype: 'searchbox',
+            label: '检验分类',
+            name: 'matcName',
+            labelWidth: 'auto',
+            widget: widgets.selectCatalogWidget,
+            onChange: function (value) {
+              if (!isNotNullOrEmpty(value)) {
+                $form.formSet({
+                  matcId: ''
+                })
+              }
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'searchbox',
+            label: '供应商',
+            name: 'corpName',
+            labelWidth: 'auto',
+            widget: widgets.selectCorpWidget,
+            onChange: function (value) {
+              if (!isNotNullOrEmpty(value)) {
+                $form.formSet({
+                  corpId: ''
+                })
+              }
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '物资分类', name: 'matType', labelWidth: 'auto', width: 180,
+            data: $.yvan.sysDict('matType').combowithAll(), value: '',
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+        ],
+        [
+          {
+            xtype: 'textbox',
+            label: '检索条件',
+            name: 'queryProperties',
+            prompt: queryFormPrompt,
+            labelWidth: 'auto',
+            width: 320,
+            events: {keydown: enterQueryGrid1},
+          },
+          {
+            xtype: 'yvselect', label: '库存状态', name: 'hasStock', data: [
+              {id: '', text: '全部'},
+              {id: '1', text: '有库存'},
+              {id: '0', text: '无库存'}
+            ],
+            labelWidth: 'auto', width: 180,
+            onChange: function (value) {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '批次状态', name: 'matQc',
+            data: $.yvan.sysDict('matQc').combowithAll(),
+            labelWidth: 'auto', width: 180,
+            onChange: function (value) {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '仓库', name: 'roomId', labelWidth: 'auto', width: 220,
+            data: getRoomList(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+        ],
+      ]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle1 = '批次列表';// 自行替换此参数
+    var gridToolbar1 = {
+      xtype: 'toolbar',
+      title: gridToolbarTitle1,
+      items: []
+    };
+
+    return {
+      north: {
+        height: 135,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm
+        ]
+      },
+      center: {
+        height: '70%',
+        split: true,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar1,
+          autoSizeColumns: true,
+          columns:
+            [[
+              {title: '批次ID', field: 'batchId', hidden: true},
+              {title: '物资ID', field: 'matId', hidden: true},
+              {title: '批次条码', field: 'batchBar', hidden: true},
+              {title: '批次号', field: 'batchCode', width: 200},
+              {title: '物资编码', field: 'matBar', width: 200},
+              {title: '图号/型号', field: 'matCode', width: 200},
+              {title: '物资名称', field: 'matName', width: 200},
+              {title: '物资编码属性', field: 'matAttrCode'},
+              {title: '物资分类', field: 'matType', formatter: $.fn.fmatter.matType, width: 80},
+              {title: '检验分类', field: 'matcName', width: 200},
+              {title: '供应商', field: 'corpName'},
+              {title: '购买单位', field: 'corpUnit'},
+              {title: '购买数', field: 'corpAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+              {title: '库存数', field: 'stockAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+              {title: '生产日期', field: 'dateMade', width: 140, formatter: $.fn.fmatter.tsymd, align: 'center',},
+              {title: '保证贮存期', field: 'saveMinDate', formatter: $.fn.fmatter.tsymd, align: "center"},
+              {title: '最大贮存期', field: 'saveMaxDate', formatter: $.fn.fmatter.tsymd, align: "center"},
+              {title: '入库日期', field: 'dateArrival', width: 140, formatter: $.fn.fmatter.tsymd, align: 'center',},
+              {title: '检验员', field: 'name'},
+            ]],
+          onSelectRow: function (rowid) {
+            queryGrid2();
+          }
+        }
+      },
+      south: {
+        height: '30%',
+        border: false,
+        items: {
+          xtype: 'tabs',
+          items: [
+            {
+              title: '批次位置信息',
+              lazy: true,
+              items: {
+                onRender: function () {
+                  $grid2 = $(this);
+                },
+                xtype: 'grid',
+                autoSizeColumns: true,
+                pagination: true,
+                columns: [
+                  [
+                    {title: '编码属性ID', field: 'celldetId', hidden: true},
+                    {title: '货位ID', field: 'cellId', hidden: true},
+                    {title: '库存ID', field: 'stockId', hidden: true},
+                    {title: '单据ID', field: 'billId', hidden: true},
+                    {title: '库区', field: 'farmName', width: 140},
+                    {title: '仓库', field: 'roomName', width: 140},
+                    {title: '区域', field: 'workArea', width: 200, formatter: $.fn.fmatter.workArea,},
+                    {title: '货组', field: 'rowName', width: 200, align: "center"},
+                    {title: '货位类型', field: 'cellMatQc', width: 200, align: "center", formatter: $.fn.fmatter.matQc,},
+                    {title: '货位号', field: 'cellBar', width: 200, align: "center"},
+                    {
+                      title: '数量',
+                      field: 'matAmount',
+                      width: 350,
+                      align: "right",
+                      formatter: $.fn.fmatter.formatNumberBigDecimal
+                    },
+                  ]
+                ]
+              }
+            },
+          ]
+        }
+      }
+    };
+  };
+});

+ 322 - 0
admin-ui/app/view/queryBatchRoom.js

@@ -0,0 +1,322 @@
+//仓库批次管理参照批次信息页面
+//物资信息查询页面
+define(function (require) {
+  return function () {
+
+    var $grid1, $grid2, $form;
+
+    // 弹框的方式
+    var widgets = {
+      // 搜索分类检索
+      selectCatalogWidget: {
+        url: '/app/mat/widget/selectCatalog.js',
+        bind: {
+          matcId: 'matcId',
+          matcName: 'matcName'
+        },
+        queryParams: {matcBusi: MATC_BUSI_检验, status: 1}
+      },
+      // 搜索供应商检索
+      selectCorpWidget: {
+        url: '/app/mat/widget/selectCorp.js',
+        bind: {
+          corpId: 'corpId',
+          corpName: 'corpName'
+        },
+        queryParams: {corpType: CORP_TYPE_供应商}
+      }
+    };
+
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    function queryGrid1() {
+      var queryUrl = '/mat/matBatch/queryBatchRoomView';// 自行替换此参数
+      $grid1.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid1.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryForm
+      }, true);
+      if ($grid2 != undefined && $grid2 != null) {
+        $grid2.jqGrid("clearGridData");
+      }
+    }
+
+    function queryGrid2() {
+      if ($grid2 == undefined || $grid2 == null)
+        return;
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var queryUrl = '/stock/stockCell/queryByStockId';// 自行替换此参数
+      var obj = $form.formGet();
+      obj.matId = row.matId;
+      obj.batchId = row.batchId;
+      $grid2.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: obj
+      });
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '批次查询';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '批次号/物资编码/图号型号/物资名称';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [
+        [
+          {xtype: 'hidden', name: 'matcId'},
+          {xtype: 'hidden', name: 'corpId'},
+          {
+            xtype: 'searchbox',
+            label: '检验分类',
+            name: 'matcName',
+            labelWidth: 'auto',
+            widget: widgets.selectCatalogWidget,
+            onChange: function (value) {
+              if (!isNotNullOrEmpty(value)) {
+                $form.formSet({
+                  matcId: ''
+                })
+              }
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'searchbox',
+            label: '供应商',
+            name: 'corpName',
+            labelWidth: 'auto',
+            widget: widgets.selectCorpWidget,
+            onChange: function (value) {
+              if (!isNotNullOrEmpty(value)) {
+                $form.formSet({
+                  corpId: ''
+                })
+              }
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '物资分类', name: 'matType', labelWidth: 'auto', width: 180,
+            data: $.yvan.sysDict('matType').combowithAll(), value: '',
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+        ],
+        [
+          {
+            xtype: 'textbox',
+            label: '检索条件',
+            name: 'queryProperties',
+            prompt: queryFormPrompt,
+            labelWidth: 'auto',
+            width: 350,
+            events: {keydown: enterQueryGrid1},
+          },
+          // {
+          //   xtype: 'yvselect', label: '库存状态', name: 'hasStock', data: [
+          //     {id: '', text: '全部'},
+          //     {id: '1', text: '有库存'},
+          //     {id: '0', text: '无库存'}
+          //   ],
+          //   labelWidth: 'auto', width: 180,
+          //   onChange: function (value) {
+          //     queryGrid1();
+          //   }
+          // },
+          // {
+          //   xtype: 'yvselect', label: '批次状态', name: 'matQc',
+          //   data: $.yvan.sysDict('matQc').combowithAll(),
+          //   labelWidth: 'auto', width: 180,
+          //   onChange: function (value) {
+          //     queryGrid1();
+          //   }
+          // },
+        ],
+
+      ]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle1 = '批次列表';// 自行替换此参数
+    var gridToolbar1 = {
+      xtype: 'toolbar',
+      title: gridToolbarTitle1,
+      items: [
+          {
+              text: '打印包装单',
+              iconCls: 'fa fa-cloud-upload',
+              onClick: function () {
+                  var row = $grid1.rowData();
+                  if (!row) {
+                      $.yvan.msg('请先选择一行数据');
+                      return;
+                  }
+                  $.yvan.showDialog(this,
+                      require('/app/view/dialogWarnShow.js')({
+                          batchId: row.batchId,
+                      })
+                  );
+              }
+          },
+        // {
+        //   text: '打印包装单100*80',
+        //   iconCls: 'fa fa-cloud-upload',
+        //   onClick: function () {
+        //     var row = $grid1.rowData();
+        //     if (!row) {
+        //       $.yvan.msg('请先选择一行数据');
+        //       return;
+        //     }
+        //     $.yvan.showDialog(this,
+        //       require('/app/view/dialogWarnShow80.js')({
+        //         batchId: row.batchId,
+        //       })
+        //     );
+        //   }
+        // },
+        // {
+        //   text: '打印包装单(105打印机)',
+        //   iconCls: 'fa fa-cloud-upload',
+        //   onClick: function () {
+        //     var row = $grid1.rowData();
+        //     if (!row) {
+        //       $.yvan.msg('请先选择一行数据');
+        //       return;
+        //     }
+        //     $.yvan.showDialog(this,
+        //       require('/app/view/dialogWarnShow105.js')({
+        //         batchId: row.batchId,
+        //       })
+        //     );
+        //   }
+        // },
+      ]
+    };
+
+    return {
+      north: {
+        height: 135,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm
+        ]
+      },
+      center: {
+        height: '70%',
+        split: true,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar1,
+          autoSizeColumns: true,
+          columns:
+            [[
+              {title: '批次ID', field: 'batchId', hidden: true},
+              {title: '物资ID', field: 'matId', hidden: true},
+              {title: '批次条码', field: 'batchBar', hidden: true},
+              {title: '批次号', field: 'batchCode', width: 200},
+              {title: '物资编码', field: 'matBar', width: 200},
+              {title: '图号/型号', field: 'matCode', width: 200},
+              {title: '物资名称', field: 'matName', width: 200},
+              {title: '物资编码属性', field: 'matAttrCode'},
+              {title: '物资分类', field: 'matType', formatter: $.fn.fmatter.matType, width: 80},
+              {title: '检验分类', field: 'matcName', width: 200},
+              {title: '供应商', field: 'corpName'},
+              {title: '购买单位', field: 'corpUnit'},
+              {title: '购买数', field: 'corpAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+              {title: '库存数', field: 'stockAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+              {title: '生产日期', field: 'dateMade', width: 140, align: 'center', formatter: $.fn.fmatter.tsymd},
+              {title: '入库日期', field: 'dateArrival', width: 140, align: 'center', formatter: $.fn.fmatter.tsymd},
+              {title: '检验员', field: 'name'},
+            ]],
+          onSelectRow: function (rowid) {
+            queryGrid2();
+          }
+        }
+      },
+      south: {
+        height: '30%',
+        border: false,
+        items: {
+          xtype: 'tabs',
+          items: [
+            {
+              title: '批次位置信息',
+              lazy: true,
+              items: {
+                onRender: function () {
+                  $grid2 = $(this);
+                },
+                xtype: 'grid',
+                autoSizeColumns: true,
+                pagination: true,
+                columns: [
+                  [
+                    {title: '编码属性ID', field: 'celldetId', hidden: true},
+                    {title: '货位ID', field: 'cellId', hidden: true},
+                    {title: '库存ID', field: 'stockId', hidden: true},
+                    {title: '单据ID', field: 'billId', hidden: true},
+                    {title: '库区', field: 'farmName', width: 140},
+                    {title: '仓库', field: 'roomName', width: 140},
+                    {title: '区域', field: 'workArea', width: 200, formatter: $.fn.fmatter.workArea,},
+                    {title: '货组', field: 'rowName', width: 200, align: "center"},
+                    {title: '货位类型', field: 'cellMatQc', width: 200, align: "center", formatter: $.fn.fmatter.matQc,},
+                    {title: '货位号', field: 'cellBar', width: 200, align: "center"},
+                    {
+                      title: '数量',
+                      field: 'matAmount',
+                      width: 350,
+                      align: "right",
+                      formatter: $.fn.fmatter.formatNumberBigDecimal
+                    },
+                  ]
+                ]
+              }
+            },
+          ]
+        }
+      }
+    };
+  };
+});

+ 237 - 0
admin-ui/app/view/queryCorp.js

@@ -0,0 +1,237 @@
+define(function (require) {
+    return function () {
+
+      var $grid1, $grid2, $form;
+
+      // 输入搜索文本后点击回车按钮查询列表1
+      function enterQueryGrid1(e) {
+        if (e.keyCode === 13) {
+          var tmp = $(this).val();
+          $form.formSet({queryProperties: tmp});
+          queryGrid1();
+        }
+      }
+
+      // 查询列表1
+      function queryGrid1() {
+        var queryUrl = '/bas/corp/query';// 自行替换此参数
+        $grid1.jqGrid("clearGridData");
+        var queryForm = $form.formGet();
+        queryForm.corpType = CORP_TYPE_供应商;
+        $grid1.reload({
+          mtype: 'POST',
+          url: api(queryUrl),
+          queryParams: queryForm
+        }, true);
+      }
+
+      // 根据列表1行数据查询列表2
+      function queryGrid2(rowid) {
+        var row = $grid1.rowData(rowid);
+        if (!row) {
+          $.yvan.msg('请先选择一行数据');
+          return;
+        }
+        var queryUrl = '/bas/corpUser/query';// 自行替换此参数
+        var queryData = {corpId: row.corpId/*, ownerId: $form.formGet().ownerId*/};// 多个参数自行新增
+        $grid2.reload({
+          mtype: 'POST',
+          url: api(queryUrl),
+          queryParams: queryData
+        });
+      }
+
+      function getLevList() {
+        var _datas = [];
+        _datas.push({
+          "id": '',
+          "text": '全部'
+        });
+        $.yvan.ajax({
+          url: api('/bas/corp/queryLev'),
+          data: {},
+          method: 'post',
+          async: false,
+          success: function (data) {
+            if (data.data != null && data.data != undefined) {
+              for (var i = 0; i < data.data.length; i++) {
+                _datas.push({
+                  "id": data.data[i], "text": data.data[i]
+                });
+              }
+            }
+          }
+        });
+        return _datas;
+      }
+
+      // 搜索按钮
+      var queryToolbarTitle = '供应商管理';// 自行替换此参数
+      var queryToolbar = {
+        xtype: 'toolbar', title: queryToolbarTitle, items: [
+          {
+            text: '查询', iconCls: 'fa fa-search', onClick: function () {
+              queryGrid1();
+            }
+          }, {
+            text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+              $form.formClear();
+              queryGrid1();
+            }
+          }, {
+            text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+              App.closeMe(this);
+            }
+          }
+        ]
+      };
+
+      // 搜索条件
+      var queryFormPrompt = '供应商名称/联系人/联系电话';// 自行替换此参数
+      var queryForm = {
+        onRender: function () {
+          $form = $(this);
+        },
+        xtype: 'form',
+        items: [[
+          {
+            xtype: 'textbox',
+            label: '检索条件',
+            name: 'queryProperties',
+            prompt: queryFormPrompt,
+            labelWidth: 'auto',
+            events: {keydown: enterQueryGrid1},
+          },
+          // {
+          //   xtype: 'yvselect', label: '分级', name: 'lev', labelWidth: 'auto', width: 180,
+          //   data: getLevList(),
+          //   onChange:
+          //     function () {
+          //       $grid2.jqGrid("clearGridData");
+          //       queryGrid1();
+          //     }
+          // }
+        ]]
+      };
+
+      // 列表1增删改查按钮
+      var gridToolbarTitle1 = '供应商列表';// 自行替换此参数
+      var gridToolbar1 = {
+        xtype: 'toolbar',
+        title: gridToolbarTitle1,
+      };
+
+      // 列表2增删改查按钮
+      var gridToolbarTitle2 = '供应商用户列表';// 自行替换此参数
+      var gridToolbar2 = {
+        xtype: 'toolbar',
+        title: gridToolbarTitle2,
+      };
+
+      return {
+        north: {
+          height: 90,
+          split: true,
+          border: false,
+          items: [
+            queryToolbar,
+            queryForm
+          ]
+        },
+        west: {
+          width: "60%",
+          border: false,
+          split: true,
+          items: {
+            onRender: function () {
+              $grid1 = $(this);
+              queryGrid1();
+            },
+            xtype: 'grid',
+            toolbar: gridToolbar1,
+            idField: 'corpId',
+            title: '供应商列表',
+            columns: [[
+              {field: 'corpId', hidden: true},
+              {title: '供应商名称', field: 'corpName', hidden: true},
+              {title: '内部机构ID', field: 'orgId', hidden: true},
+              {title: '内部机构', field: 'orgName', hidden: true},
+              {title: '供应商编码', field: 'corpCode', hidden: true},
+              {title: '供应商条码', field: 'corpBar', hidden: true},
+              {title: '供应商社会唯一码', field: 'corpSn', hidden: true},
+              {title: '供应商简称', field: 'corpNameSn', hidden: true},
+              {title: '供应商英文名', field: 'corpNameEn', hidden: true},
+              {title: '供应商名称拼音', field: 'corpNamePy', hidden: true},
+              {title: '供应商介绍', field: 'corpDesp', hidden: true},
+              {title: '联系邮箱', field: 'linkEmail', hidden: true},
+              {title: '联系地址', field: 'linkAddress', hidden: true},
+              {title: '邮政编码', field: 'linkZipcode', hidden: true},
+              {title: '所在国家', field: 'regCountry', hidden: true},
+              {title: '所在国家', field: 'regCode', hidden: true},
+              {title: '所在省份', field: 'regProv', hidden: true},
+              {title: '所在城市', field: 'regCity', hidden: true},
+              {title: '所在乡镇', field: 'regCounty', hidden: true},
+              {title: '备注', field: 'remark', hidden: true},
+              {title: '状态', field: 'status', hidden: true},
+              {title: '树上级ID', field: 'treeUp', hidden: true},
+              {title: '上级企业', field: 'treeUpName', hidden: true},
+              {title: '树级别', field: 'treeLev', hidden: true},
+              {title: '树路径', field: 'treePath', hidden: true},
+              {title: '树编码', field: 'treeCode', hidden: true},
+              {title: '树排序', field: 'treeSort', hidden: true},
+              {title: '新增人', field: 'userCreate', hidden: true},
+              {title: '更新人', field: 'Update', hidden: true},
+              {title: '供应商名称', field: 'corpNameView', formatter: $.fn.fmatter.treeNameView},// 树结构需要fmatter
+              {
+                title: '类型', field: 'orgIdCN', align: 'center', formatter: function (value, data) {
+                  if (isNotNull(data) && isNotNull(data.rowData) && isNotNull(data.rowData.orgId)) {
+                    if ("0" == data.rowData.orgId || "" == data.rowData.orgId) {
+                      return "外部";
+                    }
+                    else {
+                      return "<span style='color: green;'>内部</span>";
+                    }
+                  }
+                }
+              },
+              {title: '分级', field: 'lev', hidden: true},
+              {title: '工厂代号', field: 'nickName', hidden: true},
+              {title: '隶属关系', field: 'oldName', hidden: true},
+              {title: '主供产品', field: 'mainProduct', hidden: true},
+              {title: '联系人', field: 'linkMan'},
+              {title: '联系电话', field: 'linkTel'},
+              {title: '人数', field: 'numUser', align: 'right'},
+            ]],
+            onSelectRow: function (rowid) {
+              queryGrid2(rowid);
+            }
+          }
+        },
+        center: {
+          width: '40%',
+          border: true,
+          items: {
+            onRender: function () {
+              $grid2 = $(this);
+            },
+            xtype: 'grid',
+            toolbar: gridToolbar2,
+            idField: 'bcuId',
+            title: '供应商用户列表',
+            pagination: false,
+            columns: [[
+              {field: 'bcuId', hidden: true},
+              {field: 'corpId', hidden: true},
+              {title: '姓名', field: 'name'},
+              {title: '性别', field: 'gender', formatter: $.fn.fmatter.genderSrc, align: 'center'},
+              {title: '联系电话', field: 'tel'},
+              {title: '电子邮箱', field: 'email'},
+              {title: '所在部门', field: 'dept'},
+              {title: '通讯地址', field: 'address'},
+            ]]
+          }
+        }
+      };
+    };
+  }
+);

+ 168 - 0
admin-ui/app/view/queryFarmUser.js

@@ -0,0 +1,168 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid, $form;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 查询列表
+    function queryGrid1() {
+      var queryUrl = '/wms/farmUser/queryFarmUserRole';// 自行替换此参数
+      $grid.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryForm
+      });
+    }
+
+    //获取库区列表
+    function getFarmList() {
+      var _datas = [];
+      _datas.push({
+        "id": '',
+        "text": '全部'
+      })
+      $.yvan.ajax({
+        url: api('/wms/whFarm/queryAll'),
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].farmId,
+                "text": data.data[i].farmName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //获取角色列表
+    function getRoleList() {
+      var _datas = [];
+      _datas.push({
+        "id": "",
+        "text": "全部"
+      });
+      $.yvan.ajax({
+        url: api('/wms/farmUser/queryRoleUserCount'),
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].roleId,
+                "text": data.data[i].roleName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '库区人员查询';
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '姓名/联系电话';
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1},
+        },
+        {
+          xtype: 'yvselect', label: '库区', name: 'farmId', labelWidth: 'auto', width: 200,
+          data: getFarmList(),
+          onChange: function () {
+            queryGrid1();
+          }
+        },
+        {
+          xtype: 'yvselect', label: '角色', name: 'roleId', labelWidth: 'auto', width: 220, panelHeight: 220,
+          data: getRoleList(),
+          onChange: function () {
+            queryGrid1();
+          }
+        },
+      ]]
+    };
+
+    // 列表增删改查按钮
+    var gridToolbarTitle = '人员列表';
+    var gridToolbar = {
+      xtype: 'toolbar', title: gridToolbarTitle,
+      items: []
+    }
+
+    return {
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          idField: "wwuId",
+          toolbar: {
+            xtype: 'div',
+            items: [
+              queryToolbar,
+              queryForm,
+              gridToolbar
+            ]
+          },
+          columns: [[
+            {field: 'wwu_id', hidden: true},
+            {title: '库区', field: 'farmName', align: 'center'},
+            {title: '角色', field: 'roleName'},
+            {title: '姓名', field: 'name'},
+            {title: '性别', field: 'gender', align: 'center', formatter: $.fn.fmatter.genderSrc},
+            {title: '联系电话', field: 'mobile'},
+          ]]
+        }
+      }
+    };
+  };
+});

+ 323 - 0
admin-ui/app/view/queryMatInfo.js

@@ -0,0 +1,323 @@
+//物资信息查询页面
+define(function (require) {
+  return function () {
+
+    var $grid1, $grid2, $form;
+
+    // 弹框的方式
+    var widgets = {
+      // 搜索分类检索
+      selectCatalogWidget: {
+        url: '/app/mat/widget/selectCatalog.js',
+        bind: {
+          matcId: 'matcId',
+          matcName: 'matcName'
+        },
+        queryParams: {matcBusi: MATC_BUSI_检验, status: 1}
+      }
+    };
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    //获取物资信息
+    function queryGrid1() {
+      var queryUrl = '/mat/matInfo/queryMatView';// 自行替换此参数
+      $grid1.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid1.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryForm
+      }, true);
+      if ($grid2 != undefined && $grid2 != null) {
+        $grid2.jqGrid("clearGridData");
+      }
+    }
+
+    //获取批次信息
+    function queryGrid2() {
+      if ($grid2 == undefined || $grid2 == null)
+        return;
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var queryForm = $form.formGet();
+      queryForm.matId = row.matId;
+      var queryUrl = '/mat/matBatch/queryMatBatchView';// 自行替换此参数
+      $grid2.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryForm
+      });
+    }
+
+    //获取仓库信息
+    function getRoomList() {
+      var _datas = [];
+      var qd = {};
+      if (App.currentRoomId > 0) {
+        qd = {roomId: App.currentRoomId};
+        _datas = [];
+      } else {
+        qd = {roomType: ROOM_TYPE_CK};
+      }
+      $.yvan.ajax({
+        url: api('/wms/whRoom/queryAll'),
+        data: qd,
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].roomId,
+                "text": data.data[i].roomName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '物资查询';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '物资编码/图号型号/物资名称';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [
+        [
+          {xtype: 'hidden', name: 'matcId'},
+          {
+            xtype: 'textbox',
+            label: '检索条件',
+            name: 'queryProperties',
+            prompt: queryFormPrompt,
+            labelWidth: 'auto',
+            events: {keydown: enterQueryGrid1},
+          },
+          {
+            xtype: 'yvselect', label: '仓库', name: 'roomId', labelWidth: 'auto', width: 220,
+            data: getRoomList(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'searchbox',
+            label: '检验分类',
+            name: 'matcName',
+            labelWidth: 'auto',
+            widget: widgets.selectCatalogWidget,
+            onChange: function (value) {
+              if (!isNotNullOrEmpty(value)) {
+                $form.formSet({
+                  matcId: ''
+                })
+              }
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '物资分类', name: 'matType', labelWidth: 'auto', width: 180,
+            data: $.yvan.sysDict('matType').combowithAll(), value: '',
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '购买状态', name: 'isBuy', data: [
+              {id: '1', text: '购买过'},
+              {id: '0', text: '未购买'}
+            ],
+            labelWidth: 'auto', width: 180,
+            onChange: function (value) {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '库存状态', name: 'hasStock', data: [
+              {id: '1', text: '有库存'},
+              {id: '0', text: '无库存'}
+            ],
+            labelWidth: 'auto', width: 180,
+            onChange: function (value) {
+              queryGrid1();
+            }
+          },
+        ]
+      ]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle1 = '物资列表';// 自行替换此参数
+    var gridToolbar1 = {
+      xtype: 'toolbar',
+      title: gridToolbarTitle1,
+      items: [
+        // {
+        //   text: '历史价格', iconCls: 'fa fa-sticky-note-o', onClick: function () {
+        //     var row = $grid1.rowData();
+        //     if (!row) {
+        //       $.yvan.msg('请先选择一行数据');
+        //       return;
+        //     }
+        //     $.yvan.showDialog(this,
+        //       require('/app/mat/info/dialogPrice.js')({
+        //         confirm: function () {
+        //           $grid1.reload();
+        //         },
+        //         isEdit: true,
+        //         matId: row.matId
+        //       })
+        //     );
+        //   }
+        // },
+        // {
+        //   text: '预览', iconCls: 'fa fa-sticky-note-o', onClick: function () {
+        //     var row = $grid1.rowData();
+        //     if (!row) {
+        //       $.yvan.msg('请先选择一行数据');
+        //       return;
+        //     }
+        //     var dlg = require('/app/mat/info/viewDialogInfo.js')({// 自行替换此参数
+        //       isEdit: true,
+        //       matId: row.matId,
+        //     });
+        //     $.yvan.showDialog(this, dlg);
+        //   }
+        // }
+      ]
+    };
+
+    return {
+      north: {
+        height: 90,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm
+        ]
+      },
+      center: {
+        height: '60%',
+        split: true,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar1,
+          autoSizeColumns: true,
+          columns:
+            [[
+              {title: '物资ID', field: 'matId', hidden: true},
+              {title: '物资编码', field: 'matBar', width: 250},
+              {title: '图号/型号', field: 'matCode', width: 200},
+              {title: '物资名称', field: 'matName', width: 250},
+              {title: '物资编码属性', field: 'matAttrCode'},
+              {title: '物资分类', field: 'matType', formatter: $.fn.fmatter.matType, width: 80},
+              {title: '检验分类', field: 'matcName', width: 150},
+              {title: '计量单位', field: 'unitName'},
+              {
+                title: '计划价',
+                field: 'planPrice',
+                formatter: $.fn.fmatter.formatCurrency,
+                width: 80,
+                align: 'right',
+              },
+              {title: '首次购买日期', field: 'firstBuyDate', formatter: $.fn.fmatter.tsymd, align: 'center'},
+              {title: '批次数', field: 'batchNum', align: 'right'},
+              {title: '库存数', field: 'matAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+            ]],
+          onSelectRow: function (rowid) {
+            queryGrid2();
+          }
+        }
+      },
+      south: {
+        height: '40%',
+        border: false,
+        items: {
+          xtype: 'tabs',
+          items: [
+            {
+              title: '批次列表',
+              lazy: true,
+              items: {
+                onRender: function () {
+                  $grid2 = $(this);
+                },
+                xtype: 'grid',
+                autoSizeColumns: true,
+                idField: 'batchId',
+                pagination: true,
+                columns: [
+                  [
+                    {title: '批次ID', field: 'batchId', hidden: true},
+                    {title: '批次条码', field: 'batchBar', hidden: true},
+                    {title: '批次号', field: 'batchCode', width: 200},
+                    {title: '检验分类', field: 'matcName', width: 200},
+                    {title: '供应商', field: 'corpName'},
+                    {title: '购买单位', field: 'corpUnit'},
+                    {
+                      title: '购买数量',
+                      field: 'corpAmount',
+                      align: 'right',
+                      formatter: $.fn.fmatter.formatNumberBigDecimal
+                    },
+                    {
+                      title: '库存数量',
+                      field: 'matAmount',
+                      align: 'right',
+                      formatter: $.fn.fmatter.formatNumberBigDecimal
+                    },
+                    {title: '生产日期', field: 'dateMade', width: 140, formatter: $.fn.fmatter.tsymd, align: 'center',},
+                    {title: '保证贮存期', field: 'saveMinDate', formatter: $.fn.fmatter.tsymd, align: "center"},
+                    {title: '最大贮存期', field: 'saveMaxDate', formatter: $.fn.fmatter.tsymd, align: "center"},
+                    {title: '入库日期', field: 'dateArrival', width: 140, formatter: $.fn.fmatter.tsymd, align: 'center',},
+                    {title: '检验员', field: 'name'},
+                  ]
+                ]
+              }
+            },
+          ]
+        }
+      }
+    };
+  };
+});

+ 194 - 0
admin-ui/app/view/queryOrg.js

@@ -0,0 +1,194 @@
+define(function (require) {
+    return function () {
+
+      var $grid1, $grid2, $form;
+
+      // 输入搜索文本后点击回车按钮查询列表1
+      function enterQueryGrid1(e) {
+        if (e.keyCode === 13) {
+          var tmp = $(this).val();
+          $form.formSet({queryProperties: tmp});
+          queryGrid1();
+        }
+      }
+
+      function queryGrid1() {
+        var queryUrl = '/hr/org/query';// 自行替换此参数
+        $grid1.jqGrid("clearGridData");
+        var queryForm = $form.formGet();
+        $grid1.reload({
+          mtype: 'POST',
+          url: api(queryUrl),
+          queryParams: queryForm
+        }, true);
+        if ($grid2 != undefined) {
+          $grid2.jqGrid("clearGridData");
+        }
+      }
+
+      function queryGrid2(rowid) {
+        var row = $grid1.rowData(rowid);
+        if (!row) {
+          $.yvan.msg('请先选择一行数据');
+          return;
+        }
+        var queryUrl = '/hr/deptUser/query';// 自行替换此参数
+        var queryData = {deptId: row.orgId};// 多个参数自行添加
+        $grid2.reload({
+          mtype: 'POST',
+          url: api(queryUrl),
+          queryParams: queryData
+        });
+      }
+
+      // 搜索按钮
+      var queryToolbarTitle = '组织机构查询';// 自行替换此参数
+      var queryToolbar = {
+        xtype: 'toolbar', title: queryToolbarTitle, items: [
+          {
+            text: '查询', iconCls: 'fa fa-search', onClick: function () {
+              queryGrid1();
+            }
+          }, {
+            text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+              $form.formClear();
+              queryGrid1();
+            }
+          }, {
+            text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+              App.closeMe(this);
+            }
+          }
+        ]
+      };
+
+      // 搜索条件
+      var queryFormPrompt = '机构名称/编码/助记码';// 自行替换此参数
+      var queryForm = {
+        onRender: function () {
+          $form = $(this);
+        },
+        xtype: 'form',
+        items: [[
+          {
+            xtype: 'textbox',
+            label: '检索条件',
+            name: 'queryProperties',
+            prompt: queryFormPrompt,
+            labelWidth: 'auto',
+            events: {keydown: enterQueryGrid1},
+          }, {
+            xtype: 'yvselect', label: '是否机构', name: 'isOrg', labelWidth: 'auto', width: 180, value: '',
+            data: $.yvan.sysDict('yesOrNo').combowithAll(),
+            onChange: function () {
+              queryGrid1();
+            }
+          }, {
+            xtype: 'yvselect', label: '是否部门', name: 'isDept', labelWidth: 'auto', width: 180, value: '',
+            data: $.yvan.sysDict('yesOrNo').combowithAll(),
+            onChange: function () {
+              queryGrid1();
+            }
+          }, {
+            xtype: 'yvselect', label: '启用状态', name: 'status', labelWidth: 'auto', width: 180, value: '',
+            data: $.yvan.sysDict('status').combowithAll(),
+            onChange: function () {
+              queryGrid1();
+            }
+          }
+        ]]
+      };
+
+      // 列表1增删改查按钮
+      var gridToolbarTitle1 = '组织机构列表';// 自行替换此参数
+      var gridToolbar1 = {
+        xtype: 'toolbar',
+        title: gridToolbarTitle1,
+      };
+
+      // 列表2增删改查按钮
+      var gridToolbarTitle2 = '机构用户列表';// 自行替换此参数
+      var gridToolbar2 = {
+        xtype: 'toolbar',
+        title: gridToolbarTitle2,
+      };
+
+      return {
+        north: {
+          height: 90,
+          split: true,
+          border: false,
+          items: [
+            queryToolbar,
+            queryForm
+          ]
+        },
+        west: {
+          width: "60%",
+          border: false,
+          split: true,
+          items: {
+            onRender: function () {
+              $grid1 = $(this);
+              queryGrid1();
+            },
+            xtype: 'grid',
+            toolbar: gridToolbar1,
+            idField: 'orgId',
+            title: '组织机构列表',
+            columns: [[
+              {title: '机构ID', field: 'orgId', hidden: true},
+              {title: '机构名称', field: 'orgName', hidden: true},
+              {title: '机构名称', field: 'orgNameView', formatter: $.fn.fmatter.treeNameView},// 树结构需要fmatter
+              {title: '机构编码', field: 'orgCode', hidden: true},
+              {title: '助记码', field: 'orgCodeM', hidden: true},
+              {title: '机构名称简称', field: 'orgNameSn'},
+              {title: '机构名称拼音', field: 'orgNamePy', hidden: true},
+              {title: '树上级ID', field: 'treeUp', hidden: true},
+              {title: '上级机构', field: 'treeUpName'},
+              {title: '树级别', field: 'treeLev', hidden: true},
+              {title: '树路径', field: 'treePath', hidden: true},
+              {title: '树编码', field: 'treeCode', hidden: true},
+              {title: '树排序', field: 'treeSort', hidden: true},
+              {title: '联系人', field: 'linkMan'},
+              {title: '联系电话', field: 'linkTel'},
+              {title: '是否机构', field: 'isOrg', align: "center", formatter: $.fn.fmatter.yesOrNoSrc},
+              {title: '是否部门', field: 'isDept', align: "center", formatter: $.fn.fmatter.yesOrNoSrc},
+              {title: '联系人', field: 'linkMan', hidden: true},
+              {title: '联系电话', field: 'linkTel', hidden: true},
+              {title: '备注', field: 'remark', hidden: true},
+              {title: '状态', field: 'status', hidden: true},
+              {title: '启用状态', field: 'statusView', align: "center", formatter: $.fn.fmatter.statusView},
+              {title: '人员统计', field: 'numUser', align: "right"},
+            ]],
+            onSelectRow: function (rowid) {
+              queryGrid2(rowid);
+            }
+          }
+        },
+        center: {
+          width: '40%',
+          border: true,
+          items: {
+            onRender: function () {
+              $grid2 = $(this);
+            },
+            xtype: 'grid',
+            toolbar: gridToolbar2,
+            idField: 'hduId',
+            title: '机构用户列表',
+            pagination: false,
+            columns: [[
+              {field: 'hduId', hidden: true},
+              {field: 'deptId', hidden: true},
+              {field: 'userId', hidden: true},
+              {title: '姓名', field: 'name'},
+              {title: '性别', field: 'gender', formatter: $.fn.fmatter.genderSrc, align: 'center'},
+              {title: '联系电话', field: 'tel'},
+            ]]
+          }
+        }
+      };
+    };
+  }
+);

+ 147 - 0
admin-ui/app/view/queryPgh.js

@@ -0,0 +1,147 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid, $form;
+
+    // 输入搜索文本后点击回车按钮查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 查询列表
+    function queryGrid1() {
+      var queryUrl = '/pms/pmsPgh/query';// 自行替换此参数
+      $grid.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryForm
+      });
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '派工号管理';
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '派工号/送修单位/机尾号';
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1},
+        },
+        {
+          xtype: 'yvselect', label: '维修类别', name: 'mfLev', labelWidth: 'auto', width: 180,
+          data: $.yvan.sysDict('mfLev').combowithAll(), value: '',
+          onChange: function () {
+            queryGrid1();
+          }
+        },
+        {
+          xtype: 'yvselect', label: '发布状态', name: 'status', labelWidth: 'auto', width: 180,
+          data: $.yvan.sysDict('statusPub').combowithAll(), value: '',
+          onChange: function () {
+            queryGrid1();
+          }
+        },
+      ]]
+    };
+
+    // 列表增删改查按钮
+    var gridToolbarTitle = '派工号列表';
+    var gridToolbar = {
+      xtype: 'toolbar', title: gridToolbarTitle,
+      items: [
+        {
+          text: '预览', iconCls: 'fa fa-sticky-note-o', onClick: function () {
+            var row = $grid.rowData();
+            if (!row) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+            }
+            var dlg = require('/app/pms/pgh/viewDialogPgh.js')({// 自行替换此参数
+              isEdit: true,
+              pghId: row.pghId,// 自行替换此参数
+            });
+            $.yvan.showDialog(this, dlg);
+          }
+        }
+      ]
+    }
+
+    return {
+      center: {
+        border: false,
+        items: {
+          onRender: function () {
+            $grid = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          idField: "pghId",
+          toolbar: {
+            xtype: 'div',
+            items: [
+              queryToolbar,
+              queryForm,
+              gridToolbar
+            ]
+          },
+          columns: [[
+            {title: '派工ID', field: 'pghId', hidden: true},
+            {title: '派工号', field: 'pghCode'},
+            {title: '派工号名称', field: 'pghName', hidden: true},
+            {title: '派工号类型', field: 'pghType', align: 'center', formatter: $.fn.fmatter.pghTypeSrc},
+            {title: '机型管理', field: 'apmId', hidden: true},
+            {title: '机型', field: 'apmName'},
+            {title: '制造号', field: 'apIdcard'},
+            {title: '机尾号', field: 'apIdtail'},
+            {title: '维修类别', field: 'mfLev', align: 'center', formatter: $.fn.fmatter.mfLevSrc},
+            {title: '送修单位', field: 'apOwner'},
+            {title: '投产日期', field: 'mfStart', align: 'center', formatter: $.fn.fmatter.tsymd},
+            {title: '交付日期', field: 'mfEnd', align: 'center', formatter: $.fn.fmatter.tsymd},
+            {title: '备注', field: 'remark', hidden: true},
+            {title: '整体状态', field: 'status', hidden: true},
+            {title: '整体状态', field: 'allStatusView', align: 'center', formatter: $.fn.fmatter.allStatusView},
+            {title: '发布时间', field: 'pubTime', formatter: $.fn.fmatter.ts, hidden: true},
+            {title: '新增人', field: 'userCreate', align: 'center', hidden: true},
+            {title: '新增时间', field: 'timeCreate', formatter: $.fn.fmatter.ts},
+            {title: '更新人', field: 'userUpdate', align: 'center', hidden: true},
+            {title: '更新时间', field: 'timeUpdate', formatter: $.fn.fmatter.ts}
+          ]]
+        }
+      }
+    };
+  };
+});

+ 428 - 0
admin-ui/app/view/queryStock.js

@@ -0,0 +1,428 @@
+define(function (require) {
+    return function () {
+
+      // var inputParam = Message.getTempParamData();
+
+      var $grid1, $grid2, $grid3, $form, $comb;
+
+      // 弹框的方式
+      var widgets = {
+        // 搜索分类检索
+        selectCatalogWidget: {
+          url: '/app/mat/widget/selectCatalog.js',
+          bind: {
+            matcQc: 'matcId',
+            matcName: 'matcName'
+          },
+          queryParams: {matcBusi: MATC_BUSI_检验, status: 1}
+        }
+      };
+
+      // 获取库区
+      function getFarmList() {
+        var _datas = [];
+        _datas.push({
+          "id": '',
+          "text": '全部'
+        })
+        $.yvan.ajax({
+          async: false,
+          method: 'post',
+          url: api('/wms/whFarm/queryAll'),
+          data: {},
+          success: function (data) {
+            if (data.data != null && data.data != undefined) {
+              for (var i = 0; i < data.data.length; i++) {
+                _datas.push({
+                  "id": data.data[i].farmId,
+                  "text": data.data[i].farmName
+                })
+              }
+            }
+          }
+        });
+        return _datas;
+      }
+
+      // 获取仓库
+      function getRoomList() {
+        var _datas = [];
+        _datas.push({
+          "id": '',
+          "text": '全部'
+        });
+        var qd = {};
+        if ($form) {
+          qd = {farmId: $form.formGet().farmId};
+        }
+        $.yvan.ajax({
+          url: api('/wms/whRoom/queryAll'),
+          data: qd,
+          async: false,
+          method: 'post',
+          success: function (data) {
+            if (data.data != null && data.data != undefined) {
+              for (var i = 0; i < data.data.length; i++) {
+                _datas.push({
+                  "id": data.data[i].roomId,
+                  "text": data.data[i].roomName
+                })
+              }
+            }
+          }
+        });
+        return _datas;
+      }
+
+      function enterQueryGrid1(e) {
+        if (e.keyCode === 13) {
+          var tmp = $(this).val();
+          $form.formSet({queryProperties: tmp});
+          queryGrid1();
+        }
+      }
+
+      // 物资库存查询列表
+      function queryGrid1() {
+        var queryUrl = '/wms/stock/queryStockMatList';// 自行替换此参数
+        $grid1.jqGrid("clearGridData");
+        var queryForm = $form.formGet();
+        $grid1.reload({
+          mtype: 'POST',
+          url: api(queryUrl),
+          queryParams: queryForm
+        }, true);
+        if ($grid2 != undefined) {
+          $grid2.jqGrid("clearGridData");
+        }
+        if ($grid3 != undefined) {
+          $grid3.jqGrid("clearGridData");
+        }
+      }
+
+      //物资批次
+      function queryGrid2(rowid) {
+        var row = $grid1.rowData(rowid);
+        if (!row) {
+          $.yvan.msg('请先选择一行数据');
+          return;
+        }
+        var queryUrl = '/wms/stock/queryStockBatchList';// 自行替换此参数
+        var queryForm = $form.formGet();
+        queryForm.matId = row.matId;
+        $grid2.reload({
+          mtype: 'POST',
+          url: api(queryUrl),
+          queryParams: queryForm
+        });
+        if ($grid3 != undefined) {
+          $grid3.jqGrid("clearGridData");
+        }
+      }
+
+      //批次
+      function queryGrid3() {
+        var row2 = $grid2.rowData();
+        if (!row2) {
+          $.yvan.msg('请先选择一行数据');
+          return;
+        }
+        $grid3.jqGrid("clearGridData");
+        var obj = $form.formGet();
+        obj.batchId = row2.batchId;
+        obj.matId = row2.matId;
+        obj.matQc = row2.matQc;
+        $grid3.reload({
+          url: api('/stock/stockCell/queryByStockId'),
+          mtype: 'POST',
+          queryParams: obj
+        });
+      }
+
+      // 搜索按钮
+      var queryToolbarTitle = '物资查询';// 自行替换此参数
+      var queryToolbar = {
+        xtype: 'toolbar', title: queryToolbarTitle, items: [
+          {
+            text: '查询', iconCls: 'fa fa-search', onClick: function () {
+              queryGrid1();
+            }
+          }, {
+            text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+              $form.formClear();
+              queryGrid1();
+            }
+          }, {
+            text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+              App.closeMe(this);
+            }
+          }
+        ]
+      };
+
+      // 搜索条件
+      var queryFormPrompt = '物资编码/图号型号/物资名称';// 自行替换此参数
+      var queryForm = {
+        onRender: function () {
+          $form = $(this);
+          // setInputParam(inputParam, $form);
+        },
+        xtype: 'form',
+        items: [[
+          {
+            xtype: 'textbox',
+            label: '检索条件',
+            name: 'queryProperties',
+            prompt: queryFormPrompt,
+            labelWidth: 'auto',
+            events: {keydown: enterQueryGrid1},
+          },
+          {
+            xtype: 'searchbox',
+            label: '检验分类',
+            name: 'matcName',
+            labelWidth: 'auto',
+            widget: widgets.selectCatalogWidget,
+            onChange: function (data) {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '物资分类', name: 'matType', labelWidth: 'auto', width: 180,
+            data: $.yvan.sysDict('matType').combowithAll(), value: '',
+            onChange: function () {
+              queryGrid1();
+            },
+          },
+          {
+            xtype: 'yvselect', label: '所属库区', name: 'farmId', labelWidth: 'auto', width: 200,
+            data: getFarmList(),
+            onChange: function () {
+              queryGrid1();
+              $comb.yvselect({'data': getRoomList()});
+            }
+          },
+          {
+            xtype: 'yvselect', label: '所属仓库', name: 'roomId', labelWidth: 'auto', width: 280,
+            panelHeight: 220,
+            data: getRoomList(),
+            onRender: function () {
+              $comb = $(this);
+            },
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          // {
+          //   xtype: 'yvselect', label: '仓库类型', name: 'roomType', labelWidth: 'auto', width: 200,
+          //   data: $.yvan.sysDict('roomType').combowithAll(), value: '',
+          //   onChange: function () {
+          //     queryGrid1();
+          //   },
+          // },
+          // {
+          //   xtype: 'yvselect', label: '货区', name: 'workArea', labelWidth: 'auto', width: 180,
+          //   data: $.yvan.sysDict('workArea').combowithAll(), value: '',
+          //   onChange: function () {
+          //     queryGrid1();
+          //   }
+          // }
+        ]]
+      };
+
+      // 列表1增删改查按钮
+      var gridToolbarTitle1 = '物资列表';// 自行替换此参数
+      var gridToolbar1 = {
+        xtype: 'toolbar',
+        title: gridToolbarTitle1,
+        items: [   {
+          text: '导出数据', iconCls: 'fa fa-cloud-upload', onClick: function () {
+            var row = $grid1.rowData();
+            var para = "";
+            if ($form.formGet().matcName != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "matcName=" + $form.formGet().matcName;
+            }
+            if ($form.formGet().matType != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "matType=" + $form.formGet().matType;
+            }
+            if ($form.formGet().farmId != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "farmId=" + $form.formGet().farmId;
+            }
+            if ($form.formGet().roomId != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "roomId=" + $form.formGet().roomId;
+            }
+            if ($form.formGet().queryProperties != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "queryProperties=" + $form.formGet().queryProperties;
+            }
+            // if (row.matId!= "") {
+            //   para = (para == "") ? "" : para + "&";
+            //   para += "matId=" + row.matId;
+            // }
+            para = (para == "") ? "/wms/stock/exportStockMatExcel" : "/wms/stock/exportStockMatExcel?" + para;
+            $.yvan.download({
+              method: 'get',
+              url: api(para),
+              fileName: "库存物资统计表" + $.yvan.getMoment().format('YYYY-MM-DD HH:mm:ss') + '.xlsx'
+            });
+          }
+        },]
+      };
+
+      // 列表2增删改查按钮
+      var gridToolbarTitle2 = '库存批次列表';// 自行替换此参数
+      var gridToolbar2 = {
+        xtype: 'toolbar',
+        title: gridToolbarTitle2,
+        items: [
+        ]
+      };
+
+      return {
+        north: {
+          height: 90,
+          split: true,
+          border: false,
+          items: [
+            queryToolbar,
+            queryForm
+          ]
+        },
+        center: {
+          height: '60%',
+          split: true,
+          items: {
+            onRender: function () {
+              $grid1 = $(this);
+              queryGrid1();
+            },
+            xtype: 'grid',
+            toolbar: gridToolbar1,
+            autoSizeColumns: true,
+            columns:
+              [[
+                {title: '物资ID', field: 'matId', hidden: true},
+                {title: '检验分类', field: 'matcQc', hidden: true},
+                {title: '物资编码', field: 'matBar', width: 100},
+                {title: '图号/型号', field: 'matCode', width: 140},
+                {title: '物资名称', field: 'matName', width: 100},
+                {title: '物资编码属性', field: 'matAttrCode'},
+                {title: '物资分类', field: 'matType', formatter: $.fn.fmatter.matType},
+                {title: '检验分类', field: 'matcName', width: 100},
+                {title: '计量单位', field: 'unitName', width: 80},
+                {title: '计划价', field: 'planPrice', formatter: $.fn.fmatter.formatCurrency, width: 80, align: "right"},
+                {title: '计划金额', field: 'planMoney', formatter: $.fn.fmatter.formatCurrency, width: 80, align: "right",},
+                {title: '库存数', field: 'matAmount', align: "right", formatter: $.fn.fmatter.formatNumberBigDecimal},
+                {title: '批次数', field: 'numBatch', width: 80, formatter: $.fn.fmatter.formatNumber, align: "right",},
+              ]],
+            onSelectRow: function (rowid) {
+              queryGrid2(rowid);
+            }
+          }
+        },
+        south: {
+          height: '40%',
+          border: false,
+          items: {
+            xtype: 'layout',
+            west: {
+              width: "50%",
+              border: false,
+              split: true,
+              items: {
+                onRender: function () {
+                  $grid2 = $(this);
+                },
+                xtype: 'grid',
+                toolbar: gridToolbar2,
+                autoSizeColumns: true,
+                columns:
+                  [[
+                    {title: '批次ID', field: 'batchId', hidden: true},
+                    {title: '物资ID', field: 'matId', hidden: true},
+                    {title: '批次条码', field: 'batchBar', hidden: true},
+                    {
+                      title: '批次号', field: 'batchCode', width: 140,
+                      formatter: function (value, row) {
+                        if (row.rowData.matQc == 0) {
+                          return value;
+                        } else if (row.rowData.matQc == 1) {
+                          return "<span style='color:green;'>" + value + "</span>";
+                        } else if (row.rowData.matQc == 2) {
+                          return "<span style='color:orange;'>" + value + "</span>";
+                        } else if (row.rowData.matQc == 3) {
+                          return "<span style='color:red;'>" + value + "</span>";
+                        }
+                      }
+                    },
+                    {title: '批次状态', field: 'matQc', hidden: true},
+                    {title: '货区', field: 'workArea', hidden: true, width: 100, formatter: $.fn.fmatter.workArea},
+                    {title: '状态', field: 'matQc', hidden: true},
+                    {title: '货区', field: 'workArea', hidden: true},
+                    {
+                      title: '数量',
+                      field: 'matAmount',
+                      align: "right",
+                      formatter: $.fn.fmatter.formatNumberBigDecimal,
+                    },
+                    {field: 'dateMade', title: '生产日期', formatter: $.fn.fmatter.tsymd, align: "center"},
+                    {field: 'saveMinDate', title: '保证贮存期', formatter: $.fn.fmatter.tsymd, align: "center"},
+                    {field: 'saveMaxDate', title: '最大贮存期', formatter: $.fn.fmatter.tsymd, align: "center"},
+                    {field: 'expDate', title: '最近一次定检日期', formatter: $.fn.fmatter.tsymd, align: "center"},
+                    {field: 'batchCreateTime', title: '新增时间', formatter: $.fn.fmatter.ts, align: "center"},
+                  ]],
+                onSelectRow: function (rowid) {
+                  queryGrid3();
+                }
+              }
+            },
+            center: {
+              width: '50%',
+              items: {
+                onRender: function () {
+                  $grid3 = $(this);
+                },
+                xtype: 'grid',
+                toolbar: {
+                  xtype: 'toolbar',
+                  title: '物资位置信息',
+                  items: []
+                },
+                idField: 'celldetId',
+                columns: [[
+                  {title: '编码属性ID', field: 'celldetId', hidden: true},
+                  {title: '货位ID', field: 'cellId', hidden: true},
+                  {title: '库存ID', field: 'stockId', hidden: true},
+                  {title: '单据ID', field: 'billId', hidden: true},
+                  {title: '库区', field: 'farmName', width: 140},
+                  {title: '仓库', field: 'roomName', width: 140},
+                  {title: '区域', field: 'workArea', width: 200, formatter: $.fn.fmatter.workArea,},
+                  {title: '货组', field: 'rowName', width: 200, align: "center"},
+                  {title: '货位号', field: 'cellBar', width: 200, align: "center"},
+                  {
+                    title: '数量',
+                    field: 'matAmount',
+                    width: 350,
+                    formatter: $.fn.fmatter.formatNumberBigDecimal,
+                    align: "right"
+                  },
+                  {
+                    title: '冻结数量',
+                    field: 'useAmount',
+                    width: 350,
+                    formatter: $.fn.fmatter.formatNumberBigDecimal,
+                    align: "right"
+                  },
+                ]]
+              }
+            }
+          }
+        }
+      };
+    };
+  }
+);

+ 252 - 0
admin-ui/app/view/queryStockKeep.js

@@ -0,0 +1,252 @@
+define(function (require) {
+  return function () {
+
+    var $grid1, $form;
+    var widgets = {
+      // 派工号
+      selectPmgPghWidget: {
+        url: '/app/wms/widget/selectPmsPgh.js',
+        bind: {
+          pghId: 'pghId',
+          pghCode: 'pghCode'
+        },
+        widgetPrompt: "派工号编号"
+      },
+    };
+
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 查询列表
+    function queryGrid1() {
+      var obj = $form.formGet();
+      var startTime = new Date(obj.startTime.replace("-", "/"));
+      var endTime = new Date(obj.endTime.replace("-", "/"));
+      if (startTime > endTime) {
+        $.yvan.msg('起止日期必须大于起始日期');
+        return;
+      }
+      var queryUrl = '/wms/wmsOutPoolmat/queryStockKeep';// 自行替换此参数
+      $grid1.jqGrid("clearGridData");
+      var queryForm1 = $form.formGet();
+      $grid1.reload({
+        mtype: 'post',
+        url: api(queryUrl),
+        queryParams: queryForm1
+      }, true);
+    }
+
+    //获取库区
+    function getFarmList() {
+      var _datas = [];
+      _datas.push({
+        "id": '',
+        "text": '全部'
+      })
+      $.yvan.ajax({
+        url: api('/wms/whFarm/queryAll'),
+        data: {},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].farmId,
+                "text": data.data[i].farmName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //获取车间信息
+    function getRoomList() {
+      var _datas = [{"id": '', "text": '全部'}];
+      $.yvan.ajax({
+        url: api('/wms/wmsOutPoolmat/queryRoomByKeep'),
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].roomId,
+                "text": data.data[i].roomName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+
+    // 搜索按钮
+    var queryToolbarTitle = '缺件查询';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '需求单号/派工号/物资编码/图号型号/物资名称';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [
+        [
+          {xtype: 'hidden', name: 'pghId'},
+          {
+            xtype: 'searchbox',
+            label: '派工号',
+            name: 'pghCode',
+            labelWidth: 'auto',
+            width: 280,
+            prompt: '派工号编号',
+            widget: widgets.selectPmgPghWidget,
+            onChange: function (data) {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '需求阶段', name: 'outapType', labelWidth: 'auto', width: 180, value: '',
+            data: $.yvan.sysDict('outapType').combowithAll(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '备货库区', name: 'farmId', labelWidth: 'auto', width: 200, value: '',
+            data: getFarmList(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect',
+            label: '需求单位',
+            name: 'roomId',
+            labelWidth: 'auto',
+            width: 240,
+            data: getRoomList(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '物资分类', name: 'matType', labelWidth: 'auto', width: 180,
+            data: $.yvan.sysDict('matType').combowithAll(), value: '',
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+        ],
+        [
+          {
+            xtype: 'textbox',
+            label: '检索条件',
+            name: 'queryProperties',
+            prompt: queryFormPrompt,
+            labelWidth: 'auto',
+            width: 380,
+            events: {keydown: enterQueryGrid1}
+          },
+          {
+            name: 'startTime',
+            label: '需求日期',
+            prompt: '开始时间',
+            xtype: 'datebox',
+            labelWidth: 'auto',
+            width: 210,
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            name: 'endTime',
+            label: '至',
+            prompt: '结束时间',
+            xtype: 'datebox',
+            labelWidth: 'auto',
+            width: 170,
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+        ]]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle1 = '缺件详情';// 自行替换此参数
+    var gridToolbar1 = {
+      xtype: 'toolbar',
+      title: gridToolbarTitle1
+    };
+    return {
+      north: {
+        height: 140,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm
+        ]
+      },
+      center: {
+        height: '100%',
+        split: true,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar1,
+          columns:
+            [[
+              {title: '物资类型', field: 'matType', align: 'center', formatter: $.fn.fmatter.matType},
+              {title: '物资编码', field: 'matBar'},
+              {title: '图号/型号', field: 'matCode'},
+              {title: '物资名称', field: 'matName'},
+              {title: '物资编码属性', field: 'matAttrCode'},
+              {title: '计量单位', field: 'unitName'},
+              {title: '计划价', field: 'planPrice', align: 'right', formatter: $.fn.fmatter.formatCurrency},
+              {title: '计划金额', field: 'planMoney', align: 'right', formatter: $.fn.fmatter.formatCurrency},
+              {title: '缺件数', field: 'lackNum', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+              {title: '需求单号', field: 'billCode'},
+              {title: '派工号', field: 'pghCode'},
+              {title: '需求阶段', field: 'outapType', align: 'center', formatter: $.fn.fmatter.outapType},
+              {title: '需求单位', field: 'roomName'},
+              {title: '备货库区', field: 'farmName'},
+              {title: '申请人', field: 'takeUser'},
+              {title: '需求日期', field: 'dateUse', align: 'center', formatter: $.fn.fmatter.tsymd}
+            ]]
+        }
+      }
+    };
+  };
+});

+ 327 - 0
admin-ui/app/view/queryStockMatMiss.js

@@ -0,0 +1,327 @@
+//物资信息查询页面
+define(function (require) {
+  return function () {
+
+    var $grid1, $grid2, $form;
+    // 弹框的方式
+    var widgets = {
+      // 搜索分类检索
+      selectCatalogWidget: {
+        url: '/app/mat/widget/selectCatalog.js',
+        bind: {
+          matcId: 'matcId',
+          matcName: 'matcName'
+        },
+        queryParams: {matcBusi: MATC_BUSI_检验, status: 1}
+      },
+      // 派工号
+      selectPmgPghWidget: {
+        url: '/app/wms/widget/selectPmsPgh.js',
+        bind: {
+          pghId: 'pghId',
+          pghCode: 'pghCode'
+        },
+        widgetPrompt: "派工号编号"
+      },
+    };
+
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    function queryGrid1() {
+      var queryUrl = '/wms/wmsOutPoolmat/queryStockMatMiss';// 自行替换此参数
+      $grid1.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid1.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryForm
+      }, true);
+      if ($grid2 != undefined && $grid2 != null) {
+        $grid2.jqGrid("clearGridData");
+      }
+    }
+
+    function queryGrid2() {
+      if ($grid2 == undefined || $grid2 == null)
+        return;
+      var row = $grid1.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var queryForm = $form.formGet();
+      queryForm.matId = row.matId;
+      var queryUrl = '/wms/wmsOutPoolmat/queryStockMatMissBill';// 自行替换此参数
+      $grid2.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryForm
+      });
+    }
+
+    //获取库区
+    function getFarmList() {
+      var _datas = [];
+      _datas.push({
+        "id": '',
+        "text": '全部'
+      })
+      $.yvan.ajax({
+        url: api('/wms/whFarm/queryAll'),
+        data: {},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].farmId,
+                "text": data.data[i].farmName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //获取车间信息
+    function getRoomList() {
+      var _datas = [{"id": '', "text": '全部'}];
+      $.yvan.ajax({
+        url: api('/wms/wmsOutPoolmat/queryRoomByMiss'),
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].roomId,
+                "text": data.data[i].roomName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '库存缺件查询';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '物资编码/图号型号/物资名称';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [
+        [
+          {xtype: 'hidden', name: 'matcId'},
+          {xtype: 'hidden', name: 'corpId'},
+          {xtype: 'hidden', name: 'pghId'},
+          {
+            xtype: 'searchbox',
+            label: '派工号',
+            name: 'pghCode',
+            labelWidth: 'auto',
+            width: 250,
+            prompt: '派工号编号',
+            widget: widgets.selectPmgPghWidget,
+            onChange: function (data) {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect',
+            label: '需求车间',
+            name: 'roomId',
+            labelWidth: 'auto',
+            width: 240,
+            data: getRoomList(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '需求阶段', name: 'outapType', labelWidth: 'auto', width: 180, value: '',
+            data: $.yvan.sysDict('outapType').combowithAll(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '需求库区', name: 'farmId', labelWidth: 'auto', width: 200, value: '',
+            data: getFarmList(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+        ],
+        [
+          {
+            xtype: 'yvselect', label: '物资分类', name: 'matType', labelWidth: 'auto', width: 180,
+            data: $.yvan.sysDict('matType').combowithAll(), value: '',
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'textbox',
+            label: '检索条件',
+            name: 'queryProperties',
+            prompt: queryFormPrompt,
+            labelWidth: 'auto',
+            width: 320,
+            events: {keydown: enterQueryGrid1},
+          },
+        ],
+      ]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle1 = '缺件物资列表';// 自行替换此参数
+    var gridToolbar1 = {
+      xtype: 'toolbar',
+      title: gridToolbarTitle1,
+      items: [
+        {
+          text: '导出数据', iconCls: 'fa fa-cloud-upload', onClick: function () {
+            var para = "";
+            if ($form.formGet().pghId != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "pghId=" + $form.formGet().pghId;
+            }
+            if ($form.formGet().outapType != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "outapType=" + $form.formGet().outapType;
+            }
+            if ($form.formGet().farmId != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "farmId=" + $form.formGet().farmId;
+            }
+            if ($form.formGet().roomId != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "roomId=" + $form.formGet().roomId;
+            }
+            if ($form.formGet().matType != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "matType=" + $form.formGet().matType;
+            }
+            if ($form.formGet().queryProperties != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "queryProperties=" + $form.formGet().queryProperties;
+            }
+            para = (para == "") ? "/wms/wmsOutPoolmat/exportStockMatMissExcel" : "/wms/wmsOutPoolmat/exportStockMatMissExcel?" + para;
+            $.yvan.download({
+              method: 'get',
+              url: api(para),
+              fileName: "库存物资缺件统计表" + $.yvan.getMoment().format('YYYY-MM-DD HH:mm:ss') + '.xlsx'
+            });
+          }
+        },
+      ]
+    };
+
+    return {
+      north: {
+        height: 135,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm
+        ]
+      },
+      center: {
+        height: '60%',
+        split: true,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar1,
+          autoSizeColumns: true,
+          columns:
+            [[
+              {title: '物资ID', field: 'matId', hidden: true},
+              {title: '物资分类', field: 'matType', formatter: $.fn.fmatter.matType, width: 80},
+              {title: '物资编码', field: 'matBar', width: 200},
+              {title: '图号/型号', field: 'matCode', width: 200},
+              {title: '物资名称', field: 'matName', width: 200},
+              {title: '物资编码属性', field: 'matAttrCode'},
+              {title: '计量单位', field: 'unitName'},
+              {title: '待发数', field: 'dfAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+              {title: '库存数', field: 'stockAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+              {title: '缺件数', field: 'missAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+              //{title: '需求单据数', field: 'billAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+            ]],
+          onSelectRow: function (rowid) {
+            queryGrid2();
+          }
+        }
+      },
+      south: {
+        height: '40%',
+        border: false,
+        items: {
+          xtype: 'tabs',
+          items: [
+            {
+              title: '需求单据列表',
+              lazy: true,
+              items: {
+                onRender: function () {
+                  $grid2 = $(this);
+                },
+                xtype: 'grid',
+                autoSizeColumns: true,
+                pagination: true,
+                columns: [
+                  [
+                    {title: '需求单号', field: 'billCode', width: 140},
+                    {title: '需求类型', field: 'outapType', align: 'center', formatter: $.fn.fmatter.outapType},
+                    {title: '待发数', field: 'dfAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+                    {title: '缺件数', field: 'missAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+                    {title: '派工号', field: 'pghCode', width: 140},
+                    {title: '需求库区', field: 'farmName', width: 200},
+                    {title: '需求车间', field: 'roomName', width: 200},
+                    {title: '申请人', field: 'takeUser'},
+                    {title: '需求日期', field: 'dateUse', align: 'center', formatter: $.fn.fmatter.tsymd}
+                  ]
+                ]
+              }
+            },
+          ]
+        }
+      }
+    };
+  };
+});

+ 325 - 0
admin-ui/app/view/queryStockMiss.js

@@ -0,0 +1,325 @@
+define(function (require) {
+  return function () {
+
+    var $grid1, $form;
+    var widgets = {
+      // 派工号
+      selectPmgPghWidget: {
+        url: '/app/wms/widget/selectPmsPgh.js',
+        bind: {
+          pghId: 'pghId',
+          pghCode: 'pghCode'
+        },
+        widgetPrompt: "派工号编号"
+      },
+    };
+
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 查询列表
+    function queryGrid1() {
+      var obj = $form.formGet();
+      var startTime = new Date(obj.startTime.replace("-", "/"));
+      var endTime = new Date(obj.endTime.replace("-", "/"));
+      if (startTime > endTime) {
+        $.yvan.msg('起止日期必须大于起始日期');
+        return;
+      }
+      var queryUrl = '/wms/wmsOutPoolmat/queryStockMiss';// 自行替换此参数
+      $grid1.jqGrid("clearGridData");
+      var queryForm1 = $form.formGet();
+      $grid1.reload({
+        mtype: 'post',
+        url: api(queryUrl),
+        queryParams: queryForm1
+      }, true);
+    }
+
+    //获取库区
+    function getFarmList() {
+      var _datas = [];
+      _datas.push({
+        "id": '',
+        "text": '全部'
+      })
+      $.yvan.ajax({
+        url: api('/wms/whFarm/queryAll'),
+        data: {},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].farmId,
+                "text": data.data[i].farmName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //获取车间信息
+    function getRoomList() {
+      var _datas = [{"id": '', "text": '全部'}];
+      $.yvan.ajax({
+        url: api('/wms/wmsOutPoolmat/queryRoomByMiss'),
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].roomId,
+                "text": data.data[i].roomName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '缺件查询';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '需求单号/派工号/物资编码/图号型号/物资名称/申请人';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [
+        [
+          {xtype: 'hidden', name: 'pghId'},
+          {
+            xtype: 'searchbox',
+            label: '派工号',
+            name: 'pghCode',
+            labelWidth: 'auto',
+            width: 250,
+            prompt: '派工号编号',
+            widget: widgets.selectPmgPghWidget,
+            onChange: function (data) {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect',
+            label: '需求车间',
+            name: 'roomId',
+            labelWidth: 'auto',
+            width: 240,
+            data: getRoomList(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '需求阶段', name: 'outapType', labelWidth: 'auto', width: 180, value: '',
+            data: $.yvan.sysDict('outapType').combowithAll(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '需求库区', name: 'farmId', labelWidth: 'auto', width: 200, value: '',
+            data: getFarmList(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '允许混批', name: 'batchMix', labelWidth: 'auto', width: 180, value: '',
+            data: $.yvan.sysDict('batchMix').combowithAll(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '物资分类', name: 'matType', labelWidth: 'auto', width: 180,
+            data: $.yvan.sysDict('matType').combowithAll(), value: '',
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+        ],
+        [
+          {
+            xtype: 'textbox',
+            label: '检索条件',
+            name: 'queryProperties',
+            prompt: queryFormPrompt,
+            labelWidth: 'auto',
+            width: 450,
+            events: {keydown: enterQueryGrid1}
+          },
+          {
+            name: 'startTime',
+            label: '需求日期',
+            prompt: '开始时间',
+            xtype: 'datebox',
+            labelWidth: 'auto',
+            width: 210,
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            name: 'endTime',
+            label: '至',
+            prompt: '结束时间',
+            xtype: 'datebox',
+            labelWidth: 'auto',
+            width: 170,
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+        ]
+      ]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle1 = '缺件详情';// 自行替换此参数
+    var gridToolbar1 = {
+      xtype: 'toolbar',
+      title: gridToolbarTitle1,
+      items: [
+        {
+          text: '导出数据', iconCls: 'fa fa-cloud-upload', onClick: function () {
+            var para = "";
+            if ($form.formGet().pghId != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "pghId=" + $form.formGet().pghId;
+            }
+            if ($form.formGet().outapType != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "outapType=" + $form.formGet().outapType;
+            }
+            if ($form.formGet().farmId != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "farmId=" + $form.formGet().farmId;
+            }
+            if ($form.formGet().roomId != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "roomId=" + $form.formGet().roomId;
+            }
+            if ($form.formGet().batchMix != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "batchMix=" + $form.formGet().batchMix;
+            }
+            if ($form.formGet().matType != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "matType=" + $form.formGet().matType;
+            }
+            if ($form.formGet().queryProperties != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "queryProperties=" + $form.formGet().queryProperties;
+            }
+            if ($form.formGet().startTime != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "startTime=" + $form.formGet().startTime;
+            }
+            if ($form.formGet().endTime != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "endTime=" + $form.formGet().endTime;
+            }
+            para = (para == "") ? "/wms/wmsOutPoolmat/exportStockMissExcel" : "/wms/wmsOutPoolmat/exportStockMissExcel?" + para;
+            $.yvan.download({
+              method: 'get',
+              url: api(para),
+              fileName: "缺件项统计表" + $.yvan.getMoment().format('YYYY-MM-DD HH:mm:ss') + '.xlsx'
+            });
+          }
+        },
+      ]
+    };
+    return {
+      north: {
+        height: 140,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm,
+        ]
+      },
+      center: {
+        height: '100%',
+        split: true,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar1,
+          columns:
+            [[
+              {title: '物资类型', field: 'matType', align: 'center', formatter: $.fn.fmatter.matType},
+              {title: '物资编码', field: 'matBar'},
+              {title: '图号/型号', field: 'matCode'},
+              {title: '物资名称', field: 'matName'},
+              {title: '物资编码属性', field: 'matAttrCode'},
+              {title: '计量单位', field: 'unitName'},
+              {title: '计划价', field: 'planPrice', align: 'right', formatter: $.fn.fmatter.formatCurrency},
+              {title: '计划金额', field: 'planMoney', align: 'right', formatter: $.fn.fmatter.formatCurrency},
+              {title: '允许混批', field: 'batchMix', align: 'center', formatter: $.fn.fmatter.batchMix},
+              {
+                title: '需求数',
+                field: 'amount',
+                align: 'right',
+                formatter: $.fn.fmatter.formatNumberBigDecimal,
+              },
+              {
+                title: '领用数',
+                field: 'amountTake',
+                align: 'right',
+                formatter: $.fn.fmatter.formatNumberBigDecimal,
+                hidden: true,
+              },
+              {title: '待发数', field: 'dfAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+              {title: '库存数', field: 'stockAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+              {title: '最大批次数', field: 'batchAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+              {title: '缺件数', field: 'missAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal},
+              {title: '需求单号', field: 'billCode'},
+              {title: '派工号', field: 'pghCode'},
+              {title: '需求类型', field: 'outapType', align: 'center', formatter: $.fn.fmatter.outapType},
+              {title: '需求车间', field: 'roomName'},
+              {title: '备货库区', field: 'farmName'},
+              {title: '申请人', field: 'takeUser'},
+              {title: '需求日期', field: 'dateUse', align: 'center', formatter: $.fn.fmatter.tsymd}
+            ]]
+        }
+      }
+    };
+  };
+});

+ 54 - 0
admin-ui/app/view/queryStockQj.js

@@ -0,0 +1,54 @@
+define(function (require) {
+  return function (context) {
+
+    var aa = require('/app/view/queryStockMatMiss.js')(context);
+    var aanorth = aa.north;
+    var aacenter = aa.center;
+    var aasouth = aa.south;
+
+    var bb = require('/app/view/queryStockMiss.js')(context);
+    var bbnorth = bb.north;
+    var bbcenter = bb.center;
+
+    return {
+      south: {
+        height: '100%',
+        border: false,
+        items: {
+          xtype: 'tabs',
+          onSelect: function (title, index) {
+            $("#" + aa.center.items.id).reload();
+            setTimeout(function () {
+              console.log($("input[name='queryProperties']").prev()[0]);
+              $("input[name='queryProperties']").prev()[0].focus();
+            })
+            $("#" + bb.center.items.id).reload();
+            setTimeout(function () {
+              console.log($("input[name='queryProperties']").prev()[0]);
+              $("input[name='queryProperties']").prev()[0].focus();
+            })
+          },
+          items: [
+            {
+              title: '库存缺件',
+              items: {
+                xtype: 'layout',
+                north: aanorth,
+                center: aacenter,
+                south: aasouth,
+              },
+            },
+            {
+              title: '需求单缺件',
+              items: {
+                xtype: 'layout',
+                north: bbnorth,
+                center: bbcenter,
+              },
+            },
+          ],
+        }
+      }
+    };
+  };
+});

+ 154 - 0
admin-ui/app/view/queryUserAddress.js

@@ -0,0 +1,154 @@
+define(function (require) {
+  return function (context) {
+
+    var $grid1, $grid2, $form;
+
+    // 回车查询列表
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    function queryGrid1() {
+      $grid1.jqGrid("clearGridData");
+      var obj = $form.formGet();
+      $grid1.reload({
+        url: api('/hr/user/queryUserList'),
+        mtype: 'POST',
+        queryParams: obj
+      });
+      if ($grid2 != undefined && $grid2 != null) {
+        $grid2.jqGrid("clearGridData");
+      }
+    }
+
+    function queryGrid2(rowid) {
+      var row = $grid1.rowData(rowid);
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      $grid2.reload({
+        url: api('/wms/farmUser/queryFarmUserRole'),
+        mtype: 'POST',
+        queryParams: {userId: row.userId}
+      });
+    }
+
+    return {
+      north: {
+        height: 90,
+        split: true,
+        border: false,
+        items: [
+          {
+            xtype: 'toolbar', title: '通讯录',
+            items: [
+              {
+                text: '查询', iconCls: 'fa fa-search', onClick: function () {
+                  queryGrid1();
+                }
+              }, {
+                text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+                  $form.formClear();
+                  queryGrid1();
+                }
+              }, {
+                text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+                  App.closeMe();
+                }
+              }
+            ]
+          }, {
+            xtype: 'form',
+            items: [[
+              {
+                xtype: 'textbox',
+                label: '检索条件',
+                name: 'queryProperties',
+                prompt: '姓名/手机号/职工号/部门',
+                labelWidth: 'auto',
+                events: {keydown: enterQueryGrid1}
+              },
+              {
+                xtype: 'yvselect', label: '性别', name: 'gender', labelWidth: 'auto', width: 150,
+                data: $.yvan.sysDict('gender').combowithAll(),
+                onChange: function () {
+                  queryGrid1();
+                }
+              },
+              {
+                xtype: 'yvselect', label: '在职状态', name: 'status', labelWidth: 'auto', width: 180,
+                data: $.yvan.sysDict('userStatus').combowithAll(),
+                onChange: function () {
+                  queryGrid1();
+                }
+              }
+            ]],
+            onRender: function () {
+              $form = $(this);
+            }
+          }
+        ]
+      },
+      center: {
+        border: false,
+        items: {
+          xtype: 'grid',
+          caption: '员工通讯录',
+          border: false,
+          pagination: true,
+          idField: 'packID',
+          columns: [[
+            {title: '用户编号', field: 'userId', hidden: true},
+            {title: '姓名', field: 'name'},
+            {title: '性别', field: 'gender', align: 'center', formatter: $.fn.fmatter.genderSrc},
+            {title: '手机号', field: 'mobile'},
+            {title: '职工号', field: 'jobcard'},
+            {title: '部门', field: 'deptNames'},
+            {title: '职位', field: 'roleNames'},
+            {title: '在职状态', field: 'status', hidden: true},
+            {title: '在职状态', field: 'userStatus', align: 'center', formatter: $.fn.fmatter.userStatusView},
+          ]],
+          onSelectRow: function (rowid) {
+            //queryGrid2(rowid);
+          },
+          loadComplete: function () {
+            //默认选中第一行
+          },
+          onRender: function () {
+            $grid1 = $(this);
+            queryGrid1(); //初始化数据
+          }
+        }
+      },
+      // south: {
+      //   height: '40%',
+      //   split: true,
+      //   border: false,
+      //   items: {
+      //     xtype: 'grid',
+      //     caption: '角色信息',
+      //     border: false,
+      //     pagination: true,
+      //     columns: [[
+      //       {field: 'wwuId', title: '流水ID', hidden: true},
+      //       {field: 'userId', title: '用户ID', hidden: true},
+      //       {field: 'name', title: '姓名'},
+      //       {field: 'genderCN', title: '性别'},
+      //       {field: 'farmName', title: '库区'},
+      //       {field: 'roleName', title: '角色'},
+      //       {field: 'nameCreate', title: '新增人'},
+      //       {field: 'timeCreate', title: '新增时间', formatter: 'ts'}
+      //     ]],
+      //     onRender: function () {
+      //       $grid2 = $(this);
+      //     },
+      //   }
+      // }
+    };
+  };
+});

+ 265 - 0
admin-ui/app/view/queryWmsInAbnormal.js

@@ -0,0 +1,265 @@
+define(function (require) {
+  return function () {
+
+    var $grid1, $grid2, $form;
+
+    var widgets = {
+      // 搜索企业
+      selectCorpWidget: {
+        url: '/app/wms/widget/selectOrgCorp.js',
+        bind: {
+          corpId: 'corpId',
+          corpName: 'corpName'
+        },
+        widgetPrompt: "供应商名称"
+      },
+    };
+
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 查询列表
+    function queryGrid1() {
+      var queryUrl = '/wms/wmsIn/selectAbnormalList';// 自行替换此参数
+      $grid1.jqGrid("clearGridData");
+      var queryForm = $form.formGet();
+      $grid1.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryForm
+      }, true);
+      if ($grid2 != undefined) {
+        $grid2.jqGrid("clearGridData");
+      }
+    }
+
+    function queryGrid2(rowid) {
+      var row = $grid1.rowData(rowid);
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      var queryUrl = '/wms/wmsIn/selectAbnormalMatList';// 自行替换此参数
+      var queryData = {inId: row.inId};// 多个参数自行新增
+      $grid2.reload({
+        mtype: 'POST',
+        url: api(queryUrl),
+        queryParams: queryData
+      });
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '收货异常查询';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '收货单号/到货单号/收货人';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [[
+        {
+          xtype: 'textbox',
+          label: '检索条件',
+          name: 'queryProperties',
+          prompt: queryFormPrompt,
+          labelWidth: 'auto',
+          events: {keydown: enterQueryGrid1},
+        },
+        {
+          xtype: 'yvselect', label: '入库类型', name: 'inType', labelWidth: 'auto', width: 180, value: '',
+          data: $.yvan.sysDict('inType').combowithAll(),
+          onChange: function () {
+            queryGrid1();
+          }
+        },
+        {xtype: 'hidden', name: 'corpId'},
+        {
+          xtype: 'searchbox', label: '供应商', name: 'corpName', labelWidth: 'auto', width: 280, prompt: '供应商名称',
+          widget: widgets.selectCorpWidget,
+          onChange: function (data) {
+            queryGrid1();
+          }
+        },
+        {
+          xtype: 'datebox', label: '收货日期', name: 'pubTimeStart', labelWidth: 'auto', width: 220,
+          onChange: function () {
+            var pubTimeStart = $form.formGet().pubTimeStart;
+            var pubTimeEnd = $form.formGet().pubTimeEnd;
+            var pubTimeStart = new Date(pubTimeStart.replace("-", "/"));
+            var pubTimeEnd = new Date(pubTimeEnd.replace("-", "/"));
+            if (pubTimeStart > pubTimeEnd) {
+              $.yvan.msg('起始日期必须小于起止日期');
+              return;
+            }
+            queryGrid1();
+          }
+        }, {
+          xtype: 'datebox', label: '-', name: 'pubTimeEnd', labelWidth: 'auto', width: 180,
+          onChange: function (data) {
+            var pubTimeStart = $form.formGet().pubTimeStart;
+            var pubTimeEnd = $form.formGet().pubTimeEnd;
+            var pubTimeStart = new Date(pubTimeStart.replace("-", "/"));
+            var pubTimeEnd = new Date(pubTimeEnd.replace("-", "/"));
+            if (pubTimeStart > pubTimeEnd) {
+              $.yvan.msg('起止日期必须大于起始日期');
+              return;
+            }
+            queryGrid1();
+          }
+        },
+      ]]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle1 = '异常收货单列表';// 自行替换此参数
+    var gridToolbar1 = {
+      xtype: 'toolbar',
+      title: gridToolbarTitle1,
+      items: []
+    };
+
+    // 列表2增删改查按钮
+    var gridToolbarTitle2 = '物资列表';// 自行替换此参数
+    var gridToolbar2 = {
+      xtype: 'toolbar',
+      title: gridToolbarTitle2,
+    };
+
+    return {
+      north: {
+        height: 90,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm
+        ]
+      },
+      center: {
+        width: "55%",
+        split: true,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar1,
+          idField: 'inapId',
+          columns: [[
+            {title: '对应收货单ID', field: 'inId', hidden: true},
+            {title: '到货单ID', field: 'inapId', hidden: true},
+            {title: '收货单', field: 'billCode', align: "center"},
+            {title: '到货单', field: 'billCodeInApply', align: "center"},
+            {title: '入库类型', field: 'inType', hidden: true},
+            {
+              title: '入库类型', field: 'inTypeCN', align: "center", formatter: function (value, data) {
+                return $.fn.fmatter.inTypeSrc(data.rowData.inType);
+              }
+            },
+            {title: '异常物资项', field: 'matNum', align: "right"},
+            {title: '计划金额', field: 'planMoney', formatter: $.fn.fmatter.formatCurrency, align: 'right'},
+            {title: '到货时间', field: 'arrivalTime', formatter: $.fn.fmatter.tsymd, hidden: true},
+            {title: '收货时间', field: 'receiveTime', formatter: $.fn.fmatter.tsymd},
+            {title: '收货人', field: 'receiveUserName'},
+            {title: '供应商', field: 'corpName'},
+            {title: '供应商单号', field: 'corpOrder'},
+            {title: '供应商物流单号', field: 'corpTrackNo'},
+          ]],
+          onSelectRow: function (rowid) {
+            queryGrid2(rowid);
+          },
+          loadComplete: function () {
+            if ($grid1) {
+              var num = $grid1.records(); //获取当前数据量
+              if (num <= 0) {
+                if ($grid2) {
+                  //清空表格数据
+                  $grid2.clearData();
+                }
+              }
+            }
+          },
+        }
+      },
+      south: {
+        height: '45%',
+        border: false,
+        items: {
+          onRender: function () {
+            $grid2 = $(this);
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar2,
+          idField: 'billmatId',
+          columns: [[
+            {title: '单据明细据流水', field: 'billmatId', hidden: true},
+            {title: '物资ID', field: 'matId', hidden: true},
+            {title: '物资编码', field: 'matBar', width: 140},
+            {title: '物资名称', field: 'matName', width: 100},
+            {title: '图号/型号', field: 'matCode', width: 140},
+            {title: '物资分类', field: 'matType', align: 'center', formatter: $.fn.fmatter.matType, width: 80},
+            {title: '计划价(元)', field: 'planPrice', formatter: $.fn.fmatter.formatCurrency, align: 'right'},
+            {title: '计划金额', field: 'planMoney', formatter: $.fn.fmatter.formatCurrency, align: 'right'},
+            {title: '物资状态', field: 'matQc', formatter: $.fn.fmatter.matQc, align: 'center'},
+            {
+              title: '采购数量', field: 'cgAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal,
+              formatter: function (value) {
+                if (value == undefined || value == null) {
+                  return value = 0;
+                } else {
+                  return parseFloat(value);
+                }
+              }
+            },
+            {title: '采购单位', field: 'planUnitName', align: 'center'},// 需要在format.js文件中设置此方法
+            {
+              title: '收货数量', field: 'corpAmount', align: 'right', formatter: $.fn.fmatter.formatNumberBigDecimal,
+              formatter: function (value) {
+                if (value == undefined || value == null) {
+                  return value = 0;
+                } else {
+                  return parseFloat(value);
+                }
+              }
+            },
+            {title: '收货单位', field: 'corpUnitName', align: 'center'},// 需要在format.js文件中设置此方法
+            {
+              title: '单位换算后收货数量',
+              field: 'matAmount',
+              align: 'right',
+              formatter: $.fn.fmatter.formatNumberBigDecimal,
+              hidden: true
+            },
+            {title: '收货说明', field: 'remark'},
+          ]]
+        }
+      }
+    };
+  };
+});

+ 409 - 0
admin-ui/app/view/queryWmsOutWpf.js

@@ -0,0 +1,409 @@
+define(function (require) {
+  return function () {
+
+    var $grid1, $form;
+    var widgets = {
+      // 派工号
+      selectPmgPghWidget: {
+        url: '/app/wms/widget/selectPmsPgh.js',
+        bind: {
+          pghId: 'pghId',
+          pghCode: 'pghCode'
+        },
+        widgetPrompt: "派工号编号"
+      },
+    };
+
+    function enterQueryGrid1(e) {
+      if (e.keyCode === 13) {
+        var tmp = $(this).val();
+        $form.formSet({queryProperties: tmp});
+        queryGrid1();
+      }
+    }
+
+    // 查询列表
+    function queryGrid1() {
+      var obj = $form.formGet();
+      var startTime = new Date(obj.startTime.replace("-", "/"));
+      var endTime = new Date(obj.endTime.replace("-", "/"));
+      if (startTime > endTime) {
+        $.yvan.msg('起止日期必须大于起始日期');
+        return;
+      }
+      var queryUrl = '/wms/wmsOutWpfExcel/query';// 自行替换此参数
+      $grid1.jqGrid("clearGridData");
+      var queryForm1 = $form.formGet();
+      $grid1.reload({
+        mtype: 'post',
+        url: api(queryUrl),
+        queryParams: queryForm1
+      }, true);
+    }
+
+    //获取库区
+    function getFarmList() {
+      var _datas = [];
+      _datas.push({
+        "id": '',
+        "text": '全部'
+      })
+      $.yvan.ajax({
+        url: api('/wms/whFarm/queryAll'),
+        data: {},
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].farmId,
+                "text": data.data[i].farmName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    //获取车间信息
+    function getRoomList() {
+      var _datas = [{"id": '', "text": '全部'}];
+      $.yvan.ajax({
+        url: api('/wms/wmsOutPoolmat/queryRoomByMiss'),
+        method: 'post',
+        async: false,
+        success: function (data) {
+          if (data.data != null && data.data != undefined) {
+            for (var i = 0; i < data.data.length; i++) {
+              _datas.push({
+                "id": data.data[i].roomId,
+                "text": data.data[i].roomName
+              })
+            }
+          }
+        }
+      });
+      return _datas;
+    }
+
+    // 搜索按钮
+    var queryToolbarTitle = '未配发项查询';// 自行替换此参数
+    var queryToolbar = {
+      xtype: 'toolbar', title: queryToolbarTitle, items: [
+        {
+          text: '查询', iconCls: 'fa fa-search', onClick: function () {
+            queryGrid1();
+          }
+        }, {
+          text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+            $form.formClear();
+            queryGrid1();
+          }
+        }, {
+          text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+            App.closeMe(this);
+          }
+        }
+      ]
+    };
+
+    // 搜索条件
+    var queryFormPrompt = '需求单号/物资编码/图号型号/物资名称/物资编码属性';// 自行替换此参数
+    var queryForm = {
+      onRender: function () {
+        $form = $(this);
+      },
+      xtype: 'form',
+      items: [
+        [
+          {xtype: 'hidden', name: 'pghId'},
+          {
+            xtype: 'searchbox',
+            label: '派工号',
+            name: 'pghCode',
+            labelWidth: 'auto',
+            width: 250,
+            prompt: '派工号编号',
+            widget: widgets.selectPmgPghWidget,
+            onChange: function (data) {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect',
+            label: '需求车间',
+            name: 'roomId',
+            labelWidth: 'auto',
+            width: 240,
+            data: getRoomList(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '需求阶段', name: 'outapType', labelWidth: 'auto', width: 180, value: '',
+            data: $.yvan.sysDict('outapType').combowithAll(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '成套情况', name: 'pkgId', labelWidth: 'auto', width: 180, value: '',
+            data: $.yvan.sysDict('pkgId').combowithAll(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '需求库区', name: 'farmId', labelWidth: 'auto', width: 200, value: '',
+            data: getFarmList(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '允许混批', name: 'batchMix', labelWidth: 'auto', width: 180, value: '',
+            data: $.yvan.sysDict('batchMix').combowithAll(),
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            xtype: 'yvselect', label: '物资分类', name: 'matType', labelWidth: 'auto', width: 180,
+            data: $.yvan.sysDict('matType').combowithAll(), value: '',
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+        ],
+        [
+          {
+            xtype: 'textbox',
+            label: '检索条件',
+            name: 'queryProperties',
+            prompt: queryFormPrompt,
+            labelWidth: 'auto',
+            width: 450,
+            events: {keydown: enterQueryGrid1}
+          },
+          {
+            name: 'startTime',
+            label: '报表新增时间',
+            prompt: '开始时间',
+            xtype: 'datebox',
+            labelWidth: 'auto',
+            width: 230,
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
+            name: 'endTime',
+            label: '至',
+            prompt: '结束时间',
+            xtype: 'datebox',
+            labelWidth: 'auto',
+            width: 170,
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+        ]
+      ]
+    };
+
+    // 列表1增删改查按钮
+    var gridToolbarTitle1 = '缺件详情';// 自行替换此参数
+    var gridToolbar1 = {
+      xtype: 'toolbar',
+      title: gridToolbarTitle1,
+      items: [
+        {
+          text: '导出数据', iconCls: 'fa fa-cloud-upload', onClick: function () {
+            var para = "";
+            if ($form.formGet().pghId != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "pghId=" + $form.formGet().pghId;
+            }
+            if ($form.formGet().pkgId != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "pkgId=" + $form.formGet().pkgId;
+            }
+            if ($form.formGet().roomId != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "roomId=" + $form.formGet().roomId;
+            }
+            if ($form.formGet().outapType != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "outapType=" + $form.formGet().outapType;
+            }
+            if ($form.formGet().farmId != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "farmId=" + $form.formGet().farmId;
+            }
+            if ($form.formGet().batchMix != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "batchMix=" + $form.formGet().batchMix;
+            }
+            if ($form.formGet().matType != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "matType=" + $form.formGet().matType;
+            }
+            if ($form.formGet().queryProperties != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "queryProperties=" + $form.formGet().queryProperties;
+            }
+            if ($form.formGet().startTime != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "startTime=" + $form.formGet().startTime;
+            }
+            if ($form.formGet().endTime != "") {
+              para = (para == "") ? "" : para + "&";
+              para += "endTime=" + $form.formGet().endTime;
+            }
+            para = (para == "") ? "/wms/wmsOutWpfExcel/exportWmsOutWpfExcel" : "/wms/wmsOutWpfExcel/exportWmsOutWpfExcel?" + para;
+            $.yvan.download({
+              method: 'get',
+              url: api(para),
+              fileName: "未配发项统计表" + $.yvan.getMoment().format('YYYY-MM-DD HH:mm:ss') + '.xlsx'
+            });
+          }
+        },
+        {
+          text: '同步数据', iconCls: 'fa fa-arrow-circle-up', onClick: function () {
+            $.yvan.confirm('确定同步数据吗?', {
+              yes: function (index) {
+                $.yvan.ajax({
+                  method: 'post',
+                  url: api('/wms/wmsOutWpf/insert'),
+                  success: function (data) {
+                    $.yvan.msg('操作成功');
+                    $grid1.reload();
+                  }
+                });
+              }
+            });
+          }
+        },
+      ]
+    };
+    return {
+      north: {
+        height: 140,
+        split: true,
+        border: false,
+        items: [
+          queryToolbar,
+          queryForm,
+        ]
+      },
+      center: {
+        height: '100%',
+        split: true,
+        items: {
+          onRender: function () {
+            $grid1 = $(this);
+            queryGrid1();
+          },
+          xtype: 'grid',
+          toolbar: gridToolbar1,
+          columns:
+            [[
+              {title: '需求单号', field: 'billCode'},
+              {title: '派工号', field: 'pghCode'},
+              {
+                title: '成套类型', field: 'pkgId', align: 'center',
+                formatter: function (value, row) {
+                  if (value == 0) {
+                    return " "
+                  } else {
+                    return $.fn.fmatter.pkgId(value)
+                  }
+                }
+              },
+              {title: '需求阶段', field: 'outapType', align: 'center', formatter: $.fn.fmatter.outapType},
+              {title: '需求车间', field: 'roomName'},
+              {title: '库区', field: 'farmName'},
+              {title: '取货方式', field: 'shipType', align: 'center', formatter: $.fn.fmatter.shipType},
+              {title: '物资清册', field: 'matQingce', align: 'center', formatter: $.fn.fmatter.matQingce},
+              {title: '物资类型', field: 'matType', align: 'center', formatter: $.fn.fmatter.matType},
+              {title: '允许混批', field: 'batchMix', align: 'center', formatter: $.fn.fmatter.batchMix},
+              {title: '物资编码', field: 'matBar'},
+              {title: '图号/型号', field: 'matCode'},
+              {title: '物资名称', field: 'matName'},
+              {title: '物资编码属性', field: 'matAttrCode'},
+              {
+                title: '未配发数量',
+                field: 'wpfAmount',
+                align: 'right',
+                formatter: $.fn.fmatter.formatNumberBigDecimal,
+              },
+              {
+                title: '收货间待检验数量',
+                field: 'djyAmount',
+                align: 'right',
+                formatter: $.fn.fmatter.formatNumberBigDecimal,
+              },
+              {
+                title: '收货间检验不合格数量',
+                field: 'jybhgAmount',
+                align: 'right',
+                formatter: $.fn.fmatter.formatNumberBigDecimal,
+              },
+              {
+                title: '待上架数量',
+                field: 'dsjAmount',
+                align: 'right',
+                formatter: $.fn.fmatter.formatNumberBigDecimal,
+              },
+              {
+                title: '架上合格数量',
+                field: 'jshgAmount',
+                align: 'right',
+                formatter: $.fn.fmatter.formatNumberBigDecimal,
+              },
+              {
+                title: '架上超期数量',
+                field: 'jsbhgAmount',
+                align: 'right',
+                formatter: $.fn.fmatter.formatNumberBigDecimal,
+              },
+              {
+                title: '三期业务中数量',
+                field: 'sqAmount',
+                align: 'right',
+                formatter: $.fn.fmatter.formatNumberBigDecimal,
+              },
+              {
+                title: '已配发未领用数量',
+                field: 'ypfwlyAmount',
+                align: 'right',
+                formatter: $.fn.fmatter.formatNumberBigDecimal,
+              },
+              {
+                title: '需求数量',
+                field: 'xqAmount',
+                align: 'right',
+                formatter: $.fn.fmatter.formatNumberBigDecimal,
+              },
+              {title: '计量单位', field: 'unitName'},
+              {title: '计划价', field: 'planPrice', align: 'right', formatter: $.fn.fmatter.formatCurrency},
+              {title: '计划金额', field: 'planMoney', align: 'right', formatter: $.fn.fmatter.formatCurrency},
+              {title: '安装部位', field: 'usePart'},
+              {title: '安装数量', field: 'useAmount', formatter: $.fn.fmatter.formatNumberBigDecimal,},
+              {title: '工艺规程', field: 'techName'},
+              {title: '工卡', field: 'cardTechId'},
+              {title: '需求班组', field: 'teamName'},
+              {title: '工作者', field: 'userWorkName'},
+              {title: '技术员', field: 'userTechName'},
+              {title: '需求截止时间', field: 'stockDateEnd', align: 'center'},
+              {title: '需求通过审核时间', field: 'stockDateStart', align: 'center'},
+              {title: '报表新增时间', field: 'timeCreate', align: 'center'},
+            ]]
+        }
+      }
+    };
+  };
+});

+ 27 - 0
admin-ui/callMessage.js

@@ -0,0 +1,27 @@
+//通用类-前台调发消息
+var CallMessage = {
+  //转交物资,发消息,type:1物资,2依据
+  sendAppTechWz: function (type, userId, roleId) {
+    var apiurl = "";
+    if (type == 1) {
+      //转交物资提醒
+      apiurl = "/mat/message/sendAppTechWz";
+    }
+    else if (type == 2) {
+      //转交依据提醒
+      apiurl = "/mat/message/sendAppTechYj";
+    }
+    $.yvan.ajax({
+      method: 'post',
+      url: apiMat(apiurl),
+      data: {
+        userId: userId,
+        roleId: roleId,
+      },
+      success: function (data) {
+      },
+      error: function (data) {
+      }
+    });
+  }
+};

+ 12 - 0
admin-ui/demoIndex.html

@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+</head>
+<script type="text/javascript" src="/static/plugins/jquery/jquery.min.js"></script>
+<script type="text/javascript">
+  $(function () {
+    //top.window.location.href = '/app/sys/index.html#';
+      top.window.location.href = '/dev/demoLogin.html#';
+  });
+</script>

+ 3 - 0
admin-ui/fileApi.js

@@ -0,0 +1,3 @@
+function fileUrl(url) {
+  return '/src' + url;
+}

File diff suppressed because it is too large
+ 2598 - 0
admin-ui/format.js


+ 148 - 0
admin-ui/homeLink.js

@@ -0,0 +1,148 @@
+HomeLink = {
+
+  //首页跳转JS
+  addLink: function (e) {
+    var s = {
+      id: isNotNullOrEmpty(e.data.id) ? e.data.id : '',
+      title: isNotNullOrEmpty(e.data.title) ? e.data.title : '',
+      url: isNotNullOrEmpty(e.data.url) ? e.data.url : '',
+      iconCls: isNotNullOrEmpty(e.data.iconCls) ? e.data.iconCls : 'icon-blank fa fa-list-ul'
+    }
+    parent.App.addTab(s);
+  },
+
+  //生产计划室承办
+  homeShengChanjhs: function () {
+    $('#p1').click({
+      // id: "1140533419850715138",
+      title: "派工号管理",
+      url: "/app/pms/pgh/queryPgh.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+
+    $('#p2,#p22').click({
+      // id: "1140533419850715138",
+      title: "自制品到货通知",
+      url: "/app/wms/wmsIn/zz/queryZzWmsInApplyView.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+
+    $('#p3,#p33').click({
+      // id: "1140533419850715138",
+      title: "缺件项查询",
+      url: "/app/view/queryStockQj.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+
+    $('#p4,#p44').click({
+      // id: "1140533419850715138",
+      title: "备货管理",
+      url: "/app/wms/wmsOut/xqgl/queryXqglBhjd.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+
+    $('#p5').click({
+      // id: "1140533419850715138",
+      title: "领料审批",
+      url: "/app/wms/wmsOut/xqsh/queryXqshApplySH.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+  },
+  //生产计划室领导
+  homeShengChanjld: function () {
+    $('#p1').click({
+      // id: "1140533419850715138",
+      title: "领料审批",
+      url: "/app/wms/wmsOut/xqsh/queryXqshApplySH.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+  },
+  //车间主任
+  homeCheJianZhuRen: function () {
+    $('#p1').click({
+      // id: "1140533419850715138",
+      title: "领料审批",
+      url: "/app/wms/wmsOut/xqsh/queryXqshApplySH.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+
+    $('#p2').click({
+      // id: "1140533419850715138",
+      title: "退料审批",
+      url: "/app/wms/wmsIn/tl/queryTlShenpi.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+  },
+  //工程管理部领导
+  homeGongChengGuanliBuld: function () {
+    $('#p1').click({
+      // id: "1140533419850715138",
+      title: "领料审批",
+      url: "/app/wms/wmsOut/xqsh/queryXqshApplySH.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+  },
+  //分厂领导
+  homeFenChangld: function () {
+    $('#p1').click({
+      // id: "1140533419850715138",
+      title: "领料审批",
+      url: "/app/wms/wmsOut/xqsh/queryXqshApplySH.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+  },
+
+  //计划管理室承办
+  homeJiHuaGuanLiShiCb: function () {
+    $('#p1').click({
+      // id: "1140533419850715138",
+      title: "领料审批",
+      url: "/app/wms/wmsOut/xqsh/queryXqshApplySH.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+  },
+  //计划管理室领导
+  homeJiHuaGuanLiShiLd: function () {
+    $('#p1').click({
+      // id: "1140533419850715138",
+      title: "领料审批",
+      url: "/app/wms/wmsOut/xqsh/queryXqshApplySH.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+  },
+
+  //物资采购部承办
+  homeCgy: function () {
+    $('#p1,#p11').click({
+      // id: "1140533419850715138",
+      title: "采购到货通知",
+      url: "/app/wms/wmsIn/cg/queryCgWmsInApply.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+
+    $('#p2,#p3').click({
+      // id: "1140533419850715138",
+      title: "采购到货历史",
+      url: "/app/wms/wmsIn/cg/queryCgWmsInApplyHistory.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+
+    $('#p4').click({
+      // id: "1140533419850715138",
+      title: "采购收货异常",
+      url: "/app/wms/wmsIn/cg/queryYcAll.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+  },
+  //物资采购部领导
+  homeCgyLd: function () {
+    $('#p1').click({
+      // id: "1140533419850715138",
+      title: "领料审批",
+      url: "/app/wms/wmsOut/xqsh/queryXqshApplySH.js",
+      iconCls: ""
+    }, HomeLink.addLink);
+  },
+
+
+}

+ 11 - 0
admin-ui/index.html

@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+</head>
+<script type="text/javascript" src="/static/plugins/jquery/jquery.min.js"></script>
+<script type="text/javascript">
+  $(function () {
+    top.window.location.href = '/app/sys/index.html#';
+  });
+</script>

+ 750 - 0
admin-ui/index.js

@@ -0,0 +1,750 @@
+$(function () {
+
+  //隐藏角色上的提示红点
+  $('#role-name-num').hide();
+  //隐藏仓库选择菜单
+  // $('#warehouseSwitch').hide();
+  //隐藏角色选择菜单
+  $('#roleSwith').hide();
+
+  function doSearch(text) {
+    $('#menutree').tree('search', text);
+  }
+
+  App.init(function (roleId, roomId, farmId, roleCode, urId) {
+    App.currentRoleCode = roleCode || "";
+    App.currentRoleId = roleId;
+    App.currentRoomId = roomId;
+    App.currentFarmId = farmId;
+    App.currentUrId = urId;
+    $('#body').layout();
+    $('#treesearch').searchbox({
+      prompt: '搜索',
+      searcher: doSearch,
+      icons: [
+        {
+          iconCls: 'icon-clear',
+          handler: function (e) {
+            $(e.data.target).textbox('clear').textbox('textbox').focus();
+            doSearch('');
+          }
+        }]
+    });
+    $('.easyui-menubutton').menubutton();
+
+    if (window.hasOwnProperty('cs')) {
+      $('#csMenu').show();
+
+      $('#csMenuTest1').click(function () {
+        window.cs.ShowTest();
+      });
+    }
+
+    $('#menutree').tree({
+      url: api('/menu_tree?urId=' + urId),
+      onDblClick: function (node) {
+        var $this = $(this);
+        if (!$this.tree('isLeaf', node.target)) {
+          $this.tree(node.state === 'closed' ? 'expand' : 'collapse', node.target);
+        }
+      },
+      onSelect: function () {
+        return false;
+      },
+      onClick: function (node) {
+        var href = node.href;
+        if ($.trim(href)) {
+          App.addTab({
+            title: node.text,
+            url: node.href,
+            id: node.id,
+            iconCls: node.iconCls,
+            _: urId,
+          });
+          // debugger;
+        }
+      },
+      formatter: function (node) {
+        var s = node.text;
+        // node.msgNum = node.children.length;
+        var numId = 'msgNum' + node.id;
+        if (node.msgNum > 0) {
+          var num = node.msgNum;
+          if (num > 99) {
+            num = '...';
+          }
+          s += '<div id=\'' + numId + '\'' +
+            ' class=\'circle\'>' + num + '</div>';
+        } else {
+          s += '<div id=\'' + numId + '\'' +
+            ' class=\'circle\' style="display: none"></div>';
+        }
+        return s;
+      },
+      onLoadSuccess: function (node, data) {
+        App.currenMenuTree = data;
+        //将所有字典读取出来,缓存在浏览器
+        // $.yvan.progress();
+        $.yvan.dictLoadAll({
+          url: api("/dict_all_data"),
+          success: function () {
+            $.yvan.closep();
+            //更改角色显示
+            $('#roleList').empty();
+            for (var i = 0; i < App.roleList.length; i++) {
+              var role = App.roleList[i];
+              if (role.urId === urId) {
+
+                if (role.farmId && role.farmId > 0 && role.roomId && role.roomId > 0) {
+                  $('#role-name').html(role.roomName + "-" + role.roleName);
+                } else if (role.farmId && role.farmId > 0) {
+                  $('#role-name').html(role.farmName + "-" + role.roleName);
+                } else {
+                  $('#role-name').html(role.roleName);
+                }
+
+                var num = App.addRolePromptNum();
+                if (num > 0) {
+                  $('#role-name-num').show();
+                  if (num > 99) {
+                    num = '...';
+                  }
+                  $('#role-name-num').html(num);
+                } else {
+                  $('#role-name-num').hide();
+                }
+              } else {
+                $('#roleList').prepend(App.addRoleRow(role));
+              }
+            }
+
+            //字典载入完成之后,再根据 hash 载入上次页面
+            if ($.trim(window.location.hash).length > 1 && App.isQiehuan === false) {
+              var vv = $.yvan.unparam(window.location.hash);
+              if ($.trim(vv.id)) {
+                App.addTab(vv);
+                var node = $('#menutree').tree('find', vv.id);
+                if (node) {
+                  $('#menutree').tree('select', node.target).tree('expandTo', node.target).tree('scrollTo', node.target);
+                }
+              }
+            } else {
+              var $tt = $('#tt');
+              var allTabs = $tt.tabs('tabs');
+              $.each(allTabs, function (i, n) {
+                var opt = $(n).panel('options');
+                $tt.tabs('close', opt.title);
+              });
+              App.addTab(
+                {
+                  title: data[0].text,
+                  iconCls: data[0].iconCls,
+                  url: data[0].href,
+                  id: data[0].id,
+                  _: urId,
+                });
+            }
+            App.isQiehuan = false;
+          }
+        });
+
+        stopTimer();
+        //开始轮询任务
+        var pd = [];
+        for (var i = 0; i < App.roleList.length; i++) {
+          pd.push(App.roleList[i].roleId);
+        }
+        timerGetNewTaskTag(function () {
+          //请求新任务标记 (查询服务器查看当前有没有新的任务待办标记)
+          $.ajax({
+            url: api('/message_task'),
+            contentType: "application/json; charset=utf-8",
+            data: JSON.stringify(pd),
+            type: 'post',
+            success: function (taskData) {
+              var isUpdate = false;
+              for (var i = 0; i < App.roleList.length; i++) {
+                var role = App.roleList[i];
+
+                // 对比当前的标记和服务器是否一致, 不一致就请求新的任务
+                if (role.taskTag < taskData.data[role.urId] && isUpdate === false) {
+                  //更新当前显示的菜单提示和角色提示
+                  $.yvan.ajax({
+                    url: api('/role_task?urId=' + role.urId),
+                    method: 'get',
+                    loadingMask: false,
+                    success: function (data) {
+                      isUpdate = true;
+                      var num = 0;
+
+                      // 设置右上角角色列表每个角色的角标(角色对应的待办数量)
+                      for (var j = 0; j < App.roleList.length; j++) {
+                        var role = App.roleList[j];
+                        num += parseInt(data.data.roleTaskMap[role.urId]);
+                        $('#urId' + role.urId).html(data.data.roleTaskMap[role.urId]);
+                      }
+
+                      // 设置右上角选择角色按钮的角标(当前用户所有的角色的待办提醒数量)
+                      if (num > 0) {
+                        $('#role-name-num').show();
+                      } else {
+                        $('#role-name-num').hide();
+                      }
+                      $('#role-name-num').html(num);
+
+                      // 设置菜单的待办数量
+                      for (var i = 0; i < data.data.listSysMenu.length; i++) {
+                        var menu = data.data.listSysMenu[i];
+                        $('#msgNum' + menu.menuId).html(menu.msgNum);
+                        if (menu.msgNum <= 0) {
+                          $('#msgNum' + menu.menuId).hide();
+                        } else {
+                          $('#msgNum' + menu.menuId).show();
+                        }
+                      }
+                    },
+                    error: function () {
+                      // debugger;
+                    }
+                  });
+                  //记录更新标识
+                  role.taskTag = taskData.data[role.roleId];
+                }
+              }
+            },
+            error: function () {
+
+            }
+          });
+          stopTimer();
+        }, 1000 * 5);
+
+      }
+    });
+
+    $.yvan.syncTime({
+      url: api("/time"),
+      success: function () {
+        // console.log('企业时间同步完成 at ' + $.yvan.getMoment().format('YYYY-MM-DD hh:mm:ss'));
+      }
+    });
+
+    $('#mm').menu({
+      onClick: function (item) {
+        App.tabMenuOprate(this, item.name);
+      }
+    });
+    $('#tt').tabs({
+      onContextMenu: function (e, title, index) {
+        e.preventDefault();
+        if (index >= 0 && title != '首页') {
+          $('#mm').menu('show', {
+            left: e.pageX,
+            top: e.pageY
+          }).data("tabTitle", title);
+        }
+      },
+      onSelect: function (title, index) {
+        if (index >= 0) {
+          var node = $('#tt').tabs('getTab', index).panel('options').node;
+          if (node && node.id) {
+            window.location.hash = $.param(node);
+            node = $('#menutree').tree('find', node.id);
+            if (node) {
+              $('#menutree').tree('select', node.target).tree('expandTo', node.target).tree('scrollTo', node.target);
+            }
+          }
+        }
+        if (title == '首页') {
+          // 刷新首页
+          var iframeList = document.getElementsByTagName("iframe");
+          if (iframeList) {
+            for (var i = 0; i < iframeList.length; i++) {
+              iframeList[i].contentWindow.location.reload();
+            }
+          }
+        }
+        setTimeout(function () {
+          shortcut.ffApply($('#tt').tabs('getSelected'))
+        })
+      },
+      onBeforeClose: function (title, index) {
+        var tab = $('#tt').tabs('getSelected');
+        var curTabIndex = $('#tt').tabs('getTabIndex', tab);
+        if (index === curTabIndex) {
+          window.location.hash = '';
+        }
+      }
+    });
+  });
+});
+
+var App = {
+  userId: 0,
+  isQiehuan: false,
+  taskTag: 0,
+  roleList: [],
+  roomList: [],
+  currentUrId: 0,
+  currentRoleId: 0,
+  currentRoleCode: '', //角色code
+  currentRoomId: 0,
+  currentFarmId: 0,
+  currenMenuTree: [],
+  init: function (success) {
+
+    //判断当前的环境,cs还是bs
+    if (typeof cs == "undefined") {
+      //alert("请启动客户端程序来调用");
+    } else {
+      var cookies = cs.SetCookiesToBs("csLogin");
+      // alert(cookies);
+      $.cookie('auth', cookies, {path: '/'});
+    }
+
+    // 先设置当前的仓库ID(刷新时有默认值)
+    var vv = $.yvan.unparam(window.location.href);
+    if (vv._) {
+      App.currentUrId = vv._;
+    }
+    $.yvan.ajax({
+      url: api('/me'),
+      data: {urId: App.currentUrId},
+      method: 'get',
+      loadingMask: false,
+      success: function (data) {
+        App.userId = data.data.userId;
+        // debugger;
+        if (!$.trim(data.data.accId)) {
+          top.window.location.href = jumpApi(LOGINURL);
+          return;
+        }
+        Message.connectWebSocket();
+        //连接硬件服务
+        DeviceConnection.connectDeviceServer();
+
+        $('#user-name').html(data.data.userName);
+        App.qiehuan = success;
+
+        // 设置角色列表
+        App.roleList = data.data.roleList;
+        if (data.data.roleList.length > 0) {
+
+          var noRole = true;
+          if (vv._) {
+            for (var i = 0; i < App.roleList.length; i++) {
+              var r = App.roleList[i];
+              // 如果角色ID相同并且
+              if (vv._ == r.urId) {
+                App.currentUrId = r.urId;
+                App.currentRoleId = r.roleId;
+                App.currentRoleCode = r.roleCode;
+                App.currentRoomId = r.roomId;
+                App.currentFarmId = r.farmId;
+                noRole = false;
+                break;
+                // console.log(App.currentRoleCode);
+              }
+            }
+          }
+          if (noRole) {
+            App.currentUrId = data.data.roleList[0].urId;
+            App.currentRoleId = data.data.roleList[0].roleId;
+            App.currentRoleCode = data.data.roleList[0].roleCode;
+            App.currentRoomId = data.data.roleList[0].roomId;
+            App.currentFarmId = data.data.roleList[0].farmId;
+          }
+          $('#roleSwith').show();
+        } else {
+          $('#roleSwith').hide();
+        }
+
+        // 判断平台数量 唯一就直接跳转
+        if (data.data.systemList.length === 1) {
+          var sys = data.data.systemList[0];
+          if (sys.sysCode === data.data.currentSysCode) {
+            $('#sys-name').html(sys.sysName);
+          } else {
+            App.chooseSystem(sys);
+            return;
+          }
+        }
+
+        // 设置当前的系统名称
+        var hasRole = false;
+        $('#systemList').empty();
+        for (var i = 0; i < data.data.systemList.length; i++) {
+          var sys = data.data.systemList[i];
+          if (sys.sysCode === data.data.currentSysCode) {
+            $('#sys-name').html(sys.sysName);
+            hasRole = true;
+          } else {
+            $('#systemList').prepend(App.addSystemRow(sys));
+          }
+        }
+
+        // 如果当前系统没有角色,就选一个有角色的系统跳转
+        if (!hasRole) {
+          $('#sys-name').html('请选择系统');
+          if (data.data.systemList && data.data.systemList.length > 1) {
+            var sys = data.data.systemList[0];
+            for (var i = 0; i < data.data.systemList.length; i++) {
+              var syst = data.data.systemList[i];
+              if (syst.sysCode == '03') {
+                sys = syst;
+                break;
+              }
+            }
+            App.chooseSystem(sys);
+          }
+        }
+
+        success(App.currentRoleId, App.currentRoomId, App.currentFarmId, App.currentRoleCode, App.currentUrId);
+
+        $("#loading").remove();
+
+      },
+      error: function () {
+        // debugger;
+        top.window.location.href = jumpApi(LOGINURL);
+      }
+    });
+  },
+
+  //打开Tab窗口
+  addTab: function (params) {
+
+    var $tt = $('#tt');
+
+    /** 给每一个打开的窗口加上首页(如果有的话)*/
+    if (!($tt.tabs('exists', '首页') || params.title == '首页')) {
+      for (var i = 0; i < App.currenMenuTree.length; i++) {
+        var de = App.currenMenuTree[i];
+        if (de.text == '首页') {
+          App.addTab({
+            title: de.text,
+            iconCls: de.iconCls,
+            url: de.href,
+            id: de.id,
+            _: App.currentUrId
+          });
+          break;
+        }
+      }
+    }
+
+    if ($tt.tabs('exists', params.title)) {
+      $tt.tabs('select', params.title);
+      return;
+    }
+
+    var lastMenuClickTime = $.cookie("menuClickTime");
+    var nowTime = new Date().getTime();
+    if ((nowTime - lastMenuClickTime) < 500) {
+      $.yvan.msg('操作过快,请稍后重试');
+      return;
+    }
+
+    var id = $.yvan.createId('t');
+    var iframe;
+    if (params.url.slice(-3) === '.js') {
+      iframe = $('<div></div>');
+      iframe.progress();
+
+    } else {
+      iframe = '<iframe src="' + params.url +
+        '" scrolling="auto" frameborder="0" style="width:100%;height:99%;"></iframe>';
+    }
+    var vv = $.yvan.unparam(top.window.location.href);
+    $tt.tabs('add', {
+      id: id,
+      title: params.title,
+      closable: params.title != '首页',
+      iconCls: $.trim(params.iconCls) ? params.iconCls + ' fa-lg' : 'fa fa-file-text-o',
+      content: iframe,
+      border: params.border || true,
+      fit: true,
+      node: {
+        url: params.url,
+        title: params.title,
+        id: params.id,
+        _: params._ ? params._ : vv._
+      }
+    });
+    //去掉首页双滚动条
+    $('#' + id).css({overflow: 'hidden'});
+
+    var tabCount = $tt.tabs('tabs').length;
+    // $.yvan.msg(tabCount);
+
+    //打开的tab的数量
+    if (tabCount > 6) {
+      for (var i = 0; i < tabCount; i++) {
+        var tab = $tt.tabs('getTab', i).panel('options');
+        var title = tab.title;
+        if (title != '首页') {
+          $tt.tabs("close", i);
+          break;
+        }
+      }
+    }
+
+    if ($.type(iframe) !== 'string') {
+      seajs.use([params.url], function (powerOpt) {
+        if ($.type(powerOpt) === 'function') {
+          powerOpt = powerOpt();
+        }
+        // console.log(powerOpt);
+        $.extend(powerOpt, {
+          class: 'bizWindow'
+        });
+        iframe.parent().power(powerOpt);
+        iframe.progress('close');
+      });
+    }
+  },
+
+  closeMe: function () {
+    var $tt = $('#tt');
+    var tab = $tt.tabs('getSelected');
+    var index = $tt.tabs('getTabIndex', tab);
+    $tt.tabs("close", index);
+  },
+
+  // Tab菜单操作
+  tabMenuOprate: function (menu, type) {
+    var $tt = $('#tt');
+    var allTabs = $tt.tabs('tabs');
+    var allTabtitle = [];
+    $.each(allTabs, function (i, n) {
+      var opt = $(n).panel('options');
+      if (opt.closable)
+        allTabtitle.push(opt.title);
+    });
+    var curTabTitle = $(menu).data("tabTitle");
+    var curTabIndex = $tt.tabs("getTabIndex", $tt.tabs("getTab", curTabTitle));
+    switch (type) {
+      case "1": //关闭当前
+        $tt.tabs("close", curTabTitle);
+        break;
+      case "2": //全部关闭
+        for (var i = 0; i < allTabtitle.length; i++) {
+          $tt.tabs('close', allTabtitle[i]);
+        }
+        break;
+      case "3": //除此之外全部关闭
+        for (var i = 0; i < allTabtitle.length; i++) {
+          if (curTabTitle != allTabtitle[i])
+            $tt.tabs('close', allTabtitle[i]);
+        }
+        $tt.tabs('select', curTabTitle);
+        $tt.tabs('scrollBy', 0);
+        break;
+      case "4": //当前侧面右边
+        for (var i = curTabIndex; i < allTabtitle.length; i++) {
+          $tt.tabs('close', allTabtitle[i]);
+        }
+        $tt.tabs('select', curTabTitle);
+        break;
+      case "5": //当前侧面左边
+        for (var i = 0; i < curTabIndex - 1; i++) {
+          $tt.tabs('close', allTabtitle[i]);
+        }
+        $tt.tabs('select', curTabTitle);
+        break;
+      case "6": //刷新
+        var currentTab = $tt.tabs('getSelected');
+        var opts = $.data(currentTab[0], 'panel').options;
+        if (opts.iframe) {
+          var currentIframe = currentTab.find('iframe')[0];
+          currentIframe.contentWindow.location.href = currentIframe.src;
+        } else {
+          $(currentTab[0]).panel('refresh');
+        }
+        break;
+      case "7": //在新窗口打开
+        var refresh_tab = $tt.tabs('getSelected');
+        var refresh_iframe = refresh_tab.find('iframe')[0];
+        window.open(refresh_iframe.src);
+        break;
+    }
+  },
+
+  //退出登录
+  logout: function () {
+    $.cookie('auth', null);
+    top.window.location.href = jumpApi(LOGINURL);
+  },
+
+  resetPWD: function () {
+    var me = this;
+    seajs.use('/user/resetPWD', function (opt) {
+      $.yvan.showDialog(me, opt());
+    });
+  },
+
+  //全屏显示
+  onFullScreen: function () {
+    //头部全屏显示
+    var text = $('.full-screen span').text();
+    if (text === "全屏显示") {
+      var el = document.documentElement;
+      var rfs = el.requestFullScreen || el.webkitRequestFullScreen;
+      if (typeof rfs !== "undefined" && rfs) {
+        rfs.call(el);
+      } else if (typeof window.ActiveXObject !== "undefined") {
+        var wscript = new ActiveXObject("WScript.Shell");
+        if (wscript != null) {
+          wscript.SendKeys("{F11}");
+        }
+      } else if (el.msRequestFullscreen) {
+        el.msRequestFullscreen();
+      } else if (el.oRequestFullscreen) {
+        el.oRequestFullscreen();
+      } else {
+        $.yvan.msg('浏览器不支持全屏调用!请更换浏览器或按F11键切换全屏!');
+      }
+      $('.full-screen span').text('退出全屏');
+    } else {
+      var el = document;
+      var cfs = el.cancelFullScreen || el.webkitCancelFullScreen || el.exitFullScreen;
+      if (typeof cfs !== "undefined" && cfs) {
+        cfs.call(el);
+      } else if (typeof window.ActiveXObject !== "undefined") {
+        var wscript = new ActiveXObject("WScript.Shell");
+        if (wscript != null) {
+          wscript.SendKeys("{F11}");
+        }
+      } else if (el.msExitFullscreen) {
+        el.msExitFullscreen();
+      } else if (el.oRequestFullscreen) {
+        el.oCancelFullScreen();
+      } else {
+        $.yvan.msg('浏览器不支持全屏调用!请更换浏览器或按F11键切换全屏!');
+      }
+      $('.full-screen span').text('全屏显示');
+    }
+  },
+
+  // 切换平台
+  chooseSystem: function (system) {
+    top.window.location.href = jumpApi(system.sysUrl);
+  },
+
+  // 切换角色
+  clickRoleButton: function (role) {
+    // $('#roleList').hide();
+    $('#roleSwithButton').trigger('closeSB');
+    // $('#warehouseSwitchButton').trigger('closeRoomChose');
+    // // $.yvan.msg(role.roleName);s
+    var $tt = $('#tt');
+    var allTabs = $tt.tabs('tabs');
+    var allTabtitle = [];
+    $.each(allTabs, function (i, n) {
+      var opt = $(n).panel('options');
+      if (opt.closable)
+        allTabtitle.push(opt.title);
+    });
+    for (var i = 0; i < allTabtitle.length; i++) {
+      $tt.tabs('close', allTabtitle[i]);
+    }
+    App.isQiehuan = true;
+    App.qqqq = role.roleId;
+    App.currentRoomId = role.roomId;
+    App.currentFarmId = role.farmId;
+    App.currentRoleCode = role.roleCode;
+    App.currentUrId = role.urId;
+    setTimeout('App.qiehuan(App.qqqq, App.currentRoomId, App.currentFarmId, App.currentRoleCode, App.currentUrId)', 100);
+  },
+
+  // 添加系统切换按钮
+  addSystemRow: function (system) {
+    return "<li>\n" +
+      "                        <a onclick='App.chooseSystem(" + JSON.stringify(system) + ")'>\n" +
+      "                            <i class='yvan-icon fa fa-bank'></i> " +
+      system.sysName +
+      "                        </a>\n" +
+      "                    </li>";
+  },
+
+  // 添加角色切换按钮
+  addRoleRow: function (role) {
+    var s = App.addRolePromptNum(role);
+    return "<li>\n" +
+      "                        <a onclick='App.clickRoleButton(" + JSON.stringify(role) + ")'>\n" +
+      "                            <i class='yvan-icon fa fa-bank'></i> " +
+      s +
+      "                        </a>\n" +
+      "                    </li>";
+  },
+
+  addRolePromptNum: function (role) {
+    var s = '';
+    var num = 0;
+    var urId = 0;
+    if (role) {
+
+      if (role.farmId && role.farmId > 0 && role.roomId && role.roomId > 0) {
+        s = role.roomName + "-" + role.roleName;
+      } else if (role.farmId && role.farmId > 0) {
+        s = role.farmName + "-" + role.roleName;
+      } else {
+        s = role.roleName;
+      }
+      num = parseInt(role.msgNum);
+      urId = role.urId;
+
+      if (num > 0) {
+        if (num > 99) {
+          num = '...';
+        }
+        s += '<span id=\'urId' + urId + '\'' +
+          ' class=\'circle\'>' + num + '</span>';
+      } else {
+        s += '<span id=\'urId' + urId + '\'' +
+          ' class=\'circle\' style="display: none"></span>';
+      }
+      return s;
+
+    } else {
+      for (var i = 0; i < App.roleList.length; i++) {
+        var r = App.roleList[i];
+        if (r.roleId === App.currentRoleId) {
+          s = r.roleName;
+          roleId = App.currentRoleId;
+        }
+        num += parseInt(r.msgNum);
+      }
+      return num;
+    }
+
+  },
+
+  findMenuByMenuId: function (menuId) {
+    var node = $('#menutree').tree('find', menuId);
+    return node;
+  },
+
+  addTabByMenuId: function (menuId, tempData) {
+    var menu = $('#menutree').tree('find', menuId);
+    var vv = $.yvan.unparam(top.window.location.href);
+    var s = {
+      id: menu.id,
+      title: menu.text,
+      url: menu.href,
+      iconCls: menu.iconCls
+    };
+    var node = {
+      url: menu.href,
+      title: menu.text,
+      id: menu.id,
+      _: vv._
+    };
+    // 如果有参数要带就会添加缓存
+    if (tempData) {
+      Message.cacheHomeTempData(tempData, $.param(node));
+    }
+    App.addTab(s);
+  }
+
+};

+ 813 - 0
admin-ui/js-big-decimal.js

@@ -0,0 +1,813 @@
+var bigDecimal =
+/******/ (function(modules) { // webpackBootstrap
+/******/ 	// The module cache
+/******/ 	var installedModules = {};
+/******/
+/******/ 	// The require function
+/******/ 	function __webpack_require__(moduleId) {
+/******/
+/******/ 		// Check if module is in cache
+/******/ 		if(installedModules[moduleId]) {
+/******/ 			return installedModules[moduleId].exports;
+/******/ 		}
+/******/ 		// Create a new module (and put it into the cache)
+/******/ 		var module = installedModules[moduleId] = {
+/******/ 			i: moduleId,
+/******/ 			l: false,
+/******/ 			exports: {}
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.l = true;
+/******/
+/******/ 		// Return the exports of the module
+/******/ 		return module.exports;
+/******/ 	}
+/******/
+/******/
+/******/ 	// expose the modules object (__webpack_modules__)
+/******/ 	__webpack_require__.m = modules;
+/******/
+/******/ 	// expose the module cache
+/******/ 	__webpack_require__.c = installedModules;
+/******/
+/******/ 	// define getter function for harmony exports
+/******/ 	__webpack_require__.d = function(exports, name, getter) {
+/******/ 		if(!__webpack_require__.o(exports, name)) {
+/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/ 		}
+/******/ 	};
+/******/
+/******/ 	// define __esModule on exports
+/******/ 	__webpack_require__.r = function(exports) {
+/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ 		}
+/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
+/******/ 	};
+/******/
+/******/ 	// create a fake namespace object
+/******/ 	// mode & 1: value is a module id, require it
+/******/ 	// mode & 2: merge all properties of value into the ns
+/******/ 	// mode & 4: return value when already ns object
+/******/ 	// mode & 8|1: behave like require
+/******/ 	__webpack_require__.t = function(value, mode) {
+/******/ 		if(mode & 1) value = __webpack_require__(value);
+/******/ 		if(mode & 8) return value;
+/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ 		var ns = Object.create(null);
+/******/ 		__webpack_require__.r(ns);
+/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ 		return ns;
+/******/ 	};
+/******/
+/******/ 	// getDefaultExport function for compatibility with non-harmony modules
+/******/ 	__webpack_require__.n = function(module) {
+/******/ 		var getter = module && module.__esModule ?
+/******/ 			function getDefault() { return module['default']; } :
+/******/ 			function getModuleExports() { return module; };
+/******/ 		__webpack_require__.d(getter, 'a', getter);
+/******/ 		return getter;
+/******/ 	};
+/******/
+/******/ 	// Object.prototype.hasOwnProperty.call
+/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(__webpack_require__.s = 3);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", { value: true });
+//function add {
+function add(number1, number2) {
+    var _a;
+    if (number2 === void 0) { number2 = "0"; }
+    var neg = 0, ind = -1, neg_len;
+    //check for negatives
+    if (number1[0] == '-') {
+        neg++;
+        ind = 1;
+        number1 = number1.substring(1);
+        neg_len = number1.length;
+    }
+    if (number2[0] == '-') {
+        neg++;
+        ind = 2;
+        number2 = number2.substring(1);
+        neg_len = number2.length;
+    }
+    number1 = trim(number1);
+    number2 = trim(number2);
+    _a = pad(trim(number1), trim(number2)), number1 = _a[0], number2 = _a[1];
+    if (neg == 1) {
+        if (ind == 1)
+            number1 = compliment(number1);
+        else
+            number2 = compliment(number2);
+    }
+    var res = addCore(number1, number2);
+    if (!neg)
+        return trim(res);
+    else if (neg == 2)
+        return ('-' + trim(res));
+    else {
+        if (number1.length < (res.length))
+            return trim(res.substring(1));
+        else
+            return ('-' + trim(compliment(res)));
+    }
+}
+exports.add = add;
+function compliment(number) {
+    var s = '', l = number.length, dec = number.split('.')[1], ld = dec ? dec.length : 0;
+    for (var i = 0; i < l; i++) {
+        if (number[i] >= '0' && number[i] <= '9')
+            s += (9 - parseInt(number[i]));
+        else
+            s += number[i];
+    }
+    var one = (ld > 0) ? ('0.' + (new Array(ld)).join('0') + '1') : '1';
+    return addCore(s, one);
+}
+function trim(number) {
+    var parts = number.split('.');
+    if (!parts[0])
+        parts[0] = '0';
+    while (parts[0][0] == '0' && parts[0].length > 1)
+        parts[0] = parts[0].substring(1);
+    return parts[0] + (parts[1] ? ('.' + parts[1]) : '');
+}
+exports.trim = trim;
+function pad(number1, number2) {
+    var parts1 = number1.split('.'), parts2 = number2.split('.');
+    //pad integral part
+    var length1 = parts1[0].length, length2 = parts2[0].length;
+    if (length1 > length2) {
+        parts2[0] = (new Array(Math.abs(length1 - length2) + 1)).join('0') + (parts2[0] ? parts2[0] : '');
+    }
+    else {
+        parts1[0] = (new Array(Math.abs(length1 - length2) + 1)).join('0') + (parts1[0] ? parts1[0] : '');
+    }
+    //pad fractional part
+    length1 = parts1[1] ? parts1[1].length : 0,
+        length2 = parts2[1] ? parts2[1].length : 0;
+    if (length1 || length2) {
+        if (length1 > length2) {
+            parts2[1] = (parts2[1] ? parts2[1] : '') + (new Array(Math.abs(length1 - length2) + 1)).join('0');
+        }
+        else {
+            parts1[1] = (parts1[1] ? parts1[1] : '') + (new Array(Math.abs(length1 - length2) + 1)).join('0');
+        }
+    }
+    number1 = parts1[0] + ((parts1[1]) ? ('.' + parts1[1]) : '');
+    number2 = parts2[0] + ((parts2[1]) ? ('.' + parts2[1]) : '');
+    return [number1, number2];
+}
+exports.pad = pad;
+function addCore(number1, number2) {
+    var _a;
+    _a = pad(number1, number2), number1 = _a[0], number2 = _a[1];
+    var sum = '', carry = 0;
+    for (var i = number1.length - 1; i >= 0; i--) {
+        if (number1[i] === '.') {
+            sum = '.' + sum;
+            continue;
+        }
+        var temp = parseInt(number1[i]) + parseInt(number2[i]) + carry;
+        sum = (temp % 10) + sum;
+        carry = Math.floor(temp / 10);
+    }
+    return carry ? (carry.toString() + sum) : sum;
+}
+
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", { value: true });
+var roundingModes_1 = __webpack_require__(2);
+/**
+ *
+ * @param input the number to round
+ * @param n precision
+ * @param mode Rounding Mode
+ */
+function roundOff(input, n, mode) {
+    if (n === void 0) { n = 0; }
+    if (mode === void 0) { mode = roundingModes_1.RoundingModes.HALF_EVEN; }
+    if (mode === roundingModes_1.RoundingModes.UNNECESSARY) {
+        throw new Error("UNNECESSARY Rounding Mode has not yet been implemented");
+    }
+    if (typeof (input) == 'number')
+        input = input.toString();
+    var neg = false;
+    if (input[0] === '-') {
+        neg = true;
+        input = input.substring(1);
+    }
+    var parts = input.split('.'), partInt = parts[0], partDec = parts[1];
+    //handle case of -ve n: roundOff(12564,-2)=12600
+    if (n < 0) {
+        n = -n;
+        if (partInt.length <= n)
+            return '0';
+        else {
+            var prefix = partInt.substr(0, partInt.length - n);
+            input = prefix + '.' + partInt.substr(partInt.length - n) + partDec;
+            prefix = roundOff(input, 0, mode);
+            return (neg ? '-' : '') + prefix + (new Array(n + 1).join('0'));
+        }
+    }
+    // handle case when integer output is desired
+    if (n == 0) {
+        var l = partInt.length;
+        if (greaterThanFive(parts[1], partInt, neg, mode)) {
+            return (neg ? '-' : '') + increment(partInt);
+        }
+        return (neg ? '-' : '') + partInt;
+    }
+    // handle case when n>0
+    if (!parts[1]) {
+        return (neg ? '-' : '') + partInt + '.' + (new Array(n + 1).join('0'));
+    }
+    else if (parts[1].length < n) {
+        return (neg ? '-' : '') + partInt + '.' + parts[1] + (new Array(n - parts[1].length + 1).join('0'));
+    }
+    partDec = parts[1].substring(0, n);
+    var rem = parts[1].substring(n);
+    if (rem && greaterThanFive(rem, partDec, neg, mode)) {
+        partDec = increment(partDec);
+        if (partDec.length > n) {
+            return increment(partInt, parseInt(partDec[0])) + '.' + partDec.substring(1);
+        }
+    }
+    return (neg ? '-' : '') + partInt + '.' + partDec;
+}
+exports.roundOff = roundOff;
+function greaterThanFive(part, pre, neg, mode) {
+    if (!part || part === new Array(part.length + 1).join('0'))
+        return false;
+    // #region UP, DOWN, CEILING, FLOOR 
+    if (mode === roundingModes_1.RoundingModes.DOWN || (!neg && mode === roundingModes_1.RoundingModes.FLOOR) ||
+        (neg && mode === roundingModes_1.RoundingModes.CEILING))
+        return false;
+    if (mode === roundingModes_1.RoundingModes.UP || (neg && mode === roundingModes_1.RoundingModes.FLOOR) ||
+        (!neg && mode === roundingModes_1.RoundingModes.CEILING))
+        return true;
+    // #endregion
+    // case when part !== five
+    var five = '5' + (new Array(part.length).join('0'));
+    if (part > five)
+        return true;
+    else if (part < five)
+        return false;
+    // case when part === five
+    switch (mode) {
+        case roundingModes_1.RoundingModes.HALF_DOWN: return false;
+        case roundingModes_1.RoundingModes.HALF_UP: return true;
+        case roundingModes_1.RoundingModes.HALF_EVEN:
+        default: return (parseInt(pre[pre.length - 1]) % 2 == 1);
+    }
+}
+function increment(part, c) {
+    if (c === void 0) { c = 0; }
+    if (!c)
+        c = 1;
+    if (typeof (part) == 'number')
+        part.toString();
+    var l = part.length - 1, s = '';
+    for (var i = l; i >= 0; i--) {
+        var x = parseInt(part[i]) + c;
+        if (x == 10) {
+            c = 1;
+            x = 0;
+        }
+        else {
+            c = 0;
+        }
+        s += x;
+    }
+    if (c)
+        s += c;
+    return s.split('').reverse().join('');
+}
+
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", { value: true });
+var RoundingModes;
+(function (RoundingModes) {
+    /**
+     * Rounding mode to round towards positive infinity.
+     */
+    RoundingModes[RoundingModes["CEILING"] = 0] = "CEILING";
+    /**
+     * Rounding mode to round towards zero.
+     */
+    RoundingModes[RoundingModes["DOWN"] = 1] = "DOWN";
+    /**
+     * Rounding mode to round towards negative infinity.
+     */
+    RoundingModes[RoundingModes["FLOOR"] = 2] = "FLOOR";
+    /**
+     * Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant,
+     * in which case round down.
+     */
+    RoundingModes[RoundingModes["HALF_DOWN"] = 3] = "HALF_DOWN";
+    /**
+     * Rounding mode to round towards the "nearest neighbor" unless both neighbors are equidistant,
+     * in which case, round towards the even neighbor.
+     */
+    RoundingModes[RoundingModes["HALF_EVEN"] = 4] = "HALF_EVEN";
+    /**
+     * Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant,
+     * in which case round up.
+     */
+    RoundingModes[RoundingModes["HALF_UP"] = 5] = "HALF_UP";
+    /**
+     * Rounding mode to assert that the requested operation has an exact result, hence no rounding is necessary.
+     * UNIMPLEMENTED
+     */
+    RoundingModes[RoundingModes["UNNECESSARY"] = 6] = "UNNECESSARY";
+    /**
+     * Rounding mode to round away from zero.
+     */
+    RoundingModes[RoundingModes["UP"] = 7] = "UP";
+})(RoundingModes = exports.RoundingModes || (exports.RoundingModes = {}));
+
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var add_1 = __webpack_require__(0);
+var round_1 = __webpack_require__(1);
+var multiply_1 = __webpack_require__(4);
+var divide_1 = __webpack_require__(5);
+var compareTo_1 = __webpack_require__(6);
+var subtract_1 = __webpack_require__(7);
+var roundingModes_1 = __webpack_require__(2);
+var bigDecimal = /** @class */ (function () {
+    function bigDecimal(number) {
+        if (number === void 0) { number = '0'; }
+        this.value = bigDecimal.validate(number);
+    }
+    bigDecimal.validate = function (number) {
+        if (number) {
+            number = number.toString();
+            if (isNaN(number))
+                throw Error("Parameter is not a number: " + number);
+            if (number[0] == '+')
+                number = number.substring(1);
+        }
+        else
+            number = '0';
+        //handle exponentiation
+        if (/e/i.test(number)) {
+            var _a = number.split(/[eE]/), mantisa = _a[0], exponent = _a[1];
+            mantisa = add_1.trim(mantisa);
+            exponent = parseInt(exponent) + mantisa.indexOf('.');
+            mantisa = mantisa.replace('.', '');
+            if (mantisa.length < exponent) {
+                number = mantisa + (new Array(exponent - mantisa.length + 1)).join('0');
+            }
+            else if (mantisa.length >= exponent && exponent > 0) {
+                number = add_1.trim(mantisa.substring(0, exponent)) +
+                    ((mantisa.length > exponent) ? ('.' + mantisa.substring(exponent)) : '');
+            }
+            else {
+                number = '0.' + (new Array(-exponent + 1)).join('0') + mantisa;
+            }
+        }
+        return number;
+    };
+    bigDecimal.prototype.getValue = function () {
+        return this.value;
+    };
+    bigDecimal.getPrettyValue = function (number, digits, separator) {
+        if (!(digits || separator)) {
+            digits = 3;
+            separator = ',';
+        }
+        else if (!(digits && separator)) {
+            throw Error('Illegal Arguments. Should pass both digits and separator or pass none');
+        }
+        number = bigDecimal.validate(number);
+        var neg = number.charAt(0) == '-';
+        if (neg)
+            number = number.substring(1);
+        var len = number.indexOf('.');
+        len = len > 0 ? len : (number.length);
+        var temp = '';
+        for (var i = len; i > 0;) {
+            if (i < digits) {
+                digits = i;
+                i = 0;
+            }
+            else
+                i -= digits;
+            temp = number.substring(i, i + digits) + ((i < (len - digits) && i >= 0) ? separator : '') + temp;
+        }
+        return (neg ? '-' : '') + temp + number.substring(len);
+    };
+    bigDecimal.prototype.getPrettyValue = function (digits, separator) {
+        return bigDecimal.getPrettyValue(this.value, digits, separator);
+    };
+    bigDecimal.round = function (number, precision, mode) {
+        if (precision === void 0) { precision = 0; }
+        if (mode === void 0) { mode = roundingModes_1.RoundingModes.HALF_EVEN; }
+        number = bigDecimal.validate(number);
+        if (isNaN(precision))
+            throw Error("Precision is not a number: " + precision);
+        return round_1.roundOff(number, precision, mode);
+    };
+    bigDecimal.prototype.round = function (precision, mode) {
+        if (precision === void 0) { precision = 0; }
+        if (mode === void 0) { mode = roundingModes_1.RoundingModes.HALF_EVEN; }
+        if (isNaN(precision))
+            throw Error("Precision is not a number: " + precision);
+        return new bigDecimal(round_1.roundOff(this.value, precision, mode));
+    };
+    bigDecimal.floor = function (number) {
+        number = bigDecimal.validate(number);
+        if (number.indexOf('.') === -1)
+            return number;
+        return bigDecimal.round(bigDecimal.subtract(number, 0.5));
+    };
+    bigDecimal.prototype.floor = function () {
+        if (this.value.indexOf('.') === -1)
+            return new bigDecimal(this.value);
+        return this.subtract(new bigDecimal(0.5)).round();
+    };
+    bigDecimal.ceil = function (number) {
+        number = bigDecimal.validate(number);
+        if (number.indexOf('.') === -1)
+            return number;
+        return bigDecimal.round(bigDecimal.add(number, 0.5));
+    };
+    bigDecimal.prototype.ceil = function () {
+        if (this.value.indexOf('.') === -1)
+            return new bigDecimal(this.value);
+        return this.add(new bigDecimal(0.5)).round();
+    };
+    bigDecimal.add = function (number1, number2) {
+        number1 = bigDecimal.validate(number1);
+        number2 = bigDecimal.validate(number2);
+        return add_1.add(number1, number2);
+    };
+    bigDecimal.prototype.add = function (number) {
+        return new bigDecimal(add_1.add(this.value, number.getValue()));
+    };
+    bigDecimal.subtract = function (number1, number2) {
+        number1 = bigDecimal.validate(number1);
+        number2 = bigDecimal.validate(number2);
+        return subtract_1.subtract(number1, number2);
+    };
+    bigDecimal.prototype.subtract = function (number) {
+        return new bigDecimal(subtract_1.subtract(this.value, number.getValue()));
+    };
+    bigDecimal.multiply = function (number1, number2) {
+        number1 = bigDecimal.validate(number1);
+        number2 = bigDecimal.validate(number2);
+        return multiply_1.multiply(number1, number2);
+    };
+    bigDecimal.prototype.multiply = function (number) {
+        return new bigDecimal(multiply_1.multiply(this.value, number.getValue()));
+    };
+    bigDecimal.divide = function (number1, number2, precision) {
+        number1 = bigDecimal.validate(number1);
+        number2 = bigDecimal.validate(number2);
+        return divide_1.divide(number1, number2, precision);
+    };
+    bigDecimal.prototype.divide = function (number, precision) {
+        return new bigDecimal(divide_1.divide(this.value, number.getValue(), precision));
+    };
+    bigDecimal.compareTo = function (number1, number2) {
+        number1 = bigDecimal.validate(number1);
+        number2 = bigDecimal.validate(number2);
+        return compareTo_1.compareTo(number1, number2);
+    };
+    bigDecimal.prototype.compareTo = function (number) {
+        return compareTo_1.compareTo(this.value, number.getValue());
+    };
+    bigDecimal.negate = function (number) {
+        number = bigDecimal.validate(number);
+        return subtract_1.negate(number);
+    };
+    bigDecimal.prototype.negate = function () {
+        return new bigDecimal(subtract_1.negate(this.value));
+    };
+    bigDecimal.RoundingModes = roundingModes_1.RoundingModes;
+    return bigDecimal;
+}());
+module.exports = bigDecimal;
+
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", { value: true });
+function multiply(number1, number2) {
+    number1 = number1.toString();
+    number2 = number2.toString();
+    /*Filter numbers*/
+    var negative = 0;
+    if (number1[0] == '-') {
+        negative++;
+        number1 = number1.substr(1);
+    }
+    if (number2[0] == '-') {
+        negative++;
+        number2 = number2.substr(1);
+    }
+    number1 = trailZero(number1);
+    number2 = trailZero(number2);
+    var decimalLength1 = 0;
+    var decimalLength2 = 0;
+    if (number1.indexOf('.') != -1) {
+        decimalLength1 = number1.length - number1.indexOf('.') - 1;
+    }
+    if (number2.indexOf('.') != -1) {
+        decimalLength2 = number2.length - number2.indexOf('.') - 1;
+    }
+    var decimalLength = decimalLength1 + decimalLength2;
+    number1 = trailZero(number1.replace('.', ''));
+    number2 = trailZero(number2.replace('.', ''));
+    if (number1.length < number2.length) {
+        var temp = number1;
+        number1 = number2;
+        number2 = temp;
+    }
+    if (number2 == '0') {
+        return '0';
+    }
+    /*
+    * Core multiplication
+    */
+    var length = number2.length;
+    var carry = 0;
+    var positionVector = [];
+    var currentPosition = length - 1;
+    var result = "";
+    for (var i = 0; i < length; i++) {
+        positionVector[i] = number1.length - 1;
+    }
+    for (var i = 0; i < 2 * number1.length; i++) {
+        var sum = 0;
+        for (var j = number2.length - 1; j >= currentPosition && j >= 0; j--) {
+            if (positionVector[j] > -1 && positionVector[j] < number1.length) {
+                sum += parseInt(number1[positionVector[j]--]) * parseInt(number2[j]);
+            }
+        }
+        sum += carry;
+        carry = Math.floor(sum / 10);
+        result = sum % 10 + result;
+        currentPosition--;
+    }
+    /*
+    * Formatting result
+    */
+    result = trailZero(adjustDecimal(result, decimalLength));
+    if (negative == 1) {
+        result = '-' + result;
+    }
+    return result;
+}
+exports.multiply = multiply;
+/*
+* Add decimal point
+*/
+function adjustDecimal(number, decimal) {
+    if (decimal == 0)
+        return number;
+    else {
+        number = (decimal >= number.length) ? ((new Array(decimal - number.length + 1)).join('0') + number) : number;
+        return number.substr(0, number.length - decimal) + '.' + number.substr(number.length - decimal, decimal);
+    }
+}
+/*
+* Removes zero from front and back*/
+function trailZero(number) {
+    while (number[0] == '0') {
+        number = number.substr(1);
+    }
+    if (number.indexOf('.') != -1) {
+        while (number[number.length - 1] == '0') {
+            number = number.substr(0, number.length - 1);
+        }
+    }
+    if (number == "" || number == ".") {
+        number = '0';
+    }
+    else if (number[number.length - 1] == '.') {
+        number = number.substr(0, number.length - 1);
+    }
+    if (number[0] == '.') {
+        number = '0' + number;
+    }
+    return number;
+}
+
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", { value: true });
+var add_1 = __webpack_require__(0);
+var round_1 = __webpack_require__(1);
+function divide(dividend, divisor, precission) {
+    if (precission === void 0) { precission = 8; }
+    if (divisor == 0) {
+        throw new Error('Cannot divide by 0');
+    }
+    dividend = dividend.toString();
+    divisor = divisor.toString();
+    // remove trailing zeros in decimal ISSUE#18
+    dividend = dividend.replace(/(\.\d*?[1-9])0+$/g, "$1").replace(/\.0+$/, "");
+    divisor = divisor.replace(/(\.\d*?[1-9])0+$/g, "$1").replace(/\.0+$/, "");
+    if (dividend == 0)
+        return '0';
+    var neg = 0;
+    if (divisor[0] == '-') {
+        divisor = divisor.substring(1);
+        neg++;
+    }
+    if (dividend[0] == '-') {
+        dividend = dividend.substring(1);
+        neg++;
+    }
+    var pt_dvsr = divisor.indexOf('.') > 0 ? divisor.length - divisor.indexOf('.') - 1 : -1;
+    divisor = add_1.trim(divisor.replace('.', ''));
+    if (pt_dvsr >= 0) {
+        var pt_dvnd = dividend.indexOf('.') > 0 ? dividend.length - dividend.indexOf('.') - 1 : -1;
+        if (pt_dvnd == -1) {
+            dividend = add_1.trim(dividend + (new Array(pt_dvsr + 1)).join('0'));
+        }
+        else {
+            if (pt_dvsr > pt_dvnd) {
+                dividend = dividend.replace('.', '');
+                dividend = add_1.trim(dividend + (new Array(pt_dvsr - pt_dvnd + 1)).join('0'));
+            }
+            else if (pt_dvsr < pt_dvnd) {
+                dividend = dividend.replace('.', '');
+                var loc = dividend.length - pt_dvnd + pt_dvsr;
+                dividend = add_1.trim(dividend.substring(0, loc) + '.' + dividend.substring(loc));
+            }
+            else if (pt_dvsr == pt_dvnd) {
+                dividend = add_1.trim(dividend.replace('.', ''));
+            }
+        }
+    }
+    var prec = 0, dl = divisor.length, rem = '0', quotent = '';
+    var dvnd = (dividend.indexOf('.') > -1 && dividend.indexOf('.') < dl) ? dividend.substring(0, dl + 1) : dividend.substring(0, dl);
+    dividend = (dividend.indexOf('.') > -1 && dividend.indexOf('.') < dl) ? dividend.substring(dl + 1) : dividend.substring(dl);
+    if (dvnd.indexOf('.') > -1) {
+        var shift = dvnd.length - dvnd.indexOf('.') - 1;
+        dvnd = dvnd.replace('.', '');
+        if (dl > dvnd.length) {
+            shift += dl - dvnd.length;
+            dvnd = dvnd + (new Array(dl - dvnd.length + 1)).join('0');
+        }
+        prec = shift;
+        quotent = '0.' + (new Array(shift)).join('0');
+    }
+    precission = precission + 2;
+    while (prec <= precission) {
+        var qt = 0;
+        while (parseInt(dvnd) >= parseInt(divisor)) {
+            dvnd = add_1.add(dvnd, '-' + divisor);
+            qt++;
+        }
+        quotent += qt;
+        if (!dividend) {
+            if (!prec)
+                quotent += '.';
+            prec++;
+            dvnd = dvnd + '0';
+        }
+        else {
+            if (dividend[0] == '.') {
+                quotent += '.';
+                prec++;
+                dividend = dividend.substring(1);
+            }
+            dvnd = dvnd + dividend.substring(0, 1);
+            dividend = dividend.substring(1);
+        }
+    }
+    return ((neg == 1) ? '-' : '') + add_1.trim(round_1.roundOff(quotent, precission - 2));
+}
+exports.divide = divide;
+
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", { value: true });
+var add_1 = __webpack_require__(0);
+function compareTo(number1, number2) {
+    var _a;
+    var negative = false;
+    if (number1[0] == '-' && number2[0] != "-") {
+        return -1;
+    }
+    else if (number1[0] != '-' && number2[0] == '-') {
+        return 1;
+    }
+    else if (number1[0] == '-' && number2[0] == '-') {
+        number1 = number1.substr(1);
+        number2 = number2.substr(1);
+        negative = true;
+    }
+    _a = add_1.pad(number1, number2), number1 = _a[0], number2 = _a[1];
+    if (number1.localeCompare(number2) == 0) {
+        return 0;
+    }
+    for (var i = 0; i < number1.length; i++) {
+        if (number1[i] == number2[i]) {
+            continue;
+        }
+        else if (number1[i] > number2[i]) {
+            if (negative) {
+                return -1;
+            }
+            else {
+                return 1;
+            }
+        }
+        else {
+            if (negative) {
+                return 1;
+            }
+            else {
+                return -1;
+            }
+        }
+    }
+    return 0;
+}
+exports.compareTo = compareTo;
+
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", { value: true });
+var add_1 = __webpack_require__(0);
+function subtract(number1, number2) {
+    number1 = number1.toString();
+    number2 = number2.toString();
+    number2 = negate(number2);
+    return add_1.add(number1, number2);
+}
+exports.subtract = subtract;
+function negate(number) {
+    if (number[0] == '-') {
+        number = number.substr(1);
+    }
+    else {
+        number = '-' + number;
+    }
+    return number;
+}
+exports.negate = negate;
+
+
+/***/ })
+/******/ ]);

+ 180 - 0
admin-ui/message.js

@@ -0,0 +1,180 @@
+Message = {
+
+  MSG_TYPE_TASK: 'task',
+  MSG_TYPE_ALERT: 'alert',
+  MSG_TYPE_PROMPT: 'prompt',
+
+  menuTree: '',
+
+  lockReconnect: false, //避免重复连接
+
+  socket: null,
+
+  wsUrl: '',
+
+  connectWebSocket: function () {
+
+      Message.wsUrl = 'ws://' + window.location.host + '/sys/websocket';
+
+      Message.socket = new WebSocket(Message.wsUrl);
+
+      Message.socket.onopen = function (msg) {
+        Message.heartCheck.reset().start(); //传递信息
+        console.log('WebSocket opened!');
+      };
+      Message.socket.onmessage = function (message) {
+
+        Message.heartCheck.reset().start();
+        if (message.data == 'pong') {
+          return;
+        }
+        var data = JSON.parse(message.data);
+        Message.messageRouter(data);
+        console.log('receive message: ' + message.data);
+      };
+      Message.socket.onerror = function (error) {
+        Message.reconnect(Message.wsUrl);
+        console.log('Error: ' + error.name + error.number);
+      };
+      Message.socket.onclose = function () {
+        Message.reconnect(Message.wsUrl);
+        console.log('WebSocket closed!');
+      };
+  },
+  messageRouter: function (data) {
+    switch (data.msgType) {
+      case Message.MSG_TYPE_TASK: {
+        Message.cacheTempData(data);
+        Message.onMessageTask(data);
+        break;
+      }
+    }
+  },
+
+
+  /**收到任务提示*/
+  onMessageTask: function (data) {
+    $.yvan.notify({
+      autoClose: 5000,
+      type: 'info',
+      body: data.msg,
+      title: data.msgTitle,
+      onClick: function () {
+        if (data.data) {
+
+          console.log(data.data);
+
+          // // 解析路径
+          // var path = data.data.linkedMenuPath;
+          // var menuIds = path.split('/');
+          // for (var i = menuIds.length - 1; i >= 0; i--) {
+          //   if (menuIds[i] == '' || menuIds[i] == null) {
+          //     menuIds.splice(i, 1);
+          //   }
+          // }
+          //
+          // //根据menuId在menuTree里面查找菜单
+          // if (Message.menuTree == '') {
+          //   return;
+          // }
+          // for (var i = 0; i < Message.menuTree.length; i++) {
+          //   var menu1 = Message.menuTree[i];
+          //   // 找到第一级菜单
+          //   if (menu1.id == menuIds[0]) {
+          //     var menu = Message.getTargetMenu(menu1, 1, menuIds);
+          //     App.addTab(
+          //       {
+          //         title: menu.text,
+          //         iconCls: menu.iconCls,
+          //         url: menu.href,
+          //         id: menu.id,
+          //         _: App.currentUrId,
+          //       });
+          //   }
+          // }
+          // console.log(menuIds);
+          top.window.open(".." + data.data.linkedMenuPath);
+        }
+      }
+    });
+  },
+
+  /**递归查找子菜单,直到找到为止*/
+  getTargetMenu: function (menu, level, menuIds) {
+    var children = menu.children;
+    if (children == '' || children == null || menuIds.length < level + 1) {
+      return menu;
+    } else {
+      for (var i = 0; i < children.length; i++) {
+        var child = children[i];
+        if (menuIds[level] == child.id) {
+          level++;
+          return Message.getTargetMenu(child, level, menuIds);
+        }
+      }
+    }
+  },
+
+  cacheTempData: function (data) {
+    if (data.data) {
+      localStorage.setItem("tempData" + top.window.location.host + "/app" + data.data.linkedMenuPath, JSON.stringify(data.data));
+    }
+  },
+
+  cacheHomeTempData: function (data, patchKey) {
+    if (data) {
+      localStorage.setItem("tempData" + top.window.location.host + top.window.location.pathname + "#" + patchKey, JSON.stringify(data));
+    }
+  },
+
+  getCacheData: function () {
+    var key = "tempData" + top.window.location.host + top.window.location.pathname + top.window.location.hash;
+    dataStr = localStorage.getItem(key);
+    localStorage.removeItem(key);
+    if (dataStr) {
+      return JSON.parse(dataStr);
+    }
+    return null;
+  },
+
+  getTempParamData: function () {
+    var d = Message.getCacheData();
+    if (d) {
+      return d.param;
+    }
+    return null;
+  },
+
+  reconnect: function (url) {
+    if (Message.lockReconnect) return;
+    Message.lockReconnect = true;
+    //没连接上会一直重连,设置延迟避免请求过多
+    setTimeout(function () {
+      Message.connectWebSocket();
+      Message.lockReconnect = false;
+    }, 2000);
+  },
+
+  //心跳检测
+  heartCheck: {
+    timeout: 6000, //60秒
+    timeoutObj: null,
+    serverTimeoutObj: null,
+    reset: function () {
+      clearTimeout(this.timeoutObj);
+      clearTimeout(this.serverTimeoutObj);
+      return this;
+    },
+    start: function () {
+      var self = this;
+      this.timeoutObj = setTimeout(function () {
+        //这里发送一个心跳,后端收到后,返回一个心跳消息,
+        //onmessage拿到返回的心跳就说明连接正常
+        Message.socket.send("ping");
+        self.serverTimeoutObj = setTimeout(function () { //如果超过一定时间还没重置,说明后端主动断开了
+          Message.socket.close(); //如果onclose会执行reconnect,我们执行ws.close()就行了.如果直接执行reconnect 会触发onclose导致重连两次
+        }, self.timeout)
+      }, this.timeout)
+    }
+  }
+};

+ 600 - 0
admin-ui/static/css/date.css

@@ -0,0 +1,600 @@
+.textbox-icon-disabled {
+    display: none;
+}
+.calendar-header {
+    background: none;
+    border-bottom: 1px solid #e2e2e2;
+    line-height: 30px;
+}
+
+.calendar-title {
+    position: relative;
+    top: -3px;
+    width: 160px;
+    margin: 0 auto;
+}
+
+.calendar-title span {
+    position: relative;
+    display: inline-block;
+    top: 2px;
+    padding: 0 5px;
+    height: 26px;
+    line-height: 26px;
+    cursor: pointer;
+    color: black;
+}
+
+.calendar-title span:hover {
+    color: #004c8b;
+}
+
+.calendar-day {
+    background: #fff;
+    transition: all 0.2s ease-in-out;
+}
+
+.calendar-nav-hover {
+    background-color: #eaeaea;
+    color: #333;
+}
+
+.calendar-selected {
+    border: 1px solid #fff;
+    background-color: #004c8b;
+    color: #fff !important;
+}
+
+.calendar-today {
+    color: #004c8b;
+}
+
+.calendar-nav {
+    height: 30px;
+}
+
+.calendar-prevmonth, .calendar-nextmonth, .calendar-prevyear, .calendar-nextyear {
+    top: -5px;
+    line-height: 30px;
+    margin-top: 0;
+    text-align: center;
+    cursor: pointer;
+    color: #999;
+    background-image: none;
+}
+
+.calendar-prevmonth, .calendar-nextmonth {
+    font-size: 20px;
+}
+
+.calendar-prevyear, .calendar-nextyear {
+    font-size: 24px;
+}
+
+.calendar-prevmonth {
+    left: 30px;
+    top: -4px;
+}
+
+.calendar-nextmonth {
+    right: 30px;
+    top: -4px;
+}
+
+.calendar-text.calendar-nav-hover, .calendar-nextmonth.calendar-nav-hover, .calendar-nextyear.calendar-nav-hover, .calendar-prevmonth.calendar-nav-hover, .calendar-prevyear.calendar-nav-hover {
+    background-color: #fff;
+    color: #004c8b;
+}
+
+.datebox-button {
+    margin: 0;
+    padding: 5px 5px;
+    height: 26px !important;
+    text-align: right;
+    background: #fff;
+}
+
+.datebox-button a {
+    height: 26px;
+    line-height: 26px;
+    margin-top: 10px;
+    background-color: #004c8b;
+    color: #fff;
+    border-radius: 2px;
+    transition: all 0.2s ease-in-out;
+    opacity: 1;
+}
+
+.datebox-button a:hover {
+    color: #fff;
+    opacity: 0.8;
+}
+
+.datebox-button a:nth-child(1) {
+    margin-right: 8px;
+}
+
+.datebox-button a:nth-child(2) {
+    margin-right: 3px;
+}
+
+/* 月份 */
+.date-month-list {
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100%;
+    background-color: #fff;
+    padding: 10px 0;
+}
+
+.date-month-list > li {
+    float: left;
+    vertical-align: middle;
+    width: 25%;
+    margin: 17px 0;
+    height: 36px;
+    line-height: 36px;
+    text-align: center;
+    cursor: pointer;
+    position: relative;
+    background: #fff;
+    transition: all 0.2s ease-in-out;
+}
+
+.date-month-list > li:hover {
+    background-color: #eaeaea;
+    color: #333;
+}
+
+.date-month-this {
+    background-color: #004c8b !important;
+    color: #fff;
+}
+
+.date-month-this:hover {
+    color: #fff !important;
+}
+
+/* 月份 */
+.date-year-titleys {
+/ / margin: 0 3 px;
+    top: 0 !important;
+    height: auto;
+    line-height: none;
+}
+
+.date-year-list {
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+    background-color: #fff;
+    padding: 15px 0;
+}
+
+.date-year-list > li {
+    float: left;
+    vertical-align: middle;
+    width: 33.3333%;
+    margin: 3px 0;
+    height: 36px;
+    line-height: 36px;
+    text-align: center;
+    cursor: pointer;
+    position: relative;
+    background: #fff;
+    transition: all 0.2s ease-in-out;
+}
+
+.date-year-list > li:hover {
+    background-color: #eaeaea;
+    color: #333;
+}
+
+.date-year-this {
+    background-color: #004c8b !important;
+    color: #fff;
+}
+
+.date-year-this:hover {
+    color: #fff !important;
+}
+
+/* 时分秒 */
+.date-time-list {
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+    padding: 10px;
+    background-color: #fff;
+    box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    -webkit-box-sizing: border-box;
+    -o-box-sizing: border-box;
+    -ms-box-sizing: border-box;
+}
+
+.date-time-list > li {
+    float: left;
+    vertical-align: middle;
+    width: 33.3333%;
+    margin: 3px 0;
+    height: 36px;
+    line-height: 36px;
+    text-align: center;
+    cursor: pointer;
+    position: relative;
+    background: #fff;
+}
+
+.date-time-list p {
+    position: relative;
+    top: -4px;
+    line-height: 29px;
+}
+
+.date-time-list li:first-child ol {
+    border-left-width: 1px;
+}
+
+.date-time-list li ol {
+    margin: 0;
+    padding: 0;
+    border: 1px solid #e2e2e2;
+    border-left-width: 0;
+    height: 181px;
+    overflow: hidden;
+}
+
+.date-time-list ol li {
+    width: 120%;
+    padding-left: 33px;
+    line-height: 30px;
+    text-align: left;
+    cursor: pointer;
+}
+
+.date-time-list li ol:hover {
+    overflow-y: auto;
+}
+
+.date-this {
+    background-color: #004c8b !important;
+    color: #fff !important;
+}
+
+.date-time-list li ol li {
+    background: #fff;
+    transition: all 0.2s ease-in-out;
+}
+
+.date-time-list li ol li:hover {
+    background-color: #eaeaea;
+    color: #333;
+}
+
+.calendar-title .year-range {
+    display: none;
+}
+
+.calendar-body .calendar-menu {
+    display: none;
+}
+
+.calendar-body .date-month-list {
+    display: none;
+}
+
+.calendar-body .date-year-list {
+    display: none;
+}
+
+/*-------- 时间范围选择------- */
+.calendarT {
+    width: 523px;
+    height: 284px;
+    margin: 10px 10px 5px 0px;
+    background: #fff;
+    border: 1px solid #d2d2d2;
+    box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
+    padding: 10px;
+    box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    -webkit-box-sizing: border-box;
+    -o-box-sizing: border-box;
+    -ms-box-sizing: border-box;
+}
+
+.calendarT-header-box {
+    height: 30px;
+}
+
+.calendarT-header-left {
+    width: 250px;
+    float: left;
+    height: 100%;
+}
+
+.calendarT-header-right {
+    margin-left: 250px;
+    height: 100%;
+}
+
+.calendarT .calendar-header {
+    border: none;
+}
+
+.calendarT .calendar-body {
+    border-bottom: 1px solid #e2e2e2;
+    border-top: 1px solid #e2e2e2;
+    height: 232px;
+}
+
+.calendarT-body-left {
+    width: 250px;
+    float: left;
+    height: 100%;
+}
+
+.calendarT-body-right {
+    margin-left: 250px;
+    border-left: 1px solid #e2e2e2;
+    height: 100%;
+}
+
+/* 月份范围选择 */
+.date-monthrange-list {
+    margin: 0 10px;
+    padding: 8px 0;
+}
+
+.date-monthrange-list > li {
+    float: left;
+    vertical-align: middle;
+    width: 25%;
+    margin: 17px 0;
+    height: 36px;
+    line-height: 36px;
+    text-align: center;
+    cursor: pointer;
+    position: relative;
+    background: #fff;
+    transition: all 0.2s ease-in-out;
+}
+
+.date-monthrange-list > li:hover {
+    background-color: #eaeaea;
+    color: #333;
+}
+
+.date-monthrange-this {
+    background-color: #004c8b !important;
+    color: #fff;
+}
+
+.date-monthrange-this:hover {
+    color: #fff !important;
+}
+
+/* 年份范围选择 */
+.date-yearrange-list {
+    margin: 0 10px;
+    padding: 11px 0;
+}
+
+.date-yearrange-list > li {
+    float: left;
+    vertical-align: middle;
+    width: 33.3333%;
+    margin: 3px 0;
+    height: 36px;
+    line-height: 36px;
+    text-align: center;
+    cursor: pointer;
+    position: relative;
+    background: #fff;
+    transition: all 0.2s ease-in-out;
+}
+
+.date-yearrange-list > li:hover {
+    background-color: #eaeaea;
+    color: #333;
+}
+
+.date-yearrange-this {
+    background-color: #004c8b !important;
+    color: #fff;
+}
+
+.date-yearrange-this:hover {
+    color: #fff !important;
+}
+
+/* 时分秒范围选择 */
+.date-timerange-list {
+    width: 250px;
+    height: 100%;
+    padding: 10px;
+    background-color: #fff;
+    box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    -webkit-box-sizing: border-box;
+    -o-box-sizing: border-box;
+    -ms-box-sizing: border-box;
+}
+
+.date-timerange-list > li {
+    float: left;
+    vertical-align: middle;
+    width: 33.3333%;
+    margin: 3px 0;
+    height: 36px;
+    line-height: 36px;
+    text-align: center;
+    cursor: pointer;
+    position: relative;
+    background: #fff;
+}
+
+.date-timerange-list p {
+    position: relative;
+    top: -4px;
+    line-height: 29px;
+}
+
+.date-timerange-list li:first-child ol {
+    border-left-width: 1px;
+}
+
+.date-timerange-list li ol {
+    margin: 0;
+    padding: 0;
+    border: 1px solid #e2e2e2;
+    border-left-width: 0;
+    height: 181px;
+    overflow: hidden;
+}
+
+.date-timerange-list ol li {
+    width: 120%;
+    padding-left: 33px;
+    line-height: 30px;
+    text-align: left;
+    cursor: pointer;
+}
+
+.date-timerange-list li ol:hover {
+    overflow-y: auto;
+}
+
+.date-timerange-list li ol li {
+    background: #fff;
+    transition: all 0.2s ease-in-out;
+}
+
+.date-timerange-list li ol li:hover {
+    background-color: #eaeaea;
+    color: #333;
+}
+
+/*-------- 年月日选择------- */
+.show-time .calendar-dtable {
+    float: left;
+    padding-top: 5px;
+}
+
+.show-time .calendar-title {
+    width: 260px;
+}
+
+.show-time .calendar-header {
+    border: none;
+}
+
+.show-time .calendar-body {
+    border-top: 1px solid #e2e2e2;
+    border-bottom: 1px solid #e2e2e2;
+}
+
+.calendar-add-time {
+    margin-left: 250px;
+    height: 100%;
+    border-left: 1px solid #e2e2e2;
+}
+
+.add-time-list {
+    padding: 3px 0 10px 10px;
+    background-color: #fff;
+    box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    -webkit-box-sizing: border-box;
+    -o-box-sizing: border-box;
+    -ms-box-sizing: border-box;
+    height: 100%;
+}
+
+.add-time-list > li {
+    float: left;
+    vertical-align: middle;
+    width: 33.3333%;
+    margin: 3px 0;
+    height: 36px;
+    line-height: 36px;
+    text-align: center;
+    cursor: pointer;
+    position: relative;
+    background: #fff;
+}
+
+.add-time-list p {
+    position: relative;
+    top: -4px;
+    line-height: 29px;
+}
+
+.add-time-list li:first-child ol {
+    border-left-width: 1px;
+}
+
+.add-time-list li ol {
+    margin: 0;
+    padding: 0;
+    border: 1px solid #e2e2e2;
+    border-left-width: 0;
+    height: 181px;
+    overflow: hidden;
+}
+
+.add-time-list ol li {
+    width: 110%;
+    padding-left: 15px;
+    line-height: 30px;
+    text-align: left;
+    cursor: pointer;
+}
+
+.add-time-list li ol:hover {
+    overflow-y: auto;
+}
+
+.add-time-list li ol li {
+    background: #fff;
+    transition: all 0.2s ease-in-out;
+}
+
+.add-time-list li ol li:hover {
+    background-color: #eaeaea;
+    color: #333;
+}
+
+.calendar-menu {
+    height: 100%;
+}
+/* jqxPopover */
+.jqx-date-box{
+    border:none;
+}
+.jqx-date-box .jqx-popover-content{
+    padding:0;
+}
+.jqx-date-box.bottom{
+    margin:0;
+}
+.jqx-date-box .calendar{
+    border-color:#fff;
+    border-bottom:1px solid #ccc;
+}
+.jqx-date-box .jqx-popover-arrow{
+    display:none!important;
+}
+.jqx-date-box .datebox-calendar-inner{
+    height:284px;
+}
+.jqx-date-box .datebox-button{
+    border:none;
+    padding:3px 5px;
+}

+ 141 - 0
admin-ui/static/css/hust.css

@@ -0,0 +1,141 @@
+/** 只读框 **/
+.textbox-readonly {
+    background: white;
+    border: 0;
+}
+
+.textbox-disabled .textbox-text, .textbox-readonly .textbox-text {
+    background: white;
+    border: 0;
+    cursor: default;
+    box-shadow: none;
+}
+
+.yvgrid-searchbox {
+    background: url(/static/images/searchbox.png) right no-repeat !important;
+    background-size: 48px 30px;
+    padding-right: 50px;
+}
+
+.yvgrid-searchbox-hilight {
+    background: url(/static/images/searchbox-hover.png) right no-repeat !important;
+    background-size: 48px 30px;
+    cursor: pointer;
+}
+
+.yvgrid-searchbox-hilight1 {
+    background: url(/static/images/searchbox-hover1.png) right no-repeat !important;
+    background-size: 40px 25px;
+    cursor: pointer;
+}
+
+.yvgrid-searchbox-hilight2 {
+    background: url(/static/images/searchbox-hover2.png) right no-repeat !important;
+    background-size: 40px 25px;
+    cursor: pointer;
+}
+
+.yvgrid-presentrow-disable{
+    height: 100%;
+    width: 100%;
+    background-color:#e5e5e5 !important;
+}
+/*
+.yvgrid-searchbox:hover, .yvgrid-searchbox:focus {
+    background: url(/static/images/searchbox-hover.png) right no-repeat!important;;
+    background-size: 40px 25px;
+}
+*/
+
+[yv-grid-cell-selected] {
+    color: #ffffff !important;
+    background-color: #428bca !important;
+    border-color: #357ebd !important;
+}
+
+/* 禁用掉勾选用的 checkbox 列*/
+.jqx-grid-cell > .jqx-checkbox{
+    display: none;
+}
+.jqx-widget-header > div > .jqx-checkbox{
+    display: none;
+}
+.jqx-grid-cell-filter-row.jqx-grid-cell > .jqx-checkbox {
+    display: block;
+}
+
+.jqx-tooltip-main .jqx-fill-state-normal {
+    background-color: RED;
+    color: WHITE
+}
+.asterisk{
+    line-height: 34px;
+    width: 100%;
+    height: 30px;
+    text-align: center;
+}
+.yvgrid-yvdate{
+    background: url(/static/images/datebox_arrow.png)  right  7px center no-repeat !important;
+    background-size: 48px 30px;
+    padding-right: 30px;
+}
+
+.yvgrid-numberbox {
+    border: 0;
+    padding: 4px;
+    text-align: right;
+}
+
+/* 去掉 input[type=number] 右边的上下箭头图标 */
+input::-webkit-outer-spin-button,
+input::-webkit-inner-spin-button{
+    -webkit-appearance: none !important;
+}
+input[type="number"]{
+    -moz-appearance:textfield;
+}
+.jqx-grid-cell-edit input{
+    width:100%!important;
+    height:100%!important;
+}
+.jqx-grid-cell-selected.jqx-grid-cell-edit{
+    border-color: #ababab !important;
+}
+.jqx-combobox-arrow-normal{
+    width:19px!important;
+}
+.jqx-grid-cell-checkbox{
+    text-align: center;
+}
+.jqx-grid-cell-checkbox .yvgrid-checkbox{
+    margin-top:8px;
+}
+.jqx-grid-cell-center-align{
+    text-align: center;
+}
+.textbox .select2-container{
+    width:100%!important;
+    padding:0;
+}
+.textbox .select2-container .select2-choice{
+    height:100%;
+    line-height: 30px;
+    border:0;
+    border-radius: 0;
+    background:#fff;
+}
+.textbox .select2-container .select2-choice .select2-arrow{
+    border-radius: 0;
+}
+.select2-drop-active{
+    border:1px solid #aaa;
+}
+.select2-search input{
+    margin-top:4px;
+}
+.select2-choices{
+    border: none!important;
+    display: flex;
+    overflow-x: auto!important;
+    white-space: nowrap;
+}

+ 122 - 0
admin-ui/static/css/login.css

@@ -0,0 +1,122 @@
+*{
+    padding:0;
+    margin:0;
+}
+html, body{
+    height: 100%;
+    overflow-y: hidden;
+}
+.errorinfo{
+    background: transparent!important;
+    color: RED;
+}
+.login-body{
+    width: 100%;
+    height:100%;
+    background: url(../images/lock-screen-background.jpg)  no-repeat;
+    background-size: cover;
+}
+.login-body-box{
+    width:400px;
+    height:322px;
+    position: absolute;
+    top: 50%;
+    left: 50%;
+    margin: -161px 0 0 -200px;
+    padding:0;
+    background: rgba(2, 48, 86, 0.8);
+}
+.login-dl-form{
+    padding:0 20px;
+    box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    -webkit-box-sizing: border-box;
+    -o-box-sizing: border-box;
+    -ms-box-sizing: border-box;
+}
+.login-dl-title{
+    text-align: center;
+    height: 80px;
+    line-height: 80px;
+    color: rgb(255, 255, 255);
+    font-size: 20px;
+}
+.login-dl-name{
+    width: 55px;
+    height: 50px;
+    padding-right: 15px;
+    float: left;
+    line-height: 50px;
+    text-align: right;
+    color: rgb(0, 76, 139);
+    background: rgb(224, 224, 224);
+}
+.login-dl-info{
+    margin-left: 70px;
+    height: 50px;
+    position: relative;
+}
+.login-dl-info input{
+    font-size: 20px;
+    margin: 0px;
+    padding:0 10px;
+    height: 50px;
+    line-height: 50px;
+    width: 268px;
+    border:0;
+}
+.login-dl-info i{
+    position: absolute;
+    right:0;
+    top:0;
+    width:50px;
+    height: 50px;
+    line-height: 50px;
+    text-align: center;
+    font-size: 28px;
+    z-index: 9999;
+    color: rgb(201, 201, 201);
+}
+.login-dl-info select{
+    margin: 0px;
+    padding:0 10px;
+    height: 50px;
+    line-height: 50px;
+    width: 290px;
+    border: none;
+    outline: none;
+    appearance: none;
+    -webkit-appearance: none;
+    -moz-appearance: none;
+}
+.login-dl-info option{
+    height: 30px;
+    margin: 0 -4px;
+    outline: none;
+}
+.login-dl-form dd{
+    width: 100%;
+    height: 50px;
+    background: rgb(249, 249, 249);
+    margin: 0px 0px 10px;
+}
+.login-dl-submit{
+    background: rgba(0, 76, 139, 0.85);
+    position: absolute;
+    bottom: 0px;
+    height: 55px;
+    width: 100% !important;
+    text-align: center;
+    line-height: 55px;
+}
+.login-dl-submit a{
+    width:100%;
+    height:100%;
+    display:block;
+    color:#fff;
+    font-size: 16px;
+    cursor: pointer;
+}
+.fa-caret-down{
+    pointer-events: none;
+}

+ 143 - 0
admin-ui/static/css/role_home.css

@@ -0,0 +1,143 @@
+.statistics-head {
+    background-color: #054c89 ;
+    margin-top: 50px;
+    width: 80%;
+    left: 100px;
+    right: 100px;
+    height: auto;
+}
+
+.statistics-head-title {
+    margin-top: auto;
+    width: 100%;
+    height: auto;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.statistics-head-row {
+    margin-top: auto;
+    width: 100%;
+    height: auto;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+}
+.statistics-head-row-light {
+    background-color: #07589d;
+    margin-top: auto;
+    width: 100%;
+    height: auto;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+}
+.statistics-head-row-item {
+    height: auto;
+    width: auto;
+    color: white;
+    margin-left: 20px;
+    margin-right: 20px;
+}
+.statistics-head-row-item-button {
+    background: #5887e3;
+    height: auto;
+    width: auto;
+    text-align: center;
+    margin: 20px;
+    padding-left: 15px;
+    padding-right: 15px;
+    padding-top: 5px;
+    padding-bottom: 5px;
+}
+.statistics-head-row-item-button a{
+    width:100%;
+    height:100%;
+    display:block;
+    color:#fff;
+    font-size: 16px;
+    cursor: pointer;
+}
+
+.statistics-body {
+    /*margin-top: 50px;*/
+    width: 80%;
+    left: 100px;
+    right: 100px;
+    height: auto;
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    justify-content: space-between;
+    align-items: center;
+}
+.statistics-body-item {
+    background-color: #054c89;
+    margin-top: 50px;
+    width: auto;
+    height: auto;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    align-items: center;
+}
+.statistics-body-item-body {
+    width: auto;
+    height: auto;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: flex-start;
+    /*padding-right: 30px;*/
+    /*padding-left: 30px;*/
+    /*padding-top: 20px;*/
+    /*padding-bottom: 20px;*/
+}
+.statistics-body-item-body-icon {
+    padding-top: 30px;
+    padding-bottom: 30px;
+    padding-left: 40px;
+    width: 100px;
+    height: 100px;
+    font-size: 100px;
+    color: white;
+}
+.statistics-body-item-body-body {
+    padding-top: 30px;
+    padding-bottom: 30px;
+    padding-left: 40px;
+    padding-right: 40px;
+    width: auto;
+    height: auto;
+}
+.statistics-body-item-body-body-title {
+    color: white;
+    font-size: 30px;
+}
+.statistics-body-item-body-body-item {
+    padding: 0;
+    margin: 0;
+    font-size: 20px;
+    color: white;
+}
+.statistics-body-item-bottom-button {
+    background: #229dd6;
+    height: auto;
+    width: 100%;
+    text-align: center;
+    padding-top: 10px;
+    padding-bottom: 10px;
+}
+
+.statistics-body-item-bottom-button a{
+    width:100%;
+    height:100%;
+    display:block;
+    color:#fff;
+    font-size: 16px;
+    cursor: pointer;
+}

+ 162 - 0
admin-ui/static/css/themes/cropper/ImgCropping.css

@@ -0,0 +1,162 @@
+
+.l2-btn{
+    display: inline-block;
+    outline: none;
+    resize: none;
+    border: none;
+    padding:5px 10px;
+    background: #8C85E6;
+    color: #fff;
+    border:solid 1px #8C85E6;
+    border-radius: 3px;
+    font-size: 14px;
+}
+.l2-btn:hover{
+    background: #8078e3;
+    animation: anniu 1s infinite;
+}
+.l2-btn:active{
+    box-shadow: 0 2px 3px rgba(0,0,0,.2) inset;
+}
+.hidden{
+    display: none;
+}
+.tailoring-container, .tailoring-container div, .tailoring-container p{
+    margin: 0;padding: 0;
+    box-sizing: border-box;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+}
+.tailoring-container{
+    position: fixed;
+    width: 100%;
+    height: 100%;
+    z-index: 1000;
+    top: 0;
+    left: 0;
+}
+.tailoring-container .black-cloth{
+    position: fixed;
+    width: 100%;
+    height: 100%;
+    background: #111;
+    opacity: .9;
+    z-index: 1001;
+}
+.tailoring-container .tailoring-content{
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    background: #fff;
+    z-index: 1002;
+    left: 0;
+    top: 0;
+
+    /* 水平垂直居中 浏览器版本号低的不支持transform */
+    /*left: 50%;
+    top: 50%;
+    transform: translate(-50%,-50%);
+    -weblit-transform: translate(-50%,-50%);
+    -moz-transform: translate(-50%,-50%);
+    -ms-transform: translate(-50%,-50%);
+    -o-transform: translate(-50%,-50%);*/
+
+    border-radius: 10px;
+    box-shadow: 0 0 10px #000;
+    padding: 10px;
+}
+
+.tailoring-content-one{
+    height: 40px;
+    width: 100%;
+    border-bottom: 1px solid #DDD ;
+}
+.tailoring-content .choose-btn{
+    float: left;
+}
+.tailoring-content .close-tailoring{
+    display: inline-block;
+    height: 30px;
+    width: 30px;
+    border-radius: 100%;
+    background: #eee;
+    color: #fff;
+    font-size: 22px;
+    text-align: center;
+    line-height: 30px;
+    float: right;
+    cursor: pointer;
+}
+.tailoring-content .close-tailoring:hover{
+    background: #ccc;
+}
+
+.tailoring-content .tailoring-content-two{
+    width: 100%;
+    height: 80%;
+    position: relative;
+    padding: 5px 0;
+}
+.tailoring-content .tailoring-box-parcel{
+    width: 80%;
+    height: 100%;
+    position: absolute;
+    left: 0;
+    border: solid 1px #ddd;
+}
+.tailoring-content .preview-box-parcel{
+    display: inline-block;
+    width: 228px;
+    height: 450px;
+    position: absolute;
+    right: 0;
+    padding: 4px 14px;
+}
+.preview-box-parcel p{
+    color: #555;
+}
+.previewImg{
+    width: 200px;
+    height: 200px;
+    overflow: hidden;
+}
+.preview-box-parcel .square{
+    margin-top: 10px;
+    border: solid 1px #ddd;
+}
+.preview-box-parcel .circular{
+    border-radius: 100%;
+    margin-top: 10px;
+    border: solid 1px #ddd;
+}
+
+.tailoring-content .tailoring-content-three{
+    width: 100%;
+    height: 40px;
+    border-top: 1px solid #DDD ;
+    padding-top: 10px;
+}
+.sureCut{
+    float: right;
+}
+
+@media all and (max-width: 768px) {
+    .tailoring-container .tailoring-content{
+        width: 100%;
+        min-width: 320px;
+        height: 460px;
+    }
+    .tailoring-content .tailoring-content-two{
+        height: 360px;
+    }
+    .tailoring-content .tailoring-box-parcel{
+        height: 350px;
+    }
+    .tailoring-container .tailoring-box-parcel{
+        width: 100%;
+    }
+    .tailoring-container .preview-box-parcel{
+        display: none;
+    }
+
+}

File diff suppressed because it is too large
+ 10 - 0
admin-ui/static/css/themes/cropper/cropper.min.css


File diff suppressed because it is too large
+ 3949 - 0
admin-ui/static/css/themes/default/easyui.css


BIN
admin-ui/static/css/themes/default/icons/back.png


BIN
admin-ui/static/css/themes/default/icons/blank.gif


BIN
admin-ui/static/css/themes/default/icons/cancel.png


BIN
admin-ui/static/css/themes/default/icons/clear.png


BIN
admin-ui/static/css/themes/default/icons/cut.png


BIN
admin-ui/static/css/themes/default/icons/edit_add.png


BIN
admin-ui/static/css/themes/default/icons/edit_remove.png


+ 0 - 0
admin-ui/static/css/themes/default/icons/filesave.png


Some files were not shown because too many files changed in this diff