fmui-base 2.2.25 → 2.2.27

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.27: 批示意见落款被加签的用户增加标识
7
+ - 2.2.26: 表单组件支持查看发票
6
8
  - 2.2.25: 表单组件支持弹出加签意见
7
9
  - 2.2.24:表单相关对象组件修改
8
10
  - 2.2.23:表单相关对象组件
@@ -262,12 +262,17 @@ var PageHome = function (_React$Component) {
262
262
  var t = this;
263
263
  var returnHtml;
264
264
  if (item.inscriptionShow) {
265
-
265
+ var userName = item.userName;
266
+ //是否加签
267
+ if (item.isAddlots && item.isAddlots == '1' && userName) {
268
+ userName = userName + "(加签)";
269
+ }
266
270
  var userNameHtml = _react2.default.createElement(
267
271
  'span',
268
272
  { className: 't-PR5 userName' },
269
- item.replacename && item.replacename != "" ? item.replacename : item.userName
273
+ item.replacename && item.replacename != "" ? item.replacename : userName
270
274
  );
275
+
271
276
  var dateHtml = _react2.default.createElement(
272
277
  'span',
273
278
  { className: 't-PR5' },
@@ -307,7 +312,7 @@ var PageHome = function (_React$Component) {
307
312
  }
308
313
  }
309
314
  });
310
- var replaceHtml = item.replacename && item.replacename != "" ? "(代" + item.userName + "办理)" : "";
315
+ var replaceHtml = item.replacename && item.replacename != "" ? "(代" + userName + "办理)" : "";
311
316
  return _react2.default.createElement(
312
317
  Box,
313
318
  { className: 'comment-html', style: { marginLeft: "auto", "text-align": "right", width: '100%' } },
package/lib/db/db.js CHANGED
@@ -1118,6 +1118,20 @@ context.create('form', {
1118
1118
  duration: 800
1119
1119
  });
1120
1120
  }
1121
+ },
1122
+ getNoInvoiceList: {
1123
+ url: _variables2.default.URLS.getNoInvoiceList,
1124
+ header: {
1125
+ Authorization: 'Bearer ' + getLoginUserInfo().token
1126
+ },
1127
+ method: 'GET',
1128
+ willFetch: function willFetch() {
1129
+ _Toast2.default.show({
1130
+ content: _react2.default.createElement(_loading2.default, null),
1131
+ hasMask: true,
1132
+ duration: 800
1133
+ });
1134
+ }
1121
1135
  }
1122
1136
  });
1123
1137
 
@@ -66,7 +66,7 @@ exports.default = {
66
66
  getRemindBadgeCount: urlPrefix + 'getRemindBadgeCount' + '?', //分类统计小红点
67
67
  queryProcessForm: urlPrefix + 'getMobileForm' + '?', //获取流程表单
68
68
  getRelaFieldsMap: formUrlPrefix + 'relafield/getRelaFieldsMap' + '?', //获取关联表单字段
69
-
69
+ getNoInvoiceList: formUrlPrefix + 'form/invoice/getNoInvoiceList' + '?', //获取未开票列表
70
70
  getComponentInfoList: urlBasicPrefix + 'mobilehall/mobileoffice/getComponentInfoList' + '?', //获取关联表单字段
71
71
 
72
72
  insertBatchRelation: approveUrlPrefix + 'insertBatchRelation' + '?', // 关联流程
package/lib/form/form.js CHANGED
@@ -93,6 +93,10 @@ var _relaObj = require('../rela_obj/relaObj');
93
93
 
94
94
  var _relaObj2 = _interopRequireDefault(_relaObj);
95
95
 
96
+ var _invoice = require('../invoice/invoice');
97
+
98
+ var _invoice2 = _interopRequireDefault(_invoice);
99
+
96
100
  require('./form.less');
97
101
 
98
102
  var _db = require('../db/db');
@@ -1140,7 +1144,7 @@ var PageHome = function (_React$Component) {
1140
1144
  if (form.dataAttr) {
1141
1145
  dataSrc = form.dataAttr.dataSrc;
1142
1146
  }
1143
- if (popCode == '' && (!dataSrc || dataSrc != "7")) {
1147
+ if (popCode == '' && (!dataSrc || dataSrc != "7" && dataSrc != "9")) {
1144
1148
  //如果弹出选择的编码为空
1145
1149
  _Toast2.default.show({
1146
1150
  type: 'error',
@@ -1149,6 +1153,8 @@ var PageHome = function (_React$Component) {
1149
1153
  return false;
1150
1154
  } else if (dataSrc == "7") {
1151
1155
  itemParam.itemType = "";
1156
+ } else if (dataSrc == "9") {
1157
+ itemParam.itemType = "invoice";
1152
1158
  }
1153
1159
  itemParam.chooseWay = chooseWay;
1154
1160
  itemParam.popCode = popCode;
@@ -3869,6 +3875,15 @@ var PageHome = function (_React$Component) {
3869
3875
  relaobjType: t.state.itemParam.relaobjType
3870
3876
  }),
3871
3877
  t.state.itemParam.isVerifySing == "1" ? _react2.default.createElement('i', { className: 'iconfont icon-checked t-PT10', style: { color: 'green' } }) : t.state.itemParam.isVerifySing == "2" ? _react2.default.createElement('i', { className: 'iconfont icon-close t-PT10', style: { color: 'red' } }) : ""
3878
+ ) : this.state.itemParam.itemType == 'invoice' ? _react2.default.createElement(
3879
+ 'div',
3880
+ { className: t.state.itemParam.fieldId, style: t.state.itemParam.formStyleObj.contentStyle },
3881
+ _react2.default.createElement(_invoice2.default, {
3882
+ id: t.state.itemParam.value ? t.state.itemParam.value : "",
3883
+ label: t.state.itemParam.title,
3884
+ required: t.state.itemParam.required
3885
+ }),
3886
+ t.state.itemParam.isVerifySing == "1" ? _react2.default.createElement('i', { className: 'iconfont icon-checked t-PT10', style: { color: 'green' } }) : t.state.itemParam.isVerifySing == "2" ? _react2.default.createElement('i', { className: 'iconfont icon-close t-PT10', style: { color: 'red' } }) : ""
3872
3887
  ) : _react2.default.createElement('div', null)
3873
3888
  );
3874
3889
  }
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _invoice = require('./invoice');
8
+
9
+ Object.defineProperty(exports, 'default', {
10
+ enumerable: true,
11
+ get: function get() {
12
+ return _interopRequireDefault(_invoice).default;
13
+ }
14
+ });
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -0,0 +1,177 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = undefined;
7
+
8
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
9
+
10
+ var _react = require('react');
11
+
12
+ var _react2 = _interopRequireDefault(_react);
13
+
14
+ var _Group = require('saltui/lib/Group');
15
+
16
+ var _Group2 = _interopRequireDefault(_Group);
17
+
18
+ var _Field = require('saltui/lib/Field');
19
+
20
+ var _Field2 = _interopRequireDefault(_Field);
21
+
22
+ var _upload = require('../upload/upload');
23
+
24
+ var _upload2 = _interopRequireDefault(_upload);
25
+
26
+ var _Boxs = require('saltui/lib/Boxs');
27
+
28
+ var _Boxs2 = _interopRequireDefault(_Boxs);
29
+
30
+ var _db = require('../db/db');
31
+
32
+ var _db2 = _interopRequireDefault(_db);
33
+
34
+ require('./invoice.less');
35
+
36
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37
+
38
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
39
+
40
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
41
+
42
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
43
+
44
+ var HBox = _Boxs2.default.HBox,
45
+ Box = _Boxs2.default.Box,
46
+ VBox = _Boxs2.default.VBox;
47
+
48
+ var Invoice = function (_React$Component) {
49
+ _inherits(Invoice, _React$Component);
50
+
51
+ function Invoice(props) {
52
+ _classCallCheck(this, Invoice);
53
+
54
+ // 传入的props参数
55
+ var _this = _possibleConstructorReturn(this, (Invoice.__proto__ || Object.getPrototypeOf(Invoice)).call(this, props));
56
+
57
+ _this.initFn = function (id) {
58
+
59
+ // 初始发票详情数据
60
+ _db2.default.form.getNoInvoiceList({
61
+ invoicedataid: id
62
+ }).then(function (content) {
63
+ _this.setState({
64
+ invoicedata: content
65
+ });
66
+ }).catch(function (error) {
67
+ console.error('获取详情数据失败', error);
68
+ });
69
+ };
70
+
71
+ var invoicedataid = _this.props.id;
72
+ var title = _this.props.label || '发票详情';
73
+ var required = _this.props.required || false;
74
+
75
+ _this.state = {
76
+ invoicedataid: invoicedataid,
77
+ invoicedata: [],
78
+ title: title,
79
+ required: required
80
+ };
81
+
82
+ return _this;
83
+ }
84
+
85
+ _createClass(Invoice, [{
86
+ key: 'componentDidMount',
87
+ value: function componentDidMount() {
88
+ this.initFn(this.state.invoicedataid);
89
+ }
90
+ }, {
91
+ key: 'downloadFile',
92
+
93
+
94
+ // 下载函数
95
+ value: function (_downloadFile) {
96
+ function downloadFile(_x) {
97
+ return _downloadFile.apply(this, arguments);
98
+ }
99
+
100
+ downloadFile.toString = function () {
101
+ return _downloadFile.toString();
102
+ };
103
+
104
+ return downloadFile;
105
+ }(function (file) {
106
+ downloadFile(file.relaObjId);
107
+ })
108
+ }, {
109
+ key: 'render',
110
+ value: function render() {
111
+ return _react2.default.createElement(
112
+ _Group2.default.List,
113
+ { borderTopNone: true },
114
+ _react2.default.createElement(
115
+ _Field2.default,
116
+ { required: this.state.required, label: this.state.title, layout: 'h', multiLine: true },
117
+ _react2.default.createElement(
118
+ 'div',
119
+ { className: this.state.invoicedataid && this.state.invoicedataid != '' ? '' : 't-DN' },
120
+ this.state.invoicedata.map(function (item, index) {
121
+ var fileList = [];
122
+ try {
123
+ if (item.invoicefileInfo) {
124
+ fileList = JSON.parse(item.invoicefileInfo);
125
+ }
126
+ } catch (e) {
127
+ console.error('发票附件解析失败', e);
128
+ }
129
+
130
+ return _react2.default.createElement(
131
+ 'div',
132
+ { key: item.id, className: 't-MT2' },
133
+ _react2.default.createElement(
134
+ VBox,
135
+ { className: 'nvoice-filetitle', hAlign: 'start' },
136
+ _react2.default.createElement(
137
+ Box,
138
+ null,
139
+ item.invoicename
140
+ ),
141
+ _react2.default.createElement(
142
+ HBox,
143
+ { vAlign: 'center' },
144
+ _react2.default.createElement(
145
+ Box,
146
+ { className: 'label label-primary' },
147
+ item.invoicetype
148
+ ),
149
+ _react2.default.createElement(
150
+ Box,
151
+ null,
152
+ '\uFFE5',
153
+ item.invoiceamount
154
+ )
155
+ )
156
+ ),
157
+ _react2.default.createElement(_upload2.default, {
158
+ required: false,
159
+ canDel: false,
160
+ canPreview: true,
161
+ canDownload: true,
162
+ initList: fileList,
163
+ dir: 'form_invoice',
164
+ ref: 'upload_invoice'
165
+ })
166
+ );
167
+ })
168
+ )
169
+ )
170
+ );
171
+ }
172
+ }]);
173
+
174
+ return Invoice;
175
+ }(_react2.default.Component);
176
+
177
+ exports.default = Invoice;
File without changes
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _nvoice = require('./nvoice');
8
+
9
+ Object.defineProperty(exports, 'default', {
10
+ enumerable: true,
11
+ get: function get() {
12
+ return _interopRequireDefault(_nvoice).default;
13
+ }
14
+ });
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -0,0 +1,177 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = undefined;
7
+
8
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
9
+
10
+ var _react = require('react');
11
+
12
+ var _react2 = _interopRequireDefault(_react);
13
+
14
+ var _Group = require('saltui/lib/Group');
15
+
16
+ var _Group2 = _interopRequireDefault(_Group);
17
+
18
+ var _Field = require('saltui/lib/Field');
19
+
20
+ var _Field2 = _interopRequireDefault(_Field);
21
+
22
+ var _upload = require('../upload/upload');
23
+
24
+ var _upload2 = _interopRequireDefault(_upload);
25
+
26
+ var _Boxs = require('saltui/lib/Boxs');
27
+
28
+ var _Boxs2 = _interopRequireDefault(_Boxs);
29
+
30
+ var _db = require('../db/db');
31
+
32
+ var _db2 = _interopRequireDefault(_db);
33
+
34
+ require('./nvoice.less');
35
+
36
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37
+
38
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
39
+
40
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
41
+
42
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
43
+
44
+ var HBox = _Boxs2.default.HBox,
45
+ Box = _Boxs2.default.Box,
46
+ VBox = _Boxs2.default.VBox;
47
+
48
+ var Nvoice = function (_React$Component) {
49
+ _inherits(Nvoice, _React$Component);
50
+
51
+ function Nvoice(props) {
52
+ _classCallCheck(this, Nvoice);
53
+
54
+ // 传入的props参数
55
+ var _this = _possibleConstructorReturn(this, (Nvoice.__proto__ || Object.getPrototypeOf(Nvoice)).call(this, props));
56
+
57
+ _this.initFn = function (id) {
58
+
59
+ // 初始发票详情数据
60
+ _db2.default.form.getNoInvoiceList({
61
+ invoicedataid: id
62
+ }).then(function (content) {
63
+ _this.setState({
64
+ invoicedata: content
65
+ });
66
+ }).catch(function (error) {
67
+ console.error('获取详情数据失败', error);
68
+ });
69
+ };
70
+
71
+ var invoicedataid = _this.props.id;
72
+ var title = _this.props.label || '发票详情';
73
+ var required = _this.props.required || false;
74
+
75
+ _this.state = {
76
+ invoicedataid: invoicedataid,
77
+ invoicedata: [],
78
+ title: title,
79
+ required: required
80
+ };
81
+
82
+ return _this;
83
+ }
84
+
85
+ _createClass(Nvoice, [{
86
+ key: 'componentDidMount',
87
+ value: function componentDidMount() {
88
+ this.initFn(this.state.invoicedataid);
89
+ }
90
+ }, {
91
+ key: 'downloadFile',
92
+
93
+
94
+ // 下载函数
95
+ value: function (_downloadFile) {
96
+ function downloadFile(_x) {
97
+ return _downloadFile.apply(this, arguments);
98
+ }
99
+
100
+ downloadFile.toString = function () {
101
+ return _downloadFile.toString();
102
+ };
103
+
104
+ return downloadFile;
105
+ }(function (file) {
106
+ downloadFile(file.relaObjId);
107
+ })
108
+ }, {
109
+ key: 'render',
110
+ value: function render() {
111
+ return _react2.default.createElement(
112
+ _Group2.default.List,
113
+ { borderTopNone: true },
114
+ _react2.default.createElement(
115
+ _Field2.default,
116
+ { required: this.state.required, label: this.state.title, layout: 'h', multiLine: true },
117
+ _react2.default.createElement(
118
+ 'div',
119
+ null,
120
+ this.state.invoicedata.map(function (item, index) {
121
+ var fileList = [];
122
+ try {
123
+ if (item.invoicefileInfo) {
124
+ fileList = JSON.parse(item.invoicefileInfo);
125
+ }
126
+ } catch (e) {
127
+ console.error('发票附件解析失败', e);
128
+ }
129
+
130
+ return _react2.default.createElement(
131
+ 'div',
132
+ { key: item.id, className: 't-MT2' },
133
+ _react2.default.createElement(
134
+ VBox,
135
+ { className: 'nvoice-filetitle', hAlign: 'start' },
136
+ _react2.default.createElement(
137
+ Box,
138
+ null,
139
+ item.invoicename
140
+ ),
141
+ _react2.default.createElement(
142
+ HBox,
143
+ { vAlign: 'center' },
144
+ _react2.default.createElement(
145
+ Box,
146
+ { className: 'label label-primary' },
147
+ item.invoicetype
148
+ ),
149
+ _react2.default.createElement(
150
+ Box,
151
+ null,
152
+ '\uFFE5',
153
+ item.invoiceamount
154
+ )
155
+ )
156
+ ),
157
+ _react2.default.createElement(_upload2.default, {
158
+ required: false,
159
+ canDel: false,
160
+ canPreview: true,
161
+ canDownload: true,
162
+ initList: fileList,
163
+ dir: 'form_invoice',
164
+ ref: 'upload_invoice'
165
+ })
166
+ );
167
+ })
168
+ )
169
+ )
170
+ );
171
+ }
172
+ }]);
173
+
174
+ return Nvoice;
175
+ }(_react2.default.Component);
176
+
177
+ exports.default = Nvoice;
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.2.25",
3
+ "version": "2.2.27",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",