|
@@ -0,0 +1,126 @@
|
|
|
+
|
|
|
+shr.defineClass("shr.custom.adminOrgListEx", shr.org.adminOrgList, {
|
|
|
+ initalizeDOM: function () {
|
|
|
+ var _self = this;
|
|
|
+ shr.custom.adminOrgListEx.superClass.initalizeDOM.call(this);
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ *同步部门信息到IOT
|
|
|
+ */
|
|
|
+ syncOrgUnitToIotAction: function (action) {
|
|
|
+ var _self = this;
|
|
|
+ // var selectedId = _self.getSelectedIds();
|
|
|
+ var selectedId = this.getSelectedFields(null);
|
|
|
+ if (selectedId != null) {
|
|
|
+ console.log("selectedId", selectedId);
|
|
|
+ // shr.showConfirm("是否开始执行同步部门信息到Iot?", function () {
|
|
|
+ // $.block.show({
|
|
|
+ // text: '正在同步,请勿操作!',
|
|
|
+ // })
|
|
|
+ var billId;
|
|
|
+ if (selectedId.length == 0) {
|
|
|
+ billId = selectedId
|
|
|
+ } else {
|
|
|
+ billId = selectedId + ""
|
|
|
+ }
|
|
|
+
|
|
|
+ _self.doRemoteWithBatchAction({
|
|
|
+ method: "syncOrgUnitToIot",
|
|
|
+ billIds: billId
|
|
|
+ });
|
|
|
+ // _self.remoteCall({
|
|
|
+ // method: 'syncOrgUnitToIot',
|
|
|
+ // param: {
|
|
|
+ // billIds: selectedId+"",
|
|
|
+ // },
|
|
|
+ // success: function (data) {
|
|
|
+ // shr.showInfo({
|
|
|
+ // message: "同步成功",
|
|
|
+ // hideAfter: 3
|
|
|
+ // });
|
|
|
+ // // 查询表格
|
|
|
+ // }, complete: function () {
|
|
|
+ // $.block.hide()
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ *同步部门信息到OA
|
|
|
+ */
|
|
|
+ syncOrgUnitToOAAction: function (action) {
|
|
|
+ var _self = this;
|
|
|
+ // var selectedId = _self.getSelectedIds();
|
|
|
+ var selectedId = this.getSelectedFields(null);
|
|
|
+ if (selectedId != null) {
|
|
|
+ console.log("selectedId", selectedId);
|
|
|
+ shr.showConfirm("是否开始执行同步部门信息到OA?", function () {
|
|
|
+ // $.block.show({
|
|
|
+ // text: '正在同步,请勿操作!',
|
|
|
+ // })
|
|
|
+ var billId;
|
|
|
+ if (selectedId.length == 0) {
|
|
|
+ billId = selectedId
|
|
|
+ } else {
|
|
|
+ billId = selectedId + ""
|
|
|
+ }
|
|
|
+
|
|
|
+ _self.doRemoteWithBatchAction({
|
|
|
+ method: "syncOrgUnitToIot",
|
|
|
+ billIds: selectedId + "",
|
|
|
+ });
|
|
|
+ // _self.remoteCall({
|
|
|
+ // method: 'syncOrgUnitToOA',
|
|
|
+ // param: {
|
|
|
+ // billIds: selectedId+"",
|
|
|
+ // },
|
|
|
+ // success: function (data) {
|
|
|
+ // shr.showInfo({
|
|
|
+ // message: "同步成功",
|
|
|
+ // hideAfter: 3
|
|
|
+ // });
|
|
|
+ // // 查询表格
|
|
|
+ // }, complete: function () {
|
|
|
+ // $.block.hide()
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 批量提示行数据,方便子类覆写
|
|
|
+ */
|
|
|
+ getBatchTipsRowDatas: function (ids, options) {
|
|
|
+ var _self = this;
|
|
|
+ var $table = $(_self.gridId);
|
|
|
+ var rowDatas = []; //获取选中的表格数据,这种方法只能获取到当前页数据 bug编号:BT1155539
|
|
|
+ // for (var i = 0, l = ids.length; i < l; i++) {
|
|
|
+ // rowDatas.push($table.jqGrid('getOriginalRowData', ids[i]));
|
|
|
+ // }
|
|
|
+ // rowDatas = _self.selectedRowData;
|
|
|
+ _self.remoteCall({
|
|
|
+ method: 'getAdminOrgBatchInfo',
|
|
|
+ param: {
|
|
|
+ ids: ids + ""
|
|
|
+ },
|
|
|
+ async: false,
|
|
|
+ success: function (data) {
|
|
|
+ rowDatas = data
|
|
|
+ // 查询表格
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return rowDatas;
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 如果重写过getBatchTipsRowDatas方法,则需要增加对应的列配置属性
|
|
|
+ */
|
|
|
+ getBatchTipsTableModel: function () {
|
|
|
+ var tableModel = $("#grid").jqGrid("getGridConfig").colModel;
|
|
|
+ return tableModel;
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|