Commit dd130d86 by Denglingling

增加【转单】历史订单查询功能,还未对接后端接口

parent 31a18c1f
...@@ -22,6 +22,11 @@ export const requestHistorOrderType = async (global_domain_config, params) => { ...@@ -22,6 +22,11 @@ export const requestHistorOrderType = async (global_domain_config, params) => {
return await GetRequest(global_domain_config, getUrlParams('/system/value_set/search', params)) return await GetRequest(global_domain_config, getUrlParams('/system/value_set/search', params))
} }
// 获取来源借货订单号 parmas={access_token: '', org_code: '', seller_code: '', customer_code: '', collect_header_status: 'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED'}
export const requestHistorSourBorOrdNum = async (global_domain_config, params) => {
return await GetRequest(global_domain_config, getUrlParams('/surgery/collect_order/search', params))
}
// 借货订单查询 params: {access_token: '', ...} // 借货订单查询 params: {access_token: '', ...}
export function requestGetAllBorrow(params) { export function requestGetAllBorrow(params) {
return (dispatch, getState) => { return (dispatch, getState) => {
...@@ -64,7 +69,6 @@ export function requestGetAllConsume(params) { ...@@ -64,7 +69,6 @@ export function requestGetAllConsume(params) {
if(res.error_code == 0) { if(res.error_code == 0) {
let { data: { sur_consume_headers } } = res let { data: { sur_consume_headers } } = res
dispatch(requestSearchSuccess(sur_consume_headers)); dispatch(requestSearchSuccess(sur_consume_headers));
} else if(res.error_code === 41006) { } else if(res.error_code === 41006) {
show('登录过期,请重新登录'); show('登录过期,请重新登录');
dispatch(exitLoginStatus()); dispatch(exitLoginStatus());
...@@ -75,7 +79,7 @@ export function requestGetAllConsume(params) { ...@@ -75,7 +79,7 @@ export function requestGetAllConsume(params) {
} }
}) })
.catch(err => { .catch(err => {
console.log('------err--====requestGetAllBorrow----', Object.keys(err), err) console.log('------err--====requestGetAllConsume----', Object.keys(err), err)
show(err.error); show(err.error);
dispatch(requestSearchFail()); dispatch(requestSearchFail());
}) })
...@@ -87,8 +91,39 @@ export const requestGetLineFormConsume = async (global_domain_config, params) => ...@@ -87,8 +91,39 @@ export const requestGetLineFormConsume = async (global_domain_config, params) =>
return await GetRequest(global_domain_config, getUrlParams('/surgery/consume_line/search', params)) return await GetRequest(global_domain_config, getUrlParams('/surgery/consume_line/search', params))
} }
// 转单订单查询 // 转单订单查询 params: {access_token: '', ...} ----- 待定
export function requestGetAllTrans(params) {
return (dispatch, getState) => {
dispatch(requestSearching())
let {global_domain_config} = getState().login
GetRequest(global_domain_config, getUrlParams('xxxx', params))
.then(res => {
if(res.error_code == 0) {
// let { data: { sur_consume_headers } } = res
// dispatch(requestSearchSuccess(sur_consume_headers));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
} else {
let error_msg = res.error_msg || res.message
show(error_msg);
dispatch(requestSearchFail());
}
})
.catch(err => {
console.log('------err--====requestGetAllTrans----', Object.keys(err), err)
show(err.error);
dispatch(requestSearchFail());
})
}
}
// 转单订单-行表查询 params: {access_token: '', xxx: ''} ----- 待定
export const requestGetLineFormTrans = async (global_domain_config, params) => {
return await GetRequest(global_domain_config, getUrlParams('xxx', params))
}
function requestSearching() { function requestSearching() {
return { return {
......
...@@ -4,7 +4,6 @@ import { ...@@ -4,7 +4,6 @@ import {
Text, Text,
StyleSheet, StyleSheet,
Modal, Modal,
ScrollView,
TouchableOpacity, TouchableOpacity,
SafeAreaView SafeAreaView
} from 'react-native'; } from 'react-native';
......
...@@ -38,12 +38,17 @@ class HeadBackItem extends Component { ...@@ -38,12 +38,17 @@ class HeadBackItem extends Component {
} }
goLogin() { goLogin() {
let { navigation } = this.props let { callback, navigation } = this.props
this.props.exitLoginStatus() this.props.exitLoginStatus()
show('退出登录') show('退出登录')
if(callback && callback instanceof Function) {
callback()
setTimeout(() => { setTimeout(() => {
navigation.navigate('LoginPage') navigation.navigate('LoginPage')
}, 300) }, 500)
} else {
navigation.navigate('LoginPage')
}
} }
render() { render() {
......
...@@ -34,7 +34,8 @@ import { ...@@ -34,7 +34,8 @@ import {
} from '../../base/ActionTypes'; } from '../../base/ActionTypes';
import { import {
requestGetAllBorrow, requestGetAllBorrow,
requestGetAllConsume requestGetAllConsume,
requestGetAllTrans
} from '../../action/HistorAction'; } from '../../action/HistorAction';
import { show, cloneObject } from '../../utils/Utils'; import { show, cloneObject } from '../../utils/Utils';
import moment from 'moment'; import moment from 'moment';
...@@ -56,9 +57,10 @@ class HistoricalOrderPage extends Component { ...@@ -56,9 +57,10 @@ class HistoricalOrderPage extends Component {
title: '消耗订单', title: '消耗订单',
selIsAct: false selIsAct: false
}, },
// { {
// title: '转单订单' title: '转单订单',
// } selIsAct: false
}
], ],
topActiveIndex: 0, topActiveIndex: 0,
contOptionData: [ contOptionData: [
...@@ -89,11 +91,14 @@ class HistoricalOrderPage extends Component { ...@@ -89,11 +91,14 @@ class HistoricalOrderPage extends Component {
"COLLECTED,RETURNING_WAITING_CONFIRM", "COLLECTED,RETURNING_WAITING_CONFIRM",
"RETURNED,CLOSED,REJECTED,CANCELED,CONSUMED" "RETURNED,CLOSED,REJECTED,CANCELED,CONSUMED"
], ],
searchComsumeStatus: [ // 【借货】对应的状态值 searchComsumeStatus: [ // 【消耗】对应的状态值
"N",
"Y"
],
searchTransStatus: [ // 【转单】对应的状态值
"N", "N",
"Y" "Y"
], ],
searchTransStatus: [], // 【转单】对应的状态值
whetherCallClick: false, // 是否调用筛选弹窗的查询 whetherCallClick: false, // 是否调用筛选弹窗的查询
wheShowNoData: false, // 是否展示无数据提示 wheShowNoData: false, // 是否展示无数据提示
...@@ -240,6 +245,7 @@ class HistoricalOrderPage extends Component { ...@@ -240,6 +245,7 @@ class HistoricalOrderPage extends Component {
props.requestGetAllConsume(params) props.requestGetAllConsume(params)
break; break;
case 2: case 2:
props.requestGetAllTrans(params)
break; break;
default: default:
break; break;
...@@ -442,7 +448,7 @@ class HistoricalOrderPage extends Component { ...@@ -442,7 +448,7 @@ class HistoricalOrderPage extends Component {
<Text <Text
style={[ style={[
styles.cont_rig_status, styles.cont_rig_status,
item.local_his_status == '待审核' ? styles.status_audit : '', (item.local_his_status == '待审核' || item.local_his_status == '已提交') ? styles.status_audit : '',
item.local_his_status == '待还货' ? styles.status_return : '', item.local_his_status == '待还货' ? styles.status_return : '',
item.local_his_status == '其他' ? styles.status_other : '' item.local_his_status == '其他' ? styles.status_other : ''
]}> ]}>
...@@ -502,8 +508,8 @@ const styles = StyleSheet.create({ ...@@ -502,8 +508,8 @@ const styles = StyleSheet.create({
borderBottomWidth: 1 borderBottomWidth: 1
}, },
top_touch_cont: { top_touch_cont: {
// width: '33.33333%' width: '33.33333%'
width: '50%' // width: '50%'
}, },
top_inner: { top_inner: {
justifyContent: 'center', justifyContent: 'center',
...@@ -634,6 +640,9 @@ const mapDispatchToProps = (dispatch) => { ...@@ -634,6 +640,9 @@ const mapDispatchToProps = (dispatch) => {
}, },
requestGetAllConsume: (params) => { requestGetAllConsume: (params) => {
dispatch(requestGetAllConsume(params)) dispatch(requestGetAllConsume(params))
},
requestGetAllTrans: (params) => {
dispatch(requestGetAllTrans(params))
} }
} }
} }
......
...@@ -40,7 +40,8 @@ import { ...@@ -40,7 +40,8 @@ import {
import { import {
requestHistorOrganizations, requestHistorOrganizations,
requestHistorSurgeryHospital, requestHistorSurgeryHospital,
requestHistorOrderType requestHistorOrderType,
requestHistorSourBorOrdNum
} from '../../../action/HistorAction'; } from '../../../action/HistorAction';
import { show, dedupQuoteArray, cloneObject } from '../../../utils/Utils'; import { show, dedupQuoteArray, cloneObject } from '../../../utils/Utils';
import moment from 'moment'; import moment from 'moment';
...@@ -172,7 +173,7 @@ class FilterModel extends Component { ...@@ -172,7 +173,7 @@ class FilterModel extends Component {
name: '状态筛选', name: '状态筛选',
status: ['待审核','已消耗'], status: ['待审核','已消耗'],
curStatus: [] curStatus: []
}, { },{
"id": "1", "id": "1",
title: '销售员', title: '销售员',
name: '周星驰', name: '周星驰',
...@@ -182,17 +183,17 @@ class FilterModel extends Component { ...@@ -182,17 +183,17 @@ class FilterModel extends Component {
title: '组织', title: '组织',
name: '请选择', name: '请选择',
value: '' value: ''
}, { },{
"id": "3", "id": "3",
title: '客户名称', title: '客户名称',
name: '请选择', name: '请选择',
value: '' value: ''
}, { },{
"id": "4", "id": "4",
title: '患者姓名', title: '患者姓名',
name: '请输入', name: '请输入',
value: '' value: ''
}, { },{
"id": "5", "id": "5",
title: '病历号', title: '病历号',
name: '请输入', name: '请输入',
...@@ -231,41 +232,80 @@ class FilterModel extends Component { ...@@ -231,41 +232,80 @@ class FilterModel extends Component {
name: '状态筛选', name: '状态筛选',
status: ['已提交','已完成'], status: ['已提交','已完成'],
curStatus: [] curStatus: []
}, { },{
"id": "1", "id": "1",
title: '销售员',
name: '周星驰',
value: 'zhou.xingchi'
},{
"id": "2",
title: '组织', title: '组织',
name: '请选择', name: '请选择',
value: '' value: ''
}, { },{
"id": "2", "id": "3",
title: '客户名称', title: '客户名称',
name: '请选择', name: '请选择',
value: '' value: ''
}, { },{
"id": "3",
title: '主治医生',
name: '请选择',
value: '',
showInput: false,
inputValue: ''
}, {
"id": "4", "id": "4",
title: '手术类型', title: '来源借货订单号',
name: '请选择', name: '请选择',
value: '' value: ''
}, { },{
"id": "5", "id": "5",
title: '申请单号',
name: '请输入',
value: ''
},{
"id": "6",
title: '手术时间', title: '手术时间',
name: '开始时间', name: '开始时间',
value: '', value: '',
dateValue: new Date() dateValue: new Date()
}, { },{
"id": "6", "id": "7",
title: '手术时间', title: '手术时间',
name: '结束时间', name: '结束时间',
value: '', value: '',
dateValue: new Date() dateValue: new Date()
}], },
// {
// "id": "1",
// title: '组织',
// name: '请选择',
// value: ''
// }, {
// "id": "2",
// title: '客户名称',
// name: '请选择',
// value: ''
// }, {
// "id": "3",
// title: '主治医生',
// name: '请选择',
// value: '',
// showInput: false,
// inputValue: ''
// }, {
// "id": "4",
// title: '手术类型',
// name: '请选择',
// value: ''
// }, {
// "id": "5",
// title: '手术时间',
// name: '开始时间',
// value: '',
// dateValue: new Date()
// }, {
// "id": "6",
// title: '手术时间',
// name: '结束时间',
// value: '',
// dateValue: new Date()
// }
],
subBorrowInitListOption: [], // 初始化 [借货] subBorrowInitListOption: [], // 初始化 [借货]
subConsumeInitListOption: [], // 初始化 [消耗] subConsumeInitListOption: [], // 初始化 [消耗]
subTransferInitListOption: [], // 初始化 [转单] subTransferInitListOption: [], // 初始化 [转单]
...@@ -286,20 +326,24 @@ class FilterModel extends Component { ...@@ -286,20 +326,24 @@ class FilterModel extends Component {
value:'运动医学' value:'运动医学'
} }
], ],
localCustomersOption: [], // 当前医院信息:手术医院、收单地点、收货地点、主治医生 localCustomersOption: [], // 当前医院信息:客户名称、收单地点、收货地点、主治医生
searchBorrowStatus: [ // 【借货】对应的状态值 searchBorrowStatus: [ // 【借货】对应的状态值
"ENTERED,SUBMITTED", "ENTERED,SUBMITTED",
"APPROVED,COLLECTING_WAITING_CONFIRM", "APPROVED,COLLECTING_WAITING_CONFIRM",
"COLLECTED,RETURNING_WAITING_CONFIRM", "COLLECTED,RETURNING_WAITING_CONFIRM",
"RETURNED,CLOSED,REJECTED,CANCELED,CONSUMED" "RETURNED,CLOSED,REJECTED,CANCELED,CONSUMED"
], ],
searchComsumeStatus: [ // 【借货】对应的状态值 searchComsumeStatus: [ // 【消耗】对应的状态值
"N",
"Y"
],
searchTransStatus: [ // 【转单】对应的状态值
"N", "N",
"Y" "Y"
], ],
searchTransStatus: [], // 【转单】对应的状态值
errorPopType: false, // 错误提示弹窗 errorPopType: false, // 错误提示弹窗
errorTit: '', // 错误提示文字 errorTit: '', // 错误提示文字
isRightExit: true
} }
} }
...@@ -536,7 +580,7 @@ class FilterModel extends Component { ...@@ -536,7 +580,7 @@ class FilterModel 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, transferListOptionData, currentTitle} = this.state
switch(topActiveIndex) { switch(topActiveIndex) {
case 0: case 0:
if(currentTitle.includes('start')) { if(currentTitle.includes('start')) {
...@@ -561,6 +605,15 @@ class FilterModel extends Component { ...@@ -561,6 +605,15 @@ class FilterModel extends Component {
} }
break; break;
case 2: case 2:
if(currentTitle.includes('start')) {
transferListOptionData[6].name = date
transferListOptionData[6].value = date
transferListOptionData[6].dateValue = new Date(date)
} else if(currentTitle.includes('end')) {
transferListOptionData[7].name = date
transferListOptionData[7].value = date
transferListOptionData[7].dateValue = new Date(date)
}
break; break;
default: default:
break; break;
...@@ -600,7 +653,12 @@ class FilterModel extends Component { ...@@ -600,7 +653,12 @@ class FilterModel extends Component {
} }
break; break;
case 2: case 2:
// transferListOptionData[0].curStatus = ind if(transferListOptionData[0].curStatus.includes(ind)) {
let tempInd = transferListOptionData[0].curStatus.indexOf(ind)
transferListOptionData[0].curStatus.splice(tempInd, 1)
} else {
transferListOptionData[0].curStatus.push(ind)
}
break; break;
default: default:
break; break;
...@@ -608,7 +666,7 @@ class FilterModel extends Component { ...@@ -608,7 +666,7 @@ class FilterModel extends Component {
this.setState({ this.setState({
borrowListOptionData, borrowListOptionData,
consumeListOptionData, consumeListOptionData,
// transferListOptionData transferListOptionData
}) })
} }
...@@ -633,9 +691,9 @@ class FilterModel extends Component { ...@@ -633,9 +691,9 @@ class FilterModel extends Component {
org_code = consumeListOptionData[2].value org_code = consumeListOptionData[2].value
break; break;
case 2: case 2:
// obj.name = transferListOptionData[ind].name obj.name = transferListOptionData[ind].name
// obj.value = transferListOptionData[ind].value obj.value = transferListOptionData[ind].value
// org_code = transferListOptionData[1].value org_code = transferListOptionData[2].value
break; break;
default: default:
break; break;
...@@ -767,7 +825,7 @@ class FilterModel extends Component { ...@@ -767,7 +825,7 @@ class FilterModel extends Component {
if( localCustomersOption.length ) { if( localCustomersOption.length ) {
localCustomersOption.forEach((item, index) => { localCustomersOption.forEach((item, index) => {
if(item.customer_code === borrowListOptionData[3].value) { if(item.customer_code === borrowListOptionData[3].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
...@@ -803,7 +861,7 @@ class FilterModel extends Component { ...@@ -803,7 +861,7 @@ class FilterModel extends Component {
if( localCustomersOption.length ) { if( localCustomersOption.length ) {
localCustomersOption.forEach((item, index) => { localCustomersOption.forEach((item, index) => {
if(item.customer_code === borrowListOptionData[3].value) { if(item.customer_code === borrowListOptionData[3].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
...@@ -850,7 +908,7 @@ class FilterModel extends Component { ...@@ -850,7 +908,7 @@ class FilterModel extends Component {
if( localCustomersOption.length ) { if( localCustomersOption.length ) {
localCustomersOption.forEach((item, index) => { localCustomersOption.forEach((item, index) => {
if(item.customer_code === borrowListOptionData[3].value) { if(item.customer_code === borrowListOptionData[3].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
...@@ -899,7 +957,7 @@ class FilterModel extends Component { ...@@ -899,7 +957,7 @@ class FilterModel extends Component {
// 手术时间/消耗时间 - 筛选 // 手术时间/消耗时间 - 筛选
handleSurDateCheck(typeName) { handleSurDateCheck(typeName) {
// console.log('筛选 - 手术时间---', typeName) // console.log('筛选 - 手术时间---', typeName)
let {topActiveIndex, borrowListOptionData, consumeListOptionData} = this.state let {topActiveIndex, borrowListOptionData, consumeListOptionData, transferListOptionData} = this.state
let tempCurTit = '' let tempCurTit = ''
let tempCurDate = new Date() let tempCurDate = new Date()
switch(topActiveIndex) { switch(topActiveIndex) {
...@@ -920,6 +978,12 @@ class FilterModel extends Component { ...@@ -920,6 +978,12 @@ class FilterModel extends Component {
} }
break; break;
case 2: case 2:
tempCurTit = '手术时间'
if(typeName == 'start') {
tempCurDate = transferListOptionData[6].dateValue
} else if(typeName == 'end') {
tempCurDate = transferListOptionData[7].dateValue
}
break; break;
default: default:
break; break;
...@@ -942,8 +1006,7 @@ class FilterModel extends Component { ...@@ -942,8 +1006,7 @@ class FilterModel extends Component {
name: borrowListOptionData[10].name, name: borrowListOptionData[10].name,
value: borrowListOptionData[10].value value: borrowListOptionData[10].value
} }
}, async () => { }, async() => {
let params = { let params = {
access_token: props.token, access_token: props.token,
value_set_code:'SUR_ORDER_TYPE' value_set_code:'SUR_ORDER_TYPE'
...@@ -1037,9 +1100,76 @@ class FilterModel extends Component { ...@@ -1037,9 +1100,76 @@ class FilterModel extends Component {
}) })
} }
// 来源借货订单号 - 筛选
handleSourOrdCheck() {
let { transferListOptionData } = this.state
let { props } = this
let that = this
this.setState({
currentTitle: '来源借货订单号',
currentItem: {
name: transferListOptionData[4].name,
value: transferListOptionData[4].value
}
}, async() => {
let params = {
access_token: props.token,
org_code: transferListOptionData[2].value,
seller_code: props.userInfo.user_name,
customer_code: '',
// collect_header_status: 'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED'
}
let orgResult = await requestHistorSourBorOrdNum(props.global_domain_config, params)
that.props.callSupLoading(true)
if(orgResult.error_code == 0) {
that.props.callSupLoading(false)
// 修改当前选择器数据
let { data: { surgery_collect_headers } } = orgResult
if(surgery_collect_headers.length === 0) {
that.showErrorModel(`当前来源借货订单号为空`)
return
}
let resultArr = []
surgery_collect_headers.forEach(item => {
let obj = {}
let collect_number = item.collect_number ? item.collect_number : '空'
let surgery_name = item.surgery_name ? item.surgery_name : '空'
let create_time = item.create_time ? moment(item.create_time).format("YYYY-MM-DD") : '空'
let tempName = `${collect_number}-${surgery_name}-${create_time}`
obj.name = tempName,
obj.value = item.collect_number
resultArr.push(obj)
})
let tempOption = [...resultArr]
that.setState({
showTypePop: true,
listCurrentOption: [...tempOption]
})
} else if(orgResult.error_code == 41006) {
that.props.callSupLoading(false)
that.showErrorModel(`登录过期,请重新登录`)
props.exitLoginStatus();
} else {
that.props.callSupLoading(false)
let error_msg = orgResult.error_msg || orgResult.message
that.showErrorModel(error_msg);
}
})
}
// 申请单号 - 筛选
handleRequeNumInput(text) {
// console.log('筛选 - 申请单号---', text)
let {transferListOptionData} = this.state
transferListOptionData[5].value = text
this.setState({
transferListOptionData
})
}
// 判断组织是否为空 // 判断组织是否为空
judgeOrgIsNull() { judgeOrgIsNull() {
let {topActiveIndex, borrowListOptionData, consumeListOptionData } = this.state let {topActiveIndex, borrowListOptionData, consumeListOptionData, transferListOptionData } = this.state
let orgVal = '' let orgVal = ''
let titVal = '' let titVal = ''
switch(topActiveIndex) { switch(topActiveIndex) {
...@@ -1052,6 +1182,8 @@ class FilterModel extends Component { ...@@ -1052,6 +1182,8 @@ class FilterModel extends Component {
titVal = consumeListOptionData[2].title; titVal = consumeListOptionData[2].title;
break; break;
case 2: case 2:
orgVal = transferListOptionData[2].value;
titVal = transferListOptionData[2].title;
break; break;
default: default:
break; break;
...@@ -1065,7 +1197,7 @@ class FilterModel extends Component { ...@@ -1065,7 +1197,7 @@ class FilterModel extends Component {
} }
} }
// 判断手术医院是否为空 // 判断客户名称是否为空
judgeCustomerIsNull() { judgeCustomerIsNull() {
let {topActiveIndex, borrowListOptionData } = this.state let {topActiveIndex, borrowListOptionData } = this.state
let coumVal = '' let coumVal = ''
...@@ -1098,8 +1230,10 @@ class FilterModel extends Component { ...@@ -1098,8 +1230,10 @@ class FilterModel extends Component {
topActiveIndex, topActiveIndex,
borrowListOptionData, borrowListOptionData,
consumeListOptionData, consumeListOptionData,
transferListOptionData,
subBorrowInitListOption, subBorrowInitListOption,
subConsumeInitListOption subConsumeInitListOption,
subTransferInitListOption
} = this.state } = this.state
switch(topActiveIndex) { switch(topActiveIndex) {
case 0: case 0:
...@@ -1115,6 +1249,10 @@ class FilterModel extends Component { ...@@ -1115,6 +1249,10 @@ class FilterModel extends Component {
}) })
break; break;
case 2: case 2:
transferListOptionData = cloneObject(subTransferInitListOption)
this.setState({
transferListOptionData
})
break; break;
default: default:
break; break;
...@@ -1128,10 +1266,13 @@ class FilterModel extends Component { ...@@ -1128,10 +1266,13 @@ class FilterModel extends Component {
topActiveIndex, topActiveIndex,
borrowListOptionData, borrowListOptionData,
consumeListOptionData, consumeListOptionData,
transferListOptionData,
searchBorrowStatus, searchBorrowStatus,
searchComsumeStatus, searchComsumeStatus,
searchTransStatus,
borrowSearchOption, borrowSearchOption,
consumeSearchOption consumeSearchOption,
transferSearchOption
} = this.state } = this.state
let {props} = this let {props} = this
let that = this let that = this
...@@ -1212,8 +1353,10 @@ class FilterModel extends Component { ...@@ -1212,8 +1353,10 @@ class FilterModel extends Component {
topActiveIndex, topActiveIndex,
borrowListOptionData, borrowListOptionData,
consumeListOptionData, consumeListOptionData,
transferListOptionData,
subBorrowInitListOption, subBorrowInitListOption,
subConsumeInitListOption, subConsumeInitListOption,
subTransferInitListOption,
topProcOptionList topProcOptionList
} = this.state } = this.state
...@@ -1233,6 +1376,11 @@ class FilterModel extends Component { ...@@ -1233,6 +1376,11 @@ class FilterModel extends Component {
this.props.callSupTopList(topProcOptionList) this.props.callSupTopList(topProcOptionList)
break; break;
case 2: case 2:
topProcOptionList[2].selIsAct = this.bothArrayIsCom(transferListOptionData, subTransferInitListOption);
this.setState({
topProcOptionList
})
this.props.callSupTopList(topProcOptionList)
break; break;
default: default:
break; break;
...@@ -1846,13 +1994,24 @@ class FilterModel extends Component { ...@@ -1846,13 +1994,24 @@ class FilterModel extends Component {
<Text style={styles.sea_qui_tit}>快捷筛选</Text> <Text style={styles.sea_qui_tit}>快捷筛选</Text>
<View style={styles.sea_qui_box}> <View style={styles.sea_qui_box}>
<View style={styles.qui_cell}> <View style={styles.qui_cell}>
<Text style={styles.qui_cell_tit}>销售员</Text>
<TouchableOpacity
activeOpacity={1}
style={styles.qui_cell_rig}
>
<Text style={styles.cell_rig_sel}>{transferListOptionData[1].name}</Text>
<View style={styles.arr_icon_box}>
</View>
</TouchableOpacity>
</View>
<View style={styles.qui_cell}>
<Text style={styles.qui_cell_tit}>组织</Text> <Text style={styles.qui_cell_tit}>组织</Text>
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={styles.qui_cell_rig} style={styles.qui_cell_rig}
// onPress={() => this.handleOrganizationCheck() } // onPress={() => this.handleOrganizationCheck() }
> >
<Text style={styles.cell_rig_sel}>请选择</Text> <Text style={styles.cell_rig_sel}>{transferListOptionData[2].name}</Text>
<View style={styles.arr_icon_box}> <View style={styles.arr_icon_box}>
<Image source={require('../../../images/arr_rig.png')} style={icon_style} /> <Image source={require('../../../images/arr_rig.png')} style={icon_style} />
</View> </View>
...@@ -1865,47 +2024,38 @@ class FilterModel extends Component { ...@@ -1865,47 +2024,38 @@ class FilterModel extends Component {
style={styles.qui_cell_rig} style={styles.qui_cell_rig}
// onPress={() => this.handleCustomerCheck() } // onPress={() => this.handleCustomerCheck() }
> >
<Text style={styles.cell_rig_sel}>请选择</Text> <Text style={styles.cell_rig_sel}>{transferListOptionData[3].name}</Text>
<View style={styles.arr_icon_box}> <View style={styles.arr_icon_box}>
<Image source={require('../../../images/arr_rig.png')} style={icon_style} /> <Image source={require('../../../images/arr_rig.png')} style={icon_style} />
</View> </View>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<View style={styles.qui_cell}> <View style={styles.qui_cell}>
<Text style={styles.qui_cell_tit}>主治医生</Text> <Text style={styles.qui_cell_tit}>来源借货订单号</Text>
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={styles.qui_cell_inp}>
<TextInput
placeholder={'请输入'}
style={[styles.cell_rig_sel, styles.cell_rig_input]}
placeholderTextColor = {placehold_text_color}
underlineColorAndroid = {'transparent'}
onChangeText={(text) => this.handleDoctorInput(text)}
/>
</TouchableOpacity>
{/* <TouchableOpacity
activeOpacity={.8}
style={styles.qui_cell_rig} style={styles.qui_cell_rig}
onPress={() => this.handleDoctorCheck() } // onPress={() => this.handleSourOrdCheck() }
> >
<Text style={styles.cell_rig_sel}>请选择</Text> <Text style={styles.cell_rig_sel}>{transferListOptionData[4].name}</Text>
<View style={styles.arr_icon_box}> <View style={styles.arr_icon_box}>
<Image source={require('../../../images/arr_rig.png')} style={icon_style} /> <Image source={require('../../../images/arr_rig.png')} style={icon_style} />
</View> </View>
</TouchableOpacity> */} </TouchableOpacity>
</View> </View>
<View style={styles.qui_cell}> <View style={styles.qui_cell}>
<Text style={styles.qui_cell_tit}>手术类型</Text> <Text style={styles.qui_cell_tit}>申请单号</Text>
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={styles.qui_cell_rig} style={styles.qui_cell_inp}>
// onPress={() => this.handleSurTypeCheck() } <TextInput
> placeholder={'请输入'}
<Text style={styles.cell_rig_sel}>请选择</Text> style={[styles.cell_rig_sel, styles.cell_rig_input]}
<View style={styles.arr_icon_box}> placeholderTextColor = {placehold_text_color}
<Image source={require('../../../images/arr_rig.png')} style={icon_style} /> underlineColorAndroid = {'transparent'}
</View> // onChangeText={(text) => this.handleRequeNumInput(text)}
defaultValue={transferListOptionData[5].value}
/>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<View style={styles.qui_cell}> <View style={styles.qui_cell}>
...@@ -1914,9 +2064,9 @@ class FilterModel extends Component { ...@@ -1914,9 +2064,9 @@ class FilterModel extends Component {
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={styles.qui_date_box} style={styles.qui_date_box}
// onPress={() => this.handleSurDateCheck('start') } onPress={() => this.handleSurDateCheck('start') }
> >
<Text style={styles.qui_date_inp}>开始日期</Text> <Text style={styles.qui_date_inp}>{transferListOptionData[6].name}</Text>
<View style={styles.date_icon_box}> <View style={styles.date_icon_box}>
<Image source={require('../../../images/date_icon.png')} style={icon_style} /> <Image source={require('../../../images/date_icon.png')} style={icon_style} />
</View> </View>
...@@ -1925,9 +2075,9 @@ class FilterModel extends Component { ...@@ -1925,9 +2075,9 @@ class FilterModel extends Component {
<TouchableOpacity <TouchableOpacity
activeOpacity={.8} activeOpacity={.8}
style={styles.qui_date_box} style={styles.qui_date_box}
// onPress={() => this.handleSurDateCheck('end') } onPress={() => this.handleSurDateCheck('end') }
> >
<Text style={styles.qui_date_inp}>结束日期</Text> <Text style={styles.qui_date_inp}>{transferListOptionData[7].name}</Text>
<View style={styles.date_icon_box}> <View style={styles.date_icon_box}>
<Image source={require('../../../images/date_icon.png')} style={icon_style} /> <Image source={require('../../../images/date_icon.png')} style={icon_style} />
</View> </View>
...@@ -2021,7 +2171,8 @@ class FilterModel extends Component { ...@@ -2021,7 +2171,8 @@ class FilterModel extends Component {
render() { render() {
let {navigation} = this.props let { navigation } = this.props
let { isRightExit } = this.state
return ( return (
<View style={styles.dia_container}> <View style={styles.dia_container}>
<Modal <Modal
...@@ -2036,7 +2187,7 @@ class FilterModel extends Component { ...@@ -2036,7 +2187,7 @@ class FilterModel extends Component {
barStyle = 'light-content' barStyle = 'light-content'
/> />
<SafeAreaView style={safe_view}> <SafeAreaView style={safe_view}>
<HeadBackItem title={'骨科智慧仓'} navigation={navigation} callback={() => this.handelGoBack()} /> <HeadBackItem title={'骨科智慧仓'} navigation={navigation} callback={() => this.handelGoBack()} isRightExit={isRightExit} />
<View style={styles.container}> <View style={styles.container}>
{this.renderDialog()} {this.renderDialog()}
</View> </View>
...@@ -2083,8 +2234,8 @@ const styles = StyleSheet.create({ ...@@ -2083,8 +2234,8 @@ const styles = StyleSheet.create({
borderBottomWidth: 1 borderBottomWidth: 1
}, },
top_touch_cont: { top_touch_cont: {
// width: '33.33333%' width: '33.33333%'
width: '50%' // width: '50%'
}, },
top_inner: { top_inner: {
justifyContent: 'center', justifyContent: 'center',
......
...@@ -29,7 +29,8 @@ import { CellTextStyle } from '../../common/CellTextStyle'; ...@@ -29,7 +29,8 @@ import { CellTextStyle } from '../../common/CellTextStyle';
import LodingModel from '../../common/LodingModel'; import LodingModel from '../../common/LodingModel';
import { import {
requestGetLineFormBorrow, requestGetLineFormBorrow,
requestGetLineFormConsume requestGetLineFormConsume,
requestGetLineFormTrans
} from '../../../action/HistorAction'; } from '../../../action/HistorAction';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { show } from '../../../utils/Utils'; import { show } from '../../../utils/Utils';
...@@ -125,6 +126,7 @@ class LineOrderPage extends Component { ...@@ -125,6 +126,7 @@ class LineOrderPage extends Component {
break; break;
case 2: case 2:
// 转单 // 转单
this.getReqTransLineData(data)
break; break;
default: default:
break; break;
...@@ -210,6 +212,48 @@ class LineOrderPage extends Component { ...@@ -210,6 +212,48 @@ class LineOrderPage extends Component {
} }
} }
// 获取转单订单行数据 -- 待定
async getReqTransLineData(supData) {
// let that = this
// let {consumaData} = that.state
// let {props} = this
// that.changeSubLoding(true)
// let params = {
// access_token: props.token,
// consume_order_number: supData.local_his_number
// }
// let conResult = await requestGetLineFormTrans(props.global_domain_config, params)
// if(conResult.error_code == 0) {
// that.changeSubLoding(false)
// // 成功
// let {sur_consume_lines} = conResult.data
// let tempSum = 0
// let tempConQuanSum = 0
// sur_consume_lines.length && sur_consume_lines.forEach(item => {
// if(item.sale_price) {
// tempSum += Number(item.sale_price)
// }
// if(item.consumed_quantity) {
// tempConQuanSum += Number(item.consumed_quantity)
// }
// })
// consumaData.subOption = [...sur_consume_lines]
// consumaData.allOptSum = tempSum
// consumaData.allConmQuanSum = tempConQuanSum
// that.setState({
// consumaData
// })
// } else if(conResult.error_code == 41006) {
// that.changeSubLoding(false)
// show('登录过期,请重新登录');
// props.exitLoginStatus();
// } else {
// that.changeSubLoding(false)
// let error_msg = conResult.error_msg || conResult.message
// show(error_msg);
// }
}
// 耗材明细 隐藏/显示子项 // 耗材明细 隐藏/显示子项
handleDetailBtmCheck(flagType) { handleDetailBtmCheck(flagType) {
let {consumaData} = this.state let {consumaData} = this.state
...@@ -403,7 +447,7 @@ class LineOrderPage extends Component { ...@@ -403,7 +447,7 @@ class LineOrderPage extends Component {
<View style={styles.fo_sta_inner}> <View style={styles.fo_sta_inner}>
<Text style={[ <Text style={[
styles.fo_sta_txt, styles.fo_sta_txt,
orderSupOptions.local_his_status == '待审核' ? styles.status_audit : '', (orderSupOptions.local_his_status == '待审核' || orderSupOptions.local_his_status == '已提交') ? styles.status_audit : '',
orderSupOptions.local_his_status == '待还货' ? styles.status_return : '', orderSupOptions.local_his_status == '待还货' ? styles.status_return : '',
orderSupOptions.local_his_status == '其他' ? styles.status_other : '' orderSupOptions.local_his_status == '其他' ? styles.status_other : ''
]}> ]}>
......
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