Commit 6cf3dd25 by Denglingling

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

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