Commit acf2bce2 by Denglingling

转单、消耗模块,增加扫一扫入口,转单明细查询还未对接后端接口

parent dd130d86
...@@ -143,7 +143,7 @@ export const requestSubTransOrganizations = async (global_domain_config, params) ...@@ -143,7 +143,7 @@ export const requestSubTransOrganizations = async (global_domain_config, params)
return await GetRequest(global_domain_config, getUrlParams('/authorized_inventory/search', params)) return await GetRequest(global_domain_config, getUrlParams('/authorized_inventory/search', params))
} }
// 子页-获取来源借货订单号 parmas={access_token: '', org_code: '', seller_code: '', customer_code: '', collect_header_status: 'RETURNED,COLLECTED' / 'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED'} // 子页-获取来源借货订单号 parmas={access_token: '', org_code: '', seller_code: '', customer_code: '', collect_header_status: 'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED'}
export const requestSubSourBorOrdNum = async (global_domain_config, params) => { export const requestSubSourBorOrdNum = async (global_domain_config, params) => {
return await GetRequest(global_domain_config, getUrlParams('/surgery/collect_order/search', params)) return await GetRequest(global_domain_config, getUrlParams('/surgery/collect_order/search', params))
} }
......
...@@ -112,6 +112,16 @@ class ConsumDetailsPage extends Component { ...@@ -112,6 +112,16 @@ class ConsumDetailsPage extends Component {
this.getCurOrderDetail() this.getCurOrderDetail()
} }
componentWillReceiveProps(nextProps) {
let { barCodeData } = nextProps.navigation.state.params
let that = this
if(barCodeData && barCodeData.typeValue && barCodeData.typeName == 'consum_search_value') {
that.setState({
searchValue
})
}
}
// 获取当前订单的消耗明细 // 获取当前订单的消耗明细
async getCurOrderDetail() { async getCurOrderDetail() {
let {orderId} = this.props.navigation.state.params let {orderId} = this.props.navigation.state.params
...@@ -184,6 +194,17 @@ class ConsumDetailsPage extends Component { ...@@ -184,6 +194,17 @@ class ConsumDetailsPage extends Component {
}) })
} }
// 搜索 扫一扫
handleConsumScanCheck() {
this.props.navigation.navigate('BarCodePage', {
typeName: 'consum_search_value',
supPage: {
title: '器械消耗 - 添加明细',
pageName: 'ConsumDetailsPage'
}
})
}
// 修改加载中 // 修改加载中
changeLodingFlag(show) { changeLodingFlag(show) {
this.setState({ this.setState({
...@@ -291,6 +312,13 @@ class ConsumDetailsPage extends Component { ...@@ -291,6 +312,13 @@ class ConsumDetailsPage extends Component {
<View style={list_common_item.ser_img_box}> <View style={list_common_item.ser_img_box}>
<Image source={require('../../../images/search_icon.png')} style={icon_style}/> <Image source={require('../../../images/search_icon.png')} style={icon_style}/>
</View> </View>
<TouchableOpacity
activeOpacity={.8}
style={styles.ser_scanit_box}
onPress={() => this.handleConsumScanCheck()}
>
<Image source={require('../../../images/scan_2.png')} style={icon_style} />
</TouchableOpacity>
</View> </View>
) )
} }
...@@ -466,6 +494,13 @@ const styles = StyleSheet.create({ ...@@ -466,6 +494,13 @@ const styles = StyleSheet.create({
}, },
loding_back: { loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)' backgroundColor: 'rgba(0, 0, 0, 0)'
},
ser_scanit_box: {
position: 'absolute',
right: 24,
top: 20,
width: pxSize(22),
height: pxSize(22),
} }
}) })
......
...@@ -766,30 +766,27 @@ class TransOrderPage extends Component { ...@@ -766,30 +766,27 @@ class TransOrderPage extends Component {
handleConsumDetailCheck() { handleConsumDetailCheck() {
console.warn('耗材明细------check') console.warn('耗材明细------check')
let { listOptionData } = this.state let { listOptionData } = this.state
// if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()
// && this.judgeOrderInfoIsNull()) {
// this.props.navigation.navigate('TransSearchPage', {
// title: '耗材明细 - 转单查询',
// org_code: listOptionData[1].value
// })
// }
let subTransObj = { let subTransObj = {
seller_name: listOptionData[0].name, seller_name: listOptionData[0].name,
org_code: listOptionData[1].value, org_code: listOptionData[1].value,
customer_code: listOptionData[2].value, customer_code: listOptionData[2].value,
collect_number: listOptionData[3].value collect_number: listOptionData[3].value
} }
if(!listOptionData[6].subOption.length) { if(!listOptionData[6].subOption.length) {
this.props.setTransDetailOption([], {}) this.props.setTransDetailOption([], {})
} }
// 测试 // 测试
this.props.navigation.navigate('TransSearchPage', { this.props.navigation.navigate('TransSearchPage', {
title: '耗材明细 - 转单查询', title: '耗材明细 - 转单查询',
subTransObj subTransObj
}) })
// if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()
// && this.judgeOrderInfoIsNull()) {
// this.props.navigation.navigate('TransSearchPage', {
// title: '耗材明细 - 转单查询',
// subTransObj
// })
// }
} }
// 添加图片 点击 // 添加图片 点击
......
...@@ -6,7 +6,9 @@ import { ...@@ -6,7 +6,9 @@ import {
TouchableOpacity, TouchableOpacity,
Text, Text,
Image, Image,
FlatList FlatList,
ScrollView,
Animated
} from 'react-native'; } from 'react-native';
import { import {
home_background_color, home_background_color,
...@@ -34,11 +36,10 @@ import { ...@@ -34,11 +36,10 @@ import {
ContTextStyle, ContTextStyle,
ImageTextStyle ImageTextStyle
} from '../../common/CellTextStyle'; } from '../../common/CellTextStyle';
import { ScrollView } from 'react-native-gesture-handler';
import HeadBackItem from '../../common/HeadBackItem'; import HeadBackItem from '../../common/HeadBackItem';
import LodingModel from '../../common/LodingModel'; import LodingModel from '../../common/LodingModel';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { show} from '../../../utils/Utils'; import { show } from '../../../utils/Utils';
import { import {
requestTransDetails, requestTransDetails,
requestSubTransOrganizations, requestSubTransOrganizations,
...@@ -50,6 +51,7 @@ import { exitLoginStatus } from '../../../action/LoginAction'; ...@@ -50,6 +51,7 @@ import { exitLoginStatus } from '../../../action/LoginAction';
import DialogModel from '../../common/DialogModel'; import DialogModel from '../../common/DialogModel';
import DateModel from '../../common/DateModel'; import DateModel from '../../common/DateModel';
import moment from 'moment'; import moment from 'moment';
// import { RNCamera } from 'react-native-camera';
class TransSearchPage extends Component { class TransSearchPage extends Component {
constructor(props) { constructor(props) {
...@@ -67,7 +69,7 @@ class TransSearchPage extends Component { ...@@ -67,7 +69,7 @@ class TransSearchPage extends Component {
{ {
"id": "0", "id": "0",
title: '来源借货订单号', title: '来源借货订单号',
name: '', name: '请选择',
value: '' value: ''
}, },
{ {
...@@ -177,6 +179,23 @@ class TransSearchPage extends Component { ...@@ -177,6 +179,23 @@ class TransSearchPage extends Component {
this.getCurExitData() this.getCurExitData()
} }
componentWillReceiveProps(nextProps) {
let { barCodeData } = nextProps.navigation.state.params
let { listOptionData } = this.state
let that = this
if(barCodeData && barCodeData.typeValue && barCodeData.typeName == 'serial_number') {
listOptionData[1].value = barCodeData.typeValue
that.setState({
listOptionData
})
}
if(barCodeData && barCodeData.typeValue && barCodeData.typeName == 'surgery_collect_number') {
listOptionData[0].value = barCodeData.typeValue
that.setState({
listOptionData
})
}
}
// 获取已存在的数据 // 获取已存在的数据
getCurExitData() { getCurExitData() {
...@@ -305,19 +324,30 @@ class TransSearchPage extends Component { ...@@ -305,19 +324,30 @@ class TransSearchPage extends Component {
}) })
}, 500) }, 500)
}) })
} else if(detailResult.error_code === 41006) { } else if(sourResult.error_code === 41006) {
that.changeLodingFlag(false) that.changeLodingFlag(false)
show('登录过期,请重新登录') show('登录过期,请重新登录')
that.props.exitLoginStatus() that.props.exitLoginStatus()
} else { } else {
that.changeLodingFlag(false) that.changeLodingFlag(false)
let error_msg = detailResult.error_msg || detailResult.message let error_msg = sourResult.error_msg || sourResult.message
show(error_msg) show(error_msg)
} }
}) })
} }
// 来源借货订单号 扫一扫
handleSourScanCheck() {
this.props.navigation.navigate('BarCodePage', {
typeName: 'surgery_collect_number',
supPage: {
title: '耗材明细 - 转单查询',
pageName: 'TransSearchPage'
}
})
}
// 序列号 输入 // 序列号 输入
handleSerialNumInput(text) { handleSerialNumInput(text) {
console.log('序列号------input:', text) console.log('序列号------input:', text)
...@@ -337,6 +367,17 @@ class TransSearchPage extends Component { ...@@ -337,6 +367,17 @@ class TransSearchPage extends Component {
}) })
} }
// 序列号 扫一扫
handleSerialScanCheck() {
this.props.navigation.navigate('BarCodePage', {
typeName: 'serial_number',
supPage: {
title: '耗材明细 - 转单查询',
pageName: 'TransSearchPage'
}
})
}
// 手术时间 // 手术时间
handleSurDateCheck(typeName) { handleSurDateCheck(typeName) {
console.log('筛选 - 手术时间---', typeName) console.log('筛选 - 手术时间---', typeName)
...@@ -560,7 +601,7 @@ class TransSearchPage extends Component { ...@@ -560,7 +601,7 @@ class TransSearchPage extends Component {
} }
this.props.setTransDetailOption(localSelectOption, searchForm) this.props.setTransDetailOption(localSelectOption, searchForm)
this.props.navigation.navigate('TransOrderPage', '转单申请') this.props.navigation.navigate('TransOrderPage', { title: '转单申请' })
} }
// 全选 / 取消全选 默认取消全选 // 全选 / 取消全选 默认取消全选
...@@ -580,8 +621,6 @@ class TransSearchPage extends Component { ...@@ -580,8 +621,6 @@ class TransSearchPage extends Component {
}); });
} }
// 返回顶部查询 // 返回顶部查询
renderTopProItem() { renderTopProItem() {
let { serchForm, listOptionData } = this.state let { serchForm, listOptionData } = this.state
...@@ -594,11 +633,20 @@ class TransSearchPage extends Component { ...@@ -594,11 +633,20 @@ class TransSearchPage extends Component {
onPress={() => this.handleSourNumCheck()} onPress={() => this.handleSourNumCheck()}
> >
<CellTextStyle style={styles.cell_box}> <CellTextStyle style={styles.cell_box}>
<TitleTextStyle>{'来源借货订单号'}</TitleTextStyle> <TitleTextStyle style={styles.cell_tit_size}>{'来源借货订单号'}</TitleTextStyle>
<ContTextStyle style={styles.sour_txt}> <ContTextStyle style={styles.sour_txt}>
{listOptionData[0].name} {listOptionData[0].name}
</ContTextStyle> </ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
{/* <TouchableOpacity
activeOpacity={.8}
style={styles.sea_scan_box}
onPress={() => this.handleSourScanCheck()}
>
<Image source={require('../../../images/scan_2.png')} style={icon_style} />
</TouchableOpacity> */}
</CellTextStyle> </CellTextStyle>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
...@@ -607,15 +655,21 @@ class TransSearchPage extends Component { ...@@ -607,15 +655,21 @@ class TransSearchPage extends Component {
activeOpacity={1} activeOpacity={1}
> >
<CellTextStyle style={styles.cell_box}> <CellTextStyle style={styles.cell_box}>
<TitleTextStyle style={styles.cell_title}>{'序列号'}</TitleTextStyle> <TitleTextStyle style={[styles.cell_title, styles.cell_tit_size]}>{'序列号'}</TitleTextStyle>
<ContInputTextStyle <ContInputTextStyle
style={styles.cell_input} style={[styles.cell_input, styles.cell_input_scan]}
placeholder={'支持模糊查询'} placeholder={'支持模糊查询'}
keyboardType={'numeric'} keyboardType={'numeric'}
defaultValue={listOptionData[1].value} defaultValue={listOptionData[1].value}
onChangeText={(text) => this.handleSerialNumInput(text)} onChangeText={(text) => this.handleSerialNumInput(text)}
/> />
<TouchableOpacity
activeOpacity={.8}
style={styles.sea_scan_box}
onPress={() => this.handleSerialScanCheck()}
>
<Image source={require('../../../images/scan_2.png')} style={icon_style} />
</TouchableOpacity>
</CellTextStyle> </CellTextStyle>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
...@@ -624,7 +678,7 @@ class TransSearchPage extends Component { ...@@ -624,7 +678,7 @@ class TransSearchPage extends Component {
activeOpacity={1} activeOpacity={1}
> >
<CellTextStyle style={styles.cell_box}> <CellTextStyle style={styles.cell_box}>
<TitleTextStyle>{'手术时间'}</TitleTextStyle> <TitleTextStyle style={styles.cell_tit_size}>{'手术时间'}</TitleTextStyle>
<View style={styles.qui_cell_rig_date}> <View style={styles.qui_cell_rig_date}>
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
...@@ -661,77 +715,6 @@ class TransSearchPage extends Component { ...@@ -661,77 +715,6 @@ class TransSearchPage extends Component {
</TouchableOpacity> </TouchableOpacity>
</View> </View>
{/* <View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
>
<CellTextStyle style={styles.cell_box}>
<TitleTextStyle>{'销售员'}</TitleTextStyle>
<ContTextStyle>
{listOptionData[0].name}
</ContTextStyle>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
>
<CellTextStyle style={styles.cell_box}>
<TitleTextStyle>{'组织'}</TitleTextStyle>
<ContTextStyle>
{listOptionData[1].name}
</ContTextStyle>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleStatusCheck()}
>
<CellTextStyle style={styles.cell_box}>
<TitleTextStyle style={styles.cell_title}>{'状态'}</TitleTextStyle>
<ContTextStyle>
{listOptionData[2].name}
</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
>
<CellTextStyle style={styles.cell_box}>
<TitleTextStyle style={styles.cell_title}>{'申请单号'}</TitleTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={'支持模糊查询'}
defaultValue={listOptionData[3].value}
onChangeText={(text) => this.handleRequiNumInput(text)}
/>
</CellTextStyle>
</TouchableOpacity>
</View> */}
{/* <View style={styles.item_container}>
<TouchableOpacity
activeOpacity={1}
>
<CellTextStyle style={styles.cell_box}>
<TitleTextStyle style={styles.cell_title}>{'来源借货订单号'}</TitleTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={'支持模糊查询'}
defaultValue={listOptionData[4].value}
onChangeText={(text) => this.handleTarBorOrdInput(text)}
/>
</CellTextStyle>
</TouchableOpacity>
</View> */}
{ this.renderDateModel() } { this.renderDateModel() }
{ this.renderPickerModel() } { this.renderPickerModel() }
...@@ -962,18 +945,9 @@ class TransSearchPage extends Component { ...@@ -962,18 +945,9 @@ class TransSearchPage extends Component {
<ScrollView style={styles.search_scroll}> <ScrollView style={styles.search_scroll}>
{this.renderTopProItem()} {this.renderTopProItem()}
{this.renderContItem()} {this.renderContItem()}
{this.renderLodingItem()} {this.renderLodingItem()}
</ScrollView> </ScrollView>
</View> </View>
{/* <FooterBtnStyle
style={styles.sub_btn_pro}
activeOpacity={.8}
title={'确定'}
textStyle= {styles.sub_btn}
onPress={() => console.warn('确定')}
/> */}
{this.renderFooterBtnItem()} {this.renderFooterBtnItem()}
...@@ -1023,6 +997,9 @@ const styles = StyleSheet.create({ ...@@ -1023,6 +997,9 @@ const styles = StyleSheet.create({
cell_title: { cell_title: {
width: 52 width: 52
}, },
cell_tit_size: {
fontSize: 14
},
qui_cell_rig_date: { qui_cell_rig_date: {
height: pxHeight(52), height: pxHeight(52),
flex: 1, flex: 1,
...@@ -1058,6 +1035,14 @@ const styles = StyleSheet.create({ ...@@ -1058,6 +1035,14 @@ const styles = StyleSheet.create({
paddingRight: 0, paddingRight: 0,
fontSize: 14 fontSize: 14
}, },
cell_input_scan: {
paddingRight: 20
},
sea_scan_box: {
width: pxSize(22),
height: pxSize(22),
marginLeft: 2
},
search_btn_box: { search_btn_box: {
backgroundColor: promary_color, backgroundColor: promary_color,
height: 46, height: 46,
......
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