Commit a177b67a authored by xiejb's avatar xiejb

货主 接口调整

parent e2a8b949
......@@ -46,7 +46,7 @@
<van-cell :title="titleInitial(item)" clickable @click="itemClick(item,index)" v-for="(item,index) in postDataList"
:key="index">
<template #right-icon>
<van-checkbox :name="item.id" />
<van-checkbox :name="item.cellId" />
</template>
</van-cell>
</van-cell-group>
......@@ -130,7 +130,7 @@ export default {
// this.checked = !this.customer.comPartyId ? '' : this.customer.comPartyId
// console.log(this.checked)
this.customer.forEach((res)=>{
this.checkedList.push(res.id)
this.checkedList.push(res.cellId)
})
this.currentPage = 1
this.onRefresh()
......@@ -154,13 +154,13 @@ export default {
// console.log(item)
const model = item
this.choosedPost.push(item)
this.checkedList.push(item.id)
this.checkedList.push(item.cellId)
})
}
},
/// 标题拼接 <!-- 药厂码/SAP码)名称 -->
titleInitial(model) {
return model.companyname + '/(' + model.erp_userid[0] + ')'
return model.companyname + '/(' + model.erp_user + ')'
},
onSearch () {
// if (!this.isJudgeStrNull(this.keywords)) {
......@@ -200,11 +200,11 @@ export default {
itemClick(item, index) {
// this.checked = item.comPartyId
// this.choosedPost = item
if(this.checkedList.indexOf(item.id) > -1) {
this.choosedPost.splice(this.checkedList.indexOf(item.id),1)
this.checkedList.splice(this.checkedList.indexOf(item.id),1)
if(this.checkedList.indexOf(item.cellId) > -1) {
this.choosedPost.splice(this.checkedList.indexOf(item.cellId),1)
this.checkedList.splice(this.checkedList.indexOf(item.cellId),1)
} else {
this.checkedList.push(item.id)
this.checkedList.push(item.cellId)
this.choosedPost.push(item)
}
if (this.choosedPost.length === this.postDataList.length) {
......@@ -248,14 +248,14 @@ export default {
getConsignorSetList(data).then(rt => {
if (rt.code === 200) {
if (_this.currentPage === 1) {
_this.searchNum = rt.data.total + ''
_this.searchNum = rt.data.length + ''
this.postDataList = []
}
if (this.isRefreshing) {
// console.log('111111')
this.postDataList = this.postDataListAction(rt.data.list)
} else if (rt.data.list || rt.data.list.length > 0) {
this.postDataList = this.postDataList.concat(this.postDataListAction(rt.data.list))
this.postDataList = this.postDataListAction(rt.data)
} else if (rt.data || rt.data.length > 0) {
this.postDataList = this.postDataList.concat(this.postDataListAction(rt.data))
// console.log('222222')
}
// _this.postDataListSetAction(rt.data)
......@@ -264,12 +264,12 @@ export default {
// 重置加载更多提示
_this.loading = false
// 若当前加载的页数没有满足每页的数量代表完全加载
if (rt.data.list.length < 10) {
// if (rt.data.length < 10) {
_this.finished = true
} else {
// } else {
// 加载成功后下一页自增1
_this.currentPage++
}
// }
} else {
_this.$toast(rt.message)
// _this.$toast('列表获取失败')
......@@ -298,20 +298,9 @@ export default {
const array = []
httpList.forEach(item => {
const removeItem = item
removeItem.erpUserid = item.erp_userid[0]
removeItem.cellId = item.id + item.erp_user
array.push(removeItem)
})
// let array = []
// for (let i = 0; i < httpList.length; i++) {
// let item = httpList[i]
// for (let index = 0; index < item.erp_userid.length; index++) {
// let userid = item.erp_userid[index]
// let model = item
// model.erpUserid = userid
// model.cellId = item.id + userid
// array.push(model)
// }
// }
return httpList
}
}
......
......@@ -32,6 +32,7 @@
<script>
import myOrderList from './myOrderList.vue'
import HighSearch from './components/HighSearch.vue'
// import HighSearch from './components/HighSearchNew.vue'
import {getEmployeeOrgQueryList, getConsignorSetList} from '@/api/common'
import {getFormateDate} from '@/utils/common'
import { bridge } from "@/utils";
......@@ -122,12 +123,12 @@ export default {
getConsignorSetList(data).then(rt => {
if (rt.code === 200) {
// this.postDataList = rt.data.list
if (rt.data.list.length !== 1) {
if (rt.data.length !== 1) {
this.moreSearchShow = true
} else if (rt.data.list.length === 1) {
this.moreSearchInfo.consignor.push(this.postDataListAction(rt.data.list[0]))
this.getEmployeeOrgPostData(rt.data.list[0])
} else if (rt.data.list.length === 0) {
} else if (rt.data.length === 1) {
this.moreSearchInfo.consignor.push(this.postDataListAction(rt.data[0]))
this.getEmployeeOrgPostData(rt.data[0])
} else if (rt.data.length === 0) {
_this.$toast('暂无货主!')
}
} else {
......@@ -139,7 +140,7 @@ export default {
},
postDataListAction(item) {
const removeItem = item
removeItem.erpUserid = item.erp_userid[0]
removeItem.cellId = item.id + item.erp_user
return item
},
getEmployeeOrgPostData(item) {
......@@ -149,7 +150,7 @@ export default {
'length': '100',
'attr': {
'empid': this.linkInfo.userId + ',1',
'userid': item.erp_userid[0],
'userid': item.erp_user,
'sysname': item.sysname,
'companyname': item.companyname
},
......
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 to comment