Commit 6b897e07 by Denglingling

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

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