Commit a266f6aa by Denglingling

完善转单历史查询接口,调整部分布局

(cherry picked from commit b5e41d1d)
parent 6d428278
......@@ -103,12 +103,9 @@ export function requestGetAllTrans(params) {
let {global_domain_config} = getState().login
GetRequest(global_domain_config, getUrlParams('/surgery/trans_header/search', params))
.then(res => {
console.log('--requestGetAllTrans-----res------', res)
if(res.error_code == 0) {
let { data: { sur_order_transfer_head_chs_v } } = res
dispatch(requestSearchSuccess(sur_order_transfer_head_chs_v));
} else if(res.error_code === 41006) {
show('登录过期,请重新登录');
dispatch(exitLoginStatus());
......
......@@ -37,7 +37,7 @@ import {
requestGetAllConsume,
requestGetAllTrans
} from '../../action/HistorAction';
import { show, cloneObject } from '../../utils/Utils';
import { show, cloneObject, dedupQuoteArray } from '../../utils/Utils';
import moment from 'moment';
import FilterModel from './module/FilterModel';
......@@ -165,7 +165,6 @@ class HistoricalOrderPage extends Component {
return
}
contOptionData = cloneObject(historOrderOption)
console.log('contOptionData--------', contOptionData)
switch(topActiveIndex) {
case 0:
contOptionData = contOptionData.map((supItem, ind) => {
......@@ -238,8 +237,6 @@ class HistoricalOrderPage extends Component {
default:
break;
}
console.log('------contOptionData-------', contOptionData)
this.setState({
contOptionData
})
......@@ -305,7 +302,6 @@ class HistoricalOrderPage extends Component {
this.setState({
isShowSelect: !isShowSelect
})
// 判断筛选颜色变化!!!!!===
}
// 关闭筛选弹窗 回调
......@@ -389,7 +385,6 @@ class HistoricalOrderPage extends Component {
}
</View>
</TouchableOpacity>
{/* 筛选弹窗 */}
<FilterModel
show={isShowSelect}
......@@ -403,7 +398,6 @@ class HistoricalOrderPage extends Component {
callSupClick={whetherCallClick}
callSupTopList={(data) => this.handleChangeTopList(data) }
/>
</View>
</View>
......@@ -424,8 +418,7 @@ class HistoricalOrderPage extends Component {
</TouchableOpacity>
</View>
: null
}
}
{/* 底部每一列数据 */}
{
contOptionData.map((item, index) =>
......@@ -452,7 +445,7 @@ class HistoricalOrderPage extends Component {
tempTit = '结单标识:'
tempNum = item.surgery_collect_number // 还是显示借货单号,但是接口还是传递消耗单号
}else if(topActiveIndex == 2) {
tempTit = '目标借货订单:'
tempTit = '目标借货订单:'
tempNum = item.local_his_number
}
......@@ -473,6 +466,18 @@ class HistoricalOrderPage extends Component {
<Text style={styles.cont_tip}>
{item.local_his_time}
</Text>
{
topActiveIndex == 2 ?
<Text style={styles.cont_tip}>
来源借货订单号:{item.source_surgery_order_number}
</Text> : null
}
{
topActiveIndex == 2 ?
<Text style={styles.cont_tip}>
{item.source_surgery_date ? moment(item.source_surgery_date).format('YYYY/MM/DD HH:mm') : '无'}
</Text> : null
}
</View>
<View style={styles.cont_rig}>
<Text
......@@ -501,11 +506,8 @@ class HistoricalOrderPage extends Component {
render() {
return (
<View style={styles.hist_main}>
{ this.renderContItem() }
{this.renderLodingItem()}
</View>
);
}
......
......@@ -343,7 +343,7 @@ class FilterModel extends Component {
let {state, props} = this
let {borrowListOptionData, consumeListOptionData, transferListOptionData} = this.state
let that = this
this.setState({
that.setState({
subBorrowInitListOption: cloneObject(borrowListOptionData), // 存储初始化数据,重置时付此值
subConsumeInitListOption: cloneObject(consumeListOptionData),
subTransferInitListOption: cloneObject(transferListOptionData),
......@@ -351,7 +351,7 @@ class FilterModel extends Component {
if(borrowListOptionData[1].name !== props.userInfo.person_name) {
borrowListOptionData[1].name = props.userInfo.person_name
borrowListOptionData[1].value = props.userInfo.user_name
this.setState({
that.setState({
borrowListOptionData,
subBorrowInitListOption: cloneObject(borrowListOptionData)
})
......@@ -359,7 +359,7 @@ class FilterModel extends Component {
if(consumeListOptionData[1].name !== props.userInfo.person_name) {
consumeListOptionData[1].name = props.userInfo.person_name
consumeListOptionData[1].value = props.userInfo.user_name
this.setState({
that.setState({
consumeListOptionData,
subConsumeInitListOption: cloneObject(consumeListOptionData)
})
......@@ -367,7 +367,7 @@ class FilterModel extends Component {
if(transferListOptionData[1].name !== props.userInfo.person_name) {
transferListOptionData[1].name = props.userInfo.person_name
transferListOptionData[1].value = props.userInfo.user_name
this.setState({
that.setState({
transferListOptionData,
subTransferInitListOption: cloneObject(transferListOptionData)
})
......@@ -379,11 +379,11 @@ class FilterModel extends Component {
let {borrowListOptionData, consumeListOptionData, transferListOptionData} = this.state
borrowListOptionData[0].curStatus = [0, 1, 2] // 默认勾选【待审核】、【待出库】、【待还货】
consumeListOptionData[0].curStatus = [0] // 默认勾选【待审核】
// transferListOptionData[0].curStatus = [3] // 默认勾选【已提交】
transferListOptionData[0].curStatus = [3] // 默认勾选【已提交】
this.setState({
borrowListOptionData,
consumeListOptionData,
// transferListOptionData
transferListOptionData
})
}
......@@ -473,8 +473,6 @@ class FilterModel extends Component {
// 选择器弹窗回调函数
handleCallBack(item, itemTitle) {
// console.warn('item------', item)
// console.warn('item-itemTitle-----',itemTitle)
let { topActiveIndex, borrowListOptionData, consumeListOptionData, transferListOptionData} = this.state
let self = this
this.setState({
......@@ -567,7 +565,6 @@ class FilterModel extends Component {
// 日期选择器回调
dateModalCallback(date) {
// console.warn('date------', date)
let {topActiveIndex, borrowListOptionData, consumeListOptionData, transferListOptionData, currentTitle} = this.state
switch(topActiveIndex) {
case 0:
......@@ -594,13 +591,13 @@ class FilterModel extends Component {
break;
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)
} else if(currentTitle.includes('end')) {
transferListOptionData[8].name = date
transferListOptionData[8].value = date
transferListOptionData[8].dateValue = new Date(date)
}
break;
default:
......@@ -622,7 +619,6 @@ class FilterModel extends Component {
// 状态 - 筛选
statusChangeCheck(ind) {
let {topActiveIndex, borrowListOptionData, consumeListOptionData, transferListOptionData} = this.state
// console.log('筛选 - 状态---', ind, topActiveIndex)
switch(topActiveIndex) {
case 0:
if(borrowListOptionData[0].curStatus.includes(ind)) {
......@@ -691,7 +687,6 @@ class FilterModel extends Component {
// 组织 - 筛选
handleOrganizationCheck() {
// console.log('筛选 - 组织---')
let {props} = this
let that = this
let tempCurr = this.getCurrentOption(2)
......@@ -735,7 +730,6 @@ class FilterModel extends Component {
// 客户名称 - 筛选
handleCustomerCheck() {
// console.log('筛选 - 客户名称---')
if(!this.judgeOrgIsNull()) {
return
}
......@@ -796,7 +790,6 @@ class FilterModel extends Component {
// 收单地点 - 筛选
handleBillCheck() {
// console.log('筛选 - 收单地点---')
if(!this.judgeOrgIsNull() || !this.judgeCustomerIsNull()) {
return
}
......@@ -832,7 +825,6 @@ class FilterModel extends Component {
// 收货地点 - 筛选
handleShipCheck() {
// console.log('筛选 - 收货地点---')
if(!this.judgeOrgIsNull() || !this.judgeCustomerIsNull()) {
return
}
......@@ -867,7 +859,6 @@ class FilterModel extends Component {
// 主治医生 - 筛选
handleDoctorCheck(text) {
// console.log('筛选 - 主治医生---', text)
if(!this.judgeOrgIsNull() || !this.judgeCustomerIsNull()) {
return
}
......@@ -918,14 +909,8 @@ class FilterModel extends Component {
}
}
// 临时-----------
handleDoctorInput(text) {
console.log('筛选 - 主治医生---', text)
}
// 手术类型 - 筛选
handleSurTypeCheck() {
// console.log('筛选 - 手术类型---')
let {borrowListOptionData, surgeryTypeOption} = this.state
let that = this
this.setState({
......@@ -944,7 +929,6 @@ class FilterModel extends Component {
// 手术时间/消耗时间 - 筛选
handleSurDateCheck(typeName) {
// console.log('筛选 - 手术时间---', typeName)
let {topActiveIndex, borrowListOptionData, consumeListOptionData, transferListOptionData} = this.state
let tempCurTit = ''
let tempCurDate = new Date()
......@@ -1032,7 +1016,6 @@ class FilterModel extends Component {
// 患者姓名 - 筛选
handlePatNameInput(text) {
// console.log('筛选 - 患者姓名---', text)
let {consumeListOptionData} = this.state
consumeListOptionData[4].value = text
this.setState({
......@@ -1042,7 +1025,6 @@ class FilterModel extends Component {
// 病历号 - 筛选
handleRecordNumInput(text) {
// console.log('筛选 - 病历号---', text)
let {consumeListOptionData} = this.state
consumeListOptionData[5].value = text
this.setState({
......@@ -1052,7 +1034,6 @@ class FilterModel extends Component {
// 床位 - 筛选
handleBedInput(text) {
// console.log('筛选 - 床位---', text)
let {consumeListOptionData} = this.state
consumeListOptionData[8].value = text
this.setState({
......@@ -1062,7 +1043,6 @@ class FilterModel extends Component {
// 住院号 - 筛选
handleHospitalNumInput(text) {
// console.log('筛选 - 住院号---', text)
let {consumeListOptionData} = this.state
consumeListOptionData[9].value = text
this.setState({
......@@ -1104,9 +1084,7 @@ class FilterModel extends Component {
access_token: props.token,
seller_code: props.userInfo.user_name
}
console.log('目标借货订单=========params-----', params)
let orgResult = await requestHistorTarOrSourOrd(props.global_domain_config, params)
console.log('orgResult-----', orgResult)
that.props.callSupLoading(true)
if(orgResult.error_code == 0) {
that.props.callSupLoading(false)
......@@ -1160,9 +1138,7 @@ class FilterModel extends Component {
access_token: props.token,
seller_code: props.userInfo.user_name
}
console.log('来源借货订单号=========params-----', params)
let orgResult = await requestHistorTarOrSourOrd(props.global_domain_config, params)
console.log('来源借货订单号=====orgResult-----', orgResult)
that.props.callSupLoading(true)
if(orgResult.error_code == 0) {
that.props.callSupLoading(false)
......@@ -1202,7 +1178,6 @@ class FilterModel extends Component {
// 申请单号 - 筛选
handleRequeNumInput(text) {
// console.log('筛选 - 申请单号---', text)
let {transferListOptionData} = this.state
transferListOptionData[6].value = text
this.setState({
......@@ -1232,7 +1207,6 @@ class FilterModel extends Component {
break;
}
if(!orgVal) {
// show(`请先选择${titVal}`)
this.showErrorModel(`请先选择${titVal}`)
return false
} else {
......@@ -1258,7 +1232,6 @@ class FilterModel extends Component {
break;
}
if(!coumVal) {
// show(`请先选择${titVal}`)
this.showErrorModel(`请先选择${titVal}`)
return false
} else {
......@@ -1268,7 +1241,6 @@ class FilterModel extends Component {
// 重置 - 筛选
handleSubResetCheck() {
// console.log('筛选 - 重置---')
let {
topActiveIndex,
borrowListOptionData,
......@@ -1304,7 +1276,6 @@ class FilterModel extends Component {
// 确定 - 筛选 传递参数给父组件
handleFilterSubmitCheck() {
// console.log('筛选 - 确定---')
let {
topActiveIndex,
borrowListOptionData,
......@@ -1329,8 +1300,12 @@ class FilterModel extends Component {
tempSubOption = {...borrowSearchOption}
if(borrowListOptionData[0].curStatus.length) {
let tempSta = ''
borrowListOptionData[0].curStatus.forEach(item => {
tempSta += searchBorrowStatus[item]+','
borrowListOptionData[0].curStatus.forEach((item, index) => {
if(index === (borrowListOptionData[0].curStatus.length - 1)) {
tempSta += searchBorrowStatus[item]
} else {
tempSta += searchBorrowStatus[item]+','
}
})
tempSubOption.collect_header_status = tempSta
} else {
......@@ -1351,11 +1326,9 @@ class FilterModel extends Component {
tempSubOption.surgery_date_to = borrowListOptionData[9].value
tempSubOption.order_type_code = borrowListOptionData[10].value
params = Object.assign({}, params, tempSubOption)
props.callSupSubmit(params)
that.changeSeaColorAct() // 改变筛选颜色
that.closeModal() // 关闭弹窗
break;
case 1:
tempSubOption = {...consumeSearchOption}
......@@ -1376,18 +1349,20 @@ class FilterModel extends Component {
tempSubOption.hospitalization_number = consumeListOptionData[9].value
tempSubOption.settled_flag = consumeListOptionData[10].isRedio
params = Object.assign({}, params, tempSubOption)
props.callSupSubmit(params)
that.changeSeaColorAct() // 改变筛选颜色
that.closeModal() // 关闭弹窗
break;
case 2:
tempSubOption = {...transferSearchOption}
if(transferListOptionData[0].curStatus.length) {
let tempSta = ''
transferListOptionData[0].curStatus.forEach(item => {
tempSta += searchTransStatus[item]+','
transferListOptionData[0].curStatus.forEach((item, index) => {
if(index === (transferListOptionData[0].curStatus.length - 1)) {
tempSta += searchTransStatus[item]
} else {
tempSta += searchTransStatus[item]+','
}
})
tempSubOption.header_status = tempSta
} else {
......@@ -1396,22 +1371,18 @@ class FilterModel extends Component {
tempSubOption.seller_code = transferListOptionData[1].value
tempSubOption.org_code = transferListOptionData[2].value
tempSubOption.destination_customer_code = transferListOptionData[3].value
tempSubOption.source_customer_code = transferListOptionData[3].value
tempSubOption.source_customer_code = tempSubOption.destination_customer_code
tempSubOption.destination_surgery_collect_number = transferListOptionData[4].value
tempSubOption.source_surgery_order_number = transferListOptionData[5].value
tempSubOption.order_number = transferListOptionData[6].value
tempSubOption.source_surgery_date_from = transferListOptionData[7].value
tempSubOption.source_surgery_date_to = transferListOptionData[8].value
tempSubOption.destination_surgery_date_from = transferListOptionData[7].value
tempSubOption.destination_surgery_date_to = transferListOptionData[8].value
tempSubOption.source_surgery_date_from = transferListOptionData[7].value ? moment(transferListOptionData[7].value).format('YYYY-MM-DDTHH:mm:ss') : ''
tempSubOption.source_surgery_date_to = transferListOptionData[8].value ? moment(transferListOptionData[8].value).format('YYYY-MM-DDTHH:mm:ss') : ''
tempSubOption.destination_surgery_date_from = tempSubOption.source_surgery_date_from
tempSubOption.destination_surgery_date_to = tempSubOption.source_surgery_date_to
params = Object.assign({}, params, tempSubOption)
console.log('-----params----', params)
props.callSupSubmit(params)
that.changeSeaColorAct() // 改变筛选颜色
that.closeModal() // 关闭弹窗
break;
default:
break;
......@@ -1434,21 +1405,21 @@ class FilterModel extends Component {
switch(topActiveIndex) {
case 0:
topProcOptionList[0].selIsAct = this.bothArrayIsCom(borrowListOptionData, subBorrowInitListOption);
topProcOptionList[0].selIsAct = Boolean(this.bothArrayIsCom(borrowListOptionData, subBorrowInitListOption));
this.setState({
topProcOptionList
})
this.props.callSupTopList(topProcOptionList)
break;
case 1:
topProcOptionList[1].selIsAct = this.bothArrayIsCom(consumeListOptionData, subConsumeInitListOption);
topProcOptionList[1].selIsAct = Boolean(this.bothArrayIsCom(borrowListOptionData, subBorrowInitListOption));
this.setState({
topProcOptionList
})
this.props.callSupTopList(topProcOptionList)
break;
case 2:
topProcOptionList[2].selIsAct = this.bothArrayIsCom(transferListOptionData, subTransferInitListOption);
topProcOptionList[2].selIsAct = Boolean(this.bothArrayIsCom(transferListOptionData, subTransferInitListOption));
this.setState({
topProcOptionList
})
......@@ -1470,15 +1441,17 @@ class FilterModel extends Component {
if(arr[i][key] instanceof Array && newArr[i][key] instanceof Array) {
comFlag = that.bothArrayIsCom(arr[i][key], newArr[i][key])
} else if(newArr[i][key] != arr[i][key]) {
comFlag = true;
break otherFor;
if(key === 'dateValue' && (String(new Date(newArr[i][key])) == String(new Date(arr[i][key])))) {
continue;
} else {
comFlag = true;
break otherFor;
}
}
}
} else {
if(newArr[i] != arr[i]) {
comFlag = true;
break otherFor;
}
} else if(newArr.length !== arr.length || newArr[i] != arr[i]){
comFlag = true;
break otherFor;
}
}
return comFlag;
......@@ -1581,7 +1554,6 @@ class FilterModel extends Component {
}
</View>
</TouchableOpacity>
{
isVisible ?
<View style={styles.sea_main}>
......@@ -1591,7 +1563,6 @@ class FilterModel extends Component {
</View>
: null
}
</View>
</View>
......@@ -2042,24 +2013,6 @@ class FilterModel extends Component {
</TouchableOpacity>
)
}
{/* <TouchableOpacity
activeOpacity={.8}
style={[styles.sta_btn, styles.sta_btn_act]}
// onPress={() => this.statusChangeCheck(transferListOptionData[0].status[0])}
>
<Text style={[styles.btn_txt, styles.btn_txt_act]}>已提交</Text>
<View style={styles.btn_act_icon}>
<Image source={require('../../../images/his_ord_sel.png')} style={icon_style} />
</View>
</TouchableOpacity>
<TouchableOpacity
activeOpacity={.8}
style={styles.sta_btn}
// onPress={() => this.statusChangeCheck(transferListOptionData[0].status[0])}
>
<Text style={styles.btn_txt}>已完成</Text>
</TouchableOpacity> */}
</View>
</View>
<View style={styles.sea_qui_select}>
......@@ -2207,7 +2160,6 @@ class FilterModel extends Component {
// 返回日期选择器
renderDateModel() {
let { currentDateVal, dateModelPop } = this.state
// console.warn('弹窗--日期---,', currentDateVal)
return (
<DateModel
date={currentDateVal}
......@@ -2227,7 +2179,6 @@ class FilterModel extends Component {
currentTitle,
showTypePop,
} = this.state
// console.warn('弹窗--选择器---,', listCurrentOption)
return (
<SafeAreaView style={styles.item_container}>
<DialogModel
......@@ -2385,7 +2336,7 @@ const styles = StyleSheet.create({
sea_scroll: {},
sea_sel_opt: {
paddingHorizontal: 20,
paddingBottom: 40
paddingBottom: 60
},
sea_stu_select: {
......
......@@ -223,8 +223,6 @@ class LineOrderPage extends Component {
order_number: supData.order_number
}
let conResult = await requestGetLineFormTrans(props.global_domain_config, params)
console.log('params========', params)
console.log('conResult========', conResult)
if(conResult.error_code == 0) {
that.changeSubLoding(false)
// 成功
......@@ -364,7 +362,7 @@ class LineOrderPage extends Component {
} else if(supIndex == 1) {
tempTit.push('结单标识:', '消耗时间:')
} else if(supIndex == 2) {
tempTit.push('目标借货订单:', '手术时间:')
tempTit.push('目标借货订单:', '手术时间:')
}
return (
......@@ -403,11 +401,22 @@ class LineOrderPage extends Component {
</Text>
</View> : null
}
<View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}>
客户名称:{orderSupOptions.customer_name ? orderSupOptions.customer_name : '无'}
</Text>
</View>
{
supIndex !== 2 ?
<View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}>
客户名称:{orderSupOptions.customer_name ? orderSupOptions.customer_name : '无'}
</Text>
</View> :
<View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}>
目标客户名称:{orderSupOptions.destination_customer_name ? orderSupOptions.destination_customer_name : '无'}
</Text>
<Text style={styles.fo_tip_txt}>
来源客户名称:{orderSupOptions.source_customer_name ? orderSupOptions.source_customer_name : '无'}
</Text>
</View>
}
<View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}>
订单号:{supIndex == 0 ? orderSupOptions.local_his_number :
......@@ -470,8 +479,8 @@ class LineOrderPage extends Component {
<Text style={[
styles.fo_sta_txt,
(orderSupOptions.local_his_status == '待审核' || orderSupOptions.local_his_status == '已提交') ? styles.status_audit : '',
orderSupOptions.local_his_status == '待还货' ? styles.status_return : '',
orderSupOptions.local_his_status == '其他' ? styles.status_other : ''
(orderSupOptions.local_his_status == '待还货' || orderSupOptions.local_his_status == '已输入' || orderSupOptions.local_his_status == '已驳回') ? styles.status_return : '',
(orderSupOptions.local_his_status == '其他' || orderSupOptions.local_his_status == '已取消') ? styles.status_other : ''
]}>
{orderSupOptions.local_his_status}
</Text>
......
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