Commit ba591ac7 authored by xiejb's avatar xiejb

高级搜索 添加必选项客户

parent 7972b674
......@@ -12,7 +12,7 @@ module.exports = merge(prodEnv, {
// 正式
// HOST_URL: '"http://mobileportal.shaphar.com"',
// PORT: '":8028"',
// BASE_URL: '"/basservice"'
// BASE_URL: '"/basservice"',
// appRealDb: '"app_real_shaphar"',
//NEW 正式
// HOST_URL: '"https://mobileportal.shaphar.com"',
......
......@@ -111,3 +111,12 @@ export function getOrderCustomerSetList(params) {
loading: true
})
}
// 获取王老板供应商
export function getQuerySalesRefList(params) {
return fetch({
url: '/OrderLife/querySalesRef',
method: 'post',
data: params,
loading: true
})
}
\ No newline at end of file
......@@ -18,7 +18,7 @@
</van-search>
<div class="search">
<search-result :result-num="searchNum"></search-result>
<!-- <van-checkbox @click="itemClick(item,index)" v-model="allChecked">复选框</van-checkbox> -->
<van-checkbox class="" @click="allItemClick()" v-model="allChecked">全选</van-checkbox>
</div>
<div class="w100 listHeight" ref="scrollRef">
<van-pull-refresh
......@@ -137,6 +137,20 @@ export default {
}
},
methods: {
// 全选
allItemClick () {
const companyList = []
this.checkedList = []
this.choosedPost = []
if (this.allChecked) {
this.postDataList.forEach(item => {
// console.log(item)
const model = item
this.choosedPost.push(item)
this.checkedList.push(item.id)
})
}
},
/// 标题拼接 <!-- 药厂码/SAP码)名称 -->
titleInitial(model) {
return model.companyname + '/(' + model.erp_userid[0] + ')'
......@@ -302,8 +316,10 @@ export default {
}
.search{
background-color: #F5F5F5;
display: flex;
padding-right: 10px;
.content {
flex: 1;
}
}
.title-layout {
......
......@@ -103,7 +103,7 @@ export default {
this.checkedList = []
this.choosedPost = JSON.parse(JSON.stringify(this.customer))
// this.checked = !this.customer.comPartyId ? '' : this.customer.comPartyId
// console.log(this.checked)
console.log(this.consignor)
this.customer.forEach((res)=>{
this.checkedList.push(res.org)
})
......
......@@ -22,19 +22,20 @@
<div class="title font-bold font-16"><span style="color: red;">* </span>供应商</div>
<div :class="moreSearchInfo.consignor.length !== 0 ? 'nom inputInfo': 'select inputInfo'" contenteditable="false" placeholder="请选择供应商">{{supplier}}</div>
</div>
<div class="high-info" @click="showPost('client')">
<div class="title font-bold font-16"><span style="color: red;">* </span>客户</div>
<div :class="isSelectConsignorSupplier === true ? 'nom inputInfo': 'select inputInfo'" contenteditable="false" placeholder="请选择客户">{{client}}</div>
</div>
<div class="high-info" @click="showPost('orderNo')">
<div class="title font-bold font-16">请输入订单号</div>
<div @keyup="changeData($event)" :class="isSelectConsignorSupplier === true ? 'nom input': 'select input'" :contenteditable="isSelectConsignorSupplier === true ? 'true': 'false'" class="inputInfo" placeholder="请输入订单号"></div>
<div @keyup="changeData($event)" :class="isSelectClient === true ? 'nom input': 'select input'" :contenteditable="isSelectConsignorSupplier === true ? 'true': 'false'" class="inputInfo" placeholder="请输入订单号"></div>
<!-- <input :class="isSelectConsignorSupplier === true ? 'nom input': 'select input'" :disabled="!isSelectConsignorSupplier" v-model="moreSearchInfo.orderNo" placeholder="请输入订单号" class="input" type="text"> -->
</div>
<div class="high-info" @click="showPost('goods')">
<div class="title font-bold font-16">商品</div>
<div :class="isSelectConsignorSupplier === true ? 'nom inputInfo': 'select inputInfo'" contenteditable="false" placeholder="请选择商品">{{goods}}</div>
</div>
<div class="high-info" @click="showPost('client')">
<div class="title font-bold font-16">客户</div>
<div :class="isSelectConsignorSupplier === true ? 'nom inputInfo': 'select inputInfo'" contenteditable="false" placeholder="请选择客户">{{client}}</div>
<div :class="isSelectClient === true ? 'nom inputInfo': 'select inputInfo'" contenteditable="false" placeholder="请选择商品">{{goods}}</div>
</div>
</div>
<!-- <van-cell-group class="high-info">
<van-cell class="flex4" is-link
......@@ -119,6 +120,8 @@ import TimeChoose from '@/components/CgTimeChoose'
import {getFormateDate} from '@/utils/common'
// 供应商
import SearchInSupplier from "@/components/SearchInSupplier";
// 供应商
// import SearchInSupplier from "@/components/SearchInOrderSupplier";
// 货主
import SearchInConsignor from "@/components/SearchInConsignor";
// 商品
......@@ -229,6 +232,13 @@ export default {
return false
}
return true
},
// 货主与供应商是否选择
isSelectClient () {
if (!this.moreSearchInfo.client.comPartyId) {
return false
}
return true
}
},
props: {
......@@ -268,7 +278,9 @@ export default {
},
methods: {
changeData (event) {
this.moreSearchInfo.orderNo = event.srcElement.innerHTML
let str = event.srcElement.innerHTML + ''
this.moreSearchInfo.orderNo = str
console.log(this.moreSearchInfo.orderNo)
},
timeConfirm (data) {
this.moreSearchInfo.time = data
......@@ -279,7 +291,11 @@ export default {
return
}
if (this.moreSearchInfo.supplier.length === 0) {
this.$toast('请先供应商!')
this.$toast('请先选择供应商!')
return
}
if (!this.moreSearchInfo.client || !this.moreSearchInfo.client.comPartyId) {
this.$toast('请先选择客户!')
return
}
// if (this.moreSearchInfo.supplier.org === '' || this.moreSearchInfo.supplier.org === null || this.moreSearchInfo.supplier.org === undefined) {
......
......@@ -125,7 +125,7 @@ export default {
if (rt.data.list.length !== 1) {
this.moreSearchShow = true
} else if (rt.data.list.length === 1) {
this.moreSearchInfo.consignor.push(rt.data.list[0])
this.moreSearchInfo.consignor.push(this.postDataListAction(rt.data.list[0]))
this.getEmployeeOrgPostData(rt.data.list[0])
} else if (rt.data.list.length === 0) {
_this.$toast('暂无货主!')
......@@ -137,6 +137,11 @@ export default {
_this.$toast('列表获取失败')
})
},
postDataListAction(item) {
const removeItem = item
removeItem.erpUserid = item.erp_userid[0]
return item
},
getEmployeeOrgPostData(item) {
let _this = this
const companyList = []
......
......@@ -289,7 +289,7 @@ export default {
getValueArray (array) {
const vaueArray = []
array.forEach(item => {
vaueArray.push(item.org)
vaueArray.push(item.supplierId)
})
return vaueArray
},
......
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