ocpview-plus 1.1.6 → 1.1.7

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.
@@ -0,0 +1,320 @@
1
+ <template>
2
+ <div style="background: #fff; overflow-x: hidden; overflow-y: auto">
3
+ <!-- 列表覆写开始 -->
4
+ <BillListPanelV3
5
+ ref="billqureygrid"
6
+ v-show="!showHead"
7
+ :config="myConfig.billQueryConfig"
8
+ :dictData="dictData"
9
+ :moduleMethod="moduleMethod"
10
+ @doAction="doAction"
11
+ />
12
+ <!-- 列表覆写结束 -->
13
+
14
+ <BillDetailForm
15
+ ref="form"
16
+ v-show="showHead"
17
+ :config="myConfig.detailConfig"
18
+ :dictData="dictData"
19
+ :moduleMethod="moduleMethod"
20
+ @doAction="doAction"
21
+ >
22
+ <template #toolbar>
23
+ <Card
24
+ v-show="showToolbar"
25
+ :padding="0"
26
+ style="padding: 14px 16px; border-radius: 0px"
27
+ dis-hover
28
+ :bordered="false"
29
+ >
30
+ <DetailBtnToolbar
31
+ ref="menutoolbar"
32
+ :config="menuToolbar"
33
+ :moduleMethod="moduleMethod"
34
+ @doAction="doAction"
35
+ />
36
+ <Divider style="margin-top: 16px; margin-bottom: 0px" />
37
+ </Card>
38
+ </template>
39
+ </BillDetailForm>
40
+ <ApprovalBox ref="approval" :config="billApprovalConfig" />
41
+ <Modal
42
+ class-name="efuture-billapprovalmainframe"
43
+ v-model="showApproval"
44
+ fullscreen
45
+ title="报批单"
46
+ footer-hide
47
+ >
48
+ <iframe
49
+ frameborder="0"
50
+ ref="billapprovalmainframe"
51
+ style="width: 100%; height: 100%"
52
+ border="0"
53
+ ></iframe>
54
+ </Modal>
55
+ <Modal
56
+ title="单据日志"
57
+ v-model="showBilloperlog"
58
+ :width="logcurrentWidth"
59
+ :footer-hide="true"
60
+ >
61
+ <BillOperLog ref="billoperlog" :config="billOperLogConfig" />
62
+ </Modal>
63
+ </div>
64
+ </template>
65
+
66
+ <script>
67
+ import listdetails from "../listdetails.vue";
68
+ import BillListPanelV3 from "./BillListPanelV3.vue";
69
+
70
+ /**
71
+ * listdetails V2版本
72
+ * 解决列表查询条件暂存问题
73
+ * 列表快捷查询、高级查询,查询条件持久化,详情返回刷新问题
74
+ */
75
+ export default {
76
+ name: "mListDetailsV3",
77
+ extends: listdetails,
78
+ components: { BillListPanelV3 },
79
+ data() {
80
+ return {};
81
+ },
82
+ computed: {},
83
+ methods: {
84
+ doAction(obj) {
85
+ if (obj.name === "gridSelectionChange") {
86
+ if (this.$parent[obj.name]) {
87
+ this.$parent[obj.name](obj);
88
+ }
89
+ return true;
90
+ }
91
+ const method = obj.name;
92
+ const methodBefore = method + "Before";
93
+ const methodAfter = method + "After";
94
+ if (
95
+ obj.name === "skipData" ||
96
+ obj.name === "gridDbClick" ||
97
+ obj.name === "backData" ||
98
+ obj.name === "searchData" ||
99
+ obj.name === "editData" ||
100
+ obj.name === "addData" ||
101
+ obj.name === "preBill" ||
102
+ obj.name === "nextBill" ||
103
+ obj.name === "resetData" ||
104
+ obj.name === "openWorkFlow" ||
105
+ obj.name === "openBillapproval" ||
106
+ obj.name === "openBilloperlog"
107
+ ) {
108
+ let flag = true;
109
+ if (this.$parent[methodBefore]) {
110
+ flag = this.$parent[methodBefore](obj);
111
+ }
112
+ if (flag) {
113
+ // '跳转'
114
+ if (obj.name === "skipData" || obj.name === "gridDbClick") {
115
+ this.initForm(obj.para, obj.name);
116
+ }
117
+ // '跳转'
118
+ if (obj.name === "openWorkFlow") {
119
+ this.openWorkFlow();
120
+ }
121
+ // '跳转'
122
+ if (obj.name === "openBillapproval") {
123
+ this.openBillapproval();
124
+ }
125
+ // '打开日志'
126
+ if (obj.name === "openBilloperlog") {
127
+ if (this.$parent.openBilloperlog) {
128
+ this.$parent.openBilloperlog();
129
+ } else {
130
+ this.openBilloperlog();
131
+ }
132
+ }
133
+
134
+ // '打印初期化'
135
+ if (obj.name === "initPrintConfig") {
136
+ this.initPrintConfig();
137
+ }
138
+ // 返回
139
+ if (obj.name === "backData") {
140
+ let temp = {};
141
+ let self = this;
142
+ temp.onOk = () => {
143
+ // =================================
144
+ // 重写点
145
+ self.$refs.billqureygrid.refurbish(
146
+ null,
147
+ "backData"
148
+ );
149
+ // =================================
150
+ self.$nextTick(() => {
151
+ self.showHead = false;
152
+ });
153
+ };
154
+ this.checkData(temp);
155
+ }
156
+ // 查询
157
+ if (obj.name === "searchData") {
158
+ this.$refs.billqureygrid.getQuick().filterSearch();
159
+ /*this.setPhkey('');
160
+ this.ph_key = '';
161
+ this.$refs.billqureygrid.refurbish();
162
+ */
163
+ }
164
+ // 重置
165
+ if (obj.name === "resetData") {
166
+ this.$refs.billqureygrid.getQuick().clearData();
167
+ }
168
+
169
+ // 编辑
170
+ if (obj.name === "editData") {
171
+ this.$refs.form.setReadOnly(false);
172
+ this.getMenuToolbar().setAllReadOnly(true);
173
+ this.getMenuToolbar().setReadOnly([
174
+ "delData",
175
+ "saveData",
176
+ ]);
177
+ this.showHead = true;
178
+ }
179
+ // 新增
180
+ if (obj.name === "addData") {
181
+ if (this.showHead) {
182
+ let temp = {};
183
+ let self = this;
184
+ temp.onOk = () => {
185
+ self.$refs.form.setReadOnly(false);
186
+ self.$refs.form.clearData();
187
+ self.customPrintData = null;
188
+ self.getMenuToolbar().setAllReadOnly(true);
189
+ self.getMenuToolbar().setReadOnly(
190
+ "saveData",
191
+ false
192
+ );
193
+ self.showHead = true;
194
+ self.logData = null;
195
+ if (self.$parent[methodAfter]) {
196
+ self.$parent[methodAfter]();
197
+ }
198
+ };
199
+ this.checkData(temp);
200
+ return true;
201
+ } else {
202
+ this.$refs.form.setReadOnly(false);
203
+ this.$refs.form.clearData();
204
+ this.getMenuToolbar().setAllReadOnly(true);
205
+ this.getMenuToolbar().setReadOnly(
206
+ "saveData",
207
+ false
208
+ );
209
+ this.showHead = true;
210
+ this.logData = null;
211
+ }
212
+ }
213
+ // 上一单
214
+ if (obj.name === "preBill") {
215
+ this.preBill();
216
+ }
217
+ // 下一单
218
+ if (obj.name === "nextBill") {
219
+ this.nextBill();
220
+ }
221
+
222
+ if (this.$parent[methodAfter]) {
223
+ this.$parent[methodAfter]();
224
+ }
225
+ }
226
+ } else {
227
+ let data = this.$refs.form.getData();
228
+ if (obj.name === "saveData") {
229
+ let flag = this.$refs.form.checkValidate();
230
+ if (flag) {
231
+ this.alert("必填项不允许为空");
232
+ return false;
233
+ }
234
+ flag = this.$refs.form.isEdit();
235
+ if (flag) {
236
+ this.alert("存在数据未确认");
237
+ return false;
238
+ }
239
+ obj.para = this.$refs.form.getChangeData();
240
+ }
241
+ if (obj.name === "saveDetails") {
242
+ obj.para = this.$refs.form.getChangeData(obj.detailsname);
243
+ obj.name = "saveData";
244
+ }
245
+ if (obj.name === "delData") {
246
+ if (this.showHead) {
247
+ obj.para = data;
248
+ obj.para.flag = "D";
249
+ } else {
250
+ if (obj.para instanceof Array) {
251
+ obj.para.forEach((el) => {
252
+ el.flag = "D";
253
+ });
254
+ } else {
255
+ obj.para.flag = "D";
256
+ let temp = [obj.para];
257
+ obj.para = temp;
258
+ }
259
+ }
260
+ }
261
+ if (obj.name === "copyData") {
262
+ if (!obj.para) {
263
+ obj.para = {};
264
+ }
265
+ obj.para[this.billKey] = data[this.billKey];
266
+ }
267
+ obj.onOk = this.onOk;
268
+ let flag = true;
269
+ if (this.$parent[methodBefore]) {
270
+ flag = this.$parent[methodBefore](obj);
271
+ }
272
+ if (!flag) {
273
+ return;
274
+ }
275
+ if (
276
+ obj.name === "delData" ||
277
+ obj.name === "auditData" ||
278
+ obj.name === "cancelData" ||
279
+ obj.name === "revokeData"
280
+ ) {
281
+ let text = "删除";
282
+ if (obj.name === "auditData") {
283
+ text = "审核";
284
+ obj.para = { billno: data.billno };
285
+ }
286
+ if (obj.name === "cancelData") {
287
+ text = "作废";
288
+ obj.para = { billno: data.billno };
289
+ }
290
+
291
+ if (obj.name === "revokeData") {
292
+ text = "撤回";
293
+ obj.para = { billno: data.billno };
294
+ }
295
+ if (this.$parent.getActionName) {
296
+ let name = this.$parent.getActionName(obj);
297
+ if (name) {
298
+ text = name;
299
+ }
300
+ }
301
+ let info = "确定是否" + text + "数据?";
302
+ let self = this;
303
+ self.$Modal.confirm({
304
+ title: "确认",
305
+ content: info,
306
+ onOk: () => {
307
+ self.$emit("doAction", obj);
308
+ },
309
+ });
310
+ } else {
311
+ this.$emit("doAction", obj);
312
+ }
313
+ }
314
+ },
315
+ },
316
+ mounted() {},
317
+ };
318
+ </script>
319
+
320
+ <style lang="scss" scoped></style>
@@ -22,6 +22,7 @@ import mBillAsyncImport from "./billasyncimport.vue";
22
22
  import mBillImport from "./billimport.vue";
23
23
  import mBillListDetails from "./RewriteBillListDetails/index.vue";
24
24
  import mListDetailsV2 from "./RewriteListdetails/indexV2.vue";
25
+ import mListDetailsV3 from "./RewriteListdetails/indexV3.vue";
25
26
  export {
26
27
  RowBtnToolbar,
27
28
  PageCustom,
@@ -47,4 +48,5 @@ export {
47
48
  mBillAsyncImport,
48
49
  mBillListDetails,
49
50
  mListDetailsV2,
51
+ mListDetailsV3
50
52
  };
@@ -431,7 +431,7 @@
431
431
  if (this.config.selectkey) {
432
432
  if(this.query && this.query.Config ) {
433
433
  const lastParam = this.query.Config.lastQueryParam;
434
- if (this.query?.Config) {
434
+ if (this.queryConfig) {
435
435
  const lastParam = this.query.Config.lastQueryParam || {}; // 始终记住前一次的参数
436
436
  const currentParam = this.searchParam || {}; // 当前的参数
437
437
 
package/src/index.js CHANGED
@@ -86,7 +86,8 @@ import {
86
86
  mBillAsyncImport,
87
87
  mBillImport,
88
88
  mBillListDetails,
89
- mListDetailsV2
89
+ mListDetailsV2,
90
+ mListDetailsV3
90
91
  } from './components/masterplate';
91
92
 
92
93
  import MapBox from './components/map';
@@ -176,7 +177,8 @@ const components = {
176
177
  mBillListDetails,
177
178
  NumberBoxV1,
178
179
  mListDetailsV2,
179
- DateBoxV1
180
+ DateBoxV1,
181
+ mListDetailsV3
180
182
  };
181
183
 
182
184
  const iview = {
@@ -1111,7 +1111,7 @@ caseMethod.downloadExcel = function (url, ctx, postObj = {}) {
1111
1111
  ctx.$Spin.hide();
1112
1112
 
1113
1113
  if (this.status !== 200) {
1114
- ctx.alert?.(`导出失败:${this.status} ${this.statusText}`);
1114
+ ctx.alert(`导出失败:${this.status} ${this.statusText}`);
1115
1115
  return;
1116
1116
  }
1117
1117
 
@@ -1124,7 +1124,7 @@ caseMethod.downloadExcel = function (url, ctx, postObj = {}) {
1124
1124
  try {
1125
1125
  const json = JSON.parse(text);
1126
1126
  if (json.returncode && json.returncode !== '0') {
1127
- ctx.alert?.(json.data || '导出失败');
1127
+ ctx.alert(json.data || '导出失败');
1128
1128
  return;
1129
1129
  }
1130
1130
  } catch (e) {
@@ -1144,7 +1144,7 @@ caseMethod.downloadExcel = function (url, ctx, postObj = {}) {
1144
1144
 
1145
1145
  xhr.onerror = () => {
1146
1146
  ctx.$Spin.hide();
1147
- ctx.alert?.('网络错误,导出失败');
1147
+ ctx.alert('网络错误,导出失败');
1148
1148
  };
1149
1149
 
1150
1150
  xhr.send(JSON.stringify(postObj));