Commit 362ecfc9 authored by 前端-苏志权's avatar 前端-苏志权

Merge branch 'v2-test-szq' into 'v2-test'

多数据展开查看更多数据无效53777 See merge request project/gaohuaxue-mobile-app!106
parents dc8e36ec b6889f9e
......@@ -20,6 +20,7 @@ import {
postTransactionMobileProductQuotationtAuditSubmitTwo,
postTransactionMobileProductQuotationtToSubmit,
} from '../../../../services/TransactionV2Api';
import { FcRoute } from '../../../../global';
import Toast from 'react-native-root-toast';
......
......@@ -112,7 +112,7 @@ const Card = (props: Iprops) => {
onPress={() => handleViewMoreProduct()}
style={{marginTop: 18}}
>
<Text
<Text
style={myStyle.moreCon}
>{moreCommodity ? t('order.btn.put', '收起') : t('order.gongjianshangpinAll', { data: productsTotal || 0, defaultValue: `共${productsTotal || 0}件商品,点击查看全部` })}</Text>
</TouchableOpacity>
......
......@@ -18,7 +18,7 @@ interface Iprops {
/** 商品列表总数量 */
productsTotal: number
/** 查看更多商品 */
onMoreProducts?: (flg: boolean) => {}
onMoreProducts?: (flg: boolean) => void
}
const StaySubmit = (props: Iprops) => {
......
......@@ -21,7 +21,7 @@ import { FcRoute } from '../../../global';
import { getTransactionMobileInquiryDetails, GetTransactionMobileInquiryDetailsResponseDetail, getTransactionMobileNotarizeEnquiryProductQuotationDetails } from '../../../services/TransactionV2Api';
interface Param {
/** 订单id */
orderId: string;
orderId: string;
}
const EnsureInquiryDetails: FcRoute<'EnsureInquiryDetails', Param> = props => {
......@@ -127,8 +127,8 @@ const EnsureInquiryDetails: FcRoute<'EnsureInquiryDetails', Param> = props => {
dataSource={detailData}
productsList={products}
productsTotal={productsTotal}
onMoreProducts={() => onMoreProducts}
/>
onMoreProducts={(flg: boolean) => onMoreProducts(flg)}
/>
</View>
</ScrollView>
......@@ -140,7 +140,7 @@ const EnsureInquiryDetails: FcRoute<'EnsureInquiryDetails', Param> = props => {
showCancel={detailData?.showCancel}
totalAmount={totalAmount}
/>
</View>
);
};
......
......@@ -33,7 +33,7 @@ const RequireOrderDetail = ({ route, navigation }: IProp) => {
const myStyle = useAppStyle(styles);
const { t } = useLocale('order');
const [orderData, setOrderData] = useState<DataType>();
const [urlState, setUrlState] = useState<any>();
const fetchData = async (id: number) => {
const { data, code } = await getTransactionMobileAskPurchaseDetail({ id });
setOrderData(data);
......@@ -47,7 +47,9 @@ const RequireOrderDetail = ({ route, navigation }: IProp) => {
// const url =
// 'https://www.huf-haus.com/fileadmin/Bilder/Header/ART_3/Header_HUF_Haus_ART_3___1_.jpg';
const handlePress = () => { };
const handlePress = (url: string) => {
setUrlState(url);
};
const Scroll = (evt: NativeSyntheticEvent<NativeScrollEvent>) => {
const { nativeEvent } = evt;
......@@ -182,7 +184,9 @@ const RequireOrderDetail = ({ route, navigation }: IProp) => {
key={`${item.title}_${index}`}
>
<Text style={myStyle.CellName}>{t(item.title)}</Text>
<View style={[{ flexDirection: 'row' }, item.address && { width: '50%' }]}>
<View
style={[{ flexDirection: 'row' }, item.address && { width: '50%' }]}
>
<Text style={myStyle.CellText}>{item.value}</Text>
{item.hasCopy && (
<Text
......@@ -284,7 +288,9 @@ const RequireOrderDetail = ({ route, navigation }: IProp) => {
{/* 基本信息 */}
<View style={myStyle.cell}>
<View style={myStyle.HeadCell}>
<Text style={myStyle.HeadCellText}>{t('order.inquiry.details.baseInfo.title', '基本信息')}</Text>
<Text style={myStyle.HeadCellText}>
{t('order.inquiry.details.baseInfo.title', '基本信息')}
</Text>
</View>
{basicInfoList.map((item, index) => {
if (item.value) {
......@@ -297,7 +303,9 @@ const RequireOrderDetail = ({ route, navigation }: IProp) => {
{/* 求购物料 */}
<View style={myStyle.cell}>
<View style={myStyle.HeadCell}>
<Text style={myStyle.HeadCellText}>{t('order.checkXun.purchaseMaterials', '求购物料')}</Text>
<Text style={myStyle.HeadCellText}>
{t('order.checkXun.purchaseMaterials', '求购物料')}
</Text>
</View>
{orderData?.askPurchaseGoodsResponses.map((item, index) => {
return <>{renderMaterialList(item, index)}</>;
......@@ -308,10 +316,11 @@ 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) => {
......@@ -333,7 +342,10 @@ const RequireOrderDetail = ({ route, navigation }: IProp) => {
{/* 交易条件 */}
<View style={myStyle.cell}>
<View style={myStyle.HeadCell}>
<Text style={myStyle.HeadCellText}>{`${t('order.checkXun.tradeTerms', '交易条件')}`}</Text>
<Text style={myStyle.HeadCellText}>{`${t(
'order.checkXun.tradeTerms',
'交易条件',
)}`}</Text>
</View>
{tradeConditionList.map((item, index) => {
if (item.value) {
......@@ -346,7 +358,10 @@ const RequireOrderDetail = ({ route, navigation }: IProp) => {
{/* 其他条件 */}
<View style={myStyle.cell}>
<View style={myStyle.HeadCell}>
<Text style={myStyle.HeadCellText}>{`${t('order.checkXun.otherCondition', '其他条件')}`}</Text>
<Text style={myStyle.HeadCellText}>{`${t(
'order.checkXun.otherCondition',
'其他条件',
)}`}</Text>
</View>
{otherConditionList.map((item, index) => {
if (item.value) {
......@@ -359,13 +374,19 @@ const RequireOrderDetail = ({ route, navigation }: IProp) => {
{/* 附件 */}
<View style={myStyle.cell}>
<View style={myStyle.HeadCell}>
<Text style={myStyle.HeadCellText}>{t('order.checkXun.enclosure', '附件')}</Text>
<Text style={myStyle.HeadCellText}>
{t('order.checkXun.enclosure', '附件')}
</Text>
</View>
{orderData?.enclosureUrls?.map((item, index) => {
// console.log(item, 'itemitemitemitemitem');
return (
<>
<TouchableOpacity onPress={handlePress}>
<TouchableOpacity
onPress={() => {
handlePress(item.url);
}}
>
<Text>{item.name}</Text>
</TouchableOpacity>
{/* <View style={{ flex: 1 }}>
......@@ -375,8 +396,10 @@ const RequireOrderDetail = ({ route, navigation }: IProp) => {
);
})}
</View>
</View>
</ScrollView>
{urlState && <WebView style={{ height: 0 }} source={{ uri: urlState }} />}
</View>
);
};
......
......@@ -27,7 +27,7 @@ import Footer from '../../components/Footer';
import { useNavigation } from '@react-navigation/native';
import { Modal } from '@ui-kitten/components';
import Icons from 'react-native-vector-icons/AntDesign';
import WebView from 'react-native-webview';
// id =2
type Params = {
quoteNoId: number; //求购单Id
......@@ -58,6 +58,7 @@ const RequirePriceOrderDetail: FcRoute<
const [popupVisibal, setPopupVisibal] = useState<boolean>(false);
const [modalVisible, setModalVisible] = useState<boolean>(false);
const [popupInfo, setPopupInfo] = useState<any>();
const [urlState, setUrlState] = useState<any>();
const insets = useSafeAreaInsets();
const fetchData = async () => {
console.log(quoteNoId, 'paramsparams', askPurchaseId);
......@@ -421,6 +422,9 @@ const RequirePriceOrderDetail: FcRoute<
return renderCustomFoot(4);
}
};
const handlePress = (url: string) => {
setUrlState(url);
};
return (
<View style={[myStyle.container, innerStatus ? { paddingBottom: 40 } : {}]}>
<ScrollView>
......@@ -539,6 +543,19 @@ const RequirePriceOrderDetail: FcRoute<
{t('order.checkXun.enclosure', '附件')}
</Text>
</View>
{orderData?.enclosureUrls?.map((item: any) => {
return (
<>
<TouchableOpacity
onPress={() => {
handlePress(item.url);
}}
>
<Text>{item.name}</Text>
</TouchableOpacity>
</>
);
})}
{/* {basicInfoList.map((item, index) => {
if (item.value) {
return renderCommonList(item, index);
......@@ -569,6 +586,19 @@ const RequirePriceOrderDetail: FcRoute<
{t('order.checkXun.enclosure', '附件')}
</Text>
</View>
{askPurchaseData?.enclosureUrls?.map((item: any) => {
return (
<>
<TouchableOpacity
onPress={() => {
handlePress(item.url);
}}
>
<Text>{item.name}</Text>
</TouchableOpacity>
</>
);
})}
{/* {basicInfoList.map((item, index) => {
if (item.value) {
return renderCommonList(item, index);
......@@ -578,7 +608,7 @@ const RequirePriceOrderDetail: FcRoute<
</View>
</View>
</ScrollView>
{urlState && <WebView source={{ uri: urlState }} />}
<Popup
visible={popupVisibal}
onClose={() => {
......
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