Commit 7115ba6e authored by GuanHua's avatar GuanHua
parents e4bea804 bceb5830
......@@ -123,7 +123,6 @@ const ModifyDirectChannel:React.FC<{}> = () => {
// 获取商品规格列表
const fetchSpecData = () => {
setLoading(true)
console.log(priceTableData, 'priceTableData')
PublicApi.postProductChannelCommodityGetCommodityUnitPriceByChannel({
id: history.location.query.id,
idList: priceTableData.map(item => item.id)
......@@ -250,6 +249,8 @@ const ModifyDirectChannel:React.FC<{}> = () => {
setPriceTableData([...priceTableData, ...selectSpecRow])
setVisibleAddSpec(false)
flagRef.current = true
// 清空之前选中
setSelectSpecRow([])
}
}
......
......@@ -123,7 +123,7 @@ const SelectAddress = (props: ISchemaFieldComponentProps) => {
<Col>{v.receiverName}</Col>
<Col> / </Col>
<Col>{v.phone}</Col>
{v.isDefault && <Col style={{ marginLeft: 6 }}><Tag color='default'>默认</Tag></Col>}
{v.isDefault ? <Col style={{ marginLeft: 6 }}><Tag color='default'>默认</Tag></Col> : null}
</Row>
<div style={{ color: '#909399' }}>{v.fullAddress}</div>
</div>
......
......@@ -163,6 +163,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
useEffect(() => {
if (id) {
setFormLoading(true)
// @ts-ignore
PublicApi.getOrderProcurementOrderDetails({
id
}).then(res => {
......@@ -291,8 +292,9 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
if(!judgementByPay || judgementByPay.includes(false)){
throw new Error('请选择支付方式或支付渠道')
}
let totalRatio = params.paymentInformationResponses.reduce((a, b) => a + Number(b.payRatio || 0), 0)
let judgementByRatio = params.paymentInformationResponses?.length && params.paymentInformationResponses.map(item => {
if(Number(item.payRatio) > 0 && Number(item.payRatio) <= 100){
if(Number(item.payRatio) > 0 && Number(item.payRatio) <= 100 && totalRatio === 100 ){
return true
} else {
return false
......
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