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

fix:

parent 4ab0ac71
......@@ -110,6 +110,7 @@ const MultAddress = (props) => {
} else if(num === 2) {
renderCity(result, val, idx)
}
console.log(result, 'mutators')
mutators.change(result)
}
......@@ -122,8 +123,10 @@ const MultAddress = (props) => {
if (res.code === 1000) {
result[idx].provinceCode = val;
result[idx].province = item.name;
// 重新set下id值
result[idx]['id'] ? result[idx]['id'] = result[idx]['id'] : null
// @todo 编辑情况下 result[idx]存在id ?第一次渲染回填值的时候不清空
// if(result[idx]?.i d&& ) {
// if(result[idx]?.id&& ) {
// console.log(cityAfterRef.current, 1, item)
// result[idx].cityCode = null;
// result[idx].city = null;
......
......@@ -5,9 +5,6 @@ import { GlobalConfig } from '@/global/config';
import moment from 'moment'
import { PURCHASE_TYPE } from '@/constants';
/**
* 除了订单必填字段, 默认
*/
export const tableListSchema: ISchema = {
type: 'object',
properties: {
......
......@@ -2,6 +2,7 @@ import React, { useState, useRef, useContext, useEffect } from 'react'
import { Form, Input, Checkbox, Row, Col, InputNumber } from 'antd';
import style from '../../index.less'
import { ReadyConfirmBidContext } from '@/pages/procurement/_public/bid/context';
import checkmark from '@/assets/imgs/checkmark_circle.png'
/**
* 招标定标表格中 授标的每一项 待定标专用
......@@ -40,14 +41,15 @@ export const GivenBidItem:React.FC<GivenBidItemProps> = ({
newData.splice(currentIndex, 1, currentRow)
return newData
})
}
console.log(currentData, 'current')
const chanegChecked = (e) => {
setTableDataSource(() => {
const newData = [...datas]
const currentRow = newData[currentIndex]
currentRow[currentColumn.dataIndex]['isAward'] = e.target.checked
currentRow[currentColumn.dataIndex]['isAwardTender'] = e.target.checked
// 默认100
currentRow[currentColumn.dataIndex]['awardRate'] = 100
newData.splice(currentIndex, 1, currentRow)
......@@ -73,7 +75,7 @@ export const GivenBidItem:React.FC<GivenBidItemProps> = ({
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>含税金额:</p></Col>
<Col><p>{currentData[currentColumn.dataIndex]['price'] * currentData['count']}</p></Col>
<Col><p>{(currentData[currentColumn.dataIndex]['price'] * currentData['count']).toFixed(2)}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
......@@ -93,7 +95,15 @@ export const GivenBidItem:React.FC<GivenBidItemProps> = ({
<Col span={8}><p className={style['card-list_title']}>授标:</p></Col>
<Col>
<p>
<Checkbox defaultChecked={currentData[currentColumn.dataIndex]['isAward']} style={{marginRight: 16}} onChange={chanegChecked} />
{
currentData[currentColumn.dataIndex]['isAwardTender']
?
<span>{currentData[currentColumn.dataIndex]['awardRate']}%&nbsp;&nbsp;<img src={checkmark} alt="已授标" style={{width: 12, height: 12}} /></span>
:
<span></span>
}
{/* <Checkbox defaultChecked={currentData[currentColumn.dataIndex]['isAwardTender']} style={{marginRight: 16}} onChange={chanegChecked} />
<InputNumber
defaultValue={currentData[currentColumn.dataIndex]['awardRate']}
min={0}
......@@ -102,7 +112,7 @@ export const GivenBidItem:React.FC<GivenBidItemProps> = ({
parser={value => value.replace('%', '')}
onChange={onChangeInput}
style={{display: 'none'}}
/>
/> */}
</p>
</Col>
</Row>
......
......@@ -27,7 +27,7 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
<Row>
<Col span={8}><p className={style['card-list_title']}>报价小计:</p></Col>
<Col>
<p>¥{ datas.reduce((a, b) => a + b[item.dataIndex]['price'] * b.count, 0) }(含税)</p>
<p>¥{ (datas.reduce((a, b) => a + b[item.dataIndex]['price'] * b.count, 0)).toFixed(2) }(含税)</p>
</Col>
</Row>
</div>
......@@ -49,13 +49,13 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标数量:</p></Col>
<Col><p>{datas.reduce((a, b) => a + b[item.dataIndex]['isAward'] ? 1 : 0, 0)}</p></Col>
<Col><p>{datas.reduce((a, b) => a + b[item.dataIndex]['isAwardTender'] ? 1 : 0, 0)}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标总额:</p></Col>
<Col><p>¥{datas.reduce((a, b) => a + b[item.dataIndex]['isAward'] ? b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardRate'] / 100 : 0, 0)}(含税)</p></Col>
<Col><p>¥{datas.reduce((a, b) => a + b[item.dataIndex]['isAwardTender'] ? (b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardRate'] / 100).toFixed(2) : 0, 0)}(含税)</p></Col>
</Row>
</div>
</Col>) : null)
......
......@@ -47,7 +47,7 @@ const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
<div className={style.participateContent}>
<div className={style.topWrapper}>
<h3>{item.company}</h3>
<p className={style.amount}>{item.amount}<span>{item.isTax ? ' (含税)' : ' (不含税)'}</span></p>
<p className={style.amount}>{(item.amount).toFixed(2)}<span>{item.isTax ? ' (含税)' : ' (不含税)'}</span></p>
</div>
<div className={style.contentWrapper}>
<Row className={style['card-list']}>
......
......@@ -40,7 +40,7 @@ const ReadyCheckedConfirmFirstDetail: React.FC = () => {
let validate = false
paramsTableData.forEach(element => {
Object.values(element).forEach((_ele: any) => {
if(_ele?.isAward) validate = true
if(_ele?.isAwardTender) validate = true
})
})
if(!validate) {
......@@ -74,7 +74,7 @@ const ReadyCheckedConfirmFirstDetail: React.FC = () => {
id: bidParams[0][mKey]['submitTender']['id'], // 投标id
submitTenderMateriel: bidParams.map(_item => ({
id: _item[mKey]['inviteTenderMateriel']['id'],
isAwardTender: _item[mKey]['isAward'],
isAwardTender: _item[mKey]['isAwardTender'],
awardTenderRatio: _item[mKey]['awardRate'],
}))
}
......
......@@ -40,7 +40,6 @@ export const GivenBidItem:React.FC<GivenBidItemProps> = ({
newData.splice(currentIndex, 1, currentRow)
return newData
})
}
const chanegChecked = (e) => {
......@@ -73,7 +72,7 @@ export const GivenBidItem:React.FC<GivenBidItemProps> = ({
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>含税金额:</p></Col>
<Col><p>{currentData[currentColumn.dataIndex]['price'] * currentData['count']}</p></Col>
<Col><p>{(currentData[currentColumn.dataIndex]['price'] * currentData['count']).toFixed(2)}</p></Col>
</Row>
</div>
<div className={style['card-list']}>
......
......@@ -27,7 +27,7 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
<Row>
<Col span={8}><p className={style['card-list_title']}>报价小计:</p></Col>
<Col>
<p>¥{ datas.reduce((a, b) => a + b[item.dataIndex]['price'] * b.count, 0) }(含税)</p>
<p>¥{ (datas.reduce((a, b) => a + b[item.dataIndex]['price'] * b.count, 0)).toFixed(2) }(含税)</p>
</Col>
</Row>
</div>
......@@ -55,7 +55,7 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标总额:</p></Col>
<Col><p>¥{datas.reduce((a, b) => a + b[item.dataIndex]['isAward'] ? b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardRate'] / 100 : 0, 0)}(含税)</p></Col>
<Col><p>¥{datas.reduce((a, b) => a + b[item.dataIndex]['isAward'] ? (b[item.dataIndex]['price'] * b.count * b[item.dataIndex]['awardRate'] / 100).toFixed(2) : 0, 0)}(含税)</p></Col>
</Row>
</div>
</Col>) : null)
......
......@@ -31,7 +31,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
const { memberList } = data
const _memberList = memberList.map(item => ({
...item,
totalAmount: item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0)
totalAmount: (item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0)).toFixed(2)
})).sort((a, b) => b.totalAmount - a.totalAmount)
/** 组合table列 */
......
......@@ -47,7 +47,7 @@ const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
<div className={style.participateContent}>
<div className={style.topWrapper}>
<h3>{item.company}</h3>
<p className={style.amount}>{item.amount}<span>{item.isTax ? ' (含税)' : ' (不含税)'}</span></p>
<p className={style.amount}>{item.amount.toFixed(2)}<span>{item.isTax ? ' (含税)' : ' (不含税)'}</span></p>
</div>
<div className={style.contentWrapper}>
<Row className={style['card-list']}>
......
......@@ -73,7 +73,7 @@ const ReadyQualifityCheckedDetail: React.FC = () => {
let tempTenderObject = {
id: bidParams[0][mKey]['submitTender']['id'], // 投标id
submitTenderMateriel: bidParams.map(_item => ({
id: _item[mKey]['inviteTenderMateriel']['id'],
id: _item[mKey]['id'],
isAwardTender: _item[mKey]['isAward'],
awardTenderRatio: _item[mKey]['awardRate'],
}))
......
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