Commit e62546a8 by Denglingling

新增模拟接口获取APP数据

parent 154efb7f
......@@ -10,6 +10,7 @@ import {
SELF_SUBMIT_FAILURE,
SELF_INIT_DATA
} from '../base/ActionTypes';
import local_inter_mock from '../containers/selfOrder/module/mock/inter_mock'
// 获取组织 params={access_token:''}
export function requestSelfOrganizations(params) {
......@@ -221,50 +222,63 @@ export function requestSelfSumbit({access_token, ...params}) {
// 选择产品-供应商信息查询接口
export const reqPurSupplierSearch = async (global_domain_config, params) => {
return local_inter_mock.inter_1
return await GetRequest(global_domain_config, getUrlParams('/order/pur_supplier/search', params))
}
// 选择产品-产品信息分类查询接口
export const reqProCategorySearch = async (global_domain_config, params) => {
return local_inter_mock.inter_2
return await GetRequest(global_domain_config, getUrlParams('/order/item/search', params))
}
// 选择产品-手术模板头查询接口
export const reqSurTempHeadSearch = async (global_domain_config, params) => {
return local_inter_mock.inter_3
return await GetRequest(global_domain_config, getUrlParams('/surgery/template_header/search', params))
}
// 选择产品-手术模板行查询接口
export const reqSurTempLineSearch = async (global_domain_config, params) => {
return local_inter_mock.inter_4
return await GetRequest(global_domain_config, getUrlParams('/surgery/template_line/search', params))
}
// 选择产品-螺钉盒(器械包)头查询接口
export const reqNailEquipHeadSearch = async (global_domain_config, params) => {
if(params.category_code === '1301'){
return local_inter_mock.inter_5
}else {
return local_inter_mock.inter_55
}
return await GetRequest(global_domain_config, getUrlParams('/inventory/item_package/search', params))
}
// 选择产品-螺钉盒明细查询接口
export const reqNailBoxLineSearch = async (global_domain_config, params) => {
return local_inter_mock.inter_6
return await GetRequest(global_domain_config, getUrlParams('/inventory/nail_box_template_detail/search', params))
}
// 选择产品-器械包明细查询接口
export const reqEquipPackageLineSearch = async (global_domain_config, params) => {
return local_inter_mock.inter_7
return await GetRequest(global_domain_config, getUrlParams('/inventory/item_package/search', params))
}
// 选择产品-零散器械查询接口
export const reqScatEquipmentSearch = async (global_domain_config, params) => {
return local_inter_mock.inter_8
return await GetRequest(global_domain_config, getUrlParams('/order/tool/search', params))
}
// 选择产品-单点耗材查询接口
export const reqSingleConsumSearch = async (global_domain_config, params) => {
return local_inter_mock.inter_9
return await GetRequest(global_domain_config, getUrlParams('/order/item_detail/search', params))
}
......
......@@ -21,7 +21,7 @@ class ProductModel extends Component {
closeModal: PropTypes.func, // 关闭回调
closeSubmit: PropTypes.func, // 选好了回调
show: PropTypes.bool,
modelOption: PropTypes.array, // 已选数据
modelOption: PropTypes.array, // 已选左侧数据
modelCallBack: PropTypes.func, // 修改选择的回调函数
}
......@@ -474,7 +474,7 @@ class ProductModel extends Component {
cardStyleItemTit={styles.top_tit}
cardStyleItemTitAct={styles.top_tit_act}
cardListOptions={topProcOptionList}
cardItemTitle={'title'}
cardItemTitle={'category_name'}
curActIndex={topActiveIndex}
cardCallBack={(item, index) => this.handleTopNav(item, index)}
cardCountName={SELECTED_QUQNTITY}
......@@ -487,9 +487,9 @@ class ProductModel extends Component {
renderContItem() {
let {topProcOptionList, topActiveIndex} = this.state
let curData = topProcOptionList[topActiveIndex]
// console.log('已选展示信息 === curData---', topProcOptionList)
// console.log('已选展示信息 === curData---', topActiveIndex)
// console.log('已选展示信息 === curData---', curData)
console.log('已选展示信息 === curData---', topProcOptionList)
console.log('已选展示信息 === curData---', topActiveIndex)
console.log('已选展示信息 === curData---', curData)
let localBottomContData = []
if(curData && curData[SELECTED_DATA_ARR]){
// localBottomContData = curData[SELECTED_DATA_ARR]
......
......@@ -5,6 +5,7 @@ const PropTypes = require('prop-types');
import PictureZoom from '../../common/listDataComponent/PictureZoom';
import PicTitDetaiCalcu from '../../common/listDataComponent/PicTitDetaiCalcu';
import localMockData from '../../selfOrder/module/mock/sen_mock';
import { connect } from 'react-redux';
class ChooseCardList extends Component {
......@@ -32,7 +33,7 @@ class ChooseCardList extends Component {
cardItemName: PropTypes.string,
cardCallBack: PropTypes.func,
curActIndex: PropTypes.number,
curActIndex: PropTypes.number, // 当前已选项index
cardIsCount: PropTypes.bool, // 显示计数
......@@ -64,22 +65,13 @@ class ChooseCardList extends Component {
this.state = {
countStyleType: ['DEFAULT', 'GRAPHICS'],
countStyleName: ['card_default', 'card_graphice']
// curActIndex: 0
}
}
// 点击当前选项
// handleCheckTit(item, index) {
// console.log('item, index----', item, index)
// // this.state = {
// // // curActIndex: index
// // }
// this.props.cardCallBack(item, index)
// }
render() {
let {cardScrollEnabled, cardHorizontal, cardShowsHorizontalScrollIndicator, cardShowsVerticalScrollIndicator, cardStyleBox, cardStyleScroll, cardListOptions, cardItemTitle, cardItemIcon, cardImgName, cardItemName,
cardStyleListItem, cardStyleListItemAct, cardStyleItemIcon, cardStyleItemTit, cardStyleNotIconTit, cardStyleItemTitAct, cardCallBack, curActIndex, cardIsCount, cardCountName, cardStyleCount, cardStyleType, cardCouStyle, ...props} = this.props
cardStyleListItem, cardStyleListItemAct, cardStyleItemIcon, cardStyleItemTit, cardStyleNotIconTit, cardStyleItemTitAct, cardCallBack, curActIndex, cardIsCount, cardCountName, cardStyleCount, cardStyleType, cardCouStyle,
global_domain_config } = this.props
let {countStyleType} = this.state
......@@ -97,7 +89,8 @@ class ChooseCardList extends Component {
>
{ cardListOptions.map((item, index) => {
if(typeof item[cardItemIcon] === 'string'){
item[cardItemIcon] = {uri: item[cardItemIcon]}
global_domain_config = 'https://obs-dev.gyjtsx.com' // 本地测试 ======= 正式需要隐藏
item[cardItemIcon] = {uri: global_domain_config+item[cardItemIcon]}
}
return <View style={styles.card_list_box}>
<TouchableOpacity
......@@ -181,5 +174,19 @@ const styles = StyleSheet.create({
fontSize: 10
}
})
export default ChooseCardList;
\ No newline at end of file
const mapStateToProps = (state) => {
return {
global_domain_config: state.login.global_domain_config
}
}
const mapDispatchToProps = (dispatch) => {
return {
// exitLoginStatus: () => {
// dispatch(exitLoginStatus())
// },
}
}
export default connect(mapStateToProps, mapDispatchToProps)(ChooseCardList);
\ No newline at end of file
import React, { Component } from 'react';
import {
View,
Text,
SafeAreaView,
StyleSheet,
TouchableOpacity,
Image,
ScrollView,
TextInput,
FlatList,
Alert,
Linking,
NativeModules,
Platform
} from 'react-native';
import { View, Text, SafeAreaView, StyleSheet, TouchableOpacity, Image, ScrollView, TextInput, Alert, Linking, NativeModules, Platform } from 'react-native';
import {connect} from 'react-redux';
import {
second_text_size,
home_background_color,
dis_sub_color,
placehold_text_color,
Width,
first_text_color,
pxSize,
promary_color,
safe_view,
icon_style,
font_family_regular,
list_common_item
} from '../../base/BaseStyle';
import { home_background_color, placehold_text_color, promary_color, safe_view, icon_style, list_common_item } from '../../base/BaseStyle';
import {
AsteriskTextStyle,
TitleTextStyle,
......@@ -46,28 +19,9 @@ import LodingModel from '../common/LodingModel';
import DateModel from '../common/DateModel';
import { AudioRecorder, AudioUtils } from 'react-native-audio';
import Sound from 'react-native-sound';
import {
requestSelfOrganizations,
requestSelfSurgeryHospital,
requestSelfOrderType,
requestSelfTemplateCollect,
requestSelfAudio,
requestSelfSumbit,
setSelfInitData,
reqSelfSurgeryHospital,
requestListDataSuccess,
requestSelfSurgeryType
} from '../../action/SelfAction';
import { requestSelfOrganizations, requestSelfSurgeryHospital, requestSelfOrderType, requestSelfTemplateCollect, requestSelfAudio, requestSelfSumbit, setSelfInitData, reqSelfSurgeryHospital, requestListDataSuccess, requestSelfSurgeryType } from '../../action/SelfAction';
import { exitLoginStatus } from '../../action/LoginAction';
import {
SELF_ORDER_LIST_DOING,
SELF_ORDER_LIST_SUCCESS,
SELF_ORDER_LIST_FAILURE,
LOGIN_NO,
SELF_SUBMIT_DOING,
SELF_SUBMIT_SUCCESS,
SELF_SUBMIT_FAILURE
} from '../../base/ActionTypes';
import { SELF_ORDER_LIST_DOING, SELF_ORDER_LIST_SUCCESS, SELF_ORDER_LIST_FAILURE, LOGIN_NO, SELF_SUBMIT_DOING, SELF_SUBMIT_SUCCESS, SELF_SUBMIT_FAILURE } from '../../base/ActionTypes';
import PageListArrow from '../common/listDataComponent/PageListArrow';
class SelfOrderPage extends Component {
......@@ -1227,7 +1181,13 @@ class SelfOrderPage extends Component {
// 选择产品 点击跳转
handleProductCheck() {
this.props.navigation.navigate('ChooseProductPage', {title: `自助下单 - 选择产品`})
let {listOptionData} = this.state
this.props.navigation.navigate('ChooseProductPage', {
title: `选择产品`,
selfData: {
org_code: listOptionData[1].value
}
})
}
// 备注 输入
......
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