ocpview-plus 0.0.1
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/LICENSE +0 -0
- package/README.md +0 -0
- package/dist/efviewplus.min.esm.js +99954 -0
- package/dist/efviewplus.min.js +142 -0
- package/dist/locale/lang.js +1 -0
- package/dist/locale/zh-CN.js +1 -0
- package/dist/locale/zh-TW.js +1 -0
- package/dist/locale/zh-UG.js +1 -0
- package/dist/style.css +9 -0
- package/dist/styles/efviewplus.css +1 -0
- package/package.json +144 -0
- package/src/components/base/controlbase.vue +191 -0
- package/src/components/base/controlbox.vue +102 -0
- package/src/components/base/index.js +3 -0
- package/src/components/base/load.js +20 -0
- package/src/components/base/probase.js +220 -0
- package/src/components/base/size.js +78 -0
- package/src/components/billbox/billbox.vue +68 -0
- package/src/components/billbox/index.js +2 -0
- package/src/components/cascaderbox/cascaderbox.vue +184 -0
- package/src/components/cascaderbox/index.js +2 -0
- package/src/components/checkbox/checkbox.vue +76 -0
- package/src/components/checkbox/checkgroupbox.vue +104 -0
- package/src/components/checkbox/index.js +3 -0
- package/src/components/colorbox/colorbox.vue +44 -0
- package/src/components/colorbox/index.js +2 -0
- package/src/components/combobox/combobox.vue +220 -0
- package/src/components/combobox/index.js +2 -0
- package/src/components/conditionbox/conditionbase.vue +195 -0
- package/src/components/conditionbox/conditionbox.vue +63 -0
- package/src/components/conditionbox/conditionfilterbox.vue +477 -0
- package/src/components/conditionbox/conditionselectorbox.vue +237 -0
- package/src/components/conditionbox/index.js +5 -0
- package/src/components/conditionbox/queryconditionbox.vue +26 -0
- package/src/components/conditionbox/queryconditionboxbase.vue +124 -0
- package/src/components/conditionbox/searchconditionbox.vue +114 -0
- package/src/components/conditionbox/searchgrid.vue +391 -0
- package/src/components/datebox/datebox.vue +129 -0
- package/src/components/datebox/daterangebox.vue +155 -0
- package/src/components/datebox/index.js +3 -0
- package/src/components/form/baseform.vue +677 -0
- package/src/components/form/detailsbox.vue +487 -0
- package/src/components/form/formbox.vue +29 -0
- package/src/components/form/formcardbox.vue +268 -0
- package/src/components/form/formcardgroupbox.vue +252 -0
- package/src/components/form/formcompro.js +19 -0
- package/src/components/form/formdetail.vue +129 -0
- package/src/components/form/formdetailtwo.vue +302 -0
- package/src/components/form/index.js +8 -0
- package/src/components/form/toolanchor.js +46 -0
- package/src/components/form/workform.vue +168 -0
- package/src/components/grid/basegrid.vue +1061 -0
- package/src/components/grid/editgrid.vue +51 -0
- package/src/components/grid/editgridbase.vue +947 -0
- package/src/components/grid/editgridcard.vue +193 -0
- package/src/components/grid/expandrow.vue +137 -0
- package/src/components/grid/index.js +6 -0
- package/src/components/grid/viewgrid.vue +122 -0
- package/src/components/grid/viewgridbase.vue +1284 -0
- package/src/components/icon/common-icon.vue +53 -0
- package/src/components/icon/eicon.vue +29 -0
- package/src/components/icon/icons.vue +42 -0
- package/src/components/icon/index.js +2 -0
- package/src/components/label/index.js +3 -0
- package/src/components/label/showtext.vue +95 -0
- package/src/components/load/loadcartoon.vue +228 -0
- package/src/components/map/index.js +2 -0
- package/src/components/map/mapbox.vue +348 -0
- package/src/components/masterplate/appendix.vue +586 -0
- package/src/components/masterplate/approval.vue +803 -0
- package/src/components/masterplate/base.vue +985 -0
- package/src/components/masterplate/billasyncimport.vue +614 -0
- package/src/components/masterplate/billconditionbox.vue +224 -0
- package/src/components/masterplate/billconditionsbox.vue +427 -0
- package/src/components/masterplate/billdetailform.vue +990 -0
- package/src/components/masterplate/billimport.vue +263 -0
- package/src/components/masterplate/billquerygrid.vue +316 -0
- package/src/components/masterplate/billsinglegrid.vue +234 -0
- package/src/components/masterplate/birtreport.vue +185 -0
- package/src/components/masterplate/detailbtntoolbar.vue +311 -0
- package/src/components/masterplate/detailsbox.vue +386 -0
- package/src/components/masterplate/editgridcard.vue +222 -0
- package/src/components/masterplate/editgridcard2.vue +109 -0
- package/src/components/masterplate/formcard.vue +106 -0
- package/src/components/masterplate/formcardgroupbox.vue +168 -0
- package/src/components/masterplate/formdetailtwo.vue +356 -0
- package/src/components/masterplate/gridcolset.vue +227 -0
- package/src/components/masterplate/index.js +23 -0
- package/src/components/masterplate/layouttemplate.vue +33 -0
- package/src/components/masterplate/leftlistrightdetails.vue +474 -0
- package/src/components/masterplate/leftlistrightlist.vue +465 -0
- package/src/components/masterplate/lefttreerightdetails.vue +619 -0
- package/src/components/masterplate/levelreport.vue +510 -0
- package/src/components/masterplate/listbtntoolbar.vue +257 -0
- package/src/components/masterplate/listdetails.vue +769 -0
- package/src/components/masterplate/operlog.vue +272 -0
- package/src/components/masterplate/options.vue +110 -0
- package/src/components/masterplate/page.vue +102 -0
- package/src/components/masterplate/promptmessage.vue +74 -0
- package/src/components/masterplate/querybar.vue +490 -0
- package/src/components/masterplate/report.vue +357 -0
- package/src/components/masterplate/rowbtntoolbar.vue +126 -0
- package/src/components/masterplate/simpletree.vue +129 -0
- package/src/components/masterplate/simpleviewgrid.vue +144 -0
- package/src/components/mychart/bar/bar.vue +202 -0
- package/src/components/mychart/basechart.vue +190 -0
- package/src/components/mychart/complexmychart/barline.vue +154 -0
- package/src/components/mychart/gauge/gauge.vue +83 -0
- package/src/components/mychart/index.js +9 -0
- package/src/components/mychart/line/line.vue +202 -0
- package/src/components/mychart/liquidfill/liquidfill.vue +109 -0
- package/src/components/mychart/pie/pie.vue +96 -0
- package/src/components/mychart/radar/radar.vue +122 -0
- package/src/components/mychart/scatter/scatter.vue +76 -0
- package/src/components/numberbox/append.js +11 -0
- package/src/components/numberbox/index.js +3 -0
- package/src/components/numberbox/numberbox.vue +303 -0
- package/src/components/numberbox/numberrangebox.vue +423 -0
- package/src/components/picturebox/filebox.vue +365 -0
- package/src/components/picturebox/index.js +3 -0
- package/src/components/picturebox/picturebox.vue +541 -0
- package/src/components/picturebox/uploadbox.vue +164 -0
- package/src/components/poptagbox/index.js +2 -0
- package/src/components/poptagbox/poptagbox.vue +389 -0
- package/src/components/poptextbox/index.js +2 -0
- package/src/components/poptextbox/poptextbox.vue +601 -0
- package/src/components/radiobox/index.js +2 -0
- package/src/components/radiobox/radiogroupbox.vue +76 -0
- package/src/components/richtextbox/editor.vue +150 -0
- package/src/components/richtextbox/index.js +2 -0
- package/src/components/richtextbox/richtextbox.vue +448 -0
- package/src/components/textbox/index.js +2 -0
- package/src/components/textbox/textbox.vue +98 -0
- package/src/components/timebox/index.js +2 -0
- package/src/components/timebox/timebox.vue +76 -0
- package/src/components/toolbar/ebutton.vue +169 -0
- package/src/components/toolbar/index.js +3 -0
- package/src/components/toolbar/toolbar.vue +446 -0
- package/src/components/tree/basetree.vue +725 -0
- package/src/components/tree/index.js +3 -0
- package/src/components/tree/treedata.vue +51 -0
- package/src/components/tree/treedatabase.vue +189 -0
- package/src/components/upload/billimport.vue +233 -0
- package/src/components/upload/index.js +2 -0
- package/src/components/videobox/index.js +2 -0
- package/src/components/videobox/uploadbox.vue +148 -0
- package/src/components/videobox/videobox.vue +503 -0
- package/src/components/wrichtextbox/editor.vue +219 -0
- package/src/components/wrichtextbox/index.js +2 -0
- package/src/components/wrichtextbox/wrichtextbox.vue +63 -0
- package/src/index.js +215 -0
- package/src/locale/format.js +51 -0
- package/src/locale/index.js +63 -0
- package/src/locale/lang/zh-CN.js +123 -0
- package/src/locale/lang/zh-TW.js +114 -0
- package/src/locale/lang/zh-UG.js +115 -0
- package/src/locale/lang.js +15 -0
- package/src/method/case/case.js +1180 -0
- package/src/method/config/queryconfig.js +24 -0
- package/src/method/const/const.js +815 -0
- package/src/method/index.js +8 -0
- package/src/static/excel/exportexcel.js +627 -0
- package/src/static/iview/coustom.js +463 -0
- package/src/store/index.js +19 -0
- package/src/store/modules/app.js +53 -0
- package/src/styles/README.md +3 -0
- package/src/styles/common.less +75 -0
- package/src/styles/components/anchor.less +74 -0
- package/src/styles/components/approval.less +136 -0
- package/src/styles/components/button.less +208 -0
- package/src/styles/components/card.less +51 -0
- package/src/styles/components/content.less +38 -0
- package/src/styles/components/font.less +314 -0
- package/src/styles/components/form.less +72 -0
- package/src/styles/components/iconfont/fonts/iconfont.less +1376 -0
- package/src/styles/components/iconfont/fonts/iconfont.svg +699 -0
- package/src/styles/components/iconfont/fonts/iconfont.ttf +0 -0
- package/src/styles/components/iconfont/fonts/iconfont.woff +0 -0
- package/src/styles/components/iconfont/fonts/iconfont.woff2 +0 -0
- package/src/styles/components/index.less +16 -0
- package/src/styles/components/input.less +290 -0
- package/src/styles/components/modal.less +203 -0
- package/src/styles/components/page.less +340 -0
- package/src/styles/components/select.less +361 -0
- package/src/styles/components/steps.less +367 -0
- package/src/styles/components/table.less +544 -0
- package/src/styles/components/tabs.less +249 -0
- package/src/styles/components/upload.less +83 -0
- package/src/styles/custom.less +67 -0
- package/src/styles/index.less +6 -0
- package/src/styles/pack.less +6 -0
- package/src/utils/EfuMessenger.js +155 -0
- package/src/utils/assist.js +353 -0
- package/src/utils/index.js +1 -0
- package/src/utils/random_str.js +10 -0
|
@@ -0,0 +1,985 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import load from '@/components/base/load';
|
|
3
|
+
import Cookies from 'js-cookie';
|
|
4
|
+
export default {
|
|
5
|
+
name:'mbase',
|
|
6
|
+
mixins: [load],
|
|
7
|
+
data() {
|
|
8
|
+
return {
|
|
9
|
+
globalConfig:{
|
|
10
|
+
dictkey:[],
|
|
11
|
+
dictData:{},
|
|
12
|
+
userModuleMethod:[],
|
|
13
|
+
modulecode:'',
|
|
14
|
+
billmain:{},
|
|
15
|
+
dictgroupkey:[]
|
|
16
|
+
},
|
|
17
|
+
billapproveurl:'',
|
|
18
|
+
billKey:'ph_key',
|
|
19
|
+
uiconfig:{},
|
|
20
|
+
uiproconfig:[],
|
|
21
|
+
usercustominfo:{},
|
|
22
|
+
cout:0,
|
|
23
|
+
showDetailAppendix:false,
|
|
24
|
+
detalAppendixFlag:true,
|
|
25
|
+
billDetailAppendixConfig:{
|
|
26
|
+
showTitle:false,
|
|
27
|
+
scenetype:'4'
|
|
28
|
+
},
|
|
29
|
+
billAsyncImportConfig:{
|
|
30
|
+
|
|
31
|
+
},
|
|
32
|
+
billImportConfig:{
|
|
33
|
+
importKey:'billno',
|
|
34
|
+
typeData:[]
|
|
35
|
+
},
|
|
36
|
+
importReset:true,
|
|
37
|
+
printModeReset:true,
|
|
38
|
+
showBillPrintMode:false,
|
|
39
|
+
showAsyncImportExport:false,
|
|
40
|
+
showBillContPrintMode:false,
|
|
41
|
+
showPrintMode:false,
|
|
42
|
+
billprintModeUrl:'/mall-sysconf-vue/#/billdataprint?modulecode={modulecode}&dataid={dataid}&mktcode={mktcode}&token={token}',
|
|
43
|
+
printModeUrl:'',
|
|
44
|
+
eventObject:['valueChanged','setDataBefore','searchBefore','cellbeginedit','importSuccess','addRowBefore','indexMethod','delRowBefore','delRowAfter','onSelectionChange','formatValue','updateCellConfig','overrideSearchParam','overrideData','refurbishCheck','onSingleChange','onSetRowCheck','onSelect','onSelectCancel','onSelectionChange','customSummary','customImgPath','onDelTag','onSearch','onAppend','filterData','onAddTag','getDictData','setLabel','setImportUrl','onLinkTo','newSaveFormBefore','setQueryConfig','setNodeClass','setTreeNodeIcon','rowClassName','customSummaryGroup','disabledDate']
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
computed: {
|
|
48
|
+
uiLayoutType () {
|
|
49
|
+
return 'm' + this.uiconfig.layoutType;
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
created () {
|
|
53
|
+
if (JSON.stringify(this.config) !== '{}') {
|
|
54
|
+
if (this.config.eventObject) {
|
|
55
|
+
Object.assign(this,this.config.eventObject);
|
|
56
|
+
}
|
|
57
|
+
this.uiconfig = Object.assign({},this.uiconfig, this.config);
|
|
58
|
+
delete this.uiconfig.eventObject;
|
|
59
|
+
this.init();
|
|
60
|
+
if (this.customInit) {
|
|
61
|
+
this.customInit();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
props:{
|
|
67
|
+
config: {
|
|
68
|
+
type:Object,
|
|
69
|
+
default () {
|
|
70
|
+
return {};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
} ,
|
|
74
|
+
methods:{
|
|
75
|
+
initConfig(config,obj) {
|
|
76
|
+
this.uiconfig = config;
|
|
77
|
+
Object.assign(this,obj);
|
|
78
|
+
this.init();
|
|
79
|
+
if (this.customInit) {
|
|
80
|
+
this.customInit();
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
saveGridCol (obj) {
|
|
84
|
+
let para = {};
|
|
85
|
+
para.aid = Cookies.get('user_id') ? Cookies.get('user_id'): 0 ;
|
|
86
|
+
para.sid = Cookies.get('stationId') ? Cookies.get('stationId'): 0 ;
|
|
87
|
+
para.modulecode = this.globalConfig.modulecode;
|
|
88
|
+
para.colset = JSON.stringify(obj.para);
|
|
89
|
+
this.asyncPost(this.OmdUrl.amp, 'usercenter.usercustominfo.saveColset', para, function (data) {
|
|
90
|
+
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
saveScene (obj) {
|
|
94
|
+
let para = {};
|
|
95
|
+
para.aid = Cookies.get('user_id') ? Cookies.get('user_id'): 0 ;
|
|
96
|
+
para.sid = Cookies.get('stationId') ? Cookies.get('stationId'): 0 ;
|
|
97
|
+
para.modulecode = this.globalConfig.modulecode;
|
|
98
|
+
para.filterscene = JSON.stringify(obj.para);
|
|
99
|
+
this.asyncPost(this.OmdUrl.amp, 'usercenter.usercustominfo.saveScene', para, function (data) {
|
|
100
|
+
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
getUserCustomInfo () {
|
|
104
|
+
let self = this;
|
|
105
|
+
let para = {};
|
|
106
|
+
para.aid = Cookies.get('user_id') ? Cookies.get('user_id'): 0 ;
|
|
107
|
+
para.sid = Cookies.get('stationId') ? Cookies.get('stationId'): 0 ;
|
|
108
|
+
para.modulecode = this.globalConfig.modulecode;
|
|
109
|
+
self.synchroPost(this.OmdUrl.amp, 'usercenter.usercustominfo.getUserInfo', para, function (data) {
|
|
110
|
+
if (data.usercustominfo) {
|
|
111
|
+
self.usercustominfo = data.usercustominfo;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
},
|
|
115
|
+
getUiCustomInfo () {
|
|
116
|
+
let self = this;
|
|
117
|
+
let para = {};
|
|
118
|
+
para.modulecode = this.globalConfig.modulecode;
|
|
119
|
+
self.synchroPost(this.OmdUrl.amp, 'usercenter.uiproconfig.search', para, function (data) {
|
|
120
|
+
if (data.uiproconfig && data.uiproconfig.length > 0 && data.uiproconfig[0].layoutPro) {
|
|
121
|
+
self.uiproconfig = JSON.parse(data.uiproconfig[0].layoutPro);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
},
|
|
125
|
+
init() {
|
|
126
|
+
// 处理模块号提示
|
|
127
|
+
this.globalConfig.modulecode = this.$Method.getUrlParam('modulecode');
|
|
128
|
+
if (!this.globalConfig.modulecode) {
|
|
129
|
+
this.globalConfig.modulecode = this.$Method.getUrlParam('billmoduleid');
|
|
130
|
+
}
|
|
131
|
+
if (this.billmoduleid) {
|
|
132
|
+
this.globalConfig.modulecode = this.billmoduleid;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if ( this.uiconfig.layoutType !== 'BirtReport') {
|
|
136
|
+
if (this.OmdUrl[this.uiconfig.resources]) {
|
|
137
|
+
this.uiconfig.resources = this.OmdUrl[this.uiconfig.resources];
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (this.uiconfig.billKey) {
|
|
142
|
+
this.billKey = this.uiconfig.billKey;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
this.setUserModuleMethod();
|
|
146
|
+
this.getUiCustomInfo();
|
|
147
|
+
let tmp = {};
|
|
148
|
+
this.initUiConfig(this.uiconfig,tmp);
|
|
149
|
+
this.initUiCustomConfig();
|
|
150
|
+
if (this.uiconfig.layoutType === 'ListDetails') {
|
|
151
|
+
this.getUserCustomInfo();
|
|
152
|
+
this.uiconfig.billQueryConfig.usercustominfo = this.$Method.copy(this.usercustominfo);
|
|
153
|
+
if (this.billisworkflow) {
|
|
154
|
+
this.uiconfig.detailConfig.billisworkflow = this.billisworkflow;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (this.billapproveurl) {
|
|
158
|
+
this.uiconfig.detailConfig.billapproveurl = this.billapproveurl;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (this.uiconfig.billImportConfig) {
|
|
162
|
+
this.billImportConfig = Object.assign({}, {}, this.uiconfig.billImportConfig);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if(this.showAsyncImportExport) {
|
|
166
|
+
if(this.uiconfig.billImportConfig) {
|
|
167
|
+
this.billAsyncImportConfig = Object.assign({}, this.billAsyncImportConfig, this.uiconfig.billImportConfig);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (!this.billAsyncImportConfig.resources) {
|
|
171
|
+
this.billAsyncImportConfig.resources = this.uiconfig.resources;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
this.uiconfig.showAsyncImportExport = this.showAsyncImportExport;
|
|
176
|
+
if (this.uiconfig.detailConfig) {
|
|
177
|
+
this.uiconfig.detailConfig.showAsyncImportExport = this.showAsyncImportExport;
|
|
178
|
+
}
|
|
179
|
+
if (this.showBillPrintMode || this.showBillContPrintMode) {
|
|
180
|
+
if (!this.uiconfig.billPrintConfig) {
|
|
181
|
+
this.uiconfig.billPrintConfig = {};
|
|
182
|
+
}
|
|
183
|
+
this.uiconfig.billPrintConfig.showPrint = this.showBillPrintMode;
|
|
184
|
+
this.uiconfig.billPrintConfig.showContPrint = this.showBillContPrintMode;
|
|
185
|
+
}
|
|
186
|
+
let accounType = Cookies.get('accounType');
|
|
187
|
+
if (accounType) {
|
|
188
|
+
if (accounType === '1' || accounType === '2') {
|
|
189
|
+
this.uiconfig.menuToolbar.enablePermissions = false;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
this.setDictData();
|
|
193
|
+
this.importReset = false;
|
|
194
|
+
this.$nextTick(() => {
|
|
195
|
+
this.importReset = true;
|
|
196
|
+
});
|
|
197
|
+
},
|
|
198
|
+
initUiConfig(obj,tmp) {
|
|
199
|
+
if (obj instanceof Array) {
|
|
200
|
+
obj.forEach(el => {
|
|
201
|
+
this.initUiConfig(el,tmp);
|
|
202
|
+
})
|
|
203
|
+
} else {
|
|
204
|
+
if (obj instanceof Object) {
|
|
205
|
+
for (let pro in obj) {
|
|
206
|
+
if (obj[pro] instanceof Array || obj[pro] instanceof Object) {
|
|
207
|
+
if (pro === 'data') {
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
this.initUiConfig(obj[pro],tmp);
|
|
211
|
+
} else {
|
|
212
|
+
if (pro === 'dictkey') {
|
|
213
|
+
if (!tmp[obj[pro]]) {
|
|
214
|
+
tmp[obj[pro]] = 'Y';
|
|
215
|
+
this.globalConfig.dictkey.push(obj[pro]);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
if (this._isFun(pro)) {
|
|
219
|
+
obj[pro] = this[obj[pro]];
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
initUiCustomConfig () {
|
|
228
|
+
this.uiproconfig.forEach(el => {
|
|
229
|
+
if (el.pro && el.pro.length > 0) {
|
|
230
|
+
if (el.isflag === '1') {
|
|
231
|
+
if (this.uiconfig.layoutType === 'ListDetails') {
|
|
232
|
+
el.pro.forEach(el2 => {
|
|
233
|
+
this.commonUiCustomConfig(el2,this.uiconfig.billQueryConfig.gridConfig.items);
|
|
234
|
+
})
|
|
235
|
+
}
|
|
236
|
+
if (this.uiconfig.layoutType === 'LeftListRightList' || this.uiconfig.layoutType === 'LeftListRightDetails') {
|
|
237
|
+
el.pro.forEach(el2 => {
|
|
238
|
+
this.commonUiCustomConfig(el2,this.uiconfig.gridConfig.items);
|
|
239
|
+
})
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
if (el.isflag === '2') {
|
|
243
|
+
if (this.uiconfig.layoutType === 'ListDetails' || this.uiconfig.layoutType === 'LeftListRightDetails' || this.uiconfig.layoutType === 'LeftTreeRightDetails') {
|
|
244
|
+
el.pro.forEach(el2 => {
|
|
245
|
+
this.commonUiCustomConfig2(el2,this.uiconfig.detailConfig.formsConfig.items);
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
if (el.isflag === '3') {
|
|
250
|
+
if (this.uiconfig.layoutType === 'ListDetails' || this.uiconfig.layoutType === 'LeftListRightDetails' || this.uiconfig.layoutType === 'LeftTreeRightDetails') {
|
|
251
|
+
let index = this.uiconfig.detailConfig.formsConfig.items.findIndex(el3 => el3.name === el.typename);
|
|
252
|
+
if (index > -1) {
|
|
253
|
+
el.pro.forEach(el2 => {
|
|
254
|
+
this.commonUiCustomConfig(el2,this.uiconfig.detailConfig.formsConfig.items[index].items);
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
if (el.isflag === '4') {
|
|
261
|
+
if (this.uiconfig.layoutType === 'ListDetails' || this.uiconfig.layoutType === 'LeftListRightDetails' || this.uiconfig.layoutType === 'LeftTreeRightDetails') {
|
|
262
|
+
if (this.uiconfig.detailConfig.billDetailConfig && this.uiconfig.detailConfig.billDetailConfig.items) {
|
|
263
|
+
el.pro.forEach(el2 => {
|
|
264
|
+
this.commonUiCustomConfig2(el2,this.uiconfig.detailConfig.billDetailConfig.items);
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
if (this.uiconfig.layoutType === 'LeftListRightList') {
|
|
269
|
+
el.pro.forEach(el2 => {
|
|
270
|
+
this.commonUiCustomConfig2(el2,this.uiconfig.detailGridsConfig);
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
if (el.isflag === '5') {
|
|
275
|
+
if (this.uiconfig.layoutType === 'ListDetails' || this.uiconfig.layoutType === 'LeftListRightDetails' || this.uiconfig.layoutType === 'LeftTreeRightDetails') {
|
|
276
|
+
if (this.uiconfig.detailConfig.billDetailConfig && this.uiconfig.detailConfig.billDetailConfig.items) {
|
|
277
|
+
let index = this.uiconfig.detailConfig.billDetailConfig.items.findIndex(el3 => el3.name === el.typename);
|
|
278
|
+
if (index > -1) {
|
|
279
|
+
el.pro.forEach(el2 => {
|
|
280
|
+
if (this.uiconfig.detailConfig.billDetailConfig.items[index].type === 'EditGridCard') {
|
|
281
|
+
this.commonUiCustomConfig(el2,this.uiconfig.detailConfig.billDetailConfig.items[index].items);
|
|
282
|
+
} else {
|
|
283
|
+
this.commonUiCustomConfig(el2,this.uiconfig.detailConfig.billDetailConfig.items[index].formCondig.items);
|
|
284
|
+
this.commonUiCustomConfig(el2,this.uiconfig.detailConfig.billDetailConfig.items[index].gridCondig.items);
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
if (this.uiconfig.layoutType === 'LeftListRightList') {
|
|
291
|
+
let index = this.uiconfig.detailGridsConfig.findIndex(el3 => el3.name === el.typename);
|
|
292
|
+
if (index > -1) {
|
|
293
|
+
el.pro.forEach(el2 => {
|
|
294
|
+
this.commonUiCustomConfig(el2,this.uiconfig.detailGridsConfig.items[index].items);
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if (this.uiconfig.layoutType === 'BillSingleGrid') {
|
|
300
|
+
el.pro.forEach(el2 => {
|
|
301
|
+
this.commonUiCustomConfig(el2,this.uiconfig.gridConfig.items);
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
},
|
|
309
|
+
commonUiCustomConfig(obj,items) {
|
|
310
|
+
let index = items.findIndex(el => el.name === obj.fieldname || el.sname === obj.fieldname);
|
|
311
|
+
if (index > -1) {
|
|
312
|
+
let tmp = {};
|
|
313
|
+
if (obj.fieldtext) {
|
|
314
|
+
tmp.label = obj.fieldtext
|
|
315
|
+
}
|
|
316
|
+
if (obj.fieldwidth) {
|
|
317
|
+
tmp.width = Number(obj.fieldwidth);
|
|
318
|
+
}
|
|
319
|
+
if (obj.fieldcol) {
|
|
320
|
+
tmp.colNum = Number(obj.fieldcol);
|
|
321
|
+
}
|
|
322
|
+
if (obj.fieldvisible) {
|
|
323
|
+
tmp.visible = false;
|
|
324
|
+
}
|
|
325
|
+
if (obj.fieldrequired) {
|
|
326
|
+
tmp.required = true;
|
|
327
|
+
}
|
|
328
|
+
if (obj.defaultValue) {
|
|
329
|
+
tmp.defaultValue = obj.defaultValue;
|
|
330
|
+
}
|
|
331
|
+
Object.assign(items[index], tmp);
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
commonUiCustomConfig2(obj,items) {
|
|
335
|
+
let index = items.findIndex(el => el.name === obj.fieldname );
|
|
336
|
+
if (index > -1) {
|
|
337
|
+
let tmp = {};
|
|
338
|
+
if (obj.fieldtext) {
|
|
339
|
+
tmp.title = obj.fieldtext
|
|
340
|
+
}
|
|
341
|
+
if (obj.fieldvisible) {
|
|
342
|
+
tmp.visible = false;
|
|
343
|
+
}
|
|
344
|
+
Object.assign(items[index], tmp);
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
_isFun (pro) {
|
|
348
|
+
let index = this.eventObject.findIndex(el => el === pro);
|
|
349
|
+
if (index > -1) {
|
|
350
|
+
return true;
|
|
351
|
+
} else {
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
setDictData() {
|
|
356
|
+
// 调用字典方法
|
|
357
|
+
if (this.globalConfig.dictkey.length > 0) {
|
|
358
|
+
const dictkey = this.globalConfig.dictkey.join(',');
|
|
359
|
+
this.globalConfig.dictData = this.getDict(dictkey,'code,name,pcode,pro1,ddvalue');
|
|
360
|
+
}
|
|
361
|
+
// 自定义添加
|
|
362
|
+
if (this.initUserDict) {
|
|
363
|
+
Object.assign(this.globalConfig.dictData, this.initUserDict());
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
setUserModuleMethod() {
|
|
367
|
+
let data = this.getUserModuleMethod(this.globalConfig.modulecode);
|
|
368
|
+
if (data) {
|
|
369
|
+
if (data.modulemethod) {
|
|
370
|
+
this.globalConfig.userModuleMethod = this.$Method.copy(data.modulemethod);
|
|
371
|
+
}
|
|
372
|
+
if (data.billisworkflow) {
|
|
373
|
+
this.billisworkflow = data.billisworkflow;
|
|
374
|
+
}
|
|
375
|
+
if (data.billapproveurl) {
|
|
376
|
+
this.billapproveurl = data.billapproveurl;
|
|
377
|
+
}
|
|
378
|
+
if (data.uipro) {
|
|
379
|
+
let pro = JSON.parse(data.uipro);
|
|
380
|
+
if (pro.asyncImportExport === 'Y') {
|
|
381
|
+
this.showAsyncImportExport = true;
|
|
382
|
+
}
|
|
383
|
+
if (pro.printMode === 'Y') {
|
|
384
|
+
this.showBillPrintMode = true;
|
|
385
|
+
}
|
|
386
|
+
if (pro.contPrintMode === 'Y') {
|
|
387
|
+
this.showBillContPrintMode = true;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
openDetailAppendix(e) {
|
|
393
|
+
this.$refs.detailappendix.setReadOnly(e.readOnly);
|
|
394
|
+
let data = this.getData();
|
|
395
|
+
let obj = {};
|
|
396
|
+
obj.billno = data[this.billKey];
|
|
397
|
+
obj.billmoduleid = this.globalConfig.modulecode
|
|
398
|
+
obj.idkey = e.rowinfo.row.ph_key;
|
|
399
|
+
if (this.setDetailAppendix) {
|
|
400
|
+
obj = this.setDetailAppendix(obj,e.rowinfo);
|
|
401
|
+
}
|
|
402
|
+
if (!obj.idkey) {
|
|
403
|
+
this.alert('未设定附件绑定信息');
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
this.$refs.detailappendix.setData(obj.billno,obj.billmoduleid,obj.idkey);
|
|
407
|
+
this.$nextTick(() => {
|
|
408
|
+
if (e.readOnly) {
|
|
409
|
+
let data = this.$refs.detailappendix.getData();
|
|
410
|
+
if (data.length === 0) {
|
|
411
|
+
this.alert('没有附件可查看');
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
this.showDetailAppendix = true;
|
|
416
|
+
})
|
|
417
|
+
},
|
|
418
|
+
doAction (action) {
|
|
419
|
+
if (!action.name) {
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
if (action.name === 'actionappendix') {
|
|
423
|
+
this.openDetailAppendix(action);
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
const method = action.name;
|
|
427
|
+
if (this[method]) {
|
|
428
|
+
this[method](action);
|
|
429
|
+
} else {
|
|
430
|
+
this.doPost(action);
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
getActionMethod(action) {
|
|
434
|
+
let name = action.name;
|
|
435
|
+
const type = action.name;
|
|
436
|
+
if (type === 'addData') {
|
|
437
|
+
name = 'save';
|
|
438
|
+
}
|
|
439
|
+
if (type === 'saveData') {
|
|
440
|
+
name = 'save';
|
|
441
|
+
}
|
|
442
|
+
if (type === 'delData') {
|
|
443
|
+
name = 'save';
|
|
444
|
+
}
|
|
445
|
+
if (type === 'auditData') {
|
|
446
|
+
name = 'billaudit';
|
|
447
|
+
}
|
|
448
|
+
if (type === 'cancelData') {
|
|
449
|
+
name = 'billcancel';
|
|
450
|
+
}
|
|
451
|
+
if (type === 'voidData') {
|
|
452
|
+
name = 'billvoid';
|
|
453
|
+
}
|
|
454
|
+
if (type === 'billImport' || type === 'importExcel') {
|
|
455
|
+
name = 'importexcel';
|
|
456
|
+
}
|
|
457
|
+
if (type === 'copyData') {
|
|
458
|
+
name = 'copy';
|
|
459
|
+
}
|
|
460
|
+
if (type === 'submitData') {
|
|
461
|
+
name = 'billsubmit';
|
|
462
|
+
}
|
|
463
|
+
if (type === 'revokeData') {
|
|
464
|
+
name = 'billrepeal';
|
|
465
|
+
}
|
|
466
|
+
if (this.getCustomActionMethod) {
|
|
467
|
+
const temp = this.getCustomActionMethod(type, name);
|
|
468
|
+
if(temp) {
|
|
469
|
+
name = temp;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
return name;
|
|
473
|
+
},
|
|
474
|
+
doPost(action) {
|
|
475
|
+
let flag = true;
|
|
476
|
+
let self = this;
|
|
477
|
+
this.loadingtext = self.getActionName(action);
|
|
478
|
+
const methodAfter = action.name + 'After';
|
|
479
|
+
let method = this.uiconfig.classPrefix + '.' + this.getActionMethod(action);
|
|
480
|
+
this.showLoading();
|
|
481
|
+
let postData = action.para;
|
|
482
|
+
if (action.name === 'saveData') {
|
|
483
|
+
postData = this.$refs.layout.getChangeData();
|
|
484
|
+
}
|
|
485
|
+
if (this.setChangeData) {
|
|
486
|
+
postData = this.setChangeData(action);
|
|
487
|
+
}
|
|
488
|
+
self.asyncPost(this.uiconfig.resources, method, postData, function(data){
|
|
489
|
+
let msg = self.loadingtext +'成功!';
|
|
490
|
+
if (data.msg) {
|
|
491
|
+
msg = data.msg;
|
|
492
|
+
}
|
|
493
|
+
self.hideLoading();
|
|
494
|
+
self.$nextTick(() =>{
|
|
495
|
+
setTimeout(() => {
|
|
496
|
+
self.alert(msg,null,3);
|
|
497
|
+
}, 250);
|
|
498
|
+
});
|
|
499
|
+
|
|
500
|
+
if (self.$refs.layout.setPhkey) {
|
|
501
|
+
if (data instanceof Array) {
|
|
502
|
+
if (data.length > 0) {
|
|
503
|
+
self.$refs.layout.setPhkey(data[0][self.billKey]);
|
|
504
|
+
}
|
|
505
|
+
} else {
|
|
506
|
+
if (data[self.billKey]) {
|
|
507
|
+
self.$refs.layout.setPhkey(data[self.billKey]);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
if (self[methodAfter]) {
|
|
514
|
+
self[methodAfter](data);
|
|
515
|
+
}
|
|
516
|
+
if (action.onOk) {
|
|
517
|
+
action.onOk(action, data);
|
|
518
|
+
}
|
|
519
|
+
},function(data) {
|
|
520
|
+
const msg = self.loadingtext +'失败!' + data;
|
|
521
|
+
self.hideLoading();
|
|
522
|
+
self.$nextTick(() =>{
|
|
523
|
+
setTimeout(() => {
|
|
524
|
+
self.alert(msg,null,2);
|
|
525
|
+
}, 250);
|
|
526
|
+
});
|
|
527
|
+
flag = false;
|
|
528
|
+
},function(data) {
|
|
529
|
+
const msg = self.loadingtext +'异常!' + data;
|
|
530
|
+
self.hideLoading();
|
|
531
|
+
self.$nextTick(() =>{
|
|
532
|
+
setTimeout(() => {
|
|
533
|
+
self.alert(msg,null,2);
|
|
534
|
+
}, 250);
|
|
535
|
+
});
|
|
536
|
+
flag = false;
|
|
537
|
+
});
|
|
538
|
+
return flag;
|
|
539
|
+
},
|
|
540
|
+
getActionName(action) {
|
|
541
|
+
let btnConfig = this.globalConfig.userModuleMethod.find(el => el.name === action.name);
|
|
542
|
+
if (!btnConfig) {
|
|
543
|
+
btnConfig = this.uiconfig.menuToolbar.items.find(el => el.name === action.name);
|
|
544
|
+
}
|
|
545
|
+
let text = '';
|
|
546
|
+
if (btnConfig && btnConfig.text) {
|
|
547
|
+
text = btnConfig.text;
|
|
548
|
+
}
|
|
549
|
+
if (this.getCustomActionName) {
|
|
550
|
+
const temp = this.getCustomActionName(action.name, text);
|
|
551
|
+
if(temp) {
|
|
552
|
+
text = temp;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
return text;
|
|
556
|
+
},
|
|
557
|
+
// 下载导入模版
|
|
558
|
+
downTemplate() {
|
|
559
|
+
const url = this.uiconfig.resources;
|
|
560
|
+
let param = this.getDownTemplateParam();
|
|
561
|
+
let billImport = this.getBillImport();
|
|
562
|
+
billImport.setModeltype('down');
|
|
563
|
+
billImport.setDownUrl(url,param);
|
|
564
|
+
},
|
|
565
|
+
asyncExport(grid) {
|
|
566
|
+
this.$refs.billAsyncImport.setResources(this.uiconfig.resources)
|
|
567
|
+
this.$refs.billAsyncImport.setModeltype('export');
|
|
568
|
+
this.$nextTick(() => {
|
|
569
|
+
this.$refs.billAsyncImport.initData(null,this.globalConfig.modulecode,grid);
|
|
570
|
+
this.$refs.billAsyncImport.setShowUpload(true);
|
|
571
|
+
})
|
|
572
|
+
|
|
573
|
+
},
|
|
574
|
+
getDownTemplateParam () {
|
|
575
|
+
if (this.customGetDownTemplateParam) {
|
|
576
|
+
return this.customGetDownTemplateParam();
|
|
577
|
+
} else {
|
|
578
|
+
let obj = {};
|
|
579
|
+
obj.billmoduleid = this.globalConfig.modulecode;
|
|
580
|
+
return obj;
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
// 导入
|
|
584
|
+
billImport(action) {
|
|
585
|
+
const url = this.uiconfig.resources;
|
|
586
|
+
const method = this.uiconfig.classPrefix + '.' + this.getActionMethod(action);
|
|
587
|
+
let para = this.getImportParam();
|
|
588
|
+
if (this.showAsyncImportExport) {
|
|
589
|
+
this.$refs.billAsyncImport.setResources(url);
|
|
590
|
+
this.$refs.billAsyncImport.setModeltype('upload');
|
|
591
|
+
this.$nextTick(() => {
|
|
592
|
+
this.$refs.billAsyncImport.setUrl(url,method,para);
|
|
593
|
+
this.$refs.billAsyncImport.initData(para.billno,null);
|
|
594
|
+
this.$refs.billAsyncImport.setShowUpload(true);
|
|
595
|
+
});
|
|
596
|
+
} else {
|
|
597
|
+
let billImport = this.getBillImport();
|
|
598
|
+
billImport.setModeltype('upload');
|
|
599
|
+
billImport.setUrl(url,method,para);
|
|
600
|
+
billImport.setShowUpload(true);
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
// 导入
|
|
604
|
+
importExcel() {
|
|
605
|
+
const url =this.uiconfig.resources;
|
|
606
|
+
const classPrefix = this.uiconfig.classPrefix ;
|
|
607
|
+
let para = this.getImportParam();
|
|
608
|
+
let billImport = this.getBillImport();
|
|
609
|
+
billImport.setUrl(url,classPrefix,para);
|
|
610
|
+
billImport.setShowUpload(true);
|
|
611
|
+
},
|
|
612
|
+
getBillImport() {
|
|
613
|
+
return this.$refs.billImport;
|
|
614
|
+
},
|
|
615
|
+
getImportParam () {
|
|
616
|
+
if (this.customGetImportParam) {
|
|
617
|
+
return this.customGetImportParam();
|
|
618
|
+
} else {
|
|
619
|
+
let data = this.getData();
|
|
620
|
+
let obj = {};
|
|
621
|
+
obj[this.billKey] = data[this.billKey];
|
|
622
|
+
let name = 'billno';
|
|
623
|
+
if (this.uiconfig.billImportConfig.importKey) {
|
|
624
|
+
name = this.uiconfig.billImportConfig.importKey;
|
|
625
|
+
}
|
|
626
|
+
obj.billno = data[name];
|
|
627
|
+
obj.billmoduleid = this.globalConfig.modulecode;
|
|
628
|
+
return obj;
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
getHeadForm(name){
|
|
632
|
+
if (this.$refs.layout && this.$refs.layout.getForm && this.$refs.layout.getForm()) {
|
|
633
|
+
return this.$refs.layout.getForm().getForm(name);
|
|
634
|
+
} else {
|
|
635
|
+
return null;
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
getDetail(name){
|
|
639
|
+
if (this.$refs.layout && this.$refs.layout.getForm && this.$refs.layout.getForm()) {
|
|
640
|
+
return this.$refs.layout.getForm().getDetail(name);
|
|
641
|
+
} else {
|
|
642
|
+
return null;
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
getForm() {
|
|
646
|
+
if (this.$refs.layout && this.$refs.layout.getForm) {
|
|
647
|
+
return this.$refs.layout.getForm();
|
|
648
|
+
} else {
|
|
649
|
+
return null;
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
getData() {
|
|
653
|
+
if (this.$refs.layout && this.$refs.layout.getData) {
|
|
654
|
+
return this.$refs.layout.getData();
|
|
655
|
+
} else {
|
|
656
|
+
return null;
|
|
657
|
+
}
|
|
658
|
+
},
|
|
659
|
+
getTree () {
|
|
660
|
+
if (this.$refs.layout && this.$refs.layout.getTree) {
|
|
661
|
+
return this.$refs.layout.getTree();
|
|
662
|
+
} else {
|
|
663
|
+
return null;
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
getTreeCondition() {
|
|
667
|
+
if (this.$refs.layout && this.$refs.layout.getTreeCondition) {
|
|
668
|
+
return this.$refs.layout.getTreeCondition();
|
|
669
|
+
} else {
|
|
670
|
+
return null;
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
getBillQureyGrid () {
|
|
674
|
+
if (this.$refs.layout && this.$refs.layout.getBillQureyGrid) {
|
|
675
|
+
return this.$refs.layout.getBillQureyGrid();
|
|
676
|
+
} else {
|
|
677
|
+
return null;
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
getMenuToolbar() {
|
|
681
|
+
if (this.$refs.layout && this.$refs.layout.getMenuToolbar) {
|
|
682
|
+
return this.$refs.layout.getMenuToolbar();
|
|
683
|
+
} else {
|
|
684
|
+
return null;
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
getGrid () {
|
|
688
|
+
if (this.$refs.layout && this.$refs.layout.getGrid) {
|
|
689
|
+
return this.$refs.layout.getGrid();
|
|
690
|
+
} else {
|
|
691
|
+
return null;
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
changedStatus(value) {
|
|
695
|
+
this.$refs.layout.changedStatus(value);
|
|
696
|
+
},
|
|
697
|
+
initForm(data) {
|
|
698
|
+
this.$refs.layout.initForm(data);
|
|
699
|
+
},
|
|
700
|
+
refurbish(value) {
|
|
701
|
+
this.$refs.layout.refurbish(value);
|
|
702
|
+
},
|
|
703
|
+
setDetailVisible(name, value) {
|
|
704
|
+
this.$refs.layout.setDetailVisible(name, value);
|
|
705
|
+
},
|
|
706
|
+
getSelectedNode(){
|
|
707
|
+
if (this.$refs.layout && this.$refs.layout.getSelectedNode) {
|
|
708
|
+
return this.$refs.layout.getSelectedNode();
|
|
709
|
+
} else {
|
|
710
|
+
return null;
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
getDetailGrids(name) {
|
|
714
|
+
if (this.$refs.layout && this.$refs.layout.getDetailGrids) {
|
|
715
|
+
return this.$refs.layout.getDetailGrids(name);
|
|
716
|
+
} else {
|
|
717
|
+
return null;
|
|
718
|
+
}
|
|
719
|
+
},
|
|
720
|
+
setEffectData(data) {
|
|
721
|
+
this.$refs.layout.setEffectData(data);
|
|
722
|
+
},
|
|
723
|
+
getReportConfig () {
|
|
724
|
+
let reportfile = '';
|
|
725
|
+
let self = this;
|
|
726
|
+
let searchParam = {'moduleid': this.globalConfig.modulecode};
|
|
727
|
+
self.synchroPost(this.OmdUrl.mall, 'mss.base.reportconfig.search', searchParam, function (data) {
|
|
728
|
+
if (data.reportconfig && data.reportconfig.length > 0) {
|
|
729
|
+
reportfile =data.reportconfig[0].reportfile;
|
|
730
|
+
}
|
|
731
|
+
});
|
|
732
|
+
return reportfile;
|
|
733
|
+
},
|
|
734
|
+
initBillApprovalData(obj) {
|
|
735
|
+
let self = this;
|
|
736
|
+
self.synchroPost(this.OmdUrl.mallmaster, 'master.mdm.portal.refurbishBillApproval', obj, function (data) {
|
|
737
|
+
});
|
|
738
|
+
},
|
|
739
|
+
setDetailAppendixConfig(obj) {
|
|
740
|
+
this.billDetailAppendixConfig = Object.assign({},this.billDetailAppendixConfig,obj);
|
|
741
|
+
this.detalAppendixFlag = false;
|
|
742
|
+
this.$nextTick(() => {
|
|
743
|
+
this.detalAppendixFlag = true;
|
|
744
|
+
});
|
|
745
|
+
},
|
|
746
|
+
itemPrintConfig(tmpvalue,list) {
|
|
747
|
+
let value = this.$Method.copy(tmpvalue);
|
|
748
|
+
if (value.type !== 'selection' && value.type !== 'index' && value.type !== 'PictureBox' && value.type !== 'FileBox' && value.type !== 'VideoBox') {
|
|
749
|
+
let printConfig = {};
|
|
750
|
+
printConfig.printname = value.label;
|
|
751
|
+
printConfig.printtype = '4';
|
|
752
|
+
let pro = {};
|
|
753
|
+
if (value.type === 'ComboBox') {
|
|
754
|
+
if (!value.data) {
|
|
755
|
+
if (value.dictkey) {
|
|
756
|
+
value.data = this.globalConfig.dictData[value.dictkey];
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
for (let el in value) {
|
|
761
|
+
if (typeof value[el] !== "function") {
|
|
762
|
+
pro[el] = value[el];
|
|
763
|
+
if (el === 'data') {
|
|
764
|
+
let data = [];
|
|
765
|
+
if (value[el]) {
|
|
766
|
+
let textField = 'name';
|
|
767
|
+
let valueField = 'code';
|
|
768
|
+
if (value.textField) {
|
|
769
|
+
textField = value.textField;
|
|
770
|
+
}
|
|
771
|
+
if (value.valueField) {
|
|
772
|
+
valueField = value.valueField;
|
|
773
|
+
}
|
|
774
|
+
value[el].forEach(el2 => {
|
|
775
|
+
let tmp = {};
|
|
776
|
+
tmp[textField] = el2[textField];
|
|
777
|
+
tmp[valueField] = el2[valueField];
|
|
778
|
+
data.push(tmp);
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
pro.data = data;
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
if ('{}' != JSON.stringify(pro)) {
|
|
786
|
+
printConfig.printpro = JSON.stringify(pro);
|
|
787
|
+
}
|
|
788
|
+
if (value.textName) {
|
|
789
|
+
printConfig.printcode = value.textName;
|
|
790
|
+
list.push(printConfig);
|
|
791
|
+
} else if (value.sname) {
|
|
792
|
+
if (value.type === 'DateRangeBox') {
|
|
793
|
+
pro.type = 'DateBox';
|
|
794
|
+
}
|
|
795
|
+
if (value.type === 'NumberRangeBox') {
|
|
796
|
+
pro.type = 'NumberBox';
|
|
797
|
+
}
|
|
798
|
+
let sconfig = this.$Method.copy(printConfig);
|
|
799
|
+
sconfig.printname = sconfig.printname + '(开始)';
|
|
800
|
+
sconfig.printcode = value.sname;
|
|
801
|
+
list.push(sconfig);
|
|
802
|
+
let econfig = this.$Method.copy(printConfig);
|
|
803
|
+
econfig.printname = sconfig.printname + '(结束)';
|
|
804
|
+
econfig.printcode = value.ename;
|
|
805
|
+
list.push(econfig);
|
|
806
|
+
} else {
|
|
807
|
+
printConfig.printcode = value.name;
|
|
808
|
+
list.push(printConfig);
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
},
|
|
812
|
+
initGridPrintConfig(el,list) {
|
|
813
|
+
if (el.children && el.children.length > 0) {
|
|
814
|
+
el.children.forEach(el2 => {
|
|
815
|
+
this.initGridPrintConfig(el2,list);
|
|
816
|
+
})
|
|
817
|
+
} else {
|
|
818
|
+
this.itemPrintConfig(el,list);
|
|
819
|
+
}
|
|
820
|
+
},
|
|
821
|
+
getBillPrintConfig() {
|
|
822
|
+
let billprintConfig = {};
|
|
823
|
+
billprintConfig.modulecode = this.globalConfig.modulecode;
|
|
824
|
+
billprintConfig.printcode = billprintConfig.modulecode;
|
|
825
|
+
billprintConfig.printname = document.title;
|
|
826
|
+
billprintConfig.printtype = '1';
|
|
827
|
+
billprintConfig.parentid = '0';
|
|
828
|
+
billprintConfig.children = [];
|
|
829
|
+
let mainConfig = {};
|
|
830
|
+
mainConfig.printcode = this.uiconfig.response;
|
|
831
|
+
mainConfig.printname = '单据主表';
|
|
832
|
+
mainConfig.printtype = '2';
|
|
833
|
+
mainConfig.children = [];
|
|
834
|
+
if (this.uiconfig.layoutType === 'ListDetails') {
|
|
835
|
+
this.uiconfig.detailConfig.formsConfig.items.forEach(el => {
|
|
836
|
+
if(el.items) {
|
|
837
|
+
el.items.forEach(el2 => {
|
|
838
|
+
if (el2.label) {
|
|
839
|
+
this.itemPrintConfig(el2,mainConfig.children);
|
|
840
|
+
}
|
|
841
|
+
})
|
|
842
|
+
}
|
|
843
|
+
});
|
|
844
|
+
this.uiconfig.detailConfig.billDetailConfig.items.forEach(el => {
|
|
845
|
+
if (el.type === 'EditGridCard') {
|
|
846
|
+
let temp = {};
|
|
847
|
+
temp.printcode = el.name;
|
|
848
|
+
temp.printname = el.title;
|
|
849
|
+
temp.printtype = '3';
|
|
850
|
+
temp.children = [];
|
|
851
|
+
el.items.forEach(el2 => {
|
|
852
|
+
this.initGridPrintConfig(el2,temp.children);
|
|
853
|
+
});
|
|
854
|
+
mainConfig.children.push(temp);
|
|
855
|
+
} else if (el.type === 'DetailsBox') {
|
|
856
|
+
let temp = {};
|
|
857
|
+
temp.printcode = el.name;
|
|
858
|
+
temp.printname = el.formConfig.title;
|
|
859
|
+
temp.printtype = '3';
|
|
860
|
+
temp.children = [];
|
|
861
|
+
el.formConfig.items.forEach(el2 => {
|
|
862
|
+
this.itemPrintConfig(el2,temp.children);
|
|
863
|
+
});
|
|
864
|
+
mainConfig.children.push(temp);
|
|
865
|
+
if (el.gridName) {
|
|
866
|
+
let temp2 = {};
|
|
867
|
+
temp2.printcode = el.gridName;
|
|
868
|
+
temp2.printname = el.gridConfig.title;
|
|
869
|
+
temp2.printtype = '3';
|
|
870
|
+
temp2.children = [];
|
|
871
|
+
el.gridConfig.items.forEach(el2 => {
|
|
872
|
+
this.initGridPrintConfig(el2,temp.children);
|
|
873
|
+
});
|
|
874
|
+
mainConfig.children.push(temp2);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
}
|
|
878
|
+
});
|
|
879
|
+
billprintConfig.children.push(mainConfig);
|
|
880
|
+
}
|
|
881
|
+
return billprintConfig;
|
|
882
|
+
},
|
|
883
|
+
printBillData() {
|
|
884
|
+
this.loadingtext= '打印数据准备中....';
|
|
885
|
+
this.showLoading();
|
|
886
|
+
this.checkPrintConfig();
|
|
887
|
+
},
|
|
888
|
+
setPrintModeUrl (dataid) {
|
|
889
|
+
let curlUrl = this.$Method.copy(this.billprintModeUrl);
|
|
890
|
+
curlUrl = curlUrl.replace('{modulecode}',this.globalConfig.modulecode);
|
|
891
|
+
curlUrl = curlUrl.replace('{dataid}',dataid);
|
|
892
|
+
curlUrl = curlUrl.replace('{token}',this.getToken());
|
|
893
|
+
curlUrl = curlUrl.replace('{mktcode}',this.printMkt());
|
|
894
|
+
if (this.showBillContPrintMode) {
|
|
895
|
+
curlUrl = curlUrl +'&contprint=Y'
|
|
896
|
+
}
|
|
897
|
+
// 打开打印模板
|
|
898
|
+
this.printModeUrl = curlUrl;
|
|
899
|
+
this.printModeReset = false;
|
|
900
|
+
this.$nextTick(() => {
|
|
901
|
+
this.printModeReset = true;
|
|
902
|
+
this.$nextTick(() => {
|
|
903
|
+
this.hideLoading();
|
|
904
|
+
this.$nextTick(() => {
|
|
905
|
+
this.showPrintMode = true;
|
|
906
|
+
});
|
|
907
|
+
});
|
|
908
|
+
});
|
|
909
|
+
},
|
|
910
|
+
|
|
911
|
+
printMkt() {
|
|
912
|
+
let tmp = this.$refs.layout.getData();
|
|
913
|
+
if (tmp.mktcode) {
|
|
914
|
+
return tmp.mktcode;
|
|
915
|
+
}
|
|
916
|
+
return '';
|
|
917
|
+
},
|
|
918
|
+
checkPrintConfig () {
|
|
919
|
+
let flag = false;
|
|
920
|
+
let para = {};
|
|
921
|
+
let self = this;
|
|
922
|
+
para.modulecode = this.globalConfig.modulecode;
|
|
923
|
+
self.asyncPost(this.OmdUrl.sysconfboot, 'mss.sysconf.printconfig.checkPrintConfig', para, function (data) {
|
|
924
|
+
if(data.flag === 'Y'){
|
|
925
|
+
let dataid = self.savePrintData();
|
|
926
|
+
self.setPrintModeUrl(dataid);
|
|
927
|
+
} else {
|
|
928
|
+
self.initPrintConfig();
|
|
929
|
+
}
|
|
930
|
+
});
|
|
931
|
+
return flag;
|
|
932
|
+
},
|
|
933
|
+
initPrintConfig() {
|
|
934
|
+
let self = this;
|
|
935
|
+
let para = this.getBillPrintConfig();
|
|
936
|
+
self.asyncPost(this.OmdUrl.sysconfboot, 'mss.sysconf.printconfig.initConfig', para, function (data) {
|
|
937
|
+
if(data.flag === '1'){
|
|
938
|
+
let dataid = self.savePrintData()
|
|
939
|
+
self.setPrintModeUrl(dataid);
|
|
940
|
+
}
|
|
941
|
+
});
|
|
942
|
+
},
|
|
943
|
+
savePrintData() {
|
|
944
|
+
let tmp = this.$refs.layout.getInitFormData();
|
|
945
|
+
let dataid = '';
|
|
946
|
+
let self = this;
|
|
947
|
+
let para = {};
|
|
948
|
+
let printdata ={};
|
|
949
|
+
printdata.modulecode = this.globalConfig.modulecode;
|
|
950
|
+
printdata.billkey = tmp.billkey;
|
|
951
|
+
printdata.datapro = JSON.stringify(tmp.formdata);
|
|
952
|
+
printdata.flag = 'I';
|
|
953
|
+
para.printdata = printdata;
|
|
954
|
+
self.synchroPost(this.OmdUrl.sysconfboot, 'mss.sysconf.printdata.savePrintData', para, function (data) {
|
|
955
|
+
if(data.flag === '1'){
|
|
956
|
+
dataid = data.dataid;
|
|
957
|
+
}
|
|
958
|
+
});
|
|
959
|
+
return dataid;
|
|
960
|
+
},
|
|
961
|
+
asyncImportClose(value) {
|
|
962
|
+
if (!value) {
|
|
963
|
+
this.refurbish();
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
doImportSuccess() {
|
|
967
|
+
this.refurbish();
|
|
968
|
+
},
|
|
969
|
+
setHideDividerValue(value) {
|
|
970
|
+
this.$refs.layout.setHideDividerValue(value);
|
|
971
|
+
}
|
|
972
|
+
},
|
|
973
|
+
watch: {
|
|
974
|
+
showDetailAppendix(value) {
|
|
975
|
+
if (!value) {
|
|
976
|
+
this.$nextTick(() => {
|
|
977
|
+
if (this.shutDownDetailAppendix) {
|
|
978
|
+
this.shutDownDetailAppendix();
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
};
|
|
985
|
+
</script>
|