Commit aca17d51 by Denglingling

增加为空时的提示信息

(cherry picked from commit 30919775)
parent 1917c173
Showing with 12 additions and 0 deletions
......@@ -733,6 +733,10 @@ class EquipConsuPage extends Component {
let { data: { customers } } = cusResult
props.requestListDataSuccess(customers)
let filterOpt = dedupQuoteArray(customers, 'customer_code')
if(filterOpt.length === 0) {
show(`当前客户名称为空`)
return
}
if(filterOpt.length === 1) {
let { listOptionData } = state
listOptionData[2].name = filterOpt[0].customer_name
......@@ -789,6 +793,10 @@ class EquipConsuPage extends Component {
let { localCustomersOption, listOptionData } = this.state
let that = this
let tempLocalOption = localCustomersOption.filter(item => item.customer_code === listOptionData[2].value)
if(tempLocalOption.length === 0) {
show(`当前收单地点为空`)
return
}
if(tempLocalOption.length === 1) {
listOptionData[3].name = tempLocalOption[0].bill_to_site_name
listOptionData[3].value = tempLocalOption[0].bill_to_site_code
......@@ -833,6 +841,10 @@ class EquipConsuPage extends Component {
let { localCustomersOption, listOptionData } = this.state
let that = this
let tempLocalOption = localCustomersOption.filter(item => item.customer_code === listOptionData[2].value)
if(tempLocalOption.length === 0) {
show(`当前收货地点为空`)
return
}
if(tempLocalOption.length === 1) {
listOptionData[4].name = tempLocalOption[0].ship_to_site_name
listOptionData[4].value = tempLocalOption[0].ship_to_site_code
......
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