ocpview-plus 1.3.5 → 1.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ocpview-plus",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
4
4
  "title": "ocpviewPlus",
5
5
  "description": "A high quality Service UI components Library with Vue.js",
6
6
  "homepage": "",
@@ -38,7 +38,7 @@
38
38
  </Card>
39
39
  </template>
40
40
  </BillDetailForm>
41
- <ApprovalBox ref="approval" :config="billApprovalConfig" />
41
+ <ApprovalBox ref="approval" :config="billApprovalConfig" @onSubmitBefore="onSubmitBefore" />
42
42
  <Modal
43
43
  class-name="efuture-billapprovalmainframe"
44
44
  v-model="showApproval"
@@ -315,7 +315,14 @@ export default {
315
315
  },
316
316
  handleSuccessAfter(response, file, fileList) {
317
317
  this.$emit('handleSuccessAfter' , response, file, fileList);
318
- }
318
+ },
319
+ onSubmitBefore() {
320
+ let flag = true;
321
+ if (this.$parent.onSubmitBefore() !== undefined) {
322
+ flag = this.$parent.onSubmitBefore();
323
+ }
324
+ return flag;
325
+ },
319
326
  },
320
327
  mounted() {},
321
328
  };
@@ -3,15 +3,15 @@
3
3
  <Modal title="人员列表" width="660" v-model="showuser">
4
4
  <Row style="margin-bottom:14px" type="flex" justify="start" align="middle" >
5
5
  <Col span='6' v-if="!showapproval">
6
- 已选抄送人:<span style="color:#AF292E">{{selectuserdata.length}}</span><span v-text="info"></span>
6
+ 已选抄送人:<span style="color:#AF292E">{{selectuserdata.length}}</span><span v-text="info"></span>
7
7
  </Col>
8
8
  <Col span='6' v-if="showapproval">
9
- 已选审批<span v-text="info"></span> :<span style="color:#AF292E">{{selectuserdata.length}}</span><span v-text="info"></span>
9
+ 已选审批<span v-text="info"></span> :<span style="color:#AF292E">{{selectuserdata.length}}</span><span v-text="info"></span>
10
10
  </Col>
11
11
  <Col span='18'>
12
12
  <Row type="flex" justify="end" align="middle" >
13
13
  <Button type="text" custom-icon="iconfont icon-custom-quanshan" @click="delAll" >全部删除</Button>
14
- </Row>
14
+ </Row>
15
15
  </Col>
16
16
  </Row>
17
17
  <Row type="flex" justify="start" style="min-height:82px;border:1px dashed #DCDFE6;padding:10px">
@@ -21,12 +21,12 @@
21
21
  <template #title>
22
22
  <Row v-if="!showapproval" type="flex" justify="start" align="middle" >
23
23
  <Col span='4'>
24
- 已勾选:<span style="color:#AF292E">{{select.length}}</span><span v-text="info"></span>
24
+ 已勾选:<span style="color:#AF292E">{{select.length}}</span><span v-text="info"></span>
25
25
  </Col>
26
26
  <Col span='20'>
27
27
  <Row type="flex" justify="end" align="middle" >
28
28
  <Input placeholder="请输入用户名称/工号/手机号" v-model="searchValue" search style="width: 380px;border-radius:20px;margin-top:10xp" @on-search="searchUser" @on-enter="searchUser"/>
29
- </Row>
29
+ </Row>
30
30
  </Col>
31
31
  </Row>
32
32
  <Row v-else type="flex" justify="start" align="middle" >
@@ -71,7 +71,7 @@
71
71
  </Col>
72
72
  </Row>
73
73
  </div>
74
- </template>
74
+ </template>
75
75
  </Modal>
76
76
  <Drawer class-name="efutureapproval" title="工作流" v-model="showDrawer" :width="534">
77
77
  <div class="drawer-box">
@@ -105,7 +105,7 @@
105
105
  </div>
106
106
  <div class="right">
107
107
  <p class="top">
108
- <span style="font-size:16px;font-weight">{{item.describe_}}</span>
108
+ <span style="font-size:16px;">{{item.describe_}}</span>
109
109
  <span class="status">{{item.act_status_name}}</span>
110
110
  </p>
111
111
  <div>
@@ -117,7 +117,7 @@
117
117
  </div>
118
118
  <div class="card" v-if="item.tasklist.length > 1">
119
119
  <ul class="main">
120
- <Row type="flex" justify="start" :gutter="16">
120
+ <Row type="flex" justify="start" :gutter="16">
121
121
  <Col v-for="(tmp, index2) in item.tasklist" :key="'task_' + index2" v-show="index2 < maxUser || (index2 >= maxUser && tmp.active)" >
122
122
  <li class="user-list">
123
123
  <div class="user">
@@ -134,12 +134,12 @@
134
134
  </Col>
135
135
  </Row>
136
136
  </ul>
137
- <Row v-if="item.tasklist > maxUser" type="flex" justify="center" align="middle">
137
+ <Row v-if="item.tasklist > maxUser" type="flex" justify="center" align="middle">
138
138
  <Col>
139
139
  <Button v-if="!item.active" icon="ios-arrow-down" type="text" @click="showGroupUser(index)">展开 </Button>
140
140
  <Button v-if="item.active" icon="ios-arrow-up" type="text" @click="showGroupUser(index)"> 收起</Button>
141
141
  </Col>
142
- </Row>
142
+ </Row>
143
143
  </div>
144
144
  </div>
145
145
  </li>
@@ -169,7 +169,7 @@
169
169
  <FormItem v-show="false" label="审批:">
170
170
  <Row type="flex" justify="start" align="middle" >
171
171
  <Col span='2'>
172
- <span style="color:#AF292E;cursor:pointer"> {{approvals.length}}</span> <span v-text="info2"></span>
172
+ <span style="color:#AF292E;cursor:pointer"> {{approvals.length}}</span> <span v-text="info2"></span>
173
173
  </Col>
174
174
  <Col span='22'>
175
175
  <Row type="flex" justify="end" align="middle">
@@ -190,24 +190,24 @@
190
190
  </Form>
191
191
  <Row type="flex" v-if="showBtn" justify="end" :gutter="10" style="padding-top:20px;padding-bottom:4px">
192
192
  <Col v-if="showSubmit">
193
- <Button customIcon="iconfont icon-custom-submit" @click="onSubmit" >提交</Button>
193
+ <Button customIcon="iconfont icon-custom-submit" @click="onSubmit" >提交</Button>
194
194
  </Col>
195
195
  <Col v-if="showReset">
196
- <Button customIcon="iconfont icon-custom-recall" @click="billBack" >撤回</Button>
196
+ <Button customIcon="iconfont icon-custom-recall" @click="billBack" >撤回</Button>
197
197
  </Col>
198
198
  <Col v-show="false">
199
- <Button customIcon="iconfont icon-custom-jiaqian" @click="billBack" >加签</Button>
199
+ <Button customIcon="iconfont icon-custom-jiaqian" @click="billBack" >加签</Button>
200
200
  </Col>
201
201
  <Col v-if="showReject">
202
- <Button customIcon="iconfont icon-custom-reject" @click="reject" >驳回</Button>
202
+ <Button customIcon="iconfont icon-custom-reject" @click="reject" >驳回</Button>
203
203
  </Col>
204
204
  <Col v-if="showApprove">
205
- <Button customIcon="iconfont icon-custom-approve" @click="submitApprove" >审批</Button>
205
+ <Button customIcon="iconfont icon-custom-approve" @click="submitApprove" >审批</Button>
206
206
  </Col>
207
207
  </Row>
208
- </div>
208
+ </div>
209
209
  </Drawer>
210
- </div>
210
+ </div>
211
211
  </template>
212
212
 
213
213
  <script>
@@ -259,7 +259,7 @@ export default {
259
259
  };
260
260
  },
261
261
  created() {
262
- this.myConfig = Object.assign({}, this.myConfig, this.config);
262
+ this.myConfig = Object.assign({}, this.myConfig, this.config);
263
263
  },
264
264
  computed: {
265
265
  contentStyle () {
@@ -296,7 +296,13 @@ export default {
296
296
  },
297
297
  methods: {
298
298
  onSubmit() {
299
- this.billSubmit();
299
+ let flag = true;
300
+ if (this.$parent.onSubmitBefore() !== undefined) {
301
+ flag = this.$parent.onSubmitBefore();
302
+ }
303
+ if (flag) {
304
+ this.billSubmit();
305
+ }
300
306
  },
301
307
  setData(config) {
302
308
  this.clearData();
@@ -388,7 +394,7 @@ export default {
388
394
  item.candidateUserList = candidateUserList;
389
395
  }
390
396
  });
391
-
397
+
392
398
 
393
399
  if (data.procinfo.btnlist) {
394
400
  data.procinfo.btnlist.forEach(el => {
@@ -428,7 +434,7 @@ export default {
428
434
  (data) => {
429
435
  // // 方式1:通过事件 没有生效
430
436
  // this.$emit('approvalOk', '');
431
-
437
+
432
438
  // 方式2:直接调用父组件方法(兜底)
433
439
  if (this.$parent && typeof this.$parent.approvalOk === 'function') {
434
440
  this.$parent.approvalOk();
@@ -452,7 +458,7 @@ export default {
452
458
  (data) => {
453
459
  // // 方式1:通过事件 没有生效
454
460
  // this.$emit('approvalOk', '');
455
-
461
+
456
462
  // 方式2:直接调用父组件方法(兜底)
457
463
  if (this.$parent && typeof this.$parent.approvalOk === 'function') {
458
464
  this.$parent.approvalOk();
@@ -482,7 +488,7 @@ export default {
482
488
  this.doPost('.billsubmit', param, (data) => {
483
489
  // // 方式1:通过事件 没有生效
484
490
  // this.$emit('approvalOk', '');
485
-
491
+
486
492
  // 方式2:直接调用父组件方法(兜底)
487
493
  if (this.$parent && typeof this.$parent.approvalOk === 'function') {
488
494
  this.$parent.approvalOk();
@@ -496,13 +502,13 @@ export default {
496
502
  });
497
503
  },
498
504
  submitApprove() {
499
- this.doPost(
505
+ this.doPost(
500
506
  '.billapproval',
501
507
  {billno: this.value.billno,comment: this.idea},
502
508
  (data) => {
503
509
  // // 方式1:通过事件 没有生效
504
510
  // this.$emit('approvalOk', '');
505
-
511
+
506
512
  // 方式2:直接调用父组件方法(兜底)
507
513
  if (this.$parent && typeof this.$parent.approvalOk === 'function') {
508
514
  this.$parent.approvalOk();
@@ -519,7 +525,7 @@ export default {
519
525
  if (this.approvals.length === 0) {
520
526
  this.alert('审批人不能为空');
521
527
  return;
522
- }
528
+ }
523
529
  let param = {
524
530
  billno: this.value.billno,
525
531
  userid: this.getUserCode(),
@@ -537,7 +543,7 @@ export default {
537
543
  param,
538
544
  (data) => {
539
545
  this.alert(data.msg,null,3);
540
-
546
+
541
547
  }
542
548
  );
543
549
  },
@@ -564,7 +570,7 @@ export default {
564
570
  });
565
571
  },
566
572
  open () {
567
- this.showDrawer = true;
573
+ this.showDrawer = true;
568
574
  },
569
575
  addUser() {
570
576
  this.userdata = [];
@@ -661,10 +667,10 @@ export default {
661
667
  if (index > -1) {
662
668
  let index2 = temp.findIndex(el3 => el3.userCode === el.userCode);
663
669
  if (index2 > -1) {
664
- temp2.push(this.$Method.copy(el));
670
+ temp2.push(this.$Method.copy(el));
665
671
  }
666
672
  } else {
667
- temp2.push(this.$Method.copy(el));
673
+ temp2.push(this.$Method.copy(el));
668
674
  }
669
675
  });
670
676
  temp.forEach(el => {
@@ -674,7 +680,7 @@ export default {
674
680
  }
675
681
  })
676
682
  this.selectuserdata = temp2;
677
- },
683
+ },
678
684
  userCancel() {
679
685
  this.showuser = false;
680
686
  },
@@ -684,7 +690,7 @@ export default {
684
690
  this.curlSelectType = this.selectType;
685
691
  } else {
686
692
  this.copy = this.$Method.copy(this.selectuserdata);
687
-
693
+
688
694
  }
689
695
  this.showuser = false;
690
696
  },
@@ -239,14 +239,15 @@ export default {
239
239
  let billmoduleid = data.billmoduleid;
240
240
  this.$refs.detail_appenndix[0].setData(billno,billmoduleid);
241
241
  }
242
- } else if (this.billAppendixConfig.showAppendix2) {
243
- if (this.$refs.detail_appenndix2 && this.$refs.detail_appenndix2[0]) {
244
- let data = this.getData();
245
- let billno = data[this.billAppendixConfig.appendixKey];
246
- let billmoduleid = data.billmoduleid;
247
- this.$refs.detail_appenndix2[0].setData(billno,billmoduleid);
248
- }
249
242
  }
243
+ // else if (this.billAppendixConfig.showAppendix2) {
244
+ // if (this.$refs.detail_appenndix2 && this.$refs.detail_appenndix2[0]) {
245
+ // let data = this.getData();
246
+ // let billno = data[this.billAppendixConfig.appendixKey];
247
+ // let billmoduleid = data.billmoduleid;
248
+ // this.$refs.detail_appenndix2[0].setData(billno,billmoduleid);
249
+ // }
250
+ // }
250
251
  },
251
252
  doAction (obj) {
252
253
  if (obj.name === 'editGrid' || obj.name === 'cancelGrid') {
@@ -81,6 +81,7 @@ export default {
81
81
  {code: 'I', name: '新增'}, {code: 'D', name: '删除'}],
82
82
  visible: false,
83
83
  width: 100,
84
+ readOnly: true
84
85
  }, {
85
86
  label: '附件类型',
86
87
  name: 'filememo',
@@ -100,7 +101,7 @@ export default {
100
101
  label: '文件名称',
101
102
  name: 'filename',
102
103
  type: 'TextBox',
103
- width: 200,
104
+ minWidth: 200,
104
105
  readOnly: true
105
106
  }, {
106
107
  label: '文件大小',
@@ -120,7 +121,7 @@ export default {
120
121
  key: 'action',
121
122
  align: 'center',
122
123
  render: this.actionRender,
123
- minWidth: 100
124
+ width: 350,
124
125
  }]
125
126
  },
126
127
  loadFlag: false,
@@ -163,7 +164,12 @@ export default {
163
164
  icon: 'custom-filerecall',
164
165
  name: 'recall',
165
166
  text: '撤回'
166
- }
167
+ },
168
+ {
169
+ icon: 'custom-fileupload',
170
+ name: 'reupFile',
171
+ text: '变更'
172
+ },
167
173
  ]
168
174
  };
169
175
  },
@@ -279,7 +285,7 @@ export default {
279
285
  if (this.myConfig.readOnly) {
280
286
  del.readOnly = true;
281
287
  }
282
- if (params.row.scenetype !== '0') {
288
+ if (params.row.scenetype !== '0' && params.row.modflag !== 'M') {
283
289
  btnConfig.items.push(del);
284
290
  }
285
291
  } else {
@@ -301,6 +307,9 @@ export default {
301
307
  if (params.row.modflag === 'N') {
302
308
  btnConfig.items.push(recall);
303
309
  }
310
+ if ((!params.row.filekey || params.row.filekey !== '') && params.row.modflag === 'N') {
311
+ btnConfig.items.push(this.$Method.copy(this.rowBtnData[5]));
312
+ }
304
313
  }
305
314
  return h('div', [
306
315
  h(resolveComponent('RowBtnToolbar'), {
@@ -321,6 +330,9 @@ export default {
321
330
  if (val.name === 'recall') {
322
331
  this.recall(params);
323
332
  }
333
+ if (val.name === 'reupFile') {
334
+ this.reupFile(params);
335
+ }
324
336
  }
325
337
  })
326
338
  ]);
@@ -378,7 +390,7 @@ export default {
378
390
  return;
379
391
  }
380
392
  if (params.row.modflag === 'I') {
381
- this.delCommon(params.row.filekey, 'Y');
393
+ this.delCommon(params.row.filekey, 'N');
382
394
  this.$refs.grid.delRow(params.index);
383
395
  }
384
396
  if (params.row.modflag === 'N') {
@@ -622,6 +634,25 @@ export default {
622
634
  document.querySelector('#billiviewUp input').click();
623
635
  }
624
636
  },
637
+ reupFile (params) {
638
+ if (this.myConfig.beforeUpload) {
639
+ this.myConfig.beforeUpload();
640
+ }
641
+ if (!this.billno) {
642
+ this.alert('单据主健信息为空,不允许上传');
643
+ return;
644
+ }
645
+ if (this.checkIsEdit()) {
646
+ this.$nextTick(() => {
647
+ this.$refs.billupload.clearFiles();
648
+ });
649
+ if (this.myConfig.readOnly) {
650
+ this.setReadOnly(false);
651
+ }
652
+ this.filememo = params.row.filememo;
653
+ document.querySelector('#billiviewUp input').click();
654
+ }
655
+ },
625
656
  isChange () {
626
657
  return this.$refs.grid.isChange();
627
658
  },
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <component ref="layout" :is="uiLayoutType" :config="uiconfig" :dictData="globalConfig.dictData" :moduleMethod="globalConfig.userModuleMethod" @handleSuccessAfter="handleSuccessAfter" @doAction="doAction" />
3
+ <component ref="layout" :is="uiLayoutType" :config="uiconfig" :dictData="globalConfig.dictData" :moduleMethod="globalConfig.userModuleMethod" @handleSuccessAfter="handleSuccessAfter" @onSubmitBefore="onSubmitBefore" @doAction="doAction" />
4
4
  <Modal title="附件" v-model="showDetailAppendix" :width="appendixCurrentWidth" :footer-hide="true">
5
5
  <AppendixBoxs v-if="detalAppendixFlag" ref="detailappendix" :config="billDetailAppendixConfig" @doAction="doAction"/>
6
6
  </Modal>