Commit 6a783d4a by LJM

js

parent fe0b8343
Showing with 29 additions and 27 deletions
...@@ -599,39 +599,41 @@ export default { ...@@ -599,39 +599,41 @@ export default {
} }
}, },
checkBind(ids) { checkBind(ids) {
this.$http('get', "/api/quote/checkpinlist", { if(ids){
inquiry_items_id: this.$route.query.id, this.$http('get', "/api/quote/checkpinlist", {
pin_type: (this.active == 1 ? 1 : 2), inquiry_items_id: this.$route.query.id,
pin_obj_ids: ids pin_type: (this.active == 1 ? 1 : 2),
}).then(res => { pin_obj_ids: ids
if (res.code === 0) { }).then(res => {
if (res.data && res.data.bind_ids && res.data.bind_ids.length > 0) { if (res.code === 0) {
var arr_ = this.active == 1 ? JSON.parse(JSON.stringify(this.historyList)) : JSON.parse(JSON.stringify(this.tableData)) if (res.data && res.data.bind_ids && res.data.bind_ids.length > 0) {
for (var i = 0; i < arr_.length; i++) { var arr_ = this.active == 1 ? JSON.parse(JSON.stringify(this.historyList)) : JSON.parse(JSON.stringify(this.tableData))
var str_ = this.active == 1 ? String(arr_[i].id) : String(arr_[i].goods_id); for (var i = 0; i < arr_.length; i++) {
if (res.data.bind_ids.indexOf(str_) != -1) { var str_ = this.active == 1 ? String(arr_[i].id) : String(arr_[i].goods_id);
if (this.active == 1) { if (res.data.bind_ids.indexOf(str_) != -1) {
arr_[i].disabled = true if (this.active == 1) {
this.historyList = arr_ arr_[i].disabled = true
} else { this.historyList = arr_
arr_[i].disabled = true } else {
this.tableData = arr_ arr_[i].disabled = true
} this.tableData = arr_
} else { }
if (this.active == 1) {
arr_[i].disabled = false
this.historyList = arr_
} else { } else {
arr_[i].disabled = false if (this.active == 1) {
this.tableData = arr_ arr_[i].disabled = false
this.historyList = arr_
} else {
arr_[i].disabled = false
this.tableData = arr_
}
} }
} }
} }
} }
})
} }
})
}, },
getHistory() { getHistory() {
console.log('历史报价') 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