Commit b0ecec3d by Denglingling

新增器械消耗费用明细相关处理

parent 64a0d720
...@@ -10,7 +10,8 @@ import SelfOrderPage from './containers/selfOrder/SelfOrderPage'; ...@@ -10,7 +10,8 @@ import SelfOrderPage from './containers/selfOrder/SelfOrderPage';
import ChooseProductPage from './containers/selfOrder/module/ChooseProductPage'; import ChooseProductPage from './containers/selfOrder/module/ChooseProductPage';
import EditThirdLevelPage from './containers/selfOrder/module/EditThirdLevelPage'; import EditThirdLevelPage from './containers/selfOrder/module/EditThirdLevelPage';
import EquipConsuPage from './containers/equipConsu/EquipConsuPage'; import EquipConsuPage from './containers/equipConsu/EquipConsuPage';
import ConsumDetailsPage from './containers/equipConsu//module/ConsumDetailsPage'; import ConsumDetailsPage from './containers/equipConsu/module/ConsumDetailsPage';
import ChargeDetailsPage from './containers/equipConsu/module/ChargeDetailsPage';
import FillUnitPricePage from './containers/equipConsu/module/FillUnitPricePage'; import FillUnitPricePage from './containers/equipConsu/module/FillUnitPricePage';
import ShowDetailPage from './containers/equipConsu/module/ShowDetailPage'; import ShowDetailPage from './containers/equipConsu/module/ShowDetailPage';
import QuickOrderPage from './containers/quickOrder/QuickOrderPage'; import QuickOrderPage from './containers/quickOrder/QuickOrderPage';
...@@ -31,7 +32,8 @@ const Router = createAppContainer(createStackNavigator({ ...@@ -31,7 +32,8 @@ const Router = createAppContainer(createStackNavigator({
ChooseProductPage: {screen: ChooseProductPage}, ChooseProductPage: {screen: ChooseProductPage},
EditThirdLevelPage: {screen: EditThirdLevelPage}, EditThirdLevelPage: {screen: EditThirdLevelPage},
EquipConsuPage: {screen: EquipConsuPage}, EquipConsuPage: {screen: EquipConsuPage},
ConsumDetailsPage: {screen: ConsumDetailsPage}, ConsumDetailsPage: {screen: ConsumDetailsPage},
ChargeDetailsPage: {screen: ChargeDetailsPage},
FillUnitPricePage: {screen: FillUnitPricePage}, FillUnitPricePage: {screen: FillUnitPricePage},
ShowDetailPage: {screen: ShowDetailPage}, ShowDetailPage: {screen: ShowDetailPage},
QuickOrderPage: {screen: QuickOrderPage}, QuickOrderPage: {screen: QuickOrderPage},
......
...@@ -9,6 +9,7 @@ import { ...@@ -9,6 +9,7 @@ import {
EQUIP_SUBMIT_SUCCESS, EQUIP_SUBMIT_SUCCESS,
EQUIP_SUBMIT_FAILURE, EQUIP_SUBMIT_FAILURE,
GET_SUB_DETAIL_OPTION, GET_SUB_DETAIL_OPTION,
GET_CHARGE_DETAILS_OPTION,
EQUIP_INIT_DATA EQUIP_INIT_DATA
} from '../base/ActionTypes'; } from '../base/ActionTypes';
...@@ -122,7 +123,7 @@ function requestListDataFail() { ...@@ -122,7 +123,7 @@ function requestListDataFail() {
} }
} }
// 获取当前临时存储的明细 // 设置当前临时存储的明细
export function getSubdetailOption(data) { export function getSubdetailOption(data) {
return { return {
type: GET_SUB_DETAIL_OPTION, type: GET_SUB_DETAIL_OPTION,
...@@ -130,6 +131,14 @@ export function getSubdetailOption(data) { ...@@ -130,6 +131,14 @@ export function getSubdetailOption(data) {
} }
} }
// 设置当前费用明细
export function getCharDetailsOption(data) {
return {
type: GET_CHARGE_DETAILS_OPTION,
rawData: data
}
}
// 获取消耗明细 params={access_token:'', surgery_collect_number:''} // 获取消耗明细 params={access_token:'', surgery_collect_number:''}
export const requestEquipDetails = async (global_domain_config, params) => { export const requestEquipDetails = async (global_domain_config, params) => {
return await GetRequest(global_domain_config, getUrlParams('/surgery/collected_order_line/search', params)) return await GetRequest(global_domain_config, getUrlParams('/surgery/collected_order_line/search', params))
......
...@@ -7,15 +7,15 @@ import { ...@@ -7,15 +7,15 @@ import {
AUTO_LOGIN_FAILURE, AUTO_LOGIN_FAILURE,
SET_DOMAIN_CONFIGURATE SET_DOMAIN_CONFIGURATE
} from '../base/ActionTypes'; } from '../base/ActionTypes';
import { PostRequest } from '../network/RequestUtils'; import { GetRequest, PostRequest } from '../network/RequestUtils';
import { show } from '../utils/Utils'; import { getUrlParams, show } from '../utils/Utils';
export function requestLogin(params) { export function requestLogin(params) {
return (dispatch, getState) => { return (dispatch, getState) => {
dispatch(logining()); dispatch(logining());
let {global_domain_config} = getState().login let {global_domain_config} = getState().login
PostRequest(global_domain_config, '/access_token/password/search?app_code=MOBILE', params).then((res) => { PostRequest(global_domain_config, '/access_token/password/search?app_code=MOBILE', params).then((res) => {
console.log('res-------', res) console.log('登录 res=====', res)
if(res.error_code === 0){ if(res.error_code === 0){
if(res.functions && res.functions.length) { if(res.functions && res.functions.length) {
show('登录成功'); show('登录成功');
...@@ -38,6 +38,7 @@ export function requestLogin(params) { ...@@ -38,6 +38,7 @@ export function requestLogin(params) {
let error_msg = err.error || '请求接口错误,请联系管理员' let error_msg = err.error || '请求接口错误,请联系管理员'
show(error_msg); show(error_msg);
dispatch(loginFailure()) dispatch(loginFailure())
console.error(err)
}) })
} }
} }
...@@ -86,6 +87,7 @@ export function autoLogin(params) { ...@@ -86,6 +87,7 @@ export function autoLogin(params) {
return (dispatch, getState) => { return (dispatch, getState) => {
let {global_domain_config} = getState().login let {global_domain_config} = getState().login
PostRequest(global_domain_config, '/access_token/password/search?app_code=MOBILE', params).then((res) => { PostRequest(global_domain_config, '/access_token/password/search?app_code=MOBILE', params).then((res) => {
console.log('自动登录 res=====', res)
if(res.error_code === 0){ if(res.error_code === 0){
if(res.functions && res.functions.length) { if(res.functions && res.functions.length) {
dispatch(autoLoginSuccess(res)); dispatch(autoLoginSuccess(res));
...@@ -102,6 +104,7 @@ export function autoLogin(params) { ...@@ -102,6 +104,7 @@ export function autoLogin(params) {
}).catch((err) => { }).catch((err) => {
show(err.error); show(err.error);
dispatch(autoLoginFailure()) dispatch(autoLoginFailure())
console.error(err)
}) })
} }
} }
...@@ -111,4 +114,14 @@ export function setDomainConfigurate(domainVal) { ...@@ -111,4 +114,14 @@ export function setDomainConfigurate(domainVal) {
type: SET_DOMAIN_CONFIGURATE, type: SET_DOMAIN_CONFIGURATE,
global_domain_config: domainVal global_domain_config: domainVal
} }
}
//系统配置文件查询接口 access_token profile_code
export const requestSysProfile = async (global_domain_config, params) => {
return await GetRequest(global_domain_config, getUrlParams('/system/sys_profile/search', params))
}
//系统值集查询接口 access_token value_set_code
export const requestSysValueSet = async (global_domain_config, params) => {
return await GetRequest(global_domain_config, getUrlParams('/system/value_set/search', params))
} }
\ No newline at end of file
...@@ -39,6 +39,7 @@ export const EQUIP_SUBMIT_SUCCESS = "EQUIP_SUBMIT_SUCCESS" ...@@ -39,6 +39,7 @@ export const EQUIP_SUBMIT_SUCCESS = "EQUIP_SUBMIT_SUCCESS"
export const EQUIP_SUBMIT_FAILURE = "EQUIP_SUBMIT_FAILURE" export const EQUIP_SUBMIT_FAILURE = "EQUIP_SUBMIT_FAILURE"
export const EQUIP_INIT_DATA = "EQUIP_INIT_DATA" export const EQUIP_INIT_DATA = "EQUIP_INIT_DATA"
export const GET_SUB_DETAIL_OPTION = "GET_SUB_DETAIL_OPTION" export const GET_SUB_DETAIL_OPTION = "GET_SUB_DETAIL_OPTION"
export const GET_CHARGE_DETAILS_OPTION = "GET_CHARGE_DETAILS_OPTION"
//-----------historical order search--------------------- //-----------historical order search---------------------
export const HISTOR_ORDER_SEARCH_NO = "HISTOR_ORDER_SEARCH_NO" export const HISTOR_ORDER_SEARCH_NO = "HISTOR_ORDER_SEARCH_NO"
export const HISTOR_ORDER_SEARCH_DOING = "HISTOR_ORDER_SEARCH_DOING" export const HISTOR_ORDER_SEARCH_DOING = "HISTOR_ORDER_SEARCH_DOING"
......
// export const BaseUrl = "http://192.168.10.188:8200"; // https://obs.uat.sfrx.guke.tech https://sob-os.uat.sfrx.guke.tech export const BaseUrl = "https://obs.uat.guke.tech";
// export const BaseUrlOther = "http://192.168.10.188:8200"; //http://192.168.10.188:8200/v1/dingding/upload_media export const BaseUrlOther = "https://sob-os.uat.guke.tech";
// export const VERSION = '/v1'; // /api/latest export const VERSION = '/api/latest';
export const BaseUrl = "https://obs.uat.sfrx.guke.tech"; // https://obs.uat.sfrx.guke.tech https://sob-os.uat.sfrx.guke.tech
export const BaseUrlOther = "https://sob-os.uat.sfrx.guke.tech"; //http://192.168.10.188:8200/v1/dingding/upload_media
export const VERSION = '/api/latest'; //
export const ACCESS_TOKEN = '201904091445193616b5e3d3a777848dda1de1a8123d0fdf9xw7t566c1S92U88';//未获取到access_token时使用 export const ACCESS_TOKEN = '201904091445193616b5e3d3a777848dda1de1a8123d0fdf9xw7t566c1S92U88';//未获取到access_token时使用
// export let
\ No newline at end of file
...@@ -28,6 +28,7 @@ class PageListArrow extends Component { ...@@ -28,6 +28,7 @@ class PageListArrow extends Component {
isTitInputStyle: PropTypes.bool, isTitInputStyle: PropTypes.bool,
listMaxLines: PropTypes.number, // 文本最大行数 listMaxLines: PropTypes.number, // 文本最大行数
listIsAudio: PropTypes.bool, listIsAudio: PropTypes.bool,
listCellStyle: PropTypes.object
} }
constructor(props) { constructor(props) {
...@@ -46,7 +47,7 @@ class PageListArrow extends Component { ...@@ -46,7 +47,7 @@ class PageListArrow extends Component {
render() { render() {
let {listActOpa, listCallBack, listHasAster, listEditAble, listDefaValue, listItem, listTitle, let {listActOpa, listCallBack, listHasAster, listEditAble, listDefaValue, listItem, listTitle,
listName, listValue, listHasArrow, listOtherInput, otherInput, otherInputCallBack, listInputPlace, listName, listValue, listHasArrow, listOtherInput, otherInput, otherInputCallBack, listInputPlace,
inputCallBack, isTitInputStyle, listMaxLines, listIsAudio} = this.props inputCallBack, isTitInputStyle, listMaxLines, listIsAudio, listCellStyle} = this.props
if(!listMaxLines){ if(!listMaxLines){
listMaxLines = 2 // 默认 listMaxLines = 2 // 默认
} }
...@@ -56,7 +57,7 @@ class PageListArrow extends Component { ...@@ -56,7 +57,7 @@ class PageListArrow extends Component {
activeOpacity={listActOpa} activeOpacity={listActOpa}
onPress={() => {return listCallBack ? listCallBack() : ''}} onPress={() => {return listCallBack ? listCallBack() : ''}}
> >
<CellTextStyle> <CellTextStyle style={listCellStyle ? listCellStyle : ''}>
{ listHasAster ? <AsteriskTextStyle>*</AsteriskTextStyle> : null } { listHasAster ? <AsteriskTextStyle>*</AsteriskTextStyle> : null }
<TitleTextStyle style={isTitInputStyle ? styles.cell_title : ''}>{listItem[listTitle]}</TitleTextStyle> <TitleTextStyle style={isTitInputStyle ? styles.cell_title : ''}>{listItem[listTitle]}</TitleTextStyle>
{ (listEditAble || inputCallBack) ? <ContInputTextStyle { (listEditAble || inputCallBack) ? <ContInputTextStyle
......
...@@ -34,20 +34,13 @@ import { exitLoginStatus } from '../../../action/LoginAction'; ...@@ -34,20 +34,13 @@ import { exitLoginStatus } from '../../../action/LoginAction';
const CONSUM_SEARCH_VALUE_BAR_CODE = 'CONSUM_SEARCH_VALUE_BAR_CODE'; const CONSUM_SEARCH_VALUE_BAR_CODE = 'CONSUM_SEARCH_VALUE_BAR_CODE';
// 耗材明细
class ConsumDetailsPage extends Component { class ConsumDetailsPage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
searchValue: '', searchValue: '',
conDetaOption: [ conDetaOption: [],
// {
// "id": "0",
// item_name: '人工髋关节假体-JS-HB ||| T',
// specification: '3g,Ytg-DG-SZGT',
// serial_number: '2001202001001774',
// select: false
// }
],
allConOption: [], // 所有数据(未筛选过的) allConOption: [], // 所有数据(未筛选过的)
selectShowPopup: false, // 共计已选弹窗 selectShowPopup: false, // 共计已选弹窗
localSelectOption: [], // 已选数据 localSelectOption: [], // 已选数据
......
...@@ -18,7 +18,7 @@ import { show } from '../../../utils/Utils'; ...@@ -18,7 +18,7 @@ import { show } from '../../../utils/Utils';
import { getSubdetailOption } from '../../../action/EquipAction'; import { getSubdetailOption } from '../../../action/EquipAction';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
// 可填写单价
class FillUnitPricePage extends Component { class FillUnitPricePage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
......
...@@ -18,7 +18,7 @@ import { show } from '../../../utils/Utils'; ...@@ -18,7 +18,7 @@ import { show } from '../../../utils/Utils';
import { getSubdetailOption } from '../../../action/EquipAction'; import { getSubdetailOption } from '../../../action/EquipAction';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
// 仅展示明细
class ShowDetailPage extends Component { class ShowDetailPage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -44,7 +44,6 @@ class ShowDetailPage extends Component { ...@@ -44,7 +44,6 @@ class ShowDetailPage extends Component {
// 获取选择的数据 // 获取选择的数据
getLocalSelectedData() { getLocalSelectedData() {
let {localSelectOption} = this.props.navigation.state.params let {localSelectOption} = this.props.navigation.state.params
console.log('localSelectOption----', localSelectOption)
this.setState({ this.setState({
unitPriceOption: localSelectOption unitPriceOption: localSelectOption
}) })
...@@ -192,9 +191,6 @@ const styles = StyleSheet.create({ ...@@ -192,9 +191,6 @@ const styles = StyleSheet.create({
fontSize: second_text_size, fontSize: second_text_size,
color: promary_text_color color: promary_text_color
}, },
fot_btn: { fot_btn: {
width: '100%', width: '100%',
borderRadius: 10 borderRadius: 10
......
// import {BaseUrl, BaseUrlOther, VERSION} from '../base/BaseConstants';
import {VERSION} from '../base/BaseConstants'; import {VERSION} from '../base/BaseConstants';
//post方式请求 //post方式请求
...@@ -18,6 +17,7 @@ export const PostRequest = (BaseUrl, url, paramsObject) => { ...@@ -18,6 +17,7 @@ export const PostRequest = (BaseUrl, url, paramsObject) => {
.then(response => response.json()) .then(response => response.json())
.then(data => data) .then(data => data)
.catch(error => { .catch(error => {
console.error(error)
return {error_code: -3, error_msg:'请求异常,请重试'} return {error_code: -3, error_msg:'请求异常,请重试'}
}) })
} }
...@@ -36,6 +36,7 @@ export const GetRequest = (BaseUrl, url) => { ...@@ -36,6 +36,7 @@ export const GetRequest = (BaseUrl, url) => {
.then(response => response.json()) .then(response => response.json())
.then(data => data) .then(data => data)
.catch(error => { .catch(error => {
console.error(error)
return {error_code: -3, error_msg:'请求异常,请重试'} return {error_code: -3, error_msg:'请求异常,请重试'}
}) })
}; };
...@@ -54,6 +55,7 @@ export const UploadRequest = (BaseUrl, url,datas) => { ...@@ -54,6 +55,7 @@ export const UploadRequest = (BaseUrl, url,datas) => {
.then(response => response.json()) .then(response => response.json())
.then(data => data) .then(data => data)
.catch(error => { .catch(error => {
console.error(error)
return {error_code: -3, error_msg:'请求异常,请重试'} return {error_code: -3, error_msg:'请求异常,请重试'}
}) })
}; };
\ No newline at end of file
...@@ -8,7 +8,8 @@ import { ...@@ -8,7 +8,8 @@ import {
EQUIP_SUBMIT_SUCCESS, EQUIP_SUBMIT_SUCCESS,
EQUIP_SUBMIT_FAILURE, EQUIP_SUBMIT_FAILURE,
EQUIP_INIT_DATA, EQUIP_INIT_DATA,
GET_SUB_DETAIL_OPTION GET_SUB_DETAIL_OPTION,
GET_CHARGE_DETAILS_OPTION
} from '../../base/ActionTypes'; } from '../../base/ActionTypes';
// 器械消耗状态 // 器械消耗状态
...@@ -17,6 +18,7 @@ const defaultState = { ...@@ -17,6 +18,7 @@ const defaultState = {
submit_equip_order_status: EQUIP_SUBMIT_NO, // 提交订单状态 submit_equip_order_status: EQUIP_SUBMIT_NO, // 提交订单状态
equipOrderOption: {}, // 当前选择器临时存储数据 equipOrderOption: {}, // 当前选择器临时存储数据
subDetOption: [], // 选择的消耗明细数据 subDetOption: [], // 选择的消耗明细数据
charDetailOption: [], // 选择的费用明细数据
} }
export default equip = (state = defaultState, action) => { export default equip = (state = defaultState, action) => {
...@@ -54,11 +56,16 @@ export default equip = (state = defaultState, action) => { ...@@ -54,11 +56,16 @@ export default equip = (state = defaultState, action) => {
equip_list_status: EQUIP_CONSU_LIST_NO, equip_list_status: EQUIP_CONSU_LIST_NO,
submit_equip_order_status: EQUIP_SUBMIT_NO, submit_equip_order_status: EQUIP_SUBMIT_NO,
equipOrderOption: {}, equipOrderOption: {},
subDetOption: [] subDetOption: [],
charDetailOption: []
}) })
case GET_SUB_DETAIL_OPTION: case GET_SUB_DETAIL_OPTION:
return Object.assign({}, state, { return Object.assign({}, state, {
subDetOption: action.rawData subDetOption: action.rawData
})
case GET_CHARGE_DETAILS_OPTION:
return Object.assign({}, state, {
charDetailOption: action.rawData
}) })
default: default:
return state; return state;
......
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