Commit 744e4c61 by Denglingling

完善自助下单

parent 881468b9
import React, { Component } from 'react';
import { View, Text, StyleSheet, SafeAreaView, Modal, ScrollView, TouchableOpacity, FlatList, Image } from 'react-native';
import { pxHeight, foundation_color, promary_color, second_text_color, first_text_color, Width, pxSize, safe_view, font_family_medium, font_family_light, list_common_item, third_text_size, icon_style, point_color, title_text_color, second_text_size } from '../../base/BaseStyle';
import { pxHeight, foundation_color, promary_color, second_text_color, first_text_color, Width, pxSize, safe_view, font_family_medium, font_family_light, list_common_item, third_text_size, icon_style, point_color, title_text_color, second_text_size, font_family_semibold, font_family_regular } from '../../base/BaseStyle';
import ChooseCardList from '../common/listDataComponent/ChooseCardList';
import PicTitDetaiCalcu from '../common/listDataComponent/PicTitDetaiCalcu';
import _ from "lodash";
......@@ -554,8 +554,22 @@ class ProductModel extends Component {
handleClearRubbish() {
let { orginOptionList, topProcOptionList } = this.state
// this.refs.ClearAllModel.show('清空当前所有数据')
// console.log('this--', this)
this.modelClearAllCB(true)
console.log('this--', this)
// this.modelClearAllCB(true)
let that = this
topProcOptionList.map(function(top_item) {
top_item[LocalVariable.SELECTED_QUQNTITY] = 0
top_item[LocalVariable.SELECTED_DATA_ARR] = []
})
that.props.changeCallBack(topProcOptionList)
that.setState({
topProcOptionList: topProcOptionList
})
setTimeout(() => {
that.closeModal()
}, 300)
}
// 清空当前
......@@ -578,7 +592,7 @@ class ProductModel extends Component {
this.props.changeCallBack(topProcOptionList)
console.log('topProcOptionList=====', allCountQuantity)
// console.log('topProcOptionList=====', allCountQuantity)
this.setState({
topProcOptionList: topProcOptionList
......@@ -591,6 +605,7 @@ class ProductModel extends Component {
// 清空所有回调
modelClearAllCB(clear_flag){
console.log('clear_flag===', clear_flag)
console.log('clear_flag===', this)
let { orginOptionList, topProcOptionList } = this.state
let that = this
if(clear_flag){
......@@ -598,8 +613,6 @@ class ProductModel extends Component {
top_item[LocalVariable.SELECTED_QUQNTITY] = 0
top_item[LocalVariable.SELECTED_DATA_ARR] = []
})
console.log('清空',this)
that.props.changeCallBack(topProcOptionList)
that.setState({
......@@ -736,20 +749,7 @@ class ProductModel extends Component {
})
}
console.log('底部🉐️=====', localBottomContData)
// localBottomContData = [{
// supplier_short_name: "嘉思特华剑医疗器材(天津)有限公司", // 测试
// supplier_code: "SU00000369", // 测试
// [LocalVariable.CHILDREN_LINE_NAME]: localBottomContData
// },{
// supplier_short_name: "天津正天医疗器械有限公司", // 测试
// supplier_code: "SU00000360", // 测试
// [LocalVariable.CHILDREN_LINE_NAME]: localBottomContData
// },{
// supplier_short_name: "常州奥斯迈医疗器械有限公司", // 测试
// supplier_code: "SU00000390", // 测试
// [LocalVariable.CHILDREN_LINE_NAME]: localBottomContData
// }]
// console.log('底部🉐️=====', localBottomContData)
return (
<View style={styles.edit_cont}>
......@@ -777,9 +777,15 @@ class ProductModel extends Component {
let curListMaxNum = ''
if (topActiveIndex === 0) {
curTit = 'superTit'
curTipOne = 'superTip'
curTipStr = 'superTipStr'
curTipOne = 'superTipOne'
curTipTwo = 'superTip'
// curTipOne = 'superTip'
curTxtTit='套包名'
curTipOneTit = '详情'
// curTipOneTit = '详情'
curTipStrTit = '客户'
curTipOneTit = '主治医生'
curTipTwoTit = '详情'
} else if(topActiveIndex === 1){
curTit = 'item_name'
curTipStr = 'general_name'
......@@ -827,7 +833,6 @@ class ProductModel extends Component {
// let cur_icon = ''
// cur_icon = { uri: global_domain_config + '/jeecg-boot/sys/common/view/' + cur_supplier_icon[0] }
let bttom_options = []
if (item[LocalVariable.CHILDREN_LINE_NAME]) {
if (item.category_code === LocalVariable.SURGICAL_TEMPLATE) {
......@@ -841,9 +846,7 @@ class ProductModel extends Component {
bttom_options = item[LocalVariable.CHILDREN_LINE_NAME]
}
}
console.log('哈👌===', bttom_options)
// console.log('哈👌===', bttom_options)
return (
<TouchableOpacity
......@@ -1108,6 +1111,8 @@ const styles = StyleSheet.create({
},
col_shpp_tit: {
fontSize: 12,
fontFamily: font_family_regular,
color: first_text_color
},
col_shpp_clear: {},
list_icon: {
......@@ -1140,7 +1145,8 @@ const styles = StyleSheet.create({
},
rb_icon_txt: {
fontSize: 12,
fontFamily: font_family_light,
fontFamily: font_family_regular,
color: second_text_color,
paddingLeft: 4
},
fo_btn_lef: {
......
......@@ -124,9 +124,6 @@ class PicTitDetaiCalcu extends Component {
}
// console.log('cur_photos--', cur_photos)
console.log('cur_photos--', tipTextOneTit)
console.log('cur_photos--', listItem)
console.log('cur_photos--', tipTextOne)
return (
<View style={[styles.ri_inner, listStyleBox]}>
......
......@@ -48,7 +48,7 @@ class PictureZoom extends Component {
Image.prefetch(that.state.curImgUrl.uri).then((result) => {
// console.log('缓存图片:',result)
}).catch((error) => {
console.log('缓存图片--err:', error)
// console.log('缓存图片--err:', error)
that.setState({
curImgUrl: require('../../../images/not_img.png'),
curImgFail: false
......@@ -59,7 +59,7 @@ class PictureZoom extends Component {
}
componentWillReceiveProps(nextProps){
console.log('改变', nextProps)
// console.log('改变', nextProps)
// let { listImageUrls, listImageIndex } = this.nextProps
let { listImageUrls, listImageIndex } = this.props
let { curImgUrl, curImgFail } = this.state
......@@ -143,55 +143,6 @@ class PictureZoom extends Component {
// curImgFail: false
// })
// }
// if(curImgUrl.uri){
// Image.prefetch(curImgUrl.uri).then((result) => {
// console.log('lw---lh:',result)
// console.log('curImgUrl==:',curImgUrl)
// }).catch((error) => {
// console.log('lw---lh--err:',error)
// // curImgUrl = require('../../../images/not_img.png')
// // curImgFail = false
// that.setState({
// curImgUrl: require('../../../images/not_img.png'),
// curImgFail: false
// }, () => {
// console.log('curImgUrl==:',curImgUrl, curImgFail)
// })
// })
// }
// let canShow = true
// let cur_defalut = { uri: listImageUrls[listImageIndex].url }
// if (!listImageUrls[listImageIndex].url) {
// cur_defalut = require('../../../images/not_img.png')
// canShow = false
// }
// if(cur_defalut.uri){
// Image.prefetch(cur_defalut.uri).then((result) => {
// console.log('lw---lh:',result)
// console.log('cur_defalut==:',cur_defalut)
// }).catch((error) => {
// console.log('lw---lh--err:',error)
// cur_defalut = require('../../../images/not_img.png')
// canShow = false
// console.log('cur_defalut==:',cur_defalut, canShow)
// })
// // Image.getSize(cur_defalut.uri, (width, height) => {
// // console.log('lw---lh:',width, height)
// // },err => {
// // console.log('lw---lh--!!==err:',err)
// // cur_defalut = require('../../../images/not_img.png')
// // canShow = false
// // })
// }
return (
<View style={[styles.container]}>
......@@ -201,11 +152,12 @@ class PictureZoom extends Component {
onPress={curImgUrl.uri ? () => this.handleShowZoomPic(true) : null}
>
<ImageBackground
source={require('../../../images/not_img.png')}
style={icon_style}>
source={curImgUrl.uri ? null : require('../../../images/not_img.png')}
style={[styles.img_bg_box]}
>
<Image
source={curImgUrl}
style={icon_style}
style={[icon_style, styles.img_bg]}
resizeMode="cover"
defaultSource={require('../../../images/not_img.png')} />
</ImageBackground>
......@@ -274,6 +226,14 @@ const styles = StyleSheet.create({
fontSize: second_text_size,
color: 'white',
fontFamily: font_family_medium
},
img_bg_box: {
resizeMode: 'cover',
width: '90%',
height: '90%'
},
img_bg: {
// backgroundColor: 'rgba(255,255,255,1)'
}
})
......
......@@ -7,7 +7,8 @@ import {
icon_style,
pxSize,
foundation_color,
font_family_regular
font_family_regular,
first_text_color
} from '../../base/BaseStyle';
import StatusBarView from '../common/StatusBarView';
import HeadBackItem from '../common/HeadBackItem';
......@@ -400,7 +401,8 @@ const styles = StyleSheet.create({
},
btn_item_txt: {
fontSize: 12,
fontFamily: font_family_regular
fontFamily: font_family_regular,
color: first_text_color
}
})
......
......@@ -109,16 +109,24 @@ class ProductRightStyle extends Component {
let superTip = ''
childData.map((chDa, chInd) => {
let splitStr = ' / '
if (chInd === childData.length - 1) {
// if (chInd === childData.length - 1) {
// splitStr = ''
// }
if(!superTip){
splitStr = ''
}
superTip += `${chDa.category_name}x${chDa[LocalVariable.SELECTED_QUQNTITY]}${splitStr}`
if(chDa[LocalVariable.SELECTED_QUQNTITY] > 0){
superTip += `${splitStr}${chDa.category_name}x${chDa[LocalVariable.SELECTED_QUQNTITY]}`
}
// superTip += `${chDa.category_name}x${chDa[LocalVariable.SELECTED_QUQNTITY]}${splitStr}`
})
let curObj = {
superId: rsdItem['template_number'],
superIndex: rsdIndex,
superTit: rsdItem['template_name'],
superImg: rsdItem['photos'],
superTipStr: rsdItem['customer_name'],
superTipOne: rsdItem['doctor_name'],
superTip: superTip,
version: 0,
lineOptions: childData,
......@@ -293,6 +301,7 @@ class ProductRightStyle extends Component {
plusCallBack={curPlusCallBack}
reduceCallBack={curReduceCallBack}
listMaxNum={curListMaxNum}
listStyleImg={styles.rig_icon}
/>
</SafeAreaView>
)
......@@ -491,7 +500,8 @@ const styles = StyleSheet.create({
width: Width() - 80,
backgroundColor: foundation_color,
height: '100%',
paddingHorizontal: 20
paddingHorizontal: 20,
paddingLeft: 10
},
cont_right_scroll_cont: {},
cont_right_list: {},
......@@ -523,7 +533,11 @@ const styles = StyleSheet.create({
marginBottom: 10
},
cont_thr_list: {},
thr_container: {}
thr_container: {},
rig_icon: {
width: pxSize(68),
height: pxSize(68)
}
})
const mapStateToProps = (state) => {
......
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