Commit 1659da2f by wong.peiyi

消耗确认添加显示病人名称

parent 15e67e1a
...@@ -73,7 +73,7 @@ class HistoricalOrderPage extends Component { ...@@ -73,7 +73,7 @@ class HistoricalOrderPage extends Component {
], ],
isShowSelect: false, // 显示/隐藏 筛选内容 isShowSelect: false, // 显示/隐藏 筛选内容
borrowStatus: ['待审核','待出库','待还货','其他'], borrowStatus: ['待审核','待出库','待还货','其他'],
consumeStatus: ['待审核','已消耗'], consumeStatus: ['待确认消耗','已确认消耗'],
transferStatus: ['已输入', '已审批', '已驳回', '已提交', '已取消'], transferStatus: ['已输入', '已审批', '已驳回', '已提交', '已取消'],
searchBorrowStatus: [ // 【借货】对应的状态值 searchBorrowStatus: [ // 【借货】对应的状态值
"ENTERED,SUBMITTED", "ENTERED,SUBMITTED",
...@@ -474,9 +474,9 @@ class HistoricalOrderPage extends Component { ...@@ -474,9 +474,9 @@ class HistoricalOrderPage extends Component {
<Text <Text
style={[ style={[
styles.cont_rig_status, styles.cont_rig_status,
(item.local_his_status == '待审核' || item.local_his_status == '已提交') ? styles.status_audit : '', ['待审核', '已提交', '待确认消耗'].includes(item.local_his_status) && styles.status_audit,
(item.local_his_status == '待还货' || item.local_his_status == '已输入' || item.local_his_status == '已驳回') ? styles.status_return : '', ['待还货', '已输入', '已驳回', '已确认消耗'].includes(item.local_his_status) && styles.status_return,
(item.local_his_status == '其他' || item.local_his_status == '已取消') ? styles.status_other : '' ['其他', '已取消'].includes(item.local_his_status) && styles.status_other
]}> ]}>
{item.local_his_status} {item.local_his_status}
</Text> </Text>
......
...@@ -61,6 +61,142 @@ class LineOrderPage extends Component { ...@@ -61,6 +61,142 @@ class LineOrderPage extends Component {
orderSupOptions: {}, // 获取主表数据 orderSupOptions: {}, // 获取主表数据
toolShowPopup: false, // 弹窗显示 toolShowPopup: false, // 弹窗显示
popFormItem: {}, // 弹窗对象 popFormItem: {}, // 弹窗对象
// 渲染内容,下标就是历史列表里的序号subIndex
columns: [
// 借货订单
[
{
prop: 'local_his_name',
name: '手术名称',
},
{
prop: 'doctor_name',
name: '手术医生',
},
{
prop: 'local_his_time',
name: '手术时间',
},
{
prop: 'customer_name',
name: '客户名称',
},
{
prop: 'local_his_number',
name: '订 单 号',
},
{
prop: 'create_time',
name: '下单日期',
format: data => data && moment(data).format('YYYY/MM/DD HH:mm')
},
{
prop: 'allPlanQuanSum',
name: '下单数量',
obj: 'consumaData'
},
{
prop: 'surgery_desc',
name: '备注信息',
},
],
[ // 消耗订单
{
prop: 'surgery_collect_number',
name: '借货订单',
},
{
prop: 'consume_order_number',
name: '消耗订单',
},
{
prop: 'local_his_name',
name: '结单标识',
},
{
prop: 'seller_name',
name: '业 务 员',
suffix: () => {
const {local_his_time} = this.state.orderSupOptions
return !!local_his_time && `(${moment(local_his_time).format('YYYY/MM/DD HH:mm')})`
}
},
{
prop: 'customer_name',
name: '客户名称',
},
{
prop: 'doctor_name',
name: '手术医生',
},
{
prop: 'local_his_time',
name: '消耗时间',
},
{
prop: 'patient_id',
name: '病 历 号',
},
{
prop: 'patient_bed',
name: '床 位',
},
{
prop: 'patient_name',
name: '患者姓名',
},
{
prop: 'patient_age',
name: '患者年龄',
},
{
prop: 'patient_gender',
name: '患者性别',
},
{
prop: 'surgery_desc',
name: '备注信息',
},
], [{
prop: 'local_his_name',
name: '目标借货订单号',
suffix: () => {
const {orderSupOptions} = this.state
return `(${orderSupOptions.local_his_time})`
}
},
{
prop: 'source_surgery_order_number',
name: '来源借货订单号',
ifShow: () => !!this.state.orderSupOptions.source_surgery_order_number,
suffix: () => {
const {source_surgery_date} = this.state.orderSupOptions
return !!source_surgery_date && `(${moment(source_surgery_date).format('YYYY/MM/DD HH:mm')})`
}
},
{
prop: 'doctor_name',
name: '手术医生',
},
{
prop: 'destination_customer_name',
name: '目标客户名称',
},
{
prop: 'source_customer_name',
name: '来源客户名称',
},
{
prop: 'order_number',
name: '订单号',
},
{
prop: 'surgery_desc',
name: '备注信息',
},
]
]
} }
} }
...@@ -339,121 +475,50 @@ class LineOrderPage extends Component { ...@@ -339,121 +475,50 @@ class LineOrderPage extends Component {
// 返回主要内容 // 返回主要内容
renderContItem() { renderContItem() {
let {orderSupOptions, consumaData} = this.state let {orderSupOptions, consumaData, columns} = this.state
let {supIndex} = this.props.navigation.state.params let {supIndex} = this.props.navigation.state.params
let tempTit = [] const subColumns = columns[supIndex]
if(supIndex == 0) {
tempTit.push('手术名称:', '手术时间:')
} else if(supIndex == 1) {
tempTit.push('结单标识:', '消耗时间:')
} else if(supIndex == 2) {
tempTit.push('目标借货订单号:', '手术时间:')
}
return ( return (
<ScrollView style={styles.line_cont_scroll}> <ScrollView style={styles.line_cont_scroll}>
<View style={styles.fo_cont_inner}> <View style={styles.fo_cont_inner}>
<Text style={styles.fo_cont_top_tit}>订单信息</Text> <Text style={styles.fo_cont_top_tit}>订单信息</Text>
<View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}>
{tempTit[0]}{orderSupOptions.local_his_name}
{
supIndex == 2 ? `(${orderSupOptions.local_his_time})` : null
}
</Text>
</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}>
<Text style={styles.fo_tip_txt}>
手术医生:{orderSupOptions.doctor_name ? orderSupOptions.doctor_name : '无'}
</Text>
</View>
{
supIndex !== 2 ?
<View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}>
{tempTit[1]}{orderSupOptions.local_his_time}
</Text>
</View> : null
}
{ {
supIndex !== 2 ? subColumns.map(col => {
<View style={styles.fo_cell_box}> const obj = this.state[col.obj] || orderSupOptions
<Text style={styles.fo_tip_txt}> if(!!col.ifShow && !col.ifShow()) return null
客户名称:{orderSupOptions.customer_name ? orderSupOptions.customer_name : '无'} console.log(Object.prototype.toString.call(col.prop))
</Text> return (
</View> : <View key={col.name} style={styles.fo_cell_box}>
<View style={styles.fo_cell_box}> <View style={{minWidth: pxSize(70), }}>
<Text style={styles.fo_tip_txt}> <Text style={[styles.fo_tip_txt]}>{col.name}:</Text>
目标客户名称:{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 :
(supIndex == 1 ? orderSupOptions.surgery_collect_number : orderSupOptions.order_number)}
</Text>
</View> </View>
{
supIndex == 0 ?
<View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}> <Text style={styles.fo_tip_txt}>
下单日期 {orderSupOptions.create_time ? moment(orderSupOptions.create_time).format('YYYY/MM/DD HH:mm') : '无'}
</Text>
</View>
: null
}
{ {
supIndex == 0 ? <Text>{col.format ? col.format(obj[col.prop]) : obj[col.prop] || '无'}</Text>
<View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}>
下单数量 {consumaData.allPlanQuanSum}
</Text>
</View>
: null
} }
<View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}>
备注信息:{orderSupOptions.surgery_desc ? orderSupOptions.surgery_desc : '无'}
</Text>
</View>
{ {
supIndex == 1 ? !!col.suffix && <Text>{col.suffix()}</Text>
<View style={styles.fo_cell_box}>
<Text style={styles.fo_tip_txt}>
消耗数量:{consumaData.allConmQuanSum}
</Text>
</View>
: null
} }
{
consumaData.allOptSum ?
<View style={styles.fo_cell_box}>
<Text style={styles.fo_sum_txt}>
消耗金额:¥{consumaData.allOptSum}
</Text> </Text>
</View> </View>
: null )
})
} }
</View> </View>
<View style={styles.line_cont}> <View style={styles.line_cont}>
<View style={styles.line_cont_title}>
<Text style={styles.cont_tip_tit}>订单详情</Text> <Text style={styles.cont_tip_tit}>订单详情</Text>
{
supIndex === 1 &&
<View style={[styles.line_cont_title]}>
<Text style={{marginRight: pxSize(15)}}>数量:{consumaData.allConmQuanSum}</Text>
<Text style>金额:{consumaData.allOptSum}</Text>
</View>
}
</View>
{ this.renderConsumablesItem() } { this.renderConsumablesItem() }
...@@ -463,9 +528,9 @@ class LineOrderPage extends Component { ...@@ -463,9 +528,9 @@ 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 == '待审核' || orderSupOptions.local_his_status == '已提交') ? styles.status_audit : '', ['待审核', '已提交', '待确认消耗'].includes(orderSupOptions.local_his_status) && styles.status_audit,
(orderSupOptions.local_his_status == '待还货' || orderSupOptions.local_his_status == '已输入' || orderSupOptions.local_his_status == '已驳回') ? styles.status_return : '', ['待还货', '已输入', '已驳回', '已确认消耗'].includes(orderSupOptions.local_his_status) && styles.status_return,
(orderSupOptions.local_his_status == '其他' || orderSupOptions.local_his_status == '已取消') ? styles.status_other : '' ['其他', '已取消'].includes(orderSupOptions.local_his_status) && styles.status_other
]}> ]}>
{orderSupOptions.local_his_status} {orderSupOptions.local_his_status}
</Text> </Text>
...@@ -593,6 +658,11 @@ const styles = StyleSheet.create({ ...@@ -593,6 +658,11 @@ const styles = StyleSheet.create({
paddingVertical: 16, paddingVertical: 16,
paddingBottom: 20 paddingBottom: 20
}, },
line_cont_title: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: "center"
},
cont_tip_tit: { cont_tip_tit: {
fontSize: 16, fontSize: 16,
fontFamily: font_family_regular, fontFamily: font_family_regular,
...@@ -621,13 +691,18 @@ const styles = StyleSheet.create({ ...@@ -621,13 +691,18 @@ const styles = StyleSheet.create({
fontFamily: font_family_regular, fontFamily: font_family_regular,
color: second_text_color color: second_text_color
}, },
fo_cell_box: {}, fo_cell_box: {
flexDirection: 'row'
},
fo_tip_txt: { fo_tip_txt: {
fontSize: third_text_size, fontSize: third_text_size,
fontFamily: font_family_regular, fontFamily: font_family_regular,
color: second_text_color, color: second_text_color,
lineHeight: 18 lineHeight: 18
}, },
fo_tip_txt_key: {
// minWidth: pxSize(120),
},
fo_sum_txt: { fo_sum_txt: {
color: first_text_color, color: first_text_color,
fontSize: 14, fontSize: 14,
......
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