fmui-base 2.3.16 → 2.3.18
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 +2 -0
- package/lib/form/form.js +155 -33
- package/lib/form/subForm.js +22 -22
- package/lib/nvoice/index.js +16 -0
- package/lib/nvoice/nvoice.js +177 -0
- package/lib/nvoice/nvoice.less +0 -0
- package/lib/process_info/processInfo.js +2 -12
- package/lib/tblform/FlowCommentPane.js +2 -2
- package/package.json +1 -1
- package/lib/selectMember/select copy.js +0 -11393
package/README.md
CHANGED
package/lib/form/form.js
CHANGED
|
@@ -690,8 +690,8 @@ var PageHome = function (_React$Component) {
|
|
|
690
690
|
itemParam.decimalPlace = form.decimalPlace; //小数位数
|
|
691
691
|
itemParam.dataAttr = form['dataAttr'];
|
|
692
692
|
itemParam.maxlength = form['length'];
|
|
693
|
-
/*if(itemParam.dataAttr){
|
|
694
|
-
alert("265====="+itemParam.dataAttr.textLineFeed);
|
|
693
|
+
/*if(itemParam.dataAttr){
|
|
694
|
+
alert("265====="+itemParam.dataAttr.textLineFeed);
|
|
695
695
|
}*/
|
|
696
696
|
//宏值签名图片
|
|
697
697
|
// if(itemParam.dataAttr && itemParam.dataAttr.dataSrc=='2' && !readOnly && !itemParam.bizCodeRuleId){
|
|
@@ -945,11 +945,11 @@ var PageHome = function (_React$Component) {
|
|
|
945
945
|
if (value == item.value) {
|
|
946
946
|
value = { value: value, text: item.name };
|
|
947
947
|
}
|
|
948
|
-
/*}else{
|
|
949
|
-
var defaultValue=form.defaultValue;
|
|
950
|
-
if(defaultValue == item.value){
|
|
951
|
-
value = {value:value,text:item.name};
|
|
952
|
-
}
|
|
948
|
+
/*}else{
|
|
949
|
+
var defaultValue=form.defaultValue;
|
|
950
|
+
if(defaultValue == item.value){
|
|
951
|
+
value = {value:value,text:item.name};
|
|
952
|
+
}
|
|
953
953
|
}*/
|
|
954
954
|
selectOptions.push(option);
|
|
955
955
|
}
|
|
@@ -1390,7 +1390,10 @@ var PageHome = function (_React$Component) {
|
|
|
1390
1390
|
itemParam: itemParam,
|
|
1391
1391
|
loaded: true
|
|
1392
1392
|
}, function () {
|
|
1393
|
-
t.refs["upload_" + t.state.itemParam.tableName + "_" + t.state.itemParam.key]
|
|
1393
|
+
var uploadRef = t.refs["upload_" + t.state.itemParam.tableName + "_" + t.state.itemParam.key];
|
|
1394
|
+
if (uploadRef && typeof uploadRef.initData === 'function') {
|
|
1395
|
+
uploadRef.initData();
|
|
1396
|
+
}
|
|
1394
1397
|
|
|
1395
1398
|
//修改样式
|
|
1396
1399
|
var styleStr = "";
|
|
@@ -1443,7 +1446,10 @@ var PageHome = function (_React$Component) {
|
|
|
1443
1446
|
itemParam: itemParam,
|
|
1444
1447
|
loaded: true
|
|
1445
1448
|
}, function () {
|
|
1446
|
-
t.refs["upload_" + t.state.itemParam.tableName + "_" + t.state.itemParam.key]
|
|
1449
|
+
var uploadRef = t.refs["upload_" + t.state.itemParam.tableName + "_" + t.state.itemParam.key];
|
|
1450
|
+
if (uploadRef && typeof uploadRef.initData === 'function') {
|
|
1451
|
+
uploadRef.initData();
|
|
1452
|
+
}
|
|
1447
1453
|
|
|
1448
1454
|
//修改样式
|
|
1449
1455
|
var styleStr = "";
|
|
@@ -1565,7 +1571,10 @@ var PageHome = function (_React$Component) {
|
|
|
1565
1571
|
}
|
|
1566
1572
|
}
|
|
1567
1573
|
if (itemType == 'upload' || itemType == 'image' && itemParam.imagetype != '1' || itemType == 'weboffice') {
|
|
1568
|
-
this.refs["upload_" + t.state.itemParam.tableName + "_" + t.state.itemParam.key]
|
|
1574
|
+
var uploadRef = this.refs["upload_" + t.state.itemParam.tableName + "_" + t.state.itemParam.key];
|
|
1575
|
+
if (uploadRef && typeof uploadRef.initData === 'function') {
|
|
1576
|
+
uploadRef.initData();
|
|
1577
|
+
}
|
|
1569
1578
|
}
|
|
1570
1579
|
if (itemType == 'note') {
|
|
1571
1580
|
if (itemParam.noteFileIds) {
|
|
@@ -2383,21 +2392,21 @@ var PageHome = function (_React$Component) {
|
|
|
2383
2392
|
var length = item.maxlength;
|
|
2384
2393
|
var patrn = /^-?\d+(\.\d+)?$/;
|
|
2385
2394
|
if (newValue !== '' && newValue != '-') {
|
|
2386
|
-
/* var validAttr=item['validAttr'];
|
|
2387
|
-
if(validAttr!=null && validAttr.length>0){
|
|
2388
|
-
for(var va=0;va<validAttr.length;va++){
|
|
2389
|
-
var regular=validAttr[va]['regular'];
|
|
2390
|
-
var tips=validAttr[va]['tips'];
|
|
2391
|
-
var reg=new RegExp(regular.slice(1,-1),"g");
|
|
2392
|
-
if(!reg.test(newValue)){
|
|
2393
|
-
Toast.show({
|
|
2394
|
-
type: 'error',
|
|
2395
|
-
content:item.title+':'+tips
|
|
2396
|
-
});
|
|
2397
|
-
return false;
|
|
2398
|
-
}
|
|
2399
|
-
|
|
2400
|
-
}
|
|
2395
|
+
/* var validAttr=item['validAttr'];
|
|
2396
|
+
if(validAttr!=null && validAttr.length>0){
|
|
2397
|
+
for(var va=0;va<validAttr.length;va++){
|
|
2398
|
+
var regular=validAttr[va]['regular'];
|
|
2399
|
+
var tips=validAttr[va]['tips'];
|
|
2400
|
+
var reg=new RegExp(regular.slice(1,-1),"g");
|
|
2401
|
+
if(!reg.test(newValue)){
|
|
2402
|
+
Toast.show({
|
|
2403
|
+
type: 'error',
|
|
2404
|
+
content:item.title+':'+tips
|
|
2405
|
+
});
|
|
2406
|
+
return false;
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
}
|
|
2401
2410
|
}*/
|
|
2402
2411
|
if (this.checkEmoji(newValue)) {
|
|
2403
2412
|
_Toast2.default.show({
|
|
@@ -3422,12 +3431,12 @@ var PageHome = function (_React$Component) {
|
|
|
3422
3431
|
});
|
|
3423
3432
|
return false;
|
|
3424
3433
|
}
|
|
3425
|
-
/* if(newValue=''){
|
|
3426
|
-
Toast.show({
|
|
3427
|
-
type: 'error',
|
|
3428
|
-
content: '意见不能为空!',
|
|
3429
|
-
});
|
|
3430
|
-
return false;
|
|
3434
|
+
/* if(newValue=''){
|
|
3435
|
+
Toast.show({
|
|
3436
|
+
type: 'error',
|
|
3437
|
+
content: '意见不能为空!',
|
|
3438
|
+
});
|
|
3439
|
+
return false;
|
|
3431
3440
|
}*/
|
|
3432
3441
|
if (newValue.length > 2000) {
|
|
3433
3442
|
newValue = newValue.substring(0, 2000);
|
|
@@ -3589,10 +3598,91 @@ var PageHome = function (_React$Component) {
|
|
|
3589
3598
|
}
|
|
3590
3599
|
|
|
3591
3600
|
//预览附件
|
|
3601
|
+
/** 新建正文生成 recordId 后回写字段,保证提交与再次编辑复用同一 id */
|
|
3592
3602
|
|
|
3603
|
+
}, {
|
|
3604
|
+
key: 'applyGeneratedRecordId',
|
|
3605
|
+
value: function applyGeneratedRecordId(recordId) {
|
|
3606
|
+
if (!recordId) {
|
|
3607
|
+
return;
|
|
3608
|
+
}
|
|
3609
|
+
var t = this;
|
|
3610
|
+
var itemParam = t.state.itemParam;
|
|
3611
|
+
if (!itemParam || itemParam.itemType !== 'weboffice') {
|
|
3612
|
+
return;
|
|
3613
|
+
}
|
|
3614
|
+
// 已有同一 recordId 则无需重复回写
|
|
3615
|
+
if (itemParam.value === recordId || String(itemParam.value) === String(recordId)) {
|
|
3616
|
+
return;
|
|
3617
|
+
}
|
|
3618
|
+
itemParam.value = recordId;
|
|
3619
|
+
t.setState({
|
|
3620
|
+
itemParam: itemParam
|
|
3621
|
+
});
|
|
3622
|
+
var data = t.editData(itemParam.key, recordId, t.props.data);
|
|
3623
|
+
if (typeof t.props.onChange === 'function') {
|
|
3624
|
+
t.props.onChange(data, itemParam);
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3627
|
+
}, {
|
|
3628
|
+
key: 'buildOfficeCtx',
|
|
3629
|
+
value: function buildOfficeCtx(file) {
|
|
3630
|
+
var t = this;
|
|
3631
|
+
var recordId = '';
|
|
3632
|
+
var value = t.state.itemParam.value;
|
|
3633
|
+
if (value) {
|
|
3634
|
+
if (typeof value === 'string') {
|
|
3635
|
+
recordId = value;
|
|
3636
|
+
} else if (value instanceof Array && value.length > 0) {
|
|
3637
|
+
// weboffice 字段存库为 recordId 字符串;列表态兜底取 id
|
|
3638
|
+
recordId = value[0].recordId || value[0].id || '';
|
|
3639
|
+
}
|
|
3640
|
+
}
|
|
3641
|
+
return {
|
|
3642
|
+
recordId: recordId,
|
|
3643
|
+
attachmentId: file ? file.id : t.state.itemParam.initIds,
|
|
3644
|
+
moduleCode: t.state.module,
|
|
3645
|
+
module: t.state.module,
|
|
3646
|
+
readOnly: t.state.itemParam.readOnly,
|
|
3647
|
+
formData: t.props.data,
|
|
3648
|
+
dataId: t.props.dataId,
|
|
3649
|
+
processInstanceId: t.props.processInstanceId,
|
|
3650
|
+
fileExt: file ? file.fileExt : '.doc',
|
|
3651
|
+
onRecordIdGenerated: t.applyGeneratedRecordId.bind(t)
|
|
3652
|
+
};
|
|
3653
|
+
}
|
|
3654
|
+
}, {
|
|
3655
|
+
key: 'openWeboffice',
|
|
3656
|
+
value: function openWeboffice(mode) {
|
|
3657
|
+
console.info('openWeboffice', mode);
|
|
3658
|
+
if (typeof MobileOffice === 'undefined') {
|
|
3659
|
+
_Toast2.default.show({ content: 'Office SDK 未加载' });
|
|
3660
|
+
return;
|
|
3661
|
+
}
|
|
3662
|
+
var ctx = this.buildOfficeCtx();
|
|
3663
|
+
ctx.mode = mode || 'edit';
|
|
3664
|
+
MobileOffice.open(ctx);
|
|
3665
|
+
}
|
|
3666
|
+
}, {
|
|
3667
|
+
key: 'previewWeboffice',
|
|
3668
|
+
value: function previewWeboffice(file) {
|
|
3669
|
+
console.info('previewWeboffice-->');
|
|
3670
|
+
if (typeof MobileOffice === 'undefined') {
|
|
3671
|
+
var id = file.id;
|
|
3672
|
+
var fileExt = file.fileExt;
|
|
3673
|
+
downloadFile(id, 'android', fileExt);
|
|
3674
|
+
return;
|
|
3675
|
+
}
|
|
3676
|
+
var ctx = this.buildOfficeCtx(file);
|
|
3677
|
+
MobileOffice.preview(ctx);
|
|
3678
|
+
}
|
|
3593
3679
|
}, {
|
|
3594
3680
|
key: 'viewFile',
|
|
3595
3681
|
value: function viewFile(file) {
|
|
3682
|
+
if (this.state.itemParam && this.state.itemParam.itemType === 'weboffice') {
|
|
3683
|
+
this.previewWeboffice(file);
|
|
3684
|
+
return;
|
|
3685
|
+
}
|
|
3596
3686
|
var id = file.id;
|
|
3597
3687
|
var fileExt = file.fileExt;
|
|
3598
3688
|
downloadFile(id, 'android', fileExt);
|
|
@@ -3601,6 +3691,11 @@ var PageHome = function (_React$Component) {
|
|
|
3601
3691
|
key: 'clickPop',
|
|
3602
3692
|
value: function clickPop() {
|
|
3603
3693
|
if (!this.state.itemParam.readOnly) {
|
|
3694
|
+
// weboffice 走云编辑;其它类型(如 html)仍提示不支持
|
|
3695
|
+
if (this.state.itemParam.itemType === 'weboffice') {
|
|
3696
|
+
this.openWeboffice('edit');
|
|
3697
|
+
return false;
|
|
3698
|
+
}
|
|
3604
3699
|
_Toast2.default.show({
|
|
3605
3700
|
content: "移动端暂不支持该类型编辑"
|
|
3606
3701
|
});
|
|
@@ -4661,7 +4756,7 @@ var PageHome = function (_React$Component) {
|
|
|
4661
4756
|
_react2.default.createElement(
|
|
4662
4757
|
'div',
|
|
4663
4758
|
{ className: 't-W100' },
|
|
4664
|
-
_react2.default.createElement(_upload2.default, {
|
|
4759
|
+
t.state.itemParam.readOnly ? _react2.default.createElement(_upload2.default, {
|
|
4665
4760
|
ref: "upload_" + t.state.itemParam.tableName + "_" + t.state.itemParam.key,
|
|
4666
4761
|
canAdd: false,
|
|
4667
4762
|
canDel: false,
|
|
@@ -4671,10 +4766,37 @@ var PageHome = function (_React$Component) {
|
|
|
4671
4766
|
initIds: t.state.itemParam.initIds,
|
|
4672
4767
|
dir: t.state.module,
|
|
4673
4768
|
fileSizeLimit: 0,
|
|
4769
|
+
onView: t.previewWeboffice.bind(t),
|
|
4674
4770
|
onChange: function onChange(value, isInit) {
|
|
4675
4771
|
t.handleChangeOffice(t.state.itemParam.key, value, isInit);
|
|
4676
4772
|
}
|
|
4677
|
-
})
|
|
4773
|
+
}) : _react2.default.createElement(
|
|
4774
|
+
'div',
|
|
4775
|
+
{ className: 't-field-box t-FBH t-FBAC t-FBJ' },
|
|
4776
|
+
_react2.default.createElement(
|
|
4777
|
+
'div',
|
|
4778
|
+
{ className: t.state.itemParam.required ? 't-field-layout-h-label required' : 't-field-layout-h-label' },
|
|
4779
|
+
_react2.default.createElement(
|
|
4780
|
+
'span',
|
|
4781
|
+
{ style: t.state.itemParam.formStyleObj.titleStyle == null ? {} : t.state.itemParam.formStyleObj.titleStyle },
|
|
4782
|
+
t.state.itemParam.title
|
|
4783
|
+
)
|
|
4784
|
+
),
|
|
4785
|
+
_react2.default.createElement(
|
|
4786
|
+
'div',
|
|
4787
|
+
{ className: 't-P16' },
|
|
4788
|
+
_react2.default.createElement(
|
|
4789
|
+
'span',
|
|
4790
|
+
{
|
|
4791
|
+
className: 't-FCblue t-FS14',
|
|
4792
|
+
onClick: function onClick() {
|
|
4793
|
+
t.openWeboffice('edit');
|
|
4794
|
+
}
|
|
4795
|
+
},
|
|
4796
|
+
'\u7F16\u8F91\u6B63\u6587'
|
|
4797
|
+
)
|
|
4798
|
+
)
|
|
4799
|
+
)
|
|
4678
4800
|
),
|
|
4679
4801
|
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' } }) : ""
|
|
4680
4802
|
)
|
package/lib/form/subForm.js
CHANGED
|
@@ -335,28 +335,28 @@ var PageHome = function (_React$Component) {
|
|
|
335
335
|
var data = this.props.data;
|
|
336
336
|
var subTblList = data.subTbl; //子表
|
|
337
337
|
var relatedTbl = data.relatedTbl; //关联表
|
|
338
|
-
/* var calculateExpList = data.calculateExpList;//计算公式列表
|
|
339
|
-
var calculateExpList1 = value.calculateExpList;//计算公式列表
|
|
340
|
-
if(calculateExpList1){
|
|
341
|
-
for(var key in calculateExpList1){
|
|
342
|
-
var calculateExpValue;
|
|
343
|
-
if(calculateExpList){
|
|
344
|
-
calculateExpValue = calculateExpList[key];
|
|
345
|
-
if(!calculateExpValue){
|
|
346
|
-
calculateExpValue = [];
|
|
347
|
-
}
|
|
348
|
-
}else{
|
|
349
|
-
calculateExpList = {};
|
|
350
|
-
calculateExpValue = [];
|
|
351
|
-
}
|
|
352
|
-
for(var j=0;j<calculateExpList1[key].length;j++){
|
|
353
|
-
calculateExpValue.push(calculateExpList1[key][j]);
|
|
354
|
-
}
|
|
355
|
-
calculateExpList[key] = calculateExpValue;
|
|
356
|
-
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
data.calculateExpList = calculateExpList;
|
|
338
|
+
/* var calculateExpList = data.calculateExpList;//计算公式列表
|
|
339
|
+
var calculateExpList1 = value.calculateExpList;//计算公式列表
|
|
340
|
+
if(calculateExpList1){
|
|
341
|
+
for(var key in calculateExpList1){
|
|
342
|
+
var calculateExpValue;
|
|
343
|
+
if(calculateExpList){
|
|
344
|
+
calculateExpValue = calculateExpList[key];
|
|
345
|
+
if(!calculateExpValue){
|
|
346
|
+
calculateExpValue = [];
|
|
347
|
+
}
|
|
348
|
+
}else{
|
|
349
|
+
calculateExpList = {};
|
|
350
|
+
calculateExpValue = [];
|
|
351
|
+
}
|
|
352
|
+
for(var j=0;j<calculateExpList1[key].length;j++){
|
|
353
|
+
calculateExpValue.push(calculateExpList1[key][j]);
|
|
354
|
+
}
|
|
355
|
+
calculateExpList[key] = calculateExpValue;
|
|
356
|
+
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
data.calculateExpList = calculateExpList;
|
|
360
360
|
}*/
|
|
361
361
|
|
|
362
362
|
this.dealwithSubData(subTblList, subTblNo, value, relatedTbl);
|
|
@@ -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
|
|
@@ -1474,7 +1474,7 @@ var PageHome = function (_React$Component) {
|
|
|
1474
1474
|
// }
|
|
1475
1475
|
t.setState({
|
|
1476
1476
|
editFormData: formData,
|
|
1477
|
-
formDataOptlock: formData && formData.optlock !== undefined && formData.optlock !== null && formData.optlock !== '' ? String(formData.optlock) : '',
|
|
1477
|
+
formDataOptlock: formData && formData.optlock !== undefined && formData.optlock !== null && formData.optlock !== '' ? String(formData.optlock) : content.optlock !== undefined && content.optlock !== null && content.optlock !== '' ? String(content.optlock) : '',
|
|
1478
1478
|
//formDataNew:content.formDataNew,
|
|
1479
1479
|
// formData: formData,
|
|
1480
1480
|
// fileContent: fileContent,
|
|
@@ -4683,9 +4683,6 @@ var PageHome = function (_React$Component) {
|
|
|
4683
4683
|
formType: "4",
|
|
4684
4684
|
editType: editType
|
|
4685
4685
|
}, _defineProperty(_param2, 'module', t.state.module), _defineProperty(_param2, 'comment', newComment), _defineProperty(_param2, 'commentType', 'text'), _defineProperty(_param2, 'commentId', t.state.commentId), _defineProperty(_param2, 'commentAttitude', t.getSelectedCommentAttitude()), _defineProperty(_param2, 'attachId', t.state.commentAttachId), _defineProperty(_param2, 'sealId', t.state.commentSealId), _defineProperty(_param2, 'permissionCode', t.state.permissionCode), _defineProperty(_param2, 'hasCommentField', t.state.hasCommentField), _defineProperty(_param2, 'dataId', dataId), _param2);
|
|
4686
|
-
if (t.state.formDataOptlock !== '' && t.state.formDataOptlock !== null && typeof t.state.formDataOptlock !== 'undefined') {
|
|
4687
|
-
param.optlock = t.state.formDataOptlock;
|
|
4688
|
-
}
|
|
4689
4686
|
var commentbizSn = t.guid2();
|
|
4690
4687
|
if (param.commentId && param.commentId != "" && param.commentId != null && typeof param.commentId != "undefined") {
|
|
4691
4688
|
commentbizSn = param.commentId;
|
|
@@ -4699,13 +4696,6 @@ var PageHome = function (_React$Component) {
|
|
|
4699
4696
|
type: 'success',
|
|
4700
4697
|
content: '保存成功'
|
|
4701
4698
|
});
|
|
4702
|
-
if (t.state.formDataOptlock !== '' && t.state.formDataOptlock !== null) {
|
|
4703
|
-
var ol = parseInt(t.state.formDataOptlock, 10);
|
|
4704
|
-
if (!isNaN(ol)) {
|
|
4705
|
-
t.setState({ formDataOptlock: String(ol + 1) });
|
|
4706
|
-
}
|
|
4707
|
-
}
|
|
4708
|
-
|
|
4709
4699
|
var dataId = content.dataId;
|
|
4710
4700
|
//操作回调
|
|
4711
4701
|
if (typeof FlowCommon.operateCallBack === "function") {
|
|
@@ -8909,7 +8899,7 @@ var PageHome = function (_React$Component) {
|
|
|
8909
8899
|
placeholder: '\u8BF7\u9009\u62E9',
|
|
8910
8900
|
code: 'org,group',
|
|
8911
8901
|
chooseType: 'userNotOrg',
|
|
8912
|
-
checkType:
|
|
8902
|
+
checkType: 'checkbox',
|
|
8913
8903
|
ref: "selectMember_addSign",
|
|
8914
8904
|
isDelete: true,
|
|
8915
8905
|
onChange: this.addSignCallback.bind(this)
|
|
@@ -49,8 +49,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
49
49
|
|
|
50
50
|
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; }
|
|
51
51
|
|
|
52
|
-
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; } /**
|
|
53
|
-
* 流程批示意见区块(默认意见、退回意见等),与 TblForm 纯表单分离使用
|
|
52
|
+
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; } /**
|
|
53
|
+
* 流程批示意见区块(默认意见、退回意见等),与 TblForm 纯表单分离使用
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
56
|
|