Commit fc803436 by Denglingling

【器械消耗】提交接口,以及提示信息;【消耗明细】搜索功能等;

parent f02dea34
......@@ -116,7 +116,6 @@ function requestListDataFail() {
// 获取当前临时存储的明细
export function getSubdetailOption(data) {
console.log('data====!!!!', data)
return {
type: GET_SUB_DETAIL_OPTION,
rawData: data
......@@ -143,11 +142,10 @@ export function requestEquipSumbit({access_token, ...params}) {
dispatch(requestSubmiting());
PostRequest(getUrlParams('/surgery/consume_order/create', {access_token: access_token}), params)
.then(res => {
console.warn('res=====', Object.keys(res));
console.warn('res=====', Object.keys(res), res);
if(res.error_code == 0) {
console.warn('res====requestEquipSumbit==========', res.data);
let { data } = res
dispatch(requestSubmitSuccess(data));
console.warn('res====requestEquipSumbit==========', res);
dispatch(requestSubmitSuccess(res));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
......@@ -182,3 +180,10 @@ function requestSubmitFail() {
type: EQUIP_SUBMIT_FAILURE
}
}
// 初始化数据
export function setEquipInitData() {
return {
type: EQUIP_INIT_DATA
}
}
\ No newline at end of file
......@@ -7,14 +7,14 @@ export function requestLogin(params) {
dispatch(logining());
PostRequest('/access_token/password/search?app_code=PDA', params).then((res) => {
if(res.error_code === 0){
show('登录成功');
show('登录成功', 'success');
dispatch(loginSuccess(res, params.data.user_name, params.data.user_password));
}else {
show(res.error_msg);
show(res.error_msg, 'error');
dispatch(loginFailure())
}
}).catch((err) => {
show(err.error);
show(err.error, 'error');
})
}
}
......@@ -67,11 +67,11 @@ export function autoLogin(params) {
dispatch(autoLoginSuccess(res))
}else {
console.warn(res.error_msg);
show(res.error_msg);
show(res.error_msg, 'error');
dispatch(autoLoginFailure())
}
}).catch((err) => {
show(err.error);
show(err.error, 'error');
})
}
}
\ No newline at end of file
......@@ -33,14 +33,17 @@ import {
ContTextStyle
} from '../common/CellTextStyle';
import { connect } from 'react-redux';
import { isEmpty, dedupQuoteArray, show, formatStrForDate } from '../../utils/Utils';
import { isEmpty, dedupQuoteArray, show, formatStrForDate, cloneObject } from '../../utils/Utils';
import DateModel from '../common/DateModel';
import DialogModel from '../common/DialogModel';
import {
requestEquipOrganizations,
requestEquipSurgeryHospital,
requestEquipOrderInfo,
uploadEquipImg
uploadEquipImg,
getSubdetailOption,
requestEquipSumbit,
setEquipInitData
} from '../../action/EquipAction';
import {
EQUIP_CONSU_LIST_DOING,
......@@ -61,7 +64,7 @@ class EquipConsuPage extends Component {
super(props);
this.state = {
canSubFlag: false, // 生成订单按钮样式改变
listOptionData: [ // 备注以上的元素
listOptionData: [ // 页面元素
{
"id": "0",
title: '销售员',
......@@ -147,7 +150,7 @@ class EquipConsuPage extends Component {
value: '',
isPicker: false,
select: false,
isRedio: false // 单选
isRedio: 'N' // 单选
},
{
"id": "11",
......@@ -215,21 +218,22 @@ class EquipConsuPage extends Component {
uploadImgArr: [] // 上传后的路径
}
],
subInitListOption: [], // 提交成功后,初始化当前数据
submitOption: { // 提交的信息
// seller_code: '', // 用户名username ?? 没有用户名
org_code: '', // 组织
surgery_collect_number: '', // 订单信息 ?? 没有手术医院
consume_date: '', // 消耗时间
patient_name: '', // 患者姓名
patient_gender: '', // 性别
patient_age: '', // 年龄
patient_bed: '', // 床位
patient_id: '', // 病历号
consume_date: '', // 消耗时间
settled_flag: false, // 是否结单
remark: '', // 备注信息
lines: [], // 消耗明细
img_url: '', // 图片路径
img_url: '', // 图片路径,逗号分割
},
currentItem: {
......@@ -272,7 +276,6 @@ class EquipConsuPage extends Component {
componentDidMount() {
console.log('houhou hahei!谁在跳???')
this.getSellerName()
}
......@@ -280,7 +283,17 @@ class EquipConsuPage extends Component {
getSellerName() {
let {state, props} = this
// console.log('---userInfo',props.userInfo)
let {listOptionData} = this.state
this.setState({
subInitListOption: cloneObject(listOptionData) // 存储初始化数据,提交成功后赋此值
})
if(state.listOptionData[0].name !== props.userInfo.person_name) {
listOptionData[0].name = props.userInfo.person_name
listOptionData[0].value = props.userInfo.user_name
// this.setState({
// listOptionData,
// subInitListOption: cloneObject(listOptionData)
// })
this.setState({
listOptionData: state.listOptionData.map((item) => {
if(item.title === '销售员') {
......@@ -288,7 +301,8 @@ class EquipConsuPage extends Component {
item.value = props.userInfo.user_name
}
return item
})
}),
subInitListOption: cloneObject(listOptionData)
})
}
}
......@@ -335,7 +349,31 @@ class EquipConsuPage extends Component {
listOptionData[12].subOption = nextProps.subDetOption
this.setState({
listOptionData
},() => {
self.changeCanSub()
})
}
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, '提交中')
break;
case EQUIP_SUBMIT_SUCCESS:
self.setState({
isSubLoding: false,
lodingTitle: '提交中'
},() => {
self.processReturnData()
})
break;
case EQUIP_SUBMIT_FAILURE:
this.changeSubLoding(false, '提交中')
break;
default:
break;
}
}
}
......@@ -347,14 +385,24 @@ class EquipConsuPage extends Component {
})
}
// 清空当前项以下的
// 清空当前项以下的选择器值,以及耗材明细
clearInitNameAndValue(curIndex) {
let { listOptionData, localOtherObj } = this.state
let { props } = this
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(index > curIndex && index < 4 ) {
console.log('进入')
item.name = localOtherObj.name
item.value = localOtherObj.value
// 清空耗材明细
listOptionData[12].subOption = []
props.getSubdetailOption([])
}
if(index == curIndex && curIndex == 3) {
// 清空耗材明细
listOptionData[12].subOption = []
props.getSubdetailOption([])
}
return item
})
......@@ -363,28 +411,39 @@ class EquipConsuPage extends Component {
// 判断是否都有值,修改提交按钮的颜色
changeCanSub(isSubCheck) {
// let { listOptionData } = this.state
// let tempStatus = false
// let tempTit = ''
// for(let chIndex in listOptionData) {
// if(chIndex > 0 && chIndex < 10
// && 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
// })
// if(isSubCheck && tempStatus) {
// show(`${tempTit}未选择,不能提交`)
// }
let { listOptionData } = this.state
let tempStatus = false
let tempTit = ''
for(let chIndex in listOptionData) {
if(chIndex > 0 && chIndex < 7
&& chIndex != 5
&& !listOptionData[chIndex].value) {
// 选择器为空
tempTit = `“${listOptionData[chIndex].title}”未选择`
tempStatus = true
break
} else if(chIndex >= 5
&& chIndex != 6
&& chIndex < 10
&& !listOptionData[chIndex].value) {
// 输入框为空
tempTit = `“${listOptionData[chIndex].title}”未输入`
tempStatus = true
break
} else if( chIndex == 12
&& !listOptionData[chIndex].subOption.length ) {
tempTit = `“${listOptionData[chIndex].title}”未添加`
tempStatus = true
break
}
}
// console.log('tempStatus====',tempStatus)
this.setState({
canSubFlag: !tempStatus
})
if(isSubCheck && tempStatus) {
show(`${tempTit},不能提交`, 'warn')
}
}
// 选择器弹窗回调函数
......@@ -409,6 +468,9 @@ class EquipConsuPage extends Component {
if(itemTitle === '手术医院') {
self.clearInitNameAndValue(2)
}
if(itemTitle === '订单信息') {
self.clearInitNameAndValue(3)
}
}
return chItem
})
......@@ -594,6 +656,7 @@ class EquipConsuPage extends Component {
dateModalCallback(date) {
console.warn('callback',date)
let { listOptionData } = this.state
let self = this
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(item.title === '消耗时间') {
......@@ -603,6 +666,8 @@ class EquipConsuPage extends Component {
}
return item
})
},() => {
self.changeCanSub()
})
console.warn('--手术类时间---', listOptionData[8])
}
......@@ -611,6 +676,7 @@ class EquipConsuPage extends Component {
handlePatNameInput(text) {
console.warn('患者姓名------input:', text)
let { listOptionData } = this.state
let self = this
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(item.title === '患者姓名') {
......@@ -618,6 +684,8 @@ class EquipConsuPage extends Component {
}
return item
})
},() => {
self.changeCanSub()
})
}
......@@ -644,8 +712,9 @@ class EquipConsuPage extends Component {
// 年龄 输入
handleAgeInput(text) {
console.warn('年龄------input:', text)
// console.warn('年龄------input:', text)
let { listOptionData } = this.state
let self = this
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(item.title === '年龄') {
......@@ -653,13 +722,16 @@ class EquipConsuPage extends Component {
}
return item
})
},() => {
self.changeCanSub()
})
}
// 床位 输入
handleBedInput(text) {
console.warn('床位------input:', text)
// console.warn('床位------input:', text)
let { listOptionData } = this.state
let self = this
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(item.title === '床位') {
......@@ -667,13 +739,16 @@ class EquipConsuPage extends Component {
}
return item
})
},() => {
self.changeCanSub()
})
}
// 病历号 输入
handleRecordNumInput(text) {
console.warn('病历号------input:', text)
// console.warn('病历号------input:', text)
let { listOptionData } = this.state
let self = this
this.setState({
listOptionData: listOptionData.map((item, index) => {
if(item.title === '病历号') {
......@@ -681,13 +756,15 @@ class EquipConsuPage extends Component {
}
return item
})
},() => {
self.changeCanSub()
})
}
// 结单 是
handleRadioYesClick() {
let {listOptionData} = this.state
listOptionData[10].isRedio = true
listOptionData[10].isRedio = 'Y'
this.setState({
listOptionData
})
......@@ -696,7 +773,7 @@ class EquipConsuPage extends Component {
// 结单 否
handleRadioNoClick() {
let {listOptionData} = this.state
listOptionData[10].isRedio = false
listOptionData[10].isRedio = 'N'
this.setState({
listOptionData
})
......@@ -704,7 +781,7 @@ class EquipConsuPage extends Component {
// 备注 输入
handleRemarkInput(text) {
console.warn('备注---',text)
// console.warn('备注---',text)
let { listOptionData } = this.state
this.setState({
listOptionData: listOptionData.map((item, index) => {
......@@ -784,7 +861,7 @@ class EquipConsuPage extends Component {
noData: false,
storageOptions: {
skipBackup: true,
path: 'images'
path: 'WisdomEquip' // 存储本地地址
}
};
......@@ -821,9 +898,7 @@ class EquipConsuPage extends Component {
else if (res.customButton) {
console.log('User tapped custom button: ', res.customButton);
} else {
// show('上传中...')
that.changeSubLoding(true, '上传中')
let source; //保存选中的图片
if (Platform.OS === 'android') {
source = res.uri;
......@@ -833,42 +908,27 @@ 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)
// console.log('formData112===',formData)
let params = {
access_token: props.token,
formData
}
//上传图片接口
console.log('---handleSubmit--',params)
// console.log('---handleSubmit--',params)
let imgResult = await uploadEquipImg(params);
console.log('返回---imgResult======',imgResult)
// console.log('返回---imgResult======',imgResult)
if(imgResult.error_code == 0) {
that.changeSubLoding(false)
// 提交订单
show('上传成功');
let {url} = imgResult.data
localPhoOption.push(source);
listOptionData[13].uploadImgArr.push(url)
localPhoOption.push(source); // 本地图片地址
listOptionData[13].uploadImgArr.push(url) // 服务器图片地址
that.setState({
localPhoOption,
listOptionData
});
// // that.setState({
// // listOptionData: state.listOptionData.map((item, index) => {
// // if(index == 11) {
// // item.value = imgResult.data.url
// // }
// // return item
// // })
// // }, () => {
// // that.changeSubLoding(false)
// // that.submitQuickOrder()
// // })
} else if(imgResult.error_code == 41006) {
that.changeSubLoding(false)
show('登录过期,请重新登录');
......@@ -878,79 +938,83 @@ class EquipConsuPage extends Component {
let error_msg = imgResult.error_msg || imgResult.message
show(error_msg);
}
// uploadEquipImg(params)
// .then((response)=>{
// console.log('response==!!!!----------=', response)
// if (response.error_code === 0) {
// show('上传成功');
// localPhoOption.push(source);
// that.setState({localPhoOption});
// }else if(response.error_code === 41006){
// show('登录过期,请重新登录');
// props.exitLoginStatus()
// } else {
// show(response.error_msg)
// }
// })
}
})
}
// 删除单个照片 点击
handleDelPickCheck(item, index) {
let {listOptionData, localPhoOption} = this.state
localPhoOption.splice(index, 1) // 删除本地地址
listOptionData[13].uploadImgArr.splice(index, 1) // 删除服务器地址
this.setState({
listOptionData,
localPhoOption
}, () => {
show('删除成功')
})
}
// 生成订单 点击
handleSubmit() {
console.warn('生成订单------check')
// 先上传照片,再提交订单
}
// 提交订单
submitQuickOrder() {
this.changeCanSub(true)
let { state, props } = this
// // 测试提交--重复数据
// this.clearAllData() // 清空数据
// let { state: { params: { title } } } = this.props.navigation
// this.props.navigation.navigate('SubSuccPage', { // 现在没返回订单号
// title: `${title} - 下单成功`
// })
// 可提交 并且 不处于正在提交中
if(state.canSubFlag && !state.isSubLoding) {
console.warn('进入提交内容----!!------')
let tempSubOption = state.submitOption
tempSubOption.org_code = state.listOptionData[1].value
tempSubOption.surgery_collect_number = state.listOptionData[3].value
tempSubOption.consume_date = state.listOptionData[4].value
tempSubOption.patient_name = state.listOptionData[5].value
tempSubOption.patient_gender = state.listOptionData[6].value
tempSubOption.patient_age = state.listOptionData[7].value
tempSubOption.patient_bed = state.listOptionData[8].value
tempSubOption.patient_id = state.listOptionData[9].value
tempSubOption.settled_flag = state.listOptionData[10].isRedio
tempSubOption.remark = state.listOptionData[11].value
tempSubOption.lines = state.listOptionData[12].subOption
if( tempSubOption.lines.length ) {
tempSubOption.lines = tempSubOption.lines.map(item => {
item['consumed_quantity'] = 1
return item
})
}
tempSubOption.img_url = state.listOptionData[13].uploadImgArr.join(',')
console.log('tempSubOption-----', tempSubOption)
let params = {
access_token: props.token,
data: { ...tempSubOption }
}
props.requestEquipSumbit(params)
}
}
// 判断组织是否为空
judgeOrgIsNull() {
return this.showTipFirstSelect(1)
// let { listOptionData } = this.state
// let orgVal = listOptionData[1].value
// if(!orgVal) {
// show('请先选择组织')
// return false
// } else {
// return true
// }
}
// 判断手术医院是否为空
judgeCustomerIsNull() {
return this.showTipFirstSelect(2)
// let { listOptionData } = this.state
// let orgVal = listOptionData[2].value
// if(!orgVal) {
// show('请先选择手术医院')
// return false
// } else {
// return true
// }
}
// 判断订单信息是否为空
judgeOrderInfoIsNull() {
return this.showTipFirstSelect(3)
// let { listOptionData } = this.state
// let orgVal = listOptionData[3].value
// if(!orgVal) {
// show(`请先选择${listOptionData[3].title}`)
// return false
// } else {
// return true
// }
}
// 提示请先选择
......@@ -967,13 +1031,33 @@ 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
this.props.navigation.navigate('SubSuccPage', { // 现在没返回订单号
title: `${title} - 下单成功`
})
}
}
// 清空数据
clearAllData() {
let {props} = this
let {listOptionData, subInitListOption} = this.state
props.setEquipInitData() // 清空缓存数据
this.setState({
listOptionData: listOptionData.map((item, index) => {
// 器械消耗 为何和 快速下单一样赋值方式就不行,所以换成这个
Object.keys(item).forEach(key => {
item[key] = subInitListOption[index][key]
})
return item
})
})
}
// 返回备注以上的元素
renderListItem() {
......@@ -1063,6 +1147,7 @@ class EquipConsuPage extends Component {
style={styles.cell_input}
placeholder={`请输入`}
onChangeText={(text) => this.handlePatNameInput(text)}
defaultValue={listOptionData[5].value}
/>
</CellTextStyle>
</TouchableOpacity>
......@@ -1090,7 +1175,9 @@ class EquipConsuPage extends Component {
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
keyboardType={'numeric'}
onChangeText={(text) => this.handleAgeInput(text)}
defaultValue={listOptionData[7].value}
/>
</CellTextStyle>
</TouchableOpacity>
......@@ -1105,7 +1192,9 @@ class EquipConsuPage extends Component {
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
keyboardType={'numeric'}
onChangeText={(text) => this.handleBedInput(text)}
defaultValue={listOptionData[8].value}
/>
</CellTextStyle>
</TouchableOpacity>
......@@ -1120,7 +1209,9 @@ class EquipConsuPage extends Component {
<ContInputTextStyle
style={styles.cell_input}
placeholder={`请输入`}
keyboardType={'numeric'}
onChangeText={(text) => this.handleRecordNumInput(text)}
defaultValue={listOptionData[9].value}
/>
</CellTextStyle>
</TouchableOpacity>
......@@ -1140,7 +1231,7 @@ class EquipConsuPage extends Component {
>
<View style={styles.radio_icon}>
{
listOptionData[10].isRedio ?
listOptionData[10].isRedio == 'Y' ?
<Image style={icon_style} source={require('../../images/radio_yes.png')} />
: <Image style={icon_style} source={require('../../images/radio_no.png')} />
}
......@@ -1154,7 +1245,7 @@ class EquipConsuPage extends Component {
>
<View style={styles.radio_icon}>
{
listOptionData[10].isRedio ?
listOptionData[10].isRedio == 'Y' ?
<Image style={icon_style} source={require('../../images/radio_no.png')} />
: <Image style={icon_style} source={require('../../images/radio_yes.png')} />
}
......@@ -1208,6 +1299,7 @@ class EquipConsuPage extends Component {
// 返回备注元素
renderRemarksItem() {
let { state } = this
console.log('备注===', state.listOptionData[11], state.subInitListOption[11])
return (
<CellTextStyle style={list_common_item.remark_item}>
<View style={list_common_item.rema_box}>
......@@ -1224,7 +1316,7 @@ class EquipConsuPage extends Component {
style={list_common_item.rema_Input}
maxLength={140}
onChangeText={(text) => this.handleRemarkInput(text)}
defaultValue={state.listOptionData[10].value}
defaultValue={state.listOptionData[11].value}
/>
</TouchableOpacity>
</View>
......@@ -1367,7 +1459,7 @@ class EquipConsuPage extends Component {
<TouchableOpacity
activeOpacity={.8}
style={list_common_item.del_img_box}
onPress={()=>console.log('删除图片')}
onPress={(item, index) => this.handleDelPickCheck(item, index)}
>
<Image style={icon_style} source={require('../../images/close_err_icon.png')} />
</TouchableOpacity>
......@@ -1508,6 +1600,15 @@ const mapDispatchToProps = (dispatch) => {
},
exitLoginStatus: () => {
dispatch(exitLoginStatus())
},
getSubdetailOption: (data) => {
dispatch(getSubdetailOption(data))
},
requestEquipSumbit: (params) => {
dispatch(requestEquipSumbit(params))
},
setEquipInitData: () => {
dispatch(setEquipInitData())
}
}
}
......
......@@ -99,6 +99,7 @@ class ConsumDetailsPage extends Component {
// select: false
// }
],
allConOption: [], // 所有数据(未筛选过的)
selectShowPopup: false, // 共计已选弹窗
localSelectOption: [], // 已选数据
isSubLoding: true, // 加载中弹窗
......@@ -133,7 +134,8 @@ class ConsumDetailsPage extends Component {
})
this.setState({
isSubLoding: false,
conDetaOption: lines
conDetaOption: lines,
allConOption: lines
})
this.changeIsSelected()
} else if(detailResult.error_code === 41006) {
......@@ -147,6 +149,30 @@ class ConsumDetailsPage extends Component {
}
}
// 搜索 输入
handleSearchInput(text) {
console.log('搜索 输入---', text)
let {allConOption} = this.state
let self = this
let tempArr = []
if(text) {
allConOption.forEach(item => {
let itemStr = JSON.stringify(item)
if(itemStr.indexOf(text) != -1) {
// 满足搜索条件
tempArr.push(item)
}
})
} else {
tempArr = [...allConOption]
}
this.setState({
conDetaOption: tempArr
}, () => {
self.changeIsSelected()
})
}
// 修改加载中
changeLodingFlag(show) {
this.setState({
......@@ -169,14 +195,13 @@ class ConsumDetailsPage extends Component {
// 修改 当前已选择
changeIsSelected(ind, selFlag) {
let {conDetaOption} = this.state
if(ind) {
if(ind != undefined) {
conDetaOption[ind].select = selFlag
}
let that = this
this.setState({
conDetaOption
},() => {
// let {conDetaOption} = this.state
console.log('conDetaOption---修改-', conDetaOption)
let tempArr = []
conDetaOption.forEach(item => {
......@@ -186,8 +211,6 @@ class ConsumDetailsPage extends Component {
})
that.setState({
localSelectOption: tempArr
}, () => {
console.log('this.localSelectOption--!!2--that====' , that.state.localSelectOption)
})
})
}
......@@ -195,7 +218,6 @@ class ConsumDetailsPage extends Component {
// 已选回调函数
detailsCallbak(subOpt) {
console.log('----回调:',subOpt)
// let {conDetaOption} = this.state
let tempOption = [...this.state.conDetaOption]
// 获取当前已选值
tempOption = tempOption.map(item => {
......@@ -233,10 +255,7 @@ class ConsumDetailsPage extends Component {
handleSubmit() {
console.warn('确定耗材', this.props.navigation.navigate)
this.handleCloseSelectModal(false)
console.warn('携带数据,填写单价') // 可存储于store中!!!
let {localSelectOption} = this.state
if(!localSelectOption.length) {
show('请选择耗材')
return
......@@ -256,6 +275,7 @@ class ConsumDetailsPage extends Component {
placeholder={'请输入搜索关键词'}
style={list_common_item.ser_text_input}
defaultValue={this.state.searchValue}
onChangeText={(text) => this.handleSearchInput(text)}
/>
<View style={list_common_item.ser_img_box}>
<Image source={require('../../../images/search_icon.png')} style={icon_style}/>
......@@ -266,7 +286,6 @@ class ConsumDetailsPage extends Component {
// 返回中间主要内容
renderContItem() {
// let {conDetaOption} = this.state
return (
<ScrollView
style={styles.cons_cont_scroll}
......
......@@ -16,7 +16,7 @@ const defaultState = {
equip_list_status: EQUIP_CONSU_LIST_NO, // 获取数据状态
submit_equip_order_status: EQUIP_SUBMIT_NO, // 提交订单状态
equipOrderOption: {}, // 当前选择器临时存储数据
subDetOption: {}, // 选择的消耗明细数据
subDetOption: [], // 选择的消耗明细数据
}
export default equip = (state = defaultState, action) => {
......@@ -54,10 +54,9 @@ export default equip = (state = defaultState, action) => {
equip_list_status: EQUIP_CONSU_LIST_NO,
submit_equip_order_status: EQUIP_SUBMIT_NO,
equipOrderOption: {},
subDetOption: {}
subDetOption: []
})
case GET_SUB_DETAIL_OPTION:
console.log('----??----存储啦吗??', action.rawData)
return Object.assign({}, state, {
subDetOption: action.rawData
})
......
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