Commit b4269c7f authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:处理采购下单查找运费提示为数量不能为空

parent cbe457d1
......@@ -14,10 +14,10 @@ import cx from 'classnames'
import ReutrnEle from '@/components/ReturnEle'
import styles from "./index.less"
import { PublicApi } from '@/services/api'
import {
GetProductCommodityGetCommodityResponse,
GetProductCommodityGetCommodityCheckRecordResponse,
GetProductCommodityGetShopResponse
import {
GetProductCommodityGetCommodityResponse,
GetProductCommodityGetCommodityCheckRecordResponse,
GetProductCommodityGetShopResponse
} from '@/services/ProductApi'
import moment from 'moment'
import { isGetAccessor } from 'typescript'
......@@ -92,13 +92,13 @@ const viewProducts: React.FC<{}> = () => {
setLogisticResourceSendAddress(provinceName + cityName + districtName + address)
})
}, [productDetail])
const columns: ColumnType<any>[] = [
{
title: '序号',
dataIndex: 'memberRoleId',
key: 'memberRoleId',
render: (t, c, i) => i + 1
render: (t, c, i) => i + 1
},
{
title: '角色',
......@@ -139,7 +139,7 @@ const viewProducts: React.FC<{}> = () => {
title: '操作时间',
dataIndex: 'createTime',
key: 'createTime',
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
render: (text: any) => moment(text).format("YYYY-MM-DD HH:mm:ss")
},
{
title: '意见',
......@@ -190,7 +190,7 @@ const viewProducts: React.FC<{}> = () => {
component = null
}else
if (status === 5)
component = (<span style={{ color: '#00B37A', padding: '2px 5px', background: 'rgba(235,247,242,1)', borderRadius: '4px' }}>已上架</span>)
component = (<span style={{ color: '#00B37A', padding: '2px 5px', background: 'rgba(235,247,242,1)', borderRadius: '4px' }}>已上架</span>)
else if (status === 6)
component = (<span style={{ padding: '2px 5px', background: 'rgba(244,245,247,1)', borderRadius: '4px' }}>已下架</span>)
else
......@@ -212,7 +212,7 @@ const viewProducts: React.FC<{}> = () => {
<Descriptions.Item label="商品品牌">{productDetail?.brand?.name}</Descriptions.Item>
<Descriptions.Item label="商品品类">{productDetail?.customerCategory?.fullName}</Descriptions.Item>
{/* {
productDetail?.commodityShopList?.length>0 &&
productDetail?.commodityShopList?.length>0 &&
<Descriptions.Item label="上架商城">
{
productDetail.commodityShopList.map((item, index)=><span key={index}><img width="24" height="24" style={{borderRadius: '50%', marginRight: 4}} src={item.logoUrl} title={item.name} alt={item.name}/></span>)
......@@ -224,7 +224,7 @@ const viewProducts: React.FC<{}> = () => {
<Descriptions.Item label="商品类型"><span className="commonStatusValid"></span>{renderCustomerCategoryType(productDetail?.customerCategory?.type)}</Descriptions.Item>
</Descriptions>
</>
const renderPriceType = (type: number) => {
if(type === 1 ) return '现货价格'
if(type === 2 ) return '价格需要询价'
......@@ -262,22 +262,22 @@ const viewProducts: React.FC<{}> = () => {
})
attributeByValue.map(_ => {
_col.push({
title: _.name,
dataIndex: _.name,
title: _.name,
dataIndex: _.name,
key: '索引'
})
})
}
if(item.goods?.id){ // 存在货品
_col.push({
title: '对应货品',
dataIndex: '对应货品',
key: '索引',
title: '对应货品',
dataIndex: '对应货品',
key: '索引',
})
}
}
_col.push({
title: product?.priceType===3?'所需积分':'单价(元)',
title: product?.priceType===3?'所需积分':'单价(元)',
dataIndex: '单价',
key: '单价',
render: (text, record) => {
......@@ -344,8 +344,8 @@ const viewProducts: React.FC<{}> = () => {
return <>
<p>
{
str === 'area'
?
str === 'area'
?
showDataSource.map((_item, _i) => <p key={_i}>{_item.provinceName+'/'+(_item.cityName||'')}</p>)
:
showDataSource.map((_item, _i) => <p key={_i}>{_item.name}</p>)
......@@ -419,7 +419,7 @@ const viewProducts: React.FC<{}> = () => {
</Col>
</Row>
{
productDetail?.commodityShopList?.length>0 &&
productDetail?.commodityShopList?.length>0 &&
<Row>
<Col span={4}>
<p>上架商城:</p>
......@@ -438,7 +438,7 @@ const viewProducts: React.FC<{}> = () => {
<Col span={8}>
<Card headStyle={{borderBottom:'none'}} title="物流信息" style={{height:'100%'}}>
{
renderDeliveryType(productDetail?.logistics?.deliveryType) &&
renderDeliveryType(productDetail?.logistics?.deliveryType) &&
<Row>
<Col span={4}>
<p>配送方式:</p>
......@@ -460,7 +460,7 @@ const viewProducts: React.FC<{}> = () => {
</Row>
}
{
productDetail?.logistics?.weight &&
productDetail?.logistics?.weight &&
<Row>
<Col span={4}>
<p>重量:</p>
......@@ -471,7 +471,7 @@ const viewProducts: React.FC<{}> = () => {
</Row>
}
{
logisticTemplateName &&
logisticTemplateName &&
<Row>
<Col span={4}>
<p>运费模版:</p>
......@@ -482,7 +482,7 @@ const viewProducts: React.FC<{}> = () => {
</Row>
}
{
logisticResourceCompanyName &&
logisticResourceCompanyName &&
<Row>
<Col span={4}>
<p>物流公司:</p>
......@@ -493,7 +493,7 @@ const viewProducts: React.FC<{}> = () => {
</Row>
}
{
logisticResourceSendAddress &&
logisticResourceSendAddress &&
<Row>
<Col span={4}>
<p>发货地址:</p>
......@@ -613,7 +613,7 @@ const viewProducts: React.FC<{}> = () => {
<Col span={6}>
<p>
{
productDetail?.isMemberPrice && '允许使用会员折扣购买'
productDetail?.isMemberPrice ? '允许使用会员折扣购买' : '无'
}
</p>
</Col>
......@@ -637,7 +637,7 @@ const viewProducts: React.FC<{}> = () => {
{/* 没有价格属性默认一行直接显示图片 */}
<div className={styles.productImgBox}>
{
productDetail?.unitPriceAndPicList[0].commodityPic.length>0 && productDetail?.unitPriceAndPicList[0].commodityPic.map((_item, index) =>
productDetail?.unitPriceAndPicList[0].commodityPic.length>0 && productDetail?.unitPriceAndPicList[0].commodityPic.map((_item, index) =>
<div key={index} className={styles.imgItem}><img className={styles.pic} src={_item} alt=""/>
</div>)
}
......@@ -665,7 +665,7 @@ const viewProducts: React.FC<{}> = () => {
<Divider />
<div className={styles.productImgBox}>
{
imageArrByImageRender.length>0 && imageArrByImageRender[index].map((_item, _index) =>
imageArrByImageRender.length>0 && imageArrByImageRender[index].map((_item, _index) =>
<div key={_index} className={styles.imgItem}><img className={styles.pic} src={_item} alt=""/>
</div>)
}
......@@ -680,7 +680,7 @@ const viewProducts: React.FC<{}> = () => {
<Card headStyle={{borderBottom:'none'}} title="商品描述">
{/* 文字区块 */}
{
productDetail?.commodityRemark?.word?.length>0 &&
productDetail?.commodityRemark?.word?.length>0 &&
<div className={cx(styles.descriptionBox, styles.descriptionWordBox)}>
{
productDetail?.commodityRemark?.word.map((_item, _index) =>
......@@ -691,7 +691,7 @@ const viewProducts: React.FC<{}> = () => {
}
{/* 视频区块 */}
{
productDetail?.commodityRemark?.video?.length>0 &&
productDetail?.commodityRemark?.video?.length>0 &&
<div className={styles.descriptionBox}>
{
productDetail?.commodityRemark?.video.map((_item, _index)=> <div key={_index} className={styles.videoItem}>
......@@ -704,7 +704,7 @@ const viewProducts: React.FC<{}> = () => {
}
{/* 图片区块 */}
{
productDetail?.commodityRemark?.image?.length>0 &&
productDetail?.commodityRemark?.image?.length>0 &&
<div className={styles.descriptionBox}>
{
productDetail?.commodityRemark?.image.map((_item, _index)=> _item && <div key={_index} className={styles.imgItem}>
......
......@@ -206,8 +206,6 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
}).then(res => {
if(res.code === 1000) {
setBalanceInfo(res.data)
} else {
message.error(res.message)
}
setIsSpin(false)
})
......
......@@ -71,7 +71,7 @@ export const MoneyTotalBox = registerVirtualBox('moneyTotalBox', props => {
orderProductList: logsiticsDataMaps.map(v => ({
templateId: v.logistics.templateId,
weight: v.logistics.weight,
count: v?.purchaseCount || null
count: v?.purchaseCount || 0
})),
receiverAddressId: typeof receiverAddressId === 'object' ? receiverAddressId.id : receiverAddressId
}, {ttl: 10 * 1000, useCache: true, ctlType: 'none'}).then(res => {
......
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