diff --git a/src/views/basic/UdiInfoSelectLocalUdi.vue b/src/views/basic/UdiInfoSelectLocalUdi.vue
index 16eff09..66fe91e 100644
--- a/src/views/basic/UdiInfoSelectLocalUdi.vue
+++ b/src/views/basic/UdiInfoSelectLocalUdi.vue
@@ -85,7 +85,10 @@
>国家同步库查询
-
+ 查看选中数据
+
@@ -96,18 +99,8 @@
style="width: 100%"
v-loading="loading"
highlight-current-row="true"
- :row-class-name="tableRowClassName"
- @current-change="handleErpChange"
- @selection-change="handleSelectionUdiChange"
+ ref="multipleTable"
>
-
-
-
详情
+ 添加
+
@@ -365,6 +365,58 @@
>
+
+
+
+
+
+
+
+
+
+
+ 移除
+
+
+
+
+
+
@@ -436,6 +488,8 @@ export default {
multipleUdiSelection: [],
selectDialog: false,
diDetails: null,
+ checkedDataVisible: false,
+ checkedList: [],
};
},
methods: {
@@ -551,7 +605,6 @@ export default {
return "";
},
handleErpChange(val) {
- console.log(val);
this.currentRow = val;
},
intentBack() {
@@ -559,18 +612,10 @@ export default {
},
checkCombine() {
- let selectData = this.multipleUdiSelection;
+ let selectData = this.checkedList;
let selected = null;
- if (this.multipleUdiSelection.length == 0) {
- if (this.relId != null) {
- this.combineQuery.relId = this.relId;
- this.combineQuery.keys.push(this.currentRow.uuid);
- if (this.currentRow.check) {
- selected = this.currentRow;
- }
- } else
- return;
-
+ if (this.checkedList.length == 0) {
+ return;
} else {
selectData.forEach((obj) => {
if (obj.check) {
@@ -589,6 +634,7 @@ export default {
this.combineLoading = false;
if (response.code == 20000) {
this.combine();
+ this.checkedList = [];
// combineUdi(this.combineQuery)
// .then((response) => {
// this.combineLoading = false;
@@ -630,8 +676,6 @@ export default {
this.combineLoading = false;
this.$emit("closeUdi", false);
});
-
-
},
combine() {
@@ -657,12 +701,7 @@ export default {
});
},
- handleSelectionUdiChange(val) {
- console.log("----" + val);
- this.multipleUdiSelection = val;
- },
findMethod(query) {
- console.log(query);
let cQuery = {
ylqxzcrbarmc: query,
page: 1,
@@ -678,6 +717,25 @@ export default {
this.fromOptions = [];
});
},
+ addItem(row) {
+ if (this.checkedList.indexOf(row) === -1) {
+ this.checkedList.push(row);
+ this.$message.success("添加成功");
+ } else {
+ this.$message.info("已添加");
+ }
+ },
+ showCheckedData() {
+ this.checkedDataVisible = true;
+ },
+ removeCheckedItem(row) {
+ for (let i = 0; i < this.checkedList.length; i++) {
+ if (this.checkedList[i].id === row.id) {
+ this.checkedList.splice(i, 1);
+ break;
+ }
+ }
+ }
},
components: {
selectDiDetail,