Commit 7a45fc0f by wong.peiyi

修复没有用户只有一个组织时没立即带出部门

parent 9a495df8
......@@ -12,6 +12,7 @@ import ZoomPictureModel from '../common/ZoomPictureModel';
import { requestEquipOrganizations, requestEquipSurgeryHospital, requestEquipOrderInfo, uploadEquipImg, setSubdetailOption, setCharDetailsOption, requestEquipSumbit, setEquipInitData, reqEquipSurgeryHospital, reqEquipOrderInfo, requestListDataSuccess, reqEquipOrganizations, requestEquipDetails, reqOrgDepartments } from '../../action/EquipAction';
import { EQUIP_CONSU_LIST_DOING, EQUIP_CONSU_LIST_SUCCESS, EQUIP_CONSU_LIST_FAILURE, LOGIN_NO, EQUIP_SUBMIT_DOING, EQUIP_SUBMIT_SUCCESS, EQUIP_SUBMIT_FAILURE } from '../../base/ActionTypes';
import moment from 'moment';
import { isNotBlank } from "../../utils/Utils";
import ImagePicker from 'react-native-image-picker';
import { exitLoginStatus, requestSysProfile } from '../../action/LoginAction';
import LodingModel from '../common/LodingModel';
......@@ -184,8 +185,10 @@ class EquipConsuPage extends Component {
OBS_MOBILE_CONSU_DOCTOR_DISPLAY: 0,
OBS_MOBILE_CONSU_FOLLOW_DISPLAY: 0
},
departments: [],
localDoctors: [],
localFollowers: []
localFollowers: [],
orderInfos: {}
}
}
......@@ -461,7 +464,7 @@ class EquipConsuPage extends Component {
// 修改当前选择器数据
changeCurrentOption() {
let { currentTitle } = this.state
let { currentTitle, orderInfos, listOptionData } = this.state
let { equipOrderOption } = this.props
let tempOption = []
let that = this
......@@ -497,6 +500,7 @@ class EquipConsuPage extends Component {
resultArr.push(obj)
})
tempOption = [...resultArr]
orderInfos[`${listOptionData[1].value}_${listOptionData[2].value}`] = tempOption
const doctors = R.map(R.applySpec({
collect_number: R.prop('collect_number'),
......@@ -565,7 +569,7 @@ class EquipConsuPage extends Component {
handItemClickCheck(curData, objName, itemName, itemVal) {
if (!this.judgeOrgIsNull()) return
const {listOptionData, departments} = this.state
let options = this.state[objName]
let options = this.state[objName] || []
if (objName === 'localFollowers' && !this.judgeCustomerIsNull() && !this.judgeOrderInfoIsNull()) return
......@@ -751,6 +755,12 @@ class EquipConsuPage extends Component {
value: curData.value
}
}, () => {
const { orderInfos, listOptionData } = state
const options = orderInfos[`${listOptionData[1].value}_${listOptionData[2].value}`]
if (isNotBlank(options)) {
this.setState({ listCurrentOption: options, showTypePop: true })
return
}
let params = {
access_token: props.token,
org_code: state.listOptionData[1].value,
......
......@@ -911,6 +911,7 @@ class EquipConsuPage extends Component {
listOptionData
}, () => {
that.organizationGetCustomerData()
that.getDepartmentsByOrg(listOptionData[1].value)
})
}
}else {
......
......@@ -793,6 +793,7 @@ class SelfOrderPage extends Component {
listOptionData
}, () => {
that.organizationGetCustomerData()
that.getDepartmentsByOrg(listOptionData[1].value)
})
}
} else if (orgResult.error_code == 41006) {
......
......@@ -699,6 +699,7 @@ class TransOrderPage extends Component {
listOptionData
}, () => {
that.organizationGetCustomerData()
that.getDepartmentsByOrg(listOptionData[1].value)
})
}
}else {
......
......@@ -78,7 +78,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Staging"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
......
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