Commit 53b4526d authored by alwayOnlie's avatar alwayOnlie

bug修复

parent ed022d1b
......@@ -323,7 +323,7 @@ const Details = (props: any) => {
startTime: "",
endTime: "",
current: current,
pageSize: size,
pageSize: pageSize,
}
console.log(data)
getContracInfoList(data)
......@@ -405,6 +405,7 @@ const Details = (props: any) => {
loading={listLoading}
pagination={
{
showSizeChanger: true,
pageSize: size,
total,
onChange: handlePaginationChange
......
......@@ -27,6 +27,7 @@ export const CoordinationSchema: ISchema = {
}
},
properties: {
contractAbstract: {
type: 'string',
'x-component-props': {
......
......@@ -12,7 +12,8 @@ const { Option } = Select;
const { Text } = Typography;
const FormList = (props: any) => {
const { currentRef, Row } = props;
const { currentRef, Row, sourceType } = props;
console.log(sourceType)
const refs = useRef({});
/* 显示模态框 */
const [isModalVisible, setIsModalVisible] = useState(false);
......@@ -37,6 +38,7 @@ const FormList = (props: any) => {
setData(dataArr)
setIsModalVisible(false);
};
/* 获取商品 */
const getGoodsList = (params) => {
return new Promise(resolve => {
......@@ -59,36 +61,51 @@ const FormList = (props: any) => {
};
/* 获取物料信息 */
const getList = () => {
const parmas = {
id: Row.demandId,
memberId: Row.partyBMemberId,
memberRoleId: Row.partyBRoleId,
const parmas: any = {
current: '1',
pageSize: '3',
}
let fn;
if (sourceType == '1') {
parmas.id = Row.demandId;
parmas.memberId = Row.partyBMemberId;
parmas.memberRoleId = Row.partyBRoleId;
fn = PublicApi.getPurchaseQuotedPriceProductlistListContract
}
if (sourceType == '2') {
parmas.submitTenderId = Row.bidId;
fn = PublicApi.getPurchaseSubmitTenderMaterielGetSubmitTenderMaterielList
} else {
PublicApi.getPurchaseQuotedPriceProductlistListContract(parmas).then(res => {
}
console.log(sourceType)
console.log(parmas, '请求参数是啥')
fn(parmas).then(res => {
console.log(res);
let data = res.data.data.map(item => {
return {
code: item.number, // 物料编号
name: item.name,
type: item.model,
customerCategory: { name: item.category, id: item.goodsId },
brand: { name: item.brand },
unitName: item.unit,
purchaseCount: item.purchaseCount,
isHasTax: item.isTax,
taxRate: item.taxProbability,
price: item.taxUnitPrice,
bidCount: item.awardTaxProbability * item.purchaseCount / 100,
bidAmount: item.awardTaxProbability * item.purchaseCount / 100 * item.taxUnitPrice,
associatedDataId: item.productId,
associatedMaterielNo: item.number,
associatedMaterielName: item.productName,
associatedGoods: item.productAttributeJson
code: sourceType == '1' ? item.number : sourceType == '2' ? item.inviteTenderMateriel.code : '', // 物料编号
name: sourceType == '1' ? item.name : sourceType == '2' ? item.inviteTenderMateriel.name : '', // 物料名称
type: sourceType == '1' ? item.model : sourceType == '2' ? item.inviteTenderMateriel.type : '', // 物料规格
customerCategory: {
name: sourceType == '1' ? item.category : sourceType == '2' ? item.inviteTenderMateriel.brandName : '',
id: sourceType == '1' ? item.goodsId : sourceType == '2' ? item.inviteTenderMateriel.categoryId[0] : ''
},
brand: { name: sourceType == '1' ? item.brand : sourceType == '2' ? item.inviteTenderMateriel.categoryName : '' },
unitName: sourceType == '1' ? item.unit : sourceType == '2' ? item.unitName : '',
purchaseCount: sourceType == '1' ? item.purchaseCount : sourceType == '2' ? item.inviteTenderMateriel.count : '', // 数量
isHasTax: sourceType == '1' ? item.isTax : sourceType == '2' ? item.isTax ? 1 : 0 : '',
taxRate: sourceType == '1' ? item.taxProbability : sourceType == '2' ? item.taxRate : '',
price: sourceType == '1' ? item.taxUnitPrice : sourceType == '2' ? item.price : '',
bidCount: sourceType == '1' ? item.awardTaxProbability * item.purchaseCount / 100 : sourceType == '2' ? item.awardTenderRatio * item.inviteTenderMateriel.count / 100 : '',
bidAmount: sourceType == '1' ? item.awardTaxProbability * item.purchaseCount / 100 * item.taxUnitPrice : sourceType == '2' ? item.awardTenderRatio * item.inviteTenderMateriel.count / 100 * item.price : '',
associatedDataId: sourceType == '1' ? item.productId : sourceType == '1' ? item.commodityId : '', // 关联商品id
associatedMaterielNo: sourceType == '1' ? item.number : sourceType == '2' ? item.inviteTenderMateriel.code : '', // 关联物料编号
associatedMaterielName: sourceType == '1' ? item.productName : sourceType == '2' ? item.commodityName : '', // 关联商品名称
associatedGoods: sourceType == '1' ? item.productAttributeJson : sourceType == '2' ? item.commodityName : ''// 关联品牌
}
})
console.log(data, '拉拉')
setData(data)
})
}
......@@ -130,7 +147,7 @@ const FormList = (props: any) => {
}}
placeholder=""
onChange={(e) => setInput(e, 'purchaseCount', index)}
defaultValue={record.purchaseCount}
defaultValue={text}
disabled={Object.keys(Row).length != 0 ? true : false}
/>
</Form.Item>
......@@ -219,6 +236,7 @@ const FormList = (props: any) => {
];
if (Object.keys(Row).length != 0) {
console.log(Row, 13213212321)
getList()
} else {
columnsTab.push(
......
......@@ -28,7 +28,7 @@ export interface IProps {
}
const Information = (props: any) => {
const { fetchdata, currentRef, Row, getrow, getmemberId, sourceType } = props;
const { fetchdata, currentRef, Row, getrow, getmemberId, sourceType, getsourceType } = props;
const refs = useRef({});
/**
* @param {{visible}} 显示选择合同弹出
......@@ -71,7 +71,8 @@ const Information = (props: any) => {
const handleChange = (e) => {
basicsVO.sourceType = e;
sethandleChange(e)
setbasicsVO(basicsVO)
setbasicsVO(basicsVO);
getsourceType(e)
}
/* 时间选中 */
const onChange = (value: any) => {
......@@ -153,6 +154,7 @@ const Information = (props: any) => {
} else {
let totalAmount, sourceId, partyBName, partyBMemberId, sourceNo, partyBRoleId;
const selectRow = RowCtl.selectRow[0];
console.log(selectRow)
switch (basicsVO.sourceType) {
case '1':
totalAmount = selectRow.awardAmount;
......@@ -165,6 +167,10 @@ const Information = (props: any) => {
case '2':
totalAmount = selectRow.bidWinnerAmount
sourceId = selectRow.bidId
partyBName = selectRow.bidWinnerName
sourceNo = selectRow.inviteBidNO
partyBMemberId = selectRow.bidWinnerMemberId
partyBRoleId = selectRow.bidWinnerRoleId;
break;
case '3':
totalAmount = selectRow.awardAmount
......@@ -184,7 +190,7 @@ const Information = (props: any) => {
attrValueForm.setFieldsValue(basicsVO);
selectRow.partyBMemberId = selectRow.awardMemberId;
selectRow.partyBRoleId = selectRow.awardRoleId;
getmemberId(selectRow.partyBMemberId)
getmemberId(partyBMemberId)
getrow(selectRow)
}
Choose()
......
......@@ -28,6 +28,7 @@ const Add: React.FC<{}> = (props: any) => {
const [basic, setbasic] = useState<any>({});
const [purchaseMaterielList, setpurchaseMaterielList] = useState<any>({})
const [payPlanList, setpayPlanList] = useState<any>([]);
const [type, setType] = useState<any>('1');
/* 初始值 */
const [Row, setRow] = useState<any>({})
......@@ -40,6 +41,12 @@ const Add: React.FC<{}> = (props: any) => {
const getmemberId = (memberId) => {
setmemberId(memberId)
}
/* 设置选中值 */
const getsourceType = (type) => {
console.log(type)
setType(type)
}
const TabList = [
{
name: '基本信息',
......@@ -51,6 +58,7 @@ const Add: React.FC<{}> = (props: any) => {
sourceType={sourceType}
getrow={getrow}
getmemberId={getmemberId}
getsourceType={getsourceType}
/>
},
{
......@@ -60,6 +68,7 @@ const Add: React.FC<{}> = (props: any) => {
fetchdata={purchaseMaterielList}
currentRef={purchaseMate}
Row={Row}
sourceType={type}
/>
},
{
......@@ -115,6 +124,7 @@ const Add: React.FC<{}> = (props: any) => {
}
useEffect(() => {
if (sourceType) {
setType(sourceType)
setRow(JSON.parse(sessionStorage.getItem('record')))
const memberId = JSON.parse(sessionStorage.getItem('record')).partyBMemberId;
setmemberId(memberId)
......
......@@ -26,7 +26,7 @@ const PurchaseList = () => {
render: (text, record) =>
<div>
<EyePreview
// type={record.quotedPriceOrderId ? 'link' : 'button'}
type={record.turn ? 'link' : 'button'}
url={`/memberCenter/procurementAbility/confirmOffer/offerInquire/preview?id=${record.demandId}&turn=${record.turn}`}
>
{text}
......
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