Commit c4440684 by Denglingling

完善【器械消耗】主页面大致布局;

parent f73732bb
...@@ -10,10 +10,10 @@ import { Text, TextInput } from 'react-native'; ...@@ -10,10 +10,10 @@ import { Text, TextInput } from 'react-native';
import {Provider} from 'react-redux'; import {Provider} from 'react-redux';
import configureStore from './app/store/configureStore'; import configureStore from './app/store/configureStore';
import Router from './app/Router'; import Router from './app/Router';
import { fetch as fetchPolyfill } from 'whatwg-fetch' // import { fetch as fetchPolyfill } from 'whatwg-fetch'
const store = configureStore(); const store = configureStore();
global.fetch = fetchPolyfill // global.fetch = fetchPolyfill
// 字体不随系统字体变化 // 字体不随系统字体变化
Text.defaultProps = Object.assign({}, Text.defaultProps, { allowFontScaling: false }) Text.defaultProps = Object.assign({}, Text.defaultProps, { allowFontScaling: false })
......
...@@ -9,8 +9,6 @@ import { ...@@ -9,8 +9,6 @@ import {
QUICK_SUBMIT_SUCCESS, QUICK_SUBMIT_SUCCESS,
QUICK_SUBMIT_FAILURE QUICK_SUBMIT_FAILURE
} from '../base/ActionTypes'; } from '../base/ActionTypes';
import RNFetchBlob from 'react-native-fetch-blob'
import RNFS from 'react-native-fs';
// 获取组织 params={access_token:''} // 获取组织 params={access_token:''}
export function requestQuickOrganizations(params) { export function requestQuickOrganizations(params) {
...@@ -152,55 +150,18 @@ export function requestQuickAudio(params) { ...@@ -152,55 +150,18 @@ export function requestQuickAudio(params) {
let formData = new FormData() let formData = new FormData()
let soundPath = `file://${path}` let soundPath = `file://${path}`
let tempPath = 'file:///storage/emulated/0/Pictures/image.jpg' // soundPath = "file:///Users/wwt/Library/Developer/CoreSimulator/Devices/65EAD11E-A398-499D-916C-B346552EFF59/data/Containers/Data/Application/3B458954-880D-4001-AC47-C85F2C97B471/Documents/quickAudio243.ogg"
// let tempPath = 'file:///storage/emulated/0/Pictures/image.jpg'
let fileName = path.substring(path.lastIndexOf('/') + 1, path.length) let fileName = path.substring(path.lastIndexOf('/') + 1, path.length)
let fileType = path.split('.')[1] let fileType = path.split('.')[1]
// let file = { uri: soundPath, type: 'ogg', name: fileName } // 类型和名字固定??? let file = { uri: soundPath, type: "multipart/form-data", name: fileName} // 类型和名字固定???
let file = { uri: tempPath, type: 'multipart/form-data', name: 'image.jpg' } // 类型和名字固定??? // let file = { uri: tempPath, type: 'multipart/form-data', name: fileName } // 类型和名字固定???
formData.append('file', file) formData.append('file', file)
console.log('----file====================', file, soundPath, formData) console.log('----file====================', file, soundPath, formData)
// // 这里需要将'///'处理掉,因为使用wrap的时候,会再包裹一层
// // 本文的fetch-blob使用的是0.10.4版本,据说其他版本不用添加下面的代码。
// // let PATH = iOS?path.replace('file:///',''):path;
// // 创建上传的请求头,使用fetch-blob必须要遵循name,data的格式,要不然就不成功。
// let body = [{
// name: 'file',
// filename: fileName || 'file',
// data: RNFetchBlob.wrap(path)
// }];
// RNFetchBlob
// .fetch('POST',getUrlParams('/dingding/upload_media', { access_token }),{
// // 上传图片要设置Header
// 'Content-Type' : 'multipart/form-data',
// },body)
// .uploadProgress((written, total) => {
// // 本地查找进度
// console.log(written, total);
// })
// .progress((received, total) => {
// let perent = received / total;
// // 上传进度打印
// console.log(perent);
// })
// .then((response)=> response.json())
// .then((response)=> {
// // 上传信息返回
// console.log(response);
// })
// .catch((error)=>{
// // 错误信息
// console.log(error);
// });
dispatch(requestSubmitOrganizationsing()); dispatch(requestSubmitOrganizationsing());
// /system/attachment/create // /system/attachment/create
// /dingding/upload_media // /dingding/upload_media
...@@ -220,7 +181,7 @@ export function requestQuickAudio(params) { ...@@ -220,7 +181,7 @@ export function requestQuickAudio(params) {
} }
}) })
.catch(err => { .catch(err => {
// console.log('------err--====requestQuickAudio----', Object.keys(err)) console.log('------err--====requestQuickAudio----', Object.keys(err), err)
show(err.error); show(err.error);
}) })
} }
......
...@@ -6,19 +6,40 @@ import { ...@@ -6,19 +6,40 @@ import {
SafeAreaView, SafeAreaView,
ScrollView, ScrollView,
Image, Image,
TouchableOpacity TouchableOpacity,
TextInput
} from 'react-native'; } from 'react-native';
import { import {
home_background_color, home_background_color,
promary_color, promary_color,
safe_view, safe_view,
icon_style 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
} from '../../base/BaseStyle'; } from '../../base/BaseStyle';
import StatusBarView from '../common/StatusBarView'; import StatusBarView from '../common/StatusBarView';
import HeadBackItem from '../common/HeadBackItem'; import HeadBackItem from '../common/HeadBackItem';
import { FooterBtnStyle, ImageTextStyle, CellTextStyle, AsteriskTextStyle, TitleTextStyle, ContInputTextStyle } from '../common/CellTextStyle'; import {
FooterBtnStyle,
ImageTextStyle,
CellTextStyle,
AsteriskTextStyle,
TitleTextStyle,
ContInputTextStyle,
ContTextStyle
} from '../common/CellTextStyle';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { isEmpty } from '../../utils/Utils'; import { isEmpty } from '../../utils/Utils';
import DateModel from '../common/DateModel';
import DialogModel from '../common/DialogModel';
class EquipConsuPage extends Component { class EquipConsuPage extends Component {
constructor(props) { constructor(props) {
...@@ -30,7 +51,7 @@ class EquipConsuPage extends Component { ...@@ -30,7 +51,7 @@ class EquipConsuPage extends Component {
"id": "0", "id": "0",
title: '销售员', title: '销售员',
name: '蔡妍', name: '蔡妍',
value: '蔡妍', value: 'caiyan',
isPicker: false, isPicker: false,
select: false, select: false,
isEditable: false // 不可编辑 isEditable: false // 不可编辑
...@@ -64,8 +85,10 @@ class EquipConsuPage extends Component { ...@@ -64,8 +85,10 @@ class EquipConsuPage extends Component {
title: '消耗时间', title: '消耗时间',
name: '请选择', name: '请选择',
value: '', value: '',
dateValue: new Date(),
isPicker: true, isPicker: true,
select: false select: false,
showDatePicker: true
}, },
{ {
"id": "5", "id": "5",
...@@ -121,9 +144,30 @@ class EquipConsuPage extends Component { ...@@ -121,9 +144,30 @@ class EquipConsuPage extends Component {
{ {
"id": "12", "id": "12",
title: '耗材明细', // 跳转 title: '耗材明细', // 跳转
btnTit: '+添加消耗明细',
value: '', value: '',
isPicker: false, isPicker: false,
select: false select: false,
isJumpSubPage: true, // 跳转子页
isShowSub: true, // 是否展示子项
subOption: [
{
title: '人工髋关节假体-JS-HB ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
},{
title: '人工髋关节假体-JS-22 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
},{
title: '人工髋关节假体-JS-33 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
},{
title: '人工髋关节假体-JS-44 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
},{
title: '人工髋关节假体-JS-5 ||| 人工髋关节假体-JS-HB',
orderNumber: 'SC20200506000006, SC20200506000006'
}
]
}, },
{ {
"id": "13", "id": "13",
...@@ -131,16 +175,35 @@ class EquipConsuPage extends Component { ...@@ -131,16 +175,35 @@ class EquipConsuPage extends Component {
value: '', value: '',
isPicker: false, isPicker: false,
select: false, select: false,
isAddImg: true isAddImage: true // 添加图片
} }
], ],
submitOption: { // 提交的信息 submitOption: { // 提交的信息
// seller_code: '', // 用户名username
// org_code: '', // 组织
// customer_code: '', // 手术医院
// bill_to_site_code: '', // 收单地点
// ship_to_site_code: '', // 收货地点
// doctor_name: '', // 主治医生
// // surgery_name: '', // 手术名称
// surgery_date: '', // 手术时间
// // surgery_type_code: '', // 手术类型
// template_collect_number: '', // 配台模版
// order_type_code: '', // 订单类型
// surgery_desc: '', // 备注信息
// voice_url: '', // 录音地址
// order_currency: 'CNY',
// Caller: 'dingding',
// force_balance_check_flag: 'Y', // 检查缺失物料
}, },
currentItem: { currentItem: {
name: '请选择', name: '请选择',
value: '-1' value: '-1'
}, },
localOtherObj: { // 恢复原状态
name: '请选择',
value: ''
},
currentTitle: '组织', // 当前点击项 currentTitle: '组织', // 当前点击项
showTypePop: false, // 选择器弹窗 showTypePop: false, // 选择器弹窗
isSubLoding: false, // 加载中弹窗 isSubLoding: false, // 加载中弹窗
...@@ -155,17 +218,137 @@ class EquipConsuPage extends Component { ...@@ -155,17 +218,137 @@ class EquipConsuPage extends Component {
value: 'girl' value: 'girl'
} }
], ],
dateModelPop: false, // 日期选择器
}
}
componentDidMount() {
this.getSellerName()
}
// 赋值销售员
getSellerName() {
let {state, props} = this
// console.log('---userInfo',props.userInfo)
if(state.listOptionData[0].name !== props.userInfo.person_name) {
this.setState({
listOptionData: state.listOptionData.map((item) => {
if(item.title === '销售员') {
item.name = props.userInfo.person_name
item.value = props.userInfo.user_name
}
return item
})
})
}
}
// 选择器弹窗回调函数
handleCallBack(item, itemTitle) {
console.warn(item, 'item--选择器弹窗回调函数----')
console.warn('item-itemTitle-----',itemTitle)
}
// 关闭弹窗
handleCloseModal(show) {
this.setState({
showTypePop: show
})
}
// 组织 点击
handleOrganizationCheck() {
console.warn('组织------check')
// let { state, props } = this
// this.setState({
// currentTitle: '组织',
// currentItem: {
// name: state.listOptionData[1].name,
// value: state.listOptionData[1].value
// }
// }, () => {
// let params = {
// access_token: props.token
// }
// props.requestQuickOrganizations(params)
// })
}
// 手术医院 点击
handleCustomerCheck() {
console.warn('手术医院------check')
// let { state, props } = this
// let self = this
// if(this.judgeOrgIsNull()) {
// self.setState({
// currentTitle: '手术医院',
// currentItem: {
// name: state.listOptionData[2].name,
// value: state.listOptionData[2].value
// }
// }, () => {
// // 在此修改接口
// self.getCustomerData()
// })
// }
}
// 耗材明细 隐藏子项
handleDetailBtmCheck() {
let {listOptionData} = this.state
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(index == 12) {
item.isShowSub = false
}
return item
})
})
}
// 耗材明细 显示子项
handleDetailRigCheck() {
let {listOptionData} = this.state
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(index == 12) {
item.isShowSub = true
}
return item
})
})
}
// 耗材明细 点击
handleConsumDetailCheck() {
console.warn('耗材明细------check')
// this.props.navigation.navigate('TransSearchPage', {
// title: '器械消耗 - 添加明细'
// })
} }
// 添加图片 点击
handleAddPicCheck() {
console.warn('添加图片------check')
} }
// 生成订单 点击 // 生成订单 点击
handleSubmit() { handleSubmit() {
console.warn('生成订单------check')
} }
// 返回备注以上的元素 // 返回备注以上的元素
renderListItem() { renderListItem() {
let { listOptionData } = this.state let { listOptionData, dateModelPop } = this.state
let {userInfo:{ person_name }} = this.props let {userInfo:{ person_name }} = this.props
if(!isEmpty(person_name)) { if(!isEmpty(person_name)) {
// this.setState({ // this.setState({
...@@ -192,6 +375,180 @@ class EquipConsuPage extends Component { ...@@ -192,6 +375,180 @@ class EquipConsuPage extends Component {
</CellTextStyle> </CellTextStyle>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleOrganizationCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'组织'}</TitleTextStyle>
<ContTextStyle>{listOptionData[1].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
onPress={() => this.handleCustomerCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'手术医院'}</TitleTextStyle>
<ContTextStyle>{listOptionData[2].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
// onPress={() => this.handleOrderInfo()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'订单信息'}</TitleTextStyle>
<ContTextStyle>{listOptionData[3].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
// onPress={() => this.handleConsumDateCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'消耗时间'}</TitleTextStyle>
<ContTextStyle>{listOptionData[4].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
<DateModel
date={listOptionData[4].dateValue}
// closeModal={(show) => this.closeDateModal(show)}
show={dateModelPop}
// callback={(date) => this.dateModalCallback(date)}
/>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle style={styles.cell_title}>{'患者姓名'}</TitleTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
// onChangeText={(text) => this.handlePatNameInput(text)}
/>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
// onPress={() => this.handleGenderCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'性别'}</TitleTextStyle>
<ContTextStyle>{listOptionData[6].name}</ContTextStyle>
{ this.renderRightArrowItem() }
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle style={styles.cell_title}>{'年龄'}</TitleTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
// onChangeText={(text) => this.handleAgeInput(text)}
/>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle style={styles.cell_title}>{'床位'}</TitleTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
// onChangeText={(text) => this.handleBedInput(text)}
/>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle style={styles.cell_title}>{'病历号'}</TitleTextStyle>
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
// onChangeText={(text) => this.handleRecordNumInput(text)}
/>
</CellTextStyle>
</TouchableOpacity>
</View>
<View style={styles.item_container}>
<TouchableOpacity
activeOpacity={.8}
// onPress={() => this.handleBillCheck()}
>
<CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'是否结单'}</TitleTextStyle>
<View style={styles.btn_radio_box}>
<TouchableOpacity
activeOpacity={.8}
style={styles.btn_yes}
onPress={() => console.log('是')}
>
<View style={styles.radio_icon}>
<Image style={icon_style} source={require('../../images/radio_yes.png')} />
</View>
<Text style={styles.radio_txt}></Text>
</TouchableOpacity>
<TouchableOpacity
activeOpacity={.8}
style={styles.btn_no}
onPress={() => console.log('否')}
>
<View style={styles.radio_icon}>
<Image style={icon_style} source={require('../../images/radio_no.png')} />
</View>
<Text style={styles.radio_txt}></Text>
</TouchableOpacity>
</View>
{/* <ContInputTextStyle
style={styles.cell_input}
placeholder={`是 否`}
// onChangeText={(text) => this.handleDoctorCheck(text)}
/> */}
</CellTextStyle>
</TouchableOpacity>
</View>
{ this.renderPickerModel() }
</View> </View>
) )
...@@ -207,8 +564,173 @@ class EquipConsuPage extends Component { ...@@ -207,8 +564,173 @@ class EquipConsuPage extends Component {
} }
// 返回选择器 // 返回选择器
renderPickerModelAndLodingModel() { renderPickerModel() {
let {
listCurrentOption,
currentItem,
currentTitle,
showTypePop,
} = this.state
// console.warn('弹窗-----,', listCurrentOption)
return (
<SafeAreaView style={styles.item_container}>
<DialogModel
entityList={listCurrentOption}
// callback={(item, itemTitle) => this.handleCallBack(item, itemTitle)}
show={showTypePop}
itemValue={currentItem.value}
itemTitle={currentTitle}
// closeModal={(show) => this.handleCloseModal(show)}
/>
</SafeAreaView>
)
}
// 返回备注元素
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()} >
<TextInput
placeholder = {'请输入备注信息'}
placeholderTextColor = {placehold_text_color}
underlineColorAndroid = {'transparent'}
multiline = {true}
ref = {textInput => this.TextInput = textInput}
numberOfLines = {8}
style={styles.rema_Input}
maxLength={140}
// onChangeText={(text) => this.handleRemarkInput(text)}
defaultValue={state.listOptionData[10].value}
/>
</TouchableOpacity>
</View>
</View>
</CellTextStyle>
)
}
// 返回耗材明细
renderConsumablesDetailsItem() {
let { state } = this
return (
<CellTextStyle style={styles.consu_detail}>
<View style={styles.detail_inner}>
<Text style={styles.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}>
耗材({state.listOptionData[12].subOption.length}
</Text>
{
state.listOptionData[12].isShowSub ?
<TouchableOpacity
activeOpacity={.8}
style={styles.detail_icon}
onPress={() => this.handleDetailBtmCheck()}
>
<Image style={[icon_style, styles.detail_top_icon]} source={require('../../images/arr_btm.png')} />
</TouchableOpacity> :
<TouchableOpacity
activeOpacity={.8}
style={[styles.detail_icon, styles.detail_icon_rig]}
onPress={() => this.handleDetailRigCheck()}
>
<Image style={[icon_style, styles.detail_top_icon]} source={require('../../images/arr_rig.png')} />
</TouchableOpacity>
}
</View>
{
state.listOptionData[12].isShowSub ?
<View style={styles.detail_sub_inner}>
<ScrollView
style={styles.detail_scroll}
onPress={() => {console.log('--触碰---')}}
onScrollBeginDrag={() => {console.log('--滚动---')}}
// showsVerticalScrollIndicator={false}
>
{
state.listOptionData[12].subOption.map((item, index) => {
return this.renderConDeSubItem(item, index)
})
}
</ScrollView>
</View> : null
}
</View> : null
}
<View style={styles.detail_footer}>
<TouchableOpacity
activeOpacity={.8}
style={styles.detail_btn_box}
onPress = {() => this.handleConsumDetailCheck()}
>
<Text style={styles.detail_btn}>{state.listOptionData[12].btnTit}</Text>
</TouchableOpacity>
</View>
</View>
</CellTextStyle>
)
}
// 返回耗材明细子项
renderConDeSubItem(item, index) {
return(
<View style={styles.con_de_sub}>
<Text style={styles.de_sub_tit}>
{index+1}{ item.title }
</Text>
<Text style={styles.de_tip}>
{ item.orderNumber }
</Text>
</View>
)
}
// 返回添加图片
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}>
<TouchableOpacity
activeOpacity={.8}
style={styles.addpic_img_btn}
// onPress={() => this.handleAddPicCheck()}
>
<Image style={icon_style} source={require('../../images/add_icon_large.png')} />
</TouchableOpacity>
{/* <TouchableOpacity
activeOpacity={.8}
style={styles.addpic_img_btn}>
<Image style={icon_style} source={require('../../images/add_icon_large.png')} />
</TouchableOpacity> */}
</View>
</View>
</CellTextStyle>
)
}
// 返回正在加载中
renderLodingItem() {
// let { lodingTitle, isSubLoding } = this.state
// return(
// <LodingModel title={lodingTitle} show={isSubLoding} style_back={styles.loding_back} />
// )
} }
render() { render() {
...@@ -233,6 +755,12 @@ class EquipConsuPage extends Component { ...@@ -233,6 +755,12 @@ class EquipConsuPage extends Component {
{this.renderListItem()} {this.renderListItem()}
{this.renderRemarksItem()}
{this.renderConsumablesDetailsItem()}
{this.renderAddPicturesItem()}
</ScrollView> </ScrollView>
</SafeAreaView> </SafeAreaView>
...@@ -256,6 +784,183 @@ const styles = StyleSheet.create({ ...@@ -256,6 +784,183 @@ const styles = StyleSheet.create({
equip_main : { equip_main : {
padding: 14 padding: 14
}, },
btn_radio_box: {
flexDirection: 'row',
justifyContent: 'flex-end',
alignItems: 'center',
flex: 1,
paddingRight: 20
},
btn_yes: {
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
paddingRight: 16
},
btn_no: {
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center'
},
radio_icon: {
width: pxSize(22),
height: pxSize(22),
marginRight: 4
},
radio_txt: {
color: first_text_color,
fontSize: 16,
fontFamily: font_family_regular
},
cell_title: {
width: 120
},
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: { list_cont: {
flex: 1 flex: 1
}, },
...@@ -266,12 +971,16 @@ const styles = StyleSheet.create({ ...@@ -266,12 +971,16 @@ const styles = StyleSheet.create({
backgroundColor: promary_color backgroundColor: promary_color
}, },
sub_btn: {}, sub_btn: {},
loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)'
}
}) })
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
return { return {
userInfo: state.login.userInfo, userInfo: state.login.userInfo,
token: state.login.token, token: state.login.token,
loginState: state.login.loginState,
} }
} }
......
...@@ -410,7 +410,7 @@ class EquipConsuPage extends Component { ...@@ -410,7 +410,7 @@ class EquipConsuPage extends Component {
SampleRate: 44100.0, //采样率 SampleRate: 44100.0, //采样率
Channels: 2, //通道 Channels: 2, //通道
AudioQuality: 'High', //音质 AudioQuality: 'High', //音质
AudioEncoding: 'aac', //音频编码 AudioEncoding: 'ogg', //音频编码 aac
OutputFormat: 'mpeg_4', //输出格式 OutputFormat: 'mpeg_4', //输出格式
MeteringEnabled: false, //是否计量 MeteringEnabled: false, //是否计量
MeasurementMode: false, //测量模式 MeasurementMode: false, //测量模式
...@@ -1068,13 +1068,13 @@ class EquipConsuPage extends Component { ...@@ -1068,13 +1068,13 @@ class EquipConsuPage extends Component {
this.changeCanSub(true) this.changeCanSub(true)
let { state, props } = this let { state, props } = this
// // // 测试 -- 录音 // // 测试 -- 录音
// // let params = { // let params = {
// // access_token: props.token, // access_token: props.token,
// // path: state.audioPath // path: state.audioPath
// // } // }
// // console.log('---handleSubmit--',params) // console.log('---handleSubmit--',params)
// // props.requestQuickAudio(params) // props.requestQuickAudio(params)
// // // 测试 -- 图片上传 // // // 测试 -- 图片上传
// // this.addPhotoAction() // // this.addPhotoAction()
......
...@@ -529,14 +529,14 @@ class EquipConsuPage extends Component { ...@@ -529,14 +529,14 @@ class EquipConsuPage extends Component {
{ {
state.listOptionData[6].isShowSub ? state.listOptionData[6].isShowSub ?
<TouchableOpacity <TouchableOpacity
activeOpacity={.7} activeOpacity={.8}
style={styles.detail_icon} style={styles.detail_icon}
onPress={() => this.handleDetailBtmCheck()} onPress={() => this.handleDetailBtmCheck()}
> >
<Image style={[icon_style, styles.detail_top_icon]} source={require('../../images/arr_btm.png')} /> <Image style={[icon_style, styles.detail_top_icon]} source={require('../../images/arr_btm.png')} />
</TouchableOpacity> : </TouchableOpacity> :
<TouchableOpacity <TouchableOpacity
activeOpacity={.7} activeOpacity={.8}
style={[styles.detail_icon, styles.detail_icon_rig]} style={[styles.detail_icon, styles.detail_icon_rig]}
onPress={() => this.handleDetailRigCheck()} onPress={() => this.handleDetailRigCheck()}
> >
...@@ -567,7 +567,7 @@ class EquipConsuPage extends Component { ...@@ -567,7 +567,7 @@ class EquipConsuPage extends Component {
<View style={styles.detail_footer}> <View style={styles.detail_footer}>
<TouchableOpacity <TouchableOpacity
activeOpacity={.7} activeOpacity={.8}
style={styles.detail_btn_box} style={styles.detail_btn_box}
onPress = {() => this.handleConsumDetailCheck()} onPress = {() => this.handleConsumDetailCheck()}
> >
...@@ -594,7 +594,7 @@ class EquipConsuPage extends Component { ...@@ -594,7 +594,7 @@ class EquipConsuPage extends Component {
} }
// 返回添加图片 // 返回添加图片
renderAddPictures() { renderAddPicturesItem() {
let { state } = this let { state } = this
return ( return (
<CellTextStyle style={styles.consu_addpic}> <CellTextStyle style={styles.consu_addpic}>
...@@ -602,7 +602,7 @@ class EquipConsuPage extends Component { ...@@ -602,7 +602,7 @@ class EquipConsuPage extends Component {
<Text style={styles.addpic_tit}>添加图片</Text> <Text style={styles.addpic_tit}>添加图片</Text>
<View style={styles.addpic_cont}> <View style={styles.addpic_cont}>
<TouchableOpacity <TouchableOpacity
activeOpacity={.7} activeOpacity={.8}
style={styles.addpic_img_btn} style={styles.addpic_img_btn}
onPress={() => this.handleAddPicCheck()} onPress={() => this.handleAddPicCheck()}
> >
...@@ -610,7 +610,7 @@ class EquipConsuPage extends Component { ...@@ -610,7 +610,7 @@ class EquipConsuPage extends Component {
</TouchableOpacity> </TouchableOpacity>
{/* <TouchableOpacity {/* <TouchableOpacity
activeOpacity={.7} activeOpacity={.8}
style={styles.addpic_img_btn}> style={styles.addpic_img_btn}>
<Image style={icon_style} source={require('../../images/add_icon_large.png')} /> <Image style={icon_style} source={require('../../images/add_icon_large.png')} />
</TouchableOpacity> */} </TouchableOpacity> */}
...@@ -655,7 +655,7 @@ class EquipConsuPage extends Component { ...@@ -655,7 +655,7 @@ class EquipConsuPage extends Component {
{this.renderConsumablesDetailsItem()} {this.renderConsumablesDetailsItem()}
{this.renderAddPictures()} {this.renderAddPicturesItem()}
</ScrollView> </ScrollView>
</SafeAreaView> </SafeAreaView>
......
...@@ -105,7 +105,7 @@ class TransSearchPage extends Component { ...@@ -105,7 +105,7 @@ class TransSearchPage extends Component {
</View> </View>
<View style={[styles.item_container, styles.item_btn_cont]}> <View style={[styles.item_container, styles.item_btn_cont]}>
<TouchableOpacity <TouchableOpacity
activeOpacity={.7} activeOpacity={.8}
style={styles.search_btn_box} style={styles.search_btn_box}
onPress={() => console.log('查询')} onPress={() => console.log('查询')}
> >
...@@ -125,7 +125,7 @@ class TransSearchPage extends Component { ...@@ -125,7 +125,7 @@ class TransSearchPage extends Component {
当前查询(5)数据 当前查询(5)数据
</Text> </Text>
<TouchableOpacity <TouchableOpacity
activeOpacity={.7} activeOpacity={.8}
style={styles.tit_btn_box} style={styles.tit_btn_box}
onPress={() => console.log('全选,取消全选')} onPress={() => console.log('全选,取消全选')}
> >
...@@ -136,7 +136,7 @@ class TransSearchPage extends Component { ...@@ -136,7 +136,7 @@ class TransSearchPage extends Component {
<View style={styles.cont_list_item}> <View style={styles.cont_list_item}>
<View style={styles.list_left}> <View style={styles.list_left}>
<TouchableOpacity <TouchableOpacity
activeOpacity={.7} activeOpacity={.8}
style={styles.btn_single_box} style={styles.btn_single_box}
onPress={() => console.log('单选!!!')} onPress={() => console.log('单选!!!')}
> >
...@@ -155,7 +155,7 @@ class TransSearchPage extends Component { ...@@ -155,7 +155,7 @@ class TransSearchPage extends Component {
<View style={styles.cont_list_item}> <View style={styles.cont_list_item}>
<View style={styles.list_left}> <View style={styles.list_left}>
<TouchableOpacity <TouchableOpacity
activeOpacity={.7} activeOpacity={.8}
style={styles.btn_single_box} style={styles.btn_single_box}
onPress={() => console.log('单选!!!')} onPress={() => console.log('单选!!!')}
> >
...@@ -174,7 +174,7 @@ class TransSearchPage extends Component { ...@@ -174,7 +174,7 @@ class TransSearchPage extends Component {
<View style={styles.cont_list_item}> <View style={styles.cont_list_item}>
<View style={styles.list_left}> <View style={styles.list_left}>
<TouchableOpacity <TouchableOpacity
activeOpacity={.7} activeOpacity={.8}
style={styles.btn_single_box} style={styles.btn_single_box}
onPress={() => console.log('单选!!!')} onPress={() => console.log('单选!!!')}
> >
...@@ -193,7 +193,7 @@ class TransSearchPage extends Component { ...@@ -193,7 +193,7 @@ class TransSearchPage extends Component {
<View style={styles.cont_list_item}> <View style={styles.cont_list_item}>
<View style={styles.list_left}> <View style={styles.list_left}>
<TouchableOpacity <TouchableOpacity
activeOpacity={.7} activeOpacity={.8}
style={styles.btn_single_box} style={styles.btn_single_box}
onPress={() => console.log('单选!!!')} onPress={() => console.log('单选!!!')}
> >
......
...@@ -55,16 +55,12 @@ export const UploadRequest = (url,datas) => { ...@@ -55,16 +55,12 @@ export const UploadRequest = (url,datas) => {
method: 'POST', method: 'POST',
body: datas, body: datas,
// headers: { // headers: {
// // 'Accept': 'application/json',
// // 'Content-Type': 'application/json'
// 'Content-Type': 'multipart/form-data' // 'Content-Type': 'multipart/form-data'
// // 'Content-Type': 'multipart/form-data;charset=utf-8'
// }, // },
timeout: 20000 //20s超时 timeout: 20000 //20s超时
}; };
// return fetch(`${BaseUrl}${VERSION}${url}`, opts) return fetch(`${BaseUrl}${VERSION}${url}`, opts)
return fetch(`${BaseUrlOther}${VERSION}${url}`, opts)
.then(response => response.json()) .then(response => response.json())
.then(data => data) .then(data => data)
.catch(error => { .catch(error => {
......
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