Commit 5f6a58ca by peii

湖北国控添加各种字段

parent ccbcce47
...@@ -79,7 +79,7 @@ class HistoricalOrderPage extends Component { ...@@ -79,7 +79,7 @@ class HistoricalOrderPage extends Component {
"ENTERED,SUBMITTED", "ENTERED,SUBMITTED",
"APPROVED,COLLECTING_WAITING_CONFIRM", "APPROVED,COLLECTING_WAITING_CONFIRM",
"COLLECTED,RETURNING_WAITING_CONFIRM", "COLLECTED,RETURNING_WAITING_CONFIRM",
"RETURNED,CLOSED,REJECTED,CANCELED,CONSUMED" "RETURNED,CLOSED,REJECTED,CANCELED,CONSUMED,APPROVING,RETURNED_WAITING_CONFIRMED,COLLECTED_WAITING_CONFIRMED,REVOKED,CONFIRM_COLLECT"
], ],
searchComsumeStatus: [ // 【消耗】对应的状态值 searchComsumeStatus: [ // 【消耗】对应的状态值
"N", "N",
......
...@@ -307,7 +307,7 @@ class FilterModel extends Component { ...@@ -307,7 +307,7 @@ class FilterModel extends Component {
"ENTERED,SUBMITTED", "ENTERED,SUBMITTED",
"APPROVED,COLLECTING_WAITING_CONFIRM", "APPROVED,COLLECTING_WAITING_CONFIRM",
"COLLECTED,RETURNING_WAITING_CONFIRM", "COLLECTED,RETURNING_WAITING_CONFIRM",
"RETURNED,CLOSED,REJECTED,CANCELED,CONSUMED" "RETURNED,CLOSED,REJECTED,CANCELED,CONSUMED,APPROVING,RETURNED_WAITING_CONFIRMED,COLLECTED_WAITING_CONFIRMED,REVOKED,CONFIRM_COLLECT"
], ],
searchComsumeStatus: [ // 【消耗】对应的状态值 searchComsumeStatus: [ // 【消耗】对应的状态值
"N", "N",
......
...@@ -67,7 +67,7 @@ class LineOrderPage extends Component { ...@@ -67,7 +67,7 @@ class LineOrderPage extends Component {
collectPhotos: [], collectPhotos: [],
previewVisible: false, previewVisible: false,
imageIndex: 0, imageIndex: null,
// 渲染内容,下标就是历史列表里的序号subIndex // 渲染内容,下标就是历史列表里的序号subIndex
columns: [ columns: [
...@@ -208,6 +208,17 @@ class LineOrderPage extends Component { ...@@ -208,6 +208,17 @@ class LineOrderPage extends Component {
} }
componentDidMount() { componentDidMount() {
let {supIndex, data} = this.props.navigation.state.params
let { collectPhotos } = this.state
if (supIndex == 0 && isNotBlank(data.image_url)) {
const images = R.compose(R.map(url => ({
uri: this.props.global_domain_config + '/' + url
})),
R.split(',')
)(data.image_url)
collectPhotos = images
this.setState({ collectPhotos });
}
this.getLineOptionData() this.getLineOptionData()
} }
...@@ -247,7 +258,6 @@ class LineOrderPage extends Component { ...@@ -247,7 +258,6 @@ class LineOrderPage extends Component {
case 1: case 1:
// 消耗 // 消耗
this.getReqConsumeLineData(data) this.getReqConsumeLineData(data)
this.getCollectPhoto(data)
break; break;
case 2: case 2:
// 转单 // 转单
...@@ -385,9 +395,6 @@ class LineOrderPage extends Component { ...@@ -385,9 +395,6 @@ class LineOrderPage extends Component {
} }
async getCollectPhoto(supData) { async getCollectPhoto(supData) {
if (!R.includes(supData.header_status, ['COLLECTED', 'RETURNED', 'CONSUMED', 'RETURNED_WAITING_CONFIRMED', 'CLOSED', 'CONFIRM_COLLECT', 'CONFIRM_RETURN', 'COLLECTING_WAITING_CONFIRM'])) {
return
}
let params = { let params = {
access_token: this.props.token, access_token: this.props.token,
surgery_collect_number: supData.local_his_number, surgery_collect_number: supData.local_his_number,
...@@ -395,10 +402,11 @@ class LineOrderPage extends Component { ...@@ -395,10 +402,11 @@ class LineOrderPage extends Component {
const res = await requestCollectImage(this.props.global_domain_config, params) const res = await requestCollectImage(this.props.global_domain_config, params)
if (res.code !== 0) return if (res.code !== 0) return
const photos = R.compose(R.addIndex(R.map)((url, idx) => { const photos = R.compose(R.map(url => {
return {uri: this.props.global_domain_config + '/' + url, idx} return {uri: this.props.global_domain_config + '/' + url}
}), R.pathOr([], ['data', 'photo_url']))(res) }), R.pathOr([], ['data', 'photo_url']))(res)
this.setState({collectPhotos: photos}); const { collectPhotos } = this.state
this.setState({collectPhotos: R.concat(collectPhotos, photos)});
} }
// 耗材明细 隐藏/显示子项 // 耗材明细 隐藏/显示子项
...@@ -426,7 +434,7 @@ class LineOrderPage extends Component { ...@@ -426,7 +434,7 @@ class LineOrderPage extends Component {
} }
previewImage(imgItem) { previewImage(imgItem) {
this.setState({previewVisible: true, imageIndex: imgItem.idx}); this.setState({previewVisible: true, imageIndex: imgItem});
} }
// 返回耗材内容 // 返回耗材内容
...@@ -566,33 +574,29 @@ class LineOrderPage extends Component { ...@@ -566,33 +574,29 @@ class LineOrderPage extends Component {
</View> </View>
</View> </View>
{ { isNotBlank(collectPhotos) && (
R.includes(headerData.header_status, ['COLLECTED', 'RETURNED', 'CONSUMED', 'RETURNED_WAITING_CONFIRMED', 'CLOSED', 'CONFIRM_COLLECT', 'CONFIRM_RETURN', 'COLLECTING_WAITING_CONFIRM']) && <View style={[styles.line_cont_title_column]}>
isNotBlank(collectPhotos) && <Text style={styles.cont_tip_tit}>出库照片</Text>
( <View style={styles.image_box}>
<View style={[styles.line_cont_title_column]}> {
<Text style={styles.cont_tip_tit}>出库照片</Text> collectPhotos && collectPhotos.map(item => {
<View style={styles.image_box}> return (
{ <TouchableOpacity onPress={() => this.previewImage(item)}>
collectPhotos && collectPhotos.map(item => { <Image source={item} width={60} height={60} style={styles.image} resizeMode="cover" />
return ( </TouchableOpacity>
<TouchableOpacity onPress={() => this.previewImage(item)}> )
<Image source={item} width={60} height={60} style={styles.image} resizeMode="cover" /> })
</TouchableOpacity> }
)
})
}
</View>
<ImageView
images={collectPhotos}
source={collectPhotos[imageIndex]}
visible={previewVisible}
close={() => this.setState({previewVisible: false})}
/>
</View> </View>
)
} <ImageView
images={collectPhotos}
source={imageIndex}
visible={previewVisible}
close={() => this.setState({previewVisible: false})}
/>
</View>
)}
</View> </View>
</ScrollView> </ScrollView>
) )
......
...@@ -165,8 +165,8 @@ class SelfOrderPage extends Component { ...@@ -165,8 +165,8 @@ class SelfOrderPage extends Component {
{ {
id: '9', id: '9',
title: '需要携带合格证', title: '需要携带合格证',
value: '', value: 'N',
isRedio: '', // 单选 isRedio: 'N', // 单选
}, },
{ {
id: '10', id: '10',
...@@ -723,7 +723,7 @@ class SelfOrderPage extends Component { ...@@ -723,7 +723,7 @@ class SelfOrderPage extends Component {
(chIndex == 21 && patientBedProfile.required) || (chIndex == 21 && patientBedProfile.required) ||
(chIndex == 22 && surgeryNameProfile.required) || (chIndex == 22 && surgeryNameProfile.required) ||
(chIndex == 23 && hospitalizationNumberProfile.required) || (chIndex == 23 && hospitalizationNumberProfile.required) ||
(chIndex == 24 && printProfile.required) && (chIndex == 24 && printProfile.required) ||
(chIndex == 28 && payBankProfile.required)) && (chIndex == 28 && payBankProfile.required)) &&
!listOptionData[chIndex].value !listOptionData[chIndex].value
) { ) {
...@@ -1791,7 +1791,6 @@ class SelfOrderPage extends Component { ...@@ -1791,7 +1791,6 @@ class SelfOrderPage extends Component {
const res = await getPayBankAccounts(this.props.global_domain_config, params) const res = await getPayBankAccounts(this.props.global_domain_config, params)
let accounts = [] let accounts = []
if (res.code === 0) { if (res.code === 0) {
console.warn(res)
accounts = R.map( accounts = R.map(
R.applySpec({ R.applySpec({
name: R.prop('account_number'), name: R.prop('account_number'),
...@@ -1799,6 +1798,8 @@ class SelfOrderPage extends Component { ...@@ -1799,6 +1798,8 @@ class SelfOrderPage extends Component {
}), }),
)(res.data) )(res.data)
} }
listOptionData[28].value = R.pathOr('', [0, 'value'])(accounts)
listOptionData[28].name = R.pathOr('', [0, 'name'])(accounts)
payBankAccounts[listOptionData[2].value] = accounts payBankAccounts[listOptionData[2].value] = accounts
this.setState({ payBankAccounts }) this.setState({ payBankAccounts })
} }
...@@ -2044,7 +2045,6 @@ class SelfOrderPage extends Component { ...@@ -2044,7 +2045,6 @@ class SelfOrderPage extends Component {
tempSubOption.lines = state.listOptionData[8].sub_lines tempSubOption.lines = state.listOptionData[8].sub_lines
tempSubOption.take_cert_flag = state.listOptionData[9].value tempSubOption.take_cert_flag = state.listOptionData[9].value
tempSubOption.replace_item_flag = state.listOptionData[10].value tempSubOption.replace_item_flag = state.listOptionData[10].value
tempSubOption.surgery_desc = state.listOptionData[11].value
tempSubOption.remark = state.listOptionData[11].value tempSubOption.remark = state.listOptionData[11].value
tempSubOption.voice_url = state.listOptionData[12].value tempSubOption.voice_url = state.listOptionData[12].value
......
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