Commit 0d2b185b by Denglingling

完善【扫码】功能,样式调整,以及调用方式;增加【转单申请】菜单权限等;

parent e3d63135
...@@ -18,10 +18,10 @@ import FillUnitPricePage from './containers/equipConsu/module/FillUnitPricePage' ...@@ -18,10 +18,10 @@ import FillUnitPricePage from './containers/equipConsu/module/FillUnitPricePage'
import QuickOrderPage from './containers/quickOrder/QuickOrderPage'; import QuickOrderPage from './containers/quickOrder/QuickOrderPage';
import TransOrderPage from './containers/transOrder/TransOrderPage'; import TransOrderPage from './containers/transOrder/TransOrderPage';
import TransSearchPage from './containers/transOrder/module/TransSearchPage'; import TransSearchPage from './containers/transOrder/module/TransSearchPage';
import BarCodePage from './containers/transOrder/module/BarCodePage';
import HistoricalOrderPage from './containers/historicalOrder/HistoricalOrderPage'; import HistoricalOrderPage from './containers/historicalOrder/HistoricalOrderPage';
import LineOrderPage from './containers/historicalOrder/module/LineOrderPage'; import LineOrderPage from './containers/historicalOrder/module/LineOrderPage';
import SubSuccPage from './containers/common/SubSuccPage'; import SubSuccPage from './containers/common/SubSuccPage';
import BarCodePage from './containers/common/BarCodePage';
const Router = createAppContainer(createStackNavigator({ const Router = createAppContainer(createStackNavigator({
LoginPage: { screen: LoginPage }, LoginPage: { screen: LoginPage },
...@@ -36,10 +36,10 @@ const Router = createAppContainer(createStackNavigator({ ...@@ -36,10 +36,10 @@ const Router = createAppContainer(createStackNavigator({
QuickOrderPage: {screen: QuickOrderPage}, QuickOrderPage: {screen: QuickOrderPage},
TransOrderPage: {screen: TransOrderPage}, TransOrderPage: {screen: TransOrderPage},
TransSearchPage: {screen: TransSearchPage}, TransSearchPage: {screen: TransSearchPage},
BarCodePage: {screen: BarCodePage},
HistoricalOrderPage: {screen: HistoricalOrderPage}, HistoricalOrderPage: {screen: HistoricalOrderPage},
LineOrderPage: {screen: LineOrderPage}, LineOrderPage: {screen: LineOrderPage},
SubSuccPage: {screen: SubSuccPage} SubSuccPage: {screen: SubSuccPage},
BarCodePage: {screen: BarCodePage},
}, { }, {
navigationOptions: { navigationOptions: {
gesturesEnabled: true gesturesEnabled: true
......
import React, { Component } from 'react';
import {
View,
StyleSheet,
Text,
Animated,
Easing,
SafeAreaView,
ImageBackground
} from 'react-native';
import {
title_text_color,
Height,
Width,
safe_view,
promary_color
} from '../../base/BaseStyle';
import { show } from '../../utils/Utils';
import { RNCamera } from 'react-native-camera';
import StatusBarView from './StatusBarView';
import HeadBackItem from './HeadBackItem';
class BarCodePage extends Component {
constructor(props) {
super(props);
this.state = {
transCode:'', // 条码
// typeCode: '', // 条码类型
showCode: true,
// animate: new Animated.Value(0), // 二维坐标{x:0,y:0}
animateCode: new Animated.Value((Width() - 200) / 2,(Height() - 340) / 2),
// 中间横线动画初始值
moveAnim: new Animated.Value(-2)
}
}
componentDidMount() {
// InteractionManager.runAfterInteractions(() => {
// this.startAnimation()
// })
// console.log('进入-------', this.state.showCode)
this.startAnimation();
}
/** 扫描框动画*/
startAnimation = () => {
this.state.moveAnim.setValue(-2);
Animated.sequence([
Animated.timing(
this.state.moveAnim,
{
toValue: 200,
duration: 1500,
easing: Easing.linear
}
),
Animated.timing(
this.state.moveAnim,
{
toValue: -1,
duration: 1500,
easing: Easing.linear
}
)
]).start(() => this.startAnimation())
}
onBarCodeRead = (result) => {
let that = this
const { data } = result
const { navigate } = that.props.navigation;
let { typeName, supPage } = that.props.navigation.state.params
//扫码后的操作
console.log('data===========---------=====', data)
if(data) {
let barCodeData = {
typeName: typeName,
typeValue: data
}
navigate(supPage.pageName, { barCodeData, title: supPage.title })
}
}
render() {
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.bar_cord_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={styles.container}>
<RNCamera
ref={ref => {
this.camera = ref;
}}
autoFocus={RNCamera.Constants.AutoFocus.on}/*自动对焦*/
style={[styles.rnca_preview]}
type={RNCamera.Constants.Type.back}/*切换前后摄像头 front前back后*/
flashMode={RNCamera.Constants.FlashMode.off}/*相机闪光模式*/
onBarCodeRead={this.onBarCodeRead}
>
<View style={styles.anima_top_box} />
<View style={[styles.anima_box]}>
<View style={styles.anima_box_bg}/>
<ImageBackground style={styles.anima_box_inner}>
<Animated.View style={[
styles.anima_border,
{transform: [{translateY: this.state.moveAnim}]}]}/>
</ImageBackground>
<View style={styles.anima_box_bg}/>
</View>
<View style={styles.rnca_bot_box}>
<Text style={styles.recg_text}>将二维码放入框内,即可自动扫描</Text>
</View>
</RNCamera>
</View>
</SafeAreaView>
</View>
)
}
}
const styles = StyleSheet.create({
bar_cord_container: {
flex: 1
},
container: {
flex: 1,
flexDirection: 'row'
},
rnca_preview: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
anima_top_box: {
width:500,
height:140,
backgroundColor: 'rgba(0,0,0,0.5)',
},
anima_box: {
flexDirection:'row'
},
anima_box_inner: {
width:200,
height:200
},
anima_box_bg: {
backgroundColor: 'rgba(0,0,0,0.5)',
height:200,
width:200
},
anima_border: {
flex: 0,
width: 196,
height: 2,
backgroundColor: promary_color,
borderRadius: 50,
marginLeft: 2
},
rnca_bot_box: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.5)',
width: 500,
alignItems: 'center'
},
recg_text: {
flex: 0,
color: title_text_color,
marginTop: 10
},
})
export default BarCodePage;
\ No newline at end of file
...@@ -32,6 +32,8 @@ import { show} from '../../../utils/Utils'; ...@@ -32,6 +32,8 @@ import { show} from '../../../utils/Utils';
import LodingModel from '../../common/LodingModel'; import LodingModel from '../../common/LodingModel';
import { exitLoginStatus } from '../../../action/LoginAction'; import { exitLoginStatus } from '../../../action/LoginAction';
const CONSUM_SEARCH_VALUE_BAR_CODE = 'CONSUM_SEARCH_VALUE_BAR_CODE';
class ConsumDetailsPage extends Component { class ConsumDetailsPage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -50,54 +52,6 @@ class ConsumDetailsPage extends Component { ...@@ -50,54 +52,6 @@ class ConsumDetailsPage extends Component {
// specification: '3g,Ytg-DG-SZGT', // specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774', // serial_number: '2001202001001774',
// select: false // select: false
// },{
// "id": "2",
// item_name: '人工髋关节假体-JS-HB ||| T3',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// select: true
// },{
// "id": "3",
// item_name: '人工髋关节假体-JS-HB ||| T4',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// select: true
// },{
// "id": "4",
// item_name: '人工髋关节假体-JS-HB ||| T5',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// select: true
// },{
// "id": "5",
// item_name: '人工髋关节假体-JS-HB ||| T6',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// select: true
// },{
// "id": "6",
// item_name: '人工髋关节假体-JS-HB ||| T',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// select: false
// },{
// "id": "7",
// item_name: '人工髋关节假体-JS-HB ||| T',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// select: false
// },{
// "id": "8",
// item_name: '人工髋关节假体-JS-HB ||| T',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// select: false
// },{
// "id": "9",
// item_name: '人工髋关节假体-JS-HB ||| T',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// select: false
// } // }
], ],
allConOption: [], // 所有数据(未筛选过的) allConOption: [], // 所有数据(未筛选过的)
...@@ -115,10 +69,11 @@ class ConsumDetailsPage extends Component { ...@@ -115,10 +69,11 @@ class ConsumDetailsPage extends Component {
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
let { barCodeData } = nextProps.navigation.state.params let { barCodeData } = nextProps.navigation.state.params
let that = this let that = this
if(barCodeData && barCodeData.typeValue && barCodeData.typeName == 'consum_search_value') { if(barCodeData && barCodeData.typeValue && barCodeData.typeName == CONSUM_SEARCH_VALUE_BAR_CODE) {
that.setState({ that.setState({
searchValue searchValue: barCodeData.typeValue
}) })
that.handleSearchInput(barCodeData.typeValue)
} }
} }
...@@ -150,6 +105,7 @@ class ConsumDetailsPage extends Component { ...@@ -150,6 +105,7 @@ class ConsumDetailsPage extends Component {
chItem.local_add_price = item.local_add_price chItem.local_add_price = item.local_add_price
chItem.select = true chItem.select = true
} }
chItem.id = chInd + ''
}) })
}) })
} }
...@@ -172,8 +128,7 @@ class ConsumDetailsPage extends Component { ...@@ -172,8 +128,7 @@ class ConsumDetailsPage extends Component {
// 搜索 输入 // 搜索 输入
handleSearchInput(text) { handleSearchInput(text) {
// console.log('搜索 输入---', text) let { allConOption } = this.state
let {allConOption} = this.state
let self = this let self = this
let tempArr = [] let tempArr = []
if(text) { if(text) {
...@@ -197,7 +152,8 @@ class ConsumDetailsPage extends Component { ...@@ -197,7 +152,8 @@ class ConsumDetailsPage extends Component {
// 搜索 扫一扫 // 搜索 扫一扫
handleConsumScanCheck() { handleConsumScanCheck() {
this.props.navigation.navigate('BarCodePage', { this.props.navigation.navigate('BarCodePage', {
typeName: 'consum_search_value', title: '扫描二维码',
typeName: CONSUM_SEARCH_VALUE_BAR_CODE,
supPage: { supPage: {
title: '器械消耗 - 添加明细', title: '器械消耗 - 添加明细',
pageName: 'ConsumDetailsPage' pageName: 'ConsumDetailsPage'
...@@ -312,6 +268,7 @@ class ConsumDetailsPage extends Component { ...@@ -312,6 +268,7 @@ 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 <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={styles.ser_scanit_box} style={styles.ser_scanit_box}
...@@ -319,6 +276,7 @@ class ConsumDetailsPage extends Component { ...@@ -319,6 +276,7 @@ class ConsumDetailsPage extends Component {
> >
<Image source={require('../../../images/scan_2.png')} style={icon_style} /> <Image source={require('../../../images/scan_2.png')} style={icon_style} />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
) )
} }
......
...@@ -161,6 +161,7 @@ class DetailsModel extends Component { ...@@ -161,6 +161,7 @@ class DetailsModel extends Component {
<TouchableOpacity <TouchableOpacity
activeOpacity={1} activeOpacity={1}
style={styles.top_touch_cont} style={styles.top_touch_cont}
key={index}
// onPress={() => this.handleTopNav(item, index)} // onPress={() => this.handleTopNav(item, index)}
> >
<View style={[ <View style={[
......
...@@ -540,7 +540,7 @@ const styles = StyleSheet.create({ ...@@ -540,7 +540,7 @@ const styles = StyleSheet.create({
borderBottomWidth: 1 borderBottomWidth: 1
}, },
top_touch_cont: { top_touch_cont: {
width: '33.33333%' width: '33.33333%' // 三个
// width: '50%' // width: '50%'
}, },
top_inner: { top_inner: {
......
...@@ -48,6 +48,7 @@ import { show, dedupQuoteArray, cloneObject } from '../../../utils/Utils'; ...@@ -48,6 +48,7 @@ import { show, dedupQuoteArray, cloneObject } from '../../../utils/Utils';
import moment from 'moment'; import moment from 'moment';
import ErrorTipModel from '../../common/ErrorTipModel'; import ErrorTipModel from '../../common/ErrorTipModel';
const REQUEST_NUMBER_BAR_CODE = 'REQUEST_NUMBER_BAR_CODE'
class FilterModel extends Component { class FilterModel extends Component {
constructor(props) { constructor(props) {
...@@ -1185,6 +1186,18 @@ class FilterModel extends Component { ...@@ -1185,6 +1186,18 @@ class FilterModel extends Component {
}) })
} }
// 申请单号 - 扫一扫 -- 弹窗不好跳转!!!
handleRequeNumSacanCheck() {
// this.props.navigation.navigate('BarCodePage', {
// title: '扫描二维码',
// typeName: REQUEST_NUMBER_BAR_CODE,
// supPage: {
// title: '耗材明细 - 转单查询',
// pageName: 'HistoricalOrderPage'
// }
// })
}
// 判断组织是否为空 // 判断组织是否为空
judgeOrgIsNull() { judgeOrgIsNull() {
let {topActiveIndex, borrowListOptionData, consumeListOptionData, transferListOptionData } = this.state let {topActiveIndex, borrowListOptionData, consumeListOptionData, transferListOptionData } = this.state
...@@ -2085,7 +2098,7 @@ class FilterModel extends Component { ...@@ -2085,7 +2098,7 @@ class FilterModel extends Component {
<Text style={styles.qui_cell_tit}>申请单号</Text> <Text style={styles.qui_cell_tit}>申请单号</Text>
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={styles.qui_cell_inp}> style={[styles.qui_cell_inp, styles.qui_cell_tran]}>
<TextInput <TextInput
placeholder={'请输入'} placeholder={'请输入'}
style={[styles.cell_rig_sel, styles.cell_rig_input]} style={[styles.cell_rig_sel, styles.cell_rig_input]}
...@@ -2095,6 +2108,13 @@ class FilterModel extends Component { ...@@ -2095,6 +2108,13 @@ class FilterModel extends Component {
defaultValue={transferListOptionData[6].value} defaultValue={transferListOptionData[6].value}
keyboardType="email-address" keyboardType="email-address"
/> />
{/* <TouchableOpacity
activeOpacity={.8}
style={styles.sea_scan_box}
onPress={() => this.handleRequeNumSacanCheck()}
>
<Image source={require('../../../images/scan_2.png')} style={icon_style} />
</TouchableOpacity> */}
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<View style={styles.qui_cell}> <View style={styles.qui_cell}>
...@@ -2271,7 +2291,7 @@ const styles = StyleSheet.create({ ...@@ -2271,7 +2291,7 @@ const styles = StyleSheet.create({
borderBottomWidth: 1 borderBottomWidth: 1
}, },
top_touch_cont: { top_touch_cont: {
width: '33.33333%' width: '33.33333%' // 三个
// width: '50%' // width: '50%'
}, },
top_inner: { top_inner: {
...@@ -2432,6 +2452,9 @@ const styles = StyleSheet.create({ ...@@ -2432,6 +2452,9 @@ const styles = StyleSheet.create({
paddingHorizontal: 6, paddingHorizontal: 6,
paddingLeft: 52 paddingLeft: 52
}, },
qui_cell_tran: {
// paddingLeft: 22
},
cell_rig_input: { cell_rig_input: {
flex: 1, flex: 1,
lineHeight: 20, lineHeight: 20,
...@@ -2518,6 +2541,11 @@ const styles = StyleSheet.create({ ...@@ -2518,6 +2541,11 @@ const styles = StyleSheet.create({
sea_btn_reset: { sea_btn_reset: {
color: '#007EFF' color: '#007EFF'
}, },
sea_scan_box: {
width: pxSize(22),
height: pxSize(22),
marginLeft: 2
},
}) })
......
...@@ -58,7 +58,7 @@ class HomePage extends Component { ...@@ -58,7 +58,7 @@ class HomePage extends Component {
// page: 'LoginPage', // page: 'LoginPage',
// } // }
], ],
backLoginInfo: { backLoginInfo: { // 不需要了
icon: require('../../images/return_login.png'), icon: require('../../images/return_login.png'),
title: '返回登录页', title: '返回登录页',
page: 'LoginPage', page: 'LoginPage',
...@@ -110,9 +110,8 @@ class HomePage extends Component { ...@@ -110,9 +110,8 @@ class HomePage extends Component {
let { modDefauIcon, modSeleIcon, let { modDefauIcon, modSeleIcon,
hisDefauIcon, hisSeleIcon, hisDefauIcon, hisSeleIcon,
borrowInfo, consumpInfo, borrowInfo, consumpInfo,
backLoginInfo } = this.state transInfo, backLoginInfo } = this.state
functions = referenceArrSort(functions, 'child_list', 'function_order') functions = referenceArrSort(functions, 'child_list', 'function_order')
// console.log('referenceArrSort---->', functions)
let tempTabNames = [] let tempTabNames = []
let tempTabCodes = [] let tempTabCodes = []
let tempTabIconNames = [] let tempTabIconNames = []
...@@ -133,10 +132,13 @@ class HomePage extends Component { ...@@ -133,10 +132,13 @@ class HomePage extends Component {
} else if(chItem.function_code == 'MOBILE_CONSUMP_CONFIRMA') { } else if(chItem.function_code == 'MOBILE_CONSUMP_CONFIRMA') {
consumpInfo.title = chItem.function_name consumpInfo.title = chItem.function_name
tempModuleList.push(consumpInfo) tempModuleList.push(consumpInfo)
} else if(chItem.function_code == 'MOBILE_TRANSFER_APPLICATION') {
transInfo.title = chItem.function_name
tempModuleList.push(transInfo)
} }
}) })
} }
// tempModuleList.push(backLoginInfo) // tempModuleList.push(backLoginInfo) // 不用了
} else if(item.function_code == 'MOBILE_HISTORICAL_ORDER') { } else if(item.function_code == 'MOBILE_HISTORICAL_ORDER') {
tempTabIconNames.push(hisDefauIcon) tempTabIconNames.push(hisDefauIcon)
......
...@@ -728,8 +728,7 @@ class TransOrderPage extends Component { ...@@ -728,8 +728,7 @@ class TransOrderPage extends Component {
// 耗材明细 隐藏子项 // 耗材明细 隐藏子项
handleDetailBtmCheck() { handleDetailBtmCheck() {
let {listOptionData} = this.state let { listOptionData } = this.state
this.setState({ this.setState({
listOptionData: listOptionData.map((item, index) => { listOptionData: listOptionData.map((item, index) => {
if(index == 6) { if(index == 6) {
...@@ -743,9 +742,7 @@ class TransOrderPage extends Component { ...@@ -743,9 +742,7 @@ class TransOrderPage extends Component {
// 耗材明细 显示子项 // 耗材明细 显示子项
handleDetailRigCheck() { handleDetailRigCheck() {
let { listOptionData } = this.state
let {listOptionData} = this.state
this.setState({ this.setState({
listOptionData: listOptionData.map((item, index) => { listOptionData: listOptionData.map((item, index) => {
if(index == 6) { if(index == 6) {
......
import React, { Component } from 'react';
import {
View,
StyleSheet,
Text,
Animated,
Easing,
InteractionManager,
TouchableOpacity,
Image,
SafeAreaView
} from 'react-native';
import {
title_text_color,
pxSize,
Height,
Width,
icon_style,
safe_view,
promary_color
} from '../../../base/BaseStyle';
import { show } from '../../../utils/Utils';
import { RNCamera } from 'react-native-camera';
import StatusBarView from '../../common/StatusBarView';
class BarCodePage extends Component {
constructor(props) {
super(props);
this.state = {
transCode:'', // 条码
// typeCode: '', // 条码类型
showCode: true,
// animate: new Animated.Value(0), // 二维坐标{x:0,y:0}
animateCode: new Animated.Value((Width() - 200) / 2,(Height() - 340) / 2),
}
}
componentDidMount() {
InteractionManager.runAfterInteractions(() => {
this.startAnimation()
})
console.log('进入-------', this.state.showCode)
}
// 动画开始
startAnimation() {
// if(this.state.showCode) {
this.state.animateCode.setValue(0)
Animated.timing(this.state.animateCode, {
toValue: 1, // 运动终止位置,比值
duration: 2500, // 动画时长
easing: Easing.linear, // 线性的渐变函数
delay: 0.3, // 在一段时间之后开始动画(单位是毫秒),默认为0
}).start(() => this.startAnimation())
// }
}
componentWillUnmount() {
this.state.showCode = false
console.log('进入-结束🔚------', this.state.showCode)
}
barcodeReceived(e) {
let that = this
let { typeName, supPage } = that.props.navigation.state.params
if(this.state.showCode){
console.log(e);
that.setState({
transCode: e.data,
// typeCode: e.type,
showCode: false
})
if(e.data) {
let barCodeData = {
typeName: typeName,
typeValue: e.data
}
that.props.navigation.navigate(supPage.pageName, { barCodeData, title: supPage.title })
}
}
}
// 关闭扫一扫
closeScanPage() {
let { supPage } = this.props.navigation.state.params
this.props.navigation.navigate(supPage.pageName, { title: supPage.title })
}
render() {
return (
<View style={styles.container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<RNCamera
onBarCodeRead={this.barcodeReceived.bind(this)}
onCameraReady={() => {
console.log('ready')
}}
permissionDialogTitle={'提示信息'}
permissionDialogMessage={'APP需要使用相机,请打开相机权限允许APP使用'}
style={styles.scan_camera}
>
<View style={styles.scan_cont_box}>
<View style={styles.scan_cont_circle}>
<Animated.View style={{
alignItems: 'center',
transform: [{
// translateX: x轴移动
// translateY: y轴移动
translateY: this.state.animateCode.interpolate({
inputRange: [0,1],
outputRange: [0,200]
})
}]
}}>
<Text style={styles.scan_circle_init}></Text>
</Animated.View>
</View>
</View>
<TouchableOpacity
activeOpacity={.8}
style={styles.scan_top_box}
onPress={() => this.closeScanPage()}
>
<Image source={require('../../../images/close_white_icon2.png')} style={icon_style}/>
</TouchableOpacity>
<View style={styles.scan_info_box}>
<Text style={styles.scan_info}>将条形码放入框内,即可自动扫描</Text>
</View>
</RNCamera>
</SafeAreaView>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1
},
scan_top_box: {
position: "absolute",
left: 20,
top: 20,
width: pxSize(24),
height: pxSize(24)
},
scan_camera: {
flex: 1,
height: Height()
},
scan_cont_box: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'rgba(0,0,0,0.3)',
},
scan_cont_circle: {
width: 260,
height: 260,
borderWidth: 1,
borderColor: '#919191',
backgroundColor: 'rgba(255,255,255,0.1)'
},
scan_circle_init: {
width:250,
height:1,
backgroundColor:'#00ff00'
},
scan_info_box: {
height: 100,
backgroundColor: 'rgba(0,0,0,0.3)',
alignItems: 'center',
width: Width()
},
scan_info: {
color: title_text_color
},
info: {
width: Width(),
height: 80,
backgroundColor: '#fff',
paddingLeft: 10,
paddingBottom:5,
justifyContent: 'space-around',
},
})
export default BarCodePage;
\ No newline at end of file
...@@ -52,6 +52,9 @@ import DialogModel from '../../common/DialogModel'; ...@@ -52,6 +52,9 @@ import DialogModel from '../../common/DialogModel';
import DateModel from '../../common/DateModel'; import DateModel from '../../common/DateModel';
import moment from 'moment'; import moment from 'moment';
const SERIAL_NUMBER_BAR_CODE = 'SERIAL_NUMBER_BAR_CODE';
const SURGERY_COLLECT_NUMBER_BAR_CODE = 'SURGERY_COLLECT_NUMBER_BAR_CODE';
class TransSearchPage extends Component { class TransSearchPage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -106,42 +109,7 @@ class TransSearchPage extends Component { ...@@ -106,42 +109,7 @@ class TransSearchPage extends Component {
// surgery_collect_number: "SC20200529000010", // surgery_collect_number: "SC20200529000010",
// serial_number: '2001202001001772', // serial_number: '2001202001001772',
// select: false // select: false
// },{ // }
// "id": "2",
// item_name: '人工髋关节假体-JS-HB ||| T3',
// specification: '3g,Ytg-DG-SZGT',
// surgery_collect_number: "SC20200529000010",
// serial_number: '2001202001001773',
// select: true
// },{
// "id": "3",
// item_name: '人工髋关节假体-JS-HB ||| T4',
// specification: '3g,Ytg-DG-SZGT',
// surgery_collect_number: "SC20200529000010",
// serial_number: '2001202001001774',
// select: true
// },{
// "id": "4",
// item_name: '人工髋关节假体-JS-HB ||| T5',
// specification: '3g,Ytg-DG-SZGT',
// surgery_collect_number: "SC20200529000010",
// serial_number: '2001202001001775',
// select: true
// },{
// "id": "5",
// item_name: '人工髋关节假体-JS-HB ||| T6',
// specification: '3g,Ytg-DG-SZGT',
// surgery_collect_number: "SC20200529000010",
// serial_number: '2001202001001776',
// select: true
// },{
// "id": "6",
// item_name: '人工髋关节假体-JS-HB ||| T',
// specification: '3g,Ytg-DG-SZGT',
// surgery_collect_number: "SC20200529000010",
// serial_number: '2001202001001777',
// select: false
// },
], ],
allConOption: [], // 所有数据(未筛选过的) allConOption: [], // 所有数据(未筛选过的)
selectShowPopup: false, // 共计已选弹窗 selectShowPopup: false, // 共计已选弹窗
...@@ -182,13 +150,13 @@ class TransSearchPage extends Component { ...@@ -182,13 +150,13 @@ class TransSearchPage extends Component {
let { barCodeData } = nextProps.navigation.state.params let { barCodeData } = nextProps.navigation.state.params
let { listOptionData } = this.state let { listOptionData } = this.state
let that = this let that = this
if(barCodeData && barCodeData.typeValue && barCodeData.typeName == 'serial_number') { if(barCodeData && barCodeData.typeValue && barCodeData.typeName == SERIAL_NUMBER_BAR_CODE) {
listOptionData[1].value = barCodeData.typeValue listOptionData[1].value = barCodeData.typeValue
that.setState({ that.setState({
listOptionData listOptionData
}) })
} }
if(barCodeData && barCodeData.typeValue && barCodeData.typeName == 'surgery_collect_number') { if(barCodeData && barCodeData.typeValue && barCodeData.typeName == SURGERY_COLLECT_NUMBER_BAR_CODE) {
listOptionData[0].value = barCodeData.typeValue listOptionData[0].value = barCodeData.typeValue
that.setState({ that.setState({
listOptionData listOptionData
...@@ -333,7 +301,8 @@ class TransSearchPage extends Component { ...@@ -333,7 +301,8 @@ class TransSearchPage extends Component {
// 来源借货订单号 扫一扫 // 来源借货订单号 扫一扫
handleSourScanCheck() { handleSourScanCheck() {
this.props.navigation.navigate('BarCodePage', { this.props.navigation.navigate('BarCodePage', {
typeName: 'surgery_collect_number', title: '扫描二维码',
typeName: SURGERY_COLLECT_NUMBER_BAR_CODE,
supPage: { supPage: {
title: '耗材明细 - 转单查询', title: '耗材明细 - 转单查询',
pageName: 'TransSearchPage' pageName: 'TransSearchPage'
...@@ -343,7 +312,6 @@ class TransSearchPage extends Component { ...@@ -343,7 +312,6 @@ class TransSearchPage extends Component {
// 序列号 输入 // 序列号 输入
handleSerialNumInput(text) { handleSerialNumInput(text) {
console.log('序列号------input:', text)
this.changeInputValue('序列号', text) this.changeInputValue('序列号', text)
} }
...@@ -363,7 +331,8 @@ class TransSearchPage extends Component { ...@@ -363,7 +331,8 @@ class TransSearchPage extends Component {
// 序列号 扫一扫 // 序列号 扫一扫
handleSerialScanCheck() { handleSerialScanCheck() {
this.props.navigation.navigate('BarCodePage', { this.props.navigation.navigate('BarCodePage', {
typeName: 'serial_number', title: '扫描二维码',
typeName: SERIAL_NUMBER_BAR_CODE,
supPage: { supPage: {
title: '耗材明细 - 转单查询', title: '耗材明细 - 转单查询',
pageName: 'TransSearchPage' pageName: 'TransSearchPage'
...@@ -408,7 +377,7 @@ class TransSearchPage extends Component { ...@@ -408,7 +377,7 @@ class TransSearchPage extends Component {
} else if(curForm instanceof Object) { } else if(curForm instanceof Object) {
return return
} }
// if(seaFlag) { if(seaFlag) {
// 调用接口 // 调用接口
let { subTransObj } = that.props.navigation.state.params let { subTransObj } = that.props.navigation.state.params
let { token } = that.props let { token } = that.props
...@@ -429,9 +398,11 @@ class TransSearchPage extends Component { ...@@ -429,9 +398,11 @@ class TransSearchPage extends Component {
org_name: subTransObj.org_name, org_name: subTransObj.org_name,
...seaForm ...seaForm
} }
console.log('params------', params)
this.changeLodingFlag(true) this.changeLodingFlag(true)
let { global_domain_config } = that.props let { global_domain_config } = that.props
let detailResult = await requestTransDetails(global_domain_config, params) let detailResult = await requestTransDetails(global_domain_config, params)
console.log('detailResult------', detailResult)
if(detailResult.error_code === 0) { if(detailResult.error_code === 0) {
let { data: { sur_transfer_lines }} = detailResult let { data: { sur_transfer_lines }} = detailResult
if(sur_transfer_lines.length == 0) { if(sur_transfer_lines.length == 0) {
...@@ -462,9 +433,9 @@ class TransSearchPage extends Component { ...@@ -462,9 +433,9 @@ class TransSearchPage extends Component {
let error_msg = detailResult.error_msg || detailResult.message let error_msg = detailResult.error_msg || detailResult.message
show(error_msg); show(error_msg);
} }
// } else { } else {
// show('请至少输入一个查询条件') show('请至少输入一个查询条件')
// } }
} }
// 修改加载中 // 修改加载中
......
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