Commit 6cf3dd25 by Denglingling

1、增加顶部【返回】文字;2、修改【手术医院】为【客户名称】;3、过滤【消耗明细】是否提过消耗数据;4、修改【历史订单】筛选部分样式;

parent 41e40b76
......@@ -360,7 +360,7 @@ export const list_common_item = {
},
lef_btn: {
backgroundColor: '#4F4F4F',
width: '66%',
width: '65%',
borderTopLeftRadius: 10,
borderBottomLeftRadius: 10,
height: 50
......@@ -374,7 +374,7 @@ export const list_common_item = {
},
rig_btn: {
backgroundColor: promary_color,
width: '34%',
width: '35%',
borderTopRightRadius: 10,
borderBottomRightRadius: 10,
height: 50
......
......@@ -12,7 +12,8 @@ import {
title_text_color,
font_family_regular,
pxSize,
Width
Width,
icon_style
} from '../../base/BaseStyle';
class HeadBackItem extends Component {
......@@ -22,13 +23,10 @@ class HeadBackItem extends Component {
}
goBack() {
// console.warn('返回!=====')
// console.warn(this.props)
this.props.navigation.goBack()
}
render() {
// console.warn(this.props)
let {title} = this.props
return (
<View style={styles.header_style}>
......@@ -38,10 +36,11 @@ class HeadBackItem extends Component {
onPress={() => this.goBack()}
>
<View style={styles.back_style}>
<Image source={require('../../images/arrow_icon.png')} style={styles.back_style_img}/>
<Image source={require('../../images/arrow_icon.png')} style={icon_style}/>
</View>
<Text style={styles.back_tip}>返回</Text>
</TouchableOpacity>
<Text style={styles.title_style}>{title}</Text>
<Text style={styles.title_style} numberOfLines={1} ellipsizeMode={'tail'}>{title}</Text>
</View>
);
}
......@@ -54,24 +53,28 @@ const styles = StyleSheet.create({
width: Width(),
backgroundColor: promary_color,
alignItems: 'center',
justifyContent: 'flex-start',
justifyContent: 'space-between',
paddingLeft: '5%'
},
head_img_box: {
width: 40,
alignItems: 'flex-start',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'flex-start'
},
back_style: {
width: pxSize(18),
width: pxSize(11),
height: pxSize(18)
},
back_style_img: {
resizeMode: 'contain',
width: '100%'
back_tip: {
fontSize: 18,
color: title_text_color,
fontFamily: font_family_regular,
paddingLeft: 4
},
title_style: {
width: Width() - 120,
flex: 1,
marginLeft: 30,
marginRight: 66,
textAlign: 'center',
fontSize: 18,
color: title_text_color,
......
......@@ -122,8 +122,12 @@ class ConsumDetailsPage extends Component {
let detailResult = await requestEquipDetails(global_domain_config, params)
if(detailResult.error_code === 0) {
let {lines} = detailResult.data
// 需要过滤已提过消耗的数据 raised_consume="Y"
lines = lines.filter((fiItem) => {
return fiItem.raised_consume != 'Y'
})
let {subDetOption} = this.props // 【器械消耗】已存在的明细
console.log('subDetOption-----', subDetOption)
// console.log('subDetOption-----', subDetOption)
subDetOption.length && subDetOption.forEach((item, index) => {
lines.length && lines.forEach((chItem, chInd) => {
if(chItem.serial_number == item.serial_number) {
......@@ -152,7 +156,7 @@ class ConsumDetailsPage extends Component {
// 搜索 输入
handleSearchInput(text) {
console.log('搜索 输入---', text)
// console.log('搜索 输入---', text)
let {allConOption} = this.state
let self = this
let tempArr = []
......@@ -183,13 +187,13 @@ class ConsumDetailsPage extends Component {
// 取消选择
handleCelSelCheck(item, index) {
console.log('取消===cel:', item, index)
// console.log('取消===cel:', item, index)
this.changeIsSelected(index, false)
}
// 确定选择
handleSubSelectedCheck(item, index) {
console.log('确定===sub:', item, index)
// console.log('确定===sub:', item, index)
this.changeIsSelected(index, true)
}
......@@ -203,7 +207,7 @@ class ConsumDetailsPage extends Component {
this.setState({
conDetaOption
},() => {
console.log('conDetaOption---修改-', conDetaOption)
// console.log('conDetaOption---修改-', conDetaOption)
let tempArr = []
conDetaOption.forEach(item => {
if(item.select) {
......@@ -218,7 +222,7 @@ class ConsumDetailsPage extends Component {
// 已选回调函数
detailsCallbak(subOpt) {
console.log('----回调:',subOpt)
// console.log('----回调:',subOpt)
let tempOption = [...this.state.conDetaOption]
// 获取当前已选值
tempOption = tempOption.map(item => {
......@@ -248,13 +252,13 @@ class ConsumDetailsPage extends Component {
// 点击 已选
handleSubSelected(show) {
console.warn('已选:666!!')
// console.warn('已选:666!!')
this.handleCloseSelectModal(true)
}
// 点击 确定耗材
handleSubmit() {
console.warn('确定耗材', this.props.navigation.navigate)
// console.warn('确定耗材', this.props.navigation.navigate)
this.handleCloseSelectModal(false)
let {localSelectOption} = this.state
if(!localSelectOption.length) {
......@@ -449,11 +453,10 @@ const styles = StyleSheet.create({
fontFamily: font_family_regular
},
fot_btn_lef: {
width: pxSize(220)
// width: pxSize(220)
},
fot_btn_rig: {
width: pxSize(120)
// width: '38%'
// width: pxSize(120)
},
loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)'
......
......@@ -15,15 +15,10 @@ import {
foundation_color,
promary_color,
second_text_color,
third_text_color,
first_text_color,
second_text_size,
Width,
pxSize,
dis_sub_color,
safe_view,
font_family_medium,
font_family_light,
list_common_item,
icon_style,
font_family_regular
......@@ -105,9 +100,9 @@ class DetailsModel extends Component {
}
}
// 共计已选 点击
// 已选 点击
handleCloseSelected() {
console.warn('共计已选:666--model')
// console.warn('已选:666--model')
let {contOptionData} = this.state
this.props.callback(contOptionData)
......@@ -118,7 +113,7 @@ class DetailsModel extends Component {
// 确定耗材 点击
handleCloseSubmit() {
console.warn('确定耗材--model')
// console.warn('确定耗材--model')
this.closeModal()
this.props.closeSubmit(false)
}
......@@ -136,7 +131,7 @@ class DetailsModel extends Component {
* @param {number} index 当前角标
*/
handleDelItemClick(item, index) {
console.log('-----删除-----', item, index)
// console.log('-----删除-----', item, index)
let { contOptionData } = this.state
contOptionData.splice(index, 1)
this.setState({
......@@ -246,7 +241,7 @@ class DetailsModel extends Component {
style={list_common_item.lef_btn}
onPress={() => this.handleCloseSelected()}
>
<Text style={list_common_item.lef_tip}>共计已选:{contOptionData.length}</Text>
<Text style={list_common_item.lef_tip}>已选:{contOptionData.length}</Text>
</TouchableOpacity>
<TouchableOpacity
activeOpacity={.8}
......
......@@ -24,39 +24,39 @@ class FillUnitPricePage extends Component {
super(props);
this.state = {
unitPriceOption: [
{
"id": "2",
item_name: '人工髋关节假体-JS-HB ||| T',
specification: '3g,Ytg-DG-SZGT',
serial_number: '2001202001001774',
sale_price: 90890,
local_add_price: 90890,
select: true
},{
"id": "3",
item_name: '人工髋关节假体-JS-HB ||| T4',
specification: '3g,Ytg-DG-SZGT',
serial_number: '2001202001001774',
sale_price: 90890,
local_add_price: 90890,
select: true
},{
"id": "4",
item_name: '人工髋关节假体-JS-HB ||| T5',
specification: '3g,Ytg-DG-SZGT',
serial_number: '2001202001001774',
sale_price: 90890,
local_add_price: 90890,
select: true
},{
"id": "5",
item_name: '人工髋关节假体-JS-HB ||| T6',
specification: '3g,Ytg-DG-SZGT',
serial_number: '2001202001001774',
sale_price: 90890,
local_add_price: 90890,
select: true
}
// {
// "id": "2",
// item_name: '人工髋关节假体-JS-HB ||| T',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// sale_price: 90890,
// local_add_price: 90890,
// select: true
// },{
// "id": "3",
// item_name: '人工髋关节假体-JS-HB ||| T4',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// sale_price: 90890,
// local_add_price: 90890,
// select: true
// },{
// "id": "4",
// item_name: '人工髋关节假体-JS-HB ||| T5',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// sale_price: 90890,
// local_add_price: 90890,
// select: true
// },{
// "id": "5",
// item_name: '人工髋关节假体-JS-HB ||| T6',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// sale_price: 90890,
// local_add_price: 90890,
// select: true
// }
]
}
}
......@@ -68,7 +68,7 @@ class FillUnitPricePage extends Component {
// 获取选择的数据
getLocalSelectedData() {
let {localSelectOption} = this.props.navigation.state.params
console.log('-------localSelectOption--------', localSelectOption)
// console.log('-------localSelectOption--------', localSelectOption)
this.setState({
unitPriceOption: localSelectOption
})
......@@ -76,7 +76,7 @@ class FillUnitPricePage extends Component {
// 每一个元素输入单价
handleItemPriceInput(text, index) {
console.warn('单价------input:', text, index, typeof Number(text))
// console.warn('单价------input:', text, index, typeof Number(text))
let {unitPriceOption} = this.state
unitPriceOption[index].local_add_price = Number(text)
this.setState({
......@@ -86,7 +86,7 @@ class FillUnitPricePage extends Component {
// 确定单价 点击
handleSubmit() {
console.warn('确定单价------check:')
// console.warn('确定单价------check:')
let {unitPriceOption} = this.state
let canSubFlag = true
let {props} = this
......@@ -102,7 +102,7 @@ class FillUnitPricePage extends Component {
this.setState({
unitPriceOption
})
console.log('unitPriceOption====', unitPriceOption)
// console.log('unitPriceOption====', unitPriceOption)
// 存储于store中,并跳转
props.getSubdetailOption(unitPriceOption)
props.navigation.navigate('EquipConsuPage', { title: '器械消耗' })
......@@ -129,7 +129,7 @@ class FillUnitPricePage extends Component {
// 返回每一列元素
renderSubListItem(item, index) {
console.log('item, index---',item, index)
// console.log('item, index---',item, index)
let price = ''
if(item.local_add_price) {
price = String(item.local_add_price)
......
......@@ -21,7 +21,7 @@ import {
import { exitLoginStatus } from '../../action/LoginAction';
import HeadBackItem from '../common/HeadBackItem';
import StatusBarView from '../common/StatusBarView';
import ScrollableTabView, { DefaultTabBar } from 'react-native-scrollable-tab-view';
import ScrollableTabView from 'react-native-scrollable-tab-view';
import TabBottomItem from './module/TabBottomItem';
class HomePage extends Component {
......@@ -85,11 +85,12 @@ class HomePage extends Component {
switchTabView(obj) {
console.log('切换===',obj)
if(obj.i == 1) {
// 跳转到历史订单页面
this.props.navigation.navigate('HistoricalOrderPage', {title: '历史订单'})
this.setState({
initialPage: 0
})
// 跳转到历史订单页面
this.props.navigation.navigate('HistoricalOrderPage', {title: '历史订单'})
}
}
......@@ -126,16 +127,14 @@ class HomePage extends Component {
tabBarPosition='bottom'
locked={true}
renderTabBar={() =>
// <DefaultTabBar />
<TabBottomItem
tabNames={tabNames}
tabIconNames={tabIconNames}
tabSelIconNames={tabSelIconNames}
/>
tabNames={tabNames}
tabIconNames={tabIconNames}
tabSelIconNames={tabSelIconNames}
/>
}
onChangeTab={(obj) => this.switchTabView(obj)}
>
{/* <Text tabLabel={tabNames[0]}>My</Text> */}
<View style={styles.home_cont} tabLabel={tabNames[0]}>
{
this.state.showList.map((item, index) =>
......
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