ocpview-plus 1.3.7 → 1.3.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/dist/ocpviewplus.min.esm.js +716 -405
- package/dist/ocpviewplus.min.js +14 -14
- package/package.json +1 -1
- package/src/components/form/formcardbox2.vue +228 -0
- package/src/components/form/index.js +2 -1
- package/src/components/masterplate/billdetailform.vue +10 -8
- package/src/components/masterplate/contractappendix.vue +15 -9
package/package.json
CHANGED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Card :bordered="false" :padding="0" dis-hover>
|
|
3
|
+
<p v-if="showTitle" @click="toggle" style="cursor:pointer;">
|
|
4
|
+
<Row type="flex" justify="start" align="middle" style="margin-top:14px;margin-bottom:14px">
|
|
5
|
+
<Icon custom='iconfont icon-custom-pack' color="#f3b352" v-show="showForm" size="14"/>
|
|
6
|
+
<Icon v-show="!showForm" color="#f3b352" custom='iconfont icon-custom-spread' size="14"/>
|
|
7
|
+
<span style="margin-left:10px;font-size: 14px;font-weight:bold" v-text="myConfig.title"/>
|
|
8
|
+
</Row>
|
|
9
|
+
</p>
|
|
10
|
+
<Divider v-if="showTitle" style="margin-top:0px;margin-bottom:10px;margin-left:24px;"/>
|
|
11
|
+
<div v-show="showForm" :style="myConfig.divStyle">
|
|
12
|
+
<Form
|
|
13
|
+
ref="form"
|
|
14
|
+
:model="form"
|
|
15
|
+
:rules="formRules"
|
|
16
|
+
:label-position="myConfig.labelPosition"
|
|
17
|
+
:label-width="myConfig.labelWidth"
|
|
18
|
+
:inline="myConfig.inline"
|
|
19
|
+
:id="myConfig.name"
|
|
20
|
+
@submit.enter.prevent
|
|
21
|
+
>
|
|
22
|
+
<Row type="flex" justify="start">
|
|
23
|
+
<template v-for="(item,index) in items" :key="'form_' + index">
|
|
24
|
+
<Col
|
|
25
|
+
v-if="item.status"
|
|
26
|
+
:span="initFormItemCol(index)"
|
|
27
|
+
v-show="item.visible !== false"
|
|
28
|
+
>
|
|
29
|
+
<FormItem
|
|
30
|
+
v-if="item.type !== 'Divider' && item.status && item.visible !== false"
|
|
31
|
+
:label="item.label"
|
|
32
|
+
:prop="item.name||item.sname"
|
|
33
|
+
:style="getFormItemStyle(item)"
|
|
34
|
+
:show-message="false"
|
|
35
|
+
>
|
|
36
|
+
<ControlBox
|
|
37
|
+
:ref="item.name||item.sname"
|
|
38
|
+
:valueData="form"
|
|
39
|
+
:config="item"
|
|
40
|
+
@inputValue="input"
|
|
41
|
+
@doAction="doAction"
|
|
42
|
+
></ControlBox>
|
|
43
|
+
</FormItem>
|
|
44
|
+
<ControlBox v-if="item.type === 'Divider'" :ref="item.dividerName" :config="item"></ControlBox>
|
|
45
|
+
</Col>
|
|
46
|
+
</template>
|
|
47
|
+
</Row>
|
|
48
|
+
</Form>
|
|
49
|
+
</div>
|
|
50
|
+
</Card>
|
|
51
|
+
</template>
|
|
52
|
+
<script>
|
|
53
|
+
import Base from './baseform.vue';
|
|
54
|
+
export default {
|
|
55
|
+
name: 'FormCardBox',
|
|
56
|
+
extends: Base,
|
|
57
|
+
data() {
|
|
58
|
+
return {
|
|
59
|
+
myConfig: {
|
|
60
|
+
hide: true,
|
|
61
|
+
titleType: 1,
|
|
62
|
+
editBtnText: '编辑',
|
|
63
|
+
saveBtnText: '保存',
|
|
64
|
+
cancelBtnText: '放弃',
|
|
65
|
+
showBtn: true,
|
|
66
|
+
bordered: true,
|
|
67
|
+
disHover: false,
|
|
68
|
+
showSubSpecialStyle: false,
|
|
69
|
+
divStyle: 'padding:0 24px',
|
|
70
|
+
},
|
|
71
|
+
btnReadOnly: false,
|
|
72
|
+
showBtn: true,
|
|
73
|
+
showForm: true,
|
|
74
|
+
showTitle: true,
|
|
75
|
+
editFlag: false,
|
|
76
|
+
saveFlag: false,
|
|
77
|
+
cancelFlag: false,
|
|
78
|
+
pStyle: '',
|
|
79
|
+
iconStyle: '',
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
created() {
|
|
83
|
+
this.init();
|
|
84
|
+
},
|
|
85
|
+
computed: {
|
|
86
|
+
cardClass() {
|
|
87
|
+
if (this.myConfig.showSubSpecialStyle) {
|
|
88
|
+
return (`efuture-card-head-title-${this.myConfig.titleType}` + ' efuture-card-head-title' + ` efuture-card-extra-title-${this.myConfig.titleType}`);
|
|
89
|
+
} else {
|
|
90
|
+
if (!this.showForm) {
|
|
91
|
+
return ( `efuture-card-head-title-${this.myConfig.titleType}` + ' efuture-card-head-title-nobottom' + ` efuture-card-extra-title-${this.myConfig.titleType}`);
|
|
92
|
+
} else {
|
|
93
|
+
return `efuture-card-head-title-${this.myConfig.titleType}` + ` efuture-card-extra-title-${this.myConfig.titleType}`;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
titleClass() {
|
|
98
|
+
return `efuture-title-font-${this.myConfig.titleType}`;
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
methods: {
|
|
102
|
+
|
|
103
|
+
customInit() {
|
|
104
|
+
if (this.myConfig.hide) {
|
|
105
|
+
this.pStyle = 'cursor:pointer';
|
|
106
|
+
this.iconStyle = 'transform: rotate(90deg)';
|
|
107
|
+
}
|
|
108
|
+
if (!this.myConfig.title) {
|
|
109
|
+
if (this.myConfig.titleType !== 1) {
|
|
110
|
+
this.showTitle = true;
|
|
111
|
+
} else {
|
|
112
|
+
this.showTitle = false;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (this.myConfig.readOnly !== undefined) {
|
|
117
|
+
this.readOnly = this.myConfig.readOnly;
|
|
118
|
+
}
|
|
119
|
+
if (this.myConfig.titleType !== 1) {
|
|
120
|
+
if (this.config.hide === undefined) {
|
|
121
|
+
this.myConfig.hide = false;
|
|
122
|
+
}
|
|
123
|
+
if (this.config.bordered === undefined) {
|
|
124
|
+
this.myConfig.bordered = false;
|
|
125
|
+
}
|
|
126
|
+
if (this.config.disHover === undefined) {
|
|
127
|
+
this.myConfig.disHover = true;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
this.showBtn = this.myConfig.showBtn;
|
|
131
|
+
if (this.myConfig.cancelBtn !== undefined) {
|
|
132
|
+
this.cancelFlag = this.myConfig.cancelBtn;
|
|
133
|
+
}
|
|
134
|
+
// let _this = this;
|
|
135
|
+
// document.addEventListener("keydown", _this.watchEnter);
|
|
136
|
+
},
|
|
137
|
+
setFormReadOnly(value) {
|
|
138
|
+
this.editFlag = value;
|
|
139
|
+
if (!this.myConfig.items || this.myConfig.items.length === 0) {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
let self = this;
|
|
143
|
+
this.myConfig.items.forEach(el => {
|
|
144
|
+
let name = '';
|
|
145
|
+
if (el.name) {
|
|
146
|
+
name = el.name;
|
|
147
|
+
} else if (el.sname) {
|
|
148
|
+
name = el.sname;
|
|
149
|
+
}
|
|
150
|
+
if (!value) {
|
|
151
|
+
if (this.myConfig.cellbeginedit) {
|
|
152
|
+
let obj = {};
|
|
153
|
+
obj.name = name;
|
|
154
|
+
obj.form = this.$Method.copy(this.form);
|
|
155
|
+
obj.formObject = self;
|
|
156
|
+
let flag = this.myConfig.cellbeginedit(obj);
|
|
157
|
+
if (flag) {
|
|
158
|
+
this.setReadOnly(name, value);
|
|
159
|
+
} else {
|
|
160
|
+
this.setReadOnly(name, !value);
|
|
161
|
+
}
|
|
162
|
+
} else {
|
|
163
|
+
this.setReadOnly(name, value);
|
|
164
|
+
}
|
|
165
|
+
} else {
|
|
166
|
+
this.setReadOnly(name, value);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
},
|
|
170
|
+
editForm() {
|
|
171
|
+
let flag = true;
|
|
172
|
+
if (this.myConfig.editObjectBefore) {
|
|
173
|
+
flag = this.myConfig.editObjectBefore(this.myConfig.name);
|
|
174
|
+
}
|
|
175
|
+
if (flag) {
|
|
176
|
+
this.setFormReadOnly(false);
|
|
177
|
+
let obj = {};
|
|
178
|
+
obj.name = 'editForm';
|
|
179
|
+
obj.formname = this.myConfig.name;
|
|
180
|
+
this.$emit('doAction', obj);
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
cancelForm() {
|
|
184
|
+
this.setData(this.oldForm);
|
|
185
|
+
this.setFormReadOnly(true);
|
|
186
|
+
let obj = {};
|
|
187
|
+
obj.name = 'cancelForm';
|
|
188
|
+
obj.formname = this.myConfig.name;
|
|
189
|
+
this.$emit('doAction', obj);
|
|
190
|
+
},
|
|
191
|
+
saveForm() {
|
|
192
|
+
this.checkValidate();
|
|
193
|
+
if (this.errorFlag) {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
this.setFormReadOnly(true);
|
|
197
|
+
let obj = {};
|
|
198
|
+
obj.name = 'saveForm';
|
|
199
|
+
obj.formname = this.myConfig.name;
|
|
200
|
+
obj.para = this.getData();
|
|
201
|
+
this.$emit('doAction', obj);
|
|
202
|
+
},
|
|
203
|
+
toggle () {
|
|
204
|
+
this.showForm = !this.showForm;
|
|
205
|
+
},
|
|
206
|
+
setShowForm(value) {
|
|
207
|
+
this.showForm = value;
|
|
208
|
+
this.setTitleStyle();
|
|
209
|
+
},
|
|
210
|
+
setTitleStyle() {
|
|
211
|
+
if (this.showForm) {
|
|
212
|
+
this.iconStyle = 'transform: rotate(90deg)';
|
|
213
|
+
} else {
|
|
214
|
+
this.iconStyle = '';
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
isEdit() {
|
|
218
|
+
return this.editFlag;
|
|
219
|
+
},
|
|
220
|
+
setShowBtn(value) {
|
|
221
|
+
this.showBtn = value;
|
|
222
|
+
},
|
|
223
|
+
setBtnReadOnly(value) {
|
|
224
|
+
this.btnReadOnly = value;
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
};
|
|
228
|
+
</script>
|
|
@@ -5,4 +5,5 @@ import FormCardGroupBox from './formcardgroupbox.vue';
|
|
|
5
5
|
import DetailsBox from './detailsbox.vue';
|
|
6
6
|
import WorkForm from './workform.vue';
|
|
7
7
|
import BaseForm from './baseform.vue';
|
|
8
|
-
|
|
8
|
+
import FormCardBox2 from './formcardbox2.vue';
|
|
9
|
+
export {FormBox,FormDetail,WorkForm,BaseForm,FormCardBox,FormCardGroupBox,DetailsBox,FormCardBox2};
|
|
@@ -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
|
+
<FormCardBox2 v-if="temp2.type === 'FormCardBox2'" :ref="temp2.name" :config="temp2" :dictData="dictData"/>
|
|
22
23
|
<AppendixBoxs2 v-if="temp2.type === 'AppendixBox2'" :ref="temp2.name" :config="temp2" :dictData="dictData" :modulecode="modulecode" @handleSuccessAfter="handleSuccessAfter" @doAction="doAction"/>
|
|
23
24
|
</div>
|
|
24
25
|
</div>
|
|
@@ -31,11 +32,12 @@ import EditGridCardS from './editgridcard.vue';
|
|
|
31
32
|
import DetailsBoxs from './detailsbox.vue';
|
|
32
33
|
import AppendixBoxs from './appendix.vue';
|
|
33
34
|
import AppendixBoxs2 from './contractappendix.vue';
|
|
35
|
+
import FormCardBox2 from '../form/FormCardBox2.vue';
|
|
34
36
|
import random from '../../utils/random_str';
|
|
35
37
|
import Formcard from './formcard.vue';
|
|
36
38
|
export default {
|
|
37
39
|
name:'mbilldetailform',
|
|
38
|
-
components:{AppendixBoxs2, Formcard,EditGridCardS,DetailsBoxs,AppendixBoxs},
|
|
40
|
+
components:{AppendixBoxs2, Formcard,EditGridCardS,DetailsBoxs,AppendixBoxs,FormCardBox2},
|
|
39
41
|
data () {
|
|
40
42
|
return {
|
|
41
43
|
curlEditObject:'',
|
|
@@ -368,7 +370,7 @@ export default {
|
|
|
368
370
|
let tempDetailData = this.setDetailsBox(el, data);
|
|
369
371
|
this.$refs[el.name][0].setEffectData(tempDetailData);
|
|
370
372
|
} else {
|
|
371
|
-
if (el.type === 'FormCardBox') {
|
|
373
|
+
if (el.type === 'FormCardBox' || el.type === 'FormCardBox2') {
|
|
372
374
|
if (data[el.name].length > 0) {
|
|
373
375
|
this.$refs[el.name][0].setEffectData(data[el.name][0]);
|
|
374
376
|
} else {
|
|
@@ -381,7 +383,7 @@ export default {
|
|
|
381
383
|
}
|
|
382
384
|
} else {
|
|
383
385
|
if (this.config.response === el.name) {
|
|
384
|
-
if (el.type === 'FormCardBox') {
|
|
386
|
+
if (el.type === 'FormCardBox'|| el.type === 'FormCardBox2') {
|
|
385
387
|
let temp = {};
|
|
386
388
|
if (el.items) {
|
|
387
389
|
el.items.forEach(el2 => {
|
|
@@ -426,7 +428,7 @@ export default {
|
|
|
426
428
|
let tempDetailData = this.setDetailsBox(el, data);
|
|
427
429
|
this.$refs[el.name][0].setData(tempDetailData);
|
|
428
430
|
} else {
|
|
429
|
-
if (el.type === 'FormCardBox') {
|
|
431
|
+
if (el.type === 'FormCardBox'|| el.type === 'FormCardBox2') {
|
|
430
432
|
if (data[el.name].length > 0) {
|
|
431
433
|
this.$refs[el.name][0].setData(data[el.name][0]);
|
|
432
434
|
} else {
|
|
@@ -439,7 +441,7 @@ export default {
|
|
|
439
441
|
}
|
|
440
442
|
} else {
|
|
441
443
|
if (this.config.response === el.name) {
|
|
442
|
-
if (el.type === 'FormCardBox') {
|
|
444
|
+
if (el.type === 'FormCardBox'|| el.type === 'FormCardBox2') {
|
|
443
445
|
let temp = {};
|
|
444
446
|
if (el.items) {
|
|
445
447
|
el.items.forEach(el2 => {
|
|
@@ -571,7 +573,7 @@ export default {
|
|
|
571
573
|
if (this.$refs[el.name] && this.$refs[el.name][0]) {
|
|
572
574
|
if (el.type === 'DetailsBox') {
|
|
573
575
|
Object.assign(data, this.getDetailsBox(el));
|
|
574
|
-
} else if (el.type === 'FormCardBox') {
|
|
576
|
+
} else if (el.type === 'FormCardBox'|| el.type === 'FormCardBox2') {
|
|
575
577
|
if (this.config.response === el.name) {
|
|
576
578
|
Object.assign(data, this.getFormCardBox(el));
|
|
577
579
|
} else {
|
|
@@ -707,7 +709,7 @@ export default {
|
|
|
707
709
|
if (this.detailConfig.items) {
|
|
708
710
|
this.detailConfig.items.forEach(el => {
|
|
709
711
|
if (this.$refs[el.name] && this.$refs[el.name][0]) {
|
|
710
|
-
if (el.type === 'FormCardBox') {
|
|
712
|
+
if (el.type === 'FormCardBox' || el.type === 'FormCardBox2') {
|
|
711
713
|
this.$refs[el.name][0].setFormReadOnly(value);
|
|
712
714
|
} else {
|
|
713
715
|
this.$refs[el.name][0].setReadOnly(value);
|
|
@@ -814,7 +816,7 @@ export default {
|
|
|
814
816
|
checkCommonValidate(el) {
|
|
815
817
|
let flag = false;
|
|
816
818
|
if (this.$refs[el.name] && this.$refs[el.name][0] && this.$refs[el.name][0].checkValidate) {
|
|
817
|
-
if (el.type === 'FormCardBox') {
|
|
819
|
+
if (el.type === 'FormCardBox' || el.type === 'FormCardBox2') {
|
|
818
820
|
this.$refs[el.name][0].checkValidate();
|
|
819
821
|
flag = this.$refs[el.name][0].isError();
|
|
820
822
|
} else {
|
|
@@ -139,6 +139,7 @@ export default {
|
|
|
139
139
|
loading: true,
|
|
140
140
|
fileSize: 0,
|
|
141
141
|
initData: [],
|
|
142
|
+
notShowBtn: [],
|
|
142
143
|
rowBtnData: [
|
|
143
144
|
{
|
|
144
145
|
icon: 'custom-fileupload',
|
|
@@ -192,9 +193,6 @@ export default {
|
|
|
192
193
|
if (!this.myConfig.pdffile) {
|
|
193
194
|
this.myConfig.pdffile = this.OmdUrl.pdffile;
|
|
194
195
|
}
|
|
195
|
-
if (this.myConfig.showTitle !== undefined) {
|
|
196
|
-
this.showTitle = this.myConfig.showTitle;
|
|
197
|
-
}
|
|
198
196
|
// this.myConfig.showAddBtn = true;
|
|
199
197
|
// this.myConfig.showDelBatchBtn = true;
|
|
200
198
|
this.myConfig.generalOrientation = true;
|
|
@@ -212,6 +210,10 @@ export default {
|
|
|
212
210
|
} else {
|
|
213
211
|
this.uploadfile = this.myConfig.uploadfile + '?token=' + this.getToken();
|
|
214
212
|
}
|
|
213
|
+
|
|
214
|
+
if (this.myConfig.notShowBtn !== undefined) {
|
|
215
|
+
this.notShowBtn = this.myConfig.notShowBtn;
|
|
216
|
+
}
|
|
215
217
|
},
|
|
216
218
|
computed: {
|
|
217
219
|
headers () {
|
|
@@ -277,7 +279,7 @@ export default {
|
|
|
277
279
|
},
|
|
278
280
|
actionRender (h, params) {
|
|
279
281
|
let btnConfig = {};
|
|
280
|
-
btnConfig.showNum =
|
|
282
|
+
btnConfig.showNum = 5;
|
|
281
283
|
btnConfig.fontStyle = '';
|
|
282
284
|
btnConfig.items = [];
|
|
283
285
|
if (params.row.filekey) {
|
|
@@ -285,7 +287,7 @@ export default {
|
|
|
285
287
|
if (this.myConfig.readOnly) {
|
|
286
288
|
del.readOnly = true;
|
|
287
289
|
}
|
|
288
|
-
if (params.row.scenetype !== '0' && params.row.modflag !== 'M') {
|
|
290
|
+
if (params.row.scenetype !== '0' && params.row.modflag !== 'M' && this.notShowBtn.indexOf(del.name) < 0) {
|
|
289
291
|
btnConfig.items.push(del);
|
|
290
292
|
}
|
|
291
293
|
} else {
|
|
@@ -293,7 +295,10 @@ export default {
|
|
|
293
295
|
if (this.myConfig.readOnly) {
|
|
294
296
|
up.readOnly = true;
|
|
295
297
|
}
|
|
296
|
-
|
|
298
|
+
if (this.notShowBtn.indexOf(up.name) < 0) {
|
|
299
|
+
btnConfig.items.push(up);
|
|
300
|
+
}
|
|
301
|
+
|
|
297
302
|
}
|
|
298
303
|
btnConfig.items.push(this.$Method.copy(this.rowBtnData[2]));
|
|
299
304
|
if (this.isType(params.row.filetype) !== '0') {
|
|
@@ -304,11 +309,12 @@ export default {
|
|
|
304
309
|
recall.readOnly = true;
|
|
305
310
|
}
|
|
306
311
|
if (this.myConfig.notdelfile) {
|
|
307
|
-
if (params.row.modflag === 'N') {
|
|
312
|
+
if (params.row.modflag === 'N' && this.notShowBtn.indexOf(recall.name) < 0) {
|
|
308
313
|
btnConfig.items.push(recall);
|
|
309
314
|
}
|
|
310
|
-
|
|
311
|
-
|
|
315
|
+
let reupFile = this.$Method.copy(this.rowBtnData[5])
|
|
316
|
+
if ((!params.row.filekey || params.row.filekey !== '') && params.row.modflag === 'N' && this.notShowBtn.indexOf(reupFile.name) < 0) {
|
|
317
|
+
btnConfig.items.push(reupFile);
|
|
312
318
|
}
|
|
313
319
|
}
|
|
314
320
|
return h('div', [
|