Commit fa37ed34 by peii

费用配置

parent 2cfd25c6
Showing with 18 additions and 11 deletions
......@@ -184,7 +184,8 @@ class EquipConsuPage extends Component {
sysValues: {
OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY: 0,
OBS_MOBILE_CONSU_DOCTOR_DISPLAY: 0,
OBS_MOBILE_CONSU_FOLLOW_DISPLAY: 0
OBS_MOBILE_CONSU_FOLLOW_DISPLAY: 0,
OBS_MOBILE_CONSUME_FEE: 'Y'
},
departments: [],
localDoctors: [],
......@@ -669,6 +670,9 @@ class EquipConsuPage extends Component {
*/
async getDepartmentsByOrg(org_code) {
const {token, global_domain_config, userInfo} = this.props
const {sysValues} = this.state
if (sysValues.OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY < 2) return
const params = {
access_token: token,
org_code,
......@@ -812,7 +816,7 @@ class EquipConsuPage extends Component {
* @return {*}
*/
selectOrderCallback(item) {
const { listOptionData } = this.state
const { listOptionData, sysValues } = this.state
listOptionData[3].value = item.collect_number
listOptionData[3].name = item.collect_number
this.setState({ listOptionData}, () => {
......@@ -820,7 +824,7 @@ class EquipConsuPage extends Component {
this.getCurOrderDetail()
this.autoSetDoctorAndFollower()
this.setUserEnteredPrice(item.collect_number)
this.getConsumeFeeLines(item.collect_number)
sysValues.OBS_MOBILE_CONSUME_FEE && this.getConsumeFeeLines(item.collect_number)
})
}
......@@ -837,14 +841,14 @@ class EquipConsuPage extends Component {
try {
const res = await reqConsumeFeeLines(this.props.global_domain_config, params)
console.log(res);
if (res.error_code !== 0) {
return show(res.error_msg || '请求失败')
}
if (res.error_code !== 0) return {}
this.setState({fees: res.data})
this.props.setCharDetailsOption(res.data.collect_fee_lines)
return res.data
} catch (error) {
console.log(error);
return {}
}
}
......@@ -1341,9 +1345,12 @@ class EquipConsuPage extends Component {
if(state.listOptionData[13].subOption && state.listOptionData[13].subOption.length > 0){
tempSubOption.fee_lines = R.compose(
R.map(item => {
item.quantity = Number(item.quantity)
R.addIndex(R.map)((item, index) => {
item.quantity = isNotBlank(item.quantity) ? Number(item.quantity) : 1
item.sale_price = Number(item.sale_price)
item.unit_code = 'JIAN'
item.surgery_collect_fee_line_number = (index + 1).toString()
item.surgery_collect_number = tempSubOption.surgery_collect_number
return item
}),
R.map(R.dissocPath(['id'])),
......@@ -1361,7 +1368,7 @@ class EquipConsuPage extends Component {
access_token: props.token,
data: { ...tempSubOption }
}
console.log('==params====', params)
// console.log('==params====', params)
props.requestEquipSumbit(params)
}
}
......@@ -1941,7 +1948,7 @@ class EquipConsuPage extends Component {
}
render() {
let { canSubFlag } = this.state
let { canSubFlag, sysValues } = this.state
let { navigation } = this.props
let { title } = navigation.state.params
return (
......@@ -1960,7 +1967,7 @@ class EquipConsuPage extends Component {
{this.renderListItem()}
{this.renderRemarksItem()}
{this.renderConsumablesDetailsItem()}
{this.renderChargeDetailsItem()}
{sysValues.OBS_MOBILE_CONSUME_FEE === 'Y' && this.renderChargeDetailsItem()}
{this.renderAddPicturesItem()}
{this.renderZoomPicture()}
<FooterBtnStyle
......
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