Commit 6da86323 by peii

style: 代码格式化

parent 5f6a58ca
import React, { Component } from 'react';
import React, { Component } from 'react'
import { View, Text, StyleSheet, Image, TouchableOpacity, ScrollView } from 'react-native'
import {
View,
Text,
StyleSheet,
Image,
TouchableOpacity,
ScrollView,
} from 'react-native';
promary_color,
icon_style,
foundation_color,
home_background_color,
second_text_color,
first_text_color,
font_family_regular,
pxSize,
promary_text_color,
font_family_medium,
third_text_color,
second_text_size,
Height,
pxHeight,
} from '../../base/BaseStyle'
import LodingModel from '../common/LodingModel'
import { connect } from 'react-redux'
import { exitLoginStatus } from '../../action/LoginAction'
import {
promary_color,
icon_style,
foundation_color,
home_background_color,
second_text_color,
first_text_color,
font_family_regular,
pxSize,
promary_text_color,
font_family_medium,
third_text_color,
second_text_size,
Height,
pxHeight,
} 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';
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'
class HistoricalOrderPage extends Component {
constructor(props) {
super(props);
this.state = {
searchValue: '',
isSubLoding: false, // 加载中弹窗
lodingTitle: '加载中',
topProcOptionList: [
{
title: '借货订单',
selIsAct: false
},
{
title: '消耗订单',
selIsAct: false
},
{
title: '转单订单',
selIsAct: false
}
],
topActiveIndex: 0,
contOptionData: [
// {
// local_his_number: '202005182012033', // 借货订单编号:collect_number 消耗订单编号:consume_order_number
// local_his_name: '髋关节手术', // 手术名称:surgery_name 结单标识:settled_flag (可能为空)
// local_his_time: '2020/05/18 10:25', // 手术时间:surgery_date 消耗时间:consume_date
// local_his_status: '待出库' // 状态:header_status 是否消耗:consumed_flag(返回的error_code:0/空)
// }
],
isShowSelect: false, // 显示/隐藏 筛选内容
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"
],
searchComsumeStatus: [ // 【消耗】对应的状态值
"N",
"Y"
],
searchTransStatus: [ // 【转单】对应的状态值
"ENTERED", "APPROVED", "REJECTED", "SUBMITTED", "CANCELED"
],
whetherCallClick: false, // 是否调用筛选弹窗的查询
wheShowNoData: false, // 是否展示无数据提示
constructor(props) {
super(props)
this.state = {
searchValue: '',
isSubLoding: false, // 加载中弹窗
lodingTitle: '加载中',
topProcOptionList: [
{
title: '借货订单',
selIsAct: false,
},
{
title: '消耗订单',
selIsAct: false,
},
{
title: '转单订单',
selIsAct: false,
},
],
topActiveIndex: 0,
contOptionData: [
// {
// local_his_number: '202005182012033', // 借货订单编号:collect_number 消耗订单编号:consume_order_number
// local_his_name: '髋关节手术', // 手术名称:surgery_name 结单标识:settled_flag (可能为空)
// local_his_time: '2020/05/18 10:25', // 手术时间:surgery_date 消耗时间:consume_date
// local_his_status: '待出库' // 状态:header_status 是否消耗:consumed_flag(返回的error_code:0/空)
// }
],
isShowSelect: false, // 显示/隐藏 筛选内容
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',
],
searchComsumeStatus: [
// 【消耗】对应的状态值
'N',
'Y',
],
searchTransStatus: [
// 【转单】对应的状态值
'ENTERED',
'APPROVED',
'REJECTED',
'SUBMITTED',
'CANCELED',
],
whetherCallClick: false, // 是否调用筛选弹窗的查询
wheShowNoData: false, // 是否展示无数据提示
}
}
}
componentDidMount() {
this.handleTopNav(0) // 默认调用【借货订单】查询
}
componentWillReceiveProps(nextProps) {
let { loginState, navigation, histor_search_status } = this.props
let that = this
if (loginState != nextProps.loginState) {
switch (nextProps.loginState) {
case LOGIN_NO:
navigation.navigate('LoginPage')
break
default:
break
}
}
if (histor_search_status != nextProps.histor_search_status) {
switch (nextProps.histor_search_status) {
case HISTOR_ORDER_SEARCH_DOING:
that.changeSubLoding(true, '查询中')
break
case HISTOR_ORDER_SEARCH_SUCCESS:
// 解决 IOS 加载弹窗消失慢
setTimeout(() => {
that.setState(
{
isSubLoding: false,
},
() => {
that.changeCurrentOption()
},
)
}, 500)
componentDidMount() {
this.handleTopNav(0) // 默认调用【借货订单】查询
break
case HISTOR_ORDER_SEARCH_FAILURE:
that.changeSubLoding(false)
break
default:
break
}
}
}
componentWillReceiveProps(nextProps) {
let {loginState, navigation, histor_search_status} = this.props;
let that = this
if(loginState != nextProps.loginState) {
switch(nextProps.loginState) {
case LOGIN_NO:
navigation.navigate('LoginPage')
break;
default:
break;
// 修改当前显示的查询数据
changeCurrentOption() {
let {
contOptionData,
topActiveIndex,
borrowStatus,
consumeStatus,
searchBorrowStatus,
searchComsumeStatus,
transferStatus,
searchTransStatus,
} = this.state
let { historOrderOption } = this.props
if (!historOrderOption.length) {
show('当前查询数据为空')
this.setState({
wheShowNoData: true,
})
return
}
contOptionData = cloneObject(historOrderOption)
switch (topActiveIndex) {
case 0:
contOptionData = contOptionData.map((supItem, ind) => {
supItem.id = ind + ''
supItem.local_his_number = supItem.collect_number
if (!supItem.surgery_name) {
supItem.local_his_name = '无'
} else {
supItem.local_his_name = supItem.surgery_name
}
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)) {
supItem.local_his_status = borrowStatus[i]
break
}
}
if(histor_search_status != nextProps.histor_search_status) {
switch (nextProps.histor_search_status) {
case HISTOR_ORDER_SEARCH_DOING:
that.changeSubLoding(true, '查询中')
break;
case HISTOR_ORDER_SEARCH_SUCCESS:
// 解决 IOS 加载弹窗消失慢
setTimeout(() => {
that.setState({
isSubLoding: false
},() => {
that.changeCurrentOption();
})
}, 500)
break;
case HISTOR_ORDER_SEARCH_FAILURE:
that.changeSubLoding(false)
break;
default:
break;
}
return supItem
})
break
case 1:
contOptionData = contOptionData.map((supItem, ind) => {
supItem.id = ind + ''
supItem.local_his_number = supItem.consume_order_number
if (supItem.settled_flag == 'Y') {
supItem.local_his_name = '是'
} else {
supItem.local_his_name = '否'
}
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) {
supItem.local_his_status = consumeStatus[1]
} else {
supItem.local_his_status = consumeStatus[0]
}
return supItem
})
break
case 2:
contOptionData = contOptionData.map((supItem, ind) => {
supItem.id = ind + ''
supItem.local_his_number = supItem.order_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) {
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)) {
supItem.local_his_status = transferStatus[i]
break
}
}
}
// 修改当前显示的查询数据
changeCurrentOption() {
let {
contOptionData, topActiveIndex,
borrowStatus, consumeStatus,
searchBorrowStatus, searchComsumeStatus,
transferStatus, searchTransStatus
} = this.state
let {historOrderOption} = this.props
if(!historOrderOption.length) {
show('当前查询数据为空')
this.setState({
wheShowNoData: true
})
return
}
contOptionData = cloneObject(historOrderOption)
switch(topActiveIndex) {
case 0:
contOptionData = contOptionData.map((supItem, ind) => {
supItem.id = ind+''
supItem.local_his_number = supItem.collect_number
if(!supItem.surgery_name) {
supItem.local_his_name = '无'
} else {
supItem.local_his_name = supItem.surgery_name
}
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)) {
supItem.local_his_status = borrowStatus[i]
break;
}
}
return supItem
})
break;
case 1:
contOptionData = contOptionData.map((supItem, ind) => {
supItem.id = ind+''
supItem.local_his_number = supItem.consume_order_number
if(supItem.settled_flag == 'Y') {
supItem.local_his_name = '是'
} else {
supItem.local_his_name = '否'
}
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) {
supItem.local_his_status = consumeStatus[1]
} else {
supItem.local_his_status = consumeStatus[0]
}
return supItem
})
break;
case 2:
contOptionData = contOptionData.map((supItem, ind) => {
supItem.id = ind+''
supItem.local_his_number = supItem.order_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) {
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)) {
supItem.local_his_status = transferStatus[i]
break;
}
}
return supItem
})
break;
default:
break;
}
this.setState({
contOptionData
}
return supItem
})
break
default:
break
}
this.setState({
contOptionData,
})
}
// 修改正在加载
changeSubLoding(loading, loadTit) {
this.setState({
isSubLoding: loading || false,
lodingTitle: loadTit || ''
})
}
// 修改正在加载
changeSubLoding(loading, loadTit) {
this.setState({
isSubLoding: loading || false,
lodingTitle: loadTit || '',
})
}
// 筛选回调 - 确定
handleSureSubmit(params) {
let {topActiveIndex} = this.state
let {props} = this
// 初始化调用子组件查询
this.setState({
whetherCallClick: false, // 初始化
contOptionData: [], // 清空查询数据
wheShowNoData: false // 默认不展示
})
// 筛选回调 - 确定
handleSureSubmit(params) {
let { topActiveIndex } = this.state
let { props } = this
// 初始化调用子组件查询
this.setState({
whetherCallClick: false, // 初始化
contOptionData: [], // 清空查询数据
wheShowNoData: false, // 默认不展示
})
switch(topActiveIndex) {
case 0:
props.requestGetAllBorrow(params)
break;
case 1:
props.requestGetAllConsume(params)
break;
case 2:
props.requestGetAllTrans(params)
break;
default:
break;
}
switch (topActiveIndex) {
case 0:
props.requestGetAllBorrow(params)
break
case 1:
props.requestGetAllConsume(params)
break
case 2:
props.requestGetAllTrans(params)
break
default:
break
}
}
// 点击顶部菜单
handleTopNav(index) {
let that = this
let {isShowSelect} = that.state
// 点击顶部菜单
handleTopNav(index) {
let that = this
let { isShowSelect } = that.state
that.setState(
{
topActiveIndex: index,
},
() => {
// 如果打开打开筛选弹窗,先关闭
if (isShowSelect) {
this.setState({
isShowSelect: false,
})
}
// 切换标签,调用子组件查询
that.setState({
topActiveIndex: index
}, () => {
// 如果打开打开筛选弹窗,先关闭
if(isShowSelect) {
this.setState({
isShowSelect: false
})
}
// 切换标签,调用子组件查询
that.setState({
whetherCallClick: true
})
whetherCallClick: true,
})
}
},
)
}
// 点击筛选
handleSelectClick() {
let {isShowSelect} = this.state
this.setState({
isShowSelect: !isShowSelect
})
}
// 点击筛选
handleSelectClick() {
let { isShowSelect } = this.state
this.setState({
isShowSelect: !isShowSelect,
})
}
// 关闭筛选弹窗 回调
handleCloseFilterModal(show) {
this.setState({
isShowSelect: show
})
}
// 关闭筛选弹窗 回调
handleCloseFilterModal(show) {
this.setState({
isShowSelect: show,
})
}
// 跳转到行页面
openLinePage(item) {
let {topActiveIndex} = this.state
let {navigation} = this.props
let originalItem = item
if(originalItem.order_number && originalItem.order_number.includes('(')) {
originalItem.order_number = originalItem.order_number.split('(')[0]
}
if(navigation.navigate) {
navigation.navigate('LineOrderPage',{
title: item.local_his_number,
supIndex: topActiveIndex,
data: originalItem
})
}
// 跳转到行页面
openLinePage(item) {
let { topActiveIndex } = this.state
let { navigation } = this.props
let originalItem = item
if (originalItem.order_number && originalItem.order_number.includes('(')) {
originalItem.order_number = originalItem.order_number.split('(')[0]
}
// 修改顶部筛选
handleChangeTopList(data) {
this.setState({
topProcOptionList: data
})
if (navigation.navigate) {
navigation.navigate('LineOrderPage', {
title: item.local_his_number,
supIndex: topActiveIndex,
data: originalItem,
})
}
}
// 返回中间主要内容
renderContItem() {
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) =>
<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>
</TouchableOpacity>
)
}
</View>
<View style={styles.top_sea_box}>
<TouchableOpacity
activeOpacity={.8}
style={styles.sea_inner}
onPress={() => this.handleSelectClick()}
>
<Text style={[
styles.sea_tit,
topProcOptionList.length && topProcOptionList[topActiveIndex].selIsAct ? styles.sea_tit_act : ''
]}>
筛选
</Text>
<View style={styles.sea_icon}>
{
isShowSelect ?
<Image source={require('../../images/arr_top.png')} style={icon_style} />
: <Image source={require('../../images/arr_bom.png')} style={icon_style} />
}
</View>
</TouchableOpacity>
{/* 筛选弹窗 */}
<FilterModel
show={isShowSelect}
navigation={this.props.navigation}
topProcOptionList={topProcOptionList}
topActiveIndex={topActiveIndex}
closeModal={(show) => this.handleCloseFilterModal(show)}
callSupLoading={(loading, loadTit) => this.changeSubLoding(loading, loadTit)}
callChangeTopNav={(index) => this.handleTopNav(index)}
callSupSubmit={(params) => this.handleSureSubmit(params)}
callSupClick={whetherCallClick}
callSupTopList={(data) => this.handleChangeTopList(data) }
/>
</View>
</View>
{/* 底部筛选数据 */}
<View style={styles.cont_main}>
<ScrollView
style={styles.cont_scroll}
>
{/* 查询为空数据时 */}
{
wheShowNoData ?
<View style={styles.cont_list_item}>
<TouchableOpacity
activeOpacity={1}
style={styles.cont_no_list_box}
>
<Text style={styles.cont_no_data}>依当前条件未查询到数据</Text>
</TouchableOpacity>
</View>
: null
}
{/* 底部每一列数据 */}
{
contOptionData.map((item, index) =>
this.renderSubListItem(item, index)
)
}
// 修改顶部筛选
handleChangeTopList(data) {
this.setState({
topProcOptionList: data,
})
}
</ScrollView>
// 返回中间主要内容
renderContItem() {
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) => (
<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>
</TouchableOpacity>
))}
</View>
<View style={styles.top_sea_box}>
<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 : '',
]}
>
筛选
</Text>
<View style={styles.sea_icon}>
{isShowSelect ? (
<Image source={require('../../images/arr_top.png')} style={icon_style} />
) : (
<Image source={require('../../images/arr_bom.png')} style={icon_style} />
)}
</View>
</TouchableOpacity>
{/* 筛选弹窗 */}
<FilterModel
show={isShowSelect}
navigation={this.props.navigation}
topProcOptionList={topProcOptionList}
topActiveIndex={topActiveIndex}
closeModal={show => this.handleCloseFilterModal(show)}
callSupLoading={(loading, loadTit) => this.changeSubLoding(loading, loadTit)}
callChangeTopNav={index => this.handleTopNav(index)}
callSupSubmit={params => this.handleSureSubmit(params)}
callSupClick={whetherCallClick}
callSupTopList={data => this.handleChangeTopList(data)}
/>
</View>
</View>
</View>
)
}
// 返回每一列数据
renderSubListItem(item, index) {
let {topActiveIndex} = this.state
let tempTit = ''
let tempNum = ''
if(topActiveIndex == 0) {
tempTit = '手术名称:'
tempNum = item.local_his_number
} else if(topActiveIndex == 1) {
tempTit = '结单标识:'
tempNum = item.surgery_collect_number // 还是显示借货单号,但是接口还是传递消耗单号
}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)}
>
<View style={styles.cont_lef}>
<Text style={styles.cont_lef_tit}>
{tempNum}
</Text>
<Text style={styles.cont_tip}>
{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.source_surgery_date ? moment(item.source_surgery_date).format('YYYY/MM/DD HH:mm') : '无'}
</Text> : null
}
<Text style={styles.cont_tip}>
备注:{item.remark || '——'}
</Text>
</View>
<View style={styles.cont_rig}>
<Text
style={[
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
]}>
{item.local_his_status}
</Text>
</View>
{/* 底部筛选数据 */}
<View style={styles.cont_main}>
<ScrollView style={styles.cont_scroll}>
{/* 查询为空数据时 */}
{wheShowNoData ? (
<View style={styles.cont_list_item}>
<TouchableOpacity activeOpacity={1} style={styles.cont_no_list_box}>
<Text style={styles.cont_no_data}>依当前条件未查询到数据</Text>
</TouchableOpacity>
</View>
)
}
</View>
) : null}
{/* 底部每一列数据 */}
{contOptionData.map((item, index) => this.renderSubListItem(item, index))}
</ScrollView>
</View>
</View>
)
}
// 返回正在加载中
renderLodingItem() {
let { lodingTitle, isSubLoding } = this.state
return(
<LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
)
// 返回每一列数据
renderSubListItem(item, index) {
let { topActiveIndex } = this.state
let tempTit = ''
let tempNum = ''
if (topActiveIndex == 0) {
tempTit = '手术名称:'
tempNum = item.local_his_number
} else if (topActiveIndex == 1) {
tempTit = '结单标识:'
tempNum = item.surgery_collect_number // 还是显示借货单号,但是接口还是传递消耗单号
} else if (topActiveIndex == 2) {
tempTit = '目标借货订单号:'
tempNum = item.local_his_number
}
render() {
return (
<View style={styles.hist_main}>
{ this.renderContItem() }
{this.renderLodingItem()}
</View>
);
}
return (
<View style={styles.cont_list_item} key={index}>
<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_tip}>
{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.source_surgery_date ? moment(item.source_surgery_date).format('YYYY/MM/DD HH:mm') : '无'}
</Text>
) : null}
<Text style={styles.cont_tip}>备注:{item.remark || '——'}</Text>
</View>
<View style={styles.cont_rig}>
<Text
style={[
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,
]}
>
{item.local_his_status}
</Text>
</View>
</TouchableOpacity>
</View>
)
}
// 返回正在加载中
renderLodingItem() {
let { lodingTitle, isSubLoding } = this.state
return <LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
}
render() {
return (
<View style={styles.hist_main}>
{this.renderContItem()}
{this.renderLodingItem()}
</View>
)
}
}
const styles = StyleSheet.create({
hist_container: {
flex: 1,
backgroundColor: home_background_color,
padding: 0,
margin: 0
},
hist_main: {
flex: 1
},
loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)'
},
cont_item_box: {
},
top_box: {},
top_tab_cont: {
flexDirection: 'row',
backgroundColor: foundation_color,
justifyContent: 'space-between'
},
top_scroll_cont: {
paddingBottom: 4,
borderBottomColor: '#DEDBDB',
borderBottomWidth: 1
},
top_touch_cont: {
width: '33.33333%' // 三个
// width: '50%'
},
top_inner: {
justifyContent: 'center',
alignItems: 'center',
// marginRight: 14,
borderBottomWidth: 2,
borderBottomColor: foundation_color,
// minWidth: 50
},
top_inner_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color
},
top_tit: {
paddingTop: 16,
paddingBottom: 12,
color: second_text_color,
fontSize: 14
},
top_tit_act: {
color: first_text_color,
fontWeight: 'bold'
},
top_sea_box: {
paddingVertical: 14,
position: 'relative',
// paddingHorizontal: 24,
},
sea_inner: {
flexDirection: 'row',
alignItems: 'center',
paddingHorizontal: 24,
// paddingBottom: 10
},
sea_tit: {
fontSize: 14,
color: second_text_color,
fontFamily: font_family_regular
},
sea_tit_act: {
color: '#007EFF'
},
sea_icon: {
width: pxSize(8),
height: pxSize(8),
marginLeft: 4
},
hist_container: {
flex: 1,
backgroundColor: home_background_color,
padding: 0,
margin: 0,
},
hist_main: {
flex: 1,
},
loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)',
},
cont_item_box: {},
top_box: {},
top_tab_cont: {
flexDirection: 'row',
backgroundColor: foundation_color,
justifyContent: 'space-between',
},
top_scroll_cont: {
paddingBottom: 4,
borderBottomColor: '#DEDBDB',
borderBottomWidth: 1,
},
top_touch_cont: {
width: '33.33333%', // 三个
// width: '50%'
},
top_inner: {
justifyContent: 'center',
alignItems: 'center',
// marginRight: 14,
borderBottomWidth: 2,
borderBottomColor: foundation_color,
// minWidth: 50
},
top_inner_act: {
borderBottomWidth: 2,
borderBottomColor: promary_color,
},
top_tit: {
paddingTop: 16,
paddingBottom: 12,
color: second_text_color,
fontSize: 14,
},
top_tit_act: {
color: first_text_color,
fontWeight: 'bold',
},
top_sea_box: {
paddingVertical: 14,
position: 'relative',
// paddingHorizontal: 24,
},
sea_inner: {
flexDirection: 'row',
alignItems: 'center',
paddingHorizontal: 24,
// paddingBottom: 10
},
sea_tit: {
fontSize: 14,
color: second_text_color,
fontFamily: font_family_regular,
},
sea_tit_act: {
color: '#007EFF',
},
sea_icon: {
width: pxSize(8),
height: pxSize(8),
marginLeft: 4,
},
cont_main: {
backgroundColor: foundation_color,
maxHeight: Height() - 240,
minHeight: Height() - 358,
paddingBottom: pxHeight(60)
},
cont_scroll: {},
cont_box: {},
cont_main: {
backgroundColor: foundation_color,
maxHeight: Height() - 240,
minHeight: Height() - 358,
paddingBottom: pxHeight(60),
},
cont_scroll: {},
cont_box: {},
cont_list_item: {
marginTop: 14,
marginHorizontal: 20,
borderBottomWidth: .5,
borderBottomColor: '#EEEEEE',
paddingBottom: 16
},
cont_list_box: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
},
cont_lef: {
maxWidth: '80%'
},
cont_lef_tit: {
color: promary_text_color,
fontSize: 18,
fontFamily: font_family_medium
},
cont_tip: {
fontSize: 12,
color: third_text_color,
fontFamily: font_family_regular,
lineHeight: 20
},
cont_rig: {
justifyContent: 'flex-end'
},
cont_rig_status: {
fontSize: second_text_size,
fontFamily: font_family_medium,
color: '#01B2B9'
},
status_audit: {
color: '#FF0000'
},
status_return: {
color: '#007EFF'
},
status_other: {
color: '#F4B61B'
},
cont_no_list_box: {
flex: 1
},
cont_no_data: {
color: third_text_color,
fontSize: 16,
fontFamily: font_family_medium,
lineHeight: 42,
textAlign: 'center'
},
cont_list_item: {
marginTop: 14,
marginHorizontal: 20,
borderBottomWidth: 0.5,
borderBottomColor: '#EEEEEE',
paddingBottom: 16,
},
cont_list_box: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
},
cont_lef: {
maxWidth: '80%',
},
cont_lef_tit: {
color: promary_text_color,
fontSize: 18,
fontFamily: font_family_medium,
},
cont_tip: {
fontSize: 12,
color: third_text_color,
fontFamily: font_family_regular,
lineHeight: 20,
},
cont_rig: {
justifyContent: 'flex-end',
},
cont_rig_status: {
fontSize: second_text_size,
fontFamily: font_family_medium,
color: '#01B2B9',
},
status_audit: {
color: '#FF0000',
},
status_return: {
color: '#007EFF',
},
status_other: {
color: '#F4B61B',
},
cont_no_list_box: {
flex: 1,
},
cont_no_data: {
color: third_text_color,
fontSize: 16,
fontFamily: font_family_medium,
lineHeight: 42,
textAlign: 'center',
},
})
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
}
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,
}
}
const mapDispatchToProps = (dispatch) => {
return {
exitLoginStatus: () => {
dispatch(exitLoginStatus())
},
requestGetAllBorrow: (params) => {
dispatch(requestGetAllBorrow(params))
},
requestGetAllConsume: (params) => {
dispatch(requestGetAllConsume(params))
},
requestGetAllTrans: (params) => {
dispatch(requestGetAllTrans(params))
}
}
const mapDispatchToProps = dispatch => {
return {
exitLoginStatus: () => {
dispatch(exitLoginStatus())
},
requestGetAllBorrow: params => {
dispatch(requestGetAllBorrow(params))
},
requestGetAllConsume: params => {
dispatch(requestGetAllConsume(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 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 {
View,
Text,
StyleSheet,
Image,
TouchableOpacity,
ScrollView,
SafeAreaView
} from 'react-native';
import * as R from 'ramda';
import ImageView from 'react-native-image-preview';
promary_color,
safe_view,
list_common_item,
icon_style,
font_family_medium,
second_text_color,
font_family_regular,
third_text_size,
second_text_size,
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'
import {
promary_color,
safe_view,
list_common_item,
icon_style,
font_family_medium,
second_text_color,
font_family_regular,
third_text_size,
second_text_size,
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';
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';
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'
class LineOrderPage extends Component {
constructor(props) {
super(props);
this.state = {
isSubLoding: false, // 加载中弹窗
lodingTitle: '加载中',
consumaData: {
isShowSub: true, // 展开耗材
subOption: [
// {
// "id": "0",
// item_name: '人工髋关节假体-JS-HB ||| T',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774'
// }
]
constructor(props) {
super(props)
this.state = {
isSubLoding: false, // 加载中弹窗
lodingTitle: '加载中',
consumaData: {
isShowSub: true, // 展开耗材
subOption: [
// {
// "id": "0",
// item_name: '人工髋关节假体-JS-HB ||| T',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774'
// }
],
},
orderSupOptions: {}, // 获取主表数据
toolShowPopup: false, // 弹窗显示
popFormItem: {}, // 弹窗对象
collectPhotos: [],
previewVisible: false,
imageIndex: null,
// 渲染内容,下标就是历史列表里的序号subIndex
columns: [
// 借货订单
[
{
prop: 'local_his_name',
name: '手术名称',
},
{
prop: 'doctor_name',
name: '手术医生',
},
{
prop: 'local_his_time',
name: '手术时间',
},
{
prop: 'customer_name',
name: '客户名称',
},
{
prop: 'local_his_number',
name: '订 单 号',
},
{
prop: 'create_time',
name: '下单日期',
format: data => data && moment(data).format('YYYY/MM/DD HH:mm'),
},
{
prop: 'allPlanQuanSum',
name: '下单数量',
obj: 'consumaData',
},
{
prop: 'surgery_desc',
name: '备注信息',
},
],
[
// 消耗订单
{
prop: 'surgery_collect_number',
name: '借货订单',
},
{
prop: 'consume_order_number',
name: '消耗订单',
},
{
prop: 'local_his_name',
name: '结单标识',
},
{
prop: 'seller_name',
name: '业 务 员',
suffix: () => {
const { local_his_time } = this.state.orderSupOptions
return !!local_his_time && `(${moment(local_his_time).format('YYYY/MM/DD HH:mm')})`
},
orderSupOptions: {}, // 获取主表数据
toolShowPopup: false, // 弹窗显示
popFormItem: {}, // 弹窗对象
collectPhotos: [],
previewVisible: false,
imageIndex: null,
// 渲染内容,下标就是历史列表里的序号subIndex
columns: [
// 借货订单
[
{
prop: 'local_his_name',
name: '手术名称',
},
{
prop: 'doctor_name',
name: '手术医生',
},
{
prop: 'local_his_time',
name: '手术时间',
},
{
prop: 'customer_name',
name: '客户名称',
},
{
prop: 'local_his_number',
name: '订 单 号',
},
{
prop: 'create_time',
name: '下单日期',
format: data => data && moment(data).format('YYYY/MM/DD HH:mm')
},
{
prop: 'allPlanQuanSum',
name: '下单数量',
obj: 'consumaData'
},
{
prop: 'surgery_desc',
name: '备注信息',
},
],
[ // 消耗订单
{
prop: 'surgery_collect_number',
name: '借货订单',
},
{
prop: 'consume_order_number',
name: '消耗订单',
},
{
prop: 'local_his_name',
name: '结单标识',
},
{
prop: 'seller_name',
name: '业 务 员',
suffix: () => {
const {local_his_time} = this.state.orderSupOptions
return !!local_his_time && `(${moment(local_his_time).format('YYYY/MM/DD HH:mm')})`
}
},
{
prop: 'customer_name',
name: '客户名称',
},
{
prop: 'doctor_name',
name: '手术医生',
},
{
prop: 'local_his_time',
name: '消耗时间',
},
{
prop: 'patient_id',
name: '病 历 号',
},
{
prop: 'patient_bed',
name: '床 位',
},
{
prop: 'patient_name',
name: '患者姓名',
},
{
prop: 'patient_age',
name: '患者年龄',
},
{
prop: 'patient_gender',
name: '患者性别',
},
{
prop: 'surgery_desc',
name: '备注信息',
},
], [{
prop: 'local_his_name',
name: '目标借货订单号',
suffix: () => {
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
return !!source_surgery_date && `(${moment(source_surgery_date).format('YYYY/MM/DD HH:mm')})`
}
},
{
prop: 'doctor_name',
name: '手术医生',
},
{
prop: 'destination_customer_name',
name: '目标客户名称',
},
{
prop: 'source_customer_name',
name: '来源客户名称',
},
{
prop: 'order_number',
name: '订单号',
},
{
prop: 'surgery_desc',
name: '备注信息',
},
]
]
}
}
componentDidMount() {
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
})),
R.split(',')
)(data.image_url)
collectPhotos = images
this.setState({ collectPhotos });
}
this.getLineOptionData()
}
componentWillReceiveProps(nextProps) {
let {loginState, navigation} = this.props
if(loginState != nextProps.loginState) {
switch(nextProps.loginState) {
case LOGIN_NO:
navigation.navigate('LoginPage')
break;
default:
break;
}
}
}
// 修改正在加载
changeSubLoding(loading, loadTit) {
this.setState({
isSubLoding: loading || false,
lodingTitle: loadTit || '加载中'
})
}
// 获取行订单数据
getLineOptionData() {
let {supIndex, data} = this.props.navigation.state.params
this.setState({
orderSupOptions: data
})
switch(supIndex) {
case 0:
// 借货
this.getReqBorrowLineData(data)
this.getCollectPhoto(data)
break;
case 1:
// 消耗
this.getReqConsumeLineData(data)
break;
case 2:
// 转单
this.getReqTransLineData(data)
break;
default:
break;
}
},
{
prop: 'customer_name',
name: '客户名称',
},
{
prop: 'doctor_name',
name: '手术医生',
},
{
prop: 'local_his_time',
name: '消耗时间',
},
{
prop: 'patient_id',
name: '病 历 号',
},
{
prop: 'patient_bed',
name: '床 位',
},
{
prop: 'patient_name',
name: '患者姓名',
},
{
prop: 'patient_age',
name: '患者年龄',
},
{
prop: 'patient_gender',
name: '患者性别',
},
{
prop: 'surgery_desc',
name: '备注信息',
},
],
[
{
prop: 'local_his_name',
name: '目标借货订单号',
suffix: () => {
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
return !!source_surgery_date && `(${moment(source_surgery_date).format('YYYY/MM/DD HH:mm')})`
},
},
{
prop: 'doctor_name',
name: '手术医生',
},
{
prop: 'destination_customer_name',
name: '目标客户名称',
},
{
prop: 'source_customer_name',
name: '来源客户名称',
},
{
prop: 'order_number',
name: '订单号',
},
{
prop: 'surgery_desc',
name: '备注信息',
},
],
],
}
// 获取借货订单行数据
async getReqBorrowLineData(supData) {
let that = this
let {consumaData} = that.state
let {props} = this
that.changeSubLoding(true)
let params = {
access_token: props.token,
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) {
that.changeSubLoding(false)
// 成功
let {surgery_collect_lines} = bowResult.data
let tempSum = 0
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
})
} else if(bowResult.error_code == 41006) {
that.changeSubLoding(false)
show('登录过期,请重新登录');
props.exitLoginStatus();
} else {
that.changeSubLoding(false)
let error_msg = bowResult.error_msg || bowResult.message
show(error_msg);
}
}
componentDidMount() {
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,
})),
R.split(','),
)(data.image_url)
collectPhotos = images
this.setState({ collectPhotos })
}
// 获取消耗订单行数据
async getReqConsumeLineData(supData) {
let that = this
let {consumaData} = that.state
let {props} = this
that.changeSubLoding(true)
let params = {
access_token: props.token,
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) {
that.changeSubLoding(false)
// 成功
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) {
tempSum += Number(item.sale_price)
}
if(item.consumed_quantity) {
tempConQuanSum += Number(item.consumed_quantity)
}
})
consumaData.subOption = [...sur_consume_lines]
consumaData.allOptSum = tempSum
consumaData.allConmQuanSum = tempConQuanSum
that.setState({
consumaData
})
} else if(conResult.error_code == 41006) {
that.changeSubLoding(false)
show('登录过期,请重新登录');
props.exitLoginStatus();
} else {
that.changeSubLoding(false)
let error_msg = conResult.error_msg || conResult.message
show(error_msg);
}
this.getLineOptionData()
}
componentWillReceiveProps(nextProps) {
let { loginState, navigation } = this.props
if (loginState != nextProps.loginState) {
switch (nextProps.loginState) {
case LOGIN_NO:
navigation.navigate('LoginPage')
break
default:
break
}
}
// 获取转单订单行数据
async getReqTransLineData(supData) {
let that = 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
}
let conResult = await requestGetLineFormTrans(props.global_domain_config, params)
console.log('获取转单订单行数据 res=====', conResult)
if(conResult.error_code == 0) {
that.changeSubLoding(false)
// 成功
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) {
tempSum += Number(item.sale_price)
}
if(item.consumed_quantity) {
tempConQuanSum += Number(item.consumed_quantity)
}
})
consumaData.subOption = [...sur_order_transfer_lines]
consumaData.allOptSum = tempSum
consumaData.allConmQuanSum = tempConQuanSum
that.setState({
consumaData
})
} else if(conResult.error_code == 41006) {
that.changeSubLoding(false)
show('登录过期,请重新登录');
props.exitLoginStatus();
} else {
that.changeSubLoding(false)
let error_msg = conResult.error_msg || conResult.message
show(error_msg);
}
}
// 修改正在加载
changeSubLoding(loading, loadTit) {
this.setState({
isSubLoding: loading || false,
lodingTitle: loadTit || '加载中',
})
}
// 获取行订单数据
getLineOptionData() {
let { supIndex, data } = this.props.navigation.state.params
this.setState({
orderSupOptions: data,
})
switch (supIndex) {
case 0:
// 借货
this.getReqBorrowLineData(data)
this.getCollectPhoto(data)
break
case 1:
// 消耗
this.getReqConsumeLineData(data)
break
case 2:
// 转单
this.getReqTransLineData(data)
break
default:
break
}
async getCollectPhoto(supData) {
let params = {
access_token: this.props.token,
surgery_collect_number: supData.local_his_number,
}
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 { collectPhotos } = this.state
this.setState({collectPhotos: R.concat(collectPhotos, photos)});
}
// 获取借货订单行数据
async getReqBorrowLineData(supData) {
let that = this
let { consumaData } = that.state
let { props } = this
that.changeSubLoding(true)
let params = {
access_token: props.token,
surgery_collect_number: supData.local_his_number,
}
// 耗材明细 隐藏/显示子项
handleDetailBtmCheck(flagType) {
let {consumaData} = this.state
consumaData.isShowSub = flagType
this.setState({
consumaData
let bowResult = await requestGetLineFormBorrow(props.global_domain_config, params)
console.log('获取借货订单行数据 res=====', bowResult)
if (bowResult.error_code == 0) {
that.changeSubLoding(false)
// 成功
let { surgery_collect_lines } = bowResult.data
let tempSum = 0
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,
})
} else if (bowResult.error_code == 41006) {
that.changeSubLoding(false)
show('登录过期,请重新登录')
props.exitLoginStatus()
} else {
that.changeSubLoding(false)
let error_msg = bowResult.error_msg || bowResult.message
show(error_msg)
}
// 关闭当前弹窗
handleCloseModal(show) {
this.setState({
toolShowPopup: show
})
}
// 获取消耗订单行数据
async getReqConsumeLineData(supData) {
let that = this
let { consumaData } = that.state
let { props } = this
that.changeSubLoding(true)
let params = {
access_token: props.token,
consume_order_number: supData.local_his_number,
}
// 耗材弹窗显示
handleIsShowDialog(item) {
this.setState({
toolShowPopup: !this.state.toolShowPopup,
popFormItem: item
let conResult = await requestGetLineFormConsume(props.global_domain_config, params)
console.log('获取消耗订单行数据 res=====', conResult)
if (conResult.error_code == 0) {
that.changeSubLoding(false)
// 成功
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) {
tempSum += Number(item.sale_price)
}
if (item.consumed_quantity) {
tempConQuanSum += Number(item.consumed_quantity)
}
})
consumaData.subOption = [...sur_consume_lines]
consumaData.allOptSum = tempSum
consumaData.allConmQuanSum = tempConQuanSum
that.setState({
consumaData,
})
} else if (conResult.error_code == 41006) {
that.changeSubLoding(false)
show('登录过期,请重新登录')
props.exitLoginStatus()
} else {
that.changeSubLoding(false)
let error_msg = conResult.error_msg || conResult.message
show(error_msg)
}
previewImage(imgItem) {
this.setState({previewVisible: true, imageIndex: imgItem});
}
// 获取转单订单行数据
async getReqTransLineData(supData) {
let that = 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,
}
// 返回耗材内容
renderConsumablesItem() {
let { state } = this
return (
<CellTextStyle style={list_common_item.consu_detail}>
<View style={list_common_item.detail_inner}>
{
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>
{
state.consumaData.isShowSub ?
<TouchableOpacity
activeOpacity={.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> :
<TouchableOpacity
activeOpacity={.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')} />
</TouchableOpacity>
}
</View>
{
state.consumaData.isShowSub ?
<View style={list_common_item.detail_sub_inner}>
{
state.consumaData.subOption.map((item, index) => {
return this.renderConDeSubItem(item, index)
})
}
</View> : null
}
</View> : null
}
</View>
</CellTextStyle>
)
let conResult = await requestGetLineFormTrans(props.global_domain_config, params)
console.log('获取转单订单行数据 res=====', conResult)
if (conResult.error_code == 0) {
that.changeSubLoding(false)
// 成功
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) {
tempSum += Number(item.sale_price)
}
if (item.consumed_quantity) {
tempConQuanSum += Number(item.consumed_quantity)
}
})
consumaData.subOption = [...sur_order_transfer_lines]
consumaData.allOptSum = tempSum
consumaData.allConmQuanSum = tempConQuanSum
that.setState({
consumaData,
})
} else if (conResult.error_code == 41006) {
that.changeSubLoding(false)
show('登录过期,请重新登录')
props.exitLoginStatus()
} else {
that.changeSubLoding(false)
let error_msg = conResult.error_msg || conResult.message
show(error_msg)
}
}
// 返回耗材明细子项
renderConDeSubItem(item, index) {
let {supIndex} = this.props.navigation.state.params
return(
<TouchableOpacity
activeOpacity={.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 }
</Text>
: null
}
</TouchableOpacity>
)
async getCollectPhoto(supData) {
let params = {
access_token: this.props.token,
surgery_collect_number: supData.local_his_number,
}
// 返回主要内容
renderContItem() {
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 => {
const obj = this.state[col.obj] || orderSupOptions
if(!!col.ifShow && !col.ifShow()) return null
return (
<View key={col.name} style={styles.fo_cell_box}>
<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>
</View>
)
})
}
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 { collectPhotos } = this.state
this.setState({ collectPhotos: R.concat(collectPhotos, photos) })
}
// 耗材明细 隐藏/显示子项
handleDetailBtmCheck(flagType) {
let { consumaData } = this.state
consumaData.isShowSub = flagType
this.setState({
consumaData,
})
}
// 关闭当前弹窗
handleCloseModal(show) {
this.setState({
toolShowPopup: show,
})
}
// 耗材弹窗显示
handleIsShowDialog(item) {
this.setState({
toolShowPopup: !this.state.toolShowPopup,
popFormItem: item,
})
}
previewImage(imgItem) {
this.setState({ previewVisible: true, imageIndex: imgItem })
}
// 返回耗材内容
renderConsumablesItem() {
let { state } = this
return (
<CellTextStyle style={list_common_item.consu_detail}>
<View style={list_common_item.detail_inner}>
{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>
{state.consumaData.isShowSub ? (
<TouchableOpacity
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>
) : (
<TouchableOpacity
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')}
/>
</TouchableOpacity>
)}
</View>
{state.consumaData.isShowSub ? (
<View style={list_common_item.detail_sub_inner}>
{state.consumaData.subOption.map((item, index) => {
return this.renderConDeSubItem(item, index)
})}
</View>
<View style={styles.line_cont}>
<View style={styles.line_cont_title}>
<Text style={styles.cont_tip_tit}>订单详情</Text>
{
supIndex === 1 &&
<View style={[styles.line_cont_title]}>
<Text style={{marginRight: pxSize(15)}}>数量:{consumaData.allConmQuanSum}</Text>
<Text style>金额:{consumaData.allOptSum}</Text>
</View>
}
</View>
{ this.renderConsumablesItem() }
{ this.renderDetailModel() }
<View style={styles.line_footer}>
<View style={styles.fo_sta_inner}>
<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
]}>
{orderSupOptions.local_his_status}
</Text>
</View>
</View>
{ 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 => {
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})}
/>
</View>
)}
) : null}
</View>
) : null}
</View>
</CellTextStyle>
)
}
// 返回耗材明细子项
renderConDeSubItem(item, index) {
let { supIndex } = this.props.navigation.state.params
return (
<TouchableOpacity
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}</Text>
) : null}
</TouchableOpacity>
)
}
// 返回主要内容
renderContItem() {
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 => {
const obj = this.state[col.obj] || orderSupOptions
if (!!col.ifShow && !col.ifShow()) return null
return (
<View key={col.name} style={styles.fo_cell_box}>
<View style={{ minWidth: pxSize(70) }}>
<Text style={[styles.fo_tip_txt]}>{col.name}:</Text>
</View>
</ScrollView>
)
}
// 返回正在加载中
renderLodingItem() {
let { lodingTitle, isSubLoding } = this.state
return(
<LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
)
}
// 返回弹窗
renderDetailModel() {
let {popFormItem, toolShowPopup} = this.state
const { sysProfiles } = this.props
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)}
>
<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 ?
<Text style={styles.mo_cont_tip}>
生产日期:{moment(popFormItem.production_date).format('YYYY-MM-DD')}
</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>
}
</View>
</View>
</ShowModel>
)
}
render() {
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.line_container}>
<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.renderLodingItem()}
</View>
</SafeAreaView>
<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>
</View>
)
})}
</View>
<View style={styles.line_cont}>
<View style={styles.line_cont_title}>
<Text style={styles.cont_tip_tit}>订单详情</Text>
{supIndex === 1 && (
<View style={[styles.line_cont_title]}>
<Text style={{ marginRight: pxSize(15) }}>数量:{consumaData.allConmQuanSum}</Text>
<Text style>金额:{consumaData.allOptSum}</Text>
</View>
)}
</View>
{this.renderConsumablesItem()}
{this.renderDetailModel()}
<View style={styles.line_footer}>
<View style={styles.fo_sta_inner}>
<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,
]}
>
{orderSupOptions.local_his_status}
</Text>
</View>
);
}
</View>
{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 => {
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 })}
/>
</View>
)}
</View>
</ScrollView>
)
}
// 返回正在加载中
renderLodingItem() {
let { lodingTitle, isSubLoding } = this.state
return <LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
}
// 返回弹窗
renderDetailModel() {
let { popFormItem, toolShowPopup } = this.state
const { sysProfiles } = this.props
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)}>
<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 ? (
<Text style={styles.mo_cont_tip}>
生产日期:{moment(popFormItem.production_date).format('YYYY-MM-DD')}
</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>
)}
</View>
</View>
</ShowModel>
)
}
render() {
let { navigation } = this.props
let { title } = navigation.state.params
return (
<View style={styles.line_container}>
<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.renderLodingItem()}
</View>
</SafeAreaView>
</View>
)
}
}
const styles = StyleSheet.create({
line_container: {
flex: 1,
backgroundColor: home_background_color,
padding: 0,
margin: 0
},
line_main: {
flex: 1
},
loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)'
},
line_cont_scroll: {},
line_cont: {
paddingHorizontal: 20,
paddingVertical: 16,
paddingBottom: 20
},
line_cont_title: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: "center"
},
line_cont_title_column: {
flexDirection: 'column',
justifyContent: 'space-between',
},
cont_tip_tit: {
fontSize: 16,
fontFamily: font_family_regular,
color: first_text_color
},
line_footer: {},
fo_cont_inner: {
// borderBottomWidth: 1,
// borderBottomColor: '#CCCCCC',
// paddingBottom: 18
backgroundColor: foundation_color,
padding: 20
},
fo_cont_top_tit: {
color: first_text_color,
fontFamily: font_family_medium,
fontSize: second_text_size,
paddingBottom: 8
},
fo_tit_box: {
paddingBottom: 12
},
fo_txt: {
fontSize: 14,
fontFamily: font_family_regular,
color: second_text_color
},
fo_cell_box: {
flexDirection: 'row'
},
fo_tip_txt: {
fontSize: third_text_size,
fontFamily: font_family_regular,
color: second_text_color,
lineHeight: 18
},
fo_tip_txt_key: {
// minWidth: pxSize(120),
},
fo_sum_txt: {
color: first_text_color,
fontSize: 14,
fontFamily: font_family_medium,
paddingTop: 8
},
fo_sta_inner: {
paddingTop: 12,
alignItems: 'flex-end',
borderTopWidth: 1,
borderTopColor: '#ECECEC',
paddingTop: 18
},
fo_sta_txt: {
fontSize: second_text_size,
fontFamily: font_family_medium,
color: '#01B2B9'
},
status_audit: {
color: '#FF0000'
},
status_return: {
color: '#007EFF'
},
status_other: {
color: '#F4B61B'
},
// 弹窗
model_cont: {
// flex: 1
},
model_cont_inner: {
marginBottom: 48
},
mo_cont_title: {
color: first_text_color,
// fontWeight: 'bold',
fontSize: 14,
lineHeight: 24,
fontFamily: font_family_medium
},
mo_cont_tip: {
color: second_text_color,
fontSize: 14,
lineHeight: 24,
fontFamily: font_family_regular
},
mo_img_box: {
flex: 1,
borderWidth: 1,
borderColor: '#E1E1E1',
justifyContent: 'center',
alignItems: 'center',
height: pxSize(120)
},
mo_img: {
width: pxSize(100),
height: '100%'
},
image_box: {
flexDirection: 'row',
marginTop: pxSize(10),
},
image: {
width: pxSize(60),
height: pxSize(60),
marginRight: pxSize(10),
}
line_container: {
flex: 1,
backgroundColor: home_background_color,
padding: 0,
margin: 0,
},
line_main: {
flex: 1,
},
loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)',
},
line_cont_scroll: {},
line_cont: {
paddingHorizontal: 20,
paddingVertical: 16,
paddingBottom: 20,
},
line_cont_title: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
},
line_cont_title_column: {
flexDirection: 'column',
justifyContent: 'space-between',
},
cont_tip_tit: {
fontSize: 16,
fontFamily: font_family_regular,
color: first_text_color,
},
line_footer: {},
fo_cont_inner: {
// borderBottomWidth: 1,
// borderBottomColor: '#CCCCCC',
// paddingBottom: 18
backgroundColor: foundation_color,
padding: 20,
},
fo_cont_top_tit: {
color: first_text_color,
fontFamily: font_family_medium,
fontSize: second_text_size,
paddingBottom: 8,
},
fo_tit_box: {
paddingBottom: 12,
},
fo_txt: {
fontSize: 14,
fontFamily: font_family_regular,
color: second_text_color,
},
fo_cell_box: {
flexDirection: 'row',
},
fo_tip_txt: {
fontSize: third_text_size,
fontFamily: font_family_regular,
color: second_text_color,
lineHeight: 18,
},
fo_tip_txt_key: {
// minWidth: pxSize(120),
},
fo_sum_txt: {
color: first_text_color,
fontSize: 14,
fontFamily: font_family_medium,
paddingTop: 8,
},
fo_sta_inner: {
paddingTop: 12,
alignItems: 'flex-end',
borderTopWidth: 1,
borderTopColor: '#ECECEC',
paddingTop: 18,
},
fo_sta_txt: {
fontSize: second_text_size,
fontFamily: font_family_medium,
color: '#01B2B9',
},
status_audit: {
color: '#FF0000',
},
status_return: {
color: '#007EFF',
},
status_other: {
color: '#F4B61B',
},
// 弹窗
model_cont: {
// flex: 1
},
model_cont_inner: {
marginBottom: 48,
},
mo_cont_title: {
color: first_text_color,
// fontWeight: 'bold',
fontSize: 14,
lineHeight: 24,
fontFamily: font_family_medium,
},
mo_cont_tip: {
color: second_text_color,
fontSize: 14,
lineHeight: 24,
fontFamily: font_family_regular,
},
mo_img_box: {
flex: 1,
borderWidth: 1,
borderColor: '#E1E1E1',
justifyContent: 'center',
alignItems: 'center',
height: pxSize(120),
},
mo_img: {
width: pxSize(100),
height: '100%',
},
image_box: {
flexDirection: 'row',
marginTop: pxSize(10),
},
image: {
width: pxSize(60),
height: pxSize(60),
marginRight: pxSize(10),
},
})
const mapStateToProps = (state) => {
return {
token: state.login.token,
loginState: state.login.loginState,
global_domain_config: state.login.global_domain_config,
sysProfiles: state.login.sysProfiles,
}
const mapStateToProps = state => {
return {
token: state.login.token,
loginState: state.login.loginState,
global_domain_config: state.login.global_domain_config,
sysProfiles: state.login.sysProfiles,
}
}
const mapDispatchToProps = (dispatch) => {
return {
exitLoginStatus: () => {
dispatch(exitLoginStatus())
},
}
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