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