Commit 25351b6d by Denglingling

优化【库存不足】弹窗样式等;

parent 81f53c91
...@@ -29,69 +29,33 @@ class NotEnoughModel extends Component { ...@@ -29,69 +29,33 @@ class NotEnoughModel extends Component {
super(props); super(props);
this.state = { this.state = {
isVisible: this.props.show, isVisible: this.props.show,
notEnoughList: this.props.notEnoughList, not_enough_items_list: this.props.not_enough_items_list,
title: '以下物品缺失,是否继续提交?', title: '以下物品缺失,是否继续提交?'
not_enough_items_list: [
{
"item_code": "AR00000004",
"reg_number": "国械注进20173466362",
"plan_quantity": 10,
"specification": "2.2mm带线锚钉,蓝色缝线",
"item_name": "钛合金缝线锚钉",
"general_name": "钛合金锚钉",
"storage_quantity": 0
},
{
"item_code": "AR00000003",
"reg_number": "国械注进20173466362",
"plan_quantity": 10,
"specification": "3.5*12.1,蓝色缝线",
"item_name": "钛合金缝线锚钉",
"general_name": "钛合金锚钉",
"storage_quantity": 6
},
{
"item_code": "AR00000002",
"reg_number": "国械注进20173466362",
"plan_quantity": 10,
"specification": "5.0X15.5,蓝色缝线",
"item_name": "钛合金缝线锚钉",
"general_name": "钛合金锚钉",
"storage_quantity": 4
}
],
} }
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
// console.warn('------show--------------',nextProps.show, this.state.isVisible )
if (this.state.isVisible != nextProps.show) { if (this.state.isVisible != nextProps.show) {
this.setState({ this.setState({
isVisible: nextProps.show isVisible: nextProps.show
}); });
} }
if (this.state.notEnoughList != nextProps.notEnoughList) { if (this.state.not_enough_items_list != nextProps.not_enough_items_list) {
this.setState({ this.setState({
notEnoughList: nextProps.notEnoughList not_enough_items_list: nextProps.not_enough_items_list
}) })
} }
} }
// 取消
closeModal() { closeModal() {
this.setState({ this.setState({
isVisible: false isVisible: false
}); });
this.props.closeModal(false); this.props.closeModal(false);
} }
// 确定
submitModal() { submitModal() {
console.log('确定!!!')
this.props.callback(); this.props.callback();
this.closeModal() this.closeModal()
} }
renderNotEnItem(item, index) { renderNotEnItem(item, index) {
return ( return (
<TouchableOpacity <TouchableOpacity
...@@ -122,9 +86,8 @@ class NotEnoughModel extends Component { ...@@ -122,9 +86,8 @@ class NotEnoughModel extends Component {
</TouchableOpacity> </TouchableOpacity>
) )
} }
renderDialog() { renderDialog() {
let { notEnoughList, title, not_enough_items_list } = this.state let { not_enough_items_list, title } = this.state
return ( return (
<View style={styles.opt_area}> <View style={styles.opt_area}>
<View style={styles.modal_style}> <View style={styles.modal_style}>
...@@ -146,10 +109,8 @@ class NotEnoughModel extends Component { ...@@ -146,10 +109,8 @@ class NotEnoughModel extends Component {
style={styles.item_scroll} style={styles.item_scroll}
// showsVerticalScrollIndicator={false} // showsVerticalScrollIndicator={false}
> >
{/* notEnoughList not_enough_items_list */}
{ {
notEnoughList.map((item, index) => this.renderNotEnItem(item, index)) not_enough_items_list.map((item, index) => this.renderNotEnItem(item, index))
} }
</ScrollView> </ScrollView>
</View> </View>
...@@ -250,8 +211,10 @@ const styles = StyleSheet.create({ ...@@ -250,8 +211,10 @@ const styles = StyleSheet.create({
maxHeight: pxHeight(320), maxHeight: pxHeight(320),
minHeight: pxHeight(220), minHeight: pxHeight(220),
borderWidth: 1, borderWidth: 1,
borderColor: '#E0E0E0', borderColor: '#eaeaea',
paddingLeft: 4 paddingLeft: 6,
borderRadius: 4,
paddingBottom: 6
}, },
item_scroll: {}, item_scroll: {},
modal_head: { modal_head: {
...@@ -273,30 +236,30 @@ const styles = StyleSheet.create({ ...@@ -273,30 +236,30 @@ const styles = StyleSheet.create({
fontFamily: font_family_medium fontFamily: font_family_medium
}, },
head_tou_clo: { head_tou_clo: {
width: pxSize(28), width: pxSize(24),
height: pxSize(28) height: pxSize(24)
}, },
cont_list: {}, cont_list: {},
co_li: { co_li: {
lineHeight: 20, lineHeight: 20,
fontSize: 14, fontSize: 12,
fontFamily: font_family_regular, fontFamily: font_family_regular,
color: second_text_color color: second_text_color
}, },
co_str: { co_str: {
fontFamily: font_family_semibold, fontFamily: font_family_semibold,
fontWeight: '500', fontWeight: '500',
fontSize: 16, fontSize: 14,
paddingTop: 6, paddingTop: 6,
paddingBottom: 2, paddingBottom: 2,
color: first_text_color color: first_text_color
}, },
plan_num: { plan_num: {
fontSize: 16, fontSize: 14,
fontFamily: font_family_semibold fontFamily: font_family_semibold
}, },
sto_num: { sto_num: {
fontSize: 16, fontSize: 14,
fontFamily: font_family_semibold, fontFamily: font_family_semibold,
color: 'red' color: 'red'
}, },
...@@ -305,13 +268,13 @@ const styles = StyleSheet.create({ ...@@ -305,13 +268,13 @@ const styles = StyleSheet.create({
justifyContent: 'space-around' justifyContent: 'space-around'
}, },
foo_btn: { foo_btn: {
width: pxSize(100), width: '38%',
height: pxSize(36), height: pxSize(36),
borderRadius: 5, borderRadius: 5,
marginTop: 20 marginTop: 20
}, },
btn_cel: { btn_cel: {
backgroundColor: '#E0E0E0' backgroundColor: '#E7F1FD'
}, },
btn_sub: { btn_sub: {
backgroundColor: promary_color backgroundColor: promary_color
...@@ -323,7 +286,7 @@ const styles = StyleSheet.create({ ...@@ -323,7 +286,7 @@ const styles = StyleSheet.create({
lineHeight: 32 lineHeight: 32
}, },
tit_cel: { tit_cel: {
color: first_text_color color: '#007EFF'
}, },
}) })
......
...@@ -33,7 +33,7 @@ import { ...@@ -33,7 +33,7 @@ import {
FooterBtnStyle FooterBtnStyle
} from '../common/CellTextStyle'; } from '../common/CellTextStyle';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { show, isEmpty, dedupQuoteArray, formatStrForDate, cloneObject } from '../../utils/Utils'; import { show, dedupQuoteArray, formatStrForDate, cloneObject } from '../../utils/Utils';
import { AudioRecorder, AudioUtils } from 'react-native-audio'; import { AudioRecorder, AudioUtils } from 'react-native-audio';
import Sound from 'react-native-sound'; import Sound from 'react-native-sound';
import DateModel from '../common/DateModel'; import DateModel from '../common/DateModel';
...@@ -118,7 +118,7 @@ class EquipConsuPage extends Component { ...@@ -118,7 +118,7 @@ class EquipConsuPage extends Component {
}, },
{ {
"id": "8", "id": "8",
title: '手术时间', title: '手术时间',
name: '请选择', name: '请选择',
value: '', value: '',
dateValue: new Date(), dateValue: new Date(),
...@@ -214,7 +214,7 @@ class EquipConsuPage extends Component { ...@@ -214,7 +214,7 @@ class EquipConsuPage extends Component {
} }
], ],
showNotEnogPop: false, // 库存不足弹窗 showNotEnogPop: false, // 库存不足弹窗
notEnoughList:[], // 库存不足数据 not_enough_items_list:[], // 库存不足数据
} }
} }
...@@ -670,10 +670,8 @@ class EquipConsuPage extends Component { ...@@ -670,10 +670,8 @@ class EquipConsuPage extends Component {
}) })
return result return result
} }
// 组织 点击 // 组织 点击
handleOrganizationCheck() { handleOrganizationCheck() {
// console.warn('组织------check')
let { state, props } = this let { state, props } = this
this.setState({ this.setState({
currentTitle: '组织', currentTitle: '组织',
...@@ -688,10 +686,8 @@ class EquipConsuPage extends Component { ...@@ -688,10 +686,8 @@ class EquipConsuPage extends Component {
props.requestQuickOrganizations(params) props.requestQuickOrganizations(params)
}) })
} }
// 客户名称 点击 // 客户名称 点击
handleCustomerCheck() { handleCustomerCheck() {
// console.warn('客户名称------check')
let { state, props } = this let { state, props } = this
let self = this let self = this
if(this.judgeOrgIsNull()) { if(this.judgeOrgIsNull()) {
...@@ -707,7 +703,6 @@ class EquipConsuPage extends Component { ...@@ -707,7 +703,6 @@ class EquipConsuPage extends Component {
}) })
} }
} }
// 获取客户名称 // 获取客户名称
getCustomerData() { getCustomerData() {
let { state, props } = this let { state, props } = this
...@@ -718,10 +713,8 @@ class EquipConsuPage extends Component { ...@@ -718,10 +713,8 @@ class EquipConsuPage extends Component {
} }
props.requestQuickSurgeryHospital(params) props.requestQuickSurgeryHospital(params)
} }
// 收单地点 点击 // 收单地点 点击
handleBillCheck() { handleBillCheck() {
// console.warn('收单地点------check')
let { localCustomersOption, listOptionData } = this.state let { localCustomersOption, listOptionData } = this.state
let self = this let self = this
if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) { if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
...@@ -752,10 +745,8 @@ class EquipConsuPage extends Component { ...@@ -752,10 +745,8 @@ class EquipConsuPage extends Component {
}) })
} }
} }
// 收货地点 点击 // 收货地点 点击
handleShipCheck() { handleShipCheck() {
// console.warn('收货地点------check')
let { localCustomersOption, listOptionData } = this.state let { localCustomersOption, listOptionData } = this.state
let self = this let self = this
if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) { if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
...@@ -786,10 +777,8 @@ class EquipConsuPage extends Component { ...@@ -786,10 +777,8 @@ class EquipConsuPage extends Component {
}) })
} }
} }
// 主治医生 点击/输入 // 主治医生 点击/输入
handleDoctorCheck(text) { handleDoctorCheck(text) {
// console.warn('主治医生------check', text)
let { localCustomersOption, listOptionData } = this.state let { localCustomersOption, listOptionData } = this.state
let self = this let self = this
if(text) { if(text) {
...@@ -836,10 +825,8 @@ class EquipConsuPage extends Component { ...@@ -836,10 +825,8 @@ class EquipConsuPage extends Component {
}) })
} }
} }
// 手术类型 点击 // 手术类型 点击
handleSurTypeCheck() { handleSurTypeCheck() {
// console.warn('手术类型------check')
let { listOptionData, surgeryTypeOption } = this.state let { listOptionData, surgeryTypeOption } = this.state
let self = this let self = this
if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) { if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
...@@ -857,10 +844,8 @@ class EquipConsuPage extends Component { ...@@ -857,10 +844,8 @@ class EquipConsuPage extends Component {
}) })
} }
} }
// 配台模版 点击 // 配台模版 点击
handleMatchTempCheck() { handleMatchTempCheck() {
// console.warn('配台模版------check')
let { state, props } = this let { state, props } = this
if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) { if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
this.setState({ this.setState({
...@@ -887,16 +872,14 @@ class EquipConsuPage extends Component { ...@@ -887,16 +872,14 @@ class EquipConsuPage extends Component {
}) })
} }
} }
// 手术时间 点击 2020-04-23 17:41
// 手术类时间 点击 2020-04-23 17:41
handleSurDateCheck() { handleSurDateCheck() {
// console.warn('手术类时间 点击 ===')
let { listOptionData } = this.state let { listOptionData } = this.state
let date = listOptionData[8].value let date = listOptionData[8].value
if(date) { if(date) {
this.setState({ this.setState({
listOptionData: listOptionData.map((item, index) => { listOptionData: listOptionData.map((item, index) => {
if(item.title === '手术时间') { if(item.title === '手术时间') {
item.dateValue = formatStrForDate(date) item.dateValue = formatStrForDate(date)
} }
return item return item
...@@ -905,20 +888,18 @@ class EquipConsuPage extends Component { ...@@ -905,20 +888,18 @@ class EquipConsuPage extends Component {
} }
this.closeDateModal(true) this.closeDateModal(true)
} }
// 关闭日期选择器 // 关闭日期选择器
closeDateModal(show) { closeDateModal(show) {
this.setState({ this.setState({
dateModelPop: show dateModelPop: show
}) })
} }
// 修改当前日期数据 // 修改当前日期数据
dateModalCallback(date) { dateModalCallback(date) {
let { listOptionData } = this.state let { listOptionData } = this.state
this.setState({ this.setState({
listOptionData: listOptionData.map((item) => { listOptionData: listOptionData.map((item) => {
if(item.title === '手术时间') { if(item.title === '手术时间') {
item.name = date item.name = date
item.value = date item.value = date
item.dateValue = formatStrForDate(date) item.dateValue = formatStrForDate(date)
...@@ -927,10 +908,8 @@ class EquipConsuPage extends Component { ...@@ -927,10 +908,8 @@ class EquipConsuPage extends Component {
}) })
}) })
} }
// 订单类型 点击 // 订单类型 点击
handleOrderCheck() { handleOrderCheck() {
// console.warn('订单类型------check')
let { state, props } = this let { state, props } = this
if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) { if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
this.setState({ this.setState({
...@@ -949,10 +928,8 @@ class EquipConsuPage extends Component { ...@@ -949,10 +928,8 @@ class EquipConsuPage extends Component {
}) })
} }
} }
// 备注 输入 // 备注 输入
handleRemarkInput(text) { handleRemarkInput(text) {
// console.warn('备注---',text)
let { listOptionData } = this.state let { listOptionData } = this.state
this.setState({ this.setState({
listOptionData: listOptionData.map((item, index) => { listOptionData: listOptionData.map((item, index) => {
...@@ -963,18 +940,15 @@ class EquipConsuPage extends Component { ...@@ -963,18 +940,15 @@ class EquipConsuPage extends Component {
}) })
}) })
} }
// 生成订单 点击 // 生成订单 点击
async handleSubmit() { async handleSubmit() {
this.changeCanSub(true) this.changeCanSub(true)
let { state, props } = this let { state, props } = this
let that = this let that = this
// 可提交 并且 不处于正在提交中 // 可提交 并且 不处于正在提交中
if(state.canSubFlag && !state.isSubLoding) { if(state.canSubFlag && !state.isSubLoding) {
// 先提交录音,再提交接口 // 先提交录音,再提交接口
if(state.stop) { if(state.stop) {
// 有录音
let params = { let params = {
access_token: props.token, access_token: props.token,
path: state.audioPath path: state.audioPath
...@@ -1010,7 +984,6 @@ class EquipConsuPage extends Component { ...@@ -1010,7 +984,6 @@ class EquipConsuPage extends Component {
} }
} }
} }
// 提交订单 // 提交订单
submitQuickOrder() { submitQuickOrder() {
let { state, props } = this let { state, props } = this
...@@ -1036,7 +1009,6 @@ class EquipConsuPage extends Component { ...@@ -1036,7 +1009,6 @@ class EquipConsuPage extends Component {
} }
props.requestQuickSumbit(params) props.requestQuickSumbit(params)
} }
// 判断组织是否为空 // 判断组织是否为空
judgeOrgIsNull() { judgeOrgIsNull() {
let { listOptionData } = this.state let { listOptionData } = this.state
...@@ -1048,7 +1020,6 @@ class EquipConsuPage extends Component { ...@@ -1048,7 +1020,6 @@ class EquipConsuPage extends Component {
return true return true
} }
} }
// 判断客户名称是否为空 // 判断客户名称是否为空
judgeCustomerIsNull() { judgeCustomerIsNull() {
let { listOptionData } = this.state let { listOptionData } = this.state
...@@ -1060,7 +1031,6 @@ class EquipConsuPage extends Component { ...@@ -1060,7 +1031,6 @@ class EquipConsuPage extends Component {
return true return true
} }
} }
// 处理提交后返回的数据 // 处理提交后返回的数据
processReturnData() { processReturnData() {
let { quickOrderOption, setQuickInitData } = this.props let { quickOrderOption, setQuickInitData } = this.props
...@@ -1068,10 +1038,9 @@ class EquipConsuPage extends Component { ...@@ -1068,10 +1038,9 @@ class EquipConsuPage extends Component {
if(quickOrderOption.create_success == 'N') { if(quickOrderOption.create_success == 'N') {
// 打开库存不足弹窗 // 打开库存不足弹窗
this.setState({ this.setState({
notEnoughList: quickOrderOption.not_enough_items_list, not_enough_items_list: quickOrderOption.not_enough_items_list,
showNotEnogPop: true showNotEnogPop: true
}) })
} else if(quickOrderOption.create_success == 'Y') { } else if(quickOrderOption.create_success == 'Y') {
// 打开下单成功页面 // 打开下单成功页面
this.clearAllData() this.clearAllData()
...@@ -1080,12 +1049,9 @@ class EquipConsuPage extends Component { ...@@ -1080,12 +1049,9 @@ class EquipConsuPage extends Component {
title: `${title} - 下单成功`, title: `${title} - 下单成功`,
orderNumber: quickOrderOption.survey_collect_number orderNumber: quickOrderOption.survey_collect_number
}) })
} }
} }
} }
// 清空数据 // 清空数据
clearAllData() { clearAllData() {
let {props} = this let {props} = this
...@@ -1098,7 +1064,6 @@ class EquipConsuPage extends Component { ...@@ -1098,7 +1064,6 @@ class EquipConsuPage extends Component {
stop: false stop: false
}) })
} }
// 库存不足弹窗回调 -- 确定 // 库存不足弹窗回调 -- 确定
handleNotEnoughCallBack() { handleNotEnoughCallBack() {
let { submitOption } = this.state let { submitOption } = this.state
...@@ -1111,16 +1076,13 @@ class EquipConsuPage extends Component { ...@@ -1111,16 +1076,13 @@ class EquipConsuPage extends Component {
}, () => { }, () => {
self.handleSubmit() self.handleSubmit()
}) })
} }
// 库存不足弹窗关闭 // 库存不足弹窗关闭
handleNotEnoughCloseModal(show) { handleNotEnoughCloseModal(show) {
this.setState({ this.setState({
showNotEnogPop: show showNotEnogPop: show
}) })
} }
// 返回备注以上的元素 // 返回备注以上的元素
renderListItem() { renderListItem() {
let { listOptionData, dateModelPop } = this.state let { listOptionData, dateModelPop } = this.state
...@@ -1244,7 +1206,7 @@ class EquipConsuPage extends Component { ...@@ -1244,7 +1206,7 @@ class EquipConsuPage extends Component {
onPress={() => this.handleSurDateCheck()} onPress={() => this.handleSurDateCheck()}
> >
<CellTextStyle> <CellTextStyle>
<TitleTextStyle>{'手术时间'}</TitleTextStyle> <TitleTextStyle>{'手术时间'}</TitleTextStyle>
<ContTextStyle>{listOptionData[8].name}</ContTextStyle> <ContTextStyle>{listOptionData[8].name}</ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
</CellTextStyle> </CellTextStyle>
...@@ -1286,7 +1248,6 @@ class EquipConsuPage extends Component { ...@@ -1286,7 +1248,6 @@ class EquipConsuPage extends Component {
</ImageTextStyle> </ImageTextStyle>
) )
} }
// 返回选择器弹窗 // 返回选择器弹窗
renderPickerModel() { renderPickerModel() {
let { let {
...@@ -1308,7 +1269,6 @@ class EquipConsuPage extends Component { ...@@ -1308,7 +1269,6 @@ class EquipConsuPage extends Component {
</SafeAreaView> </SafeAreaView>
) )
} }
// 返回备注元素 // 返回备注元素
renderRemarksItem() { renderRemarksItem() {
let { state } = this let { state } = this
...@@ -1378,9 +1338,7 @@ class EquipConsuPage extends Component { ...@@ -1378,9 +1338,7 @@ class EquipConsuPage extends Component {
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
} }
</View> </View>
</CellTextStyle> </CellTextStyle>
) )
...@@ -1397,13 +1355,13 @@ class EquipConsuPage extends Component { ...@@ -1397,13 +1355,13 @@ class EquipConsuPage extends Component {
// 返回库存不足弹窗 // 返回库存不足弹窗
renderNotEnoughModel() { renderNotEnoughModel() {
let { let {
notEnoughList, not_enough_items_list,
showNotEnogPop showNotEnogPop
} = this.state } = this.state
return ( return (
<SafeAreaView style={styles.item_container}> <SafeAreaView style={styles.item_container}>
<NotEnoughModel <NotEnoughModel
notEnoughList={notEnoughList} not_enough_items_list={not_enough_items_list}
callback={() => this.handleNotEnoughCallBack()} callback={() => this.handleNotEnoughCallBack()}
show={showNotEnogPop} show={showNotEnogPop}
closeModal={(show) => this.handleNotEnoughCloseModal(show)} closeModal={(show) => this.handleNotEnoughCloseModal(show)}
...@@ -1423,20 +1381,15 @@ class EquipConsuPage extends Component { ...@@ -1423,20 +1381,15 @@ class EquipConsuPage extends Component {
backgroundColor={promary_color} backgroundColor={promary_color}
barStyle = 'light-content' barStyle = 'light-content'
/> />
<SafeAreaView style={safe_view}> <SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} /> <HeadBackItem title={title} navigation={navigation} />
<ScrollView <ScrollView
style={styles.quick_main} style={styles.quick_main}
showsVerticalScrollIndicator={false} showsVerticalScrollIndicator={false}
> >
{this.renderListItem()} {this.renderListItem()}
{this.renderRemarksItem()} {this.renderRemarksItem()}
{this.renderRecordingItem()} {this.renderRecordingItem()}
<FooterBtnStyle <FooterBtnStyle
style={canSubFlag ? styles.sub_btn_pro : ''} style={canSubFlag ? styles.sub_btn_pro : ''}
activeOpacity={canSubFlag ? .8 : 1} activeOpacity={canSubFlag ? .8 : 1}
...@@ -1444,13 +1397,9 @@ class EquipConsuPage extends Component { ...@@ -1444,13 +1397,9 @@ class EquipConsuPage extends Component {
textStyle= {styles.sub_btn} textStyle= {styles.sub_btn}
onPress={() => this.handleSubmit()} onPress={() => this.handleSubmit()}
/> />
</ScrollView> </ScrollView>
{ this.renderLodingItem() } { this.renderLodingItem() }
{ this.renderNotEnoughModel() } { this.renderNotEnoughModel() }
</SafeAreaView> </SafeAreaView>
</View> </View>
); );
...@@ -1509,9 +1458,6 @@ const mapDispatchToProps = (dispatch) => { ...@@ -1509,9 +1458,6 @@ const mapDispatchToProps = (dispatch) => {
requestQuickTemplateCollect: (params) => { requestQuickTemplateCollect: (params) => {
dispatch(requestQuickTemplateCollect(params)) dispatch(requestQuickTemplateCollect(params))
}, },
// requestQuickAudio: (params) => {
// dispatch(requestQuickAudio(params))
// },
requestQuickSumbit: (params) => { requestQuickSumbit: (params) => {
dispatch(requestQuickSumbit(params)) dispatch(requestQuickSumbit(params))
}, },
......
...@@ -114,7 +114,7 @@ class SelfOrderPage extends Component { ...@@ -114,7 +114,7 @@ class SelfOrderPage extends Component {
}, },
{ {
"id": "7", "id": "7",
title: '手术时间', title: '手术时间',
name: '请选择', name: '请选择',
value: '', value: '',
dateValue: new Date(), dateValue: new Date(),
...@@ -743,15 +743,15 @@ class SelfOrderPage extends Component { ...@@ -743,15 +743,15 @@ class SelfOrderPage extends Component {
// console.warn('手术名称---',listOptionData[6]) // console.warn('手术名称---',listOptionData[6])
} }
// 手术时间 点击 2020-04-23 17:41 // 手术时间 点击 2020-04-23 17:41
handleSurDateCheck() { handleSurDateCheck() {
console.warn('手术时间 点击 ===') console.warn('手术时间 点击 ===')
let { listOptionData } = this.state let { listOptionData } = this.state
let date = listOptionData[7].value let date = listOptionData[7].value
if(date) { if(date) {
this.setState({ this.setState({
listOptionData: listOptionData.map((item, index) => { listOptionData: listOptionData.map((item, index) => {
if(item.title === '手术时间') { if(item.title === '手术时间') {
item.dateValue = formatStrForDate(date) item.dateValue = formatStrForDate(date)
} }
return item return item
...@@ -775,7 +775,7 @@ class SelfOrderPage extends Component { ...@@ -775,7 +775,7 @@ class SelfOrderPage extends Component {
let { listOptionData } = this.state let { listOptionData } = this.state
this.setState({ this.setState({
listOptionData: listOptionData.map((item, index) => { listOptionData: listOptionData.map((item, index) => {
if(item.title === '手术时间') { if(item.title === '手术时间') {
item.name = date item.name = date
item.value = date item.value = date
item.dateValue = formatStrForDate(date) item.dateValue = formatStrForDate(date)
...@@ -996,7 +996,7 @@ class SelfOrderPage extends Component { ...@@ -996,7 +996,7 @@ class SelfOrderPage extends Component {
onPress={() => this.handleSurDateCheck()} onPress={() => this.handleSurDateCheck()}
> >
<CellTextStyle> <CellTextStyle>
<TitleTextStyle>{'手术时间'}</TitleTextStyle> <TitleTextStyle>{'手术时间'}</TitleTextStyle>
<ContTextStyle>{listOptionData[7].name} -- {listOptionData[7].value}</ContTextStyle> <ContTextStyle>{listOptionData[7].name} -- {listOptionData[7].value}</ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
</CellTextStyle> </CellTextStyle>
......
...@@ -45,7 +45,7 @@ export default [ ...@@ -45,7 +45,7 @@ export default [
}, },
{ {
isRequest: false, isRequest: false,
title: '手术时间', title: '手术时间',
value: '请选择', value: '请选择',
isPicker: true, isPicker: true,
showDatePicker: true showDatePicker: true
......
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