Commit 6da86323 by peii

style: 代码格式化

parent 5f6a58ca
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
Image,
TouchableOpacity,
ScrollView,
} from 'react-native';
import React, { Component } from 'react'
import { View, Text, StyleSheet, Image, TouchableOpacity, ScrollView } from 'react-native'
import {
promary_color,
icon_style,
......@@ -22,28 +15,24 @@ import {
second_text_size,
Height,
pxHeight,
} from '../../base/BaseStyle';
import LodingModel from '../common/LodingModel';
import { connect } from 'react-redux';
import { exitLoginStatus } from '../../action/LoginAction';
} from '../../base/BaseStyle'
import LodingModel from '../common/LodingModel'
import { connect } from 'react-redux'
import { exitLoginStatus } from '../../action/LoginAction'
import {
LOGIN_NO,
HISTOR_ORDER_SEARCH_DOING,
HISTOR_ORDER_SEARCH_SUCCESS,
HISTOR_ORDER_SEARCH_FAILURE
} from '../../base/ActionTypes';
import {
requestGetAllBorrow,
requestGetAllConsume,
requestGetAllTrans,
} from '../../action/HistorAction';
import { show, cloneObject, dedupQuoteArray } from '../../utils/Utils';
import moment from 'moment';
import FilterModel from './module/FilterModel';
HISTOR_ORDER_SEARCH_FAILURE,
} from '../../base/ActionTypes'
import { requestGetAllBorrow, requestGetAllConsume, requestGetAllTrans } from '../../action/HistorAction'
import { show, cloneObject, dedupQuoteArray } from '../../utils/Utils'
import moment from 'moment'
import FilterModel from './module/FilterModel'
class HistoricalOrderPage extends Component {
constructor(props) {
super(props);
super(props)
this.state = {
searchValue: '',
isSubLoding: false, // 加载中弹窗
......@@ -51,16 +40,16 @@ class HistoricalOrderPage extends Component {
topProcOptionList: [
{
title: '借货订单',
selIsAct: false
selIsAct: false,
},
{
title: '消耗订单',
selIsAct: false
selIsAct: false,
},
{
title: '转单订单',
selIsAct: false
}
selIsAct: false,
},
],
topActiveIndex: 0,
contOptionData: [
......@@ -72,25 +61,31 @@ class HistoricalOrderPage extends Component {
// }
],
isShowSelect: false, // 显示/隐藏 筛选内容
borrowStatus: ['待审核','待出库','待还货','其他'],
consumeStatus: ['待确认消耗','已确认消耗'],
borrowStatus: ['待审核', '待出库', '待还货', '其他'],
consumeStatus: ['待确认消耗', '已确认消耗'],
transferStatus: ['已输入', '已审批', '已驳回', '已提交', '已取消'],
searchBorrowStatus: [ // 【借货】对应的状态值
"ENTERED,SUBMITTED",
"APPROVED,COLLECTING_WAITING_CONFIRM",
"COLLECTED,RETURNING_WAITING_CONFIRM",
"RETURNED,CLOSED,REJECTED,CANCELED,CONSUMED,APPROVING,RETURNED_WAITING_CONFIRMED,COLLECTED_WAITING_CONFIRMED,REVOKED,CONFIRM_COLLECT"
searchBorrowStatus: [
// 【借货】对应的状态值
'ENTERED,SUBMITTED',
'APPROVED,COLLECTING_WAITING_CONFIRM',
'COLLECTED,RETURNING_WAITING_CONFIRM',
'RETURNED,CLOSED,REJECTED,CANCELED,CONSUMED,APPROVING,RETURNED_WAITING_CONFIRMED,COLLECTED_WAITING_CONFIRMED,REVOKED,CONFIRM_COLLECT',
],
searchComsumeStatus: [ // 【消耗】对应的状态值
"N",
"Y"
searchComsumeStatus: [
// 【消耗】对应的状态值
'N',
'Y',
],
searchTransStatus: [ // 【转单】对应的状态值
"ENTERED", "APPROVED", "REJECTED", "SUBMITTED", "CANCELED"
searchTransStatus: [
// 【转单】对应的状态值
'ENTERED',
'APPROVED',
'REJECTED',
'SUBMITTED',
'CANCELED',
],
whetherCallClick: false, // 是否调用筛选弹窗的查询
wheShowNoData: false, // 是否展示无数据提示
}
}
......@@ -99,38 +94,41 @@ class HistoricalOrderPage extends Component {
}
componentWillReceiveProps(nextProps) {
let {loginState, navigation, histor_search_status} = this.props;
let { loginState, navigation, histor_search_status } = this.props
let that = this
if(loginState != nextProps.loginState) {
switch(nextProps.loginState) {
if (loginState != nextProps.loginState) {
switch (nextProps.loginState) {
case LOGIN_NO:
navigation.navigate('LoginPage')
break;
break
default:
break;
break
}
}
if(histor_search_status != nextProps.histor_search_status) {
if (histor_search_status != nextProps.histor_search_status) {
switch (nextProps.histor_search_status) {
case HISTOR_ORDER_SEARCH_DOING:
that.changeSubLoding(true, '查询中')
break;
break
case HISTOR_ORDER_SEARCH_SUCCESS:
// 解决 IOS 加载弹窗消失慢
setTimeout(() => {
that.setState({
isSubLoding: false
},() => {
that.changeCurrentOption();
})
that.setState(
{
isSubLoding: false,
},
() => {
that.changeCurrentOption()
},
)
}, 500)
break;
break
case HISTOR_ORDER_SEARCH_FAILURE:
that.changeSubLoding(false)
break;
break
default:
break;
break
}
}
}
......@@ -138,94 +136,98 @@ class HistoricalOrderPage extends Component {
// 修改当前显示的查询数据
changeCurrentOption() {
let {
contOptionData, topActiveIndex,
borrowStatus, consumeStatus,
searchBorrowStatus, searchComsumeStatus,
transferStatus, searchTransStatus
contOptionData,
topActiveIndex,
borrowStatus,
consumeStatus,
searchBorrowStatus,
searchComsumeStatus,
transferStatus,
searchTransStatus,
} = this.state
let {historOrderOption} = this.props
if(!historOrderOption.length) {
let { historOrderOption } = this.props
if (!historOrderOption.length) {
show('当前查询数据为空')
this.setState({
wheShowNoData: true
wheShowNoData: true,
})
return
}
contOptionData = cloneObject(historOrderOption)
switch(topActiveIndex) {
switch (topActiveIndex) {
case 0:
contOptionData = contOptionData.map((supItem, ind) => {
supItem.id = ind+''
supItem.id = ind + ''
supItem.local_his_number = supItem.collect_number
if(!supItem.surgery_name) {
if (!supItem.surgery_name) {
supItem.local_his_name = '无'
} else {
supItem.local_his_name = supItem.surgery_name
}
if(!supItem.surgery_date) {
if (!supItem.surgery_date) {
supItem.local_his_time = '无'
} else {
supItem.local_his_time = moment(supItem.surgery_date).format('YYYY/MM/DD HH:mm')
}
for(let i in searchBorrowStatus) {
if(searchBorrowStatus[i].includes(supItem.header_status)) {
for (let i in searchBorrowStatus) {
if (searchBorrowStatus[i].includes(supItem.header_status)) {
supItem.local_his_status = borrowStatus[i]
break;
break
}
}
return supItem
})
break;
break
case 1:
contOptionData = contOptionData.map((supItem, ind) => {
supItem.id = ind+''
supItem.id = ind + ''
supItem.local_his_number = supItem.consume_order_number
if(supItem.settled_flag == 'Y') {
if (supItem.settled_flag == 'Y') {
supItem.local_his_name = '是'
} else {
supItem.local_his_name = '否'
}
if(!supItem.consume_date) {
if (!supItem.consume_date) {
supItem.local_his_time = '无'
} else {
supItem.local_his_time = moment(supItem.consume_date).format('YYYY/MM/DD HH:mm')
}
if(supItem.error_code == 0) {
if (supItem.error_code == 0) {
supItem.local_his_status = consumeStatus[1]
} else {
supItem.local_his_status = consumeStatus[0]
}
return supItem
})
break;
break
case 2:
contOptionData = contOptionData.map((supItem, ind) => {
supItem.id = ind+''
supItem.id = ind + ''
supItem.local_his_number = supItem.order_number
if(!supItem.destination_surgery_collect_number) {
if (!supItem.destination_surgery_collect_number) {
supItem.local_his_name = '无'
} else {
supItem.local_his_name = supItem.destination_surgery_collect_number
}
if(!supItem.destination_surgery_date) {
if (!supItem.destination_surgery_date) {
supItem.local_his_time = '无'
} else {
supItem.local_his_time = moment(supItem.destination_surgery_date).format('YYYY/MM/DD HH:mm')
}
for(let i in searchTransStatus) {
if(searchTransStatus[i].includes(supItem.header_status)) {
for (let i in searchTransStatus) {
if (searchTransStatus[i].includes(supItem.header_status)) {
supItem.local_his_status = transferStatus[i]
break;
break
}
}
return supItem
})
break;
break
default:
break;
break
}
this.setState({
contOptionData
contOptionData,
})
}
......@@ -233,84 +235,87 @@ class HistoricalOrderPage extends Component {
changeSubLoding(loading, loadTit) {
this.setState({
isSubLoding: loading || false,
lodingTitle: loadTit || ''
lodingTitle: loadTit || '',
})
}
// 筛选回调 - 确定
handleSureSubmit(params) {
let {topActiveIndex} = this.state
let {props} = this
let { topActiveIndex } = this.state
let { props } = this
// 初始化调用子组件查询
this.setState({
whetherCallClick: false, // 初始化
contOptionData: [], // 清空查询数据
wheShowNoData: false // 默认不展示
wheShowNoData: false, // 默认不展示
})
switch(topActiveIndex) {
switch (topActiveIndex) {
case 0:
props.requestGetAllBorrow(params)
break;
break
case 1:
props.requestGetAllConsume(params)
break;
break
case 2:
props.requestGetAllTrans(params)
break;
break
default:
break;
break
}
}
// 点击顶部菜单
handleTopNav(index) {
let that = this
let {isShowSelect} = that.state
that.setState({
topActiveIndex: index
}, () => {
let { isShowSelect } = that.state
that.setState(
{
topActiveIndex: index,
},
() => {
// 如果打开打开筛选弹窗,先关闭
if(isShowSelect) {
if (isShowSelect) {
this.setState({
isShowSelect: false
isShowSelect: false,
})
}
// 切换标签,调用子组件查询
that.setState({
whetherCallClick: true
})
whetherCallClick: true,
})
},
)
}
// 点击筛选
handleSelectClick() {
let {isShowSelect} = this.state
let { isShowSelect } = this.state
this.setState({
isShowSelect: !isShowSelect
isShowSelect: !isShowSelect,
})
}
// 关闭筛选弹窗 回调
handleCloseFilterModal(show) {
this.setState({
isShowSelect: show
isShowSelect: show,
})
}
// 跳转到行页面
openLinePage(item) {
let {topActiveIndex} = this.state
let {navigation} = this.props
let { topActiveIndex } = this.state
let { navigation } = this.props
let originalItem = item
if(originalItem.order_number && originalItem.order_number.includes('(')) {
if (originalItem.order_number && originalItem.order_number.includes('(')) {
originalItem.order_number = originalItem.order_number.split('(')[0]
}
if(navigation.navigate) {
navigation.navigate('LineOrderPage',{
if (navigation.navigate) {
navigation.navigate('LineOrderPage', {
title: item.local_his_number,
supIndex: topActiveIndex,
data: originalItem
data: originalItem,
})
}
}
......@@ -318,62 +323,47 @@ class HistoricalOrderPage extends Component {
// 修改顶部筛选
handleChangeTopList(data) {
this.setState({
topProcOptionList: data
topProcOptionList: data,
})
}
// 返回中间主要内容
renderContItem() {
let {
whetherCallClick,
topProcOptionList,
topActiveIndex,
contOptionData,
isShowSelect,
wheShowNoData
} = this.state
return(
let { whetherCallClick, topProcOptionList, topActiveIndex, contOptionData, isShowSelect, wheShowNoData } =
this.state
return (
<View style={styles.cont_item_box}>
<View style={styles.top_box}>
<View style={styles.top_tab_cont}>
{
topProcOptionList.map((item, index) =>
{topProcOptionList.map((item, index) => (
<TouchableOpacity
activeOpacity={1}
style={styles.top_touch_cont}
onPress={() => this.handleTopNav(index)}
key={index}
>
<View style={[
styles.top_inner,
index == topActiveIndex ? styles.top_inner_act : ''
]}>
<Text style={[styles.top_tit, index == topActiveIndex ? styles.top_tit_act : '']}>
{item.title}
</Text>
<View style={[styles.top_inner, index == topActiveIndex ? styles.top_inner_act : '']}>
<Text style={[styles.top_tit, index == topActiveIndex ? styles.top_tit_act : '']}>{item.title}</Text>
</View>
</TouchableOpacity>
)
}
))}
</View>
<View style={styles.top_sea_box}>
<TouchableOpacity
activeOpacity={.8}
style={styles.sea_inner}
onPress={() => this.handleSelectClick()}
>
<Text style={[
<TouchableOpacity activeOpacity={0.8} style={styles.sea_inner} onPress={() => this.handleSelectClick()}>
<Text
style={[
styles.sea_tit,
topProcOptionList.length && topProcOptionList[topActiveIndex].selIsAct ? styles.sea_tit_act : ''
]}>
topProcOptionList.length && topProcOptionList[topActiveIndex].selIsAct ? styles.sea_tit_act : '',
]}
>
筛选
</Text>
<View style={styles.sea_icon}>
{
isShowSelect ?
{isShowSelect ? (
<Image source={require('../../images/arr_top.png')} style={icon_style} />
: <Image source={require('../../images/arr_bom.png')} style={icon_style} />
}
) : (
<Image source={require('../../images/arr_bom.png')} style={icon_style} />
)}
</View>
</TouchableOpacity>
{/* 筛选弹窗 */}
......@@ -382,96 +372,70 @@ class HistoricalOrderPage extends Component {
navigation={this.props.navigation}
topProcOptionList={topProcOptionList}
topActiveIndex={topActiveIndex}
closeModal={(show) => this.handleCloseFilterModal(show)}
closeModal={show => this.handleCloseFilterModal(show)}
callSupLoading={(loading, loadTit) => this.changeSubLoding(loading, loadTit)}
callChangeTopNav={(index) => this.handleTopNav(index)}
callSupSubmit={(params) => this.handleSureSubmit(params)}
callChangeTopNav={index => this.handleTopNav(index)}
callSupSubmit={params => this.handleSureSubmit(params)}
callSupClick={whetherCallClick}
callSupTopList={(data) => this.handleChangeTopList(data) }
callSupTopList={data => this.handleChangeTopList(data)}
/>
</View>
</View>
{/* 底部筛选数据 */}
<View style={styles.cont_main}>
<ScrollView
style={styles.cont_scroll}
>
<ScrollView style={styles.cont_scroll}>
{/* 查询为空数据时 */}
{
wheShowNoData ?
{wheShowNoData ? (
<View style={styles.cont_list_item}>
<TouchableOpacity
activeOpacity={1}
style={styles.cont_no_list_box}
>
<TouchableOpacity activeOpacity={1} style={styles.cont_no_list_box}>
<Text style={styles.cont_no_data}>依当前条件未查询到数据</Text>
</TouchableOpacity>
</View>
: null
}
) : null}
{/* 底部每一列数据 */}
{
contOptionData.map((item, index) =>
this.renderSubListItem(item, index)
)
}
{contOptionData.map((item, index) => this.renderSubListItem(item, index))}
</ScrollView>
</View>
</View>
)
}
// 返回每一列数据
renderSubListItem(item, index) {
let {topActiveIndex} = this.state
let { topActiveIndex } = this.state
let tempTit = ''
let tempNum = ''
if(topActiveIndex == 0) {
if (topActiveIndex == 0) {
tempTit = '手术名称:'
tempNum = item.local_his_number
} else if(topActiveIndex == 1) {
} else if (topActiveIndex == 1) {
tempTit = '结单标识:'
tempNum = item.surgery_collect_number // 还是显示借货单号,但是接口还是传递消耗单号
}else if(topActiveIndex == 2) {
} else if (topActiveIndex == 2) {
tempTit = '目标借货订单号:'
tempNum = item.local_his_number
}
return (
<View style={styles.cont_list_item} key={index}>
<TouchableOpacity
activeOpacity={.7}
style={styles.cont_list_box}
onPress={() => this.openLinePage(item)}
>
<TouchableOpacity activeOpacity={0.7} style={styles.cont_list_box} onPress={() => this.openLinePage(item)}>
<View style={styles.cont_lef}>
<Text style={styles.cont_lef_tit}>
{tempNum}
</Text>
<Text style={styles.cont_lef_tit}>{tempNum}</Text>
<Text style={styles.cont_tip}>
{tempTit}{item.local_his_name}
{tempTit}
{item.local_his_name}
</Text>
<Text style={styles.cont_tip}>
{item.local_his_time}
</Text>
{
topActiveIndex == 2 ?
<Text style={styles.cont_tip}>
来源借货订单号:{item.source_surgery_order_number}
</Text> : null
}
{
topActiveIndex == 2 ?
<Text style={styles.cont_tip}>{item.local_his_time}</Text>
{topActiveIndex == 2 ? (
<Text style={styles.cont_tip}>来源借货订单号:{item.source_surgery_order_number}</Text>
) : null}
{topActiveIndex == 2 ? (
<Text style={styles.cont_tip}>
{item.source_surgery_date ? moment(item.source_surgery_date).format('YYYY/MM/DD HH:mm') : '无'}
</Text> : null
}
<Text style={styles.cont_tip}>
备注:{item.remark || '——'}
</Text>
) : null}
<Text style={styles.cont_tip}>备注:{item.remark || '——'}</Text>
</View>
<View style={styles.cont_rig}>
<Text
......@@ -479,8 +443,9 @@ class HistoricalOrderPage extends Component {
styles.cont_rig_status,
['待审核', '已提交', '待确认消耗'].includes(item.local_his_status) && styles.status_audit,
['待还货', '已输入', '已驳回', '已确认消耗'].includes(item.local_his_status) && styles.status_return,
['其他', '已取消'].includes(item.local_his_status) && styles.status_other
]}>
['其他', '已取消'].includes(item.local_his_status) && styles.status_other,
]}
>
{item.local_his_status}
</Text>
</View>
......@@ -492,18 +457,16 @@ class HistoricalOrderPage extends Component {
// 返回正在加载中
renderLodingItem() {
let { lodingTitle, isSubLoding } = this.state
return(
<LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
)
return <LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
}
render() {
return (
<View style={styles.hist_main}>
{ this.renderContItem() }
{this.renderContItem()}
{this.renderLodingItem()}
</View>
);
)
}
}
......@@ -512,29 +475,28 @@ const styles = StyleSheet.create({
flex: 1,
backgroundColor: home_background_color,
padding: 0,
margin: 0
margin: 0,
},
hist_main: {
flex: 1
flex: 1,
},
loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)'
},
cont_item_box: {
backgroundColor: 'rgba(0, 0, 0, 0)',
},
cont_item_box: {},
top_box: {},
top_tab_cont: {
flexDirection: 'row',
backgroundColor: foundation_color,
justifyContent: 'space-between'
justifyContent: 'space-between',
},
top_scroll_cont: {
paddingBottom: 4,
borderBottomColor: '#DEDBDB',
borderBottomWidth: 1
borderBottomWidth: 1,
},
top_touch_cont: {
width: '33.33333%' // 三个
width: '33.33333%', // 三个
// width: '50%'
},
top_inner: {
......@@ -547,17 +509,17 @@ const styles = StyleSheet.create({
},
top_inner_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color
borderBottomColor: promary_color,
},
top_tit: {
paddingTop: 16,
paddingBottom: 12,
color: second_text_color,
fontSize: 14
fontSize: 14,
},
top_tit_act: {
color: first_text_color,
fontWeight: 'bold'
fontWeight: 'bold',
},
top_sea_box: {
paddingVertical: 14,
......@@ -573,22 +535,22 @@ const styles = StyleSheet.create({
sea_tit: {
fontSize: 14,
color: second_text_color,
fontFamily: font_family_regular
fontFamily: font_family_regular,
},
sea_tit_act: {
color: '#007EFF'
color: '#007EFF',
},
sea_icon: {
width: pxSize(8),
height: pxSize(8),
marginLeft: 4
marginLeft: 4,
},
cont_main: {
backgroundColor: foundation_color,
maxHeight: Height() - 240,
minHeight: Height() - 358,
paddingBottom: pxHeight(60)
paddingBottom: pxHeight(60),
},
cont_scroll: {},
cont_box: {},
......@@ -596,84 +558,84 @@ const styles = StyleSheet.create({
cont_list_item: {
marginTop: 14,
marginHorizontal: 20,
borderBottomWidth: .5,
borderBottomWidth: 0.5,
borderBottomColor: '#EEEEEE',
paddingBottom: 16
paddingBottom: 16,
},
cont_list_box: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
alignItems: 'center',
},
cont_lef: {
maxWidth: '80%'
maxWidth: '80%',
},
cont_lef_tit: {
color: promary_text_color,
fontSize: 18,
fontFamily: font_family_medium
fontFamily: font_family_medium,
},
cont_tip: {
fontSize: 12,
color: third_text_color,
fontFamily: font_family_regular,
lineHeight: 20
lineHeight: 20,
},
cont_rig: {
justifyContent: 'flex-end'
justifyContent: 'flex-end',
},
cont_rig_status: {
fontSize: second_text_size,
fontFamily: font_family_medium,
color: '#01B2B9'
color: '#01B2B9',
},
status_audit: {
color: '#FF0000'
color: '#FF0000',
},
status_return: {
color: '#007EFF'
color: '#007EFF',
},
status_other: {
color: '#F4B61B'
color: '#F4B61B',
},
cont_no_list_box: {
flex: 1
flex: 1,
},
cont_no_data: {
color: third_text_color,
fontSize: 16,
fontFamily: font_family_medium,
lineHeight: 42,
textAlign: 'center'
textAlign: 'center',
},
})
const mapStateToProps = (state) => {
const mapStateToProps = state => {
return {
userInfo: state.login.userInfo,
token: state.login.token,
loginState: state.login.loginState,
global_domain_config: state.login.global_domain_config,
histor_search_status: state.histor.histor_search_status,
historOrderOption: state.histor.historOrderOption
historOrderOption: state.histor.historOrderOption,
}
}
const mapDispatchToProps = (dispatch) => {
const mapDispatchToProps = dispatch => {
return {
exitLoginStatus: () => {
dispatch(exitLoginStatus())
},
requestGetAllBorrow: (params) => {
requestGetAllBorrow: params => {
dispatch(requestGetAllBorrow(params))
},
requestGetAllConsume: (params) => {
requestGetAllConsume: params => {
dispatch(requestGetAllConsume(params))
},
requestGetAllTrans: (params) => {
requestGetAllTrans: params => {
dispatch(requestGetAllTrans(params))
}
},
}
}
export default connect(mapStateToProps, mapDispatchToProps)(HistoricalOrderPage);
export default connect(mapStateToProps, mapDispatchToProps)(HistoricalOrderPage)
This diff could not be displayed because it is too large.
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
Image,
TouchableOpacity,
ScrollView,
SafeAreaView
} from 'react-native';
import * as R from 'ramda';
import ImageView from 'react-native-image-preview';
import React, { Component } from 'react'
import { View, Text, StyleSheet, Image, TouchableOpacity, ScrollView, SafeAreaView } from 'react-native'
import * as R from 'ramda'
import ImageView from 'react-native-image-preview'
import {
promary_color,
safe_view,
......@@ -23,30 +15,28 @@ import {
home_background_color,
first_text_color,
foundation_color,
pxSize
} from '../../../base/BaseStyle';
import StatusBarView from '../../common/StatusBarView';
import HeadBackItem from '../../common/HeadBackItem';
import { CellTextStyle } from '../../common/CellTextStyle';
import LodingModel from '../../common/LodingModel';
pxSize,
} from '../../../base/BaseStyle'
import StatusBarView from '../../common/StatusBarView'
import HeadBackItem from '../../common/HeadBackItem'
import { CellTextStyle } from '../../common/CellTextStyle'
import LodingModel from '../../common/LodingModel'
import {
requestGetLineFormBorrow,
requestGetLineFormConsume,
requestGetLineFormTrans,
requestCollectImage,
} from '../../../action/HistorAction';
import { connect } from 'react-redux';
import { isNotBlank, show } from '../../../utils/Utils';
import {
exitLoginStatus
} from '../../../action/LoginAction';
import { LOGIN_NO } from '../../../base/ActionTypes';
import moment from 'moment';
import ShowModel from '../../common/ShowModel';
} from '../../../action/HistorAction'
import { connect } from 'react-redux'
import { isNotBlank, show } from '../../../utils/Utils'
import { exitLoginStatus } from '../../../action/LoginAction'
import { LOGIN_NO } from '../../../base/ActionTypes'
import moment from 'moment'
import ShowModel from '../../common/ShowModel'
class LineOrderPage extends Component {
constructor(props) {
super(props);
super(props)
this.state = {
isSubLoding: false, // 加载中弹窗
lodingTitle: '加载中',
......@@ -59,7 +49,7 @@ class LineOrderPage extends Component {
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774'
// }
]
],
},
orderSupOptions: {}, // 获取主表数据
toolShowPopup: false, // 弹窗显示
......@@ -96,19 +86,20 @@ class LineOrderPage extends Component {
{
prop: 'create_time',
name: '下单日期',
format: data => data && moment(data).format('YYYY/MM/DD HH:mm')
format: data => data && moment(data).format('YYYY/MM/DD HH:mm'),
},
{
prop: 'allPlanQuanSum',
name: '下单数量',
obj: 'consumaData'
obj: 'consumaData',
},
{
prop: 'surgery_desc',
name: '备注信息',
},
],
[ // 消耗订单
[
// 消耗订单
{
prop: 'surgery_collect_number',
name: '借货订单',
......@@ -125,9 +116,9 @@ class LineOrderPage extends Component {
prop: 'seller_name',
name: '业 务 员',
suffix: () => {
const {local_his_time} = this.state.orderSupOptions
const { local_his_time } = this.state.orderSupOptions
return !!local_his_time && `(${moment(local_his_time).format('YYYY/MM/DD HH:mm')})`
}
},
},
{
prop: 'customer_name',
......@@ -165,22 +156,24 @@ class LineOrderPage extends Component {
prop: 'surgery_desc',
name: '备注信息',
},
], [{
],
[
{
prop: 'local_his_name',
name: '目标借货订单号',
suffix: () => {
const {orderSupOptions} = this.state
const { orderSupOptions } = this.state
return `(${orderSupOptions.local_his_time})`
}
},
},
{
prop: 'source_surgery_order_number',
name: '来源借货订单号',
ifShow: () => !!this.state.orderSupOptions.source_surgery_order_number,
suffix: () => {
const {source_surgery_date} = this.state.orderSupOptions
const { source_surgery_date } = this.state.orderSupOptions
return !!source_surgery_date && `(${moment(source_surgery_date).format('YYYY/MM/DD HH:mm')})`
}
},
},
{
prop: 'doctor_name',
......@@ -202,35 +195,36 @@ class LineOrderPage extends Component {
prop: 'surgery_desc',
name: '备注信息',
},
]
]
],
],
}
}
componentDidMount() {
let {supIndex, data} = this.props.navigation.state.params
let { supIndex, data } = this.props.navigation.state.params
let { collectPhotos } = this.state
if (supIndex == 0 && isNotBlank(data.image_url)) {
const images = R.compose(R.map(url => ({
uri: this.props.global_domain_config + '/' + url
const images = R.compose(
R.map(url => ({
uri: this.props.global_domain_config + '/' + url,
})),
R.split(',')
R.split(','),
)(data.image_url)
collectPhotos = images
this.setState({ collectPhotos });
this.setState({ collectPhotos })
}
this.getLineOptionData()
}
componentWillReceiveProps(nextProps) {
let {loginState, navigation} = this.props
if(loginState != nextProps.loginState) {
switch(nextProps.loginState) {
let { loginState, navigation } = this.props
if (loginState != nextProps.loginState) {
switch (nextProps.loginState) {
case LOGIN_NO:
navigation.navigate('LoginPage')
break;
break
default:
break;
break
}
}
}
......@@ -239,96 +233,98 @@ class LineOrderPage extends Component {
changeSubLoding(loading, loadTit) {
this.setState({
isSubLoding: loading || false,
lodingTitle: loadTit || '加载中'
lodingTitle: loadTit || '加载中',
})
}
// 获取行订单数据
getLineOptionData() {
let {supIndex, data} = this.props.navigation.state.params
let { supIndex, data } = this.props.navigation.state.params
this.setState({
orderSupOptions: data
orderSupOptions: data,
})
switch(supIndex) {
switch (supIndex) {
case 0:
// 借货
this.getReqBorrowLineData(data)
this.getCollectPhoto(data)
break;
break
case 1:
// 消耗
this.getReqConsumeLineData(data)
break;
break
case 2:
// 转单
this.getReqTransLineData(data)
break;
break
default:
break;
break
}
}
// 获取借货订单行数据
async getReqBorrowLineData(supData) {
let that = this
let {consumaData} = that.state
let {props} = this
let { consumaData } = that.state
let { props } = this
that.changeSubLoding(true)
let params = {
access_token: props.token,
surgery_collect_number: supData.local_his_number
surgery_collect_number: supData.local_his_number,
}
let bowResult = await requestGetLineFormBorrow(props.global_domain_config, params)
console.log('获取借货订单行数据 res=====', bowResult)
if(bowResult.error_code == 0) {
if (bowResult.error_code == 0) {
that.changeSubLoding(false)
// 成功
let {surgery_collect_lines} = bowResult.data
let { surgery_collect_lines } = bowResult.data
let tempSum = 0
surgery_collect_lines.length && surgery_collect_lines.forEach(item => {
if(item.plan_quantity) {
surgery_collect_lines.length &&
surgery_collect_lines.forEach(item => {
if (item.plan_quantity) {
tempSum += Number(item.plan_quantity)
}
})
consumaData.subOption = [...surgery_collect_lines]
consumaData.allPlanQuanSum = tempSum
that.setState({
consumaData
consumaData,
})
} else if(bowResult.error_code == 41006) {
} else if (bowResult.error_code == 41006) {
that.changeSubLoding(false)
show('登录过期,请重新登录');
props.exitLoginStatus();
show('登录过期,请重新登录')
props.exitLoginStatus()
} else {
that.changeSubLoding(false)
let error_msg = bowResult.error_msg || bowResult.message
show(error_msg);
show(error_msg)
}
}
// 获取消耗订单行数据
async getReqConsumeLineData(supData) {
let that = this
let {consumaData} = that.state
let {props} = this
let { consumaData } = that.state
let { props } = this
that.changeSubLoding(true)
let params = {
access_token: props.token,
consume_order_number: supData.local_his_number
consume_order_number: supData.local_his_number,
}
let conResult = await requestGetLineFormConsume(props.global_domain_config, params)
console.log('获取消耗订单行数据 res=====', conResult)
if(conResult.error_code == 0) {
if (conResult.error_code == 0) {
that.changeSubLoding(false)
// 成功
let {sur_consume_lines} = conResult.data
let { sur_consume_lines } = conResult.data
let tempSum = 0
let tempConQuanSum = 0
sur_consume_lines.length && sur_consume_lines.forEach(item => {
if(item.sale_price) {
sur_consume_lines.length &&
sur_consume_lines.forEach(item => {
if (item.sale_price) {
tempSum += Number(item.sale_price)
}
if(item.consumed_quantity) {
if (item.consumed_quantity) {
tempConQuanSum += Number(item.consumed_quantity)
}
})
......@@ -336,44 +332,45 @@ class LineOrderPage extends Component {
consumaData.allOptSum = tempSum
consumaData.allConmQuanSum = tempConQuanSum
that.setState({
consumaData
consumaData,
})
} else if(conResult.error_code == 41006) {
} else if (conResult.error_code == 41006) {
that.changeSubLoding(false)
show('登录过期,请重新登录');
props.exitLoginStatus();
show('登录过期,请重新登录')
props.exitLoginStatus()
} else {
that.changeSubLoding(false)
let error_msg = conResult.error_msg || conResult.message
show(error_msg);
show(error_msg)
}
}
// 获取转单订单行数据
async getReqTransLineData(supData) {
let that = this
let {consumaData} = that.state
let {props} = this
let { consumaData } = that.state
let { props } = this
that.changeSubLoding(true)
let params = {
access_token: props.token,
order_number: supData.order_number,
destination_surgery_collect_number: supData.destination_surgery_collect_number,
source_surgery_order_number: supData.source_surgery_order_number
source_surgery_order_number: supData.source_surgery_order_number,
}
let conResult = await requestGetLineFormTrans(props.global_domain_config, params)
console.log('获取转单订单行数据 res=====', conResult)
if(conResult.error_code == 0) {
if (conResult.error_code == 0) {
that.changeSubLoding(false)
// 成功
let {sur_order_transfer_lines} = conResult.data
let { sur_order_transfer_lines } = conResult.data
let tempSum = 0
let tempConQuanSum = 0
sur_order_transfer_lines.length && sur_order_transfer_lines.forEach(item => {
if(item.sale_price) {
sur_order_transfer_lines.length &&
sur_order_transfer_lines.forEach(item => {
if (item.sale_price) {
tempSum += Number(item.sale_price)
}
if(item.consumed_quantity) {
if (item.consumed_quantity) {
tempConQuanSum += Number(item.consumed_quantity)
}
})
......@@ -381,16 +378,16 @@ class LineOrderPage extends Component {
consumaData.allOptSum = tempSum
consumaData.allConmQuanSum = tempConQuanSum
that.setState({
consumaData
consumaData,
})
} else if(conResult.error_code == 41006) {
} else if (conResult.error_code == 41006) {
that.changeSubLoding(false)
show('登录过期,请重新登录');
props.exitLoginStatus();
show('登录过期,请重新登录')
props.exitLoginStatus()
} else {
that.changeSubLoding(false)
let error_msg = conResult.error_msg || conResult.message
show(error_msg);
show(error_msg)
}
}
......@@ -402,26 +399,29 @@ class LineOrderPage extends Component {
const res = await requestCollectImage(this.props.global_domain_config, params)
if (res.code !== 0) return
const photos = R.compose(R.map(url => {
return {uri: this.props.global_domain_config + '/' + url}
}), R.pathOr([], ['data', 'photo_url']))(res)
const photos = R.compose(
R.map(url => {
return { uri: this.props.global_domain_config + '/' + url }
}),
R.pathOr([], ['data', 'photo_url']),
)(res)
const { collectPhotos } = this.state
this.setState({collectPhotos: R.concat(collectPhotos, photos)});
this.setState({ collectPhotos: R.concat(collectPhotos, photos) })
}
// 耗材明细 隐藏/显示子项
handleDetailBtmCheck(flagType) {
let {consumaData} = this.state
let { consumaData } = this.state
consumaData.isShowSub = flagType
this.setState({
consumaData
consumaData,
})
}
// 关闭当前弹窗
handleCloseModal(show) {
this.setState({
toolShowPopup: show
toolShowPopup: show,
})
}
......@@ -429,12 +429,12 @@ class LineOrderPage extends Component {
handleIsShowDialog(item) {
this.setState({
toolShowPopup: !this.state.toolShowPopup,
popFormItem: item
popFormItem: item,
})
}
previewImage(imgItem) {
this.setState({previewVisible: true, imageIndex: imgItem});
this.setState({ previewVisible: true, imageIndex: imgItem })
}
// 返回耗材内容
......@@ -443,46 +443,44 @@ class LineOrderPage extends Component {
return (
<CellTextStyle style={list_common_item.consu_detail}>
<View style={list_common_item.detail_inner}>
{
state.consumaData.subOption.length ?
{state.consumaData.subOption.length ? (
<View style={list_common_item.detail_sub_cont}>
<View style={list_common_item.detail_sub_tit}>
<Text style={list_common_item.detail_tit_text}>
耗材({state.consumaData.subOption.length}
</Text>
<Text style={list_common_item.detail_tit_text}>耗材({state.consumaData.subOption.length}</Text>
{
state.consumaData.isShowSub ?
{state.consumaData.isShowSub ? (
<TouchableOpacity
activeOpacity={.8}
activeOpacity={0.8}
style={list_common_item.detail_icon}
onPress={() => this.handleDetailBtmCheck(false)}
>
<Image style={[icon_style, list_common_item.detail_top_icon]} source={require('../../../images/arr_btm.png')} />
</TouchableOpacity> :
<Image
style={[icon_style, list_common_item.detail_top_icon]}
source={require('../../../images/arr_btm.png')}
/>
</TouchableOpacity>
) : (
<TouchableOpacity
activeOpacity={.8}
activeOpacity={0.8}
style={[list_common_item.detail_icon, list_common_item.detail_icon_rig]}
onPress={() => this.handleDetailBtmCheck(true)}
>
<Image style={[icon_style, list_common_item.detail_top_icon]} source={require('../../../images/arr_rig.png')} />
<Image
style={[icon_style, list_common_item.detail_top_icon]}
source={require('../../../images/arr_rig.png')}
/>
</TouchableOpacity>
}
)}
</View>
{
state.consumaData.isShowSub ?
{state.consumaData.isShowSub ? (
<View style={list_common_item.detail_sub_inner}>
{
state.consumaData.subOption.map((item, index) => {
{state.consumaData.subOption.map((item, index) => {
return this.renderConDeSubItem(item, index)
})
}
</View> : null
}
</View> : null
}
})}
</View>
) : null}
</View>
) : null}
</View>
</CellTextStyle>
)
......@@ -490,110 +488,101 @@ class LineOrderPage extends Component {
// 返回耗材明细子项
renderConDeSubItem(item, index) {
let {supIndex} = this.props.navigation.state.params
return(
let { supIndex } = this.props.navigation.state.params
return (
<TouchableOpacity
activeOpacity={.8}
activeOpacity={0.8}
style={list_common_item.con_de_sub}
key={index}
onPress={() => this.handleIsShowDialog(item)}
>
<Text style={list_common_item.de_sub_tit}>
{index+1}{ item.item_name } - {item.specification}
</Text>
{
(supIndex == 1 && item.sale_price) ? <Text style={list_common_item.de_tip}>
单价(¥){ item.sale_price }
{index + 1}{item.item_name} - {item.specification}
</Text>
: null
}
{supIndex == 1 && item.sale_price ? (
<Text style={list_common_item.de_tip}>单价(¥){item.sale_price}</Text>
) : null}
</TouchableOpacity>
)
}
// 返回主要内容
renderContItem() {
let {orderSupOptions, consumaData, columns, collectPhotos, previewVisible, imageIndex} = this.state
let {supIndex, data: headerData} = this.props.navigation.state.params
let { orderSupOptions, consumaData, columns, collectPhotos, previewVisible, imageIndex } = this.state
let { supIndex, data: headerData } = this.props.navigation.state.params
const subColumns = columns[supIndex]
return (
<ScrollView style={styles.line_cont_scroll}>
<View style={styles.fo_cont_inner}>
<Text style={styles.fo_cont_top_tit}>订单信息</Text>
{
subColumns.map(col => {
{subColumns.map(col => {
const obj = this.state[col.obj] || orderSupOptions
if(!!col.ifShow && !col.ifShow()) return null
if (!!col.ifShow && !col.ifShow()) return null
return (
<View key={col.name} style={styles.fo_cell_box}>
<View style={{minWidth: pxSize(70), }}>
<View style={{ minWidth: pxSize(70) }}>
<Text style={[styles.fo_tip_txt]}>{col.name}:</Text>
</View>
<Text style={styles.fo_tip_txt}>
{
<Text>{col.format ? col.format(obj[col.prop]) : obj[col.prop] || '无'}</Text>
}
{
!!col.suffix && <Text>{col.suffix()}</Text>
}
{<Text>{col.format ? col.format(obj[col.prop]) : obj[col.prop] || '无'}</Text>}
{!!col.suffix && <Text>{col.suffix()}</Text>}
</Text>
</View>
)
})
}
})}
</View>
<View style={styles.line_cont}>
<View style={styles.line_cont_title}>
<Text style={styles.cont_tip_tit}>订单详情</Text>
{
supIndex === 1 &&
{supIndex === 1 && (
<View style={[styles.line_cont_title]}>
<Text style={{marginRight: pxSize(15)}}>数量:{consumaData.allConmQuanSum}</Text>
<Text style={{ marginRight: pxSize(15) }}>数量:{consumaData.allConmQuanSum}</Text>
<Text style>金额:{consumaData.allOptSum}</Text>
</View>
}
)}
</View>
{ this.renderConsumablesItem() }
{this.renderConsumablesItem()}
{ this.renderDetailModel() }
{this.renderDetailModel()}
<View style={styles.line_footer}>
<View style={styles.fo_sta_inner}>
<Text style={[
<Text
style={[
styles.fo_sta_txt,
['待审核', '已提交', '待确认消耗'].includes(orderSupOptions.local_his_status) && styles.status_audit,
['待还货', '已输入', '已驳回', '已确认消耗'].includes(orderSupOptions.local_his_status) && styles.status_return,
['其他', '已取消'].includes(orderSupOptions.local_his_status) && styles.status_other
]}>
['待还货', '已输入', '已驳回', '已确认消耗'].includes(orderSupOptions.local_his_status) &&
styles.status_return,
['其他', '已取消'].includes(orderSupOptions.local_his_status) && styles.status_other,
]}
>
{orderSupOptions.local_his_status}
</Text>
</View>
</View>
{ isNotBlank(collectPhotos) && (
{isNotBlank(collectPhotos) && (
<View style={[styles.line_cont_title_column]}>
<Text style={styles.cont_tip_tit}>出库照片</Text>
<View style={styles.image_box}>
{
collectPhotos && collectPhotos.map(item => {
{collectPhotos &&
collectPhotos.map(item => {
return (
<TouchableOpacity onPress={() => this.previewImage(item)}>
<Image source={item} width={60} height={60} style={styles.image} resizeMode="cover" />
</TouchableOpacity>
)
})
}
})}
</View>
<ImageView
images={collectPhotos}
source={imageIndex}
visible={previewVisible}
close={() => this.setState({previewVisible: false})}
close={() => this.setState({ previewVisible: false })}
/>
</View>
)}
......@@ -605,105 +594,60 @@ class LineOrderPage extends Component {
// 返回正在加载中
renderLodingItem() {
let { lodingTitle, isSubLoding } = this.state
return(
<LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
)
return <LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
}
// 返回弹窗
renderDetailModel() {
let {popFormItem, toolShowPopup} = this.state
let { popFormItem, toolShowPopup } = this.state
const { sysProfiles } = this.props
let {supIndex} = this.props.navigation.state.params
let { supIndex } = this.props.navigation.state.params
const showSalePrice = R.compose(R.equals('Y'), R.prop('SUR_MOBILE_HISTORY_SALE_PRICE_SHOW_FLAG'))(sysProfiles)
return (
<ShowModel
title={ popFormItem.item_name}
show={ toolShowPopup }
closeModal={(show) => this.handleCloseModal(show)}
>
<ShowModel title={popFormItem.item_name} show={toolShowPopup} closeModal={show => this.handleCloseModal(show)}>
<View style={styles.model_cont}>
<View style={styles.model_cont_inner}>
<Text style={styles.mo_cont_title}>详细信息:</Text>
{
popFormItem.item_name ?
<Text style={styles.mo_cont_tip}>
通用名称:{popFormItem.item_name}
</Text> : null
}
{
popFormItem.serial_number ?
<Text style={styles.mo_cont_tip}>
物料序列:{popFormItem.serial_number}
</Text> : null
}
{
popFormItem.item_code ?
<Text style={styles.mo_cont_tip}>
物料代码:{popFormItem.item_code}
</Text> : null
}
{
popFormItem.specification ?
<Text style={styles.mo_cont_tip}>
规格型号:{popFormItem.specification}
</Text> : null
}
{
popFormItem.serial_number ?
<Text style={styles.mo_cont_tip}>
序列号:{popFormItem.serial_number}
</Text> : null
}
{
popFormItem.production_batch_number ?
<Text style={styles.mo_cont_tip}>
生产批号:{popFormItem.production_batch_number}
</Text> : null
}
{
popFormItem.production_serial_number ?
<Text style={styles.mo_cont_tip}>
生产序号:{popFormItem.production_serial_number}
</Text> : null
}
{
popFormItem.production_date ?
{popFormItem.item_name ? <Text style={styles.mo_cont_tip}>通用名称:{popFormItem.item_name}</Text> : null}
{popFormItem.serial_number ? (
<Text style={styles.mo_cont_tip}>物料序列:{popFormItem.serial_number}</Text>
) : null}
{popFormItem.item_code ? <Text style={styles.mo_cont_tip}>物料代码:{popFormItem.item_code}</Text> : null}
{popFormItem.specification ? (
<Text style={styles.mo_cont_tip}>规格型号:{popFormItem.specification}</Text>
) : null}
{popFormItem.serial_number ? (
<Text style={styles.mo_cont_tip}>序列号:{popFormItem.serial_number}</Text>
) : null}
{popFormItem.production_batch_number ? (
<Text style={styles.mo_cont_tip}>生产批号:{popFormItem.production_batch_number}</Text>
) : null}
{popFormItem.production_serial_number ? (
<Text style={styles.mo_cont_tip}>生产序号:{popFormItem.production_serial_number}</Text>
) : null}
{popFormItem.production_date ? (
<Text style={styles.mo_cont_tip}>
生产日期:{moment(popFormItem.production_date).format('YYYY-MM-DD')}
</Text> : null
}
{
popFormItem.expiration_date ?
</Text>
) : null}
{popFormItem.expiration_date ? (
<Text style={styles.mo_cont_tip}>
过期日期:{moment(popFormItem.expiration_date).format('YYYY-MM-DD')}
</Text> : null
}
{
popFormItem.plan_quantity ?
<Text style={styles.mo_cont_tip}>
计划数量:{popFormItem.plan_quantity}
</Text> : null
}
{
popFormItem.storage_quantity ?
<Text style={styles.mo_cont_tip}>
库存数量:{popFormItem.storage_quantity}
</Text> : null
}
{
popFormItem.consumed_quantity ?
<Text style={styles.mo_cont_tip}>
消耗数量:{popFormItem.consumed_quantity}
</Text> : null
}
{
!popFormItem.sale_price || !showSalePrice && supIndex === 0 ? null :
<Text style={styles.mo_cont_tip}>
销售价格:{popFormItem.sale_price}
</Text>
}
) : null}
{popFormItem.plan_quantity ? (
<Text style={styles.mo_cont_tip}>计划数量:{popFormItem.plan_quantity}</Text>
) : null}
{popFormItem.storage_quantity ? (
<Text style={styles.mo_cont_tip}>库存数量:{popFormItem.storage_quantity}</Text>
) : null}
{popFormItem.consumed_quantity ? (
<Text style={styles.mo_cont_tip}>消耗数量:{popFormItem.consumed_quantity}</Text>
) : null}
{!popFormItem.sale_price || (!showSalePrice && supIndex === 0) ? null : (
<Text style={styles.mo_cont_tip}>销售价格:{popFormItem.sale_price}</Text>
)}
</View>
</View>
</ShowModel>
......@@ -711,26 +655,21 @@ class LineOrderPage extends Component {
}
render() {
let {navigation} = this.props
let {title} = navigation.state.params
let { navigation } = this.props
let { title } = navigation.state.params
return (
<View style={styles.line_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<StatusBarView isReactStackNavigator={true} backgroundColor={promary_color} barStyle="light-content" />
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={styles.line_main}>
{ this.renderContItem() }
{this.renderContItem()}
{this.renderLodingItem()}
</View>
</SafeAreaView>
</View>
);
)
}
}
......@@ -739,24 +678,24 @@ const styles = StyleSheet.create({
flex: 1,
backgroundColor: home_background_color,
padding: 0,
margin: 0
margin: 0,
},
line_main: {
flex: 1
flex: 1,
},
loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)'
backgroundColor: 'rgba(0, 0, 0, 0)',
},
line_cont_scroll: {},
line_cont: {
paddingHorizontal: 20,
paddingVertical: 16,
paddingBottom: 20
paddingBottom: 20,
},
line_cont_title: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: "center"
alignItems: 'center',
},
line_cont_title_column: {
flexDirection: 'column',
......@@ -765,7 +704,7 @@ const styles = StyleSheet.create({
cont_tip_tit: {
fontSize: 16,
fontFamily: font_family_regular,
color: first_text_color
color: first_text_color,
},
line_footer: {},
......@@ -774,30 +713,30 @@ const styles = StyleSheet.create({
// borderBottomColor: '#CCCCCC',
// paddingBottom: 18
backgroundColor: foundation_color,
padding: 20
padding: 20,
},
fo_cont_top_tit: {
color: first_text_color,
fontFamily: font_family_medium,
fontSize: second_text_size,
paddingBottom: 8
paddingBottom: 8,
},
fo_tit_box: {
paddingBottom: 12
paddingBottom: 12,
},
fo_txt: {
fontSize: 14,
fontFamily: font_family_regular,
color: second_text_color
color: second_text_color,
},
fo_cell_box: {
flexDirection: 'row'
flexDirection: 'row',
},
fo_tip_txt: {
fontSize: third_text_size,
fontFamily: font_family_regular,
color: second_text_color,
lineHeight: 18
lineHeight: 18,
},
fo_tip_txt_key: {
// minWidth: pxSize(120),
......@@ -806,7 +745,7 @@ const styles = StyleSheet.create({
color: first_text_color,
fontSize: 14,
fontFamily: font_family_medium,
paddingTop: 8
paddingTop: 8,
},
fo_sta_inner: {
......@@ -814,41 +753,41 @@ const styles = StyleSheet.create({
alignItems: 'flex-end',
borderTopWidth: 1,
borderTopColor: '#ECECEC',
paddingTop: 18
paddingTop: 18,
},
fo_sta_txt: {
fontSize: second_text_size,
fontFamily: font_family_medium,
color: '#01B2B9'
color: '#01B2B9',
},
status_audit: {
color: '#FF0000'
color: '#FF0000',
},
status_return: {
color: '#007EFF'
color: '#007EFF',
},
status_other: {
color: '#F4B61B'
color: '#F4B61B',
},
// 弹窗
model_cont: {
// flex: 1
},
model_cont_inner: {
marginBottom: 48
marginBottom: 48,
},
mo_cont_title: {
color: first_text_color,
// fontWeight: 'bold',
fontSize: 14,
lineHeight: 24,
fontFamily: font_family_medium
fontFamily: font_family_medium,
},
mo_cont_tip: {
color: second_text_color,
fontSize: 14,
lineHeight: 24,
fontFamily: font_family_regular
fontFamily: font_family_regular,
},
mo_img_box: {
flex: 1,
......@@ -856,11 +795,11 @@ const styles = StyleSheet.create({
borderColor: '#E1E1E1',
justifyContent: 'center',
alignItems: 'center',
height: pxSize(120)
height: pxSize(120),
},
mo_img: {
width: pxSize(100),
height: '100%'
height: '100%',
},
image_box: {
flexDirection: 'row',
......@@ -870,11 +809,10 @@ const styles = StyleSheet.create({
width: pxSize(60),
height: pxSize(60),
marginRight: pxSize(10),
}
},
})
const mapStateToProps = (state) => {
const mapStateToProps = state => {
return {
token: state.login.token,
loginState: state.login.loginState,
......@@ -883,11 +821,11 @@ const mapStateToProps = (state) => {
}
}
const mapDispatchToProps = (dispatch) => {
const mapDispatchToProps = dispatch => {
return {
exitLoginStatus: () => {
dispatch(exitLoginStatus())
},
}
}
export default connect(mapStateToProps, mapDispatchToProps)(LineOrderPage);
export default connect(mapStateToProps, mapDispatchToProps)(LineOrderPage)
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