Commit ffa9fabc by wong.peiyi

Merge branch 'develop' into product

parents b2734e21 7be4f296
...@@ -130,6 +130,14 @@ android { ...@@ -130,6 +130,14 @@ android {
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
} }
} }
signingConfigs {
release {
storeFile file('../keystores/key.jks')
storePassword 'gkzhc2020'
keyAlias 'key'
keyPassword 'gkzhc2020'
}
}
buildTypes { buildTypes {
debug { debug {
resValue "string", "CodePushDeploymentKey", '"OQxOHKC_pU5KPExPvQLLfeOdhO4_zss5pKduM"' resValue "string", "CodePushDeploymentKey", '"OQxOHKC_pU5KPExPvQLLfeOdhO4_zss5pKduM"'
...@@ -140,6 +148,7 @@ android { ...@@ -140,6 +148,7 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
resValue "string", "CodePushDeploymentKey", '"KEzx1DMpvRIuGoORIyvnxdf9j8HD42NEQvj1z0"' resValue "string", "CodePushDeploymentKey", '"KEzx1DMpvRIuGoORIyvnxdf9j8HD42NEQvj1z0"'
resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis()) resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis())
signingConfig signingConfigs.release
} }
releaseStaging.initWith(release) releaseStaging.initWith(release)
releaseStaging { releaseStaging {
......
...@@ -87,7 +87,7 @@ export const list_common_item = { ...@@ -87,7 +87,7 @@ export const list_common_item = {
color: first_text_color, color: first_text_color,
fontFamily: font_family_regular fontFamily: font_family_regular
// fontWeight: 'bold' // fontWeight: 'bold'
}, },
rema_Input_outer: { rema_Input_outer: {
height: 120, height: 120,
alignItems: 'center', alignItems: 'center',
...@@ -228,6 +228,10 @@ export const list_common_item = { ...@@ -228,6 +228,10 @@ export const list_common_item = {
detail_inner: { detail_inner: {
flex: 1 flex: 1
}, },
detail_title_box: {
flexDirection: 'row',
justifyContent: 'space-between',
},
detail_tit: { detail_tit: {
fontSize: second_text_size, fontSize: second_text_size,
color: '#A3A3A3', color: '#A3A3A3',
...@@ -359,8 +363,8 @@ export const list_common_item = { ...@@ -359,8 +363,8 @@ export const list_common_item = {
height: 2 height: 2
}, },
shadowOpacity: 1, shadowOpacity: 1,
elevation: 10, // elevation: 10,
height: 80 height: 80,
}, },
sub_two_btn: { sub_two_btn: {
width: Width(), width: Width(),
...@@ -432,10 +436,10 @@ export const list_common_item = { ...@@ -432,10 +436,10 @@ export const list_common_item = {
ser_text_input: { ser_text_input: {
backgroundColor: '#F5F5F5', backgroundColor: '#F5F5F5',
height: 38, height: 38,
lineHeight: 16, lineHeight: 20,
paddingLeft: 34, paddingLeft: 34,
borderRadius: 10, borderRadius: 10,
fontSize: 14, fontSize: 14,
fontFamily: font_family_regular fontFamily: font_family_regular
}, },
} }
\ No newline at end of file
...@@ -90,10 +90,13 @@ class ChooseCardList extends Component { ...@@ -90,10 +90,13 @@ class ChooseCardList extends Component {
resizeMode="center" /> : <Image source={cur_icon} style={icon_style} resizeMode="cover" /> resizeMode="center" /> : <Image source={cur_icon} style={icon_style} resizeMode="cover" />
} }
</View> : null} </View> : null}
<Text numberOfLines={3} style={[styles.list_item_tit, cardStyleItemTit, cur_icon ? '' : cardStyleNotIconTit, index == curActIndex ? [styles.list_tit_act, cardStyleItemTitAct] : '']}> {
{item[cardItemTitle]} cardItemTitle &&
{(item[cardCountName] && countStyleType[0] === cardStyleType) ? <Text style={[styles.sum_def, cardCouStyle]}>({item[cardCountName]})</Text> : null} <Text numberOfLines={3} style={[styles.list_item_tit, cardStyleItemTit, cur_icon ? '' : cardStyleNotIconTit, index == curActIndex ? [styles.list_tit_act, cardStyleItemTitAct] : '']}>
</Text> {item[cardItemTitle]}
{(item[cardCountName] && countStyleType[0] === cardStyleType) ? <Text style={[styles.sum_def, cardCouStyle]}>({item[cardCountName]})</Text> : null}
</Text>
}
</View> </View>
</TouchableOpacity> </TouchableOpacity>
{(item[cardCountName] && countStyleType[1] === cardStyleType) ? <View style={[styles.card_def_count, cardCouStyle]}> {(item[cardCountName] && countStyleType[1] === cardStyleType) ? <View style={[styles.card_def_count, cardCouStyle]}>
...@@ -177,4 +180,4 @@ const mapDispatchToProps = (dispatch) => { ...@@ -177,4 +180,4 @@ const mapDispatchToProps = (dispatch) => {
} }
} }
export default connect(mapStateToProps, mapDispatchToProps)(ChooseCardList); export default connect(mapStateToProps, mapDispatchToProps)(ChooseCardList);
\ No newline at end of file
...@@ -768,7 +768,8 @@ class EquipConsuPage extends Component { ...@@ -768,7 +768,8 @@ class EquipConsuPage extends Component {
access_token: props.token, access_token: props.token,
org_code: state.listOptionData[1].value, org_code: state.listOptionData[1].value,
customer_code: state.listOptionData[2].value, customer_code: state.listOptionData[2].value,
collect_header_status: 'RETURNED,COLLECTED' collect_header_status: 'RETURNED,COLLECTED',
filter_none_flag: 'Y',
} }
if (OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY > 0) { if (OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY > 0) {
params.department_code = state.listOptionData[15].value params.department_code = state.listOptionData[15].value
...@@ -787,7 +788,8 @@ class EquipConsuPage extends Component { ...@@ -787,7 +788,8 @@ class EquipConsuPage extends Component {
access_token: props.token, access_token: props.token,
org_code: state.listOptionData[1].value, org_code: state.listOptionData[1].value,
customer_code: state.listOptionData[2].value, customer_code: state.listOptionData[2].value,
collect_header_status: 'RETURNED,COLLECTED' collect_header_status: 'RETURNED,COLLECTED',
filter_none_flag: 'Y',
} }
if (OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY > 0 && !!state.listOptionData[15].value) { if (OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY > 0 && !!state.listOptionData[15].value) {
params.department_code = state.listOptionData[15].value params.department_code = state.listOptionData[15].value
...@@ -1355,6 +1357,33 @@ class EquipConsuPage extends Component { ...@@ -1355,6 +1357,33 @@ class EquipConsuPage extends Component {
}) })
} }
/**
* @description: 耗材总金额
* @return {*}
*/
consumeSum() {
try {
const {listOptionData} = this.state
return R.compose(R.sum, R.pluck('local_add_price'), R.pathOr([], [12, 'subOption']))(listOptionData)
} catch (error) {
return 0
}
}
feeSum() {
try {
const {listOptionData} = this.state
return R.compose(
R.sum,
R.map(x => Number(x)),
R.pluck('fee_amount'),
R.pathOr([], [13, 'subOption'])
)(listOptionData)
} catch (error) {
return 0
}
}
// 返回备注以上的元素 // 返回备注以上的元素
renderListItem() { renderListItem() {
let { listOptionData, dateModelPop, sysValues } = this.state let { listOptionData, dateModelPop, sysValues } = this.state
...@@ -1616,10 +1645,15 @@ class EquipConsuPage extends Component { ...@@ -1616,10 +1645,15 @@ class EquipConsuPage extends Component {
// 返回耗材明细 // 返回耗材明细
renderConsumablesDetailsItem() { renderConsumablesDetailsItem() {
let { state } = this let { state } = this
const sum = this.consumeSum()
return ( return (
<CellTextStyle style={list_common_item.consu_detail}> <CellTextStyle style={list_common_item.consu_detail}>
<View style={list_common_item.detail_inner}> <View style={list_common_item.detail_inner}>
<Text style={list_common_item.detail_tit}>耗材明细</Text> {/* <View style={list_common_item.detail_title_box}> */}
<Text style={list_common_item.detail_tit}>耗材明细</Text>
{/* </View> */}
{ {
state.listOptionData[12].subOption.length ? state.listOptionData[12].subOption.length ?
<View <View
...@@ -1628,6 +1662,7 @@ class EquipConsuPage extends Component { ...@@ -1628,6 +1662,7 @@ class EquipConsuPage extends Component {
<Text style={list_common_item.detail_tit_text}> <Text style={list_common_item.detail_tit_text}>
耗材({state.listOptionData[12].subOption.length} 耗材({state.listOptionData[12].subOption.length}
</Text> </Text>
<Text style={list_common_item.detail_tit_text}>耗材总金额:{sum}</Text>
</View> </View>
{ {
state.listOptionData[12].isShowSub ? state.listOptionData[12].isShowSub ?
...@@ -1674,6 +1709,8 @@ class EquipConsuPage extends Component { ...@@ -1674,6 +1709,8 @@ class EquipConsuPage extends Component {
// 返回费用明细 // 返回费用明细
renderChargeDetailsItem() { renderChargeDetailsItem() {
let { state } = this let { state } = this
const sum = this.feeSum()
return ( return (
<CellTextStyle style={list_common_item.consu_detail}> <CellTextStyle style={list_common_item.consu_detail}>
<View style={list_common_item.detail_inner}> <View style={list_common_item.detail_inner}>
...@@ -1686,6 +1723,7 @@ class EquipConsuPage extends Component { ...@@ -1686,6 +1723,7 @@ class EquipConsuPage extends Component {
<Text style={list_common_item.detail_tit_text}> <Text style={list_common_item.detail_tit_text}>
费用({state.listOptionData[13].subOption.length} 费用({state.listOptionData[13].subOption.length}
</Text> </Text>
<Text style={list_common_item.detail_tit_text}>费用总金额:{sum}</Text>
</View> </View>
{ {
state.listOptionData[13].isShowSub ? state.listOptionData[13].isShowSub ?
...@@ -1728,10 +1766,15 @@ class EquipConsuPage extends Component { ...@@ -1728,10 +1766,15 @@ class EquipConsuPage extends Component {
// 返回添加图片 // 返回添加图片
renderAddPicturesItem() { renderAddPicturesItem() {
let { state } = this let { state } = this
const sum = this.feeSum() + this.consumeSum()
return ( return (
<CellTextStyle style={list_common_item.consu_addpic}> <CellTextStyle style={list_common_item.consu_addpic}>
<View style={list_common_item.addpic_inner}> <View style={list_common_item.addpic_inner}>
<Text style={list_common_item.addpic_tit}>添加图片</Text> <View style={list_common_item.detail_title_box}>
<Text style={list_common_item.addpic_tit}>添加图片</Text>
<Text style={list_common_item.detail_tit}>耗材+费用总金额:{sum}</Text>
</View>
<View style={list_common_item.addpic_cont}> <View style={list_common_item.addpic_cont}>
{state.localPhoOption.length {state.localPhoOption.length
? state.localPhoOption.map((item, index) => this.renderPicItem(item, index) ) ? state.localPhoOption.map((item, index) => this.renderPicItem(item, index) )
......
...@@ -52,7 +52,7 @@ class ChargeDetailsPage extends Component { ...@@ -52,7 +52,7 @@ class ChargeDetailsPage extends Component {
case LOGIN_NO: case LOGIN_NO:
navigation.navigate('LoginPage') navigation.navigate('LoginPage')
break; break;
default: default:
break; break;
} }
} }
...@@ -502,7 +502,10 @@ const styles = StyleSheet.create({ ...@@ -502,7 +502,10 @@ const styles = StyleSheet.create({
marginBottom: 30, marginBottom: 30,
borderRadius: 10, borderRadius: 10,
}, },
add_btn_cont: {}, add_btn_cont: {
alignItems: 'center',
width: '100%'
},
add_btn_txt: { add_btn_txt: {
height: 46, height: 46,
lineHeight: 46 lineHeight: 46
...@@ -529,4 +532,4 @@ const mapDispatchToProps = (dispatch) => { ...@@ -529,4 +532,4 @@ const mapDispatchToProps = (dispatch) => {
} }
} }
export default connect(mapStateToProps, mapDispatchToProps)(ChargeDetailsPage); export default connect(mapStateToProps, mapDispatchToProps)(ChargeDetailsPage);
\ No newline at end of file
import React, { Component } from 'react'; import React, { Component } from 'react';
import { View, Text, StyleSheet, SafeAreaView, TouchableOpacity, ScrollView, FlatList, TextInput } from 'react-native'; import { View, Text, StyleSheet, SafeAreaView, TouchableOpacity, ScrollView, FlatList, TextInput } from 'react-native';
import { home_background_color, promary_color, safe_view, list_common_item, placehold_text_color, second_text_size, promary_text_color, font_family_regular, font_family_medium, list_tit_color, list_str_color, list_one_color, list_thr_color, third_text_size, font_family_semibold } from '../../../base/BaseStyle'; import {second_text_color, home_background_color, promary_color, safe_view, list_common_item, placehold_text_color, second_text_size, promary_text_color, font_family_regular, font_family_medium, list_tit_color, list_str_color, list_one_color, list_thr_color, third_text_size, font_family_semibold, third_text_color } from '../../../base/BaseStyle';
import StatusBarView from '../../common/StatusBarView'; import StatusBarView from '../../common/StatusBarView';
import HeadBackItem from '../../common/HeadBackItem'; import HeadBackItem from '../../common/HeadBackItem';
import { show } from '../../../utils/Utils'; import { show } from '../../../utils/Utils';
import { setSubdetailOption } from '../../../action/EquipAction'; import { setSubdetailOption } from '../../../action/EquipAction';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import * as R from 'ramda';
// 可填写单价 // 可填写单价
class FillUnitPricePage extends Component { class FillUnitPricePage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
unitPriceOption: [] unitPriceOption: []
} }
} }
...@@ -20,6 +21,11 @@ class FillUnitPricePage extends Component { ...@@ -20,6 +21,11 @@ class FillUnitPricePage extends Component {
this.getLocalSelectedData() this.getLocalSelectedData()
} }
feeSum() {
const {unitPriceOption} = this.state
return R.compose(R.sum, R.map(x => isNaN(x) ? 0 : x), R.pluck('local_add_price'))(unitPriceOption)
}
// 获取选择的数据 // 获取选择的数据
getLocalSelectedData() { getLocalSelectedData() {
let {localSelectOption} = this.props.navigation.state.params let {localSelectOption} = this.props.navigation.state.params
...@@ -157,7 +163,10 @@ class FillUnitPricePage extends Component { ...@@ -157,7 +163,10 @@ class FillUnitPricePage extends Component {
render() { render() {
let {navigation} = this.props let {navigation} = this.props
let {title} = navigation.state.params let {title} = navigation.state.params
return ( const {unitPriceOption} = this.state
const sum = this.feeSum()
return (
<View style={styles.cu_dl_container}> <View style={styles.cu_dl_container}>
<StatusBarView <StatusBarView
isReactStackNavigator={true} isReactStackNavigator={true}
...@@ -168,6 +177,10 @@ class FillUnitPricePage extends Component { ...@@ -168,6 +177,10 @@ class FillUnitPricePage extends Component {
<HeadBackItem title={title} navigation={navigation} /> <HeadBackItem title={title} navigation={navigation} />
<View style={styles.cu_dl_main}> <View style={styles.cu_dl_main}>
{ this.renderContItem() } { this.renderContItem() }
<View style={styles.sum_box}>
<Text style={styles.sum_text}>总数量:{unitPriceOption.length}</Text>
<Text style={styles.sum_text}>总金额:{sum}</Text>
</View>
</View> </View>
{this.renderFooterBtnItem()} {this.renderFooterBtnItem()}
</SafeAreaView> </SafeAreaView>
...@@ -241,9 +254,16 @@ const styles = StyleSheet.create({ ...@@ -241,9 +254,16 @@ const styles = StyleSheet.create({
fontSize: 14, fontSize: 14,
color: list_thr_color color: list_thr_color
}, },
sum_box: {
flexDirection: 'row',
justifyContent: 'flex-end',
paddingTop: 15,
paddingBottom:15
},
sum_text: {
color: second_text_color,
paddingRight: 20,
},
fot_btn: { fot_btn: {
width: '100%', width: '100%',
borderRadius: 10 borderRadius: 10
...@@ -261,5 +281,5 @@ const mapDispatchToProps = (dispatch) => { ...@@ -261,5 +281,5 @@ const mapDispatchToProps = (dispatch) => {
} }
} }
} }
export default connect(mapStateToProps, mapDispatchToProps)(FillUnitPricePage); export default connect(mapStateToProps, mapDispatchToProps)(FillUnitPricePage);
\ No newline at end of file
...@@ -1389,6 +1389,9 @@ class SelfOrderPage extends Component { ...@@ -1389,6 +1389,9 @@ class SelfOrderPage extends Component {
source = res.uri; source = res.uri;
} else { } else {
source = res.uri.replace('file://', ''); source = res.uri.replace('file://', '');
if (!res.fileName) {
res.fileName = new Date().getTime() + '.HEIC'
}
} }
const formData = new FormData(); const formData = new FormData();
let file = { uri: source, type: 'multipart/form-data', name: res.fileName }; let file = { uri: source, type: 'multipart/form-data', name: res.fileName };
......
/*
* @FilePath: /BoneHouse_Business_APP/app/containers/selfOrder/module/ChooseFilter.js
* @Author: peii
* @Date: 2021-05-18 11:07:03
* @Vision: 1.0
* @Description:
*
* @Revision:
*
*/
import React, { Component } from 'react'
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
TextInput,
SafeAreaView,
ScrollView,
TouchableWithoutFeedback,
Modal,
Platform,
} from 'react-native'
import * as R from 'ramda'
import {
foundation_color,
home_background_color,
Width,
Height,
third_text_size,
pxSize,
promary_color,
safe_view,
font_family_regular,
icon_style,
title_text_color,
font_family_medium,
list_common_item,
point_color,
second_text_size,
second_text_color,
first_text_color,
} from '../../../base/BaseStyle'
import { isIphoneX } from '../../../utils/Utils'
const PropTypes = require('prop-types')
export default class ChoolseFilter extends Component {
static propTypes = {
filterData: PropTypes.arrayOf(PropTypes.any).isRequired,
onCallback: PropTypes.func.isRequired,
}
constructor(props) {
super(props)
this.state = {
visible: false,
}
}
render() {
const { visible } = this.state
const { filterData, onCallback } = this.props
return (
<View style={styles.filterBar}>
<View style={styles.filterBarTitle}>
<TouchableOpacity
style={styles.filterBtn}
activeOpacity={0.8}
onPress={() => {
this.setState({ visible: !visible })
}}
>
<Text style={styles.filterBtnText}>筛选</Text>
<Image
source={require('../../../images/arr_bom.png')}
style={[icon_style, styles.btnIcon]}
/>
</TouchableOpacity>
{filterData &&
R.compose(
R.map(filter => {
return <Text style={styles.filterSelect}>{filter.value}</Text>
}),
R.filter(R.prop('value')),
)(filterData)}
</View>
{visible && (
<Modal style={styles.searchModal} visible={visible} transparent={true}>
<TouchableOpacity
style={styles.mask_touch}
onPress={e => {
this.setState({ visible: !visible })
}}
activeOpacity={1}
></TouchableOpacity>
<View style={styles.mask}></View>
<View
style={
Platform.OS === 'ios'
? isIphoneX()
? [styles.searchContent, { top: 48 + 58 + pxSize(36) }]
: [styles.searchContent, { top: 20 + 58 + pxSize(36) }]
: styles.searchContent
}
>
<ScrollView style={styles.scrollView}>
{filterData &&
filterData.map(item => {
return (
<View key={item.field}>
<Text style={styles.searchLabel}>{item.label}</Text>
{item.type === 'select' ? (
<View style={styles.optionsBox}>
{!!item.options &&
item.options.map(option => {
return (
<TouchableOpacity
key={option.value}
style={
item.value === option.value
? [styles.optionItem, styles.optionItemActive]
: styles.optionItem
}
activeOpacity={0.8}
onPress={() => {
if (item.value === option.value) {
onCallback && onCallback(item.field, '')
} else {
onCallback && onCallback(item.field, option.value)
}
this.setState({ visible: !visible })
}}
>
<Text
style={
item.value === option.value
? [styles.optionItemText, styles.optionItemTextActive]
: styles.optionItemText
}
>
{option.label}
</Text>
{item.value === option.value && (
<Image
style={styles.optionItemImgActive}
source={require('../../../images/his_ord_sel.png')}
/>
)}
</TouchableOpacity>
)
})}
</View>
) : (
<></>
)}
</View>
)
})}
</ScrollView>
<View style={styles.searchBtns}>
<TouchableOpacity
style={[styles.searchBtn, styles.resetBtn]}
activeOpacity={0.8}
onPress={() => {
R.map(filter => {
onCallback && onCallback(filter.field, '')
})(filterData)
this.setState({ visible: !visible })
}}
>
<Text style={styles.resetBtnText}>重置</Text>
</TouchableOpacity>
<TouchableOpacity
style={[styles.searchBtn, styles.confirmBtn]}
activeOpacity={0.8}
onPress={() => {
this.setState({ visible: !visible })
}}
>
<Text style={styles.confirmBtnText}>确定</Text>
</TouchableOpacity>
</View>
</View>
</Modal>
)}
</View>
)
}
}
const styles = StyleSheet.create({
filterBar: {
width: Width(),
height: pxSize(36),
paddingLeft: pxSize(20),
},
filterBarTitle: {
flexDirection: 'row',
alignItems: 'center',
},
filterSelect: {
fontSize: 12,
borderColor: '#E1F1FE',
borderWidth: 1,
padding: 3,
borderRadius: 4,
},
filterBtn: {
height: pxSize(36),
flexDirection: 'row',
alignItems: 'center',
marginRight: 20,
},
filterBtnText: {
color: promary_color,
},
btnIcon: {
width: pxSize(10),
height: pxSize(10),
},
searchModal: {
// position: 'absolute',
// top: pxSize(36),
// width: Width(),
// height: Height(),
// backgroundColor: 'rgba(0, 0, 0, 0.5)',
// zIndex: 999,
},
mask_touch: {
position: 'absolute',
width: Width(),
height: Height(),
zIndex: 99,
top: 0,
},
mask: {
position: 'absolute',
width: Width(),
height: Height(),
backgroundColor: 'rgba(0, 0, 0, 0.5)',
// zIndex: 99,
top: 200,
},
searchContent: {
width: Width(),
height: pxSize(300),
backgroundColor: home_background_color,
top: 58 + pxSize(36),
borderColor: '#ddd',
borderTopWidth: 1,
zIndex: 999,
},
scrollView: {
height: pxSize(260),
padding: pxSize(20),
},
searchLabel: {
fontSize: second_text_size,
color: first_text_color,
fontWeight: 'bold',
marginBottom: 10,
},
searchBtns: {
height: pxSize(40),
width: Width(),
flexDirection: 'row',
},
searchBtn: {
width: '50%',
justifyContent: 'center',
alignItems: 'center',
},
resetBtn: {
backgroundColor: '#E1F1FE',
},
resetBtnText: {
color: promary_color,
},
confirmBtn: {
backgroundColor: promary_color,
},
confirmBtnText: {
color: '#fff',
},
optionsBox: {
flexDirection: 'row',
},
optionItem: {
padding: pxSize(8),
paddingLeft: pxSize(20),
paddingRight: pxSize(20),
marginRight: pxSize(15),
marginBottom: pxSize(15),
backgroundColor: '#fff',
},
optionItemActive: {
backgroundColor: '#E1F1FE',
},
optionItemText: {
color: second_text_color,
},
optionItemTextActive: {
color: promary_color,
},
optionItemImgActive: {
position: 'absolute',
bottom: 0,
right: 0,
},
})
...@@ -505,12 +505,15 @@ class TransOrderPage extends Component { ...@@ -505,12 +505,15 @@ class TransOrderPage extends Component {
let { listOptionData, localOtherObj } = this.state let { listOptionData, localOtherObj } = this.state
let that = this let that = this
this.setState({ this.setState({
listOptionData: listOptionData.map((item, index) => { listOptionData: listOptionData.map(async (item, index) => {
if(index > startIndex && index < endIndex) { if(index > startIndex && index < endIndex) {
item.name = localOtherObj.name item.name = localOtherObj.name
item.value = localOtherObj.value item.value = localOtherObj.value
if(listOptionData[1].value && item.title == '客户名称') { if(listOptionData[1].value && item.title == '客户名称') {
that.organizationGetCustomerData() await that.getDepartmentsByOrg(listOptionData[1].value)
setTimeout(() => {
that.organizationGetCustomerData()
}, 0);
} }
if(listOptionData[2].value && item.title == '目标订单信息') { if(listOptionData[2].value && item.title == '目标订单信息') {
that.customerGetTargetOrder() that.customerGetTargetOrder()
...@@ -568,9 +571,8 @@ class TransOrderPage extends Component { ...@@ -568,9 +571,8 @@ class TransOrderPage extends Component {
chItem.name = item.name chItem.name = item.name
chItem.value = item.value chItem.value = item.value
if(itemTitle === '组织') { if(itemTitle === '组织') {
that.clearInitNameAndValue(1)
that.clearInitNameAndValue(8, 10) that.clearInitNameAndValue(8, 10)
that.getDepartmentsByOrg(item.value) that.clearInitNameAndValue(1)
} }
if(itemTitle === '客户名称') { if(itemTitle === '客户名称') {
that.clearInitNameAndValue(2) that.clearInitNameAndValue(2)
...@@ -697,9 +699,11 @@ class TransOrderPage extends Component { ...@@ -697,9 +699,11 @@ class TransOrderPage extends Component {
listOptionData[1].value = filterOpt[0].org_code listOptionData[1].value = filterOpt[0].org_code
that.setState({ that.setState({
listOptionData listOptionData
}, () => { }, async () => {
that.organizationGetCustomerData() await that.getDepartmentsByOrg(listOptionData[1].value)
that.getDepartmentsByOrg(listOptionData[1].value) setTimeout(() => {
that.organizationGetCustomerData()
}, 0);
}) })
} }
}else { }else {
...@@ -857,11 +861,16 @@ class TransOrderPage extends Component { ...@@ -857,11 +861,16 @@ class TransOrderPage extends Component {
let params = { let params = {
access_token: props.token, access_token: props.token,
org_code: state.listOptionData[1].value, org_code: state.listOptionData[1].value,
seller_code: props.userInfo.user_name, // seller_code: props.userInfo.user_name,
customer_code: state.listOptionData[2].value, customer_code: state.listOptionData[2].value,
collect_header_status: 'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED', collect_header_status: 'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED',
setting_type: 'COLLECT' setting_type: 'COLLECT'
} }
if (state.sysValues.OBS_MOBILE_TRANS_DEPARTMENT_DISPLAY > 0) {
params.department_code = state.listOptionData[9].value
} else {
params.seller_code = props.userInfo.user_name
}
props.requestTransTargetOrderInfo(params) props.requestTransTargetOrderInfo(params)
}) })
} }
...@@ -872,10 +881,15 @@ class TransOrderPage extends Component { ...@@ -872,10 +881,15 @@ class TransOrderPage extends Component {
let params = { let params = {
access_token: props.token, access_token: props.token,
org_code: state.listOptionData[1].value, org_code: state.listOptionData[1].value,
seller_code: props.userInfo.user_name, // seller_code: props.userInfo.user_name,
customer_code: state.listOptionData[2].value, customer_code: state.listOptionData[2].value,
collect_header_status: 'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED' collect_header_status: 'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED'
} }
if (state.sysValues.OBS_MOBILE_TRANS_DEPARTMENT_DISPLAY > 0) {
params.department_code = state.listOptionData[9].value
} else {
params.seller_code = props.userInfo.user_name
}
let that = this let that = this
let { global_domain_config } = props let { global_domain_config } = props
let cusResult = await requestSubSourBorOrdNum(global_domain_config, params); let cusResult = await requestSubSourBorOrdNum(global_domain_config, params);
...@@ -980,14 +994,16 @@ class TransOrderPage extends Component { ...@@ -980,14 +994,16 @@ class TransOrderPage extends Component {
// 耗材明细 点击 // 耗材明细 点击
handleConsumDetailCheck() { handleConsumDetailCheck() {
let { listOptionData } = this.state let { listOptionData, sysValues } = this.state
let subTransObj = { let subTransObj = {
seller_name: listOptionData[0].name, seller_name: listOptionData[0].name,
seller_code: listOptionData[0].value, seller_code: listOptionData[0].value,
org_name: listOptionData[1].name, org_name: listOptionData[1].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,
department_code: listOptionData[9].value,
sysValues
} }
if(!listOptionData[7].subOption.length) { if(!listOptionData[7].subOption.length) {
this.props.setTransDetailOption([], {}) this.props.setTransDetailOption([], {})
...@@ -1067,6 +1083,9 @@ class TransOrderPage extends Component { ...@@ -1067,6 +1083,9 @@ class TransOrderPage extends Component {
source = res.uri; source = res.uri;
} else { } else {
source = res.uri.replace('file://',''); source = res.uri.replace('file://','');
if (!res.fileName) {
res.fileName = new Date().getTime() + '.HEIC'
}
} }
const formData = new FormData(); const formData = new FormData();
let file = { uri: source, type: 'multipart/form-data', name: res.fileName }; let file = { uri: source, type: 'multipart/form-data', name: res.fileName };
......
...@@ -143,7 +143,7 @@ class TransSearchPage extends Component { ...@@ -143,7 +143,7 @@ class TransSearchPage extends Component {
case LOGIN_NO: case LOGIN_NO:
navigation.navigate('LoginPage') navigation.navigate('LoginPage')
break; break;
default: default:
break; break;
} }
} }
...@@ -231,10 +231,15 @@ class TransSearchPage extends Component { ...@@ -231,10 +231,15 @@ class TransSearchPage extends Component {
let params = { let params = {
access_token: props.token, access_token: props.token,
org_code: subTransObj.org_code, org_code: subTransObj.org_code,
seller_code: props.userInfo.user_name, // seller_code: props.userInfo.user_name,
collect_header_status: 'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED', collect_header_status: 'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED',
setting_type: 'COLLECT' setting_type: 'COLLECT'
} }
if (subTransObj.sysValues.OBS_MOBILE_TRANS_DEPARTMENT_DISPLAY > 0) {
params.department_code = subTransObj.department_code
} else {
params.seller_code = props.userInfo.user_name
}
let { global_domain_config } = that.props let { global_domain_config } = that.props
that.changeLodingFlag(true) that.changeLodingFlag(true)
let sourResult = await requestSubSourBorOrdNum(global_domain_config, params) let sourResult = await requestSubSourBorOrdNum(global_domain_config, params)
...@@ -380,9 +385,15 @@ class TransSearchPage extends Component { ...@@ -380,9 +385,15 @@ class TransSearchPage extends Component {
} }
let params = { let params = {
access_token: token, access_token: token,
seller_name: subTransObj.seller_name,
org_name: subTransObj.org_name, org_name: subTransObj.org_name,
destination_collect_number: subTransObj.collect_number,
...seaForm ...seaForm
// seller_name: subTransObj.seller_name,
}
if (subTransObj.sysValues.OBS_MOBILE_TRANS_DEPARTMENT_DISPLAY > 0) {
params.department_code = subTransObj.department_code
} else {
params.seller_name = subTransObj.seller_name
} }
this.changeLodingFlag(true) this.changeLodingFlag(true)
let { global_domain_config } = that.props let { global_domain_config } = that.props
...@@ -424,7 +435,7 @@ class TransSearchPage extends Component { ...@@ -424,7 +435,7 @@ class TransSearchPage extends Component {
// show('请至少输入一个查询条件') // show('请至少输入一个查询条件')
// } // }
} }
// 修改加载中 // 修改加载中
changeLodingFlag(show) { changeLodingFlag(show) {
this.setState({ this.setState({
...@@ -487,7 +498,7 @@ class TransSearchPage extends Component { ...@@ -487,7 +498,7 @@ class TransSearchPage extends Component {
result = arr.reduce(function(init, item) { result = arr.reduce(function(init, item) {
if(!tmp[item[typeName1]+item[typeName2]+item[typeName3]]) { if(!tmp[item[typeName1]+item[typeName2]+item[typeName3]]) {
tmp[item[typeName1]+item[typeName2]+item[typeName3]] = true tmp[item[typeName1]+item[typeName2]+item[typeName3]] = true
init.push(item) init.push(item)
} }
return init return init
}, []) }, [])
...@@ -530,7 +541,7 @@ class TransSearchPage extends Component { ...@@ -530,7 +541,7 @@ class TransSearchPage extends Component {
handleSubSelected(show) { handleSubSelected(show) {
this.handleCloseSelectModal(true) this.handleCloseSelectModal(true)
} }
// 点击 确定 // 点击 确定
handleSubmit() { handleSubmit() {
this.handleCloseSelectModal(false) this.handleCloseSelectModal(false)
...@@ -545,7 +556,7 @@ class TransSearchPage extends Component { ...@@ -545,7 +556,7 @@ class TransSearchPage extends Component {
surgery_date_from: listOptionData[2].value, surgery_date_from: listOptionData[2].value,
surgery_date_to: listOptionData[3].value surgery_date_to: listOptionData[3].value
} }
this.props.setTransDetailOption(localSelectOption, searchForm) this.props.setTransDetailOption(localSelectOption, searchForm)
this.props.navigation.navigate('TransOrderPage', { title: '转单申请' }) this.props.navigation.navigate('TransOrderPage', { title: '转单申请' })
} }
...@@ -583,7 +594,7 @@ class TransSearchPage extends Component { ...@@ -583,7 +594,7 @@ class TransSearchPage extends Component {
{listOptionData[0].name} {listOptionData[0].name}
</ContTextStyle> </ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
{/* <TouchableOpacity {/* <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={styles.sea_scan_box} style={styles.sea_scan_box}
...@@ -625,7 +636,7 @@ class TransSearchPage extends Component { ...@@ -625,7 +636,7 @@ class TransSearchPage extends Component {
<CellTextStyle style={styles.cell_box}> <CellTextStyle style={styles.cell_box}>
<TitleTextStyle style={styles.cell_tit_size}>{'手术时间'}</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}
style={styles.qui_date_box} style={styles.qui_date_box}
onPress={() => this.handleSurDateCheck('start') } onPress={() => this.handleSurDateCheck('start') }
...@@ -636,7 +647,7 @@ class TransSearchPage extends Component { ...@@ -636,7 +647,7 @@ class TransSearchPage extends Component {
</View> </View>
</TouchableOpacity> </TouchableOpacity>
<Text style={styles.qui_date_line}></Text> <Text style={styles.qui_date_line}></Text>
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={styles.qui_date_box} style={styles.qui_date_box}
onPress={() => this.handleSurDateCheck('end') } onPress={() => this.handleSurDateCheck('end') }
...@@ -678,7 +689,7 @@ class TransSearchPage extends Component { ...@@ -678,7 +689,7 @@ class TransSearchPage extends Component {
// 返回选择器 // 返回选择器
renderPickerModel() { renderPickerModel() {
let { let {
listCurrentOption, listCurrentOption,
currentItem, currentItem,
currentTitle, currentTitle,
...@@ -693,8 +704,8 @@ class TransSearchPage extends Component { ...@@ -693,8 +704,8 @@ class TransSearchPage extends Component {
itemValue={currentItem.value} itemValue={currentItem.value}
itemTitle={currentTitle} itemTitle={currentTitle}
closeModal={(show) => this.handleCloseModal(show)} closeModal={(show) => this.handleCloseModal(show)}
/> />
</SafeAreaView> </SafeAreaView>
) )
} }
...@@ -723,7 +734,7 @@ class TransSearchPage extends Component { ...@@ -723,7 +734,7 @@ class TransSearchPage extends Component {
当前查询({conDetaOption.length})数据 当前查询({conDetaOption.length})数据
</Text> </Text>
{ {
!isAllSelect ? !isAllSelect ?
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={styles.tit_btn_box} style={styles.tit_btn_box}
...@@ -738,15 +749,15 @@ class TransSearchPage extends Component { ...@@ -738,15 +749,15 @@ class TransSearchPage extends Component {
> >
<Text style={[styles.tit_btn, styles.cle_btn]}>取消全选</Text> <Text style={[styles.tit_btn, styles.cle_btn]}>取消全选</Text>
</TouchableOpacity> </TouchableOpacity>
} }
</View> </View>
<View style={styles.cont_list}> <View style={styles.cont_list}>
<FlatList <FlatList
style={styles.cons_cont} style={styles.cons_cont}
keyExtractor={item => item.id} keyExtractor={item => item.id}
data={this.state.conDetaOption} data={this.state.conDetaOption}
extraData={this.state} extraData={this.state}
renderItem={ ({item, index}) => this.renderSubListItem(item, index) } renderItem={ ({item, index}) => this.renderSubListItem(item, index) }
/> />
</View> </View>
</View> </View>
...@@ -768,7 +779,7 @@ class TransSearchPage extends Component { ...@@ -768,7 +779,7 @@ class TransSearchPage extends Component {
}} }}
> >
<View style={styles.sub_list_lef}> <View style={styles.sub_list_lef}>
{item.select ? {item.select ?
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={styles.sub_icon_box} style={styles.sub_icon_box}
...@@ -843,10 +854,10 @@ class TransSearchPage extends Component { ...@@ -843,10 +854,10 @@ class TransSearchPage extends Component {
) )
} }
render() { render() {
let {navigation} = this.props let {navigation} = this.props
let {title} = navigation.state.params let {title} = navigation.state.params
return ( return (
<View style={styles.search_container}> <View style={styles.search_container}>
<StatusBarView <StatusBarView
isReactStackNavigator={true} isReactStackNavigator={true}
...@@ -885,9 +896,9 @@ const styles = StyleSheet.create({ ...@@ -885,9 +896,9 @@ const styles = StyleSheet.create({
}, },
list_cont: { list_cont: {
flex: 1 flex: 1
}, },
item_container: { item_container: {
flex: 1 flex: 1
}, },
item_btn_cont: { item_btn_cont: {
alignItems: 'center', alignItems: 'center',
...@@ -1082,5 +1093,5 @@ const mapDispatchToProps = (dispatch) => { ...@@ -1082,5 +1093,5 @@ const mapDispatchToProps = (dispatch) => {
} }
} }
} }
export default connect(mapStateToProps, mapDispatchToProps)(TransSearchPage); export default connect(mapStateToProps, mapDispatchToProps)(TransSearchPage);
\ No newline at end of file
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