Commit d58f0659 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents f014ecc4 ec0e609d
......@@ -709,8 +709,10 @@ const CommodityDetail = (props) => {
}
}
}
if(unitPricePicList.lenght > 0) {
setCurrentPriceRange(sortUnitPrice(unitPricePicList[0].unitPrice))
initStockCount(unitPricePicList)
}
// setStockCount(unitPricePicList[0].stockCount)
setCommodityImgList(tempImgList)
setAttributeList(tempAttrList)
......
......@@ -286,6 +286,17 @@ const Order: React.FC<OrderPropsType> = (props) => {
return mode
}
const getProductNameAndAttr = (productInfo: any) => {
const attribute = productInfo.attribute
let attributeName = ""
let productName = productInfo.name
if(attribute && attribute.length > 0) {
attributeName = attribute.map(item => item.customerAttributeValue.value).join("/")
productName = `${productName}/${attributeName}`
}
return productName
}
/**
* 提交订单
*/
......@@ -317,7 +328,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
purchaseIds.push(orderItem.purchaseId)
temp.imgUrl = orderItem.commodityPic
temp.productId = orderItem.id
temp.productName = orderItem.name
temp.productName = getProductNameAndAttr(orderItem)
temp.unit = orderItem.unitName
temp.price = orderItem.unitPrice
temp.purchaseCount = orderItem.count
......@@ -355,7 +366,6 @@ const Order: React.FC<OrderPropsType> = (props) => {
if(signatureLogId) {
params.signatureLogId = signatureLogId
}
setConfirmLoading(true)
PublicApi.postOrderProcurementOrderAdd(params).then(res => {
if (res.code === 1000) {
......
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