Commit 6b897e07 by Denglingling

优化【消耗确认】,新增单价支持 0 ,以及相关订单排序规则

parent 04f673b6
......@@ -73,7 +73,7 @@ class ChargeDetailsPage extends Component {
that.refs.LoadingModel.hide()
let { data: { sys_values } } = charRes
if (sys_values.length === 0) {
that.showErrorModel(`当前费用类型为空,联系管理员配置!`)
show(`当前费用类型为空,联系管理员配置!`)
return
}
let resultArr = []
......@@ -89,12 +89,12 @@ class ChargeDetailsPage extends Component {
})
} else if (charRes.error_code == 41006) {
that.refs.LoadingModel.hide()
that.showErrorModel(`登录过期,请重新登录`)
show(`登录过期,请重新登录`)
props.exitLoginStatus();
} else {
that.refs.LoadingModel.hide()
let error_msg = charRes.error_msg || charRes.message
that.showErrorModel(error_msg);
show(error_msg);
}
}
......
......@@ -71,7 +71,7 @@ class ConsumDetailsPage extends Component {
return fiItem.raised_consume != 'Y'
})
if(lines.length == 0) {
show('当前明细数据为空,请重新选择订单')
show('当前订单无明细数据,请重新选择订单!')
} else {
let {subDetOption} = this.props // 【器械消耗】已存在的明细
lines.length && lines.forEach((chItem, chInd) => {
......@@ -104,7 +104,7 @@ class ConsumDetailsPage extends Component {
// 搜索 输入
handleSearchInput(text) {
let { allConOption } = this.state
let self = this
let that = this
let tempArr = []
if(text) {
allConOption.forEach(item => {
......@@ -120,7 +120,7 @@ class ConsumDetailsPage extends Component {
this.setState({
conDetaOption: tempArr
}, () => {
self.changeIsSelected()
that.changeIsSelected()
})
}
......
......@@ -42,21 +42,34 @@ class FillUnitPricePage extends Component {
let {unitPriceOption} = this.state
let canSubFlag = true
let {props} = this
let cur_zero = []
let cur_timer = 0
for(let i in unitPriceOption) {
if(!unitPriceOption[i].local_add_price) {
show('请填写完单价!')
canSubFlag = false
break
if(unitPriceOption[i].local_add_price === 0){
cur_zero.push(parseInt(i)+1)
unitPriceOption[i].sale_price = unitPriceOption[i].local_add_price
}else {
show('请填写完单价!')
canSubFlag = false
break
}
}
unitPriceOption[i].sale_price = unitPriceOption[i].local_add_price
}
if(cur_zero.length > 0){
show(`请确认当前第${cur_zero.join('、')}个明细单价为0!`)
cur_timer = 500
}
if(canSubFlag) {
this.setState({
unitPriceOption
})
// 存储于store中,并跳转
props.setSubdetailOption(unitPriceOption)
props.navigation.navigate('EquipConsuPage', { title: '器械消耗' })
setTimeout(() => {
props.navigation.navigate('EquipConsuPage', { title: '器械消耗' })
}, cur_timer)
}
}
......@@ -81,7 +94,7 @@ class FillUnitPricePage extends Component {
// 返回每一列元素
renderSubListItem(item, index) {
let price = ''
if(item.local_add_price) {
if(item.local_add_price || item.local_add_price === 0) {
price = String(item.local_add_price)
}
return(
......
......@@ -124,6 +124,7 @@ class LineOrderPage extends Component {
surgery_collect_number: supData.local_his_number
}
let bowResult = await requestGetLineFormBorrow(props.global_domain_config, params)
console.log('获取借货订单行数据 res=====', bowResult)
if(bowResult.error_code == 0) {
that.changeSubLoding(false)
// 成功
......@@ -161,6 +162,7 @@ class LineOrderPage extends Component {
consume_order_number: supData.local_his_number
}
let conResult = await requestGetLineFormConsume(props.global_domain_config, params)
console.log('获取消耗订单行数据 res=====', conResult)
if(conResult.error_code == 0) {
that.changeSubLoding(false)
// 成功
......@@ -205,6 +207,7 @@ class LineOrderPage extends Component {
source_surgery_order_number: supData.source_surgery_order_number
}
let conResult = await requestGetLineFormTrans(props.global_domain_config, params)
console.log('获取转单订单行数据 res=====', conResult)
if(conResult.error_code == 0) {
that.changeSubLoding(false)
// 成功
......
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