Commit aef9bcf4 by peii

feat: 自助下单增加各种字段

parent d4018b0a
...@@ -433,7 +433,7 @@ export async function requestSurgeryType(global_domain_config, params) { ...@@ -433,7 +433,7 @@ export async function requestSurgeryType(global_domain_config, params) {
} }
/** /**
* @description: 请求临调订单各种显示 * @description: 请求自助下单病人各种显示
* @param {*} * @param {*}
* @return {*} * @return {*}
*/ */
...@@ -442,7 +442,7 @@ export function getLendOrderCodeValues() { ...@@ -442,7 +442,7 @@ export function getLendOrderCodeValues() {
let { global_domain_config, token } = getState().login let { global_domain_config, token } = getState().login
const params = { const params = {
access_token: token, access_token: token,
value_set_code: 'OBS_MOBILE_LEND_ORDER', value_set_code: 'OBS_MOBILE_PATIENT_INFO',
} }
GetRequest(global_domain_config, getUrlParams('/system/value_set/search', params)).then(res => { GetRequest(global_domain_config, getUrlParams('/system/value_set/search', params)).then(res => {
const values = R.pathOr([], ['data', 'sys_values'])(res) const values = R.pathOr([], ['data', 'sys_values'])(res)
......
...@@ -242,7 +242,7 @@ class HomePage extends Component { ...@@ -242,7 +242,7 @@ class HomePage extends Component {
const { tabs } = this.state const { tabs } = this.state
const businessModule = R.find(R.propEq('code', 'MOBILE_BUSINESS_MODULE'))(tabs) const businessModule = R.find(R.propEq('code', 'MOBILE_BUSINESS_MODULE'))(tabs)
if (isBlank(businessModule)) return if (isBlank(businessModule)) return
const lendOrder = R.find(R.propEq('function_code', 'MOBILE_LEND_ORDER'))(businessModule.children) const lendOrder = R.find(R.propEq('function_code', 'MOBILE_SELF_HELP_ORDER'))(businessModule.children)
if (isBlank(lendOrder)) return if (isBlank(lendOrder)) return
this.props.getLendOrderCodeValues() this.props.getLendOrderCodeValues()
......
...@@ -235,23 +235,23 @@ class SelfOrderPage extends Component { ...@@ -235,23 +235,23 @@ class SelfOrderPage extends Component {
}, },
{ {
id: '21', id: '21',
title: '性别', // 选择 title: '床位', // 选择
name: '请选择',
value: '', value: '',
}, },
{ {
id: '22', id: '22',
title: '年龄', // 输入 title: '手术部位', // 输入
value: '', value: '',
}, },
{ {
id: '23', id: '23',
title: '床位', title: '住院号',
value: '', value: '',
}, },
{ {
id: '24', id: '24',
title: '病历号', title: '借货模板',
name: '请选择',
value: '', value: '',
}, },
{ {
...@@ -671,12 +671,11 @@ class SelfOrderPage extends Component { ...@@ -671,12 +671,11 @@ class SelfOrderPage extends Component {
let tempTit = '' let tempTit = ''
let curTip = '未选择' let curTip = '未选择'
const { isLendOrder } = navigation.getParam('params') const { isLendOrder } = navigation.getParam('params')
const doctorNameProfile = this.decodeDisplayLendProfile('DOCTOR_DISPLAY')
const patientNameProfile = this.decodeDisplayLendProfile('PATIENT_NAME_DISPLAY') const patientNameProfile = this.decodeDisplayLendProfile('PATIENT_NAME_DISPLAY')
const patientGenderProfile = this.decodeDisplayLendProfile('PATIENT_GENDER_DISPLAY') const surgeryNameProfile = this.decodeDisplayLendProfile('SURGERY_NAME')
const patientAgeProfile = this.decodeDisplayLendProfile('PATIENT_AGE_DISPLAY')
const hospitalizationNumberProfile = this.decodeDisplayLendProfile('HOSPITALICATION_NUMBER_DISPLAY') const hospitalizationNumberProfile = this.decodeDisplayLendProfile('HOSPITALICATION_NUMBER_DISPLAY')
const patientIdProfile = this.decodeDisplayLendProfile('PATIENT_ID_DISPLAY') const patientBedProfile = this.decodeDisplayLendProfile('PATIENT_BED')
const printProfile = this.decodeDisplayLendProfile('COLLECT_PRINT_TEMPLATE')
for (let chIndex in listOptionData) { for (let chIndex in listOptionData) {
if ( if (
...@@ -700,8 +699,10 @@ class SelfOrderPage extends Component { ...@@ -700,8 +699,10 @@ class SelfOrderPage extends Component {
(chIndex == 16 && sysValues.OBS_MOBILE_SUR_FOLLOWER_DISPLAY > 2) || (chIndex == 16 && sysValues.OBS_MOBILE_SUR_FOLLOWER_DISPLAY > 2) ||
(chIndex == 17 && sysValues.OBS_MOBILE_DELIVERYMAN_DISPLAY > 2) || (chIndex == 17 && sysValues.OBS_MOBILE_DELIVERYMAN_DISPLAY > 2) ||
(chIndex == 18 && sysValues.OBS_MOBILE_BOR_WARE_REQUIRED > 2) || (chIndex == 18 && sysValues.OBS_MOBILE_BOR_WARE_REQUIRED > 2) ||
(chIndex == 19 && sysProfiles.SUR_MOBILE_INV_PRODUCT_LINE_CATEGORY_FLAG > 2) && (chIndex == 19 &&
(chIndex == 27 && sysProfiles.OBS_MOBILE_NEWSPAPER_DISPLAY > 2)) && sysProfiles.SUR_MOBILE_INV_PRODUCT_LINE_CATEGORY_FLAG > 2 &&
chIndex == 27 &&
sysProfiles.OBS_MOBILE_NEWSPAPER_DISPLAY > 2)) &&
!listOptionData[chIndex].value !listOptionData[chIndex].value
) { ) {
tempTit = listOptionData[chIndex].title tempTit = listOptionData[chIndex].title
...@@ -709,12 +710,11 @@ class SelfOrderPage extends Component { ...@@ -709,12 +710,11 @@ class SelfOrderPage extends Component {
break break
} }
if ( if (
isLendOrder &&
((chIndex == 20 && patientNameProfile.required) || ((chIndex == 20 && patientNameProfile.required) ||
(chIndex == 21 && patientGenderProfile.required) || (chIndex == 21 && patientBedProfile.required) ||
(chIndex == 22 && patientAgeProfile.required) || (chIndex == 22 && surgeryNameProfile.required) ||
(chIndex == 23 && hospitalizationNumberProfile.required) || (chIndex == 23 && hospitalizationNumberProfile.required) ||
(chIndex == 24 && patientIdProfile.required)) && (chIndex == 24 && printProfile.required)) &&
!listOptionData[chIndex].value !listOptionData[chIndex].value
) { ) {
tempTit = listOptionData[chIndex].title tempTit = listOptionData[chIndex].title
...@@ -772,9 +772,6 @@ class SelfOrderPage extends Component { ...@@ -772,9 +772,6 @@ class SelfOrderPage extends Component {
chItem.inputValue = '' chItem.inputValue = ''
} }
} }
// if (itemTitle === '手术类型') {
// that.clearInitNameAndValue(8)
// }
} }
}) })
this.setState( this.setState(
...@@ -1701,6 +1698,42 @@ class SelfOrderPage extends Component { ...@@ -1701,6 +1698,42 @@ class SelfOrderPage extends Component {
) )
} }
/**
* @description: 供货模板打印
* @param {*} curData
* @return {*}
*/
handlePrintTemplate(curData) {
const { sysValueSets } = this.props
if (this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
const list = R.compose(
R.map(
R.applySpec({
value: R.prop('value_code'),
name: R.prop('value_name'),
}),
),
R.uniqBy(R.prop('value_code')),
R.propOr([], 'SUR_COLLECT_PRINT_TEMPLATE'),
)(sysValueSets)
this.setState(
{
currentTitle: curData.title,
currentItem: {
name: curData.name,
value: curData.value,
},
},
() => {
this.setState({
showTypePop: true,
listCurrentOption: list,
})
},
)
}
}
// 备注 输入 // 备注 输入
handleRemarkInput(text, curData) { handleRemarkInput(text, curData) {
let { listOptionData } = this.state let { listOptionData } = this.state
...@@ -1958,17 +1991,16 @@ class SelfOrderPage extends Component { ...@@ -1958,17 +1991,16 @@ class SelfOrderPage extends Component {
sysValues.OBS_MOBILE_NEWSPAPER_DISPLAY > 0 && (tempSubOption.newspaper_order_id = state.listOptionData[27].value) sysValues.OBS_MOBILE_NEWSPAPER_DISPLAY > 0 && (tempSubOption.newspaper_order_id = state.listOptionData[27].value)
const patientNameProfile = this.decodeDisplayLendProfile('PATIENT_NAME_DISPLAY') const patientNameProfile = this.decodeDisplayLendProfile('PATIENT_NAME_DISPLAY')
const patientGenderProfile = this.decodeDisplayLendProfile('PATIENT_GENDER_DISPLAY') const surgeryNameProfile = this.decodeDisplayLendProfile('SURGERY_NAME')
const patientAgeProfile = this.decodeDisplayLendProfile('PATIENT_AGE_DISPLAY')
const hospitalizationNumberProfile = this.decodeDisplayLendProfile('HOSPITALICATION_NUMBER_DISPLAY') const hospitalizationNumberProfile = this.decodeDisplayLendProfile('HOSPITALICATION_NUMBER_DISPLAY')
const patientIdProfile = this.decodeDisplayLendProfile('PATIENT_ID_DISPLAY') const patientBedProfile = this.decodeDisplayLendProfile('PATIENT_BED')
isLendOrder && patientNameProfile.show && (tempSubOption.patient_name = state.listOptionData[20].value) const printProfile = this.decodeDisplayLendProfile('COLLECT_PRINT_TEMPLATE')
isLendOrder && patientGenderProfile.show && (tempSubOption.patient_gender = state.listOptionData[21].value)
isLendOrder && patientAgeProfile.show && (tempSubOption.patient_age = state.listOptionData[22].value) patientNameProfile.show && (tempSubOption.patient_name = state.listOptionData[20].value)
isLendOrder && patientBedProfile.show && (tempSubOption.patient_bed = state.listOptionData[21].value)
hospitalizationNumberProfile.show && surgeryNameProfile.show && (tempSubOption.surgery_name = state.listOptionData[22].value)
(tempSubOption.hospitalization_number = state.listOptionData[23].value) hospitalizationNumberProfile.show && (tempSubOption.hospitalization_number = state.listOptionData[23].value)
isLendOrder && patientIdProfile.show && (tempSubOption.patient_id = state.listOptionData[24].value) printProfile.show && (tempSubOption.collect_print_template = state.listOptionData[24].value)
sysValues.OBS_MOBILE_SUPPLYMENT_DISPLAY > 0 && (tempSubOption.supplement_flag = state.listOptionData[25].value) sysValues.OBS_MOBILE_SUPPLYMENT_DISPLAY > 0 && (tempSubOption.supplement_flag = state.listOptionData[25].value)
sysValues.OBS_MOBILE_LONG_COLLECT_DISPLAY > 0 && (tempSubOption.is_long_collected = state.listOptionData[26].value) sysValues.OBS_MOBILE_LONG_COLLECT_DISPLAY > 0 && (tempSubOption.is_long_collected = state.listOptionData[26].value)
...@@ -1977,7 +2009,7 @@ class SelfOrderPage extends Component { ...@@ -1977,7 +2009,7 @@ class SelfOrderPage extends Component {
access_token: props.token, access_token: props.token,
data: { ...tempSubOption }, data: { ...tempSubOption },
} }
console.log('params=', params) console.warn('params=', params)
props.requestSelfSumbit(params) props.requestSelfSumbit(params)
} }
...@@ -2314,12 +2346,11 @@ class SelfOrderPage extends Component { ...@@ -2314,12 +2346,11 @@ class SelfOrderPage extends Component {
const isShowOrg = R.compose(R.equals('Y'), R.prop('OBS_SHOW_ORG_FLAG'))(sysProfiles) const isShowOrg = R.compose(R.equals('Y'), R.prop('OBS_SHOW_ORG_FLAG'))(sysProfiles)
const { isLendOrder } = navigation.getParam('params') const { isLendOrder } = navigation.getParam('params')
const doctorNameProfile = this.decodeDisplayLendProfile('DOCTOR_DISPLAY')
const patientNameProfile = this.decodeDisplayLendProfile('PATIENT_NAME_DISPLAY') const patientNameProfile = this.decodeDisplayLendProfile('PATIENT_NAME_DISPLAY')
const patientGenderProfile = this.decodeDisplayLendProfile('PATIENT_GENDER_DISPLAY') const surgeryNameProfile = this.decodeDisplayLendProfile('SURGERY_NAME')
const patientAgeProfile = this.decodeDisplayLendProfile('PATIENT_AGE_DISPLAY')
const hospitalizationNumberProfile = this.decodeDisplayLendProfile('HOSPITALICATION_NUMBER_DISPLAY') const hospitalizationNumberProfile = this.decodeDisplayLendProfile('HOSPITALICATION_NUMBER_DISPLAY')
const patientIdProfile = this.decodeDisplayLendProfile('PATIENT_ID_DISPLAY') const patientBedProfile = this.decodeDisplayLendProfile('PATIENT_BED')
const printProfile = this.decodeDisplayLendProfile('COLLECT_PRINT_TEMPLATE')
return ( return (
<View style={styles.list_cont}> <View style={styles.list_cont}>
...@@ -2445,68 +2476,34 @@ class SelfOrderPage extends Component { ...@@ -2445,68 +2476,34 @@ class SelfOrderPage extends Component {
listCallBack={() => this.handleShipCheck(listOptionData[4])} listCallBack={() => this.handleShipCheck(listOptionData[4])}
listHasArrow={true} listHasArrow={true}
/> />
{isLendOrder ? (
doctorNameProfile.show && (
<PageListArrow
listActOpa={0.8}
listHasAster={doctorNameProfile.required}
listItem={listOptionData[5]}
listName={'name'}
listTitle={'title'}
listCallBack={() => this.handleDoctorCheck(listOptionData[5])}
listHasArrow={true}
listOtherInput={'请输入主治医生'}
otherInput={'showInput'}
otherInputCallBack={text => this.handleDoctorInput(text, listOptionData[5])}
/>
)
) : (
<PageListArrow
listActOpa={0.8}
// listHasAster={true}
listItem={listOptionData[5]}
listName={'name'}
listTitle={'title'}
listCallBack={() => this.handleDoctorCheck(listOptionData[5])}
listHasArrow={true}
listOtherInput={'请输入主治医生'}
otherInput={'showInput'}
otherInputCallBack={text => this.handleDoctorInput(text, listOptionData[5])}
/>
)}
{/* <PageListArrow
listActOpa={.8}
listHasAster={true}
listItem={listOptionData[6]}
listInputPlace={'请输入'}
listDefaValue={'value'}
listTitle={'title'}
inputCallBack={(text) => this.handleSurNameInput(text, listOptionData[6])}
isTitInputStyle={true}
/> */}
<PageListArrow <PageListArrow
listActOpa={0.8} listActOpa={0.8}
listHasAster={true} // listHasAster={true}
listItem={listOptionData[6]} listItem={listOptionData[5]}
listName={'name'} listName={'name'}
listTitle={'title'} listTitle={'title'}
listCallBack={() => this.handleSurDateCheck(listOptionData[6])} listCallBack={() => this.handleDoctorCheck(listOptionData[5])}
listHasArrow={true} listHasArrow={true}
listOtherInput={'请输入主治医生'}
otherInput={'showInput'}
otherInputCallBack={text => this.handleDoctorInput(text, listOptionData[5])}
/> />
{sysProfiles.SUR_MOBILE_INV_PRODUCT_LINE_CATEGORY_FLAG > 1 && ( {patientBedProfile.show && (
<PageListArrow <PageListArrow
listActOpa={0.8} listActOpa={0.8}
listItem={listOptionData[19]} listHasAster={patientBedProfile.required}
listHasAster={sysProfiles.SUR_MOBILE_INV_PRODUCT_LINE_CATEGORY_FLAG > 2} listItem={listOptionData[21]}
listName={'name'} listName={'name'}
listTitle={'title'} listTitle={'title'}
listCallBack={() => this.handleSurTypeCheck(listOptionData[19])} listInputPlace={`请输入${listOptionData[21].title}`}
listHasArrow={true} inputCallBack={text => this.patientInfoInputHandler(text, listOptionData[21])}
isTitInputStyle={true}
listCellStyle={styles.list_cell_box}
/> />
)} )}
{isLendOrder && patientNameProfile.show && ( {patientNameProfile.show && (
<PageListArrow <PageListArrow
listHasAster={true} listActOpa={0.8}
listItem={listOptionData[20]} listItem={listOptionData[20]}
listDefaValue={'value'} listDefaValue={'value'}
listHasAster={patientNameProfile.required} listHasAster={patientNameProfile.required}
...@@ -2517,33 +2514,8 @@ class SelfOrderPage extends Component { ...@@ -2517,33 +2514,8 @@ class SelfOrderPage extends Component {
listCellStyle={styles.list_cell_box} listCellStyle={styles.list_cell_box}
/> />
)} )}
{isLendOrder && patientGenderProfile.show && ( {hospitalizationNumberProfile.show && (
<PageListArrow <PageListArrow
listActOpa={0.8}
listHasAster={patientGenderProfile.required}
listItem={listOptionData[21]}
listName={'name'}
listTitle={'title'}
listCallBack={() => this.handleGenderCheck(listOptionData[21])}
listHasArrow={true}
/>
)}
{isLendOrder && patientAgeProfile.show && (
<PageListArrow
listHasAster={true}
listItem={listOptionData[22]}
listDefaValue={'value'}
listHasAster={patientAgeProfile.required}
listTitle={'title'}
listInputPlace={`请输入${listOptionData[22].title}`}
inputCallBack={text => this.patientInfoInputHandler(text, listOptionData[22])}
isTitInputStyle={true}
listCellStyle={styles.list_cell_box}
/>
)}
{isLendOrder && hospitalizationNumberProfile.show && (
<PageListArrow
listHasAster={true}
listItem={listOptionData[23]} listItem={listOptionData[23]}
listDefaValue={'value'} listDefaValue={'value'}
listHasAster={hospitalizationNumberProfile.required} listHasAster={hospitalizationNumberProfile.required}
...@@ -2554,15 +2526,15 @@ class SelfOrderPage extends Component { ...@@ -2554,15 +2526,15 @@ class SelfOrderPage extends Component {
listCellStyle={styles.list_cell_box} listCellStyle={styles.list_cell_box}
/> />
)} )}
{isLendOrder && patientIdProfile.show && ( {surgeryNameProfile.show && (
<PageListArrow <PageListArrow
listHasAster={true} listHasAster={true}
listItem={listOptionData[24]} listItem={listOptionData[22]}
listDefaValue={'value'} listDefaValue={'value'}
listHasAster={patientIdProfile.required} listHasAster={surgeryNameProfile.required}
listTitle={'title'} listTitle={'title'}
listInputPlace={`请输入${listOptionData[24].title}`} listInputPlace={`请输入${listOptionData[22].title}`}
inputCallBack={text => this.patientInfoInputHandler(text, listOptionData[24])} inputCallBack={text => this.patientInfoInputHandler(text, listOptionData[22])}
isTitInputStyle={true} isTitInputStyle={true}
listCellStyle={styles.list_cell_box} listCellStyle={styles.list_cell_box}
/> />
...@@ -2570,6 +2542,27 @@ class SelfOrderPage extends Component { ...@@ -2570,6 +2542,27 @@ class SelfOrderPage extends Component {
<PageListArrow <PageListArrow
listActOpa={0.8} listActOpa={0.8}
listHasAster={true} listHasAster={true}
listItem={listOptionData[6]}
listName={'name'}
listTitle={'title'}
listCallBack={() => this.handleSurDateCheck(listOptionData[6])}
listHasArrow={true}
/>
{sysProfiles.SUR_MOBILE_INV_PRODUCT_LINE_CATEGORY_FLAG > 1 && (
<PageListArrow
listActOpa={0.8}
listItem={listOptionData[19]}
listHasAster={sysProfiles.SUR_MOBILE_INV_PRODUCT_LINE_CATEGORY_FLAG > 2}
listName={'name'}
listTitle={'title'}
listCallBack={() => this.handleSurTypeCheck(listOptionData[19])}
listHasArrow={true}
/>
)}
<PageListArrow
listActOpa={0.8}
listHasAster={true}
listItem={listOptionData[7]} listItem={listOptionData[7]}
listName={'name'} listName={'name'}
listTitle={'title'} listTitle={'title'}
...@@ -2586,6 +2579,18 @@ class SelfOrderPage extends Component { ...@@ -2586,6 +2579,18 @@ class SelfOrderPage extends Component {
listHasArrow={true} listHasArrow={true}
listMaxLines={1} listMaxLines={1}
/> />
{printProfile.show && (
<PageListArrow
listItem={listOptionData[24]}
listHasAster={printProfile.required}
listTitle={'title'}
listName={'name'}
listCallBack={() => this.handlePrintTemplate(listOptionData[24])}
isTitInputStyle={true}
listHasArrow={true}
listCellStyle={styles.list_cell_box}
/>
)}
<PageListArrow <PageListArrow
listActOpa={0.8} listActOpa={0.8}
listHasAster={true} listHasAster={true}
...@@ -2966,6 +2971,7 @@ const mapStateToProps = state => { ...@@ -2966,6 +2971,7 @@ const mapStateToProps = state => {
local_sele_pro_options: state.selfOrder.local_sele_pro_options, local_sele_pro_options: state.selfOrder.local_sele_pro_options,
sysProfiles: state.login.sysProfiles, sysProfiles: state.login.sysProfiles,
lend_order_value_profiles: state.selfOrder.lend_order_value_profiles, lend_order_value_profiles: state.selfOrder.lend_order_value_profiles,
sysValueSets: state.login.sysValueSets,
} }
} }
......
...@@ -140,7 +140,7 @@ class ChooseProductPage extends Component { ...@@ -140,7 +140,7 @@ class ChooseProductPage extends Component {
item = R.mergeDeepLeft(topItem, item) item = R.mergeDeepLeft(topItem, item)
} }
return item return item
})(originManufacterList) })(originManufacterList || [])
setSelectProductOpts(res) setSelectProductOpts(res)
this.props.navigation.state.params.productCallBack(res) this.props.navigation.state.params.productCallBack(res)
......
...@@ -42,6 +42,7 @@ const defaultState = { ...@@ -42,6 +42,7 @@ const defaultState = {
SUR_FEE_TYPE: [], SUR_FEE_TYPE: [],
SUR_ORDER_TYPE: [], SUR_ORDER_TYPE: [],
ORTHOPEDICS_PRODUCT_CLASS: [], ORTHOPEDICS_PRODUCT_CLASS: [],
SUR_COLLECT_PRINT_TEMPLATE: []
}, },
organizations: [], organizations: [],
} }
...@@ -68,6 +69,7 @@ export const originSysValueSets = { ...@@ -68,6 +69,7 @@ export const originSysValueSets = {
SUR_FEE_TYPE: [], SUR_FEE_TYPE: [],
SUR_ORDER_TYPE: [], SUR_ORDER_TYPE: [],
ORTHOPEDICS_PRODUCT_CLASS: [], ORTHOPEDICS_PRODUCT_CLASS: [],
SUR_COLLECT_PRINT_TEMPLATE: []
} }
export default login = (state = defaultState, action) => { export default login = (state = defaultState, action) => {
......
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