ocpview-plus 1.0.7 → 1.0.9
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 +128 -74
- package/dist/ocpviewplus.min.js +14 -14
- package/package.json +1 -1
- package/src/components/masterplate/RewriteBillListDetails/BillInfoPanelEditTable.vue +67 -16
- package/src/components/masterplate/RewriteBillListDetails/BillInfoPanelEditTableControlbox.vue +1 -1
- package/src/components/masterplate/RewriteBillListDetails/BillInfoPanelEditTableControlboxNumberbox.vue +6 -0
- package/src/components/poptextbox/poptextbox.vue +36 -24
package/package.json
CHANGED
|
@@ -435,17 +435,25 @@ export default {
|
|
|
435
435
|
* 【覆写】手工触发编辑事件
|
|
436
436
|
*/
|
|
437
437
|
valueChanged(obj) {
|
|
438
|
-
const $tableVM = this.$refs.table;
|
|
439
|
-
let editRecord = $tableVM.getEditRecord();
|
|
440
|
-
if (!editRecord) {
|
|
441
|
-
editRecord = this.VG_currentEditRecord;
|
|
442
|
-
}
|
|
443
|
-
const params = { ...obj, rowinfo: editRecord };
|
|
444
438
|
const column = this.findColumnConfig(obj.name, this.myConfig.items);
|
|
445
|
-
|
|
439
|
+
this.addRowInfo(obj, column);
|
|
440
|
+
const valueChangedSucc = column.valueChanged(obj);
|
|
446
441
|
this.updateFooterEvent();
|
|
447
442
|
return valueChangedSucc;
|
|
448
443
|
},
|
|
444
|
+
setDataBefore(obj, that) {
|
|
445
|
+
const column = this.findColumnConfig(
|
|
446
|
+
that.myConfig.name,
|
|
447
|
+
this.myConfig.items
|
|
448
|
+
);
|
|
449
|
+
let temp = {};
|
|
450
|
+
temp.data = obj;
|
|
451
|
+
temp.tabname = this.myConfig.name;
|
|
452
|
+
this.addRowInfo(temp, column);
|
|
453
|
+
const setDataBeforeSucc = column.setDataBefore(temp, that);
|
|
454
|
+
this.updateFooterEvent();
|
|
455
|
+
return setDataBeforeSucc;
|
|
456
|
+
},
|
|
449
457
|
|
|
450
458
|
/**
|
|
451
459
|
* 【覆写】获取全量数据
|
|
@@ -603,8 +611,54 @@ export default {
|
|
|
603
611
|
/**
|
|
604
612
|
* 【覆写】表格数据赋值事件
|
|
605
613
|
*/
|
|
606
|
-
setData(data = []) {
|
|
607
|
-
|
|
614
|
+
setData(data = [], flag = "set") {
|
|
615
|
+
switch (flag) {
|
|
616
|
+
case "set":
|
|
617
|
+
// console.log("初始化表格数据触发");
|
|
618
|
+
this.dataList = [...data];
|
|
619
|
+
break;
|
|
620
|
+
|
|
621
|
+
case "I":
|
|
622
|
+
// console.log("手工全量编辑触发");
|
|
623
|
+
const $tableVM = this.$refs.table;
|
|
624
|
+
// 移除表格组件
|
|
625
|
+
$tableVM.remove().then(() => {
|
|
626
|
+
$tableVM.insertAt([...data], -1);
|
|
627
|
+
});
|
|
628
|
+
break;
|
|
629
|
+
|
|
630
|
+
default:
|
|
631
|
+
break;
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* 【覆写】编辑项内容整理透传
|
|
637
|
+
*/
|
|
638
|
+
addRowInfo(obj, column) {
|
|
639
|
+
const $tableVM = this.$refs.table;
|
|
640
|
+
let editRecord = $tableVM.getEditRecord();
|
|
641
|
+
if (!editRecord) {
|
|
642
|
+
editRecord = this.VG_currentEditRecord;
|
|
643
|
+
}
|
|
644
|
+
obj.rowinfo = { ...editRecord, index: editRecord.rowIndex };
|
|
645
|
+
},
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* 【覆写】手工更新当前编辑项事件
|
|
649
|
+
*/
|
|
650
|
+
updataRow(editRecord, item) {
|
|
651
|
+
const { row, $table } = editRecord;
|
|
652
|
+
$table.setRow(row, item);
|
|
653
|
+
},
|
|
654
|
+
addRow(item) {
|
|
655
|
+
const $tableVM = this.$refs.table;
|
|
656
|
+
$tableVM.insertAt(item, -1);
|
|
657
|
+
},
|
|
658
|
+
delRow(editRecord) {
|
|
659
|
+
const { row } = editRecord;
|
|
660
|
+
const $tableVM = this.$refs.table;
|
|
661
|
+
$tableVM.remove(row);
|
|
608
662
|
},
|
|
609
663
|
|
|
610
664
|
/**
|
|
@@ -716,13 +770,10 @@ export default {
|
|
|
716
770
|
/**
|
|
717
771
|
* 批量更新数据【待完善】
|
|
718
772
|
*/
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
// ctname: "123",
|
|
724
|
-
// };
|
|
725
|
-
// });
|
|
773
|
+
batchUpdateDatas(record = {}) {
|
|
774
|
+
const $tableVM = this.$refs.table;
|
|
775
|
+
const tableData = $tableVM.getTableData().fullData;
|
|
776
|
+
tableData.forEach((item) => Object.assign(item, record));
|
|
726
777
|
},
|
|
727
778
|
|
|
728
779
|
/**
|
|
@@ -13,6 +13,12 @@ export default {
|
|
|
13
13
|
this.myConfig = Object.assign({}, this.myConfig, this.config);
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
+
parser(event) {
|
|
17
|
+
this.label = this.getValueNumber(this.value)
|
|
18
|
+
// if (event) {
|
|
19
|
+
// event.currentTarget.select();
|
|
20
|
+
// }
|
|
21
|
+
},
|
|
16
22
|
},
|
|
17
23
|
mounted() {
|
|
18
24
|
// console.log("我继承覆写了999999");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<div v-show="myConfig.visible" :class="classes" >
|
|
3
3
|
<template v-if="multiple">
|
|
4
4
|
<div ref="myControl" class="ivu-select-selection">
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
</Tooltip>
|
|
34
34
|
<Icon type="ios-search" class="ivu-select-arrow" @click.enter.stop="click"></Icon>
|
|
35
35
|
</div>
|
|
36
|
-
</template>
|
|
36
|
+
</template>
|
|
37
37
|
<template v-else>
|
|
38
38
|
<Input ref="myControl" v-model="text" icon="ios-search" :size="myConfig.size" type="text" :placeholder="myConfig.placeholder" :disabled="myConfig.readOnly" :readonly="!myConfig.allowInput" :clearable="myConfig.clearable" @on-click="click" @keydown.enter.stop="onEnter" @on-blur="onEnter" @on-clear="onEnter"/>
|
|
39
|
-
</template>
|
|
39
|
+
</template>
|
|
40
40
|
<Modal v-model="popShow" :styles="queryConfig.popStyle" :width="currentWidth" :title="modeTitle" :footer-hide="footerHide" :draggable="draggable" :closable="myConfig.closable" class="efuture-model" >
|
|
41
41
|
<div>
|
|
42
42
|
<component :is="pop" ref="popView" :config="queryConfig" :dictData="myConfig.dictData" @conditionAction="conditionAction" :isPop="true" @dbclick="dbclick"/></div>
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
</Row>
|
|
53
53
|
</div>
|
|
54
54
|
</template>
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
</Modal>
|
|
57
57
|
</div>
|
|
58
58
|
</template>
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
this.popShow = false;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
|
|
189
|
+
|
|
190
190
|
break;
|
|
191
191
|
case 'condition_cancel':
|
|
192
192
|
this.popShow = false;
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
let data = [];
|
|
211
211
|
data.push(rows);
|
|
212
212
|
rows = data;
|
|
213
|
-
}
|
|
213
|
+
}
|
|
214
214
|
if (this.myConfig.setDataBefore) {
|
|
215
215
|
if (isnull === 'Y') {
|
|
216
216
|
flag = this.myConfig.setDataBefore(null,this);
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
}
|
|
249
249
|
this.oldValue = this.value;
|
|
250
250
|
this.oldText = this.text;
|
|
251
|
-
}
|
|
251
|
+
}
|
|
252
252
|
this.setFatherValue();
|
|
253
253
|
} else {
|
|
254
254
|
if (this.multiple) {
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
} else {
|
|
275
275
|
name = '';
|
|
276
276
|
}
|
|
277
|
-
}
|
|
277
|
+
}
|
|
278
278
|
} else {
|
|
279
279
|
if (code) {
|
|
280
280
|
if (!name) {
|
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
}
|
|
283
283
|
} else {
|
|
284
284
|
name = '';
|
|
285
|
-
}
|
|
285
|
+
}
|
|
286
286
|
}
|
|
287
287
|
let obj = {};
|
|
288
288
|
obj.code = code;
|
|
@@ -337,14 +337,14 @@
|
|
|
337
337
|
if (this.config.multiSelect !== undefined) {
|
|
338
338
|
this.queryConfig.multiSelect = this.config.multiSelect;
|
|
339
339
|
}
|
|
340
|
-
|
|
340
|
+
|
|
341
341
|
if (this.config.showAll !== undefined) {
|
|
342
342
|
this.queryConfig.showAll = this.config.showAll;
|
|
343
343
|
}
|
|
344
344
|
if (this.queryConfig.popControl) {
|
|
345
345
|
if (this.queryConfig.popControl !== 'SimpleViewGrid' && this.queryConfig.popControl !== 'SimpleTree') {
|
|
346
346
|
this.footerHide = true;
|
|
347
|
-
}
|
|
347
|
+
}
|
|
348
348
|
}
|
|
349
349
|
this.setSizeConfig(this.queryConfig);
|
|
350
350
|
this.queryConfig.overrideSearchParam = this.overrideSearchParam;
|
|
@@ -355,10 +355,10 @@
|
|
|
355
355
|
this.queryConfig.items.forEach(el => {
|
|
356
356
|
let dictkey = el.dictkey;
|
|
357
357
|
if (el.customDictkey) {
|
|
358
|
-
dictkey = el.customDictkey;
|
|
358
|
+
dictkey = el.customDictkey;
|
|
359
359
|
}
|
|
360
360
|
if (dictkey) {
|
|
361
|
-
obj[dictkey] = '';
|
|
361
|
+
obj[dictkey] = '';
|
|
362
362
|
}
|
|
363
363
|
});
|
|
364
364
|
}
|
|
@@ -378,16 +378,16 @@
|
|
|
378
378
|
if (this.myConfig.multiple) {
|
|
379
379
|
this.multiple = true;
|
|
380
380
|
}
|
|
381
|
-
|
|
381
|
+
|
|
382
382
|
if(this.queryConfig.isTree) {
|
|
383
383
|
this.queryConfig.showTitle = false;
|
|
384
384
|
}
|
|
385
|
-
|
|
385
|
+
|
|
386
386
|
if (this.myConfig.setQueryConfig) {
|
|
387
387
|
this.myConfig.setQueryConfig(this.queryConfig);
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
|
-
|
|
390
|
+
|
|
391
391
|
},
|
|
392
392
|
valueToFatherValue() {
|
|
393
393
|
let para= {};
|
|
@@ -402,7 +402,7 @@
|
|
|
402
402
|
} else {
|
|
403
403
|
para.value = this.value;
|
|
404
404
|
para.text = this.text;
|
|
405
|
-
}
|
|
405
|
+
}
|
|
406
406
|
return para;
|
|
407
407
|
},
|
|
408
408
|
click(){
|
|
@@ -429,6 +429,18 @@
|
|
|
429
429
|
}
|
|
430
430
|
if (flag) {
|
|
431
431
|
if (this.config.selectkey) {
|
|
432
|
+
if(this.query && this.query.Config ) {
|
|
433
|
+
const lastParam = this.query.Config.lastQueryParam;
|
|
434
|
+
if(lastParam) {
|
|
435
|
+
const newParam = { ...lastParam, ...this.searchParam };
|
|
436
|
+
if( JSON.stringify(lastParam) === '{}') {
|
|
437
|
+
this.query.Config.lastQueryParam = newParam;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
this.searchParam = { ...newParam };
|
|
441
|
+
this.$refs['popView'].setSearchBeforeSearchParam(this.searchParam);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
432
444
|
this.popShow = true;
|
|
433
445
|
if (this.myConfig.clearCondition !== false) {
|
|
434
446
|
if (this.$refs['popView'].clearCondition) {
|
|
@@ -441,7 +453,7 @@
|
|
|
441
453
|
this.$refs['popView'].setData([]);
|
|
442
454
|
}
|
|
443
455
|
|
|
444
|
-
}
|
|
456
|
+
}
|
|
445
457
|
}
|
|
446
458
|
},
|
|
447
459
|
onEnter(e) {
|
|
@@ -459,7 +471,7 @@
|
|
|
459
471
|
if (this.myConfig.searchBefore) {
|
|
460
472
|
this.$refs['popView'].clearSearchBeforeSearchParam();
|
|
461
473
|
obj.value = this.text;
|
|
462
|
-
flag = this.myConfig.searchBefore(this,obj);
|
|
474
|
+
flag = this.myConfig.searchBefore(this,obj);
|
|
463
475
|
}
|
|
464
476
|
if (flag) {
|
|
465
477
|
if (!this.text) {
|
|
@@ -475,7 +487,7 @@
|
|
|
475
487
|
}
|
|
476
488
|
if (this.searchParam !== undefined) {
|
|
477
489
|
this.$refs['popView'].setSearchBeforeSearchParam(this.searchParam);
|
|
478
|
-
}
|
|
490
|
+
}
|
|
479
491
|
searchParam[this.queryConfig.responseCode] = this.text;
|
|
480
492
|
let data = this.$refs['popView'].popValueChanged(searchParam);
|
|
481
493
|
if (data.length === 0) {
|
|
@@ -506,7 +518,7 @@
|
|
|
506
518
|
let mktname=mktNameArray.join(',');
|
|
507
519
|
this.text=mktname;
|
|
508
520
|
},
|
|
509
|
-
|
|
521
|
+
|
|
510
522
|
onToggleExpand() {
|
|
511
523
|
return this.$refs.myTreeBox.onToggleExpand();
|
|
512
524
|
},
|
|
@@ -559,7 +571,7 @@
|
|
|
559
571
|
} else {
|
|
560
572
|
temp.label = el;
|
|
561
573
|
}
|
|
562
|
-
selectedMultiple.push(temp);
|
|
574
|
+
selectedMultiple.push(temp);
|
|
563
575
|
});
|
|
564
576
|
}
|
|
565
577
|
this.selectedMultiple = selectedMultiple;
|
|
@@ -596,6 +608,6 @@
|
|
|
596
608
|
immediate: true
|
|
597
609
|
}
|
|
598
610
|
}
|
|
599
|
-
|
|
611
|
+
|
|
600
612
|
};
|
|
601
|
-
</script>
|
|
613
|
+
</script>
|