Commit a177b67a authored by xiejb's avatar xiejb

货主 接口调整

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