Commit ffa9fabc by wong.peiyi

Merge branch 'develop' into product

parents b2734e21 7be4f296
......@@ -130,6 +130,14 @@ android {
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
signingConfigs {
release {
storeFile file('../keystores/key.jks')
storePassword 'gkzhc2020'
keyAlias 'key'
keyPassword 'gkzhc2020'
}
}
buildTypes {
debug {
resValue "string", "CodePushDeploymentKey", '"OQxOHKC_pU5KPExPvQLLfeOdhO4_zss5pKduM"'
......@@ -140,6 +148,7 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
resValue "string", "CodePushDeploymentKey", '"KEzx1DMpvRIuGoORIyvnxdf9j8HD42NEQvj1z0"'
resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis())
signingConfig signingConfigs.release
}
releaseStaging.initWith(release)
releaseStaging {
......
......@@ -228,6 +228,10 @@ export const list_common_item = {
detail_inner: {
flex: 1
},
detail_title_box: {
flexDirection: 'row',
justifyContent: 'space-between',
},
detail_tit: {
fontSize: second_text_size,
color: '#A3A3A3',
......@@ -359,8 +363,8 @@ export const list_common_item = {
height: 2
},
shadowOpacity: 1,
elevation: 10,
height: 80
// elevation: 10,
height: 80,
},
sub_two_btn: {
width: Width(),
......@@ -432,7 +436,7 @@ export const list_common_item = {
ser_text_input: {
backgroundColor: '#F5F5F5',
height: 38,
lineHeight: 16,
lineHeight: 20,
paddingLeft: 34,
borderRadius: 10,
fontSize: 14,
......
......@@ -90,10 +90,13 @@ class ChooseCardList extends Component {
resizeMode="center" /> : <Image source={cur_icon} style={icon_style} resizeMode="cover" />
}
</View> : null}
{
cardItemTitle &&
<Text numberOfLines={3} style={[styles.list_item_tit, cardStyleItemTit, cur_icon ? '' : cardStyleNotIconTit, index == curActIndex ? [styles.list_tit_act, cardStyleItemTitAct] : '']}>
{item[cardItemTitle]}
{(item[cardCountName] && countStyleType[0] === cardStyleType) ? <Text style={[styles.sum_def, cardCouStyle]}>({item[cardCountName]})</Text> : null}
</Text>
}
</View>
</TouchableOpacity>
{(item[cardCountName] && countStyleType[1] === cardStyleType) ? <View style={[styles.card_def_count, cardCouStyle]}>
......
......@@ -768,7 +768,8 @@ class EquipConsuPage extends Component {
access_token: props.token,
org_code: state.listOptionData[1].value,
customer_code: state.listOptionData[2].value,
collect_header_status: 'RETURNED,COLLECTED'
collect_header_status: 'RETURNED,COLLECTED',
filter_none_flag: 'Y',
}
if (OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY > 0) {
params.department_code = state.listOptionData[15].value
......@@ -787,7 +788,8 @@ class EquipConsuPage extends Component {
access_token: props.token,
org_code: state.listOptionData[1].value,
customer_code: state.listOptionData[2].value,
collect_header_status: 'RETURNED,COLLECTED'
collect_header_status: 'RETURNED,COLLECTED',
filter_none_flag: 'Y',
}
if (OBS_MOBILE_CONSU_DEPARTMENT_DISPLAY > 0 && !!state.listOptionData[15].value) {
params.department_code = state.listOptionData[15].value
......@@ -1355,6 +1357,33 @@ class EquipConsuPage extends Component {
})
}
/**
* @description: 耗材总金额
* @return {*}
*/
consumeSum() {
try {
const {listOptionData} = this.state
return R.compose(R.sum, R.pluck('local_add_price'), R.pathOr([], [12, 'subOption']))(listOptionData)
} catch (error) {
return 0
}
}
feeSum() {
try {
const {listOptionData} = this.state
return R.compose(
R.sum,
R.map(x => Number(x)),
R.pluck('fee_amount'),
R.pathOr([], [13, 'subOption'])
)(listOptionData)
} catch (error) {
return 0
}
}
// 返回备注以上的元素
renderListItem() {
let { listOptionData, dateModelPop, sysValues } = this.state
......@@ -1616,10 +1645,15 @@ class EquipConsuPage extends Component {
// 返回耗材明细
renderConsumablesDetailsItem() {
let { state } = this
const sum = this.consumeSum()
return (
<CellTextStyle style={list_common_item.consu_detail}>
<View style={list_common_item.detail_inner}>
{/* <View style={list_common_item.detail_title_box}> */}
<Text style={list_common_item.detail_tit}>耗材明细</Text>
{/* </View> */}
{
state.listOptionData[12].subOption.length ?
<View
......@@ -1628,6 +1662,7 @@ class EquipConsuPage extends Component {
<Text style={list_common_item.detail_tit_text}>
耗材({state.listOptionData[12].subOption.length}
</Text>
<Text style={list_common_item.detail_tit_text}>耗材总金额:{sum}</Text>
</View>
{
state.listOptionData[12].isShowSub ?
......@@ -1674,6 +1709,8 @@ class EquipConsuPage extends Component {
// 返回费用明细
renderChargeDetailsItem() {
let { state } = this
const sum = this.feeSum()
return (
<CellTextStyle style={list_common_item.consu_detail}>
<View style={list_common_item.detail_inner}>
......@@ -1686,6 +1723,7 @@ class EquipConsuPage extends Component {
<Text style={list_common_item.detail_tit_text}>
费用({state.listOptionData[13].subOption.length}
</Text>
<Text style={list_common_item.detail_tit_text}>费用总金额:{sum}</Text>
</View>
{
state.listOptionData[13].isShowSub ?
......@@ -1728,10 +1766,15 @@ class EquipConsuPage extends Component {
// 返回添加图片
renderAddPicturesItem() {
let { state } = this
const sum = this.feeSum() + this.consumeSum()
return (
<CellTextStyle style={list_common_item.consu_addpic}>
<View style={list_common_item.addpic_inner}>
<View style={list_common_item.detail_title_box}>
<Text style={list_common_item.addpic_tit}>添加图片</Text>
<Text style={list_common_item.detail_tit}>耗材+费用总金额:{sum}</Text>
</View>
<View style={list_common_item.addpic_cont}>
{state.localPhoOption.length
? state.localPhoOption.map((item, index) => this.renderPicItem(item, index) )
......
......@@ -502,7 +502,10 @@ const styles = StyleSheet.create({
marginBottom: 30,
borderRadius: 10,
},
add_btn_cont: {},
add_btn_cont: {
alignItems: 'center',
width: '100%'
},
add_btn_txt: {
height: 46,
lineHeight: 46
......
import React, { Component } from 'react';
import { View, Text, StyleSheet, SafeAreaView, TouchableOpacity, ScrollView, FlatList, TextInput } from 'react-native';
import { home_background_color, promary_color, safe_view, list_common_item, placehold_text_color, second_text_size, promary_text_color, font_family_regular, font_family_medium, list_tit_color, list_str_color, list_one_color, list_thr_color, third_text_size, font_family_semibold } from '../../../base/BaseStyle';
import {second_text_color, home_background_color, promary_color, safe_view, list_common_item, placehold_text_color, second_text_size, promary_text_color, font_family_regular, font_family_medium, list_tit_color, list_str_color, list_one_color, list_thr_color, third_text_size, font_family_semibold, third_text_color } from '../../../base/BaseStyle';
import StatusBarView from '../../common/StatusBarView';
import HeadBackItem from '../../common/HeadBackItem';
import { show } from '../../../utils/Utils';
import { setSubdetailOption } from '../../../action/EquipAction';
import { connect } from 'react-redux';
import * as R from 'ramda';
// 可填写单价
class FillUnitPricePage extends Component {
......@@ -20,6 +21,11 @@ class FillUnitPricePage extends Component {
this.getLocalSelectedData()
}
feeSum() {
const {unitPriceOption} = this.state
return R.compose(R.sum, R.map(x => isNaN(x) ? 0 : x), R.pluck('local_add_price'))(unitPriceOption)
}
// 获取选择的数据
getLocalSelectedData() {
let {localSelectOption} = this.props.navigation.state.params
......@@ -157,6 +163,9 @@ class FillUnitPricePage extends Component {
render() {
let {navigation} = this.props
let {title} = navigation.state.params
const {unitPriceOption} = this.state
const sum = this.feeSum()
return (
<View style={styles.cu_dl_container}>
<StatusBarView
......@@ -168,6 +177,10 @@ class FillUnitPricePage extends Component {
<HeadBackItem title={title} navigation={navigation} />
<View style={styles.cu_dl_main}>
{ this.renderContItem() }
<View style={styles.sum_box}>
<Text style={styles.sum_text}>总数量:{unitPriceOption.length}</Text>
<Text style={styles.sum_text}>总金额:{sum}</Text>
</View>
</View>
{this.renderFooterBtnItem()}
</SafeAreaView>
......@@ -241,9 +254,16 @@ const styles = StyleSheet.create({
fontSize: 14,
color: list_thr_color
},
sum_box: {
flexDirection: 'row',
justifyContent: 'flex-end',
paddingTop: 15,
paddingBottom:15
},
sum_text: {
color: second_text_color,
paddingRight: 20,
},
fot_btn: {
width: '100%',
borderRadius: 10
......
......@@ -1389,6 +1389,9 @@ class SelfOrderPage extends Component {
source = res.uri;
} else {
source = res.uri.replace('file://', '');
if (!res.fileName) {
res.fileName = new Date().getTime() + '.HEIC'
}
}
const formData = new FormData();
let file = { uri: source, type: 'multipart/form-data', name: res.fileName };
......
/*
* @FilePath: /BoneHouse_Business_APP/app/containers/selfOrder/module/ChooseFilter.js
* @Author: peii
* @Date: 2021-05-18 11:07:03
* @Vision: 1.0
* @Description:
*
* @Revision:
*
*/
import React, { Component } from 'react'
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
TextInput,
SafeAreaView,
ScrollView,
TouchableWithoutFeedback,
Modal,
Platform,
} from 'react-native'
import * as R from 'ramda'
import {
foundation_color,
home_background_color,
Width,
Height,
third_text_size,
pxSize,
promary_color,
safe_view,
font_family_regular,
icon_style,
title_text_color,
font_family_medium,
list_common_item,
point_color,
second_text_size,
second_text_color,
first_text_color,
} from '../../../base/BaseStyle'
import { isIphoneX } from '../../../utils/Utils'
const PropTypes = require('prop-types')
export default class ChoolseFilter extends Component {
static propTypes = {
filterData: PropTypes.arrayOf(PropTypes.any).isRequired,
onCallback: PropTypes.func.isRequired,
}
constructor(props) {
super(props)
this.state = {
visible: false,
}
}
render() {
const { visible } = this.state
const { filterData, onCallback } = this.props
return (
<View style={styles.filterBar}>
<View style={styles.filterBarTitle}>
<TouchableOpacity
style={styles.filterBtn}
activeOpacity={0.8}
onPress={() => {
this.setState({ visible: !visible })
}}
>
<Text style={styles.filterBtnText}>筛选</Text>
<Image
source={require('../../../images/arr_bom.png')}
style={[icon_style, styles.btnIcon]}
/>
</TouchableOpacity>
{filterData &&
R.compose(
R.map(filter => {
return <Text style={styles.filterSelect}>{filter.value}</Text>
}),
R.filter(R.prop('value')),
)(filterData)}
</View>
{visible && (
<Modal style={styles.searchModal} visible={visible} transparent={true}>
<TouchableOpacity
style={styles.mask_touch}
onPress={e => {
this.setState({ visible: !visible })
}}
activeOpacity={1}
></TouchableOpacity>
<View style={styles.mask}></View>
<View
style={
Platform.OS === 'ios'
? isIphoneX()
? [styles.searchContent, { top: 48 + 58 + pxSize(36) }]
: [styles.searchContent, { top: 20 + 58 + pxSize(36) }]
: styles.searchContent
}
>
<ScrollView style={styles.scrollView}>
{filterData &&
filterData.map(item => {
return (
<View key={item.field}>
<Text style={styles.searchLabel}>{item.label}</Text>
{item.type === 'select' ? (
<View style={styles.optionsBox}>
{!!item.options &&
item.options.map(option => {
return (
<TouchableOpacity
key={option.value}
style={
item.value === option.value
? [styles.optionItem, styles.optionItemActive]
: styles.optionItem
}
activeOpacity={0.8}
onPress={() => {
if (item.value === option.value) {
onCallback && onCallback(item.field, '')
} else {
onCallback && onCallback(item.field, option.value)
}
this.setState({ visible: !visible })
}}
>
<Text
style={
item.value === option.value
? [styles.optionItemText, styles.optionItemTextActive]
: styles.optionItemText
}
>
{option.label}
</Text>
{item.value === option.value && (
<Image
style={styles.optionItemImgActive}
source={require('../../../images/his_ord_sel.png')}
/>
)}
</TouchableOpacity>
)
})}
</View>
) : (
<></>
)}
</View>
)
})}
</ScrollView>
<View style={styles.searchBtns}>
<TouchableOpacity
style={[styles.searchBtn, styles.resetBtn]}
activeOpacity={0.8}
onPress={() => {
R.map(filter => {
onCallback && onCallback(filter.field, '')
})(filterData)
this.setState({ visible: !visible })
}}
>
<Text style={styles.resetBtnText}>重置</Text>
</TouchableOpacity>
<TouchableOpacity
style={[styles.searchBtn, styles.confirmBtn]}
activeOpacity={0.8}
onPress={() => {
this.setState({ visible: !visible })
}}
>
<Text style={styles.confirmBtnText}>确定</Text>
</TouchableOpacity>
</View>
</View>
</Modal>
)}
</View>
)
}
}
const styles = StyleSheet.create({
filterBar: {
width: Width(),
height: pxSize(36),
paddingLeft: pxSize(20),
},
filterBarTitle: {
flexDirection: 'row',
alignItems: 'center',
},
filterSelect: {
fontSize: 12,
borderColor: '#E1F1FE',
borderWidth: 1,
padding: 3,
borderRadius: 4,
},
filterBtn: {
height: pxSize(36),
flexDirection: 'row',
alignItems: 'center',
marginRight: 20,
},
filterBtnText: {
color: promary_color,
},
btnIcon: {
width: pxSize(10),
height: pxSize(10),
},
searchModal: {
// position: 'absolute',
// top: pxSize(36),
// width: Width(),
// height: Height(),
// backgroundColor: 'rgba(0, 0, 0, 0.5)',
// zIndex: 999,
},
mask_touch: {
position: 'absolute',
width: Width(),
height: Height(),
zIndex: 99,
top: 0,
},
mask: {
position: 'absolute',
width: Width(),
height: Height(),
backgroundColor: 'rgba(0, 0, 0, 0.5)',
// zIndex: 99,
top: 200,
},
searchContent: {
width: Width(),
height: pxSize(300),
backgroundColor: home_background_color,
top: 58 + pxSize(36),
borderColor: '#ddd',
borderTopWidth: 1,
zIndex: 999,
},
scrollView: {
height: pxSize(260),
padding: pxSize(20),
},
searchLabel: {
fontSize: second_text_size,
color: first_text_color,
fontWeight: 'bold',
marginBottom: 10,
},
searchBtns: {
height: pxSize(40),
width: Width(),
flexDirection: 'row',
},
searchBtn: {
width: '50%',
justifyContent: 'center',
alignItems: 'center',
},
resetBtn: {
backgroundColor: '#E1F1FE',
},
resetBtnText: {
color: promary_color,
},
confirmBtn: {
backgroundColor: promary_color,
},
confirmBtnText: {
color: '#fff',
},
optionsBox: {
flexDirection: 'row',
},
optionItem: {
padding: pxSize(8),
paddingLeft: pxSize(20),
paddingRight: pxSize(20),
marginRight: pxSize(15),
marginBottom: pxSize(15),
backgroundColor: '#fff',
},
optionItemActive: {
backgroundColor: '#E1F1FE',
},
optionItemText: {
color: second_text_color,
},
optionItemTextActive: {
color: promary_color,
},
optionItemImgActive: {
position: 'absolute',
bottom: 0,
right: 0,
},
})
......@@ -505,12 +505,15 @@ class TransOrderPage extends Component {
let { listOptionData, localOtherObj } = this.state
let that = this
this.setState({
listOptionData: listOptionData.map((item, index) => {
listOptionData: listOptionData.map(async (item, index) => {
if(index > startIndex && index < endIndex) {
item.name = localOtherObj.name
item.value = localOtherObj.value
if(listOptionData[1].value && item.title == '客户名称') {
await that.getDepartmentsByOrg(listOptionData[1].value)
setTimeout(() => {
that.organizationGetCustomerData()
}, 0);
}
if(listOptionData[2].value && item.title == '目标订单信息') {
that.customerGetTargetOrder()
......@@ -568,9 +571,8 @@ class TransOrderPage extends Component {
chItem.name = item.name
chItem.value = item.value
if(itemTitle === '组织') {
that.clearInitNameAndValue(1)
that.clearInitNameAndValue(8, 10)
that.getDepartmentsByOrg(item.value)
that.clearInitNameAndValue(1)
}
if(itemTitle === '客户名称') {
that.clearInitNameAndValue(2)
......@@ -697,9 +699,11 @@ class TransOrderPage extends Component {
listOptionData[1].value = filterOpt[0].org_code
that.setState({
listOptionData
}, () => {
}, async () => {
await that.getDepartmentsByOrg(listOptionData[1].value)
setTimeout(() => {
that.organizationGetCustomerData()
that.getDepartmentsByOrg(listOptionData[1].value)
}, 0);
})
}
}else {
......@@ -857,11 +861,16 @@ class TransOrderPage extends Component {
let params = {
access_token: props.token,
org_code: state.listOptionData[1].value,
seller_code: props.userInfo.user_name,
// seller_code: props.userInfo.user_name,
customer_code: state.listOptionData[2].value,
collect_header_status: 'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED',
setting_type: 'COLLECT'
}
if (state.sysValues.OBS_MOBILE_TRANS_DEPARTMENT_DISPLAY > 0) {
params.department_code = state.listOptionData[9].value
} else {
params.seller_code = props.userInfo.user_name
}
props.requestTransTargetOrderInfo(params)
})
}
......@@ -872,10 +881,15 @@ class TransOrderPage extends Component {
let params = {
access_token: props.token,
org_code: state.listOptionData[1].value,
seller_code: props.userInfo.user_name,
// seller_code: props.userInfo.user_name,
customer_code: state.listOptionData[2].value,
collect_header_status: 'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED'
}
if (state.sysValues.OBS_MOBILE_TRANS_DEPARTMENT_DISPLAY > 0) {
params.department_code = state.listOptionData[9].value
} else {
params.seller_code = props.userInfo.user_name
}
let that = this
let { global_domain_config } = props
let cusResult = await requestSubSourBorOrdNum(global_domain_config, params);
......@@ -980,14 +994,16 @@ class TransOrderPage extends Component {
// 耗材明细 点击
handleConsumDetailCheck() {
let { listOptionData } = this.state
let { listOptionData, sysValues } = this.state
let subTransObj = {
seller_name: listOptionData[0].name,
seller_code: listOptionData[0].value,
org_name: listOptionData[1].name,
org_code: listOptionData[1].value,
customer_code: listOptionData[2].value,
collect_number: listOptionData[3].value
collect_number: listOptionData[3].value,
department_code: listOptionData[9].value,
sysValues
}
if(!listOptionData[7].subOption.length) {
this.props.setTransDetailOption([], {})
......@@ -1067,6 +1083,9 @@ class TransOrderPage extends Component {
source = res.uri;
} else {
source = res.uri.replace('file://','');
if (!res.fileName) {
res.fileName = new Date().getTime() + '.HEIC'
}
}
const formData = new FormData();
let file = { uri: source, type: 'multipart/form-data', name: res.fileName };
......
......@@ -231,10 +231,15 @@ class TransSearchPage extends Component {
let params = {
access_token: props.token,
org_code: subTransObj.org_code,
seller_code: props.userInfo.user_name,
// seller_code: props.userInfo.user_name,
collect_header_status: 'COLLECTING_WAITING_CONFIRM,CONFIRM_COLLECT,COLLECTED_WAITING_CONFIRMED,APPROVED,COLLECTED',
setting_type: 'COLLECT'
}
if (subTransObj.sysValues.OBS_MOBILE_TRANS_DEPARTMENT_DISPLAY > 0) {
params.department_code = subTransObj.department_code
} else {
params.seller_code = props.userInfo.user_name
}
let { global_domain_config } = that.props
that.changeLodingFlag(true)
let sourResult = await requestSubSourBorOrdNum(global_domain_config, params)
......@@ -380,9 +385,15 @@ class TransSearchPage extends Component {
}
let params = {
access_token: token,
seller_name: subTransObj.seller_name,
org_name: subTransObj.org_name,
destination_collect_number: subTransObj.collect_number,
...seaForm
// seller_name: subTransObj.seller_name,
}
if (subTransObj.sysValues.OBS_MOBILE_TRANS_DEPARTMENT_DISPLAY > 0) {
params.department_code = subTransObj.department_code
} else {
params.seller_name = subTransObj.seller_name
}
this.changeLodingFlag(true)
let { global_domain_config } = that.props
......
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