Commit 7a678b66 authored by 赵振东's avatar 赵振东

fix: 49814 样式超出页面显示 多语言兼容

parent 0503d78b
......@@ -10,6 +10,7 @@ import { StyleSheet, ViewStyle, View, Text } from 'react-native';
import useAppStyle from '../../hooks/useAppStyle';
import Spin from './Spin';
import styles from './styles';
import i18n from '../../locales';
interface LoadingProps {
/**
......@@ -111,7 +112,7 @@ const Loading: React.FC<LoadingProps> = (props: LoadingProps) => {
},
])}
>
{noMoreText}
{i18n.t('formInfo:formInfo.info.noMore', '没有更多啦~')}
</Text>
</View>
);
......@@ -125,10 +126,11 @@ Loading.defaultProps = {
size: 14,
text: 'loading',
noMore: false,
noMoreText: '没有更多啦~',
noMoreText: i18n.t('formInfo:formInfo.info.noMore', '没有更多啦~'),
textSize: 12,
vertical: false,
customStyle: {},
};
export default Loading;
......@@ -149,5 +149,5 @@ export default {
'formInfo.Login.login': 'Login',
'formInfo.Login.xieyi': 'agree on',
'order.requireOrder.feedbackInformation': 'feedback information',
'formInfo.info.noMore': 'もう',
'formInfo.info.noMore': 'noMore',
};
......@@ -5,7 +5,7 @@ export default {
'orderList.tabs.enquiry': 'Inquiry purchase',
'orderList.orderItem.unit$': '¥',
'orderList.orderItem.sf': 'actually paid: ',
'orderList.orderItem.gongjianshangpin': 'all {{data}} piece commodity',
'orderList.orderItem.gongjianshangpin': '{{data}} commodity',
'orderList.orderItem.huansuanshuliang': 'Converted quantity: {{data}}',
'orderList.orderItem.zengpin': 'gift',
'order.info.pay': 'payment information',
......
......@@ -217,4 +217,6 @@ export default {
'formInfo.name.pel': '名前を入力してください',
'formInfo.Login.xieyi': 'プロトコル',
'formInfo.info.noMore': 'もう',
};
......@@ -96,7 +96,7 @@ const InquiryOrderDetail: FcRoute<'InquiryOrderDetail', Param> = props => {
key={`${item.title}_${index}`}
>
<Text style={myStyle.CellName}>{t(item.title)}</Text>
<View style={{ flexDirection: 'row' }}>
<View style={[{ flexDirection: 'row' }, item.address && { width: '50%' }]}>
<Text style={myStyle.CellText}>{item.value}</Text>
{item.hasCopy && (
<View
......@@ -215,6 +215,7 @@ const InquiryOrderDetail: FcRoute<'InquiryOrderDetail', Param> = props => {
{
title: t('order.filterBar.fullAddress', '交付地址'),
value: orderData?.fullAddress,
address: true,
},
{
title: t('order.filterBar.quotationAsTime', '报价截止时间'),
......
......@@ -107,7 +107,7 @@ const CheckQuotationOrderDetail: FcRoute<
key={`${item.title}_${index}`}
>
<Text style={myStyle.CellName}>{t(item.title)}</Text>
<View style={{ flexDirection: 'row' }}>
<View style={[{ flexDirection: 'row' }, item.address && { width: '50%' }]}>
<Text style={myStyle.CellText}>{item.value}</Text>
{item.hasCopy && (
<View
......@@ -139,21 +139,21 @@ const CheckQuotationOrderDetail: FcRoute<
</TouchableOpacity>
)}
</View>
</View>
</View >
);
const renderMaterialList = (topItem: any, topIndex: number) => {
const Goods: any = topItem;
return (
<View style={myStyle.Mcell}>
<View style={{ flexDirection: 'row' }}>
<View style={{ flexDirection: 'row', width: '100%' }}>
<View style={{ width: 32, height: 32, marginRight: 12 }}>
<Image
style={{ width: 32, height: 32 }}
source={{ uri: Goods.imgUrl }}
/>
</View>
<View>
<View style={{ width: '100%' }}>
<Text style={myStyle['Mcell-title']}>{Goods?.productName}</Text>
<View style={{ marginBottom: 8 }}>
<Text>×{formatNum(Goods.purchaseCount, 6)}</Text>
......@@ -161,40 +161,51 @@ const CheckQuotationOrderDetail: FcRoute<
<View
style={{
flexDirection: 'row',
justifyContent: 'space-between',
// justifyContent: 'space-between',
marginBottom: 10,
width: '100%',
}}
>
<Text style={{ marginRight: 10 }}>
{t('order.inquiry.details.products.quotedUnitPirce', '报价单价')}:
{formatNum(Goods.price, 6)}
{`\t${Goods.currencyName}`}
</Text>
<Text>
{t('order.inquiry.details.products.quotedPrice', '报价金额')}:
{Goods.currencyName == 'JPY' || Goods.currencyName == 'KRW' ? formatNum(Goods.money, 0) : formatNum(Goods.money, 2)}
{`\t${Goods.currencyName}`}
</Text>
<View style={{ width: '43%' }}>
<Text style={{ marginRight: 10 }}>
{t('order.inquiry.details.products.quotedUnitPirce', '报价单价')}:
{formatNum(Goods.price, 6)}
{`\t${Goods.currencyName}`}
</Text>
</View>
<View style={{ width: '43%' }}>
<Text>
{t('order.inquiry.details.products.quotedPrice', '报价金额')}:
{Goods.currencyName == 'JPY' || Goods.currencyName == 'KRW' ? formatNum(Goods.money, 0) : formatNum(Goods.money, 2)}
{`\t${Goods.currencyName}`}
</Text>
</View>
</View>
<View
style={{
flexDirection: 'row',
justifyContent: 'space-between',
// justifyContent: 'space-between',
marginBottom: 10,
width: '100%',
}}
>
<Text style={{ marginRight: 10 }}>
{t('order.inquiry.details.products.businessUnitPrice', '交易单价')}:
{formatNum(Goods.tradePrice, 6)}
{`\t${Goods.tradeCurrencyName}`}
</Text>
<Text>
{t('order.inquiry.details.products.businessPrice', '交易金额')}:
{Goods.tradeCurrencyName == 'JPY' || Goods.tradeCurrencyName == 'KRW' ? formatNum(Goods.tradeMoney, 0) : formatNum(Goods.tradeMoney, 2)}
{/* {formatNum(Goods.tradeMoney,2)} */}
{`\t${Goods.tradeCurrencyName}`}
</Text>
<View style={{ width: '43%' }}>
<Text style={{ marginRight: 10 }}>
{t('order.inquiry.details.products.businessUnitPrice', '交易单价')}:
{formatNum(Goods.tradePrice, 6)}
{`\t${Goods.tradeCurrencyName}`}
</Text>
</View>
<View style={{ width: '43%' }}>
<Text>
{t('order.inquiry.details.products.businessPrice', '交易金额')}:
{Goods.tradeCurrencyName == 'JPY' || Goods.tradeCurrencyName == 'KRW' ? formatNum(Goods.tradeMoney, 0) : formatNum(Goods.tradeMoney, 2)}
{/* {formatNum(Goods.tradeMoney,2)} */}
{`\t${Goods.tradeCurrencyName}`}
</Text>
</View>
</View>
</View>
</View>
</View>
......@@ -228,12 +239,13 @@ const CheckQuotationOrderDetail: FcRoute<
const buyerTradeTermsList = [
{
title: t('order.inquiry.details.baseInfo.time', '交付时间'),
title: t('order.inquiry.details.condition.time', '交付时间'),
value: askPurchaseData?.deliveryTime,
},
{
title: t('order.inquiry.details.condition.address', '交付地址'),
value: askPurchaseData?.fullAddress,
address: true,
},
{
title: t('order.inquiry.details.condition.endTime', '报价截止时间'),
......
......@@ -90,6 +90,7 @@ export default (theme: ThemeStyle) =>
borderRadius: 8,
paddingHorizontal: 12,
flexDirection: 'column',
width: '100%',
},
HeadCell: {
justifyContent: 'space-between',
......@@ -106,12 +107,14 @@ export default (theme: ThemeStyle) =>
color: '#252D37',
fontWeight: 'bold',
fontFamily: '',
width: '100%',
},
CellIem: {
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-between',
paddingVertical: 10,
width: '100%'
},
cellCard: {
backgroundColor: '#F5F6F7',
......@@ -127,6 +130,7 @@ export default (theme: ThemeStyle) =>
CellName: {
fontSize: 14,
color: '#5C626A',
// paddingRight: 80,
},
CellText: {
maxWidth: 260,
......@@ -136,6 +140,7 @@ export default (theme: ThemeStyle) =>
Mcell: {
display: 'flex',
marginTop: 10,
width: '100%',
},
'Mcell-title': {
fontWeight: 'bold',
......
......@@ -17,8 +17,8 @@ interface Iprops {
productsList: GetTransactionMobileInquiryDetailsResponseDetail[];
/** 商品列表总数量 */
productsTotal: number
/** 查看更多商品 */
onMoreProducts?: (flg: boolean) => {}
/** 查看更多商品 */
onMoreProducts?: (flg: boolean) => {}
}
const StaySubmit = (props: Iprops) => {
......@@ -51,31 +51,31 @@ const StaySubmit = (props: Iprops) => {
Toast.show(t('order.tip.successCopy'));
};
// 定义 基本信息 展示字段
const basicInfoList = [
{type: 1, title: t('order.inquiry.details.baseInfo.no', '报价单号'), value: dataSource?.quotationNo, hasCopy: true },
{type: 2, title: t('order.inquiry.details.baseInfo.correspondingNo', '对应询价单'), value: dataSource?.inquiryListNo},
{type: 3, title: t('order.inquiry.details.baseInfo.memberName', '报价会员'), value: dataSource?.supplyMembersName},
{type: 4, title: t('order.inquiry.details.baseInfo.makes', '报价单摘要'), value: dataSource?.details},
{type: 15, title: t('order.status.out', '外部状态'), value: dataSource?.externalStateName},
{ type: 1, title: t('order.inquiry.details.baseInfo.no', '报价单号'), value: dataSource?.quotationNo, hasCopy: true },
{ type: 2, title: t('order.inquiry.details.baseInfo.correspondingNo', '对应询价单'), value: dataSource?.inquiryListNo },
{ type: 3, title: t('order.inquiry.details.baseInfo.memberName', '报价会员'), value: dataSource?.supplyMembersName },
{ type: 4, title: t('order.inquiry.details.baseInfo.makes', '报价单摘要'), value: dataSource?.details },
{ type: 15, title: t('order.status.out', '外部状态'), value: dataSource?.externalStateName },
];
// 定义 交易条件 展示字段
const transactionConditionsList = [
{type: 6, title: t('order.inquiry.details.baseInfo.time', '交付时间'), value: dataSource?.deliveryTime },
{type: 7, title: t('order.inquiry.details.condition.address', '交付地址'), value: dataSource?.fullAddress},
{type: 8, title: t('order.inquiry.details.condition.endTime', '报价截止时间'), value: dataSource?.quotationAsTime},
{ type: 6, title: t('order.inquiry.details.condition.time', '交付时间'), value: dataSource?.deliveryTime },
{ type: 7, title: t('order.inquiry.details.condition.address', '交付地址'), value: dataSource?.fullAddress },
{ type: 8, title: t('order.inquiry.details.condition.endTime', '报价截止时间'), value: dataSource?.quotationAsTime },
];
// 定义 其他说明 展示字段
const otherList = [
{type: 9, title: t('order.inquiry.details.other.quotedNeed', '报价要求'), value: dataSource?.offer},
{type: 10, title: t('order.inquiry.details.other.paymentMethod', '付款方式'), value: dataSource?.paymentType},
{type: 11, title: t('order.inquiry.details.other.TaxRquirements', '税费要求'), value: dataSource?.taxes},
{type: 12, title: t('order.inquiry.details.other.logistics', '物流要求'), value: dataSource?.logistics},
{type: 13, title: t('order.inquiry.details.other.pack', '包装要求'), value: dataSource?.packRequire},
{type: 14, title: t('order.inquiry.details.other.other', '其他要求'), value: dataSource?.otherRequire},
// 定义 其他说明 展示字段
const otherList = [
{ type: 9, title: t('order.inquiry.details.other.quotedNeed', '报价要求'), value: dataSource?.offer },
{ type: 10, title: t('order.inquiry.details.other.paymentMethod', '付款方式'), value: dataSource?.paymentType },
{ type: 11, title: t('order.inquiry.details.other.TaxRquirements', '税费要求'), value: dataSource?.taxes },
{ type: 12, title: t('order.inquiry.details.other.logistics', '物流要求'), value: dataSource?.logistics },
{ type: 13, title: t('order.inquiry.details.other.pack', '包装要求'), value: dataSource?.packRequire },
{ type: 14, title: t('order.inquiry.details.other.other', '其他要求'), value: dataSource?.otherRequire },
];
const renderCommonList = (item: any, type: number) => (
......@@ -90,7 +90,7 @@ const StaySubmit = (props: Iprops) => {
>
<Text style={myStyle.CellName}>{t(item.title)}</Text>
<View style={{ flexDirection: 'row' }}>
<Text style={{...myStyle.CellText, color: type === 2 ? '#00A98F' : '#5C626A'}}>
<Text style={{ ...myStyle.CellText, color: type === 2 ? '#00A98F' : '#5C626A' }}>
{item.value}
</Text>
{item.hasCopy && (
......@@ -109,7 +109,7 @@ const StaySubmit = (props: Iprops) => {
setUrlState(url);
};
const handleIsHaveData = (data: any) => {
const handleIsHaveData = (data: any) => {
for (let i = 0; i < data?.length; i++) {
if (data[i].value) {
return true
......@@ -126,7 +126,7 @@ const StaySubmit = (props: Iprops) => {
<View style={myStyle.cell}>
<View style={myStyle.HeadCell}>
<Text style={myStyle.HeadCellText}>
{ t('order.inquiry.details.baseInfo.title', '基本信息') }
{t('order.inquiry.details.baseInfo.title', '基本信息')}
</Text>
</View>
{basicInfoList.map((item, index) => {
......@@ -141,28 +141,28 @@ const StaySubmit = (props: Iprops) => {
{/* 商品卡槽 */}
{productsList?.length > 0 && (
<View style={myStyle.cell}>
<View style={myStyle.HeadCell}>
<Text style={myStyle.HeadCellText}>
{ t('order.requireOrder.commodityQuotation', '商品报价') }
</Text>
</View>
<View style={myStyle.CellIem} >
<Card
dataSource={productsList}
productsTotal={productsTotal}
onMoreProducts={onMoreProducts}
/>
<View style={myStyle.HeadCell}>
<Text style={myStyle.HeadCellText}>
{t('order.requireOrder.commodityQuotation', '商品报价')}
</Text>
</View>
<View style={myStyle.CellIem} >
<Card
dataSource={productsList}
productsTotal={productsTotal}
onMoreProducts={onMoreProducts}
/>
</View>
</View>
</View>
)}
{/* 交易条件 */}
{
{
handleIsHaveData(transactionConditionsList) &&
<View style={myStyle.cell}>
<View style={myStyle.HeadCell}>
<Text style={myStyle.HeadCellText}>
{ t('order.inquiry.details.condition.title', '交易条件') }
{t('order.inquiry.details.condition.title', '交易条件')}
</Text>
</View>
{transactionConditionsList.map((item, index) => {
......@@ -172,15 +172,15 @@ const StaySubmit = (props: Iprops) => {
return false;
})}
</View>
}
}
{/* 其他说明 */}
{
handleIsHaveData(otherList) &&
handleIsHaveData(otherList) &&
<View style={myStyle.cell}>
<View style={myStyle.HeadCell}>
<Text style={myStyle.HeadCellText}>
{ t('order.inquiry.details.other.other.title', '其他说明') }
{t('order.inquiry.details.other.other.title', '其他说明')}
</Text>
</View>
{otherList.map((item, index) => {
......@@ -191,7 +191,7 @@ const StaySubmit = (props: Iprops) => {
})}
</View>
}
{/* 附件 */}
{
dataSource?.enclosureUrls?.length &&
......
......@@ -45,11 +45,11 @@ const OrderList = ({ route, navigation }) => {
} = route;
const { userStore } = useStores();
const _role = getCurrentRole(userStore.userInfo);
const system=userStore?.userInfo?.businessProcessingSystem
const system = userStore?.userInfo?.businessProcessingSystem
// console.log('params+++++',params);
const orderOperation = params?.type == 'check' ? 0 : (params?.orderOperation === 0) ? params?.orderOperation : _role?.roleType
// const orderOperation = params?.type == 'check' ? 0 : _role?.roleType
console.log('userStore.userInfo++',userStore?.userInfo);
console.log('userStore.userInfo++', userStore?.userInfo);
// const {
// memberId,
......@@ -305,7 +305,7 @@ const OrderList = ({ route, navigation }) => {
const renderItem = ({ item }: { item: any }) => {
return (
// <CommodityCard Item={item} back={backBtn(item)} categoryIndex={categoryIndex} />
<CommodityCard Item={item} categoryIndex={categoryIndex} orderOperation={orderOperation} system={system}/>
<CommodityCard Item={item} categoryIndex={categoryIndex} orderOperation={orderOperation} system={system} />
// <View><Text>{item.orderId}</Text></View>
)
}
......@@ -448,7 +448,6 @@ const OrderList = ({ route, navigation }) => {
{orderOperation === 0 && Search()}
{/* <View style={myStyle.nav}> */}
{/* <View style={myStyle.search}>
<SearchBar
......@@ -477,7 +476,14 @@ const OrderList = ({ route, navigation }) => {
onPress={() => handleFilter(item, index)}
>
{/* <View style={myStyle.categoryItemNum}><Text style>13 </Text></View> */}
<View style={[categoryIndex === index ? myStyle.categoryTextActive : myStyle.categoryText, { position: 'relative' }]}>
<View
style={[
categoryIndex === index
? myStyle.categoryTextActive
: myStyle.categoryText,
{ position: 'relative' },
]}
>
{badges[index]?.orderCount ?
<Text style={[myStyle.categoryItemNum, badges[index]?.orderCount > 9 ? { right: -14 } : {}]}>{badges[index]?.orderCount}</Text> : null
}
......@@ -507,16 +513,16 @@ const OrderList = ({ route, navigation }) => {
/>
</View>
{/* <View style={{ width: '100%', height: '100%', position: 'absolute', top: (insets.top + 44), paddingTop: 0 }}> */}
<FilterModal
resetRef={ref}
visible={visible}
viewStyle={{top:(insets.top + 46)}}
externalState={status.externalState}
internalState={status.internalState}
onReset={handleReset}
onConfirm={handleConfirm}
setVisible={setVisible}
/>
<FilterModal
resetRef={ref}
visible={visible}
viewStyle={{ top: (insets.top + 46) }}
externalState={status.externalState}
internalState={status.internalState}
onReset={handleReset}
onConfirm={handleConfirm}
setVisible={setVisible}
/>
{/* </View> */}
......
......@@ -8,47 +8,47 @@ export default (theme: ThemeStyle) => StyleSheet.create({
backgroundColor: "#F4F5F7",
flexDirection: "column",
},
nav:{
nav: {
},
search:{
display:'flex',
width:'60%'
search: {
display: 'flex',
width: '60%'
// flexDirection:'row'
},
categoryContainer: {
paddingHorizontal: themeLayout["padding-l"],
alignItems: 'center',
flexDirection:'row',
flexDirection: 'row',
backgroundColor: "#FFF",
},
dateImg:{
width:16,
height:16
dateImg: {
width: 16,
height: 16
},
categoryWrap: {
flex: 1,
overflow:'hidden',
overflow: 'hidden',
},
categoryItem: {
// width: '25%',
paddingHorizontal:25,
paddingHorizontal: 25,
marginRight: 5,
},
categoryItemNum:{
position:'absolute',
// width:16,
// height:16,
categoryItemNum: {
position: 'absolute',
width: 28,
// height: 16,
// padding:3,
paddingHorizontal:5,
paddingVertical:1,
borderRadius:8,
backgroundColor:'#EF3346',
top:4,
right:-8,
color:'#fff',
fontSize:10,
textAlign:'center'
// paddingHorizontal: 5,
paddingVertical: 1,
borderRadius: 8,
backgroundColor: '#EF3346',
top: 4,
right: -8,
color: '#fff',
fontSize: 10,
textAlign: 'center'
},
categoryText: {
fontSize: 14,
......@@ -81,14 +81,14 @@ export default (theme: ThemeStyle) => StyleSheet.create({
justifyContent: "flex-end",
// backgroundColor: 'red',
},
searchImg:{
width:18,
height:18,
searchImg: {
width: 18,
height: 18,
backgroundColor: '#F6F8FA',
position:'absolute',
left:25,
top:12,
zIndex:10
position: 'absolute',
left: 25,
top: 12,
zIndex: 10
},
backFlex: {
},
......@@ -109,8 +109,8 @@ export default (theme: ThemeStyle) => StyleSheet.create({
},
searchBox: {
// flex: 0.9,
width:'90%',
height:40,
width: '90%',
height: 40,
borderRadius: 18,
alignItems: 'center',
backgroundColor: '#F7F8FA',
......
......@@ -127,6 +127,7 @@ const RequireOrderDetail = ({ route, navigation }: IProp) => {
{
title: t('order.filterBar.fullAddress', '交付地址'),
value: orderData?.deliverAddress,
address: true,
},
{
title: t('order.filterBar.quotationAsTime', '报价截止时间'),
......@@ -181,7 +182,7 @@ const RequireOrderDetail = ({ route, navigation }: IProp) => {
key={`${item.title}_${index}`}
>
<Text style={myStyle.CellName}>{t(item.title)}</Text>
<View style={{ flexDirection: 'row' }}>
<View style={[{ flexDirection: 'row' }, item.address && { width: '50%' }]}>
<Text style={myStyle.CellText}>{item.value}</Text>
{item.hasCopy && (
<Text
......@@ -307,11 +308,10 @@ const RequireOrderDetail = ({ route, navigation }: IProp) => {
<View style={myStyle.cell}>
<View style={myStyle.HeadCell}>
<Text style={myStyle.HeadCellText}>
{`${t('order.checkXun.xundui', '需求对接')}(${
orderData?.askPurchaseShopResponses.length != 0
{`${t('order.checkXun.xundui', '需求对接')}(${orderData?.askPurchaseShopResponses.length != 0
? `${t('order.checkXun.xundui2', '指定商城')}`
: `${t('order.checkXun.xundui1', '指定会员')}`
})`}
})`}
</Text>
</View>
{orderData?.askPurchaseShopResponses.map((item, index) => {
......
......@@ -91,7 +91,7 @@ const RequirePriceOrderDetail: FcRoute<
key={`${item.title}_${index}`}
>
<Text style={myStyle.CellName}>{t(item.title)}</Text>
<View style={{ flexDirection: 'row' }}>
<View style={[{ flexDirection: 'row' }, item.address && { width: '50%' }]}>
<Text style={myStyle.CellText}>{item.value}</Text>
{item.hasCopy && (
<View
......@@ -219,6 +219,7 @@ const RequirePriceOrderDetail: FcRoute<
{
title: t('order.filterBar.fullAddress', '交付地址'),
value: askPurchaseData?.deliverAddress,
address: true,
},
{
title: t('order.filterBar.quotationAsTime', '报价截止时间'),
......
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 to comment