Commit 6cf3dd25 by Denglingling

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

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