|
|
|
@ -74,8 +74,7 @@ |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input |
|
|
|
type="text" |
|
|
|
v-model="scope.row.price" |
|
|
|
@change="inputchang(scope.row, $event.target.value)" |
|
|
|
v-model="personnelUnit.nogroupselected[scope.$index].price" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -175,10 +174,8 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
inputchang(row, newVal) { |
|
|
|
console.log(row); |
|
|
|
console.log(newVal); |
|
|
|
// this.price = v.price; |
|
|
|
// console.log(this.price); |
|
|
|
this.price = row.price; |
|
|
|
console.log(this.price); |
|
|
|
}, |
|
|
|
//保存按钮 |
|
|
|
Onsubmit() { |
|
|
|
@ -186,6 +183,7 @@ export default { |
|
|
|
alert("请先选择单位分组"); |
|
|
|
return; |
|
|
|
} else { |
|
|
|
console.log(this.personnelUnit.nogroupselected); |
|
|
|
postapi("/api/app/customer-org-group-detail/many", this.addrulst).then( |
|
|
|
(res) => { |
|
|
|
this.$message.success("操作成功"); |
|
|
|
@ -213,6 +211,8 @@ export default { |
|
|
|
if (this.personnelUnit.form.id == "") { |
|
|
|
alert("请先选择单位类别"); |
|
|
|
} else { |
|
|
|
// 让按钮恢复禁用 |
|
|
|
this.saveornot = false; |
|
|
|
//personnelUnit.nogroupselected |
|
|
|
if (this.rightselctedata.length == 0) { |
|
|
|
this.$message.warning("已选数据为空无法移动"); |
|
|
|
@ -220,21 +220,19 @@ export default { |
|
|
|
let count = this.rightselctedata.length - 1; |
|
|
|
for (var i = count; i >= 0; i--) { |
|
|
|
// this.personnelUnit.nogroupselected.splice(i, 1); |
|
|
|
|
|
|
|
// !this.rightselctedata.includes(this.rightselctedata[i].displayName) |
|
|
|
[...new Set(this.rightselctedata)]; |
|
|
|
|
|
|
|
this.tabledata.push(this.rightselctedata[i]); |
|
|
|
this.personnelUnit.nogroupselected.splice(i, 1); |
|
|
|
|
|
|
|
// this.tabledata.push(this.rightselctedata[i]); |
|
|
|
} |
|
|
|
console.log(this.personnelUnit.customerOrgGroupId); |
|
|
|
|
|
|
|
// this. |
|
|
|
this.rightselctedata.forEach((item) => { |
|
|
|
console.log(this.personnelUnit.customerOrgGroupId); |
|
|
|
this.addrulst.push({ |
|
|
|
asbitemId: item.id, |
|
|
|
price: item.price, |
|
|
|
price: price, |
|
|
|
// price: this.price, |
|
|
|
customerOrgGroupId: this.personnelUnit.customerOrgGroupId, |
|
|
|
}); |
|
|
|
@ -255,35 +253,43 @@ export default { |
|
|
|
} else { |
|
|
|
if (this.unselecteddata.length == 0) { |
|
|
|
this.$message.warning("未选数据为空无法移动"); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.saveornot = false; |
|
|
|
let count = this.unselecteddata.length - 1; |
|
|
|
let uniqueSet = [...new Set(this.unselecteddata, ...this.tabledata)]; |
|
|
|
const filteredArray = []; |
|
|
|
let count = this.unselecteddata.length - 1; |
|
|
|
for (var i = count; i >= 0; i--) { |
|
|
|
// this.tabledata.splice(i, 1); |
|
|
|
this.unselecteddata.push(this.unselecteddata[i]); |
|
|
|
this.tabledata.splice(i, 1); |
|
|
|
if ([...new Set(this.unselecteddata)]) { |
|
|
|
// this.unselecteddata.push(this.unselecteddata[i]); |
|
|
|
this.personnelUnit.nogroupselected.push(this.unselecteddata[i]); |
|
|
|
this.tabledata.splice(i, 1); |
|
|
|
} |
|
|
|
// this.personnelUnit.nogroupselected.push(this.unselecteddata[i]); |
|
|
|
} |
|
|
|
console.log(this.personnelUnit.customerOrgGroupId); |
|
|
|
this.unselecteddata.forEach((item) => { |
|
|
|
this.price = item.price; |
|
|
|
// var price = ""; |
|
|
|
// if (this.price == "") { |
|
|
|
// price = item.price; |
|
|
|
// } else { |
|
|
|
// price = this.price; |
|
|
|
// } |
|
|
|
//获取最新价格 |
|
|
|
}); |
|
|
|
let prices = ""; |
|
|
|
this.personnelUnit.nogroupselected.forEach((items) => { |
|
|
|
prices = items.price; |
|
|
|
console.log(prices); |
|
|
|
// this.price = item.price; |
|
|
|
console.log(price); |
|
|
|
this.addrulst.push({ |
|
|
|
asbitemId: item.id, |
|
|
|
price: item.price, |
|
|
|
asbitemId: "3a0b2f0c-f884-bec4-a350-79b46b455a2d", |
|
|
|
price: prices, |
|
|
|
// price: this.psrice, |
|
|
|
customerOrgGroupId: this.personnelUnit.customerOrgGroupId, |
|
|
|
}); |
|
|
|
}); |
|
|
|
console.log(this.addrulst, "hhhhhhh"); |
|
|
|
// this.selecteddata = this.unselecteddata; |
|
|
|
// 复制 |
|
|
|
// let count = this.unselecteddata.length - 1; |
|
|
|
// for (var i = count; i >= 0; i--) { |
|
|
|
// this.tabledata.splice(i, 1); |
|
|
|
// this.selecteddata.push(this.unselecteddata[i]); |
|
|
|
// } |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|