Commit 4a39aa83 authored by XieZhiXiong's avatar XieZhiXiong
parents 3f7ca6be 9984e307
...@@ -189,12 +189,12 @@ const CommodityDetail = (props) => { ...@@ -189,12 +189,12 @@ const CommodityDetail = (props) => {
} }
} }
}, [selectAttrVal]) }, [selectAttrVal, commodityDetail])
const getCommodityPriceRange = () => { const getCommodityPriceRange = () => {
if (commodityDetail?.unitPriceAndPicList) { if (commodityDetail?.unitPriceAndPicList) {
for (let item of commodityDetail?.unitPriceAndPicList) { for (let item of commodityDetail?.unitPriceAndPicList) {
let temp = item.attributeAndValueList.map(attrItem => { let temp = item.attributeAndValueList.map(attrItem => {
return { return {
attrId: attrItem.customerAttribute.id, attrId: attrItem.customerAttribute.id,
...@@ -371,6 +371,11 @@ const CommodityDetail = (props) => { ...@@ -371,6 +371,11 @@ const CommodityDetail = (props) => {
} }
} }
const judegeImageExist = (list, pic) => {
return list.every(item => item.commodityPic !== pic.commodityPic)
}
/** /**
* 初始化商品详情数据 * 初始化商品详情数据
* @param unitPriceAndPicList * @param unitPriceAndPicList
...@@ -394,9 +399,12 @@ const CommodityDetail = (props) => { ...@@ -394,9 +399,12 @@ const CommodityDetail = (props) => {
commodityPic: picItem commodityPic: picItem
} }
}) })
// if (judegeImageExist(tempImgList, tempCommodityPic)) {
// }
tempImgList = [...tempImgList, ...tempCommodityPic] tempImgList = [...tempImgList, ...tempCommodityPic]
} }
console.log(tempImgList, "")
for (let attrListItem of item.attributeAndValueList) { for (let attrListItem of item.attributeAndValueList) {
if (judgeAttrInList(tempAttrList, attrListItem.customerAttribute.id)) { if (judgeAttrInList(tempAttrList, attrListItem.customerAttribute.id)) {
let tempAttrListIndex = 0 let tempAttrListIndex = 0
......
...@@ -74,7 +74,7 @@ const LXChannelLayout: React.FC<LXChannelLayoutPropsType> = (props) => { ...@@ -74,7 +74,7 @@ const LXChannelLayout: React.FC<LXChannelLayoutPropsType> = (props) => {
return ( return (
<div className={styles.lxmall_page}> <div className={styles.lxmall_page}>
<TopBar langComponent={<SelectLang />} /> <TopBar langComponent={<SelectLang />} name={shopInfo?.company} />
<div className={styles.content}> <div className={styles.content}>
{ {
!menuRouter?.hideHeader && ( !menuRouter?.hideHeader && (
......
...@@ -73,7 +73,7 @@ const LXIChannelLayout: React.FC<LXIChannelLayoutPropsType> = (props) => { ...@@ -73,7 +73,7 @@ const LXIChannelLayout: React.FC<LXIChannelLayoutPropsType> = (props) => {
return ( return (
<div className={styles.lxmall_page}> <div className={styles.lxmall_page}>
<TopBar langComponent={<SelectLang />} /> <TopBar langComponent={<SelectLang />} name={shopInfo?.company} />
<div className={styles.content}> <div className={styles.content}>
{ {
!menuRouter?.hideHeader && ( !menuRouter?.hideHeader && (
......
...@@ -406,8 +406,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -406,8 +406,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
* 结算 * 结算
*/ */
const handleSettlement = async () => { const handleSettlement = async () => {
if (orderList.every(item => item.checkedList.length > 1)) {
if (orderList.every(item => item.checkedList.length > 0)) {
message.info("暂不支持多个供应商商品生成订单,请选择相同供应商的商品") message.info("暂不支持多个供应商商品生成订单,请选择相同供应商的商品")
return return
} else if (orderList.every(item => item.checkedList.length === 0)) { } else if (orderList.every(item => item.checkedList.length === 0)) {
...@@ -460,6 +459,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -460,6 +459,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
buyOrderInfo.payWayList = await getPayWayListByMemberId(selectItem.memberId) buyOrderInfo.payWayList = await getPayWayListByMemberId(selectItem.memberId)
PublicApi.postOrderIsWorkFlow({ productIds }).then(res => { PublicApi.postOrderIsWorkFlow({ productIds }).then(res => {
message.destroy()
setConfirmLoading(false) setConfirmLoading(false)
if (res.code === 1000) { if (res.code === 1000) {
let sessionKey = `${selectItem.id}${new Date().getTime()}` let sessionKey = `${selectItem.id}${new Date().getTime()}`
...@@ -577,7 +577,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -577,7 +577,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
} }
</div> </div>
<div className={cx(styles.order_list_item_item, styles.count)}> <div className={cx(styles.order_list_item_item, styles.count)}>
<InputNumber disabled={true} max={childItem.stockCount || 0} min={0} value={childItem.count} onChange={(value) => handleCountChange(value, childItem.id)} /> <InputNumber disabled={true} max={childItem.stockCount || 0} min={childItem.commodityUnitPrice.commodity.minOrder || 1} value={childItem.count} onChange={(value) => handleCountChange(value, childItem.id)} />
<div className={styles.stock}>(库存{numFormat(childItem.stockCount)}{childItem.commodityUnitPrice.commodity.unitName})</div> <div className={styles.stock}>(库存{numFormat(childItem.stockCount)}{childItem.commodityUnitPrice.commodity.unitName})</div>
</div> </div>
<div className={cx(styles.order_list_item_item, styles.amount)}> <div className={cx(styles.order_list_item_item, styles.amount)}>
......
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