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

fix: 品类添加排序输入

parent f63d6b1f
......@@ -70,10 +70,18 @@ export const classSchema: ISchema = {
},
}
}
}
},
sort: {
type: 'number',
title: '品类排序',
required: true,
"x-component-props": {
placeholder: '请输入品类排序'
},
},
}
},
}
}
}
}
\ No newline at end of file
}
......@@ -357,7 +357,7 @@ const Products: React.FC<{}> = () => {
memberId: getAuth().memberId,
memberRoleId: getAuth().memberRoleId
}).then(res => {
if(res.data.id){
if(res.data?.id){
setShopId(res.data.id)
setCheckedValues(values)
}else{
......
......@@ -37,6 +37,7 @@ const BidParticulars: React.FC<BidParticularsProps> = ({cardTitle}) => {
type: item.inviteTenderMateriel.type,
unitName: item.inviteTenderMateriel.unitName,
awardTenderRatio: item.awardTenderRatio,
isAwardTender: item.isAwardTender,
commodityId: item.commodityId,
commodityName: item.commodityName,
commoditySkuId: item.commoditySkuId,
......@@ -45,8 +46,12 @@ const BidParticulars: React.FC<BidParticularsProps> = ({cardTitle}) => {
const [tableColumn, setTableColumn] = useState<any>(() => {
let totalMoney = 0;
data.submitTender ?data.submitTender.submitTenderMateriel.map(item => {
totalMoney += item.price * item.inviteTenderMateriel.count
data.submitTender ?data.submitTender.submitTenderMateriel.forEach(item => {
if(cardTitle === '中标明细') {
totalMoney += item.price * item.inviteTenderMateriel.count * Number(item.awardTenderRatio)/100
} else {
totalMoney += item.price * item.inviteTenderMateriel.count
}
}) : []
let tempCol: any = [...columns]
// 中标数量
......@@ -60,10 +65,10 @@ const BidParticulars: React.FC<BidParticularsProps> = ({cardTitle}) => {
}
// 总计
tempCol[tempCol.length] = {
title: <span>金额(含税)<br />合计: ¥{totalMoney}</span>,
title: <span>{cardTitle === '中标明细' ? '中标金额(含税)' : '金额(含税)'}<br />合计: ¥{totalMoney.toFixed(2)}</span>,
dataIndex: 'money',
key: 'money',
render: (t, r) => `¥${Number((r.price * r.count).toFixed(2))}`
render: (t, r) => cardTitle === '中标明细' ? `¥${Number((r.price * Number(r.awardTenderRatio)/100 * r.count).toFixed(2))}` : `¥${Number((r.price * r.count).toFixed(2))}`
}
return tempCol
})
......@@ -149,7 +154,7 @@ const BidParticulars: React.FC<BidParticularsProps> = ({cardTitle}) => {
}
}
}}
dataSource={cardTitle === '中标明细' ? tableData.filter(item => item.awardTenderRatio) : tableData}
dataSource={cardTitle === '中标明细' ? tableData.filter(item => item.isAwardTender) : tableData}
rowKey="id"
pagination={{size: "small"}}
/>
......
......@@ -9,7 +9,6 @@ import ReutrnEle from '@/components/ReturnEle';
import './index.less'
import { batchRepositDetailSchema } from './schema'
import { createFormActions } from '@formily/antd'
import { omit } from '@/utils'
import { PublicApi } from '@/services/api'
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus'
import BatchPositionSetting from './components/BatchPositionSetting'
......@@ -18,8 +17,6 @@ const addSchemaAction = createFormActions()
const BatchAddRepository:React.FC<{}> = (props) => {
const {
id,
preview,
pageStatus
} = usePageStatus()
......
......@@ -131,7 +131,7 @@ const BatchPositionSetting:React.FC<BatchPositionSettingProps> = (props) => {
// 商品选择后的表格
const handleDeleteProductTable = (record) => {
const value = addSchemaAction.getFieldValue('commodityList')
const res = value.filter((item) => item.id != id);
const res = value.filter((item) => item.id != record.id);
addSchemaAction.setFieldValue('commodityList', res)
}
......
......@@ -100,7 +100,7 @@ const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
temp.brand = v.brand;
temp.unit = v.unit;
temp.relevanceProductId = v.associatedDataId;
temp.relevanceProductName = v.associatedGoods;
temp.relevanceProductName = v.associatedMaterielName;
temp.relevanceProductNo = v.associatedMaterielNo;
temp.relevanceProductType = v.associatedType;
temp.relevanceProductCategory = v.associatedCategory;
......
......@@ -325,7 +325,7 @@ export const materialInfoColumns: any[] = [
dataIndex: 'relevanceProductId',
align: 'center',
key: 'relevanceProductId',
render: (t, r) => t ? `${t}/${r.relevanceProductName || ''}/${r.relevanceProductSpec || ''}/${r.relevanceProductCategory || ''}/${r.relevanceProductBrand || ''}` : ''
render: (t, r) => t ? `${t}/${r.relevanceProductName || ''}/${r.relevanceProductType || ''}/${r.relevanceProductCategory || ''}/${r.relevanceProductBrand || ''}` : ''
},
{
title: '单价',
......
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