Commit 858e12ec by Denglingling

调整自助下单功能

parent 7f6910eb
......@@ -5,9 +5,9 @@
* @format
* @flow
*/
import React, {Component} from 'react';
import React, { Component } from 'react';
import { Text, TextInput } from 'react-native';
import {Provider} from 'react-redux';
import { Provider } from 'react-redux';
import configureStore from './app/store/configureStore';
import Router from './app/Router';
const store = configureStore();
......@@ -19,11 +19,12 @@ TextInput.defaultProps = Object.assign({}, TextInput.defaultProps, { allowFontSc
console.reportErrorsAsExceptions = false;
export default class App extends Component {
render() {
return (
<Provider store={store}>
<Router/>
</Provider>
<Provider store={store}>
<Router />
</Provider>
);
}
}
......@@ -197,7 +197,8 @@ export function requestSelfSumbit({access_token, ...params}) {
return (dispatch, getState) => {
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)
// PostRequest(global_domain_config, getUrlParams('/order/sur_requirement/create', {access_token: access_token}), params)
.then(res => {
console.log('提交数据 res=====', res);
if(res.error_code == 0) {
......@@ -222,67 +223,76 @@ 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 reqNailAndEquipSearch = async (global_domain_config, params) => {
// if(params.nail_box_flag == 'Y'){
// return local_inter_mock.inter_6
// }else {
// return local_inter_mock.inter_77
// }
return await GetRequest(global_domain_config, getUrlParams('/inventory/item_package_detail/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))
}
......
......@@ -40,6 +40,10 @@ export const first_text_color = '#333333'; // 一级字体
export const second_text_color = "#666666"; // 次级字体
export const third_text_color = "#999999"; // 三级字体
export const point_color = "#ff0000"; // * 颜色
export const text_default_color = "#01B2B9"; // 默认颜色
export const text_audit_color = "#FF0000"; // 拒绝颜色
export const text_return_color = "#007EFF"; // 归还颜色
export const text_other_color = "#F4B61B"; // 其他颜色
// 字号
export const first_text_size = 20; // 一级字号
......
......@@ -58,7 +58,7 @@ export default class LocalVariable {
static PLAN_QUANTITY = 'plan_quantity'
/**
* 手术模板
* 手术套包
*/
static SURGICAL_TEMPLATE = 'surgical_template_name'
......@@ -78,7 +78,7 @@ export default class LocalVariable {
static SCATTERED_EQUIPMENT = 'scattered_equipment_name'
/**
* 单选耗材名
* 耗材名
*/
static SIGN_SELECT_CONSUMABLES = 'sign_select_consumables_name'
......
......@@ -55,7 +55,7 @@ class ProductModel extends Component {
let otherArr = []
let otherChildObj = {
category_code: 'local_sign_items',
category_name: '单选耗材',
category_name: '耗材',
[LocalVariable.SELECTED_QUQNTITY]: 0,
[LocalVariable.SELECTED_DATA_ARR]: [],
[LocalVariable.LOCAL_SECOND_DATA]: []
......@@ -92,7 +92,7 @@ class ProductModel extends Component {
// let otherArr = []
// let otherChildObj = {
// category_code: 'local_sign_items',
// category_name: '单选耗材',
// category_name: '耗材',
// [LocalVariable.SELECTED_QUQNTITY]: 0,
// [LocalVariable.SELECTED_DATA_ARR]: [],
// [LocalVariable.LOCAL_SECOND_DATA]: []
......@@ -148,13 +148,13 @@ class ProductModel extends Component {
this.props.closeModal(false);
}
// 单选耗材清空图标回调
// 耗材清空图标回调
handleClearBack(item, index, superIndex) {
let { orginOptionList, topProcOptionList } = this.state
console.log('耗材😋=====', item, index, superIndex)
console.log('耗材😋=====', orginOptionList)
console.log('耗材😋=====', topProcOptionList)
// 单选耗材当前清空项
// 耗材当前清空项
let allCountQuantity = 0 // 初始化
topProcOptionList.forEach(function (orgOpts, orgInd) {
......@@ -326,7 +326,7 @@ class ProductModel extends Component {
}
} else {
// 手术模板
// 手术套包
let deleFlag = false
let deleInd = null
console.log('listItem[LocalVariable.SELECTED_DATA_ARR][superIndex][LocalVariable.CHILDREN_LINE_NAME][index]--', listItem[LocalVariable.SELECTED_DATA_ARR][superIndex][LocalVariable.CHILDREN_LINE_NAME][index])
......@@ -480,7 +480,7 @@ class ProductModel extends Component {
// listItem[LocalVariable.SELECTED_DATA_ARR].splice(deleInd, 1)
// }
// } else {
// // 手术模板
// // 手术套包
// let deleFlag = false
// let deleInd = null
// // 初始化 三级
......@@ -565,6 +565,7 @@ class ProductModel extends Component {
// this.closeModal()
this.refs.ClearAllModel.show('清空当前所有数据')
console.log('this--', this)
// topProcOptionList.map(function(top_item) {
// top_item[LocalVariable.SELECTED_QUQNTITY] = 0
......@@ -613,18 +614,22 @@ class ProductModel extends Component {
modelClearAllCB(clear_flag){
console.log('clear_flag===', clear_flag)
let { orginOptionList, topProcOptionList } = this.state
let that = this
if(clear_flag){
topProcOptionList.map(function(top_item) {
top_item[LocalVariable.SELECTED_QUQNTITY] = 0
top_item[LocalVariable.SELECTED_DATA_ARR] = []
})
console.log('清空',this)
this.props.changeCallBack(topProcOptionList)
that.props.changeCallBack(topProcOptionList)
this.setState({
that.setState({
topProcOptionList: topProcOptionList
})
this.closeModal()
setTimeout(() => {
that.closeModal()
}, 300)
}
}
......@@ -733,7 +738,7 @@ class ProductModel extends Component {
localBottomContData.push(sedItem)
// if (topActiveIndex === 0) {
// // 手术模板
// // 手术套包
// // localBottomContData.push(...sedItem[LocalVariable.CHILDREN_LINE_NAME])
// localBottomContData.push(sedItem)
......@@ -1062,7 +1067,8 @@ const styles = StyleSheet.create({
fontSize: 14
},
edit_cont: {
flex: 1
marginBottom: 80
// flex: 1
},
edit_scroll_cont: {
height: '100%'
......@@ -1088,9 +1094,7 @@ const styles = StyleSheet.create({
flexDirection: "row"
},
col_shpp_tit: {
// fontSize: second_text_size,
fontSize: 12,
// marginLeft: 10
},
col_shpp_clear: {},
list_icon: {
......
......@@ -127,7 +127,7 @@ const styles = StyleSheet.create({
borderBottomWidth: 4,
borderBottomColor: home_background_color,
minWidth: 60,
maxWidth: 80
maxWidth: 90
},
list_inner_act: {
borderBottomWidth: 2,
......
......@@ -9,7 +9,9 @@ import {
} from 'react-native';
import {
safe_view,
promary_color
promary_color,
title_text_color,
text_other_color
} from '../../../base/BaseStyle';
/** 加载中 */
......@@ -48,6 +50,7 @@ class LoadingModel extends Component {
<View style={[styles.loding_cont, style_back]}>
<View style={styles.loding_title}>
<ActivityIndicator size={size ? size : "small"} color={color ? color : promary_color} />
{/* <ActivityIndicator size={size ? size : "small"} color={color ? color : title_text_color} /> */}
<Text style={styles.tit_inner}>{title ? title : this.state.title}</Text>
</View>
</View>
......@@ -64,7 +67,7 @@ const styles = StyleSheet.create({
},
loding_cont: {
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.1)',
backgroundColor: 'rgba(0, 0, 0, 0.3)',
paddingTop: '55%',
alignItems: 'center'
},
......@@ -75,8 +78,10 @@ const styles = StyleSheet.create({
},
tit_inner: {
fontSize: 16,
// fontSize: 20,
paddingLeft: 10,
color: promary_color
// color: title_text_color
}
})
......
import React, { Component } from 'react';
import { StyleSheet, Image, TouchableOpacity, View } from 'react-native';
import { font_family_regular, icon_style, pxSize, second_text_color, second_text_size } from '../../../base/BaseStyle';
import { StyleSheet, Image, TouchableOpacity, View, Text } from 'react-native';
import { first_text_color, font_family_regular, icon_style, pxSize, second_text_color, second_text_size } from '../../../base/BaseStyle';
import { AsteriskTextStyle, CellTextStyle, ContInputTextStyle, ContTextStyle, TitleTextStyle } from '../CellTextStyle';
const PropTypes = require('prop-types');
......@@ -18,6 +18,7 @@ class PageListArrow extends Component {
listItem: PropTypes.object,
listTitle: PropTypes.string,
listName: PropTypes.string,
listValue: PropTypes.string,
listHasArrow: PropTypes.bool,
listOtherInput: PropTypes.string,
otherInput: PropTypes.string,
......@@ -26,6 +27,7 @@ class PageListArrow extends Component {
inputCallBack: PropTypes.func,
isTitInputStyle: PropTypes.bool,
listMaxLines: PropTypes.number, // 文本最大行数
listIsAudio: PropTypes.bool,
}
constructor(props) {
......@@ -43,8 +45,8 @@ class PageListArrow extends Component {
render() {
let {listActOpa, listCallBack, listHasAster, listEditAble, listDefaValue, listItem, listTitle,
listName, listHasArrow, listOtherInput, otherInput, otherInputCallBack, listInputPlace,
inputCallBack, isTitInputStyle, listMaxLines} = this.props
listName, listValue, listHasArrow, listOtherInput, otherInput, otherInputCallBack, listInputPlace,
inputCallBack, isTitInputStyle, listMaxLines, listIsAudio} = this.props
if(!listMaxLines){
listMaxLines = 2 // 默认
}
......@@ -68,6 +70,38 @@ class PageListArrow extends Component {
{ listHasArrow ? <View style={styles.arr_icon_box}>
<Image source={require('../../../images/arr_rig.png')} style={icon_style}/>
</View> : null}
{
listIsAudio ? <View style={styles.btn_radio_box}>
<TouchableOpacity
activeOpacity={.8}
style={styles.btn_yes}
onPress={() => {return listCallBack ? listCallBack('Y') : ''}}
>
<View style={styles.radio_icon}>
{
listItem[listValue] == 'Y' ?
<Image style={icon_style} source={require('../../../images/radio_yes.png')} />
: <Image style={icon_style} source={require('../../../images/radio_no.png')} />
}
</View>
<Text style={styles.radio_txt}></Text>
</TouchableOpacity>
<TouchableOpacity
activeOpacity={.8}
style={styles.btn_no}
onPress={() => {return listCallBack ? listCallBack('N') : ''}}
>
<View style={styles.radio_icon}>
{
listItem[listValue] == 'N' ?
<Image style={icon_style} source={require('../../../images/radio_yes.png')} />
: <Image style={icon_style} source={require('../../../images/radio_no.png')} />
}
</View>
<Text style={styles.radio_txt}></Text>
</TouchableOpacity>
</View> : null
}
</CellTextStyle>
</TouchableOpacity>
{ (listOtherInput && listItem[otherInput]) ? <CellTextStyle>
......@@ -108,6 +142,34 @@ const styles = StyleSheet.create({
cell_input: {
textAlign: 'left'
},
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
},
})
export default PageListArrow;
\ No newline at end of file
import React, { Component } from 'react';
import { StyleSheet, Image, Text, TouchableOpacity, View } from 'react-native';
import { connect } from 'react-redux';
import { first_text_color, font_family_medium, font_family_regular, font_family_semibold, home_background_color, icon_style, pxSize, second_text_size, third_text_color, third_text_size } from '../../../base/BaseStyle';
import { first_text_color, font_family_medium, font_family_regular, font_family_semibold, home_background_color, icon_style, pxSize, second_text_color, second_text_size, text_audit_color, text_default_color, text_other_color, text_return_color, third_text_color, third_text_size } from '../../../base/BaseStyle';
import PictureZoom from '../../common/listDataComponent/PictureZoom';
const PropTypes = require('prop-types');
......@@ -22,6 +22,7 @@ class PicTitDetaiCalcu extends Component {
calField: PropTypes.string, // 计算的字段名
titCallBack: PropTypes.func, // 标题回调函数
titText: PropTypes.string, // 标题
titTextTit: PropTypes.string,
tipTextStr: PropTypes.string,
tipTextStrTit: PropTypes.string,
tipTextOne: PropTypes.string,
......@@ -89,7 +90,7 @@ class PicTitDetaiCalcu extends Component {
render() {
let { listItem, listIndex, calField, listStyleBox, listStyleTit, listStyleTip, listStyleCalBtn, listPicType, titCallBack,
titText, tipTextStr, tipTextOne, tipTextTwo, tipTextThr, listImgIcon, listStyleImg, showClearIcon, showClearIndex, listCardActIndex,
listStyleClearBtn, clearCallBack, onlyShowNum, onlyShowSelect, tipTextStrTit, tipTextOneTit, tipTextTwoTit, tipTextThrTit,
listStyleClearBtn, clearCallBack, onlyShowNum, onlyShowSelect, titTextTit, tipTextStrTit, tipTextOneTit, tipTextTwoTit, tipTextThrTit,
global_domain_config, listMaxNum } = this.props
let { listPicTypeArr, picStyleArr } = this.state
......@@ -115,6 +116,11 @@ class PicTitDetaiCalcu extends Component {
listItem[listImgIcon].map((iconIt) => {
cur_photos.push({ url: global_domain_config + '/jeecg-boot/sys/common/view/' + iconIt })
})
if(listItem[listImgIcon].length === 0){
cur_photos[0] = (require('../../../images/not_img.png'))
}
}else if(typeof listItem[listImgIcon] === 'string'){
cur_photos[0] = { url: global_domain_config + '/jeecg-boot/sys/common/view/' + listItem[listImgIcon] }
}
return (
......@@ -134,19 +140,23 @@ class PicTitDetaiCalcu extends Component {
style={styles.oth_box}
>
<Text numberOfLines={2} style={[styles.thr_ot, listStyleTit]}>
{listItem[titText]}
{listItem[titText] ? listItem[titText] : '' }
{!listItem[titText] && titTextTit ? `${titTextTit}: 空` : ''}
</Text>
{listItem[tipTextStr] ? <Text numberOfLines={2} style={[styles.ri_te_ot, styles.te_ot_str, listStyleTip]}>
{tipTextStrTit ? `${tipTextStrTit}:` : ''}{listItem[tipTextStr]}
{tipTextStrTit ? <Text numberOfLines={2} style={[styles.ri_te_ot, styles.te_ot_str, listStyleTip]}>
{`${tipTextStrTit}:`} {listItem[tipTextStr] ? listItem[tipTextStr] : '空'}
</Text> : null}
{listItem[tipTextOne] ? <Text numberOfLines={1} style={[styles.ri_te_ot, listStyleTip]}>
{tipTextOneTit ? `${tipTextOneTit}:` : ''}{listItem[tipTextOne]}
{tipTextOneTit ? <Text numberOfLines={2} style={[styles.ri_te_ot, styles.te_ot_one,listStyleTip]}>
{/* {tipTextOneTit ? `${tipTextOneTit}:` : ''}{listItem[tipTextOne]} */}
{`${tipTextOneTit}:`} {listItem[tipTextOne] ? listItem[tipTextOne] : '空'}
</Text> : null}
{listItem[tipTextTwo] ? <Text numberOfLines={1} style={[styles.ri_te_ot, listStyleTip]}>
{tipTextTwoTit ? `${tipTextTwoTit}:` : ''}{listItem[tipTextTwo]}
{tipTextTwoTit ? <Text numberOfLines={2} style={[styles.ri_te_ot, styles.te_ot_two,listStyleTip]}>
{/* {tipTextTwoTit ? `${tipTextTwoTit}:` : ''}{listItem[tipTextTwo]} */}
{`${tipTextTwoTit}:`} {listItem[tipTextTwo] ? listItem[tipTextTwo] : '空'}
</Text> : null}
{listItem[tipTextThr] ? <Text numberOfLines={1} style={[styles.ri_te_ot, listStyleTip]}>
{tipTextThrTit ? `${tipTextThrTit}:` : ''}{listItem[tipTextThr]}
{tipTextThrTit ? <Text numberOfLines={2} style={[styles.ri_te_ot, styles.te_ot_thr,listStyleTip]}>
{/* {tipTextThrTit ? `${tipTextThrTit}:` : ''}{listItem[tipTextThr]} */}
{`${tipTextThrTit}:`} {listItem[tipTextThr] ? listItem[tipTextThr] : '空'}
</Text> : null}
</TouchableOpacity>
</View>
......@@ -219,7 +229,8 @@ const styles = StyleSheet.create({
ri_te_ot: {
fontSize: third_text_size,
color: third_text_color,
fontFamily: font_family_regular
fontFamily: font_family_regular,
paddingBottom: 2
},
oth_box: {
paddingBottom: 2
......@@ -227,18 +238,31 @@ const styles = StyleSheet.create({
thr_ot: {
fontFamily: font_family_medium,
fontSize: second_text_size,
color: 'rgba(0, 0, 0, 0.87)'
// color: 'rgba(0, 0, 0, 0.87)'
color: text_default_color,
paddingBottom: 4
},
te_ot_str: {
fontFamily: font_family_semibold,
color: 'rgba(58, 58, 58, 100)'
// color: 'rgba(58, 58, 58, 100)'
color: text_return_color
},
te_ot_one:{
color: first_text_color
},
te_ot_two:{
color: first_text_color
},
te_ot_thr:{
color: first_text_color
},
oth_img_box: {
width: pxSize(58),
height: pxSize(58),
justifyContent: 'center',
alignItems: 'center',
marginRight: 6
marginRight: 6,
padding: 6
},
round_pic: {
borderColor: 'rgba(0, 0, 0, 0.12)',
......
......@@ -76,7 +76,7 @@ class PictureZoom extends Component {
<Image
defaultSource={require('../../../images/not_img.png')}
source={{uri: listImageUrls[listImageIndex].url}}
style={[icon_style, styles.list_item_img]}
style={icon_style}
resizeMode="cover" />
</TouchableOpacity>
<Modal
......
......@@ -9,7 +9,7 @@ import ChooseCardList from '../../common/listDataComponent/ChooseCardList';
import PicTitDetaiCalcu from '../../common/listDataComponent/PicTitDetaiCalcu';
import PictureZoom from '../../common/listDataComponent/PictureZoom';
import { cloneObject, show } from '../../../utils/Utils';
import { reqSurTempLineSearch, reqNailBoxLineSearch, reqEquipPackageLineSearch } from '../../../action/SelfAction';
import { reqSurTempLineSearch, reqNailBoxLineSearch, reqEquipPackageLineSearch, reqNailAndEquipSearch } from '../../../action/SelfAction';
import LoadingModel from '../../common/listDataComponent/LoadingModel';
import LocalVariable from '../../common/LocalVariable';
import { exitLoginStatus } from '../../../action/LoginAction';
......@@ -23,9 +23,9 @@ class EditThirdLevelPage extends Component {
topActiveIndex: 0,
onlyShow: false, // 只展示
onlySignSelect: false, // 单选
defalutTopItem: [{ // 手术模板显示
defalutTopItem: [{ // 手术套包显示
"category_code": LocalVariable.SIGN_SELECT_CONSUMABLES,
"category_name": "单选耗材"
"category_name": "耗材"
}, {
"category_code": LocalVariable.NAIL_BOX,
"category_name": "钉盒",
......@@ -96,16 +96,32 @@ class EditThirdLevelPage extends Component {
that.showRrrorTip(sur_line_search)
}
} else if (leftIndex === 1) {
// let params = {
// 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)
let params = {
access_token: token,
nail_box_code: superItem.item_code,
nail_box_serial_number: superItem.serial_number,
inv_code: superItem.inv_code
item_code: superItem.item_code,
serial_number: superItem.serial_number,
inv_code: superItem.inv_code,
nail_box_flag: 'Y'
}
let nail_line_search = await reqNailBoxLineSearch(global_domain_config, params)
let nail_line_search = await reqNailAndEquipSearch(global_domain_config, params)
console.log('res_line_1 : ', nail_line_search)
if (nail_line_search.error_code === 0) {
let { data } = nail_line_search
if (data.segemt && data.segemt.length > 0) {
data.segemt.forEach(function (seg_it) {
if (seg_it.segment_code == "0") {
seg_it.segment_name = "默认区域"
}
})
}
topProcOptionList = cloneObject(data.segemt)
topProcOptionList.forEach(function (topIt) {
topIt[LocalVariable.LOCAL_THRID_CONT_DATA] = topIt['details']
......@@ -123,22 +139,48 @@ class EditThirdLevelPage extends Component {
that.showRrrorTip(nail_line_search)
}
} else if (leftIndex === 2) {
// let params = {
// access_token: token,
// inv_code: superItem.inv_code,
// item_code: superItem.item_code,
// serial_number: superItem.serial_number,
// start_index: 1,
// limit: 1000
// }
// let equip_line_search = await reqEquipPackageLineSearch(global_domain_config, params)
let params = {
access_token: token,
inv_code: superItem.inv_code,
item_code: superItem.item_code,
serial_number: superItem.serial_number,
start_index: 1,
limit: 1000
inv_code: superItem.inv_code,
nail_box_flag: 'N'
}
let equip_line_search = await reqEquipPackageLineSearch(global_domain_config, params)
let equip_line_search = await reqNailAndEquipSearch(global_domain_config, params)
console.log('res_line_1 : ', equip_line_search)
if (equip_line_search.error_code === 0) {
let { data } = equip_line_search
data[LocalVariable.LOCAL_THRID_CONT_DATA] = data['package_components']
data[LocalVariable.SELECTED_DATA_ARR] = []
data[LocalVariable.SELECTED_QUQNTITY] = 0
topProcOptionList[0] = cloneObject(data)
// data[LocalVariable.LOCAL_THRID_CONT_DATA] = data['package_components']
// data[LocalVariable.SELECTED_DATA_ARR] = []
// data[LocalVariable.SELECTED_QUQNTITY] = 0
// topProcOptionList[0] = cloneObject(data)
if (data.segemt && data.segemt.length > 0) {
data.segemt.forEach(function (seg_it) {
if (seg_it.segment_code == "0") {
seg_it.segment_name = "未分层器械"
} else {
seg_it.segment_name = `第 ${seg_it.segment_code} 层器械`
}
})
}
topProcOptionList = cloneObject(data.segemt)
topProcOptionList.forEach(function (topIt) {
topIt[LocalVariable.LOCAL_THRID_CONT_DATA] = topIt['details']
topIt[LocalVariable.SELECTED_DATA_ARR] = []
topIt[LocalVariable.SELECTED_QUQNTITY] = 0
})
that.setState({
topProcOptionList: topProcOptionList,
onlyShow: true
......@@ -212,7 +254,6 @@ class EditThirdLevelPage extends Component {
this.refs.LoadingModel.hide()
if (result.error_code == 41006) {
show('登录过期,请重新登录');
console.log('this.props---', this.props)
this.props.exitLoginStatus();
} else {
let error_msg = result.error_msg || result.message
......@@ -227,13 +268,8 @@ class EditThirdLevelPage extends Component {
let curTit = '', curTopList = topProcOptionList
if (leftIndex === 0) {
curTit = 'category_name'
} else if (leftIndex === 1) {
} else if (leftIndex === 1 || leftIndex === 2) {
curTit = 'segment_name'
if (curTopList.length > 0 && curTopList[0].segment_code === 'ALL') {
curTopList = []
}
} else if (leftIndex === 2) {
curTopList = []
}
return (
<ChooseCardList
......@@ -297,16 +333,49 @@ class EditThirdLevelPage extends Component {
// 返回每一列元素
renderContColumnItem(item, index) {
let { onlyShow, onlySignSelect } = this.state
let { onlyShow, onlySignSelect, topActiveIndex, superData } = this.state
let { leftIndex } = superData
let curTit = '', curTipStr = '', curTipOne = '', curTipTwo = '', curCalField = '', curImgIcon = ''
let curTipStrTit = '', curTipOneTit = '', curTipTwoTit = ''
curTit = 'item_name'
curTipStr = 'general_name'
curTipOne = 'specification'
curTipTwo = 'item_desc'
curTipStrTit = '通用名称'
curTipOneTit = '规格型号'
curTipTwoTit = '物料说明'
let curTxtTit = '', curTipStrTit = '', curTipOneTit = '', curTipTwoTit = ''
if(leftIndex === 0){
if (topActiveIndex === 0 || topActiveIndex === 3) {
curTit = 'manufacturer_product_code'
curTipStr = 'item_name'
curTipOne = 'general_name'
curTipTwo = 'specification'
curTxtTit = '厂家产品代码'
curTipStrTit = '物料名称'
curTipOneTit = '通用名称'
curTipTwoTit = '规格型号'
} else if (topActiveIndex === 1) {
curTit = 'item_name'
curTipStr = 'general_name'
curTipOne = 'specification'
curTxtTit = '物料名称'
curTipStrTit = '通用名称'
curTipOneTit = '规格型号'
} else if (topActiveIndex === 2) {
curTit = 'item_name'
curTipStr = 'general_name'
curTxtTit = '物料名称'
curTipStrTit = '通用名称'
}
}else if(leftIndex === 1 || leftIndex === 2){
curTit = 'manufacturer_product_code'
curTipStr = 'item_name'
curTipOne = 'general_name'
curTipTwo = 'specification'
curTxtTit = '厂家产品代码'
curTipStrTit = '物料名称'
curTipOneTit = '通用名称'
curTipTwoTit = '规格型号'
}
// curTit = 'item_name'
// curTipStr = 'general_name'
// curTipOne = 'specification'
// curTipStrTit = '通用名称'
// curTipOneTit = '规格型号'
curCalField = LocalVariable.QUANTITY_FIELD
curImgIcon = 'photos'
......@@ -321,6 +390,7 @@ class EditThirdLevelPage extends Component {
tipTextStr={curTipStr}
tipTextOne={curTipOne}
tipTextTwo={curTipTwo}
titTextTit={curTxtTit}
tipTextStrTit={curTipStrTit}
tipTextOneTit={curTipOneTit}
tipTextTwoTit={curTipTwoTit}
......
......@@ -22,7 +22,7 @@ class ProductRightStyle extends Component {
constructor(props) {
super(props)
this.state = {
rightSecondData: this.props.superStencilData, // 右侧数据-手术模板、螺钉盒、器械包、零散器械
rightSecondData: this.props.superStencilData, // 右侧数据-手术套包、螺钉盒、器械包、零散器械
rowSingleData: [], // 耗材-小类
thridIsVisible: false, // 小类展示
curThridObj: {
......@@ -66,7 +66,7 @@ class ProductRightStyle extends Component {
childrenPageCallBack: this.childrenPageCallBack.bind(this) // 传递函数,编辑完成时调用
})
} else if (leftIndex > 3) {
// 单选耗材 中级标题点击
// 耗材 中级标题点击
this.changeThrShow(true, item, index)
}
}
......@@ -92,7 +92,7 @@ class ProductRightStyle extends Component {
}
}
// 手术模板-编辑页面回调
// 手术套包-编辑页面回调
childrenPageCallBack(childData, index) {
let { rightSecondData } = this.state
let { leftIndex } = this.props
......@@ -185,7 +185,7 @@ class ProductRightStyle extends Component {
// 计算后的回调 - 头/行
handleCalCallBack(item, index, dataName, coutFieName) {
// 除了单选耗材小类的回调
// 除了耗材小类的回调
if (dataName && this.state[dataName]) {
let curDataName = this.state[dataName]
curDataName[index] = item
......@@ -205,11 +205,11 @@ class ProductRightStyle extends Component {
}
}
// 返回右侧二级每一列(单选耗材以上)
// 返回右侧二级每一列(耗材以上)
renderSecondtem(item, index) {
let { leftIndex } = this.props
let curTitCallBack = '', curPlusCallBack = '', curReduceCallBack = ''
let curTit = '', curTipStr = '', curTipOne = '', curTipTwo = '', curTipThr = '', curTipStrTit = '', curTipOneTit = '', curTipTwoTit = '', curTipThrTit = '', curIcon = ''
let curTit = '', curTipStr = '', curTipOne = '', curTipTwo = '', curTipThr = '', curTxtTit = '', curTipStrTit = '', curTipOneTit = '', curTipTwoTit = '', curTipThrTit = '', curIcon = ''
let curListMaxNum = ''
if (leftIndex === 0) {
curTit = 'template_name'
......@@ -217,21 +217,38 @@ class ProductRightStyle extends Component {
curTipOne = 'doctor_name'
curTipTwo = 'surgery_type'
curTipThr = 'template_desc'
curTxtTit = '套包名称'
curTipStrTit = '客户'
curTipOneTit = '主治医生'
curTipTwoTit = '手术类型'
curTipThrTit = '模板说明'
curIcon = 'photos'
} else if (leftIndex === 1 || leftIndex === 2 || leftIndex === 3) {
} else if (leftIndex === 1) {
curTit = 'item_name'
curTipStr = 'general_name'
curTipOne = 'specification'
curTipTwo = 'item_desc'
curTipTwo = 'serial_number'
curTxtTit = '物料名称'
curTipStrTit = '通用名称'
curTipOneTit = '规格型号'
curTipTwoTit = '物料说明'
curIcon = 'photos'
curTipTwoTit = '物料序列'
} else if (leftIndex === 2) {
curTit = 'item_name'
curTipStr = 'general_name'
curTipOne = 'serial_number'
curTxtTit = '物料名称'
curTipStrTit = '通用名称'
curTipOneTit = '物料序列'
} else if (leftIndex === 3) {
curTit = 'manufacturer_product_code'
curTipStr = 'item_name'
curTipOne = 'general_name'
curTipTwo = 'specification'
curTxtTit = '厂家产品代码'
curTipStrTit = '物料名称'
curTipOneTit = '通用名称'
curTipTwoTit = '规格型号'
}
curIcon = 'photos'
if (leftIndex === 1) {
// 钉盒
curTitCallBack = ((item, index) => this.TitleClickEvent(item, index))
......@@ -266,6 +283,7 @@ class ProductRightStyle extends Component {
tipTextOne={curTipOne}
tipTextTwo={curTipTwo}
tipTextThr={curTipThr}
titTextTit={curTxtTit}
tipTextStrTit={curTipStrTit}
tipTextOneTit={curTipOneTit}
tipTextTwoTit={curTipTwoTit}
......@@ -280,7 +298,7 @@ class ProductRightStyle extends Component {
)
}
// 返回右侧元素(单选耗材以上)
// 返回右侧元素(耗材以上)
renderStencilStyle() {
let { rightSecondData } = this.state
return (
......@@ -298,7 +316,7 @@ class ProductRightStyle extends Component {
)
}
// 单选耗材 -- 小类每一列
// 耗材 -- 小类每一列
renderThridItem(item, index) {
return (
<SafeAreaView style={styles.thr_container} key={'item_code' + index}>
......@@ -307,20 +325,21 @@ class ProductRightStyle extends Component {
listIndex={index}
calField={LocalVariable.QUANTITY_FIELD}
subCalCallBack={(item, index) => this.handleCalCallBack(item, index, 'rowSingleData')}
titText={'item_name'}
tipTextStr={'general_name'}
tipTextOne={'specification'}
tipTextTwo={'item_desc'}
tipTextStrTit={'通用名称'}
tipTextOneTit={'规格型号'}
tipTextTwoTit={'物料说明'}
titText={'manufacturer_product_code'}
tipTextStr={'item_name'}
tipTextOne={'general_name'}
tipTextTwo={'specification'}
titTextTit={'厂家产品代码'}
tipTextStrTit={'物料名称'}
tipTextOneTit={'通用名称'}
tipTextTwoTit={'规格型号'}
listImgIcon={'photos'}
/>
</SafeAreaView>
)
}
// 单选耗材 -- 小类
// 耗材 -- 小类
renderThridStyle() {
let { rowSingleData } = this.state
return (
......@@ -336,23 +355,26 @@ class ProductRightStyle extends Component {
)
}
// 单选耗材 -- 大类每一列
// 耗材 -- 大类每一列
renderOtherListItem(item, index) {
let curTit = '', curTipStr = '', curTipOne = '', curTipTwo = '', curTipStrTit = '', curTipOneTit = '', curTipTwoTit = '', curIcon = ''
let curTit = '', curTipStr = '', curTipOne = '', curTipTwo = '', curTxtTit = '', curTipStrTit = '', curTipOneTit = '', curTipTwoTit = '', curIcon = ''
let curTitCallBack = '', curPlusCallBack = '', curReduceCallBack = ''
if (item[LocalVariable.ONLY_TWO_LEVELS]) {
// 两级数据
curTit = 'item_name'
curTipStr = 'general_name'
curTipOne = 'specification'
curTipTwo = 'item_desc'
curTipStrTit = '通用名称'
curTipOneTit = '规格型号'
curTipTwoTit = '物料说明'
curTit = 'manufacturer_product_code'
curTipStr = 'item_name'
curTipOne = 'general_name'
curTipTwo = 'specification'
curTxtTit = '厂家产品代码'
curTipStrTit = '物料名称'
curTipOneTit = '通用名称'
curTipTwoTit = '规格型号'
curIcon = 'photos'
} else {
// 三级数据
curTit = 'category_name'
curTxtTit = '分类名称'
curIcon = 'category_image'
curTitCallBack = (item, index) => this.TitleClickEvent(item, index)
curPlusCallBack = (item, index) => this.handleAllPlusReduce(item, index, true)
curReduceCallBack = (item, index) => this.handleAllPlusReduce(item, index)
......@@ -372,6 +394,7 @@ class ProductRightStyle extends Component {
tipTextStr={curTipStr}
tipTextOne={curTipOne}
tipTextTwo={curTipTwo}
titTextTit={curTxtTit}
tipTextStrTit={curTipStrTit}
tipTextOneTit={curTipOneTit}
tipTextTwoTit={curTipTwoTit}
......@@ -382,7 +405,7 @@ class ProductRightStyle extends Component {
)
}
// 单选耗材 -- 大类
// 耗材 -- 大类
renderOtherStyle() {
let { rightSecondData } = this.state
return (
......@@ -416,7 +439,7 @@ class ProductRightStyle extends Component {
}
}
// 单选耗材 -- 三级顶部标题
// 耗材 -- 三级顶部标题
renderThrHeadStyle() {
let { thridIsVisible, curThridObj } = this.state
if (thridIsVisible) {
......
export const leftOptionList = [
{
title: '手术模板',
title: '手术套包',
iconImg: require('../../../images/surg_temp.png'),
stencilData: [{
"id": "0",
......
......@@ -82,12 +82,12 @@ const inter_2 = {
}
}
// 选择产品-手术模板头查询接口
// 选择产品-手术套包头查询接口
const inter_3 = {
"error_code": 0,
"error_msg": "成功",
"data": {
//手术模板
//手术套包
"surgery_template_headers": [
{
"org_id": "",
......@@ -134,7 +134,7 @@ const inter_3 = {
}
}
// 选择产品-手术模板行查询接口
// 选择产品-手术套包行查询接口
const inter_4 = {
"error_code": 0,
"error_msg": "成功",
......@@ -589,6 +589,101 @@ const inter_7 = {
}
}
const inter_77 = //当钉盒可视化时,分区域展示
{
"error_code": 0,
"error_msg": "成功",
"data": {
"segemt": [
{
"details": [
{
"item_code": "GYSXQX01100002",
"quantity": 2,
"category_name": "一类医疗器械",
"category_code": "12",
"specification": "",
"item_name": "SKI膝关节器械",
"unit": "个",
"category_desc": "单件可重复使用的器械",
"general_name": "膝关节手术工具",
"start_date": "2020-10-27T18:46:21"
},
{
"item_code": "GYSXQX02200003",
"quantity": 3,
"category_name": "一类医疗器械",
"category_code": "12",
"specification": "",
"item_name": "HARMONY全髋器械",
"unit": "个",
"category_desc": "单件可重复使用的器械",
"general_name": "人工髋关节手术工具(箱)",
"start_date": "2020-10-27T18:46:21"
},
{
"item_code": "GYSXQX00330004",
"quantity": 2,
"category_name": "一类医疗器械",
"category_code": "12",
"specification": "",
"item_name": "SKII膝关节器械",
"unit": "个",
"category_desc": "单件可重复使用的器械",
"general_name": "膝关节手术工具",
"start_date": "2020-10-27T18:46:21"
}
],
"segment_name": "膝关节手术工具",
"segment_code": "HA3.5PZ"
},
{
"details": [
{
"item_code": "GYSXQX01100012",
"quantity": 2,
"category_name": "一类医疗器械",
"category_code": "12",
"specification": "",
"item_name": "SKI膝关节器械",
"unit": "个",
"category_desc": "单件可重复使用的器械",
"general_name": "膝关节手术工具",
"start_date": "2020-10-27T18:46:21"
},
{
"item_code": "GYSXQX02200023",
"quantity": 3,
"category_name": "一类医疗器械",
"category_code": "12",
"specification": "",
"item_name": "HARMONY全髋器械",
"unit": "个",
"category_desc": "单件可重复使用的器械",
"general_name": "人工髋关节手术工具(箱)",
"start_date": "2020-10-27T18:46:21"
},
{
"item_code": "GYSXQX00330034",
"quantity": 2,
"category_name": "一类医疗器械",
"category_code": "12",
"specification": "",
"item_name": "SKII膝关节器械",
"unit": "个",
"category_desc": "单件可重复使用的器械",
"general_name": "膝关节手术工具",
"start_date": "2020-10-27T18:46:21"
}
],
"segment_name": "人工髋关节手术工具(箱)",
"segment_code": "HB3.5PT"
}
]
}
}
// 选择产品-零散器械查询接口
const inter_8 = {
"error_code": 0,
......@@ -724,6 +819,7 @@ export default {
inter_6,
inter_66,
inter_7,
inter_77,
inter_8,
inter_9,
inter_99
......
......@@ -42,7 +42,7 @@ const localTestImageUrls = [{
url: 'https://obs.uat.sfrx.guke.tech/jeecg-boot/sys/common/view/files/20200921/3_1599645381259_1600672375488.jpg'
}]
// 手术模板 -- 大类
// 手术套包 -- 大类
const localSingleSeleHead_1 = [{
"id": "0",
title: '华森标准PFNA',
......@@ -426,7 +426,7 @@ const localSingleRowData = [
// 左侧分类数据
const localLeftOption = [
{
title: '手术模板',
title: '手术套包',
iconImg: require('../../../../images/surg_temp.png'),
localSecondData: localSingleSeleHead_1
},
......@@ -800,12 +800,12 @@ const localBottomOption = [
]
},
{
title: '单选耗材',
title: '耗材',
iconImg: localTestImageUrls,
localBottomContData: [
{
"id": "0",
title: '已选单选耗材11',
title: '已选耗材11',
tip1: '型号:10',
tip2: '物料代码:JUST00000104',
value: 0,
......
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