ocpview-plus 1.2.6 → 1.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ocpview-plus",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "title": "ocpviewPlus",
5
5
  "description": "A high quality Service UI components Library with Vue.js",
6
6
  "homepage": "",
@@ -19,6 +19,7 @@
19
19
  <DetailsBoxs v-if="temp2.type === 'DetailsBox'" :ref="temp2.name" :config="temp2" :dictData="dictData" @doAction="doAction"/>
20
20
  <FormCardBox v-if="temp2.type === 'FormCardBox'" :ref="temp2.name" :config="temp2" :dictData="dictData"/>
21
21
  <AppendixBoxs v-if="temp2.type === 'AppendixBox'" :ref="temp2.name" :config="temp2" :modulecode="modulecode" @doAction="doAction"/>
22
+ <AppendixBoxs2 v-if="temp2.type === 'AppendixBox2'" :ref="temp2.name" :config="temp2" :dictData="dictData" :modulecode="modulecode" @doAction="doAction"/>
22
23
  </div>
23
24
  </div>
24
25
  </Card>
@@ -29,11 +30,12 @@ import elementResizeDetectorMaker from 'element-resize-detector'
29
30
  import EditGridCardS from './editgridcard.vue';
30
31
  import DetailsBoxs from './detailsbox.vue';
31
32
  import AppendixBoxs from './appendix.vue';
33
+ import AppendixBoxs2 from './contractappendix.vue';
32
34
  import random from '../../utils/random_str';
33
35
  import Formcard from './formcard.vue';
34
36
  export default {
35
37
  name:'mbilldetailform',
36
- components:{Formcard,EditGridCardS,DetailsBoxs,AppendixBoxs},
38
+ components:{AppendixBoxs2, Formcard,EditGridCardS,DetailsBoxs,AppendixBoxs},
37
39
  data () {
38
40
  return {
39
41
  curlEditObject:'',
@@ -68,7 +70,8 @@ export default {
68
70
  modulecode:'',
69
71
  billAppendixConfig:{
70
72
  showAppendix:false,
71
- appendixKey:'billno'
73
+ appendixKey:'billno',
74
+ showAppendix2:false
72
75
  },
73
76
  billapprovalUrl:'',
74
77
  showAffix:true,
@@ -78,7 +81,6 @@ export default {
78
81
  },
79
82
  created () {
80
83
  this.myConfig = Object.assign({}, this.myConfig, this.config);
81
- // this.loadDynamicConfig();
82
84
  if (this.myConfig.showBtnToolbar !== undefined) {
83
85
  this.showBtnToolbar = this.myConfig.showBtnToolbar;
84
86
  }
@@ -182,6 +184,16 @@ export default {
182
184
  this.detailConfig.items.push(tmp);
183
185
  this.detailVisible.push({refname:tmp.name,visible:true});
184
186
  this.anchorData.push({id:'#'+ tmp.divId, name:tmp.title,refname:tmp.name,visible:true});
187
+ } else if (this.billAppendixConfig.showAppendix2) {
188
+ let tmp = Object.assign({}, {}, this.billAppendixConfig);
189
+ tmp.type = 'AppendixBox2';
190
+ tmp.name = 'detail_appenndix2';
191
+ tmp.title = '附件';
192
+ tmp.beforeUpload = this.beforeUpload;
193
+ tmp.divId = 'detail_'+ this.getRandom() + '_'+ this.detailConfig.items.length;
194
+ this.detailConfig.items.push(tmp);
195
+ this.detailVisible.push({refname:tmp.name,visible:true});
196
+ this.anchorData.push({id:'#'+ tmp.divId, name:tmp.title,refname:tmp.name,visible:true});
185
197
  }
186
198
 
187
199
  if (this.myConfig.showAnchorLink !== undefined) {
@@ -380,6 +392,13 @@ export default {
380
392
  let billmoduleid = data.billmoduleid;
381
393
  this.$refs.detail_appenndix[0].setData(billno,billmoduleid);
382
394
  }
395
+ } else if (this.billAppendixConfig.showAppendix2) {
396
+ if (this.$refs.detail_appenndix2 && this.$refs.detail_appenndix2[0]) {
397
+ let data = this.getData();
398
+ let billno = data[this.billAppendixConfig.appendixKey];
399
+ let billmoduleid = data.billmoduleid;
400
+ this.$refs.detail_appenndix2[0].setData(billno,billmoduleid);
401
+ }
383
402
  }
384
403
  },
385
404
  doAction (obj) {
@@ -535,7 +554,7 @@ export default {
535
554
  this.$refs[el.name][0].setEffectData(temp);
536
555
  }
537
556
  } else {
538
- if (el.type !== 'AppendixBox') {
557
+ if (el.type !== 'AppendixBox' || el.type !== 'AppendixBox2') {
539
558
  if (this.$refs[el.name] && this.$refs[el.name][0]) {
540
559
  this.$refs[el.name][0].setEffectData([]);
541
560
  }
@@ -593,7 +612,7 @@ export default {
593
612
  this.$refs[el.name][0].setData(temp);
594
613
  }
595
614
  } else {
596
- if (el.type !== 'AppendixBox') {
615
+ if (el.type !== 'AppendixBox' || el.type !== 'AppendixBox2') {
597
616
  if (this.$refs[el.name] && this.$refs[el.name][0]) {
598
617
  this.$refs[el.name][0].setData([]);
599
618
  }
@@ -608,6 +627,12 @@ export default {
608
627
  let billmoduleid = data.billmoduleid
609
628
  this.$refs.detail_appenndix[0].setData(billno,billmoduleid);
610
629
  }
630
+ } else if (this.billAppendixConfig.showAppendix2) {
631
+ if (this.$refs.detail_appenndix2 && this.$refs.detail_appenndix2[0]) {
632
+ let billno = data[this.billAppendixConfig.appendixKey];
633
+ let billmoduleid = data.billmoduleid
634
+ this.$refs.detail_appenndix2[0].setData(billno,billmoduleid);
635
+ }
611
636
  }
612
637
  this.$nextTick(() => {
613
638
  this.resetAnchor();
@@ -692,7 +717,7 @@ export default {
692
717
  return data;
693
718
  },
694
719
  getCommonChangeData(data, el) {
695
- if (el.name === 'detail_appenndix') {
720
+ if (el.name === 'detail_appenndix' || el.name === 'detail_appenndix2') {
696
721
  return;
697
722
  }
698
723
  if (this.$refs[el.name] && this.$refs[el.name][0]) {
@@ -860,7 +885,7 @@ export default {
860
885
  if (this.detailConfig.items) {
861
886
  this.detailConfig.items.forEach(el => {
862
887
  if (!flag) {
863
- if (el.name !== 'detail_appenndix') {
888
+ if (el.name !== 'detail_appenndix' || el.name !== 'detail_appenndix2') {
864
889
  if (this.$refs[el.name] && this.$refs[el.name][0]) {
865
890
  flag = this.$refs[el.name][0].isChange();
866
891
  }
@@ -1041,6 +1066,8 @@ export default {
1041
1066
  delAppenndix() {
1042
1067
  if (this.billAppendixConfig.showAppendix) {
1043
1068
  this.$refs.detail_appenndix[0].dellAllfile();
1069
+ } else if (this.billAppendixConfig.showAppendix2) {
1070
+ this.$refs.detail_appenndix2[0].dellAllfile();
1044
1071
  }
1045
1072
  },
1046
1073
  updateAllfile() {
@@ -1048,6 +1075,10 @@ export default {
1048
1075
  if (this.billAppendixConfig.notdelfile) {
1049
1076
  this.$refs.detail_appenndix[0].updateAllfile();
1050
1077
  }
1078
+ } else if (this.billAppendixConfig.showAppendix2) {
1079
+ if (this.billAppendixConfig.notdelfile) {
1080
+ this.$refs.detail_appenndix2[0].updateAllfile();
1081
+ }
1051
1082
  }
1052
1083
  },
1053
1084
  getHeadData() {