Commit c8126ce7 by Denglingling

增加对接转单历史查询接口方法,以及布局调整

parent 7e73885b
...@@ -22,11 +22,16 @@ export const requestHistorOrderType = async (global_domain_config, params) => { ...@@ -22,11 +22,16 @@ 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'} // 获取来源借货订单号 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) => { export const requestHistorSourBorOrdNum = async (global_domain_config, params) => {
return await GetRequest(global_domain_config, getUrlParams('/surgery/collect_order/search', params)) return await GetRequest(global_domain_config, getUrlParams('/surgery/collect_order/search', params))
} }
// 获取目标借货订单/来源借货订单 parmas={access_token: '', seller_code: ''}
export const requestHistorTarOrSourOrd = async (global_domain_config, params) => {
return await GetRequest(global_domain_config, getUrlParams('/surgery/trans_header/search', params))
}
// 借货订单查询 params: {access_token: '', ...} // 借货订单查询 params: {access_token: '', ...}
export function requestGetAllBorrow(params) { export function requestGetAllBorrow(params) {
return (dispatch, getState) => { return (dispatch, getState) => {
...@@ -91,17 +96,18 @@ export const requestGetLineFormConsume = async (global_domain_config, params) => ...@@ -91,17 +96,18 @@ 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: '', ...} ----- 待定 // 转单订单查询 params: {access_token: '', header_status: '', seller_name: '', order_number: '', org_name: '', destination_customer_code: '', source_customer_code: '', source_surgery_date_from: '2020-03-15T00:00:00', source_surgery_date_to: '2020-03-18T00:00:00', source_surgery_order_number: '', destination_surgery_collect_number: '', destination_surgery_date_from: '', destination_surgery_date_to: ''}
export function requestGetAllTrans(params) { export function requestGetAllTrans(params) {
return (dispatch, getState) => { return (dispatch, getState) => {
dispatch(requestSearching()) dispatch(requestSearching())
let {global_domain_config} = getState().login let {global_domain_config} = getState().login
GetRequest(global_domain_config, getUrlParams('xxxx', params)) GetRequest(global_domain_config, getUrlParams('/surgery/trans_header/search', params))
.then(res => { .then(res => {
console.log('--requestGetAllTrans-----res------', res)
if(res.error_code == 0) { if(res.error_code == 0) {
// let { data: { sur_consume_headers } } = res let { data: { sur_order_transfer_head_chs_v } } = res
// dispatch(requestSearchSuccess(sur_consume_headers)); dispatch(requestSearchSuccess(sur_order_transfer_head_chs_v));
} else if(res.error_code === 41006) { } else if(res.error_code === 41006) {
show('登录过期,请重新登录'); show('登录过期,请重新登录');
...@@ -120,9 +126,9 @@ export function requestGetAllTrans(params) { ...@@ -120,9 +126,9 @@ export function requestGetAllTrans(params) {
} }
} }
// 转单订单-行表查询 params: {access_token: '', xxx: ''} ----- 待定 // 转单订单-行表查询 params: {access_token: '', order_number: ''}
export const requestGetLineFormTrans = async (global_domain_config, params) => { export const requestGetLineFormTrans = async (global_domain_config, params) => {
return await GetRequest(global_domain_config, getUrlParams('xxx', params)) return await GetRequest(global_domain_config, getUrlParams('/surgery/trans_line/search', params))
} }
function requestSearching() { function requestSearching() {
......
...@@ -133,9 +133,10 @@ export const requestTransAudio = async (global_domain_config, params) => { ...@@ -133,9 +133,10 @@ export const requestTransAudio = async (global_domain_config, params) => {
return await UploadRequest(global_domain_config, getUrlParams('/dingding/upload_media', { access_token }), formData) return await UploadRequest(global_domain_config, getUrlParams('/dingding/upload_media', { access_token }), formData)
} }
// 子页-获取消耗明细 params={access_token:'', org_code: '', surgery_collect_number: '', item_name: '', serial_number: '', seller_name: '', surgery_name: ''} // 子页-获取消耗明细 params={access_token:'', org_name: '', seller_name: '' ,surgery_collect_number: '', serial_number: '', surgery_date_from: '2020-06-28T17:54:33', surgery_date_to: '2020-07-02T17:54:33'}
export const requestTransDetails = async (global_domain_config, params) => { export const requestTransDetails = async (global_domain_config, params) => {
return await GetRequest(global_domain_config, getUrlParams('/transferSurOrder/sur_order_transfer_line_search', params)) // return await GetRequest(global_domain_config, getUrlParams('/transferSurOrder/sur_order_transfer_line_search', params))
return await GetRequest(global_domain_config, getUrlParams('/transferSurOrder/sur_order_transfer_line_find', params))
} }
// 子页-获取组织 params={access_token:''} // 子页-获取组织 params={access_token:''}
......
...@@ -84,7 +84,8 @@ class HistoricalOrderPage extends Component { ...@@ -84,7 +84,8 @@ class HistoricalOrderPage extends Component {
isShowSelect: false, // 显示/隐藏 筛选内容 isShowSelect: false, // 显示/隐藏 筛选内容
borrowStatus: ['待审核','待出库','待还货','其他'], borrowStatus: ['待审核','待出库','待还货','其他'],
consumeStatus: ['待审核','已消耗'], consumeStatus: ['待审核','已消耗'],
transferStatus: ['已提交','已完成'], // transferStatus: ['已提交','已完成'],
transferStatus: ['已输入', '已审批', '已驳回', '已提交', '已取消'],
searchBorrowStatus: [ // 【借货】对应的状态值 searchBorrowStatus: [ // 【借货】对应的状态值
"ENTERED,SUBMITTED", "ENTERED,SUBMITTED",
"APPROVED,COLLECTING_WAITING_CONFIRM", "APPROVED,COLLECTING_WAITING_CONFIRM",
...@@ -96,8 +97,9 @@ class HistoricalOrderPage extends Component { ...@@ -96,8 +97,9 @@ class HistoricalOrderPage extends Component {
"Y" "Y"
], ],
searchTransStatus: [ // 【转单】对应的状态值 searchTransStatus: [ // 【转单】对应的状态值
"N", // "N",
"Y" // "Y"
"ENTERED", "APPROVED", "REJECTED", "SUBMITTED", "CANCELED"
], ],
whetherCallClick: false, // 是否调用筛选弹窗的查询 whetherCallClick: false, // 是否调用筛选弹窗的查询
wheShowNoData: false, // 是否展示无数据提示 wheShowNoData: false, // 是否展示无数据提示
...@@ -151,7 +153,8 @@ class HistoricalOrderPage extends Component { ...@@ -151,7 +153,8 @@ class HistoricalOrderPage extends Component {
let { let {
contOptionData, topActiveIndex, contOptionData, topActiveIndex,
borrowStatus, consumeStatus, borrowStatus, consumeStatus,
searchBorrowStatus, searchComsumeStatus searchBorrowStatus, searchComsumeStatus,
transferStatus, searchTransStatus
} = this.state } = this.state
let {historOrderOption} = this.props let {historOrderOption} = this.props
if(!historOrderOption.length) { if(!historOrderOption.length) {
...@@ -162,6 +165,7 @@ class HistoricalOrderPage extends Component { ...@@ -162,6 +165,7 @@ class HistoricalOrderPage extends Component {
return return
} }
contOptionData = cloneObject(historOrderOption) contOptionData = cloneObject(historOrderOption)
console.log('contOptionData--------', contOptionData)
switch(topActiveIndex) { switch(topActiveIndex) {
case 0: case 0:
contOptionData = contOptionData.map((supItem, ind) => { contOptionData = contOptionData.map((supItem, ind) => {
...@@ -209,10 +213,33 @@ class HistoricalOrderPage extends Component { ...@@ -209,10 +213,33 @@ class HistoricalOrderPage extends Component {
}) })
break; break;
case 2: case 2:
contOptionData = contOptionData.map((supItem, ind) => {
supItem.id = ind+''
supItem.local_his_number = supItem.order_number
if(!supItem.destination_surgery_collect_number) {
supItem.local_his_name = '无'
} else {
supItem.local_his_name = supItem.destination_surgery_collect_number
}
if(!supItem.destination_surgery_date) {
supItem.local_his_time = '无'
} else {
supItem.local_his_time = moment(supItem.destination_surgery_date).format('YYYY/MM/DD HH:mm')
}
for(let i in searchTransStatus) {
if(searchTransStatus[i].includes(supItem.header_status)) {
supItem.local_his_status = transferStatus[i]
break;
}
}
return supItem
})
break; break;
default: default:
break; break;
} }
console.log('------contOptionData-------', contOptionData)
this.setState({ this.setState({
contOptionData contOptionData
}) })
...@@ -424,6 +451,9 @@ class HistoricalOrderPage extends Component { ...@@ -424,6 +451,9 @@ class HistoricalOrderPage extends Component {
} else if(topActiveIndex == 1) { } else if(topActiveIndex == 1) {
tempTit = '结单标识:' tempTit = '结单标识:'
tempNum = item.surgery_collect_number // 还是显示借货单号,但是接口还是传递消耗单号 tempNum = item.surgery_collect_number // 还是显示借货单号,但是接口还是传递消耗单号
}else if(topActiveIndex == 2) {
tempTit = '目标借货订单:'
tempNum = item.local_his_number
} }
return ( return (
...@@ -449,8 +479,8 @@ class HistoricalOrderPage extends Component { ...@@ -449,8 +479,8 @@ class HistoricalOrderPage extends Component {
style={[ style={[
styles.cont_rig_status, styles.cont_rig_status,
(item.local_his_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 == '待还货' || item.local_his_status == '已输入' || item.local_his_status == '已驳回') ? styles.status_return : '',
item.local_his_status == '其他' ? styles.status_other : '' (item.local_his_status == '其他' || item.local_his_status == '已取消') ? styles.status_other : ''
]}> ]}>
{item.local_his_status} {item.local_his_status}
</Text> </Text>
......
...@@ -212,46 +212,48 @@ class LineOrderPage extends Component { ...@@ -212,46 +212,48 @@ class LineOrderPage extends Component {
} }
} }
// 获取转单订单行数据 -- 待定 // 获取转单订单行数据
async getReqTransLineData(supData) { async getReqTransLineData(supData) {
// let that = this let that = this
// let {consumaData} = that.state let {consumaData} = that.state
// let {props} = this let {props} = this
// that.changeSubLoding(true) that.changeSubLoding(true)
// let params = { let params = {
// access_token: props.token, access_token: props.token,
// consume_order_number: supData.local_his_number order_number: supData.order_number
// } }
// let conResult = await requestGetLineFormTrans(props.global_domain_config, params) let conResult = await requestGetLineFormTrans(props.global_domain_config, params)
// if(conResult.error_code == 0) { console.log('params========', params)
// that.changeSubLoding(false) console.log('conResult========', conResult)
// // 成功 if(conResult.error_code == 0) {
// let {sur_consume_lines} = conResult.data that.changeSubLoding(false)
// let tempSum = 0 // 成功
// let tempConQuanSum = 0 let {sur_order_transfer_lines} = conResult.data
// sur_consume_lines.length && sur_consume_lines.forEach(item => { let tempSum = 0
// if(item.sale_price) { let tempConQuanSum = 0
// tempSum += Number(item.sale_price) sur_order_transfer_lines.length && sur_order_transfer_lines.forEach(item => {
// } if(item.sale_price) {
// if(item.consumed_quantity) { tempSum += Number(item.sale_price)
// tempConQuanSum += Number(item.consumed_quantity) }
// } if(item.consumed_quantity) {
// }) tempConQuanSum += Number(item.consumed_quantity)
// consumaData.subOption = [...sur_consume_lines] }
// consumaData.allOptSum = tempSum })
// consumaData.allConmQuanSum = tempConQuanSum consumaData.subOption = [...sur_order_transfer_lines]
// that.setState({ consumaData.allOptSum = tempSum
// consumaData consumaData.allConmQuanSum = tempConQuanSum
// }) that.setState({
// } else if(conResult.error_code == 41006) { consumaData
// that.changeSubLoding(false) })
// show('登录过期,请重新登录'); } else if(conResult.error_code == 41006) {
// props.exitLoginStatus(); that.changeSubLoding(false)
// } else { show('登录过期,请重新登录');
// that.changeSubLoding(false) props.exitLoginStatus();
// let error_msg = conResult.error_msg || conResult.message } else {
// show(error_msg); that.changeSubLoding(false)
// } let error_msg = conResult.error_msg || conResult.message
show(error_msg);
}
} }
// 耗材明细 隐藏/显示子项 // 耗材明细 隐藏/显示子项
...@@ -361,6 +363,8 @@ class LineOrderPage extends Component { ...@@ -361,6 +363,8 @@ class LineOrderPage extends Component {
tempTit.push('手术名称:', '手术时间:') tempTit.push('手术名称:', '手术时间:')
} else if(supIndex == 1) { } else if(supIndex == 1) {
tempTit.push('结单标识:', '消耗时间:') tempTit.push('结单标识:', '消耗时间:')
} else if(supIndex == 2) {
tempTit.push('目标借货订单:', '手术时间:')
} }
return ( return (
...@@ -370,18 +374,35 @@ class LineOrderPage extends Component { ...@@ -370,18 +374,35 @@ class LineOrderPage extends Component {
<View style={styles.fo_cell_box}> <View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}> <Text style={styles.fo_tip_txt}>
{tempTit[0]}{orderSupOptions.local_his_name} {tempTit[0]}{orderSupOptions.local_his_name}
{
supIndex == 2 ? `(${orderSupOptions.local_his_time})` : null
}
</Text> </Text>
</View> </View>
{
supIndex == 2 && orderSupOptions.source_surgery_order_number ?
<View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}>
来源借货订单号:{orderSupOptions.source_surgery_order_number}
{
orderSupOptions.source_surgery_date ? `(${moment(orderSupOptions.source_surgery_date).format('YYYY/MM/DD HH:mm')})` : null
}
</Text>
</View> : null
}
<View style={styles.fo_cell_box}> <View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}> <Text style={styles.fo_tip_txt}>
手术医生:{orderSupOptions.doctor_name ? orderSupOptions.doctor_name : '无'} 手术医生:{orderSupOptions.doctor_name ? orderSupOptions.doctor_name : '无'}
</Text> </Text>
</View> </View>
<View style={styles.fo_cell_box}> {
<Text style={styles.fo_tip_txt}> supIndex !== 2 ?
{tempTit[1]}{orderSupOptions.local_his_time} <View style={styles.fo_cell_box}>
</Text> <Text style={styles.fo_tip_txt}>
</View> {tempTit[1]}{orderSupOptions.local_his_time}
</Text>
</View> : null
}
<View style={styles.fo_cell_box}> <View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}> <Text style={styles.fo_tip_txt}>
客户名称:{orderSupOptions.customer_name ? orderSupOptions.customer_name : '无'} 客户名称:{orderSupOptions.customer_name ? orderSupOptions.customer_name : '无'}
...@@ -389,7 +410,8 @@ class LineOrderPage extends Component { ...@@ -389,7 +410,8 @@ class LineOrderPage extends Component {
</View> </View>
<View style={styles.fo_cell_box}> <View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}> <Text style={styles.fo_tip_txt}>
订单号:{supIndex == 0 ? orderSupOptions.local_his_number : orderSupOptions.surgery_collect_number} 订单号:{supIndex == 0 ? orderSupOptions.local_his_number :
(supIndex == 1 ? orderSupOptions.surgery_collect_number : orderSupOptions.order_number)}
</Text> </Text>
</View> </View>
{ {
......
...@@ -28,7 +28,7 @@ class BarCodePage extends Component { ...@@ -28,7 +28,7 @@ class BarCodePage extends Component {
super(props); super(props);
this.state = { this.state = {
transCode:'', // 条码 transCode:'', // 条码
typeCode: '', // 条码类型 // typeCode: '', // 条码类型
showCode: true, showCode: true,
// animate: new Animated.Value(0), // 二维坐标{x:0,y:0} // animate: new Animated.Value(0), // 二维坐标{x:0,y:0}
animateCode: new Animated.Value((Width() - 200) / 2,(Height() - 340) / 2), animateCode: new Animated.Value((Width() - 200) / 2,(Height() - 340) / 2),
...@@ -67,7 +67,7 @@ class BarCodePage extends Component { ...@@ -67,7 +67,7 @@ class BarCodePage extends Component {
console.log(e); console.log(e);
that.setState({ that.setState({
transCode: e.data, transCode: e.data,
typeCode: e.type, // typeCode: e.type,
showCode: false showCode: false
}) })
if(e.data) { if(e.data) {
......
...@@ -162,6 +162,7 @@ class TransDetailsModel extends Component { ...@@ -162,6 +162,7 @@ class TransDetailsModel extends Component {
<TouchableOpacity <TouchableOpacity
activeOpacity={1} activeOpacity={1}
style={styles.top_touch_cont} style={styles.top_touch_cont}
key={index}
// onPress={() => this.handleTopNav(item, index)} // onPress={() => this.handleTopNav(item, index)}
> >
<View style={[ <View style={[
......
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