Commit 0afde318 by Denglingling

对接钉盒明细接口,已经自助下单提交接口

(cherry picked from commit 46259d8e)
parent d4ae9c37
......@@ -9,7 +9,6 @@ import HomePage from './containers/home/HomePage';
import SelfOrderPage from './containers/selfOrder/SelfOrderPage';
import ChooseProductPage from './containers/selfOrder/module/ChooseProductPage';
import EditThirdLevelPage from './containers/selfOrder/module/EditThirdLevelPage';
import SubSuccessPage from './containers/selfOrder/module/SubSuccessPage';
import EquipConsuPage from './containers/equipConsu/EquipConsuPage';
import ConsumDetailsPage from './containers/equipConsu//module/ConsumDetailsPage';
import FillUnitPricePage from './containers/equipConsu/module/FillUnitPricePage';
......@@ -31,7 +30,6 @@ const Router = createAppContainer(createStackNavigator({
SelfOrderPage: {screen: SelfOrderPage},
ChooseProductPage: {screen: ChooseProductPage},
EditThirdLevelPage: {screen: EditThirdLevelPage},
SubSuccessPage: {screen: SubSuccessPage},
EquipConsuPage: {screen: EquipConsuPage},
ConsumDetailsPage: {screen: ConsumDetailsPage},
FillUnitPricePage: {screen: FillUnitPricePage},
......
......@@ -198,7 +198,6 @@ export function requestSelfSumbit({access_token, ...params}) {
dispatch(requestSubmiting());
let {global_domain_config} = getState().login
PostRequest(global_domain_config, getUrlParams('/order/sur_requirement/create', {access_token: access_token}), params)
// PostRequest(global_domain_config, getUrlParams('/surgery/collect_order/via_data/create', {access_token: access_token}), params)
.then(res => {
console.log('提交数据 res=====', res);
if(res.error_code == 0) {
......@@ -223,67 +222,67 @@ export function requestSelfSumbit({access_token, ...params}) {
// 选择产品-供应商信息查询接口
export const reqPurSupplierSearch = async (global_domain_config, params) => {
return local_inter_mock.inter_1
// 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 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 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 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
}
// 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_header/search', params))
}
// 选择产品-螺钉盒明细查询接口
export const reqNailBoxLineSearch = async (global_domain_config, params) => {
return local_inter_mock.inter_6
// 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 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 local_inter_mock.inter_8
return await GetRequest(global_domain_config, getUrlParams('/order/tool/search', params))
}
// 选择产品-单点耗材查询接口
export const reqSingleConsumSearch = async (global_domain_config, params) => {
if(params.leftIndex && params.leftIndex%2 === 0){
return local_inter_mock.inter_9
}else {
return local_inter_mock.inter_99
}
// if(params.leftIndex && params.leftIndex%2 === 0){
// return local_inter_mock.inter_9
// }else {
// return local_inter_mock.inter_99
// }
return await GetRequest(global_domain_config, getUrlParams('/order/item_detail/search', params))
}
......
......@@ -24,6 +24,7 @@ class LodingModel extends Component {
componentWillReceiveProps(nextProps) {
if (this.state.isVisible != nextProps.show) {
console.log('nextProps.show====', nextProps.show)
this.setState({
isVisible: nextProps.show
})
......@@ -32,6 +33,7 @@ class LodingModel extends Component {
render() {
let { title, size, color, style_back } = this.props
console.log('!!this.state.isVisible====', !!this.state.isVisible)
return (
<View style={styles.container}>
<Modal
......
......@@ -2,8 +2,6 @@ import React, { Component } from 'react';
import { StyleSheet, Image, Text, TouchableOpacity, View, ScrollView } from 'react-native';
import { first_text_color, font_family_light, font_family_regular, font_family_semibold, foundation_color, home_background_color, icon_style, point_color, promary_color, pxSize, second_text_color, second_text_size, third_text_color, third_text_size, title_text_color, Width } from '../../../base/BaseStyle';
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';
......@@ -96,7 +94,8 @@ class ChooseCardList extends Component {
<Image
defaultSource={require('../../../images/not_img.png')}
source={item[cardItemIcon]}
style={icon_style}/> : <Image source={item[cardItemIcon]} style={icon_style}/>
style={icon_style}
resizeMode="cover"/> : <Image source={item[cardItemIcon]} style={icon_style} resizeMode="cover"/>
}
</View> : null }
<Text numberOfLines={2} style={[styles.list_item_tit, cardStyleItemTit, item[cardItemIcon] ? '' : cardStyleNotIconTit, index == curActIndex ? [styles.list_tit_act, cardStyleItemTitAct] : '']}>
......
......@@ -137,6 +137,7 @@ class EditThirdLevelPage extends Component {
access_token: token,
nail_box_code: superItem.item_code,
nail_box_serial_number: superItem.serial_number,
inv_code: superItem.inv_code
}
let nail_line_search = await reqNailBoxLineSearch(global_domain_config, params)
console.log('res_line_1 : ', nail_line_search)
......@@ -153,6 +154,7 @@ class EditThirdLevelPage extends Component {
onlyShow: true
}, () => {
that.refs.LoadingModel.hide()
that.setAllSelectData()
})
} else {
that.showRrrorTip(nail_line_search)
......@@ -162,6 +164,7 @@ class EditThirdLevelPage extends Component {
access_token: token,
inv_code: superItem.inv_code,
item_code: superItem.item_code,
serial_number: superItem.serial_number,
start_index: 1,
limit: 1000
}
......@@ -178,6 +181,7 @@ class EditThirdLevelPage extends Component {
onlyShow: true
}, () => {
that.refs.LoadingModel.hide()
that.setAllSelectData()
})
} else {
that.showRrrorTip(equip_line_search)
......@@ -286,6 +290,9 @@ class EditThirdLevelPage extends Component {
curTit = 'category_name'
} else if (leftIndex === 1) {
curTit = 'segment_name'
if(curTopList.length > 0 && curTopList[0].segment_code === 'ALL'){
curTopList = []
}
} else if (leftIndex === 2) {
curTopList = []
} else {
......@@ -295,7 +302,7 @@ class EditThirdLevelPage extends Component {
<ChooseCardList
cardStyleBox={styles.top_box}
cardStyleScroll={styles.top_scroll_cont}
cardScrollEnabled={false}
cardScrollEnabled={true}
cardHorizontal={true}
cardShowsHorizontalScrollIndicator={false}
cardStyleListItem={styles.top_inner}
......
......@@ -427,9 +427,9 @@ class ProductRightStyle extends Component {
curIcon = 'photos'
} else if (leftIndex === 1 || leftIndex === 2 || leftIndex === 3) {
curTit = 'item_name'
curTipStr='item_code'
curTipStr = 'item_code'
curTipOne = 'specification'
curTipStrTit='物料代码'
curTipStrTit = '物料代码'
curTipOneTit = '规格型号'
curIcon = 'photos'
} else {
......@@ -469,7 +469,7 @@ class ProductRightStyle extends Component {
curReduceCallBack = (() => this.props.superReduceBack())
}
return (
<SafeAreaView style={styles.ri_container} key={'template_name'+index}>
<SafeAreaView style={styles.ri_container} key={'template_name' + index}>
<PicTitDetaiCalcu
listItem={item}
listIndex={index}
......@@ -516,16 +516,16 @@ class ProductRightStyle extends Component {
// 单选耗材 -- 小类每一列
renderThridItem(item, index) {
return (
<SafeAreaView style={styles.thr_container} key={'item_code'+index}>
<SafeAreaView style={styles.thr_container} key={'item_code' + index}>
<PicTitDetaiCalcu
listItem={item}
listIndex={index}
calField={QUANTITY_FIELD}
subCalCallBack={(item, index) => this.handleCalCallBack(item, index, 'rowSingleData')}
titText={'general_name'}
tipTextOne={'item_name'}
titText={'item_name'}
tipTextOne={'general_name'}
tipTextTwo={'item_code'}
tipTextOneTit={'物料名称'}
tipTextOneTit={'通用名称'}
tipTextTwoTit={'物料代码'}
listImgIcon={'photos'}
/>
......@@ -555,7 +555,7 @@ class ProductRightStyle extends Component {
let curSubCalCallBack = '', curTitCallBack = '', curPlusCallBack = '', curReduceCallBack = ''
if (item[ONLY_TWO_LEVELS]) {
// 两级
curTit = 'general_name'
curTit = 'item_name'
curTipOne = 'item_code'
curTipOneTit = '物料代码'
curIcon = 'photos'
......@@ -573,7 +573,7 @@ class ProductRightStyle extends Component {
// console.log('大类===', item)
return (
<SafeAreaView style={styles.oth_container} key={'item_code'+index}>
<SafeAreaView style={styles.oth_container} key={'item_code' + index}>
<PicTitDetaiCalcu
listItem={item}
listIndex={index}
......@@ -594,15 +594,19 @@ class ProductRightStyle extends Component {
// 单选耗材 -- 大类
renderOtherStyle() {
let { rightSecondData } = this.state
return (
<View style={styles.cont_other_cont}>
<FlatList
style={styles.cont_other_list}
keyExtractor={item => item.id}
data={this.state.rightSecondData}
extraData={this.state}
renderItem={({ item, index }) => this.renderOtherListItem(item, index)}
/>
{
rightSecondData.length > 0 ? <FlatList
style={styles.cont_other_list}
keyExtractor={item => item.id}
data={this.state.rightSecondData}
extraData={this.state}
renderItem={({ item, index }) => this.renderOtherListItem(item, index)}
/> : <PicListNoData />
}
</View>
)
}
......
import React, { Component } from 'react';
import {
SafeAreaView,
StyleSheet,
View,
Text,
Image,
TouchableOpacity
} from 'react-native';
import { connect } from 'react-redux';
import HeadBackItem from '../../common/HeadBackItem';
import {
promary_color,
second_text_color,
first_text_color,
pxSize,
title_text_color,
safe_view,
font_family_medium,
font_family_regular
} from '../../../base/BaseStyle';
import StatusBarView from '../../common/StatusBarView';
class SubSuccessPage extends Component {
constructor(props) {
super(props);
this.state = { }
}
handleSubmit() {
console.warn('复制订单号并返回主页')
}
render() {
let {navigation} = this.props
let {title} = navigation.state.params
return (
<View style={styles.succ_container}>
<StatusBarView
isReactStackNavigator={true}
backgroundColor={promary_color}
barStyle = 'light-content'
/>
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={styles.succ_inner}>
<View style={styles.img_box}>
<Image source={require('../../../images/cor_green.png')} style={styles.img_icon}/>
</View>
<Text style={styles.succ_title}>{'提交成功'}</Text>
<Text style={styles.succ_text}>{'订单号:20200318121230'}</Text>
<TouchableOpacity
activeOpacity={.9}
style={styles.succ_btn}
onPress={() => this.handleSubmit()}
>
<Text style={styles.btn_text}>{'复制订单号并返回主页'}</Text>
</TouchableOpacity>
</View>
</SafeAreaView>
</View>
);
}
}
const styles = StyleSheet.create({
succ_container: {
flex: 1
},
succ_inner: {
justifyContent: 'center',
alignItems: 'center',
paddingTop: '26%'
},
img_box: {
width: pxSize(80),
height: pxSize(80)
},
img_icon: {
width: '100%',
height: '100%'
},
succ_title: {
fontSize: 17,
fontFamily: font_family_medium,
// fontWeight: 'bold',
color: first_text_color,
paddingTop: 8,
paddingBottom: 20
},
succ_text: {
fontSize: 14,
color: second_text_color,
paddingBottom: 30,
fontFamily: font_family_regular
},
succ_btn: {
backgroundColor: promary_color,
width: pxSize(330),
borderRadius: 30,
height: 48,
display: 'flex',
justifyContent: 'center',
alignItems: 'center'
},
btn_text: {
color: title_text_color,
fontSize: 16,
fontFamily: font_family_regular
}
})
export default SubSuccessPage;
\ No newline at end of file
......@@ -41,7 +41,6 @@ export default quick = (state = defaultState, action) => {
return Object.assign({}, state, {
submit_quick_order_status: QUICK_SUBMIT_SUCCESS,
quickOrderOption: action.rawData
// quickOrderOption: {} // 清空当前临时数据
})
case QUICK_SUBMIT_FAILURE:
return Object.assign({}, state, {
......
......@@ -41,8 +41,7 @@ export default selfOrder = (state = defaultState, action) => {
case SELF_SUBMIT_SUCCESS:
return Object.assign({}, state, {
submit_self_order_status: SELF_SUBMIT_SUCCESS,
selfOrderOption: {}, // 清空当前临时数据
local_sele_pro_options: {}
selfOrderOption: action.rawData
})
case SELF_SUBMIT_FAILURE:
return Object.assign({}, state, {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment