fmui-base 2.2.59 → 2.2.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.2.61: 我的流程支持再次发起
7
+ - 2.2.60: 数据表字段关联值支持关联日期字段带出星期几,数据表字段关联值可以关联其他字段,进行赋值,批量办理支持CA批示意见的加签和验签
6
8
  - 2.2.59: 上海CA异常处理
7
9
  - 2.2.58: 增加汇报周报组件,退回的批示意见增加标识
8
10
  - 2.2.57: 子表字段支持字段关联
package/lib/form/form.js CHANGED
@@ -1355,6 +1355,7 @@ var PageHome = function (_React$Component) {
1355
1355
  }
1356
1356
  }
1357
1357
  });
1358
+
1358
1359
  t.props.onChange(data, t.state.itemParam);
1359
1360
  });
1360
1361
  } else {
@@ -1454,11 +1455,20 @@ var PageHome = function (_React$Component) {
1454
1455
 
1455
1456
  if (itemType != 'weboffice') {
1456
1457
  itemParam.value = value;
1458
+
1457
1459
  //处理特有按钮事件
1458
1460
  if (typeof FlowCommon.dealwithCommonFormParam === "function") {
1459
1461
  itemParam = FlowCommon.dealwithCommonFormParam(itemParam, this);
1460
1462
  itemType = itemParam.itemType;
1461
1463
  }
1464
+ if (itemType == 'text' || itemType == 'textarea') {
1465
+ for (var i = 0; i < data.mainTblData.length; i++) {
1466
+ if (itemParam.key == data.mainTblData[i].key) {
1467
+ data.mainTblData[i].value = value;
1468
+ }
1469
+ }
1470
+ }
1471
+
1462
1472
  //项目开发扩展
1463
1473
  var mobileExt;
1464
1474
  try {
@@ -1543,8 +1553,7 @@ var PageHome = function (_React$Component) {
1543
1553
  }
1544
1554
  }
1545
1555
  });
1546
-
1547
- this.props.onChange(data, this.state.itemParam);
1556
+ this.props.onChange(data, itemParam);
1548
1557
  }
1549
1558
 
1550
1559
  //CA验签
@@ -2166,6 +2175,7 @@ var PageHome = function (_React$Component) {
2166
2175
  }, {
2167
2176
  key: 'handleTextChange',
2168
2177
  value: function handleTextChange(item, newValue) {
2178
+ var t = this;
2169
2179
  var inputFormat = item.inputFormat;
2170
2180
  var fieldType = item.fieldType;
2171
2181
  var decimalPlace = parseInt(item.decimalPlace);
@@ -2239,6 +2249,57 @@ var PageHome = function (_React$Component) {
2239
2249
  data = this.editData(name, newValue, data);
2240
2250
  var itemParam = this.state.itemParam;
2241
2251
  itemParam.value = newValue;
2252
+ var code = itemParam.key;
2253
+ var formItem = this.props.allForm.item;
2254
+ var mainTblData = data.mainTblData;
2255
+ for (var i = 0; i < formItem.length; i++) {
2256
+ var item = formItem[i];
2257
+ if (item.dataAttr && item.dataAttr.relatepopuserField && item.dataAttr.relatepopuserField == code) {
2258
+ var relatepopuservalue = item.dataAttr.relatepopuserValue;
2259
+ for (var j = 0; j < mainTblData.length; j++) {
2260
+ var mainTblDataItem = mainTblData[j];
2261
+ if (mainTblDataItem.key == item.itemCode) {
2262
+ if (relatepopuservalue == 'relatedata') {
2263
+ mainTblDataItem.value = newValue;
2264
+ }
2265
+ t.props.reloadItemParam(data.mainTblName + "_" + mainTblDataItem.key, mainTblDataItem.value);
2266
+ }
2267
+ }
2268
+ } else if (item.children && item.children.length > 0) {
2269
+ for (var k = 0; k < item.children.length; k++) {
2270
+ var childItem = item.children[k];
2271
+ if (childItem.dataAttr && childItem.dataAttr.relatepopuserField && childItem.dataAttr.relatepopuserField == code) {
2272
+ var relatepopuservalue = childItem.dataAttr.relatepopuserValue;
2273
+ for (var j = 0; j < mainTblData.length; j++) {
2274
+ var mainTblDataItem = mainTblData[j];
2275
+ if (mainTblDataItem.key == childItem.itemCode) {
2276
+ if (relatepopuservalue == 'relatedata') {
2277
+ mainTblDataItem.value = newValue;
2278
+ }
2279
+
2280
+ // 如果当前Form是在子表中(dataType === 'sub'),需要通过SubForm来刷新
2281
+ // SubForm的reloadSubItemParam方法可以刷新子表所有行的字段
2282
+ if (t.props.dataType === 'sub' && t.props.subTblName === data.mainTblName) {
2283
+ // 尝试通过props获取reloadSubItemParam方法(如果SubForm传递了的话)
2284
+ if (t.props.reloadSubItemParam && typeof t.props.reloadSubItemParam === 'function') {
2285
+ var reloadParams = [];
2286
+ reloadParams.push({
2287
+ key: mainTblDataItem.uniqueName,
2288
+ value: mainTblDataItem.value,
2289
+ index: t.props.keyNo
2290
+ });
2291
+ if (reloadParams.length > 0) {
2292
+ t.props.reloadSubItemParam(reloadParams);
2293
+ }
2294
+ }
2295
+ }
2296
+ }
2297
+ }
2298
+ }
2299
+ }
2300
+ }
2301
+ }
2302
+
2242
2303
  this.setState({
2243
2304
  itemParam: itemParam
2244
2305
  });
@@ -2320,6 +2381,7 @@ var PageHome = function (_React$Component) {
2320
2381
  }, {
2321
2382
  key: 'handleTextAreaChange',
2322
2383
  value: function handleTextAreaChange(name, newValue) {
2384
+ var t = this;
2323
2385
  var data = this.props.data;
2324
2386
  data = this.editData(name, newValue, data);
2325
2387
  var itemParam = this.state.itemParam;
@@ -2374,6 +2436,58 @@ var PageHome = function (_React$Component) {
2374
2436
  }
2375
2437
  }
2376
2438
  itemParam.value = newValue;
2439
+ var code = itemParam.key;
2440
+ var formItem = this.props.allForm.item;
2441
+ var mainTblData = data.mainTblData;
2442
+ for (var i = 0; i < formItem.length; i++) {
2443
+ var item = formItem[i];
2444
+ if (item.dataAttr && item.dataAttr.relatepopuserField && item.dataAttr.relatepopuserField == code) {
2445
+ var relatepopuservalue = item.dataAttr.relatepopuserValue;
2446
+ for (var j = 0; j < mainTblData.length; j++) {
2447
+ var mainTblDataItem = mainTblData[j];
2448
+ if (mainTblDataItem.key == item.itemCode) {
2449
+ //赋值
2450
+ if (relatepopuservalue == 'relatedata') {
2451
+ mainTblDataItem.value = newValue;
2452
+ }
2453
+ t.props.reloadItemParam(data.mainTblName + "_" + mainTblDataItem.key, mainTblDataItem.value);
2454
+ }
2455
+ }
2456
+ } else if (item.children && item.children.length > 0) {
2457
+ for (var k = 0; k < item.children.length; k++) {
2458
+ var childItem = item.children[k];
2459
+ if (childItem.dataAttr && childItem.dataAttr.relatepopuserField && childItem.dataAttr.relatepopuserField == code) {
2460
+ var relatepopuservalue = childItem.dataAttr.relatepopuserValue;
2461
+ for (var j = 0; j < mainTblData.length; j++) {
2462
+ var mainTblDataItem = mainTblData[j];
2463
+ if (mainTblDataItem.key == childItem.itemCode) {
2464
+ if (relatepopuservalue == 'relatedata') {
2465
+ mainTblDataItem.value = newValue;
2466
+ }
2467
+
2468
+ // 如果当前Form是在子表中(dataType === 'sub'),需要通过SubForm来刷新
2469
+ // SubForm的reloadSubItemParam方法可以刷新子表所有行的字段
2470
+ if (t.props.dataType === 'sub' && t.props.subTblName === data.mainTblName) {
2471
+ // 尝试通过props获取reloadSubItemParam方法(如果SubForm传递了的话)
2472
+ if (t.props.reloadSubItemParam && typeof t.props.reloadSubItemParam === 'function') {
2473
+ var reloadParams = [];
2474
+ reloadParams.push({
2475
+ key: mainTblDataItem.uniqueName,
2476
+ value: mainTblDataItem.value,
2477
+ index: t.props.keyNo
2478
+ });
2479
+ if (reloadParams.length > 0) {
2480
+ t.props.reloadSubItemParam(reloadParams);
2481
+ }
2482
+ }
2483
+ }
2484
+ }
2485
+ }
2486
+ }
2487
+ }
2488
+ }
2489
+ }
2490
+
2377
2491
  this.setState({
2378
2492
  itemParam: itemParam
2379
2493
  });
@@ -2448,6 +2562,22 @@ var PageHome = function (_React$Component) {
2448
2562
  this.props.onChange(data, itemParam);
2449
2563
  }
2450
2564
  }
2565
+ }, {
2566
+ key: 'getWeekdaysByDate',
2567
+ value: function getWeekdaysByDate(date) {
2568
+ var dateObj = new Date(date);
2569
+ // 验证日期是否有效
2570
+ if (isNaN(dateObj.getTime())) {
2571
+ // EZUI.util.msgbox("无效的日期格式", 1, 1000);
2572
+ return "";
2573
+ }
2574
+ // 获取星期几 (0=周日, 1=周一, ..., 6=周六)
2575
+ var dayIndex = dateObj.getDay();
2576
+
2577
+ // 中文星期数组
2578
+ var weekdays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
2579
+ return weekdays[dayIndex];
2580
+ }
2451
2581
 
2452
2582
  //时间
2453
2583
 
@@ -2455,6 +2585,7 @@ var PageHome = function (_React$Component) {
2455
2585
  key: 'handleChangeDate',
2456
2586
  value: function handleChangeDate(code, value) {
2457
2587
  console.log("handleChangeDate===" + JSON.stringify(value));
2588
+ var t = this;
2458
2589
  var data = this.props.data;
2459
2590
  var itemParam = this.state.itemParam;
2460
2591
  var dateFormat = itemParam.dateFormat;
@@ -2474,6 +2605,63 @@ var PageHome = function (_React$Component) {
2474
2605
  }
2475
2606
 
2476
2607
  itemParam.value = value;
2608
+
2609
+ var formItem = this.props.allForm.item;
2610
+ var mainTblData = data.mainTblData;
2611
+ for (var i = 0; i < formItem.length; i++) {
2612
+ var item = formItem[i];
2613
+ if (item.dataAttr && item.dataAttr.relatepopuserField && item.dataAttr.relatepopuserField == code) {
2614
+ var relatepopuservalue = item.dataAttr.relatepopuserValue;
2615
+ for (var j = 0; j < mainTblData.length; j++) {
2616
+ var mainTblDataItem = mainTblData[j];
2617
+ if (mainTblDataItem.key == item.itemCode) {
2618
+ if (relatepopuservalue == 'relatedata') {
2619
+ mainTblDataItem.value = this.dateFormat(value.value, dateFormat);
2620
+ }
2621
+ //星期几
2622
+ else if (relatepopuservalue == 'relateweek') {
2623
+ mainTblDataItem.value = this.getWeekdaysByDate(value.value);
2624
+ }
2625
+ this.props.reloadItemParam(data.mainTblName + "_" + mainTblDataItem.key, mainTblDataItem.value);
2626
+ }
2627
+ }
2628
+ } else if (item.children && item.children.length > 0) {
2629
+ for (var k = 0; k < item.children.length; k++) {
2630
+ var childItem = item.children[k];
2631
+ if (childItem.dataAttr && childItem.dataAttr.relatepopuserField && childItem.dataAttr.relatepopuserField == code) {
2632
+ var relatepopuservalue = childItem.dataAttr.relatepopuserValue;
2633
+ for (var j = 0; j < mainTblData.length; j++) {
2634
+ var mainTblDataItem = mainTblData[j];
2635
+ if (mainTblDataItem.key == childItem.itemCode) {
2636
+ if (relatepopuservalue == 'relatedata') {
2637
+ mainTblDataItem.value = this.dateFormat(value.value, dateFormat);
2638
+ } else if (relatepopuservalue == 'relateweek') {
2639
+ mainTblDataItem.value = this.getWeekdaysByDate(value.value);
2640
+ }
2641
+
2642
+ // 如果当前Form是在子表中(dataType === 'sub'),需要通过SubForm来刷新
2643
+ // SubForm的reloadSubItemParam方法可以刷新子表所有行的字段
2644
+ if (t.props.dataType === 'sub' && t.props.subTblName === data.mainTblName) {
2645
+ // 尝试通过props获取reloadSubItemParam方法(如果SubForm传递了的话)
2646
+ if (t.props.reloadSubItemParam && typeof t.props.reloadSubItemParam === 'function') {
2647
+ var reloadParams = [];
2648
+ reloadParams.push({
2649
+ key: mainTblDataItem.uniqueName,
2650
+ value: mainTblDataItem.value,
2651
+ index: t.props.keyNo
2652
+ });
2653
+ if (reloadParams.length > 0) {
2654
+ t.props.reloadSubItemParam(reloadParams);
2655
+ }
2656
+ }
2657
+ }
2658
+ }
2659
+ }
2660
+ }
2661
+ }
2662
+ }
2663
+ }
2664
+
2477
2665
  this.setState({
2478
2666
  itemParam: itemParam
2479
2667
  });
@@ -246,7 +246,7 @@ var PageHome = function (_React$Component) {
246
246
  permissionCode = 'start';
247
247
  setPageTitle("新建");
248
248
  }
249
- //子流程打开
249
+ //1子流程打开 2再次发起
250
250
  if (isSub != '') {
251
251
  editType = 'readd';
252
252
  permissionCode = 'start';
@@ -751,7 +751,7 @@ var PageHome = function (_React$Component) {
751
751
  } else {
752
752
  t.loadPage(param);
753
753
  }
754
- if (isSub != '') {
754
+ if (isSub == '1') {
755
755
  t.insertBatchRelation(t.state.processInstanceId, isSub, t.state.activityId, '');
756
756
  }
757
757
  } else {
@@ -4756,7 +4756,7 @@ var PageHome = function (_React$Component) {
4756
4756
  if (typeof mobileExt !== 'undefined' && typeof mobileExt["operateCallBack"] === "function") {
4757
4757
  mobileExt["operateCallBack"]({ type: 5, dataId: dataId, isBatch: 0 }, t.state);
4758
4758
  }
4759
- if (isSub != '') {
4759
+ if (isSub == '1') {
4760
4760
  backPage(2);
4761
4761
  }
4762
4762
  if (isPush == '1') {
@@ -5053,7 +5053,7 @@ var PageHome = function (_React$Component) {
5053
5053
  t.handleSubmit(1);
5054
5054
  });
5055
5055
  } else {
5056
- if (isSub != '') {
5056
+ if (isSub == '1') {
5057
5057
  backPage(2);
5058
5058
  }
5059
5059
  if (isPush == '1') {
@@ -5107,17 +5107,19 @@ var PageHome = function (_React$Component) {
5107
5107
  key: 'commentSignCA',
5108
5108
  value: function commentSignCA(commentbizSn, comment) {
5109
5109
  console.log("commentbizSn==" + commentbizSn);
5110
- if (comment && comment != "") {
5111
- _db2.default.FlowApproval.signCA({
5112
- bizSn: commentbizSn,
5113
- relationId: getLoginUserInfo().mobile,
5114
- msg: comment,
5115
- isComment: '1',
5116
- fileName: getLoginUserInfo().mobile
5117
- }).then(function (content) {}).catch(function (error) {
5118
- console.log(error);
5119
- });
5120
- }
5110
+ // if(comment && comment!=""){
5111
+ // DB.FlowApproval.signCA({
5112
+ // bizSn: commentbizSn,
5113
+ // relationId: getLoginUserInfo().mobile,
5114
+ // msg: comment,
5115
+ // isComment:'1',
5116
+ // fileName:getLoginUserInfo().mobile,
5117
+ // }).then((content) => {
5118
+
5119
+ // }).catch((error) => {
5120
+ // console.log(error);
5121
+ // });
5122
+ // }
5121
5123
  }
5122
5124
  //上海CA检查是否免密
5123
5125
 
@@ -45,6 +45,14 @@ var _Filter = require('saltui/lib/Filter');
45
45
 
46
46
  var _Filter2 = _interopRequireDefault(_Filter);
47
47
 
48
+ var _ActionSheet = require('saltui/lib/ActionSheet');
49
+
50
+ var _ActionSheet2 = _interopRequireDefault(_ActionSheet);
51
+
52
+ var _Dialog = require('saltui/lib/Dialog');
53
+
54
+ var _Dialog2 = _interopRequireDefault(_Dialog);
55
+
48
56
  var _AngleRight = require('salt-icon/lib/AngleRight');
49
57
 
50
58
  var _AngleRight2 = _interopRequireDefault(_AngleRight);
@@ -94,93 +102,246 @@ var ListItem = function (_React$Component) {
94
102
  _createClass(ListItem, [{
95
103
  key: 'clickDetail',
96
104
  value: function clickDetail(event) {
97
- if (this.props.isBatch) {
98
- //批量状态
99
- var checkDiv = $(event.currentTarget).find(".t-checkbox-field-icon-list");
100
- if (checkDiv.hasClass("un-checked")) {
101
- //判断是否未选中
102
- checkDiv.removeClass("un-checked");
103
- checkDiv.addClass("checked");
104
- } else {
105
- checkDiv.removeClass("checked");
106
- checkDiv.addClass("un-checked");
107
- }
105
+ var _this2 = this;
106
+
107
+ //我的流程
108
+ if (this.props.type == '4') {
109
+ var t = this;
110
+ this.setState({
111
+ timeOutEvent: setTimeout(function () {
112
+ _ActionSheet2.default.show({
113
+ options: ['详情', '再次发送'],
114
+ destructiveButtonIndex: 2,
115
+ message: '',
116
+ maskClosable: true
117
+ }, function (index) {
118
+ var itemInfo = _this2.props.data;
119
+ console.log(itemInfo);
120
+ var param_processKey = itemInfo.processKey; // 流程类型code
121
+ var param_formKey = itemInfo.formKey; // 表单id
122
+ var param_businessKey = itemInfo.businessKey; // 表单数据id;
123
+ var param_startUserId = itemInfo.startUserId; // 流程发起人id
124
+ var param_list_type = _this2.props.type; // 列表类型 待办-0,待阅-1,
125
+ var processName = itemInfo.processName; // 流程名称
126
+ var module = itemInfo.module; // 流程名称
127
+ var type = _this2.props.fromType; //self:本应用,all:全模块
128
+ var projectPath = _this2.props.projectPath; //项目路径
129
+
130
+ var taskId = '';
131
+ var processInstanceId = itemInfo.processInstanceId;
132
+ if (index == 0) {
133
+ if (param_list_type == '2') {
134
+ taskId = itemInfo.taskId;
135
+ } else {
136
+ taskId = itemInfo.id;
137
+ }
138
+ var loginUserId = getLoginUserInfo().userId;
139
+ if (type == "self") {
140
+ var url = "process/processDetails/" + taskId + "/" + param_formKey + "/" + param_businessKey + "/" + param_list_type + "/0/" + processInstanceId + "/" + module + "/" + loginUserId;
141
+ if (searchVal != '') {
142
+ url += "/" + searchVal;
143
+ }
144
+ decodeURI(url);
145
+ location.hash = url;
146
+ } else {
147
+ isPageHide = true;
148
+ var fullUrl = window.location.href;
149
+ fullUrl = fullUrl.replace(/clientType/g, "");
150
+ fullUrl = fullUrl.replace(/thirdMenuType/g, "");
151
+ fullUrl = fullUrl.replace(/clientAppType/g, "");
152
+ var mobilePath = module;
153
+ //projectPath = modules/mobileoffice
154
+ // 预算模块跳转特殊处理
155
+ if (module == 'bud_cost') {
156
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetcost/").split('?_')[0].split('/approval/all')[0];
157
+ } else if (module == 'bud_project') {
158
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetproject/").split('?_')[0].split('/approval/all')[0];
159
+ } else if (module == 'hoa_topic' || module == 'hoa_funds' || module == 'hoa_achievements') {
160
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/ky/ky/").split('?_')[0].split('/approval/all')[0];
161
+ } else if (module.indexOf("dj_") != '-1' || module.indexOf("jj_") != '-1' || module.indexOf("zdh_") != '-1' || module.indexOf("gh_") != '-1') {
162
+ fullUrl = fullUrl.split('?_')[0].split('/approval/all')[0];
163
+ } else if (module.indexOf("hoa_") != '-1') {
164
+ var category = module.split("_")[0];
165
+ mobilePath = module.substring(module.indexOf("_") + 1);
166
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/" + category + "/" + mobilePath + "/").split('?_')[0].split('/approval/all')[0];
167
+ } else {
168
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/modules/" + mobilePath + "/").split('?_')[0].split('/approval/all')[0];
169
+ }
170
+ var _url = "process/processDetails/" + taskId + "/" + param_formKey + "/" + param_businessKey + "/" + param_list_type + "/0/" + processInstanceId + "/" + module + "/" + loginUserId;
171
+ _url = fullUrl + '/' + _url;
172
+ decodeURI(_url);
173
+ location.href = _url;
174
+ }
175
+ } else if (index == 1) {
176
+ var param = {
177
+ code: param_processKey
178
+ };
179
+ _db2.default.FlowModuleAPI.startFlowTest(param).then(function (content) {
180
+ var canStart = content.canStart;
181
+ var reminder = content.reminder;
182
+ if (canStart == "1") {
183
+ _db2.default.FlowModuleAPI.startProcess(param).then(function (content) {
184
+ var openTaskId = content.openTaskId;
185
+ var processInstanceId = content.processInstanceId;
186
+ var list = content.list;
187
+ if (openTaskId != null && openTaskId != '') {
188
+ if (list != null && list != '' && list.length > 0) {
189
+ for (var j = 0; j < list.length; j++) {
190
+ if (openTaskId == list[j].id && module == 'approve') {
191
+
192
+ var path = '#/process/processDetails/' + openTaskId + '/' + list[j].formKey + '/' + param_businessKey + '/0/0/' + list[j].processInstanceId + '/approve/' + param_startUserId + '/null/' + '2';
193
+ location.hash = path;
194
+ } else if (openTaskId == list[j].id && module != 'approve') {
195
+ var _fullUrl = window.location.href;
196
+ _fullUrl = _fullUrl.replace(/clientType/g, "");
197
+ _fullUrl = _fullUrl.replace(/thirdMenuType/g, "");
198
+ _fullUrl = _fullUrl.replace(/clientAppType/g, "");
199
+ var projectPath = 'modules/approve';
200
+ var mobilePath = '';
201
+ // 预算模块跳转特殊处理
202
+ if (module == 'bud_cost') {
203
+ _fullUrl = _fullUrl.replace("/" + projectPath + "/", "/budget/budgetcost/").split('?_')[0].split('#/')[0];
204
+ } else if (module == 'bud_project') {
205
+ _fullUrl = _fullUrl.replace("/" + projectPath + "/", "/budget/budgetproject/").split('?_')[0].split('#/')[0];
206
+ } else if (module == 'hoa_topic' || module == 'hoa_funds' || module == 'hoa_achievements') {
207
+ _fullUrl = _fullUrl.replace("/" + projectPath + "/", "/ky/ky/").split('?_')[0].split('#/')[0];
208
+ } else if (module.indexOf("dj_") != '-1' || module.indexOf("jj_") != '-1' || module.indexOf("zdh_") != '-1' || module.indexOf("gh_") != '-1') {
209
+ _fullUrl = _fullUrl.split('?_')[0].split('#/')[0];
210
+ } else if (module.indexOf("hoa_") != '-1') {
211
+ var category = module.split("_")[0];
212
+ mobilePath = module.substring(module.indexOf("_") + 1);
213
+ _fullUrl = _fullUrl.replace("/" + projectPath + "/", "/" + category + "/" + mobilePath + "/").split('?_')[0].split('#/')[0];
214
+ } else {
215
+ _fullUrl = _fullUrl.replace("/" + projectPath + "/", "/modules/" + module + "/").split('?_')[0].split('#/')[0];
216
+ }
217
+ var _url2 = "process/processDetails/" + openTaskId + "/" + list[j].formKey + "/" + param_businessKey + "/0/0/" + list[j].processInstanceId + "/" + module + "/" + param_startUserId + "/null/" + "2";
218
+ _url2 = _fullUrl + '#/' + _url2;
219
+ decodeURI(_url2);
220
+ location.href = _url2;
221
+ }
222
+ }
223
+ }
224
+ }
225
+ }).catch(function (error) {});
226
+ } else {
227
+ _Dialog2.default.confirm({
228
+ locale: 'zh_CN',
229
+ title: '提示',
230
+ content: reminder,
231
+ onConfirm: function onConfirm() {
232
+ _db2.default.FlowModuleAPI.startProcess(param).then(function (content) {
233
+ var openTaskId = content.openTaskId;
234
+ var processInstanceId = content.processInstanceId;
235
+ var list = content.list;
236
+ if (openTaskId != null && openTaskId != '') {
237
+ if (list != null && list != '' && list.length > 0) {
238
+ for (var j = 0; j < list.length; j++) {
239
+ if (openTaskId == list[j].id && module == 'approve') {
240
+
241
+ var path = '#/process/processDetails/' + openTaskId + '/' + list[j].formKey + '/' + param_businessKey + '/0/0/' + list[j].processInstanceId + '/approve/' + param_startUserId + '/null/' + '2';;
242
+ location.hash = path;
243
+ }
244
+ }
245
+ }
246
+ } else {
247
+ if (list != null && list != '' && list.length > 0) {
248
+ var assigneeName = '';
249
+ for (var i = 0; i < list.length; i++) {
250
+ if (list[i].assigneeName != null && list[i].assigneeName != '') {
251
+ assigneeName = assigneeName + ',' + list[i].assigneeName;
252
+ }
253
+ }
254
+ _Toast2.default.show({
255
+ type: 'success',
256
+ content: "流程已发送给" + assigneeName.substring(1)
257
+ });
258
+ }
259
+ }
260
+ }).catch(function (error) {});
261
+ },
262
+ onCancel: function onCancel() {
263
+ console.log('confirm cancel');
264
+ }
265
+ });
266
+ }
267
+ }).catch(function (error) {});
268
+ }
269
+ });
270
+ }, 1)
271
+ });
108
272
  } else {
109
- if (this.props.ableClick) {
110
- var itemInfo = this.props.data;
111
- console.log(itemInfo);
112
- var param_processKey = itemInfo.processKey; // 流程类型code
113
- var param_formKey = itemInfo.formKey; // 表单id
114
- var param_businessKey = itemInfo.businessKey; // 表单数据id;
115
- var param_startUserId = itemInfo.startUserId; // 流程发起人id
116
- var param_list_type = this.props.type; // 列表类型 待办-0,待阅-1,
117
- var processName = itemInfo.processName; // 流程名称
118
- var module = itemInfo.module; // 流程名称
119
- var type = this.props.fromType; //self:本应用,all:全模块
120
- var projectPath = this.props.projectPath; //项目路径
121
-
122
- var taskId = '';
123
- var processInstanceId = itemInfo.processInstanceId;
124
- if (param_list_type == '2') {
125
- taskId = itemInfo.taskId;
273
+ if (this.props.isBatch) {
274
+ //批量状态
275
+ var checkDiv = $(event.currentTarget).find(".t-checkbox-field-icon-list");
276
+ if (checkDiv.hasClass("un-checked")) {
277
+ //判断是否未选中
278
+ checkDiv.removeClass("un-checked");
279
+ checkDiv.addClass("checked");
126
280
  } else {
127
- taskId = itemInfo.id;
281
+ checkDiv.removeClass("checked");
282
+ checkDiv.addClass("un-checked");
128
283
  }
129
- var loginUserId = getLoginUserInfo().userId;
130
- // location.hash = 'approval/approval-details/detail-servlet/' + param_list_type + '/1/' + param_processKey + '/' + param_formKey + '/' +param_businessKey +
131
- // '/' + param_startUserId;
132
- // alert(searchVal);
133
- if (type == "self") {
134
- var url = "process/processDetails/" + taskId + "/" + param_formKey + "/" + param_businessKey + "/" + param_list_type + "/0/" + processInstanceId + "/" + module + "/" + loginUserId;
135
- if (searchVal != '') {
136
- url += "/" + searchVal;
284
+ } else {
285
+ if (this.props.ableClick) {
286
+ var itemInfo = this.props.data;
287
+ console.log(itemInfo);
288
+ var param_processKey = itemInfo.processKey; // 流程类型code
289
+ var param_formKey = itemInfo.formKey; // 表单id
290
+ var param_businessKey = itemInfo.businessKey; // 表单数据id;
291
+ var param_startUserId = itemInfo.startUserId; // 流程发起人id
292
+ var param_list_type = this.props.type; // 列表类型 待办-0,待阅-1,
293
+ var processName = itemInfo.processName; // 流程名称
294
+ var module = itemInfo.module; // 流程名称
295
+ var type = this.props.fromType; //self:本应用,all:全模块
296
+ var projectPath = this.props.projectPath; //项目路径
297
+
298
+ var taskId = '';
299
+ var processInstanceId = itemInfo.processInstanceId;
300
+ if (param_list_type == '2') {
301
+ taskId = itemInfo.taskId;
302
+ } else {
303
+ taskId = itemInfo.id;
137
304
  }
138
- decodeURI(url);
139
- location.hash = url;
140
- } else {
141
- isPageHide = true;
142
- var fullUrl = window.location.href;
143
- fullUrl = fullUrl.replace(/clientType/g, "");
144
- fullUrl = fullUrl.replace(/thirdMenuType/g, "");
145
- fullUrl = fullUrl.replace(/clientAppType/g, "");
146
- var mobilePath = module;
147
- //projectPath = modules/mobileoffice
148
- // 预算模块跳转特殊处理
149
- if (module == 'bud_cost') {
150
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetcost/").split('?_')[0].split('/approval/all')[0];
151
- } else if (module == 'bud_project') {
152
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetproject/").split('?_')[0].split('/approval/all')[0];
153
- } else if (module == 'hoa_topic' || module == 'hoa_funds' || module == 'hoa_achievements') {
154
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/ky/ky/").split('?_')[0].split('/approval/all')[0];
155
- } else if (module.indexOf("dj_") != '-1' || module.indexOf("jj_") != '-1' || module.indexOf("zdh_") != '-1' || module.indexOf("gh_") != '-1') {
156
- fullUrl = fullUrl.split('?_')[0].split('/approval/all')[0];
157
- } else if (module.indexOf("hoa_") != '-1') {
158
- var category = module.split("_")[0];
159
- mobilePath = module.substring(module.indexOf("_") + 1);
160
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/" + category + "/" + mobilePath + "/").split('?_')[0].split('/approval/all')[0];
305
+ var loginUserId = getLoginUserInfo().userId;
306
+ if (type == "self") {
307
+ var url = "process/processDetails/" + taskId + "/" + param_formKey + "/" + param_businessKey + "/" + param_list_type + "/0/" + processInstanceId + "/" + module + "/" + loginUserId;
308
+ if (searchVal != '') {
309
+ url += "/" + searchVal;
310
+ }
311
+ decodeURI(url);
312
+ location.hash = url;
161
313
  } else {
162
- fullUrl = fullUrl.replace("/" + projectPath + "/", "/modules/" + mobilePath + "/").split('?_')[0].split('/approval/all')[0];
314
+ isPageHide = true;
315
+ var fullUrl = window.location.href;
316
+ fullUrl = fullUrl.replace(/clientType/g, "");
317
+ fullUrl = fullUrl.replace(/thirdMenuType/g, "");
318
+ fullUrl = fullUrl.replace(/clientAppType/g, "");
319
+ var mobilePath = module;
320
+ //projectPath = modules/mobileoffice
321
+ // 预算模块跳转特殊处理
322
+ if (module == 'bud_cost') {
323
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetcost/").split('?_')[0].split('/approval/all')[0];
324
+ } else if (module == 'bud_project') {
325
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/budget/budgetproject/").split('?_')[0].split('/approval/all')[0];
326
+ } else if (module == 'hoa_topic' || module == 'hoa_funds' || module == 'hoa_achievements') {
327
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/ky/ky/").split('?_')[0].split('/approval/all')[0];
328
+ } else if (module.indexOf("dj_") != '-1' || module.indexOf("jj_") != '-1' || module.indexOf("zdh_") != '-1' || module.indexOf("gh_") != '-1') {
329
+ fullUrl = fullUrl.split('?_')[0].split('/approval/all')[0];
330
+ } else if (module.indexOf("hoa_") != '-1') {
331
+ var category = module.split("_")[0];
332
+ mobilePath = module.substring(module.indexOf("_") + 1);
333
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/" + category + "/" + mobilePath + "/").split('?_')[0].split('/approval/all')[0];
334
+ } else {
335
+ fullUrl = fullUrl.replace("/" + projectPath + "/", "/modules/" + mobilePath + "/").split('?_')[0].split('/approval/all')[0];
336
+ }
337
+ var _url3 = "process/processDetails/" + taskId + "/" + param_formKey + "/" + param_businessKey + "/" + param_list_type + "/0/" + processInstanceId + "/" + module + "/" + loginUserId;
338
+ _url3 = fullUrl + '/' + _url3;
339
+ decodeURI(_url3);
340
+ location.href = _url3;
163
341
  }
164
- //alert(fullUrl);
165
- var _url = "process/processDetails/" + taskId + "/" + param_formKey + "/" + param_businessKey + "/" + param_list_type + "/0/" + processInstanceId + "/" + module + "/" + loginUserId;
166
- _url = fullUrl + '/' + _url;
167
- decodeURI(_url);
168
- location.href = _url;
342
+ } else {
343
+ this.props.updateAbleClick(true);
169
344
  }
170
-
171
- // window.salt.router.push({
172
- // id: 'detailPage',
173
- // url: url,
174
- // anim: 1,
175
- // needPost: true,
176
- // param: {
177
- // title: processName,
178
- // }
179
- // }).then().catch((e) => {
180
- // // alert(e);
181
- // });
182
- } else {
183
- this.props.updateAbleClick(true);
184
345
  }
185
346
  }
186
347
  }
@@ -465,7 +626,7 @@ var PageHome = function (_React$Component2) {
465
626
 
466
627
  document.addEventListener('resume', function (e) {});
467
628
 
468
- var _this2 = _possibleConstructorReturn(this, (PageHome.__proto__ || Object.getPrototypeOf(PageHome)).call(this, props));
629
+ var _this3 = _possibleConstructorReturn(this, (PageHome.__proto__ || Object.getPrototypeOf(PageHome)).call(this, props));
469
630
 
470
631
  setPageTitle('办理');
471
632
  // 禁用iOS弹性事件
@@ -514,7 +675,7 @@ var PageHome = function (_React$Component2) {
514
675
  readListUrl = _variables2.default.URLS.transaction.read + "&unified=1&sourceType=unitedapprove&module=" + module + "&category=" + category;
515
676
  myselfListUrl = _variables2.default.URLS.transaction.myself + "&unified=1&sourceType=unitedapprove&module=" + module + "&category=" + category;
516
677
  }
517
- _this2.state = {
678
+ _this3.state = {
518
679
  tabCodes: tabCodes,
519
680
  type: type,
520
681
  activeTabIndex: activeIndex, // 待办-0;待阅-1;已办-2;已阅-3;我的-4
@@ -556,13 +717,13 @@ var PageHome = function (_React$Component2) {
556
717
  category4: [],
557
718
  category: category
558
719
  };
559
- _this2.getTransactionTitleCount(module, "undo,unread", category);
560
- _this2.getCategoryListByModule(module, category);
720
+ _this3.getTransactionTitleCount(module, "undo,unread", category);
721
+ _this3.getCategoryListByModule(module, category);
561
722
  /**
562
723
  * 办理页面搜索框设置项
563
724
  * @type {{locale: string, instantSearch: boolean, hasHistory: boolean, searchDelay: number, onEnter: (()), onExit: (()), onChange: ((p1:*)), onSearch: ((p1?:*))}}
564
725
  */
565
- _this2.searchBarProps = {
726
+ _this3.searchBarProps = {
566
727
  placeholder: "请输入流程标题查询",
567
728
  instantSearch: false,
568
729
  hasHistory: false,
@@ -572,14 +733,14 @@ var PageHome = function (_React$Component2) {
572
733
  onEnter: function onEnter() {
573
734
  console.log('enter');
574
735
  },
575
- onExit: _this2.onExit.bind(_this2),
736
+ onExit: _this3.onExit.bind(_this3),
576
737
  onChange: function onChange(value) {
577
738
  console.log('Typing>>' + value);
578
739
  },
579
- onSearch: _this2.onSearch.bind(_this2)
740
+ onSearch: _this3.onSearch.bind(_this3)
580
741
  };
581
742
 
582
- return _this2;
743
+ return _this3;
583
744
  }
584
745
 
585
746
  _createClass(PageHome, [{
@@ -646,7 +807,7 @@ var PageHome = function (_React$Component2) {
646
807
  }, {
647
808
  key: 'getTransactionTitleCount',
648
809
  value: function getTransactionTitleCount(module, codes, category) {
649
- var _this3 = this;
810
+ var _this4 = this;
650
811
 
651
812
  var t = this;
652
813
  _db2.default.FlowApproval.getApproveCount({
@@ -654,8 +815,8 @@ var PageHome = function (_React$Component2) {
654
815
  codes: codes,
655
816
  category: category
656
817
  }).then(function (content) {
657
- _this3.state.titleCount.undo = content.undo;
658
- _this3.state.titleCount.unread = content.unread;
818
+ _this4.state.titleCount.undo = content.undo;
819
+ _this4.state.titleCount.unread = content.unread;
659
820
  }).catch(function (error) {
660
821
  console.log(error);
661
822
  });
@@ -668,7 +829,7 @@ var PageHome = function (_React$Component2) {
668
829
  }, {
669
830
  key: 'getCategoryListByModule',
670
831
  value: function getCategoryListByModule(module, category) {
671
- var _this4 = this;
832
+ var _this5 = this;
672
833
 
673
834
  var t = this;
674
835
  _db2.default.FlowApproval.getCategoryListByModule({
@@ -676,7 +837,7 @@ var PageHome = function (_React$Component2) {
676
837
  code: category
677
838
  }).then(function (content) {
678
839
  if (content) {
679
- _this4.state.categoryList = content;
840
+ _this5.state.categoryList = content;
680
841
  }
681
842
  }).catch(function (error) {
682
843
  console.log(error);
@@ -1245,7 +1406,7 @@ var PageHome = function (_React$Component2) {
1245
1406
  }, {
1246
1407
  key: 'render',
1247
1408
  value: function render() {
1248
- var _this5 = this;
1409
+ var _this6 = this;
1249
1410
 
1250
1411
  var tabBarStyle = {};
1251
1412
  var winHeightStyle = { height: this.state.winHeight };
@@ -1311,7 +1472,7 @@ var PageHome = function (_React$Component2) {
1311
1472
  items: this.state.categoryList
1312
1473
  }],
1313
1474
  onConfirm: function onConfirm(data) {
1314
- _this5.filterConfirm(data);
1475
+ _this6.filterConfirm(data);
1315
1476
  } }),
1316
1477
  _react2.default.createElement(
1317
1478
  'div',
@@ -1360,7 +1521,7 @@ var PageHome = function (_React$Component2) {
1360
1521
  items: this.state.categoryList
1361
1522
  }],
1362
1523
  onConfirm: function onConfirm(data) {
1363
- _this5.filterConfirm(data);
1524
+ _this6.filterConfirm(data);
1364
1525
  } }),
1365
1526
  _react2.default.createElement(
1366
1527
  'div',
@@ -1404,7 +1565,7 @@ var PageHome = function (_React$Component2) {
1404
1565
  items: this.state.categoryList
1405
1566
  }],
1406
1567
  onConfirm: function onConfirm(data) {
1407
- _this5.filterConfirm(data);
1568
+ _this6.filterConfirm(data);
1408
1569
  } }),
1409
1570
  _react2.default.createElement(
1410
1571
  'div',
@@ -1448,7 +1609,7 @@ var PageHome = function (_React$Component2) {
1448
1609
  items: this.state.categoryList
1449
1610
  }],
1450
1611
  onConfirm: function onConfirm(data) {
1451
- _this5.filterConfirm(data);
1612
+ _this6.filterConfirm(data);
1452
1613
  } }),
1453
1614
  _react2.default.createElement(
1454
1615
  'div',
@@ -1492,7 +1653,7 @@ var PageHome = function (_React$Component2) {
1492
1653
  items: this.state.categoryList
1493
1654
  }],
1494
1655
  onConfirm: function onConfirm(data) {
1495
- _this5.filterConfirm(data);
1656
+ _this6.filterConfirm(data);
1496
1657
  } }),
1497
1658
  _react2.default.createElement(
1498
1659
  'div',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.2.59",
3
+ "version": "2.2.61",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",