Commit 5f6a58ca by peii

湖北国控添加各种字段

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