Commit 580b9f83 by peii

Merge branch 'develop' into product

parents ffa9fabc 1db8029c
Showing with 319 additions and 57 deletions
......@@ -77,7 +77,7 @@ project.ext.react = [
entryFile: "index.js"
]
//apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native/react.gradle"
/**
* Set this to true to create two separate APKs instead of one:
......
......@@ -2,7 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/launch_screen" android:scaleType="centerCrop" />
<ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@mipmap/launch_screen" android:scaleType="centerCrop" />
</RelativeLayout>
<!-- <?xml version="1.0" encoding="utf-8"?>
......
......@@ -11,8 +11,9 @@ import ChooseProductPage from './containers/selfOrder/module/ChooseProductPage';
import EditThirdLevelPage from './containers/selfOrder/module/EditThirdLevelPage';
import EquipConsuPage from './containers/equipConsu/EquipConsuPage';
import ConsumDetailsPage from './containers/equipConsu/module/ConsumDetailsPage';
import ChargeDetailsPage from './containers/equipConsu/module/ChargeDetailsPage';
import ChargeDetailsPage from './containers/equipConsu/module/ChargeDetailsPageRef';
import FillUnitPricePage from './containers/equipConsu/module/FillUnitPricePage';
import OrdersPage from './containers/equipConsu/module/OrdersPage';
import ShowDetailPage from './containers/equipConsu/module/ShowDetailPage';
import QuickOrderPage from './containers/quickOrder/QuickOrderPage';
import surgeryTemplatePage from './containers/quickOrder/module/surgeryTemplatePage';
......@@ -35,6 +36,7 @@ const Router = createAppContainer(createStackNavigator({
ConsumDetailsPage: {screen: ConsumDetailsPage},
ChargeDetailsPage: {screen: ChargeDetailsPage},
FillUnitPricePage: {screen: FillUnitPricePage},
OrdersPage: {screen: OrdersPage},
ShowDetailPage: {screen: ShowDetailPage},
QuickOrderPage: {screen: QuickOrderPage},
surgeryTemplatePage: {screen: surgeryTemplatePage},
......
......@@ -125,6 +125,16 @@ export const reqEquipOrderInfo = async (global_domain_config, params) => {
return await GetRequest(global_domain_config, getUrlParams('/surgery/collect_order/search', params))
}
/**
* @description: 请求费用行
* @param {*} global_domain_config
* @param {*} params
* @return {*}
*/
export const reqConsumeFeeLines = async (global_domain_config, params) => {
return await GetRequest(global_domain_config, getUrlParams('/surgery/consume_fee_line/search', params))
}
function requestListDataing() {
return {
type: EQUIP_CONSU_LIST_DOING
......
......@@ -91,6 +91,9 @@ class DateModel extends Component {
renderDialog() {
let { currentDate, date_mode } = this.state
const {minuteInterval, maximumDate, minimumDate} = this.props
const date = currentDate && new Date(currentDate)
return (
<View style={styles.opt_area}>
<View style={styles.modal_style}>
......@@ -113,11 +116,14 @@ class DateModel extends Component {
</View>
<View style={styles.date_box}>
<DatePicker
date={currentDate}
date={date}
onDateChange={(date) => this.currentDateChange(date)}
locale="zh"
minuteInterval={minuteInterval || 5}
mode={date_mode}
/>
maximumDate={maximumDate}
minimumDate={minimumDate}
/>
</View>
</View>
</View>
......
......@@ -6,7 +6,8 @@ import {
Text,
Image,
TouchableOpacity,
Clipboard
Clipboard,
ScrollView
} from 'react-native';
import HeadBackItem from './HeadBackItem';
import {
......@@ -25,7 +26,7 @@ import { show } from '../../utils/Utils';
class SubSuccPage extends Component {
constructor(props) {
super(props);
this.state = {
this.state = {
orderVal: ''
}
}
......@@ -58,39 +59,44 @@ class SubSuccPage extends Component {
render() {
let { navigation } = this.props
let { title } = navigation.state.params
let { title, warnTip } = navigation.state.params
let { state } = this
return (
return (
<View style={styles.succ_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<View style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={styles.succ_inner}>
<View style={styles.img_box}>
<Image source={require('../../images/cor_green.png')} style={styles.img_icon}/>
<ScrollView style={safe_view}>
<View style={styles.succ_inner}>
<View style={styles.img_box}>
<Image source={require('../../images/cor_green.png')} style={styles.img_icon}/>
</View>
<Text style={styles.succ_title}>{'提交成功'}</Text>
{
state.orderVal ?
<Text style={styles.succ_text}>{'订单号:'} { state.orderVal }</Text>
: null
}
{
!!warnTip && <View><Text style={styles.warn_tip} numberOfLines={50}>{warnTip}</Text></View>
}
<TouchableOpacity
activeOpacity={.9}
style={styles.succ_btn}
onPress={() => this.handleSubmit()}
>
<Text style={styles.btn_text}>
{ state.orderVal ? '复制订单号并返回主页' : '返回主页'}
</Text>
</TouchableOpacity>
</View>
<Text style={styles.succ_title}>{'提交成功'}</Text>
{
state.orderVal ?
<Text style={styles.succ_text}>{'订单号:'} { state.orderVal }</Text>
: null
}
<TouchableOpacity
activeOpacity={.9}
style={styles.succ_btn}
onPress={() => this.handleSubmit()}
>
<Text style={styles.btn_text}>
{ state.orderVal ? '复制订单号并返回主页' : '返回主页'}
</Text>
</TouchableOpacity>
</View>
</SafeAreaView>
</ScrollView>
</View>
</View>
);
}
......@@ -103,7 +109,7 @@ const styles = StyleSheet.create({
succ_inner: {
justifyContent: 'center',
alignItems: 'center',
paddingTop: '26%'
marginTop: pxSize(100)
},
img_box: {
width: pxSize(80),
......@@ -125,7 +131,15 @@ const styles = StyleSheet.create({
color: second_text_color,
paddingBottom: 30,
fontFamily: font_family_regular
},
},
warn_tip: {
fontSize: 14,
paddingLeft: 20,
paddingRight: 20,
paddingBottom: 20,
color: '#fdbe34',
lineHeight: 22
},
succ_btn: {
backgroundColor: promary_color,
width: pxSize(330),
......@@ -141,5 +155,5 @@ const styles = StyleSheet.create({
fontFamily: font_family_regular
}
})
export default SubSuccPage;
\ No newline at end of file
export default SubSuccPage;
......@@ -60,11 +60,11 @@ class PageListArrow extends Component {
>
<CellTextStyle style={listCellStyle ? listCellStyle : ''}>
{ listHasAster ? <AsteriskTextStyle>*</AsteriskTextStyle> : null }
<TitleTextStyle style={isTitInputStyle ? styles.cell_title : ''}>{listItem[listTitle]}</TitleTextStyle>
<TitleTextStyle style={isTitInputStyle ? styles.cell_title : ''}>{listItem[listTitle] || listTitle}</TitleTextStyle>
{ (listEditAble || inputCallBack) ? <ContInputTextStyle
style={isTitInputStyle ? styles.cell_input : ''}
editable={!listEditAble}
defaultValue={listItem[listDefaValue]}
editable={listEditAble}
defaultValue={listItem[listDefaValue] && listItem[listDefaValue].toString()}
placeholder={listInputPlace}
keyboardType={inputKeyboardType ? inputKeyboardType : 'default'}
onChangeText={(text) => {return inputCallBack ? inputCallBack(text) : ''}}
......
......@@ -12,8 +12,12 @@ import { connect } from 'react-redux';
import PageListArrow from '../../common/listDataComponent/PageListArrow';
import { CellTextStyle } from '../../common/CellTextStyle';
import LoadingModel from '../../common/listDataComponent/LoadingModel';
// 费用明细
/**
* @description: // 费用明细
* @param {*}
* @return {*}
* @deprecated 已废弃,使用ChargeDetailsPageRef
*/
class ChargeDetailsPage extends Component {
constructor(props) {
super(props);
......
......@@ -27,6 +27,7 @@ class ConsumDetailsPage extends Component {
localSelectOption: [], // 已选数据
isSubLoding: true, // 加载中弹窗
lodingTitle: '加载中',
userEnteredPrice: 'Y'
}
}
......@@ -57,7 +58,7 @@ class ConsumDetailsPage extends Component {
// 获取当前订单的消耗明细
async getCurOrderDetail() {
let {orderId} = this.props.navigation.state.params
let {orderId, userEnteredPrice} = this.props.navigation.state.params
let {global_domain_config} = this.props
let params = {
access_token: this.props.token,
......@@ -88,7 +89,8 @@ class ConsumDetailsPage extends Component {
this.setState({
isSubLoding: false,
conDetaOption: lines,
allConOption: lines
allConOption: lines,
userEnteredPrice
})
this.changeIsSelected()
} else if(detailResult.error_code === 41006) {
......@@ -217,12 +219,12 @@ class ConsumDetailsPage extends Component {
// 点击 确定耗材
handleSubmit() {
this.handleCloseSelectModal(false)
let {localSelectOption} = this.state
let {localSelectOption, userEnteredPrice} = this.state
if(!localSelectOption.length) {
show('请选择耗材')
return
}
if(OBS_MOBILE_EQU_CON_DISPLAY_PRICE === 'Y'){
if(OBS_MOBILE_EQU_CON_DISPLAY_PRICE === 'Y' && userEnteredPrice !== 'N'){
this.props.navigation.navigate('FillUnitPricePage', {
title: '器械消耗 - 填写单价',
localSelectOption: localSelectOption
......
/*
* @FilePath: /BoneHouse_Business_APP/app/containers/equipConsu/module/OrdersPage.js
* @Author: peii
* @Date: 2021-07-06 15:29:45
* @LastEditTime: 2021-07-08 15:58:39
* @LastEditors: peii
* @Vision: 1.0
* @Description: 消耗时选择借货单
*/
import React, { Component } from 'react'
import {
View,
Text,
StyleSheet,
SafeAreaView,
ScrollView,
TouchableOpacity,
FlatList,
TextInput,
Image,
} from 'react-native'
import {
home_background_color,
promary_color,
safe_view,
icon_style,
placehold_text_color,
first_text_color,
font_family_regular,
pxSize,
list_common_item,
} from '../../../base/BaseStyle'
import StatusBarView from '../../common/StatusBarView'
import HeadBackItem from '../../common/HeadBackItem'
import { isBlank, isNotBlank, changeDateFormat } from '../../../utils/Utils'
import debounce from 'lodash.debounce'
import * as R from 'ramda'
export default class CollectOrder extends Component {
state = {
orders: [],
}
constructor(props) {
super(props)
this.renderItem = this.renderItem.bind(this)
this.selectHandler = this.selectHandler.bind(this)
this.changeTextHandler = debounce(this.changeTextHandler.bind(this), 300)
}
componentDidMount() {
const { orders } = this.props.navigation.state.params
this.setState({ orders: R.clone(orders) })
}
/**
* @description: 选择操作
* @param {*} item
* @return {*}
*/
selectHandler(item) {
const { navigation } = this.props
const { selectCallback } = navigation.state.params
selectCallback && selectCallback(item)
navigation.goBack()
}
/**
* @description: 搜索
* @param {*} text
* @return {*}
*/
changeTextHandler(text) {
const { orders } = this.props.navigation.state.params
let ords = R.clone(orders)
if (isBlank(text)) {
return this.setState({ orders: ords })
}
const match = R.test(new RegExp(text, 'g'))
const keys = ['collect_number', 'seller_name', 'doctor_name', 'surgery_desc', 'remark']
ords = R.filter(R.anyPass(R.map(k => R.compose(match, R.prop(k)), keys)))(ords)
this.setState({ orders: ords })
}
/**
* @description: 渲染单个
* @param {*} item
* @param {*} index
* @return {*}
*/
renderItem({ item, index }) {
return (
<TouchableOpacity style={styles.item} activeOpacity={0.8} onPress={() => this.selectHandler(item)}>
<Text style={styles.item_text}>借货单号: {item.collect_number}</Text>
<Text style={styles.item_text}> : {item.seller_name || '无'}</Text>
<Text style={styles.item_text}>主治医生: {item.doctor_name || '无'}</Text>
<Text style={styles.item_text}>
手术日期: {(item.surgery_date && changeDateFormat(item.surgery_date, 'yyyy-MM-dd')) || '无'}
</Text>
<Text style={styles.item_text}>手术说明: {item.surgery_desc || '无'}</Text>
{!!item.remark && (
<Text style={styles.item_text} numberOfLines={3}>
{item.remark}
</Text>
)}
</TouchableOpacity>
)
}
render() {
const { navigation } = this.props
const { title } = navigation.state.params
const { orders } = this.state
return (
<View style={styles.container}>
<StatusBarView isReactStackNavigator={true} backgroundColor={promary_color} barStyle="light-content" />
<View style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={styles.search_bar}>
<Image source={require('../../../images/search_icon.png')} style={styles.search_icon} />
<TextInput
style={styles.search_input}
placeholder="搜索单号、业务员、主治、备注"
onChangeText={ev => {
this.changeTextHandler(ev)
}}
></TextInput>
</View>
<FlatList
style={styles.list}
data={orders}
renderItem={this.renderItem}
keyExtractor={item => item.collect_number}
/>
</View>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: home_background_color,
},
list: {
flex: 1,
padding: 16,
marginBottom: 16,
},
item: {
marginBottom: 16,
padding: 15,
backgroundColor: '#fff',
},
item_text: {
fontSize: 16,
fontFamily: font_family_regular,
},
search_bar: {
height: 48,
flexDirection: 'row',
alignItems: 'center',
backgroundColor: promary_color,
paddingLeft: 20,
paddingRight: 20,
},
search_icon: {
position: 'absolute',
left: 30,
zIndex: 9,
width: 20,
height: 20,
},
search_input: {
height: 32,
backgroundColor: '#FFFFFF',
flex: 1,
paddingLeft: 30,
paddingTop: 0,
paddingBottom: 0,
borderRadius: 20,
color: '#666',
},
})
......@@ -132,9 +132,24 @@ class EquipConsuPage extends Component {
{
"id": "8",
title: '手术时间',
name: moment(new Date()).format("YYYY-MM-DD HH:mm"),
value: moment(new Date()).format("YYYY-MM-DD HH:mm"),
dateValue: new Date(),
name: (() => {
let date = moment(new Date()).add(1, 'd')
date.set('hour', 10)
date.set('minute', 0)
return date.format('YYYY-MM-DD HH:mm')
})(),
value: (() => {
let date = moment(new Date()).add(1, 'd')
date.set('hour', 10)
date.set('minute', 0)
return date.format('YYYY-MM-DD HH:mm')
})(),
dateValue: (() => {
let date = moment(new Date()).add(1, 'd')
date.set('hour', 10)
date.set('minute', 0)
return date
})(),
showDatePicker: true
},
{
......@@ -1797,6 +1812,7 @@ class EquipConsuPage extends Component {
closeModal={(show) => this.closeDateModal(show)}
show={dateModelPop}
callback={(date) => this.dateModalCallback(date, listOptionData[8])}
minuteInterval={60}
/>
{ this.renderPickerModel() }
</View>
......
......@@ -71,10 +71,25 @@ class SelfOrderPage extends Component {
},
{
"id": "6",
title: '需求时间',
name: moment(new Date()).format("YYYY-MM-DD HH:mm"),
value: moment(new Date()).format("YYYY-MM-DD HH:mm"),
dateValue: new Date(),
title: '手术时间',
name: (() => {
let date = moment(new Date()).add(1, 'd')
date.set('hour', 10)
date.set('minute', 0)
return date.format('YYYY-MM-DD HH:mm')
})(),
value: (() => {
let date = moment(new Date()).add(1, 'd')
date.set('hour', 10)
date.set('minute', 0)
return date.format('YYYY-MM-DD HH:mm')
})(),
dateValue: (() => {
let date = moment(new Date()).add(1, 'd')
date.set('hour', 10)
date.set('minute', 0)
return date
})(),
showDatePicker: true
},
{
......@@ -1998,6 +2013,7 @@ class SelfOrderPage extends Component {
closeModal={(show) => this.closeDateModal(show)}
show={dateModelPop}
callback={(date) => this.dateModalCallback(date, listOptionData[6])}
minuteInterval={60}
/>
{ this.renderPickerModel()}
{/* { this.renderTipModelPackage()}
......
......@@ -127,7 +127,7 @@ class ChooseProductPage extends Component {
let { data } = pur_sup_search
let { topProcOptionList } = that.state
if (data.length > 0) {
topProcOptionList = cloneObject(data)
topProcOptionList = R.compose(cloneObject, R.filter(isNotBlank))(data)
topProcOptionList.forEach(function (topObj) {
topObj[LocalVariable.SELECTED_QUQNTITY] = 0
topObj['leftOptionList'] = []
......
......@@ -63,9 +63,7 @@ const screenH = Dimensions.get('window').height;
export const isIphoneX = () => {
return (
Platform.OS === 'ios' &&
((screenH === X_HEIGHT && screenW === X_WIDTH) ||
(screenH === X_MAX_HEIGHT && screenW === X_MAX_WIDTH) ||
(screenH === XS_MAX_HEIGHT && screenW === XS_MAX_WIDTH))
screenH >= 728
)
};
......
{
"name": "BoneHouse_Business_APP",
"version": "1.2.6",
"version": "1.2.7",
"private": true,
"scripts": {
"postinstall": "npx jetify",
......@@ -8,7 +8,12 @@
"test": "jest"
},
"dependencies": {
"@ant-design/react-native": "^4.2.0",
"@react-native-community/cameraroll": "^4.0.4",
"@react-native-community/segmented-control": "^2.2.2",
"@react-native-community/slider": "^3.0.3",
"@types/ramda": "^0.27.39",
"lodash.debounce": "^4.0.8",
"moment": "2.29.1",
"ramda": "^0.27.1",
"react": "16.8.3",
......@@ -20,6 +25,7 @@
"react-native-fs": "2.14.1",
"react-native-image-picker": "0.28.0",
"react-native-image-zoom-viewer": "3.0.1",
"react-native-pager-view": "^5.2.1",
"react-native-root-toast": "3.1.1",
"react-native-scrollable-tab-view": "0.9.0",
"react-native-sound": "0.11.0",
......
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