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

fix: 新增商品副单位非必填,处理商品上架店铺id传空的问题,处理投标详情/发送中标公示翻译显示异常,srm订单详情隐藏优惠减扣

parent 573c6cc0
......@@ -124,6 +124,7 @@ export default {
'detail.purchase.isStartingPrice': 'Is there a starting price',
'detail.purchase.isStartingPrice1': 'Is there a target price',
'detail.purchase.targetPrice': 'Target price',
'detail.purchase.inviteTenderFile': 'bidding document',
'detail.purchase.minPrice': 'Minimum price difference',
'detail.purchase.minPrice1': 'Lowest price',
'detail.purchase.nowMinPrice1': 'Current lowest price',
......
......@@ -124,6 +124,7 @@ export default {
'detail.purchase.isStartingPrice': '경매 시작 가격이 있는지 없는지',
'detail.purchase.isStartingPrice1': '목표 가격이 있는지 없는지',
'detail.purchase.targetPrice': '목표 가격',
'detail.purchase.inviteTenderFile': '입찰 서류',
'detail.purchase.minPrice': '최소 가격차',
'detail.purchase.minPrice1': '최저가',
'detail.purchase.nowMinPrice1': '현재 최저가',
......
......@@ -124,6 +124,7 @@ export default {
'detail.purchase.isStartingPrice': '是否有起拍价',
'detail.purchase.isStartingPrice1': '是否有目标价',
'detail.purchase.targetPrice': '目标价',
'detail.purchase.inviteTenderFile': '招标文件',
'detail.purchase.minPrice': '最小价差',
'detail.purchase.minPrice1': '最低价',
'detail.purchase.nowMinPrice1': '当前最低价',
......
......@@ -84,7 +84,8 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
//获取省市区
getManageAreaAll().then(res => {
if (res.code === 1000) {
let arr = [...res.data] //裁去最后一级别
let arr = [...res.data]
// 把第三级数据置空
for (let index in arr) {
for (let _index in arr[index].areaResponses) {
let o: any = arr[index].areaResponses
......
......@@ -54,7 +54,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
const flagRef = useRef<boolean>(false)
const [isChangePriceType, setIsChangePriceType] = useState<boolean>(false) // 价格类型是否有变动
const [isTax, setIsTax] = useState<boolean>(true) // 是否含税
const [isFreeTax, setIsFreeTax] = useState<boolean>(true) // 是否免税
const [assistantUniquePrice, setAssistantUniquePrice] = useState<any>(0) // 副单价
const [assistantUniqueLadderPrice, setAssistantUniqueLadderPrice] = useState<any[]>([]) // 副阶梯单价
const [assistantUniquePriceRate, setAssistantUniquePriceRate] = useState<any>(0) // 副单价换算比率
......@@ -637,10 +636,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
setIsTax(e.target.value)
}
const onChangeFreeTax = (e) => {
setIsFreeTax(e.target.value)
}
const formValueChange = (changeValue, values) => {
if (values.ladderPrice) {
setAssistantUniqueLadderPrice(() => {
......@@ -712,12 +707,12 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
</Tooltip>
</span>
}
rules={[
{
required: true,
message: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.subUnitId.message' })
},
]}
// rules={[
// {
// required: true,
// message: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.subUnitId.message' })
// },
// ]}
>
<Select
showSearch={true}
......@@ -855,39 +850,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
:
null
}
<Form.Item
name="isFreeTax"
label={intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.isTax' })}
valuePropName="checked"
initialValue={true}
>
{/* <Checkbox onChange={onChangeFreeTax}>{intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.isTax.check' })}</Checkbox> */}
<Radio.Group onChange={onChangeFreeTax} value={isFreeTax}>
<Radio value={true}></Radio>
<Radio value={false}></Radio>
</Radio.Group>
</Form.Item>
{
isFreeTax ?
<Form.Item
name="freeTaxRate"
label={intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate' })}
rules={[
{
required: true,
message: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate.message.1' }),
},
{
pattern: /^\d+(\.\d{1,2})?$/,
message: intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.form.freeTaxRate.message.2' }),
},
]}
>
<Input suffix="%" />
</Form.Item>
:
null
}
</Form>
{/* 批量设置按钮 */}
{
......
......@@ -68,7 +68,8 @@ const Products: React.FC<{}> = () => {
const [giudeStep, setGiudeStep] = useState<number>()
const [inconformityProductIds, setInconformityProductIds] = useState<number[]>([])
const [shopId, setShopId] = useState<any>()
// const [shopId, setShopId] = useState<any>()
const shopIdRef = useRef<any>()
/** 带参数查询,给表单带默认值 */
const { searchData, formatInitialValue, clear } = useSetSearchValueInTable()
......@@ -433,7 +434,8 @@ const Products: React.FC<{}> = () => {
// 判断上架之前是否有店铺
const { code, data } = await getTemplateWebMemberShopWebFindCurrMemberShop({ memberId, memberRoleId })
if (code === 1000 && data?.id) {
setShopId(data)
// setShopId(data)
shopIdRef.current = data
return true;
} else {
return false;
......@@ -477,12 +479,12 @@ const Products: React.FC<{}> = () => {
return true
}
}
console.log(skuids, shops)
}
// 执行商品上架逻辑
const executePutaway = (params) => {
const fn = isBatch ? postProductCommodityPublishCommodityBatch : postProductCommodityPublishCommodity
const shopId = shopIdRef.current
// @ts-ignore
fn(isBatch ? { storeId: shopId['id'], storeName: shopId['name'], storeLogo: shopId['logo'], shopList: checkedValues, idList: RowCtl.selectedRowKeys } : { storeId: shopId?.id || null, storeName: shopId?.name || null, storeLogo: shopId?.logo || null, ...params }).then((res) => {
if(res.code === 1000) {
......
......@@ -852,9 +852,9 @@ export const addNewBidSchema: ISchema = {
properties: {
basicInfo,
bidMaterial,
bidRequestInfo,
enterRequestInfo,
qualificationNeedInfo,
bidRequestInfo,
evaluationNeedInfo,
otherRequset,
bidPattern,
......
......@@ -236,10 +236,10 @@ const ReadySendBidNoticeDetail: React.FC = () => {
beforeUpload
}}
effects={($, ctx) => {
const applyBuines = data.memberList.map(item => `${item.memberName}(${intl.formatMessage({ id: 'table.purchase.zhongbiaozongjine' })}{intl.formatMessage({ id: 'commodity.products.directChannel.columns.currency'})}${item.amount})`)
const applyBuines = data.memberList.map(item => `${item.memberName}(${intl.formatMessage({ id: 'table.purchase.zhongbiaozongjine1' })}${intl.formatMessage({ id: 'commodity.products.directChannel.columns.currency'})}${item.amount})`)
const text = `${data.memberName}《${data.projectName}》${intl.formatMessage({ id: 'table.purchase.pingbiaogongzuoyi' })}:
${intl.formatMessage({ id: 'table.purchase.zhongbiaogongyingshang' })}:${applyBuines.toString()}。
{intl.formatMessage({ id: 'detail.purchase.label1' })}:${data.winTenderReason}。`
${intl.formatMessage({ id: 'detail.purchase.label1' })}:${data.winTenderReason}。`
$('onFieldInit', 'winTenderAnnounceContent').subscribe(() => {
ctx.setFieldValue('winTenderAnnounceContent', text)
......
......@@ -130,7 +130,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
<div className={style['card-list']}>
<h4>{item.memberName}</h4>
<Row>
<Col span={8}><p className={style['card-list_title']}>{intl.formatMessage({ id: 'table.purchase.zhongbiaozongjine' })}({intl.formatMessage({ id: 'detail.purchase.isTax' })}):</p></Col>
<Col span={8}><p className={style['card-list_title']}>{intl.formatMessage({ id: 'table.purchase.zhongbiaozongjine1' })}({intl.formatMessage({ id: 'detail.purchase.isTax' })}):</p></Col>
<Col><p className={style.amount}>¥{
item.submitTender.submitTenderMateriel.reduce((a, b) => a + b.price * b.inviteTenderMateriel.count, 0)
}</p></Col>
......
......@@ -175,8 +175,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({ cardTitle, type }) => {
span: 8,
fieldList: [
{
title:
intl.formatMessage({ id: 'schma.purchase.inviteTenderRequirement' }), name: 'inviteTenderRequirement'
title: intl.formatMessage({ id: 'schma.purchase.inviteTenderRequirement' }), name: 'inviteTenderRequirement'
},
{
title: intl.formatMessage({ id: 'detail.purchase.inviteTenderFile' }),
......
......@@ -197,7 +197,7 @@ const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => {
return (
<>
<Row gutter={24}>
<Row gutter={24} style={{ marginTop: 24, marginBottom: 24 }}>
<Col span={24}>
<MellowCard title={intl.formatMessage({id: 'transaction_components.jiaofuxinxi'})} fullHeight>
<RenderCard infoList={payInfo} dataSource={consignee} />
......
......@@ -44,7 +44,7 @@ export const MoneyTotalBox = ({ dataSource, preview }) => {
const { couponAmount, freight, productAmount, promotionAmount, totalAmount, products } = product
const creditsCommodity = (orderMode === 10 || orderMode === 25) // @todo 积分或渠道积分下单模式
const contractOrder = (orderKind === OrderKindType.SRM_ORDER)
const contractOrder = (orderKind === OrderKindType.SRM_ORDER || orderKind === OrderKindType.REQUISITION_ORDER) // 合同下单和请购单下单模式
// 合计金额, 如果后端有传则用后端数据
const sum = productAmount || products.reduce((prev, next) => prev + parseInt((next.amount || 0)), 0)
......@@ -58,13 +58,13 @@ export const MoneyTotalBox = ({ dataSource, preview }) => {
<div>{creditsCommodity ? sum : `¥${sum}`}</div>
</Col>
{
!creditsCommodity && <Col span={2}>
!creditsCommodity && !contractOrder && <Col span={2}>
<div>{intl.formatMessage({id: 'transaction_components.cuxiaolijian'})}</div>
<div>{`-¥${promotionAmount}`}</div>
</Col>
}
{
!creditsCommodity && <Col span={2}>
!creditsCommodity && !contractOrder && <Col span={2}>
<div>{intl.formatMessage({id: 'transaction_components.youhuidikou'})}</div>
<div>{`-¥${couponAmount}`}</div>
</Col>
......
......@@ -173,7 +173,7 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
const { reloadFormData } = useContext(OrderDetailContext)
const { product, receiverAddressId, orderMode, orderKind } = dataSource || {}
const creditsCommodity = (orderMode === 10 || orderMode === 25) // @todo 积分或渠道积分下单模式
const contractOrder = (orderKind === OrderKindType.SRM_ORDER)
const contractOrder = (orderKind === OrderKindType.SRM_ORDER || orderKind === OrderKindType.REQUISITION_ORDER) // 合同下单和请购单下单模式
const { modifyPrice = false } = usePageStatus()
const { productAmount, freight, totalAmount, promotionAmount, couponAmount, products } = product
......@@ -252,13 +252,13 @@ export const MoneyTotalBox = ({ dataSource, isEditData }) => {
<div>{creditsCommodity ? sum : `¥${sum}`}</div>
</Col>
{
!creditsCommodity && <Col span={2}>
!creditsCommodity && !contractOrder && <Col span={2}>
<div>{intl.formatMessage({ id: 'transaction_components.cuxiaolijian' })}</div>
<div>{`-¥${promotionAmount}`}</div>
</Col>
}
{
!creditsCommodity && <Col span={2}>
!creditsCommodity && !contractOrder && <Col span={2}>
<div>{intl.formatMessage({ id: 'transaction_components.youhuidikou' })}</div>
<div><Button type="link" style={{ padding: 0, height: '18px', lineHeight: '18px' }}>{`-¥${couponAmount}`}</Button></div>
</Col>
......
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