Commit 6cf3dd25 by Denglingling

1、增加顶部【返回】文字;2、修改【手术医院】为【客户名称】;3、过滤【消耗明细】是否提过消耗数据;4、修改【历史订单】筛选部分样式;

parent 41e40b76
...@@ -360,7 +360,7 @@ export const list_common_item = { ...@@ -360,7 +360,7 @@ export const list_common_item = {
}, },
lef_btn: { lef_btn: {
backgroundColor: '#4F4F4F', backgroundColor: '#4F4F4F',
width: '66%', width: '65%',
borderTopLeftRadius: 10, borderTopLeftRadius: 10,
borderBottomLeftRadius: 10, borderBottomLeftRadius: 10,
height: 50 height: 50
...@@ -374,7 +374,7 @@ export const list_common_item = { ...@@ -374,7 +374,7 @@ export const list_common_item = {
}, },
rig_btn: { rig_btn: {
backgroundColor: promary_color, backgroundColor: promary_color,
width: '34%', width: '35%',
borderTopRightRadius: 10, borderTopRightRadius: 10,
borderBottomRightRadius: 10, borderBottomRightRadius: 10,
height: 50 height: 50
......
...@@ -12,7 +12,8 @@ import { ...@@ -12,7 +12,8 @@ import {
title_text_color, title_text_color,
font_family_regular, font_family_regular,
pxSize, pxSize,
Width Width,
icon_style
} from '../../base/BaseStyle'; } from '../../base/BaseStyle';
class HeadBackItem extends Component { class HeadBackItem extends Component {
...@@ -22,13 +23,10 @@ class HeadBackItem extends Component { ...@@ -22,13 +23,10 @@ class HeadBackItem extends Component {
} }
goBack() { goBack() {
// console.warn('返回!=====')
// console.warn(this.props)
this.props.navigation.goBack() this.props.navigation.goBack()
} }
render() { render() {
// console.warn(this.props)
let {title} = this.props let {title} = this.props
return ( return (
<View style={styles.header_style}> <View style={styles.header_style}>
...@@ -38,10 +36,11 @@ class HeadBackItem extends Component { ...@@ -38,10 +36,11 @@ class HeadBackItem extends Component {
onPress={() => this.goBack()} onPress={() => this.goBack()}
> >
<View style={styles.back_style}> <View style={styles.back_style}>
<Image source={require('../../images/arrow_icon.png')} style={styles.back_style_img}/> <Image source={require('../../images/arrow_icon.png')} style={icon_style}/>
</View> </View>
<Text style={styles.back_tip}>返回</Text>
</TouchableOpacity> </TouchableOpacity>
<Text style={styles.title_style}>{title}</Text> <Text style={styles.title_style} numberOfLines={1} ellipsizeMode={'tail'}>{title}</Text>
</View> </View>
); );
} }
...@@ -54,24 +53,28 @@ const styles = StyleSheet.create({ ...@@ -54,24 +53,28 @@ const styles = StyleSheet.create({
width: Width(), width: Width(),
backgroundColor: promary_color, backgroundColor: promary_color,
alignItems: 'center', alignItems: 'center',
justifyContent: 'flex-start', justifyContent: 'space-between',
paddingLeft: '5%' paddingLeft: '5%'
}, },
head_img_box: { head_img_box: {
width: 40, flexDirection: 'row',
alignItems: 'flex-start', alignItems: 'center',
justifyContent: 'flex-start' justifyContent: 'flex-start'
}, },
back_style: { back_style: {
width: pxSize(18), width: pxSize(11),
height: pxSize(18) height: pxSize(18)
}, },
back_style_img: { back_tip: {
resizeMode: 'contain', fontSize: 18,
width: '100%' color: title_text_color,
fontFamily: font_family_regular,
paddingLeft: 4
}, },
title_style: { title_style: {
width: Width() - 120, flex: 1,
marginLeft: 30,
marginRight: 66,
textAlign: 'center', textAlign: 'center',
fontSize: 18, fontSize: 18,
color: title_text_color, color: title_text_color,
......
...@@ -84,7 +84,7 @@ class EquipConsuPage extends Component { ...@@ -84,7 +84,7 @@ class EquipConsuPage extends Component {
}, },
{ {
"id": "2", "id": "2",
title: '手术医院', title: '客户名称',
name: '请选择', name: '请选择',
value: '', value: '',
isPicker: true, isPicker: true,
...@@ -223,7 +223,7 @@ class EquipConsuPage extends Component { ...@@ -223,7 +223,7 @@ class EquipConsuPage extends Component {
// seller_code: '', // 用户名username ?? 没有用户名 // seller_code: '', // 用户名username ?? 没有用户名
org_code: '', // 组织 org_code: '', // 组织
surgery_collect_number: '', // 订单信息 ?? 没有手术医院 surgery_collect_number: '', // 订单信息 ?? 没有客户名称
consume_date: '', // 消耗时间 consume_date: '', // 消耗时间
patient_name: '', // 患者姓名 patient_name: '', // 患者姓名
patient_gender: '', // 性别 patient_gender: '', // 性别
...@@ -282,7 +282,6 @@ class EquipConsuPage extends Component { ...@@ -282,7 +282,6 @@ class EquipConsuPage extends Component {
// 赋值销售员 // 赋值销售员
getSellerName() { getSellerName() {
let {state, props} = this let {state, props} = this
// console.log('---userInfo',props.userInfo)
let {listOptionData} = this.state let {listOptionData} = this.state
this.setState({ this.setState({
subInitListOption: cloneObject(listOptionData) // 存储初始化数据,提交成功后赋此值 subInitListOption: cloneObject(listOptionData) // 存储初始化数据,提交成功后赋此值
...@@ -311,8 +310,6 @@ class EquipConsuPage extends Component { ...@@ -311,8 +310,6 @@ class EquipConsuPage extends Component {
let { equip_list_status, loginState, navigation, subDetOption, submit_equip_order_status} = this.props let { equip_list_status, loginState, navigation, subDetOption, submit_equip_order_status} = this.props
let self = this let self = this
if(equip_list_status != nextProps.equip_list_status) { if(equip_list_status != nextProps.equip_list_status) {
console.log('-222------', nextProps.equip_list_status)
console.log('--222---equip_list_status--', equip_list_status)
switch (nextProps.equip_list_status) { switch (nextProps.equip_list_status) {
case EQUIP_CONSU_LIST_DOING: case EQUIP_CONSU_LIST_DOING:
this.changeSubLoding(true) this.changeSubLoding(true)
...@@ -332,7 +329,6 @@ class EquipConsuPage extends Component { ...@@ -332,7 +329,6 @@ class EquipConsuPage extends Component {
break; break;
} }
} }
console.log('-----nextProps.loginState----', nextProps.loginState, loginState)
if(loginState != nextProps.loginState) { if(loginState != nextProps.loginState) {
switch(nextProps.loginState) { switch(nextProps.loginState) {
case LOGIN_NO: case LOGIN_NO:
...@@ -342,9 +338,7 @@ class EquipConsuPage extends Component { ...@@ -342,9 +338,7 @@ class EquipConsuPage extends Component {
break; break;
} }
} }
// console.log('!!=========单价填完啦??', nextProps, subDetOption)
if(subDetOption != nextProps.subDetOption) { if(subDetOption != nextProps.subDetOption) {
console.log('!!=========单价填完啦??', nextProps.subDetOption)
let {listOptionData} = this.state let {listOptionData} = this.state
listOptionData[12].subOption = nextProps.subDetOption listOptionData[12].subOption = nextProps.subDetOption
this.setState({ this.setState({
...@@ -354,8 +348,6 @@ class EquipConsuPage extends Component { ...@@ -354,8 +348,6 @@ class EquipConsuPage extends Component {
}) })
} }
if(submit_equip_order_status != nextProps.submit_equip_order_status) { if(submit_equip_order_status != nextProps.submit_equip_order_status) {
// console.warn('-submit_equip_order_status------', nextProps.submit_equip_order_status)
// console.warn('--222---submit_equip_order_status--', submit_equip_order_status)
switch (nextProps.submit_equip_order_status) { switch (nextProps.submit_equip_order_status) {
case EQUIP_SUBMIT_DOING: case EQUIP_SUBMIT_DOING:
this.changeSubLoding(true, '提交中') this.changeSubLoding(true, '提交中')
...@@ -437,7 +429,6 @@ class EquipConsuPage extends Component { ...@@ -437,7 +429,6 @@ class EquipConsuPage extends Component {
break break
} }
} }
// console.log('tempStatus====',tempStatus)
this.setState({ this.setState({
canSubFlag: !tempStatus canSubFlag: !tempStatus
}) })
...@@ -448,24 +439,22 @@ class EquipConsuPage extends Component { ...@@ -448,24 +439,22 @@ class EquipConsuPage extends Component {
// 选择器弹窗回调函数 // 选择器弹窗回调函数
handleCallBack(item, itemTitle) { handleCallBack(item, itemTitle) {
console.warn(item, 'item--选择器弹窗回调函数----') // console.warn(item, 'item--选择器弹窗回调函数----')
console.warn('item-itemTitle-----',itemTitle) // console.warn('item-itemTitle-----',itemTitle)
let { listOptionData} = this.state let { listOptionData} = this.state
let self = this let self = this
this.setState({ this.setState({
currentItem: item, currentItem: item,
}) })
this.setState({ this.setState({
listOptionData: listOptionData.map((chItem, index) => { listOptionData: listOptionData.map((chItem) => {
if(chItem.title === itemTitle) { if(chItem.title === itemTitle) {
console.warn('---hhh-----', item)
chItem.name = item.name chItem.name = item.name
chItem.value = item.value chItem.value = item.value
if(itemTitle === '组织') { if(itemTitle === '组织') {
self.clearInitNameAndValue(1) self.clearInitNameAndValue(1)
} }
if(itemTitle === '手术医院') { if(itemTitle === '客户名称') {
self.clearInitNameAndValue(2) self.clearInitNameAndValue(2)
} }
if(itemTitle === '订单信息') { if(itemTitle === '订单信息') {
...@@ -477,8 +466,6 @@ class EquipConsuPage extends Component { ...@@ -477,8 +466,6 @@ class EquipConsuPage extends Component {
}, () => { }, () => {
self.changeCanSub() self.changeCanSub()
}) })
console.warn('listOptionData[2]-----',this.state.listOptionData[2])
} }
// 关闭弹窗 // 关闭弹窗
...@@ -492,7 +479,7 @@ class EquipConsuPage extends Component { ...@@ -492,7 +479,7 @@ class EquipConsuPage extends Component {
changeCurrentOption() { changeCurrentOption() {
let { currentTitle } = this.state let { currentTitle } = this.state
let { equipOrderOption } = this.props let { equipOrderOption } = this.props
console.log('当前:--equipOrderOption---', equipOrderOption) // console.log('当前:--equipOrderOption---', equipOrderOption)
let tempOption = [] let tempOption = []
if(equipOrderOption.length === 0) { if(equipOrderOption.length === 0) {
show(`当前${currentTitle}为空`) show(`当前${currentTitle}为空`)
...@@ -500,8 +487,7 @@ class EquipConsuPage extends Component { ...@@ -500,8 +487,7 @@ class EquipConsuPage extends Component {
} }
if (currentTitle === '组织') { if (currentTitle === '组织') {
tempOption = this.changeNameAndValue(equipOrderOption, 'org_name', 'org_code') tempOption = this.changeNameAndValue(equipOrderOption, 'org_name', 'org_code')
} else if (currentTitle === '手术医院') { } else if (currentTitle === '客户名称') {
// console.log('----equipOrderOption----', equipOrderOption)
// 去重医院数据 // 去重医院数据
let filterOpt = dedupQuoteArray(equipOrderOption, 'customer_code') let filterOpt = dedupQuoteArray(equipOrderOption, 'customer_code')
let currentArr = [] let currentArr = []
...@@ -517,8 +503,6 @@ class EquipConsuPage extends Component { ...@@ -517,8 +503,6 @@ class EquipConsuPage extends Component {
tempOption = this.changeNameAndValue(currentArr, 'customer_name', 'customer_code') tempOption = this.changeNameAndValue(currentArr, 'customer_name', 'customer_code')
} else if (currentTitle === '订单信息') { } else if (currentTitle === '订单信息') {
console.log('momentvmoment------', moment("2020-04-22T14:17:56").format("YYYY-MM-DD HH:mm:ss"))
let resultArr = [] let resultArr = []
equipOrderOption.forEach(item => { equipOrderOption.forEach(item => {
let obj = {} let obj = {}
...@@ -532,7 +516,6 @@ class EquipConsuPage extends Component { ...@@ -532,7 +516,6 @@ class EquipConsuPage extends Component {
}) })
tempOption = [...resultArr] tempOption = [...resultArr]
// tempOption = this.changeNameAndValue(equipOrderOption, 'value_name', 'value_code')
} }
this.setState({ this.setState({
showTypePop: true, showTypePop: true,
...@@ -554,7 +537,7 @@ class EquipConsuPage extends Component { ...@@ -554,7 +537,7 @@ class EquipConsuPage extends Component {
// 组织 点击 // 组织 点击
handleOrganizationCheck() { handleOrganizationCheck() {
console.warn('组织------check') // console.warn('组织------check')
let { state, props } = this let { state, props } = this
this.setState({ this.setState({
currentTitle: '组织', currentTitle: '组织',
...@@ -570,14 +553,14 @@ class EquipConsuPage extends Component { ...@@ -570,14 +553,14 @@ class EquipConsuPage extends Component {
}) })
} }
// 手术医院 点击 // 客户名称 点击
handleCustomerCheck() { handleCustomerCheck() {
console.warn('手术医院------check') // console.warn('客户名称------check')
let { state, props } = this let { state, props } = this
let self = this let self = this
if(this.judgeOrgIsNull()) { if(this.judgeOrgIsNull()) {
self.setState({ self.setState({
currentTitle: '手术医院', currentTitle: '客户名称',
currentItem: { currentItem: {
name: state.listOptionData[2].name, name: state.listOptionData[2].name,
value: state.listOptionData[2].value value: state.listOptionData[2].value
...@@ -589,7 +572,7 @@ class EquipConsuPage extends Component { ...@@ -589,7 +572,7 @@ class EquipConsuPage extends Component {
} }
} }
// 获取手术医院 // 获取客户名称
getCustomerData() { getCustomerData() {
let { state, props } = this let { state, props } = this
let params = { let params = {
...@@ -597,13 +580,12 @@ class EquipConsuPage extends Component { ...@@ -597,13 +580,12 @@ class EquipConsuPage extends Component {
org_code: state.listOptionData[1].value, org_code: state.listOptionData[1].value,
seller_code: props.userInfo.user_name seller_code: props.userInfo.user_name
} }
console.log('-----params---', params)
props.requestEquipSurgeryHospital(params) props.requestEquipSurgeryHospital(params)
} }
// 订单信息 点击 // 订单信息 点击
handleOrderInfoCheck() { handleOrderInfoCheck() {
console.warn('订单信息------check') // console.warn('订单信息------check')
let { state, props } = this let { state, props } = this
let that = this let that = this
if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) { if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
...@@ -628,9 +610,10 @@ class EquipConsuPage extends Component { ...@@ -628,9 +610,10 @@ class EquipConsuPage extends Component {
// 消耗时间 点击 // 消耗时间 点击
handleEquipDateCheck() { handleEquipDateCheck() {
console.warn('消耗时间------check') // console.warn('消耗时间------check')
let { listOptionData } = this.state let { listOptionData } = this.state
let date = listOptionData[8].value let date = listOptionData[4].value
console.log('date-----', date)
if(date) { if(date) {
this.setState({ this.setState({
listOptionData: listOptionData.map((item, index) => { listOptionData: listOptionData.map((item, index) => {
...@@ -640,7 +623,6 @@ class EquipConsuPage extends Component { ...@@ -640,7 +623,6 @@ class EquipConsuPage extends Component {
return item return item
}) })
}) })
console.warn('!date----', listOptionData[8])
} }
this.closeDateModal(true) this.closeDateModal(true)
} }
...@@ -654,7 +636,7 @@ class EquipConsuPage extends Component { ...@@ -654,7 +636,7 @@ class EquipConsuPage extends Component {
// 修改当前日期数据 // 修改当前日期数据
dateModalCallback(date) { dateModalCallback(date) {
console.warn('callback',date) // console.warn('callback',date)
let { listOptionData } = this.state let { listOptionData } = this.state
let self = this let self = this
this.setState({ this.setState({
...@@ -669,12 +651,11 @@ class EquipConsuPage extends Component { ...@@ -669,12 +651,11 @@ class EquipConsuPage extends Component {
},() => { },() => {
self.changeCanSub() self.changeCanSub()
}) })
console.warn('--手术类时间---', listOptionData[8])
} }
// 患者姓名 输入 // 患者姓名 输入
handlePatNameInput(text) { handlePatNameInput(text) {
console.warn('患者姓名------input:', text) // console.warn('患者姓名------input:', text)
let { listOptionData } = this.state let { listOptionData } = this.state
let self = this let self = this
this.setState({ this.setState({
...@@ -691,7 +672,7 @@ class EquipConsuPage extends Component { ...@@ -691,7 +672,7 @@ class EquipConsuPage extends Component {
// 性别 点击 // 性别 点击
handleGenderCheck() { handleGenderCheck() {
console.warn('性别------check:') // console.warn('性别------check:')
let { listOptionData, sexTypeOption } = this.state let { listOptionData, sexTypeOption } = this.state
let self = this let self = this
if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) { if(this.judgeOrgIsNull() && this.judgeCustomerIsNull()) {
...@@ -838,7 +819,7 @@ class EquipConsuPage extends Component { ...@@ -838,7 +819,7 @@ class EquipConsuPage extends Component {
// 添加图片 点击 // 添加图片 点击
handleAddPicCheck() { handleAddPicCheck() {
console.warn('添加图片------check') // console.warn('添加图片------check')
let { localPhoOption, listOptionData } = this.state let { localPhoOption, listOptionData } = this.state
let { props } = this let { props } = this
let that = this let that = this
...@@ -866,7 +847,6 @@ class EquipConsuPage extends Component { ...@@ -866,7 +847,6 @@ class EquipConsuPage extends Component {
}; };
ImagePicker.showImagePicker(options, async (res) => { ImagePicker.showImagePicker(options, async (res) => {
console.log('res00000-----------------', res)
if (res.didCancel) { if (res.didCancel) {
console.log('User cancelled photo picker'); console.log('User cancelled photo picker');
} }
...@@ -908,16 +888,13 @@ class EquipConsuPage extends Component { ...@@ -908,16 +888,13 @@ class EquipConsuPage extends Component {
const formData = new FormData(); const formData = new FormData();
let file = { uri: source, type: 'multipart/form-data', name: res.fileName }; let file = { uri: source, type: 'multipart/form-data', name: res.fileName };
formData.append('file',file); formData.append('file',file);
// console.log('formData112===',formData)
let params = { let params = {
access_token: props.token, access_token: props.token,
formData formData
} }
let {global_domain_config} = props let {global_domain_config} = props
//上传图片接口 //上传图片接口
// console.log('---handleSubmit--',params)
let imgResult = await uploadEquipImg(global_domain_config, params); let imgResult = await uploadEquipImg(global_domain_config, params);
// console.log('返回---imgResult======',imgResult)
if(imgResult.error_code == 0) { if(imgResult.error_code == 0) {
that.changeSubLoding(false) that.changeSubLoding(false)
// 提交订单 // 提交订单
...@@ -960,7 +937,7 @@ class EquipConsuPage extends Component { ...@@ -960,7 +937,7 @@ class EquipConsuPage extends Component {
// 生成订单 点击 // 生成订单 点击
handleSubmit() { handleSubmit() {
console.warn('生成订单------check') // console.warn('生成订单------check')
this.changeCanSub(true) this.changeCanSub(true)
let { state, props } = this let { state, props } = this
...@@ -973,7 +950,7 @@ class EquipConsuPage extends Component { ...@@ -973,7 +950,7 @@ class EquipConsuPage extends Component {
// 可提交 并且 不处于正在提交中 // 可提交 并且 不处于正在提交中
if(state.canSubFlag && !state.isSubLoding) { if(state.canSubFlag && !state.isSubLoding) {
console.warn('进入提交内容----!!------') // console.warn('进入提交内容----!!------')
let tempSubOption = state.submitOption let tempSubOption = state.submitOption
tempSubOption.org_code = state.listOptionData[1].value tempSubOption.org_code = state.listOptionData[1].value
tempSubOption.surgery_collect_number = state.listOptionData[3].value tempSubOption.surgery_collect_number = state.listOptionData[3].value
...@@ -993,8 +970,6 @@ class EquipConsuPage extends Component { ...@@ -993,8 +970,6 @@ class EquipConsuPage extends Component {
}) })
} }
tempSubOption.img_url = state.listOptionData[13].uploadImgArr.join(',') tempSubOption.img_url = state.listOptionData[13].uploadImgArr.join(',')
console.log('tempSubOption-----', tempSubOption)
let params = { let params = {
access_token: props.token, access_token: props.token,
data: { ...tempSubOption } data: { ...tempSubOption }
...@@ -1008,7 +983,7 @@ class EquipConsuPage extends Component { ...@@ -1008,7 +983,7 @@ class EquipConsuPage extends Component {
return this.showTipFirstSelect(1) return this.showTipFirstSelect(1)
} }
// 判断手术医院是否为空 // 判断客户名称是否为空
judgeCustomerIsNull() { judgeCustomerIsNull() {
return this.showTipFirstSelect(2) return this.showTipFirstSelect(2)
} }
...@@ -1034,7 +1009,6 @@ class EquipConsuPage extends Component { ...@@ -1034,7 +1009,6 @@ class EquipConsuPage extends Component {
processReturnData() { processReturnData() {
// 打开下单成功页面 // 打开下单成功页面
let { equipOrderOption } = this.props let { equipOrderOption } = this.props
console.log('submit --- !!!! --- 当前:--返回成功的数据---', equipOrderOption)
if(equipOrderOption.error_code == 0) { if(equipOrderOption.error_code == 0) {
this.clearAllData() // 清空数据 this.clearAllData() // 清空数据
let { state: { params: { title } } } = this.props.navigation let { state: { params: { title } } } = this.props.navigation
...@@ -1099,7 +1073,7 @@ class EquipConsuPage extends Component { ...@@ -1099,7 +1073,7 @@ class EquipConsuPage extends Component {
> >
<CellTextStyle> <CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle> <AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'手术医院'}</TitleTextStyle> <TitleTextStyle>{'客户名称'}</TitleTextStyle>
<ContTextStyle>{listOptionData[2].name}</ContTextStyle> <ContTextStyle>{listOptionData[2].name}</ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
</CellTextStyle> </CellTextStyle>
...@@ -1284,7 +1258,6 @@ class EquipConsuPage extends Component { ...@@ -1284,7 +1258,6 @@ class EquipConsuPage extends Component {
currentTitle, currentTitle,
showTypePop, showTypePop,
} = this.state } = this.state
// console.warn('弹窗-----,', listCurrentOption)
return ( return (
<SafeAreaView style={styles.item_container}> <SafeAreaView style={styles.item_container}>
<DialogModel <DialogModel
......
...@@ -122,8 +122,12 @@ class ConsumDetailsPage extends Component { ...@@ -122,8 +122,12 @@ class ConsumDetailsPage extends Component {
let detailResult = await requestEquipDetails(global_domain_config, params) let detailResult = await requestEquipDetails(global_domain_config, params)
if(detailResult.error_code === 0) { if(detailResult.error_code === 0) {
let {lines} = detailResult.data let {lines} = detailResult.data
// 需要过滤已提过消耗的数据 raised_consume="Y"
lines = lines.filter((fiItem) => {
return fiItem.raised_consume != 'Y'
})
let {subDetOption} = this.props // 【器械消耗】已存在的明细 let {subDetOption} = this.props // 【器械消耗】已存在的明细
console.log('subDetOption-----', subDetOption) // console.log('subDetOption-----', subDetOption)
subDetOption.length && subDetOption.forEach((item, index) => { subDetOption.length && subDetOption.forEach((item, index) => {
lines.length && lines.forEach((chItem, chInd) => { lines.length && lines.forEach((chItem, chInd) => {
if(chItem.serial_number == item.serial_number) { if(chItem.serial_number == item.serial_number) {
...@@ -152,7 +156,7 @@ class ConsumDetailsPage extends Component { ...@@ -152,7 +156,7 @@ class ConsumDetailsPage extends Component {
// 搜索 输入 // 搜索 输入
handleSearchInput(text) { handleSearchInput(text) {
console.log('搜索 输入---', text) // console.log('搜索 输入---', text)
let {allConOption} = this.state let {allConOption} = this.state
let self = this let self = this
let tempArr = [] let tempArr = []
...@@ -183,13 +187,13 @@ class ConsumDetailsPage extends Component { ...@@ -183,13 +187,13 @@ class ConsumDetailsPage extends Component {
// 取消选择 // 取消选择
handleCelSelCheck(item, index) { handleCelSelCheck(item, index) {
console.log('取消===cel:', item, index) // console.log('取消===cel:', item, index)
this.changeIsSelected(index, false) this.changeIsSelected(index, false)
} }
// 确定选择 // 确定选择
handleSubSelectedCheck(item, index) { handleSubSelectedCheck(item, index) {
console.log('确定===sub:', item, index) // console.log('确定===sub:', item, index)
this.changeIsSelected(index, true) this.changeIsSelected(index, true)
} }
...@@ -203,7 +207,7 @@ class ConsumDetailsPage extends Component { ...@@ -203,7 +207,7 @@ class ConsumDetailsPage extends Component {
this.setState({ this.setState({
conDetaOption conDetaOption
},() => { },() => {
console.log('conDetaOption---修改-', conDetaOption) // console.log('conDetaOption---修改-', conDetaOption)
let tempArr = [] let tempArr = []
conDetaOption.forEach(item => { conDetaOption.forEach(item => {
if(item.select) { if(item.select) {
...@@ -218,7 +222,7 @@ class ConsumDetailsPage extends Component { ...@@ -218,7 +222,7 @@ class ConsumDetailsPage extends Component {
// 已选回调函数 // 已选回调函数
detailsCallbak(subOpt) { detailsCallbak(subOpt) {
console.log('----回调:',subOpt) // console.log('----回调:',subOpt)
let tempOption = [...this.state.conDetaOption] let tempOption = [...this.state.conDetaOption]
// 获取当前已选值 // 获取当前已选值
tempOption = tempOption.map(item => { tempOption = tempOption.map(item => {
...@@ -248,13 +252,13 @@ class ConsumDetailsPage extends Component { ...@@ -248,13 +252,13 @@ class ConsumDetailsPage extends Component {
// 点击 已选 // 点击 已选
handleSubSelected(show) { handleSubSelected(show) {
console.warn('已选:666!!') // console.warn('已选:666!!')
this.handleCloseSelectModal(true) this.handleCloseSelectModal(true)
} }
// 点击 确定耗材 // 点击 确定耗材
handleSubmit() { handleSubmit() {
console.warn('确定耗材', this.props.navigation.navigate) // console.warn('确定耗材', this.props.navigation.navigate)
this.handleCloseSelectModal(false) this.handleCloseSelectModal(false)
let {localSelectOption} = this.state let {localSelectOption} = this.state
if(!localSelectOption.length) { if(!localSelectOption.length) {
...@@ -449,11 +453,10 @@ const styles = StyleSheet.create({ ...@@ -449,11 +453,10 @@ const styles = StyleSheet.create({
fontFamily: font_family_regular fontFamily: font_family_regular
}, },
fot_btn_lef: { fot_btn_lef: {
width: pxSize(220) // width: pxSize(220)
}, },
fot_btn_rig: { fot_btn_rig: {
width: pxSize(120) // width: pxSize(120)
// width: '38%'
}, },
loding_back: { loding_back: {
backgroundColor: 'rgba(0, 0, 0, 0)' backgroundColor: 'rgba(0, 0, 0, 0)'
......
...@@ -15,15 +15,10 @@ import { ...@@ -15,15 +15,10 @@ import {
foundation_color, foundation_color,
promary_color, promary_color,
second_text_color, second_text_color,
third_text_color,
first_text_color, first_text_color,
second_text_size,
Width, Width,
pxSize, pxSize,
dis_sub_color,
safe_view, safe_view,
font_family_medium,
font_family_light,
list_common_item, list_common_item,
icon_style, icon_style,
font_family_regular font_family_regular
...@@ -105,9 +100,9 @@ class DetailsModel extends Component { ...@@ -105,9 +100,9 @@ class DetailsModel extends Component {
} }
} }
// 共计已选 点击 // 已选 点击
handleCloseSelected() { handleCloseSelected() {
console.warn('共计已选:666--model') // console.warn('已选:666--model')
let {contOptionData} = this.state let {contOptionData} = this.state
this.props.callback(contOptionData) this.props.callback(contOptionData)
...@@ -118,7 +113,7 @@ class DetailsModel extends Component { ...@@ -118,7 +113,7 @@ class DetailsModel extends Component {
// 确定耗材 点击 // 确定耗材 点击
handleCloseSubmit() { handleCloseSubmit() {
console.warn('确定耗材--model') // console.warn('确定耗材--model')
this.closeModal() this.closeModal()
this.props.closeSubmit(false) this.props.closeSubmit(false)
} }
...@@ -136,7 +131,7 @@ class DetailsModel extends Component { ...@@ -136,7 +131,7 @@ class DetailsModel extends Component {
* @param {number} index 当前角标 * @param {number} index 当前角标
*/ */
handleDelItemClick(item, index) { handleDelItemClick(item, index) {
console.log('-----删除-----', item, index) // console.log('-----删除-----', item, index)
let { contOptionData } = this.state let { contOptionData } = this.state
contOptionData.splice(index, 1) contOptionData.splice(index, 1)
this.setState({ this.setState({
...@@ -246,7 +241,7 @@ class DetailsModel extends Component { ...@@ -246,7 +241,7 @@ class DetailsModel extends Component {
style={list_common_item.lef_btn} style={list_common_item.lef_btn}
onPress={() => this.handleCloseSelected()} onPress={() => this.handleCloseSelected()}
> >
<Text style={list_common_item.lef_tip}>共计已选:{contOptionData.length}</Text> <Text style={list_common_item.lef_tip}>已选:{contOptionData.length}</Text>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
......
...@@ -24,39 +24,39 @@ class FillUnitPricePage extends Component { ...@@ -24,39 +24,39 @@ class FillUnitPricePage extends Component {
super(props); super(props);
this.state = { this.state = {
unitPriceOption: [ unitPriceOption: [
{ // {
"id": "2", // "id": "2",
item_name: '人工髋关节假体-JS-HB ||| T', // item_name: '人工髋关节假体-JS-HB ||| T',
specification: '3g,Ytg-DG-SZGT', // specification: '3g,Ytg-DG-SZGT',
serial_number: '2001202001001774', // serial_number: '2001202001001774',
sale_price: 90890, // sale_price: 90890,
local_add_price: 90890, // local_add_price: 90890,
select: true // select: true
},{ // },{
"id": "3", // "id": "3",
item_name: '人工髋关节假体-JS-HB ||| T4', // item_name: '人工髋关节假体-JS-HB ||| T4',
specification: '3g,Ytg-DG-SZGT', // specification: '3g,Ytg-DG-SZGT',
serial_number: '2001202001001774', // serial_number: '2001202001001774',
sale_price: 90890, // sale_price: 90890,
local_add_price: 90890, // local_add_price: 90890,
select: true // select: true
},{ // },{
"id": "4", // "id": "4",
item_name: '人工髋关节假体-JS-HB ||| T5', // item_name: '人工髋关节假体-JS-HB ||| T5',
specification: '3g,Ytg-DG-SZGT', // specification: '3g,Ytg-DG-SZGT',
serial_number: '2001202001001774', // serial_number: '2001202001001774',
sale_price: 90890, // sale_price: 90890,
local_add_price: 90890, // local_add_price: 90890,
select: true // select: true
},{ // },{
"id": "5", // "id": "5",
item_name: '人工髋关节假体-JS-HB ||| T6', // item_name: '人工髋关节假体-JS-HB ||| T6',
specification: '3g,Ytg-DG-SZGT', // specification: '3g,Ytg-DG-SZGT',
serial_number: '2001202001001774', // serial_number: '2001202001001774',
sale_price: 90890, // sale_price: 90890,
local_add_price: 90890, // local_add_price: 90890,
select: true // select: true
} // }
] ]
} }
} }
...@@ -68,7 +68,7 @@ class FillUnitPricePage extends Component { ...@@ -68,7 +68,7 @@ class FillUnitPricePage extends Component {
// 获取选择的数据 // 获取选择的数据
getLocalSelectedData() { getLocalSelectedData() {
let {localSelectOption} = this.props.navigation.state.params let {localSelectOption} = this.props.navigation.state.params
console.log('-------localSelectOption--------', localSelectOption) // console.log('-------localSelectOption--------', localSelectOption)
this.setState({ this.setState({
unitPriceOption: localSelectOption unitPriceOption: localSelectOption
}) })
...@@ -76,7 +76,7 @@ class FillUnitPricePage extends Component { ...@@ -76,7 +76,7 @@ class FillUnitPricePage extends Component {
// 每一个元素输入单价 // 每一个元素输入单价
handleItemPriceInput(text, index) { handleItemPriceInput(text, index) {
console.warn('单价------input:', text, index, typeof Number(text)) // console.warn('单价------input:', text, index, typeof Number(text))
let {unitPriceOption} = this.state let {unitPriceOption} = this.state
unitPriceOption[index].local_add_price = Number(text) unitPriceOption[index].local_add_price = Number(text)
this.setState({ this.setState({
...@@ -86,7 +86,7 @@ class FillUnitPricePage extends Component { ...@@ -86,7 +86,7 @@ class FillUnitPricePage extends Component {
// 确定单价 点击 // 确定单价 点击
handleSubmit() { handleSubmit() {
console.warn('确定单价------check:') // console.warn('确定单价------check:')
let {unitPriceOption} = this.state let {unitPriceOption} = this.state
let canSubFlag = true let canSubFlag = true
let {props} = this let {props} = this
...@@ -102,7 +102,7 @@ class FillUnitPricePage extends Component { ...@@ -102,7 +102,7 @@ class FillUnitPricePage extends Component {
this.setState({ this.setState({
unitPriceOption unitPriceOption
}) })
console.log('unitPriceOption====', unitPriceOption) // console.log('unitPriceOption====', unitPriceOption)
// 存储于store中,并跳转 // 存储于store中,并跳转
props.getSubdetailOption(unitPriceOption) props.getSubdetailOption(unitPriceOption)
props.navigation.navigate('EquipConsuPage', { title: '器械消耗' }) props.navigation.navigate('EquipConsuPage', { title: '器械消耗' })
...@@ -129,7 +129,7 @@ class FillUnitPricePage extends Component { ...@@ -129,7 +129,7 @@ class FillUnitPricePage extends Component {
// 返回每一列元素 // 返回每一列元素
renderSubListItem(item, index) { renderSubListItem(item, index) {
console.log('item, index---',item, index) // console.log('item, index---',item, index)
let price = '' let price = ''
if(item.local_add_price) { if(item.local_add_price) {
price = String(item.local_add_price) price = String(item.local_add_price)
......
...@@ -391,7 +391,6 @@ class HistoricalOrderPage extends Component { ...@@ -391,7 +391,6 @@ class HistoricalOrderPage extends Component {
// 赋值销售员 初始化数据 // 赋值销售员 初始化数据
getSellerName() { getSellerName() {
let {state, props} = this let {state, props} = this
// console.log('---userInfo',props.userInfo)
let {borrowListOptionData, consumeListOptionData, transferListOptionData} = this.state let {borrowListOptionData, consumeListOptionData, transferListOptionData} = this.state
this.setState({ this.setState({
subBorrowInitListOption: cloneObject(borrowListOptionData), // 存储初始化数据,重置时付此值 subBorrowInitListOption: cloneObject(borrowListOptionData), // 存储初始化数据,重置时付此值
...@@ -437,8 +436,6 @@ class HistoricalOrderPage extends Component { ...@@ -437,8 +436,6 @@ class HistoricalOrderPage extends Component {
} }
} }
if(histor_search_status != nextProps.histor_search_status) { if(histor_search_status != nextProps.histor_search_status) {
// console.warn('-2------', nextProps.histor_search_status)
// console.warn('--2---histor_search_status--', histor_search_status)
switch (nextProps.histor_search_status) { switch (nextProps.histor_search_status) {
case HISTOR_ORDER_SEARCH_DOING: case HISTOR_ORDER_SEARCH_DOING:
that.changeSubLoding(true, '查询中') that.changeSubLoding(true, '查询中')
...@@ -523,7 +520,6 @@ class HistoricalOrderPage extends Component { ...@@ -523,7 +520,6 @@ class HistoricalOrderPage extends Component {
default: default:
break; break;
} }
// console.log('contOptionData----', contOptionData)
this.setState({ this.setState({
contOptionData contOptionData
}) })
...@@ -551,8 +547,6 @@ class HistoricalOrderPage extends Component { ...@@ -551,8 +547,6 @@ class HistoricalOrderPage extends Component {
// 清空当前项以下的值 // 清空当前项以下的值
clearInitNameAndValue(curIndex) { clearInitNameAndValue(curIndex) {
// let { listOptionData, localOtherObj } = this.state
let { topActiveIndex, borrowListOptionData, consumeListOptionData, localOtherObj} = this.state let { topActiveIndex, borrowListOptionData, consumeListOptionData, localOtherObj} = this.state
switch(topActiveIndex) { switch(topActiveIndex) {
...@@ -592,8 +586,8 @@ class HistoricalOrderPage extends Component { ...@@ -592,8 +586,8 @@ class HistoricalOrderPage extends Component {
// 选择器弹窗回调函数 // 选择器弹窗回调函数
handleCallBack(item, itemTitle) { handleCallBack(item, itemTitle) {
console.warn('item------', item) // console.warn('item------', item)
console.warn('item-itemTitle-----',itemTitle) // console.warn('item-itemTitle-----',itemTitle)
let { topActiveIndex, borrowListOptionData, consumeListOptionData, transferListOptionData} = this.state let { topActiveIndex, borrowListOptionData, consumeListOptionData, transferListOptionData} = this.state
let self = this let self = this
this.setState({ this.setState({
...@@ -601,7 +595,6 @@ class HistoricalOrderPage extends Component { ...@@ -601,7 +595,6 @@ class HistoricalOrderPage extends Component {
}) })
switch(topActiveIndex) { switch(topActiveIndex) {
case 0: case 0:
// borrowListOptionData = self.changeCurrentObj(item, itemTitle, borrowListOptionData)
borrowListOptionData = borrowListOptionData.map((chItem) => { borrowListOptionData = borrowListOptionData.map((chItem) => {
if(chItem.title == itemTitle) { if(chItem.title == itemTitle) {
chItem.name = item.name chItem.name = item.name
...@@ -626,7 +619,6 @@ class HistoricalOrderPage extends Component { ...@@ -626,7 +619,6 @@ class HistoricalOrderPage extends Component {
}) })
break; break;
case 1: case 1:
// consumeListOptionData = self.changeCurrentObj(item, itemTitle, consumeListOptionData)
consumeListOptionData = consumeListOptionData.map((chItem) => { consumeListOptionData = consumeListOptionData.map((chItem) => {
if(chItem.title == itemTitle) { if(chItem.title == itemTitle) {
chItem.name = item.name chItem.name = item.name
...@@ -688,7 +680,7 @@ class HistoricalOrderPage extends Component { ...@@ -688,7 +680,7 @@ class HistoricalOrderPage extends Component {
// 日期选择器回调 // 日期选择器回调
dateModalCallback(date) { dateModalCallback(date) {
console.warn('date------', date) // console.warn('date------', date)
let {topActiveIndex, borrowListOptionData, consumeListOptionData, currentTitle} = this.state let {topActiveIndex, borrowListOptionData, consumeListOptionData, currentTitle} = this.state
switch(topActiveIndex) { switch(topActiveIndex) {
case 0: case 0:
...@@ -722,18 +714,6 @@ class HistoricalOrderPage extends Component { ...@@ -722,18 +714,6 @@ class HistoricalOrderPage extends Component {
borrowListOptionData, borrowListOptionData,
consumeListOptionData consumeListOptionData
}) })
// let { listOptionData } = this.state
// this.setState({
// listOptionData: listOptionData.map((item, index) => {
// if(item.title === '手术类时间') {
// item.name = date
// item.value = date
// item.dateValue = new Date(date)
// }
// return item
// })
// })
// // console.warn('--手术类时间---', listOptionData[8])
} }
// 关闭 日期选择器弹窗 // 关闭 日期选择器弹窗
...@@ -746,7 +726,7 @@ class HistoricalOrderPage extends Component { ...@@ -746,7 +726,7 @@ class HistoricalOrderPage extends Component {
// 状态 - 筛选 // 状态 - 筛选
statusChangeCheck(ind) { statusChangeCheck(ind) {
let {topActiveIndex, borrowListOptionData, consumeListOptionData, transferListOptionData} = this.state let {topActiveIndex, borrowListOptionData, consumeListOptionData, transferListOptionData} = this.state
console.log('筛选 - 状态---', ind, topActiveIndex) // console.log('筛选 - 状态---', ind, topActiveIndex)
switch(topActiveIndex) { switch(topActiveIndex) {
case 0: case 0:
if(borrowListOptionData[0].curStatus.includes(ind)) { if(borrowListOptionData[0].curStatus.includes(ind)) {
...@@ -763,7 +743,6 @@ class HistoricalOrderPage extends Component { ...@@ -763,7 +743,6 @@ class HistoricalOrderPage extends Component {
} else { } else {
consumeListOptionData[0].curStatus.push(ind) consumeListOptionData[0].curStatus.push(ind)
} }
// consumeListOptionData[0].curStatus = ind
break; break;
case 2: case 2:
// transferListOptionData[0].curStatus = ind // transferListOptionData[0].curStatus = ind
...@@ -774,7 +753,7 @@ class HistoricalOrderPage extends Component { ...@@ -774,7 +753,7 @@ class HistoricalOrderPage extends Component {
this.setState({ this.setState({
borrowListOptionData, borrowListOptionData,
consumeListOptionData, consumeListOptionData,
transferListOptionData // transferListOptionData
}) })
} }
...@@ -811,7 +790,7 @@ class HistoricalOrderPage extends Component { ...@@ -811,7 +790,7 @@ class HistoricalOrderPage extends Component {
// 组织 - 筛选 // 组织 - 筛选
handleOrganizationCheck() { handleOrganizationCheck() {
console.log('筛选 - 组织---') // console.log('筛选 - 组织---')
let {props} = this let {props} = this
let that = this let that = this
let tempCurr = this.getCurrentOption(2) let tempCurr = this.getCurrentOption(2)
...@@ -823,7 +802,6 @@ class HistoricalOrderPage extends Component { ...@@ -823,7 +802,6 @@ class HistoricalOrderPage extends Component {
access_token: props.token access_token: props.token
} }
let orgResult = await requestHistorOrganizations(props.global_domain_config, params) let orgResult = await requestHistorOrganizations(props.global_domain_config, params)
console.log('返回---orgResult======', orgResult)
that.changeSubLoding(true) that.changeSubLoding(true)
if(orgResult.error_code == 0) { if(orgResult.error_code == 0) {
that.changeSubLoding(false) that.changeSubLoding(false)
...@@ -853,7 +831,7 @@ class HistoricalOrderPage extends Component { ...@@ -853,7 +831,7 @@ class HistoricalOrderPage extends Component {
// 客户名称 - 筛选 // 客户名称 - 筛选
handleCustomerCheck() { handleCustomerCheck() {
console.log('筛选 - 客户名称---') // console.log('筛选 - 客户名称---')
if(!this.judgeOrgIsNull()) { if(!this.judgeOrgIsNull()) {
return return
} }
...@@ -870,14 +848,13 @@ class HistoricalOrderPage extends Component { ...@@ -870,14 +848,13 @@ class HistoricalOrderPage extends Component {
seller_code: props.userInfo.user_name seller_code: props.userInfo.user_name
} }
let orgResult = await requestHistorSurgeryHospital(props.global_domain_config, params) let orgResult = await requestHistorSurgeryHospital(props.global_domain_config, params)
console.log('返回---orgResult======', orgResult)
that.changeSubLoding(true) that.changeSubLoding(true)
if(orgResult.error_code == 0) { if(orgResult.error_code == 0) {
that.changeSubLoding(false) that.changeSubLoding(false)
// 修改当前选择器数据 // 修改当前选择器数据
let { data: { customers } } = orgResult let { data: { customers } } = orgResult
if(customers.length === 0) { if(customers.length === 0) {
show(`当前手术医院为空`) show(`当前客户名称为空`)
return return
} }
// 去重医院数据 // 去重医院数据
...@@ -912,7 +889,7 @@ class HistoricalOrderPage extends Component { ...@@ -912,7 +889,7 @@ class HistoricalOrderPage extends Component {
// 收单地点 - 筛选 // 收单地点 - 筛选
handleBillCheck() { handleBillCheck() {
console.log('筛选 - 收单地点---') // console.log('筛选 - 收单地点---')
if(!this.judgeOrgIsNull() || !this.judgeCustomerIsNull()) { if(!this.judgeOrgIsNull() || !this.judgeCustomerIsNull()) {
return return
} }
...@@ -938,8 +915,6 @@ class HistoricalOrderPage extends Component { ...@@ -938,8 +915,6 @@ class HistoricalOrderPage extends Component {
}) })
} }
tempOption = dedupQuoteArray(tempOption, 'name') tempOption = dedupQuoteArray(tempOption, 'name')
// console.log('---tempOption========?????-', tempOption)
that.setState({ that.setState({
showTypePop: true, showTypePop: true,
listCurrentOption: [...tempOption] listCurrentOption: [...tempOption]
...@@ -950,7 +925,7 @@ class HistoricalOrderPage extends Component { ...@@ -950,7 +925,7 @@ class HistoricalOrderPage extends Component {
// 收货地点 - 筛选 // 收货地点 - 筛选
handleShipCheck() { handleShipCheck() {
console.log('筛选 - 收货地点---') // console.log('筛选 - 收货地点---')
if(!this.judgeOrgIsNull() || !this.judgeCustomerIsNull()) { if(!this.judgeOrgIsNull() || !this.judgeCustomerIsNull()) {
return return
} }
...@@ -976,8 +951,6 @@ class HistoricalOrderPage extends Component { ...@@ -976,8 +951,6 @@ class HistoricalOrderPage extends Component {
}) })
} }
tempOption = dedupQuoteArray(tempOption, 'name') tempOption = dedupQuoteArray(tempOption, 'name')
// console.log('---tempOption========?????-', tempOption)
that.setState({ that.setState({
showTypePop: true, showTypePop: true,
listCurrentOption: [...tempOption] listCurrentOption: [...tempOption]
...@@ -987,7 +960,7 @@ class HistoricalOrderPage extends Component { ...@@ -987,7 +960,7 @@ class HistoricalOrderPage extends Component {
// 主治医生 - 筛选 // 主治医生 - 筛选
handleDoctorCheck(text) { handleDoctorCheck(text) {
console.log('筛选 - 主治医生---', text) // console.log('筛选 - 主治医生---', text)
if(!this.judgeOrgIsNull() || !this.judgeCustomerIsNull()) { if(!this.judgeOrgIsNull() || !this.judgeCustomerIsNull()) {
return return
} }
...@@ -995,8 +968,8 @@ class HistoricalOrderPage extends Component { ...@@ -995,8 +968,8 @@ class HistoricalOrderPage extends Component {
let that = this let that = this
if(text) { if(text) {
// 输入 // 输入
self.setState({ that.setState({
listOptionData: listOptionData.map(item => { borrowListOptionData: borrowListOptionData.map(item => {
if(item.title === '主治医生') { if(item.title === '主治医生') {
item.inputValue = text item.inputValue = text
} }
...@@ -1004,7 +977,6 @@ class HistoricalOrderPage extends Component { ...@@ -1004,7 +977,6 @@ class HistoricalOrderPage extends Component {
}) })
}) })
} else { } else {
// 增加空组织提示!==========!!!!=======
// 点击 // 点击
that.setState({ that.setState({
currentTitle: '主治医生', currentTitle: '主治医生',
...@@ -1031,8 +1003,6 @@ class HistoricalOrderPage extends Component { ...@@ -1031,8 +1003,6 @@ class HistoricalOrderPage extends Component {
} }
tempOption.push(othObj) tempOption.push(othObj)
tempOption = dedupQuoteArray(tempOption, 'name') tempOption = dedupQuoteArray(tempOption, 'name')
// console.log('---tempOption========?????-', tempOption)
that.setState({ that.setState({
showTypePop: true, showTypePop: true,
listCurrentOption: [...tempOption] listCurrentOption: [...tempOption]
...@@ -1048,7 +1018,7 @@ class HistoricalOrderPage extends Component { ...@@ -1048,7 +1018,7 @@ class HistoricalOrderPage extends Component {
// 手术类型 - 筛选 // 手术类型 - 筛选
handleSurTypeCheck() { handleSurTypeCheck() {
console.log('筛选 - 手术类型---') // console.log('筛选 - 手术类型---')
let {borrowListOptionData, surgeryTypeOption} = this.state let {borrowListOptionData, surgeryTypeOption} = this.state
let that = this let that = this
this.setState({ this.setState({
...@@ -1067,7 +1037,7 @@ class HistoricalOrderPage extends Component { ...@@ -1067,7 +1037,7 @@ class HistoricalOrderPage extends Component {
// 手术时间/消耗时间 - 筛选 // 手术时间/消耗时间 - 筛选
handleSurDateCheck(typeName) { handleSurDateCheck(typeName) {
console.log('筛选 - 手术时间---', typeName) // console.log('筛选 - 手术时间---', typeName)
let {topActiveIndex, borrowListOptionData, consumeListOptionData} = this.state let {topActiveIndex, borrowListOptionData, consumeListOptionData} = this.state
let tempCurTit = '' let tempCurTit = ''
let tempCurDate = new Date() let tempCurDate = new Date()
...@@ -1118,7 +1088,6 @@ class HistoricalOrderPage extends Component { ...@@ -1118,7 +1088,6 @@ class HistoricalOrderPage extends Component {
value_set_code:'SUR_ORDER_TYPE' value_set_code:'SUR_ORDER_TYPE'
} }
let orgResult = await requestHistorOrderType(props.global_domain_config, params) let orgResult = await requestHistorOrderType(props.global_domain_config, params)
console.log('返回---orgResult======', orgResult)
that.changeSubLoding(true) that.changeSubLoding(true)
if(orgResult.error_code == 0) { if(orgResult.error_code == 0) {
that.changeSubLoding(false) that.changeSubLoding(false)
...@@ -1148,7 +1117,7 @@ class HistoricalOrderPage extends Component { ...@@ -1148,7 +1117,7 @@ class HistoricalOrderPage extends Component {
// 患者姓名 - 筛选 // 患者姓名 - 筛选
handlePatNameInput(text) { handlePatNameInput(text) {
console.log('筛选 - 患者姓名---', text) // console.log('筛选 - 患者姓名---', text)
let {consumeListOptionData} = this.state let {consumeListOptionData} = this.state
consumeListOptionData[4].value = text consumeListOptionData[4].value = text
this.setState({ this.setState({
...@@ -1158,7 +1127,7 @@ class HistoricalOrderPage extends Component { ...@@ -1158,7 +1127,7 @@ class HistoricalOrderPage extends Component {
// 病历号 - 筛选 // 病历号 - 筛选
handleRecordNumInput(text) { handleRecordNumInput(text) {
console.log('筛选 - 病历号---', text) // console.log('筛选 - 病历号---', text)
let {consumeListOptionData} = this.state let {consumeListOptionData} = this.state
consumeListOptionData[5].value = text consumeListOptionData[5].value = text
this.setState({ this.setState({
...@@ -1168,7 +1137,7 @@ class HistoricalOrderPage extends Component { ...@@ -1168,7 +1137,7 @@ class HistoricalOrderPage extends Component {
// 床位 - 筛选 // 床位 - 筛选
handleBedInput(text) { handleBedInput(text) {
console.log('筛选 - 床位---', text) // console.log('筛选 - 床位---', text)
let {consumeListOptionData} = this.state let {consumeListOptionData} = this.state
consumeListOptionData[8].value = text consumeListOptionData[8].value = text
this.setState({ this.setState({
...@@ -1178,7 +1147,7 @@ class HistoricalOrderPage extends Component { ...@@ -1178,7 +1147,7 @@ class HistoricalOrderPage extends Component {
// 住院号 - 筛选 // 住院号 - 筛选
handleHospitalNumInput(text) { handleHospitalNumInput(text) {
console.log('筛选 - 住院号---', text) // console.log('筛选 - 住院号---', text)
let {consumeListOptionData} = this.state let {consumeListOptionData} = this.state
consumeListOptionData[9].value = text consumeListOptionData[9].value = text
this.setState({ this.setState({
...@@ -1288,7 +1257,7 @@ class HistoricalOrderPage extends Component { ...@@ -1288,7 +1257,7 @@ class HistoricalOrderPage extends Component {
// 确定 - 筛选 // 确定 - 筛选
handleSubmitCheck(noCloseSel) { handleSubmitCheck(noCloseSel) {
console.log('筛选 - 确定---') // console.log('筛选 - 确定---')
// this.changeSeaColorAct() // this.changeSeaColorAct()
// 有问题 ===============!!!==================== // 有问题 ===============!!!====================
...@@ -1304,23 +1273,16 @@ class HistoricalOrderPage extends Component { ...@@ -1304,23 +1273,16 @@ class HistoricalOrderPage extends Component {
contOptionData contOptionData
} = this.state } = this.state
let {props} = this let {props} = this
// console.log('topActiveIndex-------', topActiveIndex)
// console.log('borrowListOptionData------', borrowListOptionData)
// console.log('consumeListOptionData--------------', consumeListOptionData)
if(!noCloseSel) { if(!noCloseSel) {
this.handleSelectClick() // 关闭筛选 this.handleSelectClick() // 关闭筛选
} }
this.setState({ this.setState({
contOptionData: [] // 清空数据 contOptionData: [] // 清空数据
}) })
let tempSubOption = {} let tempSubOption = {}
let params = { let params = {
access_token: props.token access_token: props.token
} }
switch(topActiveIndex) { switch(topActiveIndex) {
case 0: case 0:
tempSubOption = {...borrowSearchOption} tempSubOption = {...borrowSearchOption}
...@@ -1348,12 +1310,10 @@ class HistoricalOrderPage extends Component { ...@@ -1348,12 +1310,10 @@ class HistoricalOrderPage extends Component {
tempSubOption.surgery_date_to = borrowListOptionData[9].value tempSubOption.surgery_date_to = borrowListOptionData[9].value
tempSubOption.order_type_code = borrowListOptionData[10].value tempSubOption.order_type_code = borrowListOptionData[10].value
params = Object.assign({}, params, tempSubOption) params = Object.assign({}, params, tempSubOption)
// console.log('------> params ------> ', params )
props.requestGetAllBorrow(params) props.requestGetAllBorrow(params)
break; break;
case 1: case 1:
tempSubOption = {...consumeSearchOption} tempSubOption = {...consumeSearchOption}
console.log(consumeListOptionData[0].curStatus, consumeListOptionData[0].curStatus.length)
if(consumeListOptionData[0].curStatus.length == 1) { if(consumeListOptionData[0].curStatus.length == 1) {
let ind = consumeListOptionData[0].curStatus[0] let ind = consumeListOptionData[0].curStatus[0]
tempSubOption.consumed_flag = searchComsumeStatus[ind] tempSubOption.consumed_flag = searchComsumeStatus[ind]
...@@ -1371,7 +1331,6 @@ class HistoricalOrderPage extends Component { ...@@ -1371,7 +1331,6 @@ class HistoricalOrderPage extends Component {
tempSubOption.hospitalization_number = consumeListOptionData[9].value tempSubOption.hospitalization_number = consumeListOptionData[9].value
tempSubOption.settled_flag = consumeListOptionData[10].isRedio tempSubOption.settled_flag = consumeListOptionData[10].isRedio
params = Object.assign({}, params, tempSubOption) params = Object.assign({}, params, tempSubOption)
// console.log('------> params ------> ', params )
props.requestGetAllConsume(params) props.requestGetAllConsume(params)
break; break;
case 2: case 2:
...@@ -1512,6 +1471,7 @@ class HistoricalOrderPage extends Component { ...@@ -1512,6 +1471,7 @@ class HistoricalOrderPage extends Component {
activeOpacity={1} activeOpacity={1}
style={styles.top_touch_cont} style={styles.top_touch_cont}
onPress={() => this.handleTopNav(item, index)} onPress={() => this.handleTopNav(item, index)}
key={index}
> >
<View style={[ <View style={[
styles.top_inner, styles.top_inner,
...@@ -1707,6 +1667,7 @@ class HistoricalOrderPage extends Component { ...@@ -1707,6 +1667,7 @@ class HistoricalOrderPage extends Component {
placeholderTextColor = {placehold_text_color} placeholderTextColor = {placehold_text_color}
underlineColorAndroid = {'transparent'} underlineColorAndroid = {'transparent'}
onChangeText={(text) => this.handleDoctorCheck(text)} onChangeText={(text) => this.handleDoctorCheck(text)}
defaultValue={borrowListOptionData[6].inputValue}
/> />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
...@@ -2158,7 +2119,7 @@ class HistoricalOrderPage extends Component { ...@@ -2158,7 +2119,7 @@ class HistoricalOrderPage extends Component {
// 返回日期选择器 // 返回日期选择器
renderDateModel() { renderDateModel() {
let { currentDateVal, dateModelPop } = this.state let { currentDateVal, dateModelPop } = this.state
console.warn('弹窗--日期---,', currentDateVal) // console.warn('弹窗--日期---,', currentDateVal)
return ( return (
<DateModel <DateModel
date={currentDateVal} date={currentDateVal}
...@@ -2178,7 +2139,7 @@ class HistoricalOrderPage extends Component { ...@@ -2178,7 +2139,7 @@ class HistoricalOrderPage extends Component {
currentTitle, currentTitle,
showTypePop, showTypePop,
} = this.state } = this.state
console.warn('弹窗--选择器---,', listCurrentOption) // console.warn('弹窗--选择器---,', listCurrentOption)
return ( return (
<SafeAreaView style={styles.item_container}> <SafeAreaView style={styles.item_container}>
<DialogModel <DialogModel
...@@ -2205,12 +2166,11 @@ class HistoricalOrderPage extends Component { ...@@ -2205,12 +2166,11 @@ class HistoricalOrderPage extends Component {
} }
return ( return (
<View style={styles.cont_list_item}> <View style={styles.cont_list_item} key={index}>
<TouchableOpacity <TouchableOpacity
activeOpacity={.7} activeOpacity={.7}
style={styles.cont_list_box} style={styles.cont_list_box}
onPress={() => this.openLinePage(item, index)} onPress={() => this.openLinePage(item, index)}
key={index}
> >
<View style={styles.cont_lef}> <View style={styles.cont_lef}>
<Text style={styles.cont_lef_tit}> <Text style={styles.cont_lef_tit}>
...@@ -2430,7 +2390,7 @@ const styles = StyleSheet.create({ ...@@ -2430,7 +2390,7 @@ const styles = StyleSheet.create({
qui_cell: { qui_cell: {
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', alignItems: 'center',
marginTop: 10 marginTop: 12
}, },
qui_cell_tit: { qui_cell_tit: {
color: first_text_color, color: first_text_color,
...@@ -2439,7 +2399,7 @@ const styles = StyleSheet.create({ ...@@ -2439,7 +2399,7 @@ const styles = StyleSheet.create({
width: 80 width: 80
}, },
qui_cell_rig: { qui_cell_rig: {
height: pxHeight(52), height: 40,
flex: 1, flex: 1,
backgroundColor: foundation_color, backgroundColor: foundation_color,
flexDirection: 'row', flexDirection: 'row',
...@@ -2459,7 +2419,7 @@ const styles = StyleSheet.create({ ...@@ -2459,7 +2419,7 @@ const styles = StyleSheet.create({
marginLeft: 6 marginLeft: 6
}, },
qui_cell_inp: { qui_cell_inp: {
height: pxHeight(52), height: 40,
flex: 1, flex: 1,
backgroundColor: foundation_color, backgroundColor: foundation_color,
flexDirection: 'row', flexDirection: 'row',
...@@ -2470,7 +2430,7 @@ const styles = StyleSheet.create({ ...@@ -2470,7 +2430,7 @@ const styles = StyleSheet.create({
cell_rig_input: { cell_rig_input: {
flex: 1, flex: 1,
lineHeight: 18, lineHeight: 18,
height: pxHeight(60), // height: 40,
color: first_text_color color: first_text_color
}, },
btn_radio_box: { btn_radio_box: {
......
...@@ -21,7 +21,7 @@ import { ...@@ -21,7 +21,7 @@ import {
import { exitLoginStatus } from '../../action/LoginAction'; import { exitLoginStatus } from '../../action/LoginAction';
import HeadBackItem from '../common/HeadBackItem'; import HeadBackItem from '../common/HeadBackItem';
import StatusBarView from '../common/StatusBarView'; import StatusBarView from '../common/StatusBarView';
import ScrollableTabView, { DefaultTabBar } from 'react-native-scrollable-tab-view'; import ScrollableTabView from 'react-native-scrollable-tab-view';
import TabBottomItem from './module/TabBottomItem'; import TabBottomItem from './module/TabBottomItem';
class HomePage extends Component { class HomePage extends Component {
...@@ -85,11 +85,12 @@ class HomePage extends Component { ...@@ -85,11 +85,12 @@ class HomePage extends Component {
switchTabView(obj) { switchTabView(obj) {
console.log('切换===',obj) console.log('切换===',obj)
if(obj.i == 1) { if(obj.i == 1) {
// 跳转到历史订单页面
this.props.navigation.navigate('HistoricalOrderPage', {title: '历史订单'})
this.setState({ this.setState({
initialPage: 0 initialPage: 0
}) })
// 跳转到历史订单页面
this.props.navigation.navigate('HistoricalOrderPage', {title: '历史订单'})
} }
} }
...@@ -126,7 +127,6 @@ class HomePage extends Component { ...@@ -126,7 +127,6 @@ class HomePage extends Component {
tabBarPosition='bottom' tabBarPosition='bottom'
locked={true} locked={true}
renderTabBar={() => renderTabBar={() =>
// <DefaultTabBar />
<TabBottomItem <TabBottomItem
tabNames={tabNames} tabNames={tabNames}
tabIconNames={tabIconNames} tabIconNames={tabIconNames}
...@@ -135,7 +135,6 @@ class HomePage extends Component { ...@@ -135,7 +135,6 @@ class HomePage extends Component {
} }
onChangeTab={(obj) => this.switchTabView(obj)} onChangeTab={(obj) => this.switchTabView(obj)}
> >
{/* <Text tabLabel={tabNames[0]}>My</Text> */}
<View style={styles.home_cont} tabLabel={tabNames[0]}> <View style={styles.home_cont} tabLabel={tabNames[0]}>
{ {
this.state.showList.map((item, index) => this.state.showList.map((item, index) =>
......
...@@ -83,7 +83,7 @@ class EquipConsuPage extends Component { ...@@ -83,7 +83,7 @@ class EquipConsuPage extends Component {
}, },
{ {
"id": "2", "id": "2",
title: '手术医院', title: '客户名称',
name: '请选择', name: '请选择',
value: '', value: '',
isPicker: true, isPicker: true,
...@@ -170,7 +170,7 @@ class EquipConsuPage extends Component { ...@@ -170,7 +170,7 @@ class EquipConsuPage extends Component {
submitOption: { // 提交的信息 submitOption: { // 提交的信息
seller_code: '', // 用户名username seller_code: '', // 用户名username
org_code: '', // 组织 org_code: '', // 组织
customer_code: '', // 手术医院 customer_code: '', // 客户名称
bill_to_site_code: '', // 收单地点 bill_to_site_code: '', // 收单地点
ship_to_site_code: '', // 收货地点 ship_to_site_code: '', // 收货地点
doctor_name: '', // 主治医生 doctor_name: '', // 主治医生
...@@ -219,7 +219,7 @@ class EquipConsuPage extends Component { ...@@ -219,7 +219,7 @@ class EquipConsuPage extends Component {
pause: false, //录音是否暂停 pause: false, //录音是否暂停
stop: false, //录音是否停止 stop: false, //录音是否停止
currentTime: 0, //录音时长 currentTime: 0, //录音时长
localCustomersOption: [], // 当前医院信息:手术医院、收单地点、收货地点、主治医生 localCustomersOption: [], // 当前医院信息:客户名称、收单地点、收货地点、主治医生
surgeryTypeOption: [ surgeryTypeOption: [
{ {
name:'创伤', name:'创伤',
...@@ -237,7 +237,6 @@ class EquipConsuPage extends Component { ...@@ -237,7 +237,6 @@ class EquipConsuPage extends Component {
value:'运动医学' value:'运动医学'
} }
], ],
// localTemplateOption: [], // 当前配台模版需要的信息(需要同步到备注)
showNotEnogPop: false, // 库存不足弹窗 showNotEnogPop: false, // 库存不足弹窗
notEnoughList:[], // 库存不足数据 notEnoughList:[], // 库存不足数据
} }
...@@ -434,8 +433,6 @@ class EquipConsuPage extends Component { ...@@ -434,8 +433,6 @@ class EquipConsuPage extends Component {
let { quick_list_status, loginState, navigation, submit_quick_order_status} = this.props let { quick_list_status, loginState, navigation, submit_quick_order_status} = this.props
let self = this let self = this
if(quick_list_status != nextProps.quick_list_status) { if(quick_list_status != nextProps.quick_list_status) {
// console.warn('-222------', nextProps.quick_list_status)
// console.warn('--222---quick_list_status--', quick_list_status)
switch (nextProps.quick_list_status) { switch (nextProps.quick_list_status) {
case QUICK_ORDER_LIST_DOING: case QUICK_ORDER_LIST_DOING:
this.changeSubLoding(true) this.changeSubLoding(true)
...@@ -455,7 +452,6 @@ class EquipConsuPage extends Component { ...@@ -455,7 +452,6 @@ class EquipConsuPage extends Component {
break; break;
} }
} }
// console.log('-----nextProps.loginState----', nextProps.loginState, loginState)
if(loginState != nextProps.loginState) { if(loginState != nextProps.loginState) {
switch(nextProps.loginState) { switch(nextProps.loginState) {
case LOGIN_NO: case LOGIN_NO:
...@@ -466,8 +462,6 @@ class EquipConsuPage extends Component { ...@@ -466,8 +462,6 @@ class EquipConsuPage extends Component {
} }
} }
if(submit_quick_order_status != nextProps.submit_quick_order_status) { if(submit_quick_order_status != nextProps.submit_quick_order_status) {
// console.warn('-submit_quick_order_status------', nextProps.submit_quick_order_status)
// console.warn('--222---submit_quick_order_status--', submit_quick_order_status)
switch (nextProps.submit_quick_order_status) { switch (nextProps.submit_quick_order_status) {
case QUICK_SUBMIT_DOING: case QUICK_SUBMIT_DOING:
this.changeSubLoding(true, '提交中') this.changeSubLoding(true, '提交中')
...@@ -525,14 +519,12 @@ class EquipConsuPage extends Component { ...@@ -525,14 +519,12 @@ class EquipConsuPage extends Component {
&& chIndex != 6 && chIndex != 8 && chIndex != 6 && chIndex != 8
&& !listOptionData[chIndex].value && !listOptionData[chIndex].value
&& listOptionData[chIndex].name !== '其他') { && listOptionData[chIndex].name !== '其他') {
// console.log('chIndex-----',chIndex, chIndex !== 6, typeof chIndex, listOptionData[chIndex].title)
// 不是主治医生 // 不是主治医生
tempTit = listOptionData[chIndex].title tempTit = listOptionData[chIndex].title
tempStatus = true tempStatus = true
break break
} }
} }
// console.log('tempStatus====',tempStatus)
this.setState({ this.setState({
canSubFlag: !tempStatus canSubFlag: !tempStatus
}) })
...@@ -553,13 +545,12 @@ class EquipConsuPage extends Component { ...@@ -553,13 +545,12 @@ class EquipConsuPage extends Component {
this.setState({ this.setState({
listOptionData: listOptionData.map((chItem, index) => { listOptionData: listOptionData.map((chItem, index) => {
if(chItem.title === itemTitle) { if(chItem.title === itemTitle) {
// console.warn('---hhh-----', item)
chItem.name = item.name chItem.name = item.name
chItem.value = item.value chItem.value = item.value
if(itemTitle === '组织') { if(itemTitle === '组织') {
self.clearInitNameAndValue(1) self.clearInitNameAndValue(1)
} }
if(itemTitle === '手术医院') { if(itemTitle === '客户名称') {
self.clearInitNameAndValue(2) self.clearInitNameAndValue(2)
} }
if (itemTitle === '主治医生') { if (itemTitle === '主治医生') {
...@@ -575,7 +566,6 @@ class EquipConsuPage extends Component { ...@@ -575,7 +566,6 @@ class EquipConsuPage extends Component {
self.clearInitNameAndValue(6) self.clearInitNameAndValue(6)
} }
if (itemTitle === '配台模版') { if (itemTitle === '配台模版') {
// localTemplateOption
listOptionData[10].value = item.desc listOptionData[10].value = item.desc
} }
} }
...@@ -584,7 +574,6 @@ class EquipConsuPage extends Component { ...@@ -584,7 +574,6 @@ class EquipConsuPage extends Component {
}, () => { }, () => {
self.changeCanSub() self.changeCanSub()
}) })
// console.warn('listOptionData[2]-----',this.state.listOptionData[2])
} }
// 关闭弹窗 // 关闭弹窗
...@@ -598,7 +587,7 @@ class EquipConsuPage extends Component { ...@@ -598,7 +587,7 @@ class EquipConsuPage extends Component {
changeCurrentOption() { changeCurrentOption() {
let { currentTitle } = this.state let { currentTitle } = this.state
let { quickOrderOption } = this.props let { quickOrderOption } = this.props
console.log('当前:--quickOrderOption---', quickOrderOption) // console.log('当前:--quickOrderOption---', quickOrderOption)
let tempOption = [] let tempOption = []
if(quickOrderOption.length === 0) { if(quickOrderOption.length === 0) {
show(`当前${currentTitle}为空`) show(`当前${currentTitle}为空`)
...@@ -606,11 +595,10 @@ class EquipConsuPage extends Component { ...@@ -606,11 +595,10 @@ class EquipConsuPage extends Component {
} }
if (currentTitle === '组织') { if (currentTitle === '组织') {
tempOption = this.changeNameAndValue(quickOrderOption, 'org_name', 'org_code') tempOption = this.changeNameAndValue(quickOrderOption, 'org_name', 'org_code')
} else if (currentTitle === '手术医院') { } else if (currentTitle === '客户名称') {
this.setState({ this.setState({
localCustomersOption: quickOrderOption localCustomersOption: quickOrderOption
}) })
// console.log('----quickOrderOption----', quickOrderOption)
// 去重医院数据 // 去重医院数据
let filterOpt = dedupQuoteArray(quickOrderOption, 'customer_code') let filterOpt = dedupQuoteArray(quickOrderOption, 'customer_code')
let currentArr = [] let currentArr = []
...@@ -622,34 +610,9 @@ class EquipConsuPage extends Component { ...@@ -622,34 +610,9 @@ class EquipConsuPage extends Component {
currentArr.push(obj) currentArr.push(obj)
}) })
} }
// if( quickOrderOption.length ) {
// let obj = {}
// quickOrderOption.forEach((item, index) => {
// if(!obj.customer_code) {
// obj.customer_code = item.customer_code
// obj.customer_name = item.customer_name
// currentArr.push(obj)
// } else if(obj.customer_code && item.customer_code !== obj.customer_code) {
// obj.customer_code = item.customer_code
// obj.customer_name = item.customer_name
// currentArr.push({
// customer_code: item.customer_code,
// customer_name: item.customer_name
// })
// }
// })
// }
// console.log('---currentArr----', currentArr)
tempOption = this.changeNameAndValue(currentArr, 'customer_name', 'customer_code') tempOption = this.changeNameAndValue(currentArr, 'customer_name', 'customer_code')
} else if (currentTitle === '配台模版') { } else if (currentTitle === '配台模版') {
// this.setState({
// localTemplateOption: quickOrderOption
// })
let resultArr = [] let resultArr = []
quickOrderOption.forEach(item => { quickOrderOption.forEach(item => {
let obj = {} let obj = {}
...@@ -663,8 +626,6 @@ class EquipConsuPage extends Component { ...@@ -663,8 +626,6 @@ class EquipConsuPage extends Component {
resultArr.push(obj) resultArr.push(obj)
}) })
tempOption = [...resultArr] tempOption = [...resultArr]
// tempOption = this.changeNameAndValue(quickOrderOption, 'template_name', 'template_number')
} else if (currentTitle === '订单类型') { } else if (currentTitle === '订单类型') {
tempOption = this.changeNameAndValue(quickOrderOption, 'value_name', 'value_code') tempOption = this.changeNameAndValue(quickOrderOption, 'value_name', 'value_code')
} }
...@@ -704,14 +665,14 @@ class EquipConsuPage extends Component { ...@@ -704,14 +665,14 @@ class EquipConsuPage extends Component {
}) })
} }
// 手术医院 点击 // 客户名称 点击
handleCustomerCheck() { handleCustomerCheck() {
// console.warn('手术医院------check') // console.warn('客户名称------check')
let { state, props } = this let { state, props } = this
let self = this let self = this
if(this.judgeOrgIsNull()) { if(this.judgeOrgIsNull()) {
self.setState({ self.setState({
currentTitle: '手术医院', currentTitle: '客户名称',
currentItem: { currentItem: {
name: state.listOptionData[2].name, name: state.listOptionData[2].name,
value: state.listOptionData[2].value value: state.listOptionData[2].value
...@@ -723,7 +684,7 @@ class EquipConsuPage extends Component { ...@@ -723,7 +684,7 @@ class EquipConsuPage extends Component {
} }
} }
// 获取手术医院 // 获取客户名称
getCustomerData() { getCustomerData() {
let { state, props } = this let { state, props } = this
let params = { let params = {
...@@ -731,7 +692,6 @@ class EquipConsuPage extends Component { ...@@ -731,7 +692,6 @@ class EquipConsuPage extends Component {
org_code: state.listOptionData[1].value, org_code: state.listOptionData[1].value,
seller_code: props.userInfo.user_name seller_code: props.userInfo.user_name
} }
// console.log('-----params---', params)
props.requestQuickSurgeryHospital(params) props.requestQuickSurgeryHospital(params)
} }
...@@ -752,7 +712,7 @@ class EquipConsuPage extends Component { ...@@ -752,7 +712,7 @@ class EquipConsuPage extends Component {
if( localCustomersOption.length ) { if( localCustomersOption.length ) {
localCustomersOption.forEach((item, index) => { localCustomersOption.forEach((item, index) => {
if(item.customer_code === listOptionData[2].value) { if(item.customer_code === listOptionData[2].value) {
// 保证是当前手术医院下的地点 // 保证是当前客户名称下的地点
let obj = {} let obj = {}
obj.value = item.bill_to_site_code obj.value = item.bill_to_site_code
obj.name = item.bill_to_site_name obj.name = item.bill_to_site_name
...@@ -761,8 +721,6 @@ class EquipConsuPage extends Component { ...@@ -761,8 +721,6 @@ class EquipConsuPage extends Component {
}) })
} }
tempOption = dedupQuoteArray(tempOption, 'name') tempOption = dedupQuoteArray(tempOption, 'name')
// console.log('---tempOption========?????-', tempOption)
self.setState({ self.setState({
showTypePop: true, showTypePop: true,
listCurrentOption: [...tempOption] listCurrentOption: [...tempOption]
...@@ -788,7 +746,7 @@ class EquipConsuPage extends Component { ...@@ -788,7 +746,7 @@ class EquipConsuPage extends Component {
if( localCustomersOption.length ) { if( localCustomersOption.length ) {
localCustomersOption.forEach((item, index) => { localCustomersOption.forEach((item, index) => {
if(item.customer_code === listOptionData[2].value) { if(item.customer_code === listOptionData[2].value) {
// 保证是当前手术医院下的地点 // 保证是当前客户名称下的地点
let obj = {} let obj = {}
obj.value = item.ship_to_site_code obj.value = item.ship_to_site_code
obj.name = item.ship_to_site_name obj.name = item.ship_to_site_name
...@@ -797,8 +755,6 @@ class EquipConsuPage extends Component { ...@@ -797,8 +755,6 @@ class EquipConsuPage extends Component {
}) })
} }
tempOption = dedupQuoteArray(tempOption, 'name') tempOption = dedupQuoteArray(tempOption, 'name')
// console.log('---tempOption========?????-', tempOption)
self.setState({ self.setState({
showTypePop: true, showTypePop: true,
listCurrentOption: [...tempOption] listCurrentOption: [...tempOption]
...@@ -835,11 +791,10 @@ class EquipConsuPage extends Component { ...@@ -835,11 +791,10 @@ class EquipConsuPage extends Component {
if( localCustomersOption.length ) { if( localCustomersOption.length ) {
localCustomersOption.forEach((item, index) => { localCustomersOption.forEach((item, index) => {
if(item.customer_code === listOptionData[2].value) { if(item.customer_code === listOptionData[2].value) {
// 保证是当前手术医院下的医生 // 保证是当前客户名称下的医生
let obj = {} let obj = {}
obj.value = item.customer_doctor obj.value = item.customer_doctor
obj.name = item.customer_doctor obj.name = item.customer_doctor
// console.log('tempOption!!!+=========', tempOption)
tempOption.push(obj) tempOption.push(obj)
} }
}) })
...@@ -850,7 +805,6 @@ class EquipConsuPage extends Component { ...@@ -850,7 +805,6 @@ class EquipConsuPage extends Component {
} }
tempOption.push(othObj) tempOption.push(othObj)
tempOption = dedupQuoteArray(tempOption, 'name') tempOption = dedupQuoteArray(tempOption, 'name')
// console.log('---tempOption========?????-', tempOption)
self.setState({ self.setState({
showTypePop: true, showTypePop: true,
listCurrentOption: [...tempOption] listCurrentOption: [...tempOption]
...@@ -905,7 +859,6 @@ class EquipConsuPage extends Component { ...@@ -905,7 +859,6 @@ class EquipConsuPage extends Component {
surgery_type: state.listOptionData[6].value, surgery_type: state.listOptionData[6].value,
doctor_name: tempDoctorName doctor_name: tempDoctorName
} }
// console.log('-----params---', params)
props.requestQuickTemplateCollect(params) props.requestQuickTemplateCollect(params)
}) })
} }
...@@ -925,7 +878,6 @@ class EquipConsuPage extends Component { ...@@ -925,7 +878,6 @@ class EquipConsuPage extends Component {
return item return item
}) })
}) })
// console.warn('!date----', listOptionData[8])
} }
this.closeDateModal(true) this.closeDateModal(true)
} }
...@@ -951,7 +903,6 @@ class EquipConsuPage extends Component { ...@@ -951,7 +903,6 @@ class EquipConsuPage extends Component {
return item return item
}) })
}) })
// console.warn('--手术类时间---', listOptionData[8])
} }
// 订单类型 点击 // 订单类型 点击
...@@ -971,7 +922,6 @@ class EquipConsuPage extends Component { ...@@ -971,7 +922,6 @@ class EquipConsuPage extends Component {
access_token: props.token, access_token: props.token,
value_set_code:'SUR_ORDER_TYPE' value_set_code:'SUR_ORDER_TYPE'
} }
// console.log('-----params---', params)
props.requestQuickOrderType(params) props.requestQuickOrderType(params)
}) })
} }
...@@ -993,13 +943,10 @@ class EquipConsuPage extends Component { ...@@ -993,13 +943,10 @@ class EquipConsuPage extends Component {
// 生成订单 点击 // 生成订单 点击
async handleSubmit() { async handleSubmit() {
this.changeCanSub(true) this.changeCanSub(true)
let { state, props } = this let { state, props } = this
let that = this let that = this
console.log('提交======》', state.canSubFlag, state.stop, state.isSubLoding)
// 测试 // 测试
// this.clearAllData() // this.clearAllData()
// let { state: { params: { title } } } = this.props.navigation // let { state: { params: { title } } } = this.props.navigation
...@@ -1010,8 +957,7 @@ class EquipConsuPage extends Component { ...@@ -1010,8 +957,7 @@ class EquipConsuPage extends Component {
// 可提交 并且 不处于正在提交中 // 可提交 并且 不处于正在提交中
if(state.canSubFlag && !state.isSubLoding) { if(state.canSubFlag && !state.isSubLoding) {
console.warn('进入提交内容----------') // console.warn('进入提交内容----------')
// console.warn(state.listOptionData)
// 先提交录音,再提交接口 // 先提交录音,再提交接口
if(state.stop) { if(state.stop) {
...@@ -1021,9 +967,7 @@ class EquipConsuPage extends Component { ...@@ -1021,9 +967,7 @@ class EquipConsuPage extends Component {
path: state.audioPath path: state.audioPath
} }
let {global_domain_config} = props let {global_domain_config} = props
console.log('---handleSubmit--',params)
let audioResult = await requestQuickAudio(global_domain_config, params); let audioResult = await requestQuickAudio(global_domain_config, params);
console.log('返回---audioResult======',audioResult)
that.changeSubLoding(true, '上传中') that.changeSubLoding(true, '上传中')
if(audioResult.error_code == 0) { if(audioResult.error_code == 0) {
// 提交订单 // 提交订单
...@@ -1074,7 +1018,7 @@ class EquipConsuPage extends Component { ...@@ -1074,7 +1018,7 @@ class EquipConsuPage extends Component {
tempSubOption.surgery_desc = state.listOptionData[10].value tempSubOption.surgery_desc = state.listOptionData[10].value
tempSubOption.voice_url = state.listOptionData[11].value tempSubOption.voice_url = state.listOptionData[11].value
console.log('tempSubOption-----', tempSubOption) // console.log('tempSubOption-----', tempSubOption)
let params = { let params = {
access_token: props.token, access_token: props.token,
data: { ...tempSubOption } data: { ...tempSubOption }
...@@ -1094,12 +1038,12 @@ class EquipConsuPage extends Component { ...@@ -1094,12 +1038,12 @@ class EquipConsuPage extends Component {
} }
} }
// 判断手术医院是否为空 // 判断客户名称是否为空
judgeCustomerIsNull() { judgeCustomerIsNull() {
let { listOptionData } = this.state let { listOptionData } = this.state
let orgVal = listOptionData[2].value let orgVal = listOptionData[2].value
if(!orgVal) { if(!orgVal) {
show('请先选择手术医院') show('请先选择客户名称')
return false return false
} else { } else {
return true return true
...@@ -1207,7 +1151,7 @@ class EquipConsuPage extends Component { ...@@ -1207,7 +1151,7 @@ class EquipConsuPage extends Component {
> >
<CellTextStyle> <CellTextStyle>
<AsteriskTextStyle>*</AsteriskTextStyle> <AsteriskTextStyle>*</AsteriskTextStyle>
<TitleTextStyle>{'手术医院'}</TitleTextStyle> <TitleTextStyle>{'客户名称'}</TitleTextStyle>
<ContTextStyle>{listOptionData[2].name}</ContTextStyle> <ContTextStyle>{listOptionData[2].name}</ContTextStyle>
{ this.renderRightArrowItem() } { this.renderRightArrowItem() }
</CellTextStyle> </CellTextStyle>
......
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