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
......
......@@ -18,6 +18,10 @@ import PageListArrow from '../common/listDataComponent/PageListArrow';
import TipInfoNeedSelect from '../common/listDataComponent/TipInfoNeedSelect';
import LocalVariable from '../common/LocalVariable';
import LoadingModel from '../common/listDataComponent/LoadingModel';
import NotEnoughModel from '../common/NotEnoughModel';
import ImagePicker from 'react-native-image-picker';
import ZoomPictureModel from '../common/ZoomPictureModel';
import { uploadTransImg } from '../../action/TransAction';
class SelfOrderPage extends Component {
constructor(props) {
......@@ -63,40 +67,54 @@ class SelfOrderPage extends Component {
showInput: false,
inputValue: ''
},
// {
// "id": "6",
// title: '手术名称',
// value: ''
// },
{
"id": "6",
title: '手术名称',
value: ''
},
{
"id": "7",
title: '手术时间',
name: '请选择',
value: '',
dateValue: new Date(),
showDatePicker: true
},
// {
// "id": "8",
// title: '手术类型',
// name: '请选择',
// value: '',
// },
{
"id": "8",
title: '手术类型',
name: '请选择',
value: '',
},
{
"id": "9",
"id": "7",
title: '订单类型',
name: '请选择',
value: ''
},
{
"id": "10",
"id": "8",
title: '选择产品',
name: '请选择',
value: '',
lines: [],
sub_lines: [],
replace_item_flag: 'N', // 器械包
take_cert_flag: 'N' // 合格证
take_cert_flag: 'N' // 注册证
},
{
"id": "9",
title: '需要携带注册证',
// name: '',
value: '',
isRedio: '' // 单选
},
{
"id": "10",
title: '同意替换器械包', // 同意替换同品不同器械包
// name: '',
value: 'N',
isRedio: 'N' // 单选
},
{
"id": "11",
......@@ -109,6 +127,13 @@ class SelfOrderPage extends Component {
title: '还有什么要安排的,可录音备注哟!',
value: '',
isRecode: true // 录音
},
{
"id": "13",
title: '添加图片',
value: '',
isAddImage: true, // 添加图片
uploadImgArr: [] // 上传后的路径
}
],
subInitListOption: [], // 存储最初数据
......@@ -121,10 +146,15 @@ class SelfOrderPage extends Component {
doctor_name: '', // 主治医生
surgery_name: '', // 手术名称
surgery_date: '', // 手术时间
// surgery_type_code: '', // 手术类型,用来筛选手术模板
// surgery_type_code: '', // 手术类型,用来筛选手术套包
order_type_code: '', // 订单类型
surgery_desc: '', // 备注信息
voice_url: '', // 录音地址
order_currency: 'CNY',
Caller: 'dingding', // Caller: 'APP',
force_balance_check_flag: 'Y', // 检查缺失物料
replace_item_flag: 'N', // 器械包
take_cert_flag: 'N' // 合格证
},
currentItem: {
name: '请选择',
......@@ -146,6 +176,11 @@ class SelfOrderPage extends Component {
stop: false, //录音是否停止
currentTime: 0, //录音时长
localCustomersOption: [], // 当前医院信息:客户名称、收单地点、收货地点、主治医生
showNotEnogPop: false, // 库存不足弹窗
not_enough_items_list: [], // 库存不足数据
localPhoOption: [], // 本地图片
isShowImage: false,
currShowImgIndex: 0
}
}
......@@ -327,7 +362,7 @@ class SelfOrderPage extends Component {
that.setState({
isSubLoding: false,
lodingTitle: '加载中'
},() => {
}, () => {
that.changeCurrentOption()
})
break;
......@@ -363,7 +398,7 @@ class SelfOrderPage extends Component {
that.setState({
isSubLoding: false,
lodingTitle: '提交中'
},() => {
}, () => {
that.processReturnData()
})
}, 500)
......@@ -392,7 +427,7 @@ class SelfOrderPage extends Component {
let that = this
this.setState({
listOptionData: listOptionData.map((item, index) => {
if (index > curIndex && index < 12) {
if (index > curIndex && index < 9) {
item.name = localOtherObj.name
item.value = localOtherObj.value
if (listOptionData[1].value && item.title == '客户名称') {
......@@ -421,7 +456,7 @@ class SelfOrderPage extends Component {
let tempTit = ''
let curTip = '未选择'
for (let chIndex in listOptionData) {
if (chIndex > 0 && chIndex < 11 && chIndex != 8
if (chIndex > 0 && chIndex < 10 && chIndex != 5
&& !listOptionData[chIndex].value
&& listOptionData[chIndex].name !== '其他') {
// 不是主治医生
......@@ -511,16 +546,18 @@ class SelfOrderPage extends Component {
})
}
tempOption = that.changeNameAndValue(currentArr, 'customer_name', 'customer_code')
} else if (currentTitle === '手术类型') {
let resultArr = []
selfOrderOption.forEach(item => {
let obj = {}
obj.name = item.value_name
obj.value = item.value_code
resultArr.push(obj)
})
tempOption = [...resultArr]
} else if (currentTitle === '订单类型') {
}
// else if (currentTitle === '手术类型') {
// let resultArr = []
// selfOrderOption.forEach(item => {
// let obj = {}
// obj.name = item.value_name
// obj.value = item.value_code
// resultArr.push(obj)
// })
// tempOption = [...resultArr]
// }
else if (currentTitle === '订单类型') {
tempOption = that.changeNameAndValue(selfOrderOption, 'value_name', 'value_code')
}
that.setState({
......@@ -787,18 +824,18 @@ class SelfOrderPage extends Component {
// 手术名称 输入
handleSurNameInput(text, curData) {
let { listOptionData } = this.state
let that = this
listOptionData.map(function (item) {
if (item.title === curData.title) {
item.value = text
}
})
that.setState({
listOptionData: listOptionData
}, () => {
that.changeCanSub()
})
// let { listOptionData } = this.state
// let that = this
// listOptionData.map(function (item) {
// if (item.title === curData.title) {
// item.value = text
// }
// })
// that.setState({
// listOptionData: listOptionData
// }, () => {
// that.changeCanSub()
// })
}
// 手术时间 点击 2020-04-23 17:41
......@@ -828,6 +865,7 @@ class SelfOrderPage extends Component {
// 修改当前日期数据
dateModalCallback(date, curData) {
let { listOptionData } = this.state
let that = this
listOptionData.map(function (item) {
if (item.title === curData.title) {
item.name = date
......@@ -835,30 +873,32 @@ class SelfOrderPage extends Component {
item.dateValue = formatStrForDate(date)
}
})
this.setState({
that.setState({
listOptionData: listOptionData
}, () => {
that.changeCanSub()
})
}
// 手术类型 点击
handleSurTypeCheck(curData) {
let { props } = this
let that = this
if (this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
that.setState({
currentTitle: curData.title,
currentItem: {
name: curData.name,
value: curData.value
}
}, () => {
let params = {
access_token: props.token,
value_set_code: 'ORTHOPEDICS_PRODUCT_CLASS'
}
props.requestSelfSurgeryType(params)
})
}
// let { props } = this
// let that = this
// if (this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
// that.setState({
// currentTitle: curData.title,
// currentItem: {
// name: curData.name,
// value: curData.value
// }
// }, () => {
// let params = {
// access_token: props.token,
// value_set_code: 'ORTHOPEDICS_PRODUCT_CLASS'
// }
// props.requestSelfSurgeryType(params)
// })
// }
}
// 订单类型 点击
......@@ -881,6 +921,28 @@ class SelfOrderPage extends Component {
}
}
// 需要携带注册证 / 自动更换同品不同器械包 点击
handleCertAndItemCheck(curData, certFlag) {
console.log('更新', curData, certFlag)
let { listOptionData } = this.state
let that = this
listOptionData.map(function (item) {
if (item.title === curData.title) {
item.value = certFlag
}
})
that.setState({
listOptionData: listOptionData
}, () => {
that.changeCanSub()
})
}
// // 自动更换同品不同器械包 点击
// handleItemCheck(curData, itemFlag) {
// console.log('更新', curData, itemFlag)
// }
// 选择产品 点击跳转
handleProductCheck() {
if (this.judgeOrgIsNull()) {
......@@ -889,7 +951,8 @@ class SelfOrderPage extends Component {
this.props.navigation.navigate('ChooseProductPage', {
title: `选择产品`,
selfData: {
org_code: listOptionData[1].value
org_code: listOptionData[1].value,
doctor_name: (listOptionData[5].name=='其他' || listOptionData[5].name=='请选择') ? listOptionData[5].inputValue : listOptionData[5].name
},
productCallBack: that.productCallBack.bind(that)
})
......@@ -899,21 +962,23 @@ class SelfOrderPage extends Component {
// 选择产品 回调
productCallBack(params) {
let { listOptionData } = this.state
listOptionData[10].name = '请选择'
listOptionData[10].value = ''
listOptionData[10].lines = []
let local_prod = listOptionData[8]
local_prod.name = '请选择'
local_prod.value = ''
local_prod.lines = []
let cur_params = params
if (cur_params && cur_params.length > 0) {
cur_params.forEach(loc_item => {
if (loc_item[LocalVariable.SELECTED_QUQNTITY] > 0) {
listOptionData[10].value += `【${loc_item.supplier_short_name}】`
local_prod.value += `【${loc_item.supplier_short_name}】`
}
})
if (!!listOptionData[10].value) {
listOptionData[10].name = listOptionData[10].value
listOptionData[10].lines = cloneObject(cur_params)
if (!!local_prod.value) {
local_prod.name = local_prod.value
local_prod.lines = cloneObject(cur_params)
}
}
listOptionData[8] = local_prod
this.setState({
listOptionData: listOptionData
}, () => {
......@@ -934,6 +999,123 @@ class SelfOrderPage extends Component {
})
}
// 添加图片 点击
handleAddPicCheck() {
let { localPhoOption, listOptionData } = this.state
let { props } = this
let that = this
const options = {
title: '选择图片',
cancelButtonTitle: '取消',
takePhotoButtonTitle: '拍照',
chooseFromLibraryButtonTitle: '相册',
cameraType: 'back',
mediaType: 'photo',
videoQuality: 'high',
durationLimit: 10,
maxWidth: 720,
maxHeight: 1280,
aspectX: 2,
aspectY: 1,
quality: 1,
angle: 0,
allowsEditing: false,
noData: false,
storageOptions: {
skipBackup: true,
path: 'WisdomTrans' // 存储本地地址
}
};
ImagePicker.showImagePicker(options, async (res) => {
if (res.didCancel) {
console.log('User cancelled photo picker');
}
else if (res.error) {
console.log('ImagePicker Error: ', res.error);
if(res.error.indexOf('Camera permissions not granted') > -1){
Alert.alert(('提示信息', 'APP需要使用相机,请打开相机权限允许APP使用'), [{
text: '设置',
onPress: () => {
Linking.openURL('app-settings:')
.catch(err => console.log('error', err))
}
},{
text: '取消'
}])
}
if(res.error.indexOf('Photo library permissions not granted') > -1){
Alert.alert('提示信息', 'APP需要使用相册,请打开相册权限允许APP使用', [{
text: '设置',
onPress: () => {
Linking.openURL('app-settings:')
.catch(err => console.log('error', err))
}
},{
text: '取消'
}]);
}
}
else if (res.customButton) {
console.log('User tapped custom button: ', res.customButton);
} else {
that.changeSubLoding(true, '上传中')
let source; //保存选中的图片
if (Platform.OS === 'android') {
source = res.uri;
} else {
source = res.uri.replace('file://','');
}
const formData = new FormData();
let file = { uri: source, type: 'multipart/form-data', name: res.fileName };
formData.append('file',file);
let params = {
access_token: props.token,
formData
}
let {global_domain_config} = props
//上传图片接口
let imgResult = await uploadTransImg(global_domain_config, params);
console.log('res=', imgResult)
if(imgResult.error_code == 0) {
that.changeSubLoding(false)
// 提交订单
show('上传成功');
let {url} = imgResult.data
localPhoOption.push(source); // 本地图片地址
listOptionData[13].uploadImgArr.push(url) // 服务器图片地址
that.setState({
localPhoOption,
listOptionData
});
} else if(imgResult.error_code == 41006) {
that.changeSubLoding(false)
show('登录过期,请重新登录');
props.exitLoginStatus();
} else {
that.changeSubLoding(false)
let error_msg = imgResult.error_msg || imgResult.message
show(error_msg);
}
}
})
}
// 删除单个照片 点击
handleDelPickCheck(item, index) {
let {listOptionData, localPhoOption} = this.state
localPhoOption.splice(index, 1) // 删除本地地址
listOptionData[7].uploadImgArr.splice(index, 1) // 删除服务器地址
this.setState({
listOptionData,
localPhoOption
}, () => {
show('删除成功')
})
}
// 生成订单 点击
async handleSubmit() {
this.changeCanSub(true)
......@@ -948,7 +1130,9 @@ class SelfOrderPage extends Component {
path: state.audioPath
}
let { global_domain_config } = props
console.log('params==', params)
let audioResult = await requestSelfAudio(global_domain_config, params);
console.log('res==', audioResult)
that.changeSubLoding(true, '上传中')
if (audioResult.error_code == 0) {
// 提交订单
......@@ -994,16 +1178,24 @@ class SelfOrderPage extends Component {
} else {
tempSubOption.doctor_name = state.listOptionData[5].value
}
tempSubOption.surgery_name = state.listOptionData[6].value
tempSubOption.surgery_date = state.listOptionData[7].value
// tempSubOption.surgery_name = state.listOptionData[6].value
tempSubOption.surgery_date = state.listOptionData[6].value
// tempSubOption.surgery_type_code = state.listOptionData[8].value
tempSubOption.order_type_code = state.listOptionData[9].value
tempSubOption.order_type_code = state.listOptionData[7].value
tempSubOption.lines = state.listOptionData[8].sub_lines
tempSubOption.take_cert_flag = state.listOptionData[9].value
tempSubOption.replace_item_flag = state.listOptionData[10].value
tempSubOption.surgery_desc = state.listOptionData[11].value
tempSubOption.voice_url = state.listOptionData[12].value
tempSubOption.replace_item_flag = state.listOptionData[10].replace_item_flag
tempSubOption.take_cert_flag = state.listOptionData[10].take_cert_flag
tempSubOption.Caller = 'APP'
tempSubOption.lines = state.listOptionData[10].sub_lines
tempSubOption.image_url = state.listOptionData[13].uploadImgArr.join(',')
// tempSubOption.replace_item_flag = state.listOptionData[10].replace_item_flag
// tempSubOption.take_cert_flag = state.listOptionData[10].take_cert_flag
let params = {
access_token: props.token,
data: { ...tempSubOption }
......@@ -1016,7 +1208,8 @@ class SelfOrderPage extends Component {
getSumLinesOps() {
let { listOptionData } = this.state
// 修改提交的行数据
let local_lines = cloneObject(listOptionData[10].lines)
let local_lines = cloneObject(listOptionData[8].lines)
let that = this
let res_lines = []
let showPackageTip = false
local_lines.forEach(sup_item => {
......@@ -1025,7 +1218,7 @@ class SelfOrderPage extends Component {
let select_arr = lef_item[LocalVariable.SELECTED_DATA_ARR]
if (lef_item[LocalVariable.SELECTED_QUQNTITY] > 0 && select_arr && select_arr.length > 0) {
if (lef_item.category_code === LocalVariable.SURGICAL_TEMPLATE) {
// 手术模板
// 手术套包
select_arr.forEach(sel_item => {
let template_number = sel_item.template_number
if (sel_item[LocalVariable.CHILDREN_LINE_NAME] && sel_item[LocalVariable.CHILDREN_LINE_NAME].length > 0) {
......@@ -1034,7 +1227,7 @@ class SelfOrderPage extends Component {
chi_item[LocalVariable.LINE_OPTIONS].forEach(lin_item => {
if (lin_item[LocalVariable.SELECTED_DATA_ARR] && lin_item[LocalVariable.SELECTED_DATA_ARR].length > 0) {
lin_item[LocalVariable.SELECTED_DATA_ARR].forEach(sel_item => {
sel_item['template_number'] = template_number
// sel_item['template_number'] = template_number // 暂时不用
sel_item[LocalVariable.PLAN_QUANTITY] = sel_item[LocalVariable.QUANTITY_FIELD]
res_lines.push(sel_item)
})
......@@ -1050,7 +1243,8 @@ class SelfOrderPage extends Component {
showPackageTip = true
}
select_arr.forEach(sel_item => {
sel_item['prefer_serial_number'] = sel_item.serial_number
// sel_item['prefer_serial_number'] = sel_item.serial_number // 暂时不用
sel_item['line_remark'] = sel_item.serial_number
sel_item[LocalVariable.PLAN_QUANTITY] = sel_item[LocalVariable.QUANTITY_FIELD]
res_lines.push(sel_item)
})
......@@ -1063,7 +1257,7 @@ class SelfOrderPage extends Component {
})
}
else {
// 单选耗材
// 耗材
if (select_arr[0].details && select_arr[0].details.length > 0) {
// 大-中-小类
select_arr.forEach(sel_item => {
......@@ -1086,12 +1280,46 @@ class SelfOrderPage extends Component {
})
}
})
listOptionData[10].sub_lines = res_lines
if (showPackageTip) {
this.refs.PackageModel.show()
} else {
this.refs.CertModel.show('需要携带注册证?')
}
let line_obj = {}
let end_lines = []
// 汇总同类物料
res_lines.map(line_it => {
if(!line_obj[line_it.item_code]){
line_obj[line_it.item_code] = line_it.item_code
end_lines.push(line_it)
}else {
end_lines.forEach(function (fil_li) {
if(fil_li.item_code === line_it.item_code) {
if(line_it['line_remark']){
fil_li.line_remark = line_it.line_remark
}
fil_li[LocalVariable.QUANTITY_FIELD] += line_it[LocalVariable.QUANTITY_FIELD]
fil_li[LocalVariable.PLAN_QUANTITY] = fil_li[LocalVariable.QUANTITY_FIELD]
}
})
}
})
end_lines.map(function (line_obj, line_ind) {
line_obj['line_number'] = line_ind + 1
})
listOptionData[8].sub_lines = end_lines
that.setState({
listOptionData: listOptionData
},() => {
that.submitSelfOrder()
})
// if (showPackageTip) {
// this.refs.PackageModel.show()
// } else {
// this.refs.CertModel.show('需要携带注册证?')
// }
}
// 判断组织是否为空
......@@ -1120,14 +1348,29 @@ class SelfOrderPage extends Component {
processReturnData() {
let { selfOrderOption } = this.props
let that = this
if (selfOrderOption && selfOrderOption.create_success == 'Y') {
// 打开下单成功页面
that.clearAllData()
let { state: { params: { title } } } = that.props.navigation
that.props.navigation.navigate('SubSuccPage', {
title: `${title} - 提交成功`,
orderNumber: selfOrderOption.order_number
})
if (selfOrderOption) {
if (selfOrderOption.create_success == 'N') {
// 打开库存不足弹窗
this.setState({
not_enough_items_list: selfOrderOption.not_enough_items_list
}, () => {
// 解决 IOS 弹窗显示问题
setTimeout(() => {
that.setState({
showNotEnogPop: true
})
}, 500)
})
} else if (selfOrderOption.create_success == 'Y') {
// 打开下单成功页面
that.clearAllData()
let { state: { params: { title } } } = that.props.navigation
that.props.navigation.navigate('SubSuccPage', {
title: `${title} - 下单成功`,
orderNumber: selfOrderOption.survey_collect_number
// orderNumber: selfOrderOption.order_number
})
}
}
}
// 清空数据
......@@ -1139,22 +1382,52 @@ class SelfOrderPage extends Component {
this.setState({
listOptionData,
currentTime: 0,
stop: false
stop: false,
localPhoOption: []
})
}
// 提交的提示回调函数
modelPackageCertCB(typeName, nowVal) {
let { listOptionData } = this.state
listOptionData[10][typeName] = nowVal
// let { listOptionData } = this.state
// listOptionData[10][typeName] = nowVal
// this.setState({
// listOptionData: listOptionData
// })
// if (typeName === 'replace_item_flag') {
// this.refs.CertModel.show('需要携带注册证?')
// } else {
// this.submitSelfOrder()
// }
}
// 库存不足弹窗回调 -- 确定
handleNotEnoughCallBack() {
let { submitOption } = this.state
let that = this
this.setState({
listOptionData: listOptionData
submitOption: {
...submitOption,
force_balance_check_flag: 'N'
}
}, () => {
// that.handleSubmit()
that.submitSelfOrder()
})
}
// 库存不足弹窗关闭
handleNotEnoughCloseModal(show) {
this.setState({
showNotEnogPop: show
})
}
// 展示/隐藏 放大图片
handleZoomPicture(flag, index) {
this.setState({
isShowImage: flag,
currShowImgIndex: index || 0
})
if (typeName === 'replace_item_flag') {
this.refs.CertModel.show('需要携带注册证?')
} else {
this.submitSelfOrder()
}
}
// 返回备注以上的元素
......@@ -1208,7 +1481,7 @@ class SelfOrderPage extends Component {
/>
<PageListArrow
listActOpa={.8}
listHasAster={true}
// listHasAster={true}
listItem={listOptionData[5]}
listName={'name'}
listTitle={'title'}
......@@ -1218,7 +1491,7 @@ class SelfOrderPage extends Component {
otherInput={'showInput'}
otherInputCallBack={(text) => this.handleDoctorInput(text, listOptionData[5])}
/>
<PageListArrow
{/* <PageListArrow
listActOpa={.8}
listHasAster={true}
listItem={listOptionData[6]}
......@@ -1227,14 +1500,14 @@ class SelfOrderPage extends Component {
listTitle={'title'}
inputCallBack={(text) => this.handleSurNameInput(text, listOptionData[6])}
isTitInputStyle={true}
/>
/> */}
<PageListArrow
listActOpa={.8}
listHasAster={true}
listItem={listOptionData[7]}
listItem={listOptionData[6]}
listName={'name'}
listTitle={'title'}
listCallBack={() => this.handleSurDateCheck(listOptionData[7])}
listCallBack={() => this.handleSurDateCheck(listOptionData[6])}
listHasArrow={true}
/>
{/* <PageListArrow
......@@ -1249,32 +1522,51 @@ class SelfOrderPage extends Component {
<PageListArrow
listActOpa={.8}
listHasAster={true}
listItem={listOptionData[9]}
listItem={listOptionData[7]}
listName={'name'}
listTitle={'title'}
listCallBack={() => this.handleOrderCheck(listOptionData[9])}
listCallBack={() => this.handleOrderCheck(listOptionData[7])}
listHasArrow={true}
/>
<PageListArrow
listActOpa={.8}
listHasAster={true}
listItem={listOptionData[10]}
listItem={listOptionData[8]}
listName={'name'}
listTitle={'title'}
listCallBack={() => this.handleProductCheck(listOptionData[10])}
listCallBack={() => this.handleProductCheck(listOptionData[8])}
listHasArrow={true}
listMaxLines={1}
/>
<PageListArrow
listActOpa={.8}
listHasAster={true}
listItem={listOptionData[9]}
// listName={'name'}
listTitle={'title'}
listValue={'value'}
listCallBack={(radioFlag) => this.handleCertAndItemCheck(listOptionData[9], radioFlag)}
listIsAudio={true}
/>
<PageListArrow
listActOpa={.8}
listItem={listOptionData[10]}
// listName={'name'}
listTitle={'title'}
listValue={'value'}
listCallBack={(radioFlag) => this.handleCertAndItemCheck(listOptionData[10], radioFlag)}
listIsAudio={true}
/>
<DateModel
date={listOptionData[7].dateValue}
date={listOptionData[6].dateValue}
closeModal={(show) => this.closeDateModal(show)}
show={dateModelPop}
callback={(date) => this.dateModalCallback(date, listOptionData[7])}
callback={(date) => this.dateModalCallback(date, listOptionData[6])}
/>
{ this.renderPickerModel()}
{ this.renderTipModelPackage()}
{ this.renderTipModelCert()}
{/* { this.renderTipModelPackage()}
{ this.renderTipModelCert()} */}
</View>
)
}
......@@ -1380,6 +1672,88 @@ class SelfOrderPage extends Component {
)
}
// 返回添加图片
renderAddPicturesItem() {
let { state } = this
return (
<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}>
{
state.localPhoOption.length
? state.localPhoOption.map((item, index) => this.renderPicItem(item, index) )
: null
}
<TouchableOpacity
activeOpacity={.8}
style={list_common_item.addpic_img_btn}
onPress={() => this.handleAddPicCheck()}
>
<Image style={icon_style} source={require('../../images/add_icon_large.png')} />
</TouchableOpacity>
</View>
</View>
</CellTextStyle>
)
}
// 返回增加的图片
renderPicItem(item, index) {
// let cur_photos = []
return (
<View style={list_common_item.addnew_pic_btn} key={index}>
<TouchableOpacity
activeOpacity={.8}
style={list_common_item.show_pic_btn}
onPress={()=>this.handleZoomPicture(true, index)}
>
<Image style={icon_style} source={{uri: item}} />
</TouchableOpacity>
<TouchableOpacity
activeOpacity={.8}
style={list_common_item.del_img_box}
onPress={(item, index) => this.handleDelPickCheck(item, index)}
>
<Image style={icon_style} source={require('../../images/close_err_icon.png')} />
</TouchableOpacity>
</View>
)
}
// 加载放大图片弹窗
renderZoomPicture() {
let { isShowImage, currShowImgIndex, listOptionData } = this.state
let { global_domain_config } = this.props
// // 测试
// let zoomImages = [{
// url: 'https://obs.uat.sfrx.guke.tech/upload/dingding/image/QDw05sTo.jpg',
// props: {
// // headers: ...
// }
// },{
// url: 'https://obs.uat.sfrx.guke.tech/upload/dingding/image/QDw05sTo.jpg',
// },{
// url: 'https://obs.uat.sfrx.guke.tech/jeecg-boot/sys/common/view/upload/dingding/image/8V4599aH.jpg'
// }]
// 正式
let zoomImages = []
listOptionData[13].uploadImgArr.forEach(item => {
zoomImages.push({
url: `${global_domain_config}/${item}`
})
})
return (
<ZoomPictureModel
isShowImage={isShowImage}
currShowImgIndex={currShowImgIndex}
zoomImages={zoomImages}
callBack={(flag) => this.handleZoomPicture(flag)}
></ZoomPictureModel>
)
}
// 返回正在加载中
renderLodingItem() {
let { lodingTitle, isSubLoding } = this.state
......@@ -1409,6 +1783,21 @@ class SelfOrderPage extends Component {
)
}
// 返回库存不足弹窗
renderNotEnoughModel() {
let { not_enough_items_list, showNotEnogPop } = this.state
return (
<SafeAreaView style={styles.item_container}>
<NotEnoughModel
not_enough_items_list={not_enough_items_list}
callback={() => this.handleNotEnoughCallBack()}
show={showNotEnogPop}
closeModal={(show) => this.handleNotEnoughCloseModal(show)}
/>
</SafeAreaView>
)
}
render() {
let { canSubFlag } = this.state
let { navigation } = this.props
......@@ -1429,6 +1818,8 @@ class SelfOrderPage extends Component {
{this.renderListItem()}
{this.renderRemarksItem()}
{this.renderRecordingItem()}
{this.renderAddPicturesItem()}
{this.renderZoomPicture()}
<FooterBtnStyle
style={canSubFlag ? styles.sub_btn_pro : ''}
activeOpacity={canSubFlag ? .8 : 1}
......@@ -1441,6 +1832,7 @@ class SelfOrderPage extends Component {
{this.renderLodingItem()}
{this.renderLodingItemNew()}
{ this.renderNotEnoughModel() }
</SafeAreaView>
</View>
......
......@@ -25,7 +25,7 @@ class ChooseProductPage extends Component {
selectShowPopup: false, // 共计已选弹窗
defalutLeftItem: [{
"category_code": LocalVariable.SURGICAL_TEMPLATE,
"category_name": "手术模板",
"category_name": "手术套包",
"cate_local_icon": require('../../../images/surg_temp.png')
}, {
"category_code": LocalVariable.NAIL_BOX,
......@@ -162,8 +162,10 @@ class ChooseProductPage extends Component {
}
that.refs.LoadingModel.show()
let cur_org_code = ''
let cur_doctor_name = ''
if (navigation.state.params.selfData) {
cur_org_code = navigation.state.params.selfData.org_code
cur_doctor_name = navigation.state.params.selfData.doctor_name
}
let topItem = topProcOptionList[topActiveIndex]
if (leftIndex === 0) {
......@@ -171,6 +173,7 @@ class ChooseProductPage extends Component {
access_token: token,
org_code: cur_org_code,
manufacturer_code: topItem.supplier_code,
doctor_name: cur_doctor_name
}
console.log('params=', params)
let sur_head_search = await reqSurTempHeadSearch(global_domain_config, params)
......@@ -412,9 +415,8 @@ class ChooseProductPage extends Component {
// 改变弹窗后的回调
handleChangeCallBack(options){
let { topProcOptionList, topActiveIndex } = this.state
console.log('🐯 改变后的回调 🐯=====', options)
console.log('🐯 改变后的回调 🐯=====', topProcOptionList)
// console.log('🐯 改变后的回调 🐯=====', options)
// console.log('🐯 改变后的回调 🐯=====', topProcOptionList)
let localSurgicalOpts = options[0][LocalVariable.SELECTED_DATA_ARR]
let localNailOpts = options[1][LocalVariable.SELECTED_DATA_ARR]
let localQuipmentOpts = options[2][LocalVariable.SELECTED_DATA_ARR]
......@@ -422,9 +424,7 @@ class ChooseProductPage extends Component {
let localSignOpts = options[4][LocalVariable.SELECTED_DATA_ARR]
topProcOptionList.forEach(function(top_item, top_index) {
top_item[LocalVariable.SELECTED_QUQNTITY] = 0
if(top_item.leftOptionList && top_item.leftOptionList.length > 0){
top_item.leftOptionList.forEach(function (left_item, left_index) {
......@@ -443,23 +443,18 @@ class ChooseProductPage extends Component {
let cur_clear_flag = false
let four_clear_flag = false
options.forEach(opt_obj => {
if(opt_obj.category_code === left_item.category_code
// (opt_obj.category_code === LocalVariable.SURGICAL_TEMPLATE || opt_obj.category_code === LocalVariable.NAIL_BOX || opt_obj.category_code === LocalVariable.EQUIPMENT_BAG || opt_obj.category_code === LocalVariable.SCATTERED_EQUIPMENT)
){
if(opt_obj.category_code === left_item.category_code){
cur_no_clear = opt_obj[LocalVariable.SELECTED_DATA_ARR].filter(fi_it => {
if(fi_it.supplier_code === top_item.supplier_code){
cur_clear_flag = true
}
// if(fi_it.supplier_code === top_item.supplier_code){
// cur_clear_flag = true
// }
return fi_it.supplier_code === top_item.supplier_code
})
if(opt_obj[LocalVariable.SELECTED_DATA_ARR].length === 0){
four_clear_flag = true
}
// if(opt_obj[LocalVariable.SELECTED_DATA_ARR].length === 0){
// four_clear_flag = true
// }
}
})
console.log('cur_no_clear---', cur_no_clear, four_clear_flag)
console.log('cur_no_clear--🆚🆚-', cur_clear_flag, top_item.supplier_name, left_item.category_name)
// 清空
if(cur_no_clear.length === 0 ||
(left_item.category_code === LocalVariable.SURGICAL_TEMPLATE && localSurgicalOpts.length === 0) ||
......@@ -467,9 +462,6 @@ class ChooseProductPage extends Component {
(left_item.category_code === LocalVariable.EQUIPMENT_BAG && localQuipmentOpts.length === 0) ||
(left_item.category_code === LocalVariable.SCATTERED_EQUIPMENT && localScatteredOpts.length === 0)
){
console.log('cur_no_clear--- 🈳️🈳️',top_item.supplier_name, left_item.category_name)
left_item[LocalVariable.SELECTED_DATA_ARR] =[]
left_item[LocalVariable.SELECTED_QUQNTITY] = 0
left_item[LocalVariable.LOCAL_SECOND_DATA].forEach(function(local_opts) {
......@@ -479,15 +471,11 @@ class ChooseProductPage extends Component {
}
})
}
}else {
// 单选耗材
// 耗材
left_item[LocalVariable.SELECTED_DATA_ARR] = []
localSignOpts.forEach((sign_obj, sign_index) => {
if(sign_obj.supplier_code === top_item.supplier_code){
sign_obj[LocalVariable.CHILDREN_LINE_NAME].forEach((si_line, si_ind)=>{
if(si_line.left_category_code === left_item.category_code){
left_item[LocalVariable.SELECTED_DATA_ARR].push(si_line)
......@@ -497,10 +485,7 @@ class ChooseProductPage extends Component {
}
})
left_item[LocalVariable.LOCAL_SECOND_DATA].forEach(function(loc_da, loc_ind) {
// loc_da[LocalVariable.QUANTITY_FIELD] = 0
if(left_item[LocalVariable.SELECTED_DATA_ARR] && left_item[LocalVariable.SELECTED_DATA_ARR].length === 0){
loc_da[LocalVariable.QUANTITY_FIELD] = 0
if(loc_da.details){
......@@ -516,7 +501,6 @@ class ChooseProductPage extends Component {
hasSignFlag = true
}
})
if(!hasSignFlag){
// 已清除
loc_da[LocalVariable.QUANTITY_FIELD] = 0
......@@ -526,27 +510,15 @@ class ChooseProductPage extends Component {
})
}
}
// loc_da[LocalVariable.QUANTITY_FIELD] = 0
// if(loc_da.details){
// loc_da.details.forEach(function(det_item) {
// det_item[LocalVariable.QUANTITY_FIELD] = 0
// })
// }
}
})
}
top_item[LocalVariable.SELECTED_QUQNTITY] += left_item[LocalVariable.SELECTED_QUQNTITY]
})
}
})
console.log('👌👌👌 改变后的回调 👌=====', topProcOptionList)
// console.log('👌👌👌 改变后的回调 👌=====', topProcOptionList)
this.setState({
topProcOptionList: topProcOptionList
})
......@@ -731,7 +703,7 @@ class ChooseProductPage extends Component {
// }
cur_sel_options = [{
category_name: '手术模板',
category_name: '手术套包',
category_code: LocalVariable.SURGICAL_TEMPLATE,
[LocalVariable.SELECTED_DATA_ARR]: [],
[LocalVariable.SELECTED_QUQNTITY]: 0
......@@ -751,7 +723,7 @@ class ChooseProductPage extends Component {
[LocalVariable.SELECTED_DATA_ARR]: [],
[LocalVariable.SELECTED_QUQNTITY]: 0
}, {
category_name: '单选耗材',
category_name: '耗材',
category_code: LocalVariable.SIGN_SELECT_CONSUMABLES,
[LocalVariable.SELECTED_DATA_ARR]: [],
[LocalVariable.SELECTED_QUQNTITY]: 0
......@@ -767,7 +739,7 @@ class ChooseProductPage extends Component {
let leftOptionList = top_item.leftOptionList
leftOptionList.map(left_item => {
// let category_name = '单选耗材'
// let category_name = '耗材'
// let category_code = LocalVariable.SIGN_SELECT_CONSUMABLES
// if(left_item.category_code === LocalVariable.SURGICAL_TEMPLATE || left_item.category_code === LocalVariable.NAIL_BOX || left_item.category_code === LocalVariable.EQUIPMENT_BAG || left_item.category_code === LocalVariable.SCATTERED_EQUIPMENT){
// category_name = left_item.category_name
......@@ -806,7 +778,7 @@ class ChooseProductPage extends Component {
}
}
if (!localNotSign) {
// 单选耗材
// 耗材
cur_line_obj.category_code = cur_sel_options[cur_sel_options.length - 1].category_code
cur_line_obj.category_name = cur_sel_options[cur_sel_options.length - 1].category_name
// cur_line_obj.left_category_code = left_item.category_code
......@@ -826,10 +798,6 @@ class ChooseProductPage extends Component {
cur_sel_options[cur_sel_options.length - 1][LocalVariable.SELECTED_DATA_ARR].forEach(function (sel_arr) {
if(sel_arr.supplier_code === cur_line_obj.supplier_code){
sel_arr[LocalVariable.SELECTED_QUQNTITY] += cur_line_obj[LocalVariable.SELECTED_QUQNTITY]
// console.log('add➕🏠=====',sel_arr[LocalVariable.CHILDREN_LINE_NAME])
// console.log('add➕🏠=====',cur_line_obj.supplier_name,cur_line_obj[LocalVariable.CHILDREN_LINE_NAME])
// sel_arr[LocalVariable.CHILDREN_LINE_NAME].push(...cur_line_obj[LocalVariable.CHILDREN_LINE_NAME])
let has_line_sign = []
has_line_sign = sel_arr[LocalVariable.CHILDREN_LINE_NAME].filter((line_item) => {
if(line_item.details){
......@@ -839,9 +807,9 @@ class ChooseProductPage extends Component {
}
})
if(has_line_sign.length === 0){
console.log('add➕🏠=====',has_line_sign, has_line_sign.length)
console.log('add➕🏠=====',sel_arr[LocalVariable.CHILDREN_LINE_NAME])
console.log('add➕🏠=====',cur_line_obj.supplier_name,cur_line_obj[LocalVariable.CHILDREN_LINE_NAME])
// console.log('add➕🏠=====',has_line_sign, has_line_sign.length)
// console.log('add➕🏠=====',sel_arr[LocalVariable.CHILDREN_LINE_NAME])
// console.log('add➕🏠=====',cur_line_obj.supplier_name,cur_line_obj[LocalVariable.CHILDREN_LINE_NAME])
sel_arr[LocalVariable.CHILDREN_LINE_NAME].push(...cur_line_obj[LocalVariable.CHILDREN_LINE_NAME])
}
}
......@@ -854,32 +822,12 @@ class ChooseProductPage extends Component {
})
}
// let cur_obj = {
// supplier_code: top_item.category_code,
// supplier_short_name: top_item.supplier_short_name,
// supplier_name: top_item.supplier_name,
// [LocalVariable.CHILDREN_LINE_NAME]: top_item.leftOptionList.filter(fi_item => fi_item[LocalVariable.SELECTED_QUQNTITY] > 0)
// }
// }
})
// cur_sel_options = topProcOptionList[topActiveIndex].leftOptionList.filter(fi_item => fi_item[LocalVariable.SELECTED_QUQNTITY] > 0)
}
// cur_sel_options.forEach(function (curOpts) {
// curOpts[LocalVariable.SELECTED_QUQNTITY] = curOpts[LocalVariable.SELECTED_DATA_ARR].length
// })
// cur_sel_options = topProcOptionList
console.log('传递🚢======', topProcOptionList)
console.log('传递🚢======', topActiveIndex)
console.log('传递🚢======', cur_sel_options)
// console.log('传递🚢======', topProcOptionList)
// console.log('传递🚢======', topActiveIndex)
// console.log('传递🚢======', cur_sel_options)
return (
<View style={list_common_item.sub_box}>
......
......@@ -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