Commit 6e1151ad by Denglingling

1、APP图标、android打包 key.jks ,账号信息添加到 [README.md];

2、提取主页面公共样式;
parent 866258e5
骨科仓APP
====
## 安卓 `Android` 打包 `key.jks` 账号信息
- 密钥库口令:gkzhc2020
- 名字与姓氏是什么:wjcx
- 组织单位名称是什么:无境创新
- 组织名称是什么:无境创新
- 输入<my-key-alias>密钥口令:gkzhc2020

4.46 KB | W: | H:

1.13 KB | W: | H:

android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin

6.31 KB | W: | H:

1.64 KB | W: | H:

android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin

9.03 KB | W: | H:

2.13 KB | W: | H:

android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
<resources>
<string name="app_name">BoneHouse_Business_APP</string>
<string name="app_name">骨科智慧仓</string>
</resources>
No preview for this file type
......@@ -141,7 +141,7 @@ function requestOrganizationsFail() {
// 上传语音 params={ access_token:'', path='录音地址' } -- 待修改
export function requestQuickAudio(params) {
export function requestQuickAudio_222(params) {
return dispatch => {
let { access_token, path } = params
// 临时
......@@ -192,6 +192,18 @@ export const uploadAttachment = async (token,datas) => {
return await UploadRequest('/dingding/upload_media' + '?access_token=' + token,datas)
};
// 上传语音
export const requestQuickAudio = async (params) => {
let { access_token, path } = params
let formData = new FormData()
let soundPath = `file://${path}`
let fileName = path.substring(path.lastIndexOf('/') + 1, path.length)
let file = { uri: soundPath, type: "multipart/form-data", name: fileName}
formData.append('file', file)
console.log('--------', file, formData)
return await UploadRequest(getUrlParams('/dingding/upload_media', { access_token }), formData)
}
// 提交数据
export function requestQuickSumbit({access_token, ...params}) {
return dispatch => {
......
......@@ -62,4 +62,258 @@ export const icon_style = {
export const safe_view = {
flex: 1
}
export const list_common_item = {
// 备注
remark_item: {
minHeight: 80,
height: 'auto'
},
rema_box: {
paddingVertical: 16
},
rema_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
// fontWeight: 'bold'
},
rema_Input_outer: {
height: 120,
alignItems: 'center',
// paddingHorizontal: 15,
paddingBottom: 0
},
rema_Input_inner: {
paddingTop: 10,
height: 105,
width: Width() - 38,
// borderWidth: 1,
// borderColor: '#eeeeee'
},
rema_Input: {
paddingVertical: 0,
maxHeight: 105,
fontSize: second_text_size,
textAlign:'left',
textAlignVertical:'top',
alignSelf:'flex-start',
justifyContent:'flex-start',
alignItems:'flex-start',
fontFamily: font_family_regular
},
// 录音
reco_item: {
height: 160,
// height: 340,
// marginBottom: 42
},
reco_play_height: {
height: 90
},
reco_btn_cont: {
paddingVertical: 20
},
reco_btn_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_btn_inner: {
flex: 1,
width: Width() - 38,
// justifyContent: 'flex-end',
alignItems: 'center',
paddingTop: 30
},
reco_btn_box: {
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: pxSize(54),
width: pxSize(162)
},
reco_img_box: {
width: pxSize(20),
height: pxSize(22)
},
reco_text: {
fontSize: 14,
marginVertical: 10
},
reco_btn_text: {
fontSize: second_text_size,
color: first_text_color,
marginLeft: 6,
fontFamily: font_family_regular
},
reco_play_box: {
flex: 1,
width: Width() - 68,
// justifyContent: 'flex-end',
// alignItems: 'center'
},
play_tit:{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
height: 60
},
play_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
play_btn:{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
// height: 80
},
reco_list_box:{
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 34,
width: pxSize(100)
},
reco_del_btn: {
backgroundColor: promary_color,
height: 20,
borderRadius: 5,
width: pxSize(60)
},
reco_play_btn: {
width: pxSize(200),
borderRadius: 5,
height: 34,
borderColor: '#DFDFDF',
borderWidth: 1,
backgroundColor: foundation_color
},
reco_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_del_tit: {
color: title_text_color,
fontSize: third_text_size
},
reco_play_tit: {
fontSize: second_text_size,
fontFamily: font_family_regular,
color: second_text_color
},
// 耗材明细
consu_detail: {
backgroundColor: home_background_color,
// backgroundColor: '#ccc',
paddingHorizontal: 0,
minHeight: 80,
height: 'auto',
alignItems: 'flex-start'
},
detail_inner: {
flex: 1
},
detail_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
fontFamily: font_family_regular
},
detail_sub_cont: {
backgroundColor: foundation_color,
padding: 20,
marginTop: 10
},
detail_footer: {
paddingHorizontal: 16
},
detail_sub_tit: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
},
detail_tit_text: {
color: '#000',
fontSize: 16,
fontFamily: font_family_regular
},
detail_icon: {
width: pxSize(20),
height: pxSize(20)
},
detail_icon_rig: {
width: pxSize(18),
height: pxSize(18)
},
detail_top_icon: {},
detail_sub_inner: {
marginTop: 10,
maxHeight: pxSize(160),
// flex: 1
},
detail_scroll: {
// flex: 1
// height: 100
},
con_de_sub: {
marginBottom: 10
},
de_sub_tit: {
color: second_text_color
},
de_tip: {
color: second_text_color
},
detail_btn_box: {
backgroundColor: promary_color,
width: '100%',
height: pxSize(46),
borderRadius: 5,
marginTop: 10
},
detail_btn: {
color: title_text_color,
textAlign: 'center',
fontSize: second_text_size,
lineHeight: 40
},
// 添加图片
consu_addpic: {
backgroundColor: home_background_color,
paddingHorizontal: 0,
minHeight: pxHeight(320),
height: 'auto',
alignItems: 'flex-start',
marginBottom: 34
},
addpic_inner: {
flex: 1
},
addpic_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
fontFamily: font_family_regular
},
addpic_cont: {
backgroundColor: foundation_color,
padding: 20,
marginTop: 10,
flexDirection: 'row',
flex: 1
},
addpic_img_btn: {
width: pxSize(68),
height: pxSize(68),
marginRight: 20
},
}
\ No newline at end of file
......@@ -50,12 +50,16 @@ export function CellTextStyle({style, ...props}) {
// 子页面底部按钮
export function FooterBtnStyle({style, textStyle, title, activeOpacity, ...props}) {
return <TouchableOpacity
activeOpacity={activeOpacity}
style={[styles.sub_btn_box, style]}
{...props}>
<Text style={[styles.sub_btn, textStyle]}>{title}</Text>
</TouchableOpacity>
return (
<View style={styles.btn_cont}>
<TouchableOpacity
activeOpacity={activeOpacity}
style={[styles.sub_btn_box, style]}
{...props}>
<Text style={[styles.sub_btn, textStyle]}>{title}</Text>
</TouchableOpacity>
</View>
)
}
const styles = StyleSheet.create({
......@@ -94,16 +98,21 @@ const styles = StyleSheet.create({
// paddingVertical: 20,
marginBottom: 18
},
btn_cont: {
paddingHorizontal: 16
},
sub_btn_box: {
backgroundColor: dis_sub_color,
height: 64,
height: 52,
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
justifyContent: 'center',
marginBottom: 26,
borderRadius: 10
},
sub_btn: {
color: title_text_color,
fontSize: 18,
fontFamily: font_family_medium
fontSize: 16,
fontFamily: font_family_semibold
}
})
\ No newline at end of file
......@@ -152,7 +152,8 @@ const styles = StyleSheet.create({
backgroundColor: '#ffffff',
borderTopLeftRadius: 12,
borderTopRightRadius: 12,
maxHeight: pxHeight(480)
maxHeight: pxHeight(480),
minHeight: pxHeight(180)
// maxHeight: '100%'
},
item: {
......
......@@ -15,15 +15,10 @@ import {
safe_view,
icon_style,
placehold_text_color,
second_text_size,
first_text_color,
font_family_regular,
Width,
foundation_color,
pxSize,
second_text_color,
pxHeight,
title_text_color
list_common_item
} from '../../base/BaseStyle';
import StatusBarView from '../common/StatusBarView';
import HeadBackItem from '../common/HeadBackItem';
......@@ -590,11 +585,11 @@ class EquipConsuPage extends Component {
renderRemarksItem() {
let { state } = this
return (
<CellTextStyle style={styles.remark_item}>
<View style={styles.rema_box}>
<Text style={styles.rema_tit}>备注</Text>
<View style = {styles.rema_Input_outer} >
<TouchableOpacity activeOpacity = {1} style = {styles.rema_Input_inner} onPress = {() => this.TextInput.focus()} >
<CellTextStyle style={list_common_item.remark_item}>
<View style={list_common_item.rema_box}>
<Text style={list_common_item.rema_tit}>备注</Text>
<View style = {list_common_item.rema_Input_outer} >
<TouchableOpacity activeOpacity = {1} style = {list_common_item.rema_Input_inner} onPress = {() => this.TextInput.focus()} >
<TextInput
placeholder = {'请输入备注信息'}
placeholderTextColor = {placehold_text_color}
......@@ -602,7 +597,7 @@ class EquipConsuPage extends Component {
multiline = {true}
ref = {textInput => this.TextInput = textInput}
numberOfLines = {8}
style={styles.rema_Input}
style={list_common_item.rema_Input}
maxLength={140}
// onChangeText={(text) => this.handleRemarkInput(text)}
defaultValue={state.listOptionData[10].value}
......@@ -618,16 +613,16 @@ class EquipConsuPage extends Component {
renderConsumablesDetailsItem() {
let { state } = this
return (
<CellTextStyle style={styles.consu_detail}>
<View style={styles.detail_inner}>
<Text style={styles.detail_tit}>耗材明细</Text>
<CellTextStyle style={list_common_item.consu_detail}>
<View style={list_common_item.detail_inner}>
<Text style={list_common_item.detail_tit}>耗材明细</Text>
{
state.listOptionData[12].subOption.length ?
<View
// activeOpacity={1}
style={styles.detail_sub_cont}>
<View style={styles.detail_sub_tit}>
<Text style={styles.detail_tit_text}>
style={list_common_item.detail_sub_cont}>
<View style={list_common_item.detail_sub_tit}>
<Text style={list_common_item.detail_tit_text}>
耗材({state.listOptionData[12].subOption.length}
</Text>
......@@ -635,26 +630,26 @@ class EquipConsuPage extends Component {
state.listOptionData[12].isShowSub ?
<TouchableOpacity
activeOpacity={.8}
style={styles.detail_icon}
style={list_common_item.detail_icon}
onPress={() => this.handleDetailBtmCheck()}
>
<Image style={[icon_style, styles.detail_top_icon]} source={require('../../images/arr_btm.png')} />
<Image style={[icon_style, list_common_item.detail_top_icon]} source={require('../../images/arr_btm.png')} />
</TouchableOpacity> :
<TouchableOpacity
activeOpacity={.8}
style={[styles.detail_icon, styles.detail_icon_rig]}
style={[list_common_item.detail_icon, list_common_item.detail_icon_rig]}
onPress={() => this.handleDetailRigCheck()}
>
<Image style={[icon_style, styles.detail_top_icon]} source={require('../../images/arr_rig.png')} />
<Image style={[icon_style, list_common_item.detail_top_icon]} source={require('../../images/arr_rig.png')} />
</TouchableOpacity>
}
</View>
{
state.listOptionData[12].isShowSub ?
<View style={styles.detail_sub_inner}>
<View style={list_common_item.detail_sub_inner}>
<ScrollView
style={styles.detail_scroll}
style={list_common_item.detail_scroll}
onPress={() => {console.log('--触碰---')}}
onScrollBeginDrag={() => {console.log('--滚动---')}}
// showsVerticalScrollIndicator={false}
......@@ -670,13 +665,13 @@ class EquipConsuPage extends Component {
</View> : null
}
<View style={styles.detail_footer}>
<View style={list_common_item.detail_footer}>
<TouchableOpacity
activeOpacity={.8}
style={styles.detail_btn_box}
style={list_common_item.detail_btn_box}
onPress = {() => this.handleConsumDetailCheck()}
>
<Text style={styles.detail_btn}>{state.listOptionData[12].btnTit}</Text>
<Text style={list_common_item.detail_btn}>{state.listOptionData[12].btnTit}</Text>
</TouchableOpacity>
</View>
</View>
......@@ -687,11 +682,11 @@ class EquipConsuPage extends Component {
// 返回耗材明细子项
renderConDeSubItem(item, index) {
return(
<View style={styles.con_de_sub}>
<Text style={styles.de_sub_tit}>
<View style={list_common_item.con_de_sub}>
<Text style={list_common_item.de_sub_tit}>
{index+1}{ item.title }
</Text>
<Text style={styles.de_tip}>
<Text style={list_common_item.de_tip}>
{ item.orderNumber }
</Text>
</View>
......@@ -702,13 +697,13 @@ class EquipConsuPage extends Component {
renderAddPicturesItem() {
let { state } = this
return (
<CellTextStyle style={styles.consu_addpic}>
<View style={styles.addpic_inner}>
<Text style={styles.addpic_tit}>添加图片</Text>
<View style={styles.addpic_cont}>
<CellTextStyle style={list_common_item.consu_addpic}>
<View style={list_common_item.addpic_inner}>
<Text style={list_common_item.addpic_tit}>添加图片</Text>
<View style={list_common_item.addpic_cont}>
<TouchableOpacity
activeOpacity={.8}
style={styles.addpic_img_btn}
style={list_common_item.addpic_img_btn}
// onPress={() => this.handleAddPicCheck()}
>
<Image style={icon_style} source={require('../../images/add_icon_large.png')} />
......@@ -716,7 +711,7 @@ class EquipConsuPage extends Component {
{/* <TouchableOpacity
activeOpacity={.8}
style={styles.addpic_img_btn}>
style={list_common_item.addpic_img_btn}>
<Image style={icon_style} source={require('../../images/add_icon_large.png')} />
</TouchableOpacity> */}
</View>
......@@ -819,148 +814,6 @@ const styles = StyleSheet.create({
cell_input: {
textAlign: 'left'
},
remark_item: {
minHeight: 80,
height: 'auto'
},
rema_box: {
paddingVertical: 16
},
rema_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
// fontWeight: 'bold'
},
rema_Input_outer: {
height: 120,
alignItems: 'center',
// paddingHorizontal: 15,
paddingBottom: 0
},
rema_Input_inner: {
paddingTop: 10,
height: 105,
width: Width() - 38,
// borderWidth: 1,
// borderColor: '#eeeeee'
},
rema_Input: {
paddingVertical: 0,
maxHeight: 105,
fontSize: second_text_size,
textAlign:'left',
textAlignVertical:'top',
alignSelf:'flex-start',
justifyContent:'flex-start',
alignItems:'flex-start',
fontFamily: font_family_regular
},
consu_detail: {
backgroundColor: home_background_color,
// backgroundColor: '#ccc',
paddingHorizontal: 0,
minHeight: 80,
height: 'auto',
alignItems: 'flex-start'
},
detail_inner: {
flex: 1
},
detail_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
fontFamily: font_family_regular
},
detail_sub_cont: {
backgroundColor: foundation_color,
padding: 20,
marginTop: 10
},
detail_footer: {
paddingHorizontal: 16
},
detail_sub_tit: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
},
detail_tit_text: {
color: '#000',
fontSize: 16,
fontFamily: font_family_regular
},
detail_icon: {
width: pxSize(20),
height: pxSize(20)
},
detail_icon_rig: {
width: pxSize(18),
height: pxSize(18)
},
detail_top_icon: {},
detail_sub_inner: {
marginTop: 10,
maxHeight: pxSize(160),
// flex: 1
},
detail_scroll: {
// flex: 1
// height: 100
},
con_de_sub: {
marginBottom: 10
},
de_sub_tit: {
color: second_text_color
},
de_tip: {
color: second_text_color
},
consu_addpic: {
backgroundColor: home_background_color,
paddingHorizontal: 0,
minHeight: pxHeight(320),
height: 'auto',
alignItems: 'flex-start',
marginBottom: 34
},
addpic_inner: {
flex: 1
},
addpic_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
fontFamily: font_family_regular
},
addpic_cont: {
backgroundColor: foundation_color,
padding: 20,
marginTop: 10,
flexDirection: 'row',
flex: 1
},
addpic_img_btn: {
width: pxSize(68),
height: pxSize(68),
marginRight: 20
},
detail_btn_box: {
backgroundColor: promary_color,
width: '100%',
height: pxSize(46),
borderRadius: 5,
marginTop: 10
},
detail_btn: {
color: title_text_color,
textAlign: 'center',
fontSize: second_text_size,
lineHeight: 40
},
list_cont: {
flex: 1
},
......
......@@ -98,7 +98,9 @@ class HomePage extends Component {
<TouchableOpacity
activeOpacity={.8}
style={[styles.home_list, (index%2 !== 0) && styles.home_list_even]}
onPress={() => this.jumpToSubpage(index)}>
onPress={() => this.jumpToSubpage(index)}
key={index}
>
<View style={styles.list_item}>
<View style={styles.img_box}>
<Image source={item.icon} style={styles.list_img}/>
......
......@@ -35,8 +35,8 @@ class LoginPage extends Component{
constructor(props) {
super(props)
this.state = {
username: '',
password: '',
username: '', // shi.ming
password: '', // sfrx2019
subTit: '登录',
subTitList: ['登录', '登录中...'],
isSubLoding: false
......@@ -240,14 +240,14 @@ const styles = StyleSheet.create({
},
login_bg: {
flex: 1,
// alignSelf: 'stretch',
// width: null,
// height: null,
// zIndex: -1,
// position: 'absolute',
// top: 0,
// left: 0,
// right: 0
alignSelf: 'stretch',
width: null,
height: null,
zIndex: -1,
position: 'absolute',
top: 0,
left: 0,
right: 0
},
login_inner: {
// flex: 1,
......@@ -286,7 +286,8 @@ const styles = StyleSheet.create({
height: pxSize(390),
width: pxSize(348),
paddingHorizontal: '8%',
paddingVertical: '12%'
paddingVertical: '12%',
paddingBottom: 0
},
cont_head: {
......@@ -337,7 +338,6 @@ const styles = StyleSheet.create({
},
shadowOpacity: 1,
elevation: 2,
alignItems: 'center',
borderWidth: 0
},
btn_dis_footer: {
......@@ -360,7 +360,7 @@ const styles = StyleSheet.create({
// height: '30%'
width: pxSize(110),
height: pxSize(30),
marginTop: '18%'
marginTop: 42
},
footer_img: {
// flex: 1
......
......@@ -14,15 +14,8 @@ import {
promary_color,
safe_view,
icon_style,
font_family_regular,
second_text_size,
first_text_color,
Width,
placehold_text_color,
pxSize,
title_text_color,
third_text_size,
foundation_color
list_common_item
} from '../../base/BaseStyle';
import StatusBarView from '../common/StatusBarView';
import HeadBackItem from '../common/HeadBackItem';
......@@ -52,6 +45,7 @@ import {
requestQuickSumbit,
uploadAttachment
} from '../../action/QuickAction';
import { exitLoginStatus } from '../../action/LoginAction';
import {
QUICK_ORDER_LIST_DOING,
QUICK_ORDER_LIST_SUCCESS,
......@@ -219,7 +213,7 @@ class EquipConsuPage extends Component {
dateModelPop: false, // 日期选择器
hasPermission: undefined, //录音 授权状态
// audioPath: AudioUtils.DocumentDirectoryPath + `/quickAudio${Math.floor(Math.random() * (1000))+1}.aac`, // 文件路径
audioPath: AudioUtils.DocumentDirectoryPath + `/quickAudio${Math.floor(Math.random() * (1000))+1}.ogg`, // 文件路径
audioPath: AudioUtils.DocumentDirectoryPath + `/quick_audio_${new Date().getTime()}.ogg`, // 文件路径
recording: false, //是否录音
pause: false, //录音是否暂停
stop: false, //录音是否停止
......@@ -1063,10 +1057,11 @@ class EquipConsuPage extends Component {
}
// 生成订单 点击
handleSubmit() {
async handleSubmit() {
this.changeCanSub(true)
let { state, props } = this
let that = this
// // 测试 -- 录音
// let params = {
......@@ -1074,41 +1069,137 @@ class EquipConsuPage extends Component {
// path: state.audioPath
// }
// console.log('---handleSubmit--',params)
// props.requestQuickAudio(params)
// // props.requestQuickAudio(params)
// // requestQuickAudio(params).then((response) => {
// // console.log('返回---', response)
// // })
// let audioResult = await requestQuickAudio(params);
// console.log('返回---audioResult======',audioResult)
// this.changeSubLoding(true, '上传中')
// if(audioResult.error_code == 0) {
// // 提交订单
// that.setState({
// listOptionData: state.listOptionData.map((item, index) => {
// if(index == 11) {
// item.value = audioResult.data.url
// }
// return item
// })
// }, () => {
// this.changeSubLoding(false)
// that.submitQuickOrder()
// })
// } else if(audioResult.error_code == 41006) {
// this.changeSubLoding(false)
// show('登录过期,请重新登录');
// props.exitLoginStatus();
// } else {
// this.changeSubLoding(false)
// let error_msg = audioResult.error_msg || audioResult.message
// show(error_msg);
// }
// // // 测试 -- 图片上传
// // this.addPhotoAction()
console.log('提交======》', state.canSubFlag)
console.log('提交======》', state.canSubFlag, state.stop)
if(state.canSubFlag) {
// console.warn(state.listOptionData)
let tempSubOption = state.submitOption
tempSubOption.seller_code = state.listOptionData[0].value
tempSubOption.org_code = state.listOptionData[1].value
tempSubOption.customer_code = state.listOptionData[2].value
tempSubOption.bill_to_site_code = state.listOptionData[3].value
tempSubOption.ship_to_site_code = state.listOptionData[4].value
if(state.listOptionData[5].name === '其他') {
tempSubOption.doctor_name = state.listOptionData[5].inputValue
// 先提交录音,再提交接口
if(state.stop) {
// 有录音
let params = {
access_token: props.token,
path: state.audioPath
}
console.log('---handleSubmit--',params)
let audioResult = await requestQuickAudio(params);
console.log('返回---audioResult======',audioResult)
that.changeSubLoding(true, '上传中')
if(audioResult.error_code == 0) {
// 提交订单
that.setState({
listOptionData: state.listOptionData.map((item, index) => {
if(index == 11) {
item.value = audioResult.data.url
}
return item
})
}, () => {
that.changeSubLoding(false)
that.submitQuickOrder()
})
} else if(audioResult.error_code == 41006) {
that.changeSubLoding(false)
show('登录过期,请重新登录');
props.exitLoginStatus();
} else {
that.changeSubLoding(false)
let error_msg = audioResult.error_msg || audioResult.message
show(error_msg);
}
} else {
tempSubOption.doctor_name = state.listOptionData[5].value
}
tempSubOption.template_collect_number = state.listOptionData[7].value
tempSubOption.surgery_date = state.listOptionData[8].value
tempSubOption.order_type_code = state.listOptionData[9].value
tempSubOption.surgery_desc = state.listOptionData[10].value
tempSubOption.voice_url = state.listOptionData[11].value
console.log('tempSubOption-----', tempSubOption)
let params = {
access_token: props.token,
data: { ...tempSubOption }
that.submitQuickOrder()
}
props.requestQuickSumbit(params)
// let tempSubOption = state.submitOption
// tempSubOption.seller_code = state.listOptionData[0].value
// tempSubOption.org_code = state.listOptionData[1].value
// tempSubOption.customer_code = state.listOptionData[2].value
// tempSubOption.bill_to_site_code = state.listOptionData[3].value
// tempSubOption.ship_to_site_code = state.listOptionData[4].value
// if(state.listOptionData[5].name === '其他') {
// tempSubOption.doctor_name = state.listOptionData[5].inputValue
// } else {
// tempSubOption.doctor_name = state.listOptionData[5].value
// }
// tempSubOption.template_collect_number = state.listOptionData[7].value
// tempSubOption.surgery_date = state.listOptionData[8].value
// tempSubOption.order_type_code = state.listOptionData[9].value
// tempSubOption.surgery_desc = state.listOptionData[10].value
// tempSubOption.voice_url = state.listOptionData[11].value
// console.log('tempSubOption-----', tempSubOption)
// // let params = {
// // access_token: props.token,
// // data: { ...tempSubOption }
// // }
// // props.requestQuickSumbit(params)
}
}
// 提交订单
submitQuickOrder() {
let { state, props } = this
let tempSubOption = state.submitOption
tempSubOption.seller_code = state.listOptionData[0].value
tempSubOption.org_code = state.listOptionData[1].value
tempSubOption.customer_code = state.listOptionData[2].value
tempSubOption.bill_to_site_code = state.listOptionData[3].value
tempSubOption.ship_to_site_code = state.listOptionData[4].value
if(state.listOptionData[5].name === '其他') {
tempSubOption.doctor_name = state.listOptionData[5].inputValue
} else {
tempSubOption.doctor_name = state.listOptionData[5].value
}
tempSubOption.template_collect_number = state.listOptionData[7].value
tempSubOption.surgery_date = state.listOptionData[8].value
tempSubOption.order_type_code = state.listOptionData[9].value
tempSubOption.surgery_desc = state.listOptionData[10].value
tempSubOption.voice_url = state.listOptionData[11].value
console.log('tempSubOption-----', tempSubOption)
let params = {
access_token: props.token,
data: { ...tempSubOption }
}
props.requestQuickSumbit(params)
}
// 判断组织是否为空
judgeOrgIsNull() {
let { listOptionData } = this.state
......@@ -1377,11 +1468,11 @@ class EquipConsuPage extends Component {
renderRemarksItem() {
let { state } = this
return (
<CellTextStyle style={styles.remark_item}>
<View style={styles.rema_box}>
<Text style={styles.rema_tit}>备注</Text>
<View style = {styles.rema_Input_outer} >
<TouchableOpacity activeOpacity = {1} style = {styles.rema_Input_inner} onPress = {() => this.TextInput.focus()} >
<CellTextStyle style={list_common_item.remark_item}>
<View style={list_common_item.rema_box}>
<Text style={list_common_item.rema_tit}>备注</Text>
<View style = {list_common_item.rema_Input_outer} >
<TouchableOpacity activeOpacity = {1} style = {list_common_item.rema_Input_inner} onPress = {() => this.TextInput.focus()} >
<TextInput
placeholder = {'请输入备注信息'}
placeholderTextColor = {placehold_text_color}
......@@ -1389,7 +1480,7 @@ class EquipConsuPage extends Component {
multiline = {true}
ref = {textInput => this.TextInput = textInput}
numberOfLines = {8}
style={styles.rema_Input}
style={list_common_item.rema_Input}
maxLength={140}
onChangeText={(text) => this.handleRemarkInput(text)}
defaultValue={state.listOptionData[10].value}
......@@ -1405,66 +1496,41 @@ class EquipConsuPage extends Component {
renderRecordingItem() {
let { recording, pause, stop, currentTime } = this.state
return (
<CellTextStyle style={styles.reco_item}>
<View style={styles.reco_btn_cont}>
<Text style={styles.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text>
<CellTextStyle style={[list_common_item.reco_item, !stop ? '' : list_common_item.reco_play_height]}>
<View style={list_common_item.reco_btn_cont}>
{ !stop ? <Text style={list_common_item.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text> : null }
{
!stop ?
<View style={styles.reco_btn_inner}>
<View style={list_common_item.reco_btn_inner}>
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_btn_box}
style={list_common_item.reco_btn_box}
onLongPress={this._record}
onPressOut={this._stop}
>
<View style={styles.reco_img_box}>
<View style={list_common_item.reco_img_box}>
<Image source={require('../../images/record_icon.png')} style={icon_style}/>
</View>
<Text style={styles.reco_btn_text}>长按录音</Text>
<Text style={list_common_item.reco_btn_text}>长按录音</Text>
</TouchableOpacity>
{/* <Text style={styles.reco_text} onPress={this._record}> Record(开始录音) </Text>
<Text style={styles.reco_text} onPress={this._pause}> Pause(暂停录音) </Text>
<Text style={styles.reco_text} onPress={this._resume}> Resume(恢复录音) </Text>
<Text style={styles.reco_text} onPress={this._stop}> Stop(停止录音) </Text>
<Text style={styles.reco_text} onPress={this._play}> Play(播放录音) </Text>
<Text style={styles.reco_text} onPress={this._del}> Del(删除录音) </Text>
<Text style={styles.reco_text}>
{
recording ? '正在录音' :
pause ? '已暂停' : '未开始'
}
</Text>
<Text style={styles.reco_text}>时长: {currentTime}</Text> */}
</View>
: <View style={styles.reco_play_box}>
<View style={styles.play_tit}>
<Text style={styles.play_text}>时长: {currentTime} </Text>
<Text style={styles.play_text}>正在播放</Text>
</View>
<View style={styles.play_btn}>
: <View style={list_common_item.reco_play_box}>
<View style={list_common_item.play_btn}>
<TouchableOpacity
activeOpacity = {.8}
style={[styles.reco_list_box, styles.reco_del_btn]}
style={[list_common_item.reco_list_box, list_common_item.reco_del_btn]}
onPress={this._del}
>
<Text style={[styles.reco_text, styles.reco_del_tit]}> 删除 </Text>
<Text style={[list_common_item.reco_text, list_common_item.reco_del_tit]}> 删除 </Text>
</TouchableOpacity>
<TouchableOpacity
activeOpacity = {.8}
style={[styles.reco_list_box, styles.reco_play_btn]}
style={[list_common_item.reco_list_box, list_common_item.reco_play_btn]}
onPress={this._play}
>
<Text style={[styles.reco_text, styles.reco_play_tit]}> 播放({currentTime}‘‘) </Text>
<Text style={[list_common_item.reco_text, list_common_item.reco_play_tit]}> 点击播放({currentTime}'') </Text>
</TouchableOpacity>
{/* <TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
onPress={this._stopPlay}
>
<Text style={styles.reco_text}> 停止 </Text>
</TouchableOpacity> */}
</View>
</View>
......@@ -1526,15 +1592,23 @@ class EquipConsuPage extends Component {
{this.renderRecordingItem()}
<FooterBtnStyle
style={canSubFlag ? styles.sub_btn_pro : ''}
activeOpacity={canSubFlag ? .8 : 1}
title={'生成订单'}
textStyle= {styles.sub_btn}
onPress={() => this.handleSubmit()}
/>
</ScrollView>
<FooterBtnStyle
{/* <FooterBtnStyle
style={canSubFlag ? styles.sub_btn_pro : ''}
activeOpacity={canSubFlag ? .8 : 1}
title={'生成订单'}
textStyle= {styles.sub_btn}
onPress={() => this.handleSubmit()}
/>
/> */}
{ this.renderLodingItem() }
......@@ -1554,154 +1628,12 @@ const styles = StyleSheet.create({
quick_main : {
padding: 14
},
remark_item: {
minHeight: 80,
height: 'auto'
},
rema_box: {
paddingVertical: 16
},
rema_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
// fontWeight: 'bold'
},
rema_Input_outer: {
height: 120,
alignItems: 'center',
// paddingHorizontal: 15,
paddingBottom: 0
},
rema_Input_inner: {
paddingTop: 10,
height: 105,
width: Width() - 38,
// borderWidth: 1,
// borderColor: '#eeeeee'
},
rema_Input: {
paddingVertical: 0,
maxHeight: 105,
fontSize: second_text_size,
textAlign:'left',
textAlignVertical:'top',
alignSelf:'flex-start',
justifyContent:'flex-start',
alignItems:'flex-start',
fontFamily: font_family_regular
},
list_cont: {
flex: 1
},
item_container: {
flex: 1
},
reco_item: {
height: 160,
// height: 340,
marginBottom: 42
},
reco_btn_cont: {
paddingVertical: 20
},
reco_btn_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_btn_inner: {
flex: 1,
width: Width() - 38,
// justifyContent: 'flex-end',
alignItems: 'center',
paddingTop: 30
},
reco_btn_box: {
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 50,
width: pxSize(152)
},
reco_img_box: {
width: pxSize(20),
height: pxSize(22)
},
// reco_img: {
// width: '100%',
// height: '100%'
// },
reco_text: {
fontSize: 14,
marginVertical: 10
},
reco_btn_text: {
fontSize: second_text_size,
color: first_text_color,
marginLeft: 6,
fontFamily: font_family_regular
},
reco_play_box: {
flex: 1,
width: Width() - 68,
// justifyContent: 'flex-end',
// alignItems: 'center'
},
play_tit:{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
height: 60
},
play_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
play_btn:{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
// height: 80
},
reco_list_box:{
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 34,
width: pxSize(100)
},
reco_del_btn: {
backgroundColor: promary_color,
height: 20,
borderRadius: 5,
width: pxSize(60)
},
reco_play_btn: {
width: pxSize(200),
borderRadius: 5,
height: 34,
borderColor: '#DFDFDF',
borderWidth: 1,
backgroundColor: foundation_color
},
reco_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_del_tit: {
color: title_text_color,
fontSize: third_text_size
},
reco_play_tit: {},
sub_btn_pro: {
backgroundColor: promary_color
},
......@@ -1744,6 +1676,9 @@ const mapDispatchToProps = (dispatch) => {
},
requestQuickSumbit: (params) => {
dispatch(requestQuickSumbit(params))
},
exitLoginStatus: () => {
dispatch(exitLoginStatus())
}
}
}
......
......@@ -22,7 +22,8 @@ import {
promary_color,
safe_view,
icon_style,
font_family_regular
font_family_regular,
list_common_item
} from '../../base/BaseStyle';
import {
AsteriskTextStyle,
......@@ -1101,11 +1102,11 @@ class SelfOrderPage extends Component {
// 返回备注元素
renderRemarksItem() {
return (
<CellTextStyle style={styles.remark_item}>
<View style={styles.rema_box}>
<Text style={styles.rema_tit}>备注</Text>
<View style = {styles.rema_Input_outer} >
<TouchableOpacity activeOpacity = {1} style = {styles.rema_Input_inner} onPress = {() => this.TextInput.focus()} >
<CellTextStyle style={list_common_item.remark_item}>
<View style={list_common_item.rema_box}>
<Text style={list_common_item.rema_tit}>备注</Text>
<View style = {list_common_item.rema_Input_outer} >
<TouchableOpacity activeOpacity = {1} style = {list_common_item.rema_Input_inner} onPress = {() => this.TextInput.focus()} >
<TextInput
placeholder = {'请输入备注信息'}
placeholderTextColor = {placehold_text_color}
......@@ -1113,7 +1114,7 @@ class SelfOrderPage extends Component {
multiline = {true}
ref = {textInput => this.TextInput = textInput}
numberOfLines = {8}
style={styles.rema_Input}
style={list_common_item.rema_Input}
maxLength={140}
onChangeText={(text) => this.handleRemarkInput(text)}
/>
......@@ -1128,66 +1129,66 @@ class SelfOrderPage extends Component {
renderRecordingItem() {
let { recording, pause, stop, currentTime } = this.state
return (
<CellTextStyle style={styles.reco_item}>
<View style={styles.reco_btn_cont}>
<Text style={styles.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text>
<CellTextStyle style={[list_common_item.reco_item, !stop ? '' : list_common_item.reco_play_height]}>
<View style={list_common_item.reco_btn_cont}>
{ !stop ? <Text style={list_common_item.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text> : null }
{
!stop ?
<View style={styles.reco_btn_inner}>
<View style={list_common_item.reco_btn_inner}>
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_btn_box}
style={list_common_item.reco_btn_box}
onLongPress={this._record}
onPressOut={this._stop}
>
<View style={styles.reco_img_box}>
<View style={list_common_item.reco_img_box}>
<Image source={require('../../images/record_icon.png')} style={icon_style}/>
</View>
<Text style={styles.reco_btn_text}>长按录音</Text>
<Text style={list_common_item.reco_btn_text}>长按录音</Text>
</TouchableOpacity>
{/* <Text style={styles.reco_text} onPress={this._record}> Record(开始录音) </Text>
<Text style={styles.reco_text} onPress={this._pause}> Pause(暂停录音) </Text>
<Text style={styles.reco_text} onPress={this._resume}> Resume(恢复录音) </Text>
<Text style={styles.reco_text} onPress={this._stop}> Stop(停止录音) </Text>
<Text style={styles.reco_text} onPress={this._play}> Play(播放录音) </Text>
<Text style={styles.reco_text} onPress={this._del}> Del(删除录音) </Text>
<Text style={styles.reco_text}>
{/* <Text style={list_common_item.reco_text} onPress={this._record}> Record(开始录音) </Text>
<Text style={list_common_item.reco_text} onPress={this._pause}> Pause(暂停录音) </Text>
<Text style={list_common_item.reco_text} onPress={this._resume}> Resume(恢复录音) </Text>
<Text style={list_common_item.reco_text} onPress={this._stop}> Stop(停止录音) </Text>
<Text style={list_common_item.reco_text} onPress={this._play}> Play(播放录音) </Text>
<Text style={list_common_item.reco_text} onPress={this._del}> Del(删除录音) </Text>
<Text style={list_common_item.reco_text}>
{
recording ? '正在录音' :
pause ? '已暂停' : '未开始'
}
</Text>
<Text style={styles.reco_text}>时长: {currentTime}</Text> */}
<Text style={list_common_item.reco_text}>时长: {currentTime}</Text> */}
</View>
: <View style={styles.reco_play_box}>
<View style={styles.play_tit}>
<Text style={styles.play_text}>时长: {currentTime} </Text>
<Text style={styles.play_text}>正在播放</Text>
</View>
<View style={styles.play_btn}>
: <View style={list_common_item.reco_play_box}>
{/* <View style={list_common_item.play_tit}>
<Text style={list_common_item.play_text}>时长: {currentTime} 秒</Text>
<Text style={list_common_item.play_text}>正在播放</Text>
</View> */}
<View style={list_common_item.play_btn}>
<TouchableOpacity
activeOpacity = {.8}
style={[list_common_item.reco_list_box, list_common_item.reco_del_btn]}
onPress={this._del}
>
<Text style={[list_common_item.reco_text, list_common_item.reco_del_tit]}> 删除 </Text>
</TouchableOpacity>
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
style={[list_common_item.reco_list_box, list_common_item.reco_play_btn]}
onPress={this._play}
>
<Text style={styles.reco_text}> 播放 </Text>
<Text style={[list_common_item.reco_text, list_common_item.reco_play_tit]}> 点击播放({currentTime}'') </Text>
</TouchableOpacity>
{/* <TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
style={list_common_item.reco_list_box}
onPress={this._stopPlay}
>
<Text style={styles.reco_text}> 停止 </Text>
<Text style={list_common_item.reco_text}> 停止 </Text>
</TouchableOpacity> */}
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
onPress={this._del}
>
<Text style={styles.reco_text}> 删除 </Text>
</TouchableOpacity>
</View>
</View>
......@@ -1230,15 +1231,15 @@ class SelfOrderPage extends Component {
{this.renderRecordingItem()}
</ScrollView>
<FooterBtnStyle
style={canSubFlag ? styles.sub_btn_pro : ''}
activeOpacity={canSubFlag ? .8 : 1}
title={'生成订单'}
textStyle= {styles.sub_btn}
onPress={() => this.handleSubmit()}
/>
<FooterBtnStyle
style={canSubFlag ? styles.sub_btn_pro : ''}
activeOpacity={canSubFlag ? .8 : 1}
title={'生成订单'}
textStyle= {styles.sub_btn}
onPress={() => this.handleSubmit()}
/>
</ScrollView>
{ this.renderLodingItem() }
......@@ -1256,143 +1257,140 @@ const styles = StyleSheet.create({
self_main : {
padding: 14
},
remark_item: {
minHeight: 80,
height: 'auto'
},
rema_box: {
paddingVertical: 16
},
rema_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
// fontWeight: 'bold'
},
rema_Input_outer: {
height: 120,
alignItems: 'center',
// paddingHorizontal: 15,
paddingBottom: 0
},
rema_Input_inner: {
paddingTop: 10,
height: 105,
width: Width() - 38,
// borderWidth: 1,
// borderColor: '#eeeeee'
},
rema_Input: {
paddingVertical: 0,
maxHeight: 105,
fontSize: second_text_size,
textAlign:'left',
textAlignVertical:'top',
alignSelf:'flex-start',
justifyContent:'flex-start',
alignItems:'flex-start',
fontFamily: font_family_regular
},
reco_item: {
height: 160,
// height: 340,
marginBottom: 42
},
reco_btn_cont: {
paddingVertical: 20
},
reco_btn_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_btn_inner: {
flex: 1,
width: Width() - 38,
// justifyContent: 'flex-end',
alignItems: 'center',
paddingTop: 30
},
reco_btn_box: {
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 50,
width: pxSize(152)
},
reco_img_box: {
width: pxSize(20),
height: pxSize(22)
},
// reco_img: {
// width: '100%',
// height: '100%'
// remark_item: {
// minHeight: 80,
// height: 'auto'
// },
// rema_box: {
// paddingVertical: 16
// },
// rema_tit: {
// fontSize: second_text_size,
// color: first_text_color,
// fontFamily: font_family_regular
// // fontWeight: 'bold'
// },
// rema_Input_outer: {
// height: 120,
// alignItems: 'center',
// // paddingHorizontal: 15,
// paddingBottom: 0
// },
// rema_Input_inner: {
// paddingTop: 10,
// height: 105,
// width: Width() - 38,
// // borderWidth: 1,
// // borderColor: '#eeeeee'
// },
// rema_Input: {
// paddingVertical: 0,
// maxHeight: 105,
// fontSize: second_text_size,
// textAlign:'left',
// textAlignVertical:'top',
// alignSelf:'flex-start',
// justifyContent:'flex-start',
// alignItems:'flex-start',
// fontFamily: font_family_regular
// },
// reco_item: {
// height: 160,
// // height: 340,
// marginBottom: 42
// },
// reco_btn_cont: {
// paddingVertical: 20
// },
// reco_btn_tit: {
// fontSize: second_text_size,
// color: first_text_color,
// fontFamily: font_family_regular
// },
// reco_btn_inner: {
// flex: 1,
// width: Width() - 38,
// // justifyContent: 'flex-end',
// alignItems: 'center',
// paddingTop: 30
// },
// reco_btn_box: {
// backgroundColor: '#EEECEC',
// borderRadius: 30,
// display: 'flex',
// alignItems: 'center',
// justifyContent: 'center',
// flexDirection: 'row',
// height: 50,
// width: pxSize(152)
// },
// reco_img_box: {
// width: pxSize(20),
// height: pxSize(22)
// },
// // reco_img: {
// // width: '100%',
// // height: '100%'
// // },
// reco_text: {
// fontSize: 14,
// marginVertical: 10
// },
// reco_btn_text: {
// fontSize: second_text_size,
// color: first_text_color,
// marginLeft: 6,
// fontFamily: font_family_regular
// },
// reco_play_box: {
// flex: 1,
// width: Width() - 68,
// // justifyContent: 'flex-end',
// // alignItems: 'center'
// },
// play_tit:{
// flexDirection: 'row',
// justifyContent: 'space-around',
// alignItems: 'center',
// height: 60
// },
// play_text: {
// fontSize: second_text_size,
// color: first_text_color,
// fontFamily: font_family_regular
// },
// play_btn:{
// flexDirection: 'row',
// justifyContent: 'space-around',
// alignItems: 'center',
// // height: 80
// },
// reco_list_box:{
// backgroundColor: '#EEECEC',
// borderRadius: 30,
// display: 'flex',
// alignItems: 'center',
// justifyContent: 'center',
// flexDirection: 'row',
// height: 34,
// width: pxSize(100)
// },
// reco_text: {
// fontSize: second_text_size,
// color: first_text_color,
// fontFamily: font_family_regular
// },
// sub_btn_box: {
// backgroundColor: dis_sub_color,
// height: 52,
// display: 'flex',
// alignItems: 'center',
// justifyContent: 'center'
// },
reco_text: {
fontSize: 14,
marginVertical: 10
},
reco_btn_text: {
fontSize: second_text_size,
color: first_text_color,
marginLeft: 6,
fontFamily: font_family_regular
},
reco_play_box: {
flex: 1,
width: Width() - 68,
// justifyContent: 'flex-end',
// alignItems: 'center'
},
play_tit:{
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
height: 60
},
play_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
play_btn:{
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
// height: 80
},
reco_list_box:{
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 34,
width: pxSize(100)
},
reco_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
sub_btn_box: {
backgroundColor: dis_sub_color,
height: 52,
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
},
sub_btn_pro: {
backgroundColor: promary_color
},
sub_btn: {
// color: title_text_color,
// fontSize: second_text_size
},
sub_btn: {},
list_cont: {
flex: 1
},
......
......@@ -14,17 +14,8 @@ import {
promary_color,
safe_view,
icon_style,
second_text_size,
font_family_regular,
first_text_color,
Width,
placehold_text_color,
pxSize,
foundation_color,
third_text_size,
title_text_color,
second_text_color,
pxHeight
list_common_item
} from '../../base/BaseStyle';
import StatusBarView from '../common/StatusBarView';
import HeadBackItem from '../common/HeadBackItem';
......@@ -410,11 +401,11 @@ class EquipConsuPage extends Component {
renderRemarksItem() {
let { state } = this
return (
<CellTextStyle style={styles.remark_item}>
<View style={styles.rema_box}>
<Text style={styles.rema_tit}>备注</Text>
<View style = {styles.rema_Input_outer} >
<TouchableOpacity activeOpacity = {1} style = {styles.rema_Input_inner} onPress = {() => this.TextInput.focus()} >
<CellTextStyle style={list_common_item.remark_item}>
<View style={list_common_item.rema_box}>
<Text style={list_common_item.rema_tit}>备注</Text>
<View style = {list_common_item.rema_Input_outer} >
<TouchableOpacity activeOpacity = {1} style = {list_common_item.rema_Input_inner} onPress = {() => this.TextInput.focus()} >
<TextInput
placeholder = {'请输入备注信息'}
placeholderTextColor = {placehold_text_color}
......@@ -422,7 +413,7 @@ class EquipConsuPage extends Component {
multiline = {true}
ref = {textInput => this.TextInput = textInput}
numberOfLines = {8}
style={styles.rema_Input}
style={list_common_item.rema_Input}
maxLength={140}
onChangeText={(text) => this.handleRemarkInput(text)}
defaultValue={state.listOptionData[4].value}
......@@ -439,66 +430,40 @@ class EquipConsuPage extends Component {
renderRecordingItem() {
let { recording, pause, stop, currentTime } = this.state
return (
<CellTextStyle style={styles.reco_item}>
<View style={styles.reco_btn_cont}>
<Text style={styles.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text>
<CellTextStyle style={[list_common_item.reco_item, !stop ? '' : list_common_item.reco_play_height]}>
<View style={list_common_item.reco_btn_cont}>
{ !stop ? <Text style={list_common_item.reco_btn_tit}>还有什么要安排的,可录音备注哟!</Text> : null }
{
!stop ?
<View style={styles.reco_btn_inner}>
<View style={list_common_item.reco_btn_inner}>
<TouchableOpacity
activeOpacity = {.8}
style={styles.reco_btn_box}
style={list_common_item.reco_btn_box}
onLongPress={this._record}
onPressOut={this._stop}
>
<View style={styles.reco_img_box}>
<View style={list_common_item.reco_img_box}>
<Image source={require('../../images/record_icon.png')} style={icon_style}/>
</View>
<Text style={styles.reco_btn_text}>长按录音</Text>
<Text style={list_common_item.reco_btn_text}>长按录音</Text>
</TouchableOpacity>
{/* <Text style={styles.reco_text} onPress={this._record}> Record(开始录音) </Text>
<Text style={styles.reco_text} onPress={this._pause}> Pause(暂停录音) </Text>
<Text style={styles.reco_text} onPress={this._resume}> Resume(恢复录音) </Text>
<Text style={styles.reco_text} onPress={this._stop}> Stop(停止录音) </Text>
<Text style={styles.reco_text} onPress={this._play}> Play(播放录音) </Text>
<Text style={styles.reco_text} onPress={this._del}> Del(删除录音) </Text>
<Text style={styles.reco_text}>
{
recording ? '正在录音' :
pause ? '已暂停' : '未开始'
}
</Text>
<Text style={styles.reco_text}>时长: {currentTime}</Text> */}
</View>
: <View style={styles.reco_play_box}>
<View style={styles.play_tit}>
<Text style={styles.play_text}>时长: {currentTime} </Text>
<Text style={styles.play_text}>正在播放</Text>
</View>
<View style={styles.play_btn}>
: <View style={list_common_item.reco_play_box}>
<View style={list_common_item.play_btn}>
<TouchableOpacity
activeOpacity = {.8}
style={[styles.reco_list_box, styles.reco_del_btn]}
style={[list_common_item.reco_list_box, list_common_item.reco_del_btn]}
onPress={this._del}
>
<Text style={[styles.reco_text, styles.reco_del_tit]}> 删除 </Text>
<Text style={[list_common_item.reco_text, list_common_item.reco_del_tit]}> 删除 </Text>
</TouchableOpacity>
<TouchableOpacity
activeOpacity = {.8}
style={[styles.reco_list_box, styles.reco_play_btn]}
style={[list_common_item.reco_list_box, list_common_item.reco_play_btn]}
onPress={this._play}
>
<Text style={[styles.reco_text, styles.reco_play_tit]}> 播放({currentTime}‘‘) </Text>
<Text style={[list_common_item.reco_text, list_common_item.reco_play_tit]}> 点击播放({currentTime}'') </Text>
</TouchableOpacity>
{/* <TouchableOpacity
activeOpacity = {.8}
style={styles.reco_list_box}
onPress={this._stopPlay}
>
<Text style={styles.reco_text}> 停止 </Text>
</TouchableOpacity> */}
</View>
</View>
......@@ -513,16 +478,16 @@ class EquipConsuPage extends Component {
renderConsumablesDetailsItem() {
let { state } = this
return (
<CellTextStyle style={styles.consu_detail}>
<View style={styles.detail_inner}>
<Text style={styles.detail_tit}>耗材明细</Text>
<CellTextStyle style={list_common_item.consu_detail}>
<View style={list_common_item.detail_inner}>
<Text style={list_common_item.detail_tit}>耗材明细</Text>
{
state.listOptionData[6].subOption.length ?
<View
// activeOpacity={1}
style={styles.detail_sub_cont}>
<View style={styles.detail_sub_tit}>
<Text style={styles.detail_tit_text}>
style={list_common_item.detail_sub_cont}>
<View style={list_common_item.detail_sub_tit}>
<Text style={list_common_item.detail_tit_text}>
耗材({state.listOptionData[6].subOption.length}
</Text>
......@@ -530,26 +495,26 @@ class EquipConsuPage extends Component {
state.listOptionData[6].isShowSub ?
<TouchableOpacity
activeOpacity={.8}
style={styles.detail_icon}
style={list_common_item.detail_icon}
onPress={() => this.handleDetailBtmCheck()}
>
<Image style={[icon_style, styles.detail_top_icon]} source={require('../../images/arr_btm.png')} />
<Image style={[icon_style, list_common_item.detail_top_icon]} source={require('../../images/arr_btm.png')} />
</TouchableOpacity> :
<TouchableOpacity
activeOpacity={.8}
style={[styles.detail_icon, styles.detail_icon_rig]}
style={[list_common_item.detail_icon, list_common_item.detail_icon_rig]}
onPress={() => this.handleDetailRigCheck()}
>
<Image style={[icon_style, styles.detail_top_icon]} source={require('../../images/arr_rig.png')} />
<Image style={[icon_style, list_common_item.detail_top_icon]} source={require('../../images/arr_rig.png')} />
</TouchableOpacity>
}
</View>
{
state.listOptionData[6].isShowSub ?
<View style={styles.detail_sub_inner}>
<View style={list_common_item.detail_sub_inner}>
<ScrollView
style={styles.detail_scroll}
style={list_common_item.detail_scroll}
onPress={() => {console.log('--触碰---')}}
onScrollBeginDrag={() => {console.log('--滚动---')}}
// showsVerticalScrollIndicator={false}
......@@ -565,13 +530,13 @@ class EquipConsuPage extends Component {
</View> : null
}
<View style={styles.detail_footer}>
<View style={list_common_item.detail_footer}>
<TouchableOpacity
activeOpacity={.8}
style={styles.detail_btn_box}
style={list_common_item.detail_btn_box}
onPress = {() => this.handleConsumDetailCheck()}
>
<Text style={styles.detail_btn}>{state.listOptionData[6].btnTit}</Text>
<Text style={list_common_item.detail_btn}>{state.listOptionData[6].btnTit}</Text>
</TouchableOpacity>
</View>
</View>
......@@ -582,11 +547,11 @@ class EquipConsuPage extends Component {
// 返回耗材明细子项
renderConDeSubItem(item, index) {
return(
<View style={styles.con_de_sub}>
<Text style={styles.de_sub_tit}>
<View style={list_common_item.con_de_sub}>
<Text style={list_common_item.de_sub_tit}>
{index+1}{ item.title }
</Text>
<Text style={styles.de_tip}>
<Text style={list_common_item.de_tip}>
{ item.orderNumber }
</Text>
</View>
......@@ -597,13 +562,13 @@ class EquipConsuPage extends Component {
renderAddPicturesItem() {
let { state } = this
return (
<CellTextStyle style={styles.consu_addpic}>
<View style={styles.addpic_inner}>
<Text style={styles.addpic_tit}>添加图片</Text>
<View style={styles.addpic_cont}>
<CellTextStyle style={list_common_item.consu_addpic}>
<View style={list_common_item.addpic_inner}>
<Text style={list_common_item.addpic_tit}>添加图片</Text>
<View style={list_common_item.addpic_cont}>
<TouchableOpacity
activeOpacity={.8}
style={styles.addpic_img_btn}
style={list_common_item.addpic_img_btn}
onPress={() => this.handleAddPicCheck()}
>
<Image style={icon_style} source={require('../../images/add_icon_large.png')} />
......@@ -611,7 +576,7 @@ class EquipConsuPage extends Component {
{/* <TouchableOpacity
activeOpacity={.8}
style={styles.addpic_img_btn}>
style={list_common_item.addpic_img_btn}>
<Image style={icon_style} source={require('../../images/add_icon_large.png')} />
</TouchableOpacity> */}
</View>
......@@ -683,259 +648,12 @@ const styles = StyleSheet.create({
trans_main : {
padding: 14
},
remark_item: {
minHeight: 80,
height: 'auto'
},
rema_box: {
paddingVertical: 16
},
rema_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
// fontWeight: 'bold'
},
rema_Input_outer: {
height: 120,
alignItems: 'center',
// paddingHorizontal: 15,
paddingBottom: 0
},
rema_Input_inner: {
paddingTop: 10,
height: 105,
width: Width() - 38,
// borderWidth: 1,
// borderColor: '#eeeeee'
},
rema_Input: {
paddingVertical: 0,
maxHeight: 105,
fontSize: second_text_size,
textAlign:'left',
textAlignVertical:'top',
alignSelf:'flex-start',
justifyContent:'flex-start',
alignItems:'flex-start',
fontFamily: font_family_regular
},
list_cont: {
flex: 1
},
item_container: {
flex: 1
},
reco_item: {
height: 160,
// height: 340,
// marginBottom: 42
},
reco_btn_cont: {
paddingVertical: 20
},
reco_btn_tit: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_btn_inner: {
flex: 1,
width: Width() - 38,
// justifyContent: 'flex-end',
alignItems: 'center',
paddingTop: 30
},
reco_btn_box: {
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 50,
width: pxSize(152)
},
reco_img_box: {
width: pxSize(20),
height: pxSize(22)
},
// reco_img: {
// width: '100%',
// height: '100%'
// },
reco_text: {
fontSize: 14,
marginVertical: 10
},
reco_btn_text: {
fontSize: second_text_size,
color: first_text_color,
marginLeft: 6,
fontFamily: font_family_regular
},
reco_play_box: {
flex: 1,
width: Width() - 68,
// justifyContent: 'flex-end',
// alignItems: 'center'
},
play_tit:{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
height: 60
},
play_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
play_btn:{
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
// height: 80
},
reco_list_box:{
backgroundColor: '#EEECEC',
borderRadius: 30,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
height: 34,
width: pxSize(100)
},
reco_del_btn: {
backgroundColor: promary_color,
height: 20,
borderRadius: 5,
width: pxSize(60)
},
reco_play_btn: {
width: pxSize(200),
borderRadius: 5,
height: 34,
borderColor: '#DFDFDF',
borderWidth: 1,
backgroundColor: foundation_color
},
reco_text: {
fontSize: second_text_size,
color: first_text_color,
fontFamily: font_family_regular
},
reco_del_tit: {
color: title_text_color,
fontSize: third_text_size
},
reco_play_tit: {},
consu_detail: {
backgroundColor: home_background_color,
// backgroundColor: '#ccc',
paddingHorizontal: 0,
minHeight: 80,
height: 'auto',
alignItems: 'flex-start'
},
detail_inner: {
flex: 1
},
detail_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
fontFamily: font_family_regular
},
detail_sub_cont: {
backgroundColor: foundation_color,
padding: 20,
marginTop: 10
},
detail_footer: {
paddingHorizontal: 16
},
detail_sub_tit: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center'
},
detail_tit_text: {
color: '#000',
fontSize: 16,
fontFamily: font_family_regular
},
detail_icon: {
width: pxSize(20),
height: pxSize(20)
},
detail_icon_rig: {
width: pxSize(18),
height: pxSize(18)
},
detail_top_icon: {},
detail_sub_inner: {
marginTop: 10,
maxHeight: pxSize(160),
// flex: 1
},
detail_scroll: {
// flex: 1
// height: 100
},
con_de_sub: {
marginBottom: 10
},
de_sub_tit: {
color: second_text_color
},
de_tip: {
color: second_text_color
},
consu_addpic: {
backgroundColor: home_background_color,
paddingHorizontal: 0,
minHeight: pxHeight(320),
height: 'auto',
alignItems: 'flex-start',
marginBottom: 34
},
addpic_inner: {
flex: 1
},
addpic_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
fontFamily: font_family_regular
},
addpic_cont: {
backgroundColor: foundation_color,
padding: 20,
marginTop: 10,
flexDirection: 'row',
flex: 1
},
addpic_img_btn: {
width: pxSize(68),
height: pxSize(68),
marginRight: 20
},
detail_btn_box: {
backgroundColor: promary_color,
width: '100%',
height: pxSize(46),
borderRadius: 5,
marginTop: 10
},
detail_btn: {
color: title_text_color,
textAlign: 'center',
fontSize: second_text_size,
lineHeight: 40
},
sub_btn_pro: {
backgroundColor: promary_color
},
......
......@@ -54,9 +54,9 @@ export const UploadRequest = (url,datas) => {
const opts = {
method: 'POST',
body: datas,
// headers: {
// 'Content-Type': 'multipart/form-data'
// },
headers: {
'Content-Type': 'multipart/form-data'
},
timeout: 20000 //20s超时
};
......
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