Commit cd24825f by xuyl

修复bug

1 parent a11b6389
...@@ -85,6 +85,7 @@ export default { ...@@ -85,6 +85,7 @@ export default {
dialogVisible: false, dialogVisible: false,
totalScore: '', totalScore: '',
choiceData: [], choiceData: [],
choiceDataBack:[],
pageConf: { pageConf: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageNum: 'pageNum', pageNum: 'pageNum',
...@@ -166,12 +167,11 @@ export default { ...@@ -166,12 +167,11 @@ export default {
}) })
return return
} }
this.choiceData.forEach(item => { this.verificationWriteOff = this.choiceData.every(item => {
if (item.isWithdrawal == '1' || item.exchangeStatus == '1') { if (!item.isWithdrawal || item.isWithdrawal == '1' || item.exchangeStatus == '1') {
console.log(item) return false
this.verificationWriteOff = false
} else { } else {
this.verificationWriteOff = true return true
} }
}) })
if (!this.verificationWriteOff) { if (!this.verificationWriteOff) {
...@@ -187,6 +187,7 @@ export default { ...@@ -187,6 +187,7 @@ export default {
let obj = {} let obj = {}
let numberOfStoresArr = [] let numberOfStoresArr = []
let totalPoints = 0 let totalPoints = 0
this.choiceDataBack = JSON.parse(JSON.stringify(this.choiceData))
this.processArray = this.choiceData.reduce((curr, next) => { this.processArray = this.choiceData.reduce((curr, next) => {
obj[next.staffPhone] ? '' : obj[next.staffPhone] = curr.push(next) obj[next.staffPhone] ? '' : obj[next.staffPhone] = curr.push(next)
numberOfStoresArr.includes(next.merchantName) ? '' : numberOfStoresArr.push((next.merchantName)) numberOfStoresArr.includes(next.merchantName) ? '' : numberOfStoresArr.push((next.merchantName))
...@@ -207,7 +208,7 @@ export default { ...@@ -207,7 +208,7 @@ export default {
}, },
async comfirmDialog() { async comfirmDialog() {
let arr = [] let arr = []
this.processArray && this.processArray.forEach(item => arr.push(item.id)) this.choiceDataBack && this.choiceDataBack.forEach(item => arr.push(item.id))
const params = { idList: arr } const params = { idList: arr }
await profitApi.verificationPoints({ ...params }).then(res => { await profitApi.verificationPoints({ ...params }).then(res => {
if (res.code == '0') { if (res.code == '0') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!