Commit 6a783d4a by LJM

js

parent fe0b8343
Showing with 29 additions and 27 deletions
......@@ -599,39 +599,41 @@ export default {
}
},
checkBind(ids) {
this.$http('get', "/api/quote/checkpinlist", {
inquiry_items_id: this.$route.query.id,
pin_type: (this.active == 1 ? 1 : 2),
pin_obj_ids: ids
}).then(res => {
if (res.code === 0) {
if (res.data && res.data.bind_ids && res.data.bind_ids.length > 0) {
var arr_ = this.active == 1 ? JSON.parse(JSON.stringify(this.historyList)) : JSON.parse(JSON.stringify(this.tableData))
for (var i = 0; i < arr_.length; i++) {
var str_ = this.active == 1 ? String(arr_[i].id) : String(arr_[i].goods_id);
if (res.data.bind_ids.indexOf(str_) != -1) {
if (this.active == 1) {
arr_[i].disabled = true
this.historyList = arr_
} else {
arr_[i].disabled = true
this.tableData = arr_
}
} else {
if (this.active == 1) {
arr_[i].disabled = false
this.historyList = arr_
if(ids){
this.$http('get', "/api/quote/checkpinlist", {
inquiry_items_id: this.$route.query.id,
pin_type: (this.active == 1 ? 1 : 2),
pin_obj_ids: ids
}).then(res => {
if (res.code === 0) {
if (res.data && res.data.bind_ids && res.data.bind_ids.length > 0) {
var arr_ = this.active == 1 ? JSON.parse(JSON.stringify(this.historyList)) : JSON.parse(JSON.stringify(this.tableData))
for (var i = 0; i < arr_.length; i++) {
var str_ = this.active == 1 ? String(arr_[i].id) : String(arr_[i].goods_id);
if (res.data.bind_ids.indexOf(str_) != -1) {
if (this.active == 1) {
arr_[i].disabled = true
this.historyList = arr_
} else {
arr_[i].disabled = true
this.tableData = arr_
}
} else {
arr_[i].disabled = false
this.tableData = arr_
if (this.active == 1) {
arr_[i].disabled = false
this.historyList = arr_
} else {
arr_[i].disabled = false
this.tableData = arr_
}
}
}
}
}
}
})
})
}
},
getHistory() {
console.log('历史报价')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment