Commit 0b6a7ebb by Denglingling

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

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