Commit 2b917d75 by wangzhihui

fixed

1 parent 4087e77c
......@@ -132,7 +132,7 @@ export default {
relateStoreVisible: {
handler(val) {
if (val) {
this.selectedData = this.storeSelected
this.selectedData = JSON.parse(JSON.stringify(this.storeSelected))
this.recoverySelection()
}
......@@ -144,7 +144,6 @@ export default {
clearData() {
this.storeSearchForm.staffName = ""
this.currentPage = 1
console.log(this.storeSearchForm.staffPhone)
},
checkSelectable(row, index) {
const obj = this.selectingList.find((v) => v.staffPhone == row.staffPhone)
......@@ -199,14 +198,20 @@ export default {
},
handleAll(selection) {
console.log(selection)
let arr = [...this.selectedData, ...this.selectingList]
console.log(arr)
this.selectingData.forEach((item) => {
var isExit = this.selectedData.findIndex(
var isExit = arr.findIndex(
(subItem) => subItem.staffPhone === item.staffPhone
)
if (selection.length && isExit === -1) {
this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
this.selectedData.forEach((third, index) => {
if (third.staffPhone === item.staffPhone) {
this.selectedData.splice(index, 1)
}
})
}
})
},
......
......@@ -325,7 +325,6 @@ export default {
this.selectingList = []
},
confirmStaff(val) {
console.log(val)
this.selectingList = []
this.form.configList[this.configIndex].staffList = val
this.groupVisible = false
......@@ -350,7 +349,6 @@ export default {
this.selectingList.push(item1)
})
})
console.log(this.selectingList)
},
addConfig() {
if (this.form.configList.length >= 9) {
......@@ -478,6 +476,7 @@ export default {
// console.log(item, field)
let value = item[field]
value = parseInt(value) || ""
value = isNaN(value) || ""
// 限制最大值
if (parseInt(value) > maxLimit) {
value = ""
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!