(false); // 是否可编辑
+
+ const columns: any[] = [ // 详审表头
+ {
+ title: '类别名称',
+ dataIndex: 'categoryName',
+ render: (_: any, record: any, index: number) => {
+ return {
+ children: _,
+ props: {
+ rowSpan: record.rowSpan,
+ }
+ }
+ }
+ },
+ {
+ title: '详审项&评分标准',
+ dataIndex: 'scoreItem',
+ render: (_: any, record: any) => {
+ return (
+ <>
+ {record.scoreItem}({record.highScore})
+ {record.rvwStandard}
+ >
+ )
+ }
+ }
+ ];
+
+ const createNewArr = (data: any[], fieldName: string) => {
+ return data.reduce((result: any[], item: any) => {
+ //首先将name字段作为新数组result取出
+ if (result.indexOf(item[fieldName]) < 0) {
+ result.push(item[fieldName]);
+ }
+ return result
+ }, []).reduce((result: any[], name: any) => {
+ //将name相同的数据作为新数组取出,并在其内部添加新字段**rowSpan**
+ const children = data.filter(item => item[fieldName] === name);
+ result = result.concat(
+ children.map((item: any, index: number) => ({
+ ...item,
+ rowSpan: index === 0 ? children.length : 0,//将第一行数据添加rowSpan字段
+ }))
+ )
+ return result;
+ }, [])
+ }
+
+ const offerColumns: any[] = [ // 报价表头
+ {
+ title: '排序',
+ render: (text: any, record: any, index: any) => `${index + 1}`
+ },
+ {
+ title: showNameT.tbr,
+ dataIndex: 'supplierRegisterName',
+ },
+ {
+ title: proMethod == 'procurement_mode_7' ? '报价总金额净价(元)' : sectionQuot == '1' ? '报价(%)' : '报价(元)',
+ dataIndex: 'bidContent',
+ render: (text: any, record: any, index: any) => {
+ if (record.bidContent && (record.bidContent != null || record.bidContent != undefined || record.bidContent != '')) {
+ return <>{record.bidContent}>
+ } else {
+ return <>->
+ }
+ }
+ },
+ {
+ title: proMethod == 'procurement_mode_7' ? '报价总金额含税价(元)' : sectionQuot == '1' ? '评审价(%)' : '评审价(元)',
+ dataIndex: 'evaluatingContent',
+ render: (text: any, record: any, index: any) => {
+ if (record.evaluatingContent && (record.evaluatingContent != null || record.evaluatingContent != undefined || record.evaluatingContent != '')) {
+ return <>{record.evaluatingContent}>
+ } else {
+ return <>->
+ }
+ }
+ },
+ {
+ title: '最高分值',
+ dataIndex: 'highScore',
+ },
+ {
+ title: proMethod == 'procurement_mode_7' ? '查看报价详情' : '查看报价文件',
+ render: (text: any, record: any, index: any) => {
+ if (proMethod == 'procurement_mode_7') {
+ return
+ } else {
+ if (record.tdocId) {
+ return (
+ //
+
+ )
+ } else {
+ return (
+ <>未报价>
+ )
+ }
+ }
+ }
+ },
+ {
+ title: '报价分录入',
+ render: (text: any, record: any, index: any) => {
+ if (record.judgesStatus != '1') {
+ disabledOffer = true
+ }
+ if (record.priceScore) {
+ return (
+ offerValueChange(e, record)}
+ onChange={e => offerSourceChange(e, record)}
+ value={record.priceScore} style={{ width: 160 }} />
+ )
+ } else {
+ return (
+ offerSourceChange(e, record)} value={record.priceScore} style={{ width: 160 }} />
+ )
+ }
+ }
+ }
+ ]
+
+ const columnsOffer: any[] = [ // 自动报价表头
+ {
+ title: '报价排名',
+ render: (text: any, record: any, index: any) => `${index + 1}`
+ },
+ {
+ title: showNameT.tbr + '名称',
+ dataIndex: 'supplierRegisterName',
+ },
+ {
+ title: showNameT.tbr + '报价(元)',
+ dataIndex: 'evaluatingContent',
+ sorter: {
+ compare: (a: any, b: any) => a.evaluatingContent - b.evaluatingContent,
+ multiple: 2,
+ },
+ },
+ {
+ title: '报价分',
+ dataIndex: 'detailValue',
+ },
+ {
+ title: '人工复合得分',
+ dataIndex: 'priceScore',
+ width: '300px',
+ render: (text: any, record: any, index: any) => {
+ if (record.priceScore != null) {
+ return (
+
+ offerChange(e, record)}
+ onChange={e => offerAutoChange(e, record)}
+ value={record.priceScore} />
+
+ )
+ }
+ }
+ },
+ ]
+
+ const saveSorce = () => { // 保存
+ if (editableRef.current && bidEvalDetailDTOList.length > 0) {
+ setSpinVisible(true)
+ let date = {
+ id: subId,
+ // categoryId: typeId,
+ category: typeCategory,
+ bidEvalDetailDTOList: bidEvalDetailDTOList,
+ assessRoomId: assessRoomId,
+ reviewTurnId: reviewTurnId,
+ }
+ getPreScoreSubmitDetail({ ...date }).then((res) => {
+ if (res.code == 200) {
+ bidEvalDetailDTOList = []
+ if (tabListName == '报价') {
+ offerList(typeCategory)
+ } else {
+ ratingData(typeCategory)
+ }
+ } else {
+ bidEvalDetailDTOList = []
+ if (tabListName == '报价') {
+ offerList(typeCategory)
+ } else {
+ ratingData(typeCategory)
+ }
+ }
+ }).finally(() => {
+ setSpinVisible(false)
+ bidEvalDetailDTOList = []
+ })
+ }
+ }
+
+ const tabSaveSorce = () => { // tab保存
+ if (editableRef.current && bidEvalDetailDTOList.length > 0) {
+ setSpinVisible(true)
+ let date = {
+ id: subId,
+ category: typeCategory,
+ bidEvalDetailDTOList: bidEvalDetailDTOList,
+ assessRoomId: assessRoomId,
+ reviewTurnId: reviewTurnId,
+ }
+ getPreScoreSubmitDetail({ ...date }).then((res) => {
+ if (res.code == 200) {
+ bidEvalDetailDTOList = []
+ } else {
+ bidEvalDetailDTOList = []
+ }
+ }).finally(() => {
+ setSpinVisible(false)
+ bidEvalDetailDTOList = []
+ })
+ }
+ }
+
+ const saveOfferSorce = () => { // 自动报价保存
+ if (!editableRef.current) return;
+ offerDataList.map((item: any) => {
+ bidEvalDetailDTOList.push({ 'categoryId': typeId, id: item.id, 'supplierRegisterId': item.supplierRegisterId, 'detailId': item.detailId, 'resultValue': item.priceScore, 'detailValue': item.detailValue, 'chooseStatus': item.chooseStatus ? item.chooseStatus : '0' })
+ })
+ let date = {
+ id: subId,
+ category: typeCategory,
+ reviewTurnId: reviewTurnId,
+ assessRoomId: assessRoomId,
+ bidEvalCalculation: {
+ lowPrice: smallPrice,
+ highPrice: bigPrice,
+ avgPrice: averagePrice,
+ basePrice: basePrice
+ },
+ bidEvalDetailDTOList: bidEvalDetailDTOList
+ }
+ getPreScoreSaveOffer({ ...date }).then((res) => {
+ if (res.code == 200) {
+ bidEvalDetailDTOList = []
+ offerList(typeCategory)
+ }
+ })
+ }
+
+ const getTabId = (key: any) => { // tab切换获取当前tab的key
+ setTypeId(tabList[key].id)
+ setTypeCategory(tabList[key].category)
+ setTabListName(tabList[key].name)
+ if (bidEvalDetailDTOList.length > 0) {
+ tabSaveSorce()
+ bidEvalDetailDTOList = []
+ }
+ if (tabList[key].name == '报价') {
+ offerList(tabList[key].category)
+ } else {
+ changePagination(1, tabList[key].category, totalSupplier)
+ }
+ }
+
+ const offerList = (category: any) => { // 报价数据
+ setSpinVisible(true)
+ let date = {
+ bidEvalId: bidEvalId,
+ reviewType: reviewType,
+ reviewTurnId: reviewTurnId,
+ category: category,
+ }
+ findPriceScoreList({ ...date }).then((res) => {
+ if (res.code == 200) {
+ setSpinVisible(false)
+ setTypeId(res.data.categoryId) // 设置类别id
+ setTypeCategory(res.data.category) // 设置类别
+ if (res.data.judgesStatus != '1') {
+ disabledOffer = true
+ setIsDisabledOffer(true)
+ } else {
+ disabledOffer = false
+ setIsDisabledOffer(false)
+ }
+ setSubId(res.data.id)
+ res.data.priceScoreMap.dataList.map((item: any) => {
+ item.highScore = res.data.priceScoreMap.priceConfig.highScore
+ item.judgesStatus = res.data.judgesStatus
+ })
+
+ setAutomaticOffer(res.data.priceScoreMap.priceConfig.scoreMethod)
+ if (res.data.priceScoreMap.priceConfig.scoreMethod == '3') {
+ setInputPrice(res?.data?.priceScoreMap?.bidEvalCalculation?.basePrice)
+ setOffer(true) // 自动报价
+ let selIdList: any = [];
+ res.data.priceScoreMap.dataList.map((item: any) => {
+ if (item.chooseStatus == 1) {
+ selIdList.push(item.supplierRegisterId)
+ }
+ })
+ // idList = selIdList
+ setSelectedRowKeys(selIdList)
+ setOfferDataList(res.data.priceScoreMap.dataList)
+ if (res?.data?.priceScoreMap?.bidEvalCalculation != null) {
+ setSmallPrice(res?.data?.priceScoreMap?.bidEvalCalculation?.lowPrice)
+ setBigPrice(res?.data?.priceScoreMap?.bidEvalCalculation?.highPrice)
+ setAveragePrice(res?.data?.priceScoreMap?.bidEvalCalculation?.avgPrice)
+ setBasePrice(res?.data?.priceScoreMap?.bidEvalCalculation?.basePrice)
+ }
+ // 有效报价
+ if (res.data.priceScoreMap.priceConfig.effectiveType == '1') {
+ setTit1('全部报价')
+ } else if (res.data.priceScoreMap.priceConfig.effectiveType == '2') {
+ setTit1('去掉最高'+res.data.priceScoreMap.priceConfig.removeMaxNumber + '家 和 最低' + res.data.priceScoreMap.priceConfig.removeMinNumber + '家的报价')
+ } else if (res.data.priceScoreMap.priceConfig.effectiveType == '3') {
+ setTit1('去掉最两家高和最低各一家后的报价')
+ } else if (res.data.priceScoreMap.priceConfig.effectiveType == '4') {
+ setTit1('去掉最低一家后的报价')
+ } else if (res.data.priceScoreMap.priceConfig.effectiveType == '5') {
+ setTit1('去掉最高一家后的报价')
+ } else if (res.data.priceScoreMap.priceConfig.effectiveType == '6') {
+ setTit1(res.data.priceScoreMap.priceConfig.includeHighPrice + '元(包含) - ' + res.data.priceScoreMap.priceConfig.includeLowPrice + '元(不包含)')
+ } else if (res.data.priceScoreMap.priceConfig.effectiveType == '7') {
+ setTit1(`${showNameT.pb}专家手动勾选`)
+ }
+ // 报价分
+ if (res.data.priceScoreMap.priceConfig.priceType == '1') {
+ setTit3(当报价大于等于基准价时:
+
总分-(报价-基准价)/基准价*{res.data.priceScoreMap.priceConfig.priceMultiplier}最低分:{res.data.priceScoreMap.priceConfig.lowScore}
+
当报价小于基准价时:
+
总分-(基准价-报价)/基准价*{res.data.priceScoreMap.priceConfig.priceMultiplierSecond}最低分:{res.data.priceScoreMap.priceConfig.lowScoreSecond}
+
)
+ } else if (res.data.priceScoreMap.priceConfig.priceType == '2') {
+ setTit3(当报价大于等于基准价时:
+
总分*(基准价/报价)最低分:${res.data.priceScoreMap.priceConfig.lowScore}
+
当报价小于基准价时:
+
总分*(报价/基准价)最低分:${res.data.priceScoreMap.priceConfig.lowScoreSecond}
+
)
+ } else if (res.data.priceScoreMap.priceConfig.priceType == '3') {
+ setTit3(
+
总分-(报价-最低报价)/平均报价*{res.data.priceScoreMap.priceConfig.priceMultiplier}
+
)
+ } else if (res.data.priceScoreMap.priceConfig.priceType == '4') {
+ setTit3(
+
总分-(报价-最低报价)/最高报价*{res.data.priceScoreMap.priceConfig.priceMultiplier}
+
)
+ } else if (res.data.priceScoreMap.priceConfig.priceType == '5') {
+ setTit3(
+
总分-(报价-最低报价)/(最高报价-最低报价)*{res.data.priceScoreMap.priceConfig.priceMultiplier}
+
)
+ }
+ // 基准价
+ if (res.data.priceScoreMap.priceConfig.baseType == '0') {
+ if (res?.data?.priceScoreMap?.bidEvalCalculation?.basePrice == undefined) {
+ setTit2('平均报价=' + '(元)')
+ } else {
+ setTit2('平均报价=' + res.data.priceScoreMap.bidEvalCalculation.basePrice + '(元)')
+ }
+ } else if (res.data.priceScoreMap.priceConfig.baseType == '1') {
+ if (res?.data?.priceScoreMap?.bidEvalCalculation?.basePrice == undefined) {
+ setTit2('最低报价=' + '(元)')
+ } else {
+ setTit2('最低报价=' + res.data.priceScoreMap.bidEvalCalculation.basePrice + '(元)')
+ }
+ } else if (res.data.priceScoreMap.priceConfig.baseType == '3') {
+ if (res?.data?.priceScoreMap?.bidEvalCalculation?.basePrice == undefined) {
+ setTit2('平均报价*' + res.data.priceScoreMap.priceConfig.avgPriceMultiplier + '=' + '(元)')
+ } else {
+ setTit2('平均报价*' + res.data.priceScoreMap.priceConfig.avgPriceMultiplier + '=' + res?.data?.priceScoreMap?.bidEvalCalculation?.basePrice + '(元)')
+ }
+ } else if (res.data.priceScoreMap.priceConfig.baseType == '4') {
+ if (res?.data?.priceScoreMap?.bidEvalCalculation?.basePrice == undefined) {
+ setTit2('(平均报价+最低报价)/2=' + '(元)')
+ } else {
+ setTit2('(平均报价+最低报价)/2=' + res.data.priceScoreMap.bidEvalCalculation.basePrice + '(元)')
+ }
+ } else if (res.data.priceScoreMap.priceConfig.baseType == '5') {
+ if (res?.data?.priceScoreMap?.bidEvalCalculation?.basePrice == undefined) {
+ setType('手动输入')
+ setTit2( changeInput(e)} style={{ width: 200, }} />
)
+ } else {
+ setType('手动输入')
+ setTit2( changeInput(e)} style={{ width: 200, }} />
)
+ }
+ } else if (res.data.priceScoreMap.priceConfig.baseType == '6') {
+ if (res?.data?.priceScoreMap?.bidEvalCalculation?.basePrice == undefined) {
+ setTit2('不设基准价=' + '(元)')
+ } else {
+ setTit2('不设基准价=' + res.data.priceScoreMap.bidEvalCalculation.basePrice + '(元)')
+ }
+ }
+ }
+ res.data.priceScoreMap.dataList.map((item: any) => {
+ item.categoryId = res.data.categoryId
+ })
+ setOfferTotalSource(res.data.priceScoreMap.dataList) // 报价总数据
+ setOfferTotal(res.data.priceScoreMap.dataList.length) // 分页
+ changeOffer(1, category, res.data.priceScoreMap.dataList) // 分页数据
+ } else {
+ setSpinVisible(false)
+ }
+ }).finally(() => {
+ setSpinVisible(false)
+ })
+ }
+
+ const onSelectChange = (selectedRowKeys: any, selectedRows: any) => {
+ setSelectedRowKeys([...selectedRowKeys])
+ setPriceList(selectedRows)
+ }
+
+ const setQuotation = () => { // 自动报价选中供应商确定
+ if (type == '手动输入' && inputPrice != '') {
+ makeSubmit()
+ } else if (type == '手动输入' && inputPrice == '') {
+ message.warn('请输入确定基准价!')
+ } else {
+ makeSubmit()
+ }
+ }
+
+ const makeSubmit = () => {
+ let supplierIds: any = []
+ priceList.map((item: any) => {
+ supplierIds.push(item.supplierRegisterId)
+ })
+ let date = {
+ bidEvalId: bidEvalId,
+ category: typeCategory,
+ reviewTurnId: reviewTurnId,
+ reviewType: "2",
+ basePrice: inputPrice,
+ supplierRegisterIds: supplierIds
+ }
+ calculationPriceScore({ ...date }).then((res) => {
+ if (res.code == 200) {
+ setOfferDataList(res.data.priceScoreMap.dataList)
+ setSmallPrice(res.data.priceScoreMap.bidEvalCalculation.lowPrice)
+ setBigPrice(res.data.priceScoreMap.bidEvalCalculation.highPrice)
+ setAveragePrice(res.data.priceScoreMap.bidEvalCalculation.avgPrice)
+ setBasePrice(res.data.priceScoreMap.bidEvalCalculation.basePrice)
+ if (res.data.priceScoreMap.priceConfig.baseType == '0') {
+ setTit2('平均报价=' + res.data.priceScoreMap.bidEvalCalculation.basePrice + '(元)')
+ } else if (res.data.priceScoreMap.priceConfig.baseType == '1') {
+ setTit2('最低报价=' + res.data.priceScoreMap.bidEvalCalculation.basePrice + '(元)')
+ } else if (res.data.priceScoreMap.priceConfig.baseType == '3') {
+ setTit2('平均报价*' + res.data.priceScoreMap.priceConfig.avgPriceMultiplier + '=' + res.data.priceScoreMap.bidEvalCalculation.basePrice + '(元)')
+ } else if (res.data.priceScoreMap.priceConfig.baseType == '4') {
+ setTit2('(平均报价+最低报价)/2=' + res.data.priceScoreMap.bidEvalCalculation.basePrice + '(元)')
+ } else if (res.data.priceScoreMap.priceConfig.baseType == '5') {
+ setType('手动输入')
+ setTit2( changeInput(e)} style={{ width: 200, }} />
)
+ } else if (res.data.priceScoreMap.priceConfig.baseType == '6') {
+ setTit2('不设基准价=' + res.data.priceScoreMap.bidEvalCalculation.basePrice + '(元)')
+ }
+ }
+ })
+ }
+
+ const changeInput = (e: any) => {
+ setInputPrice(e.target.value)
+ }
+
+ const offerAutoChange = (e: any, val: any) => { // 自动报价分数修改
+ let targetVal = e.target.value
+ let inputNum = /^(\-|\+?)\d{0,4}(\.\d{0,5})?$/
+ if (inputNum.test(targetVal)) {
+ if (Number(targetVal) > hightSorce) {
+ message.error('输入分值不可大于最高分值!')
+ targetVal = hightSorce
+ }
+ } else {
+ message.error('请输入正确的分值!')
+ targetVal = targetVal.substring(0, targetVal.length - 1)
+ }
+ offerDataList.map((item: any) => {
+ if (item.supplierRegisterId == val.supplierRegisterId && item.detailId == val.detailId) {
+ item.priceScore = targetVal
+ }
+ })
+ setOfferDataList([...offerDataList])
+ }
+
+ const offerSourceChange = (e: any, val: any) => { // 报价分数修改
+ let targetVal = e.target.value
+ let inputNum = /^(\-|\+?)\d{0,4}(\.\d{0,5})?$/
+ if (inputNum.test(targetVal)) {
+ if (Number(targetVal) > val.highScore) {
+ message.error('输入分值不可大于最高分值!')
+ targetVal = val.highScore
+ }
+ } else {
+ message.error('请输入正确的分值!')
+ targetVal = targetVal.substring(0, targetVal.length - 1)
+ }
+ offerSource.map((item: any) => {
+ if (item.supplierRegisterId == val.supplierRegisterId && item.detailId == val.detailId) {
+ item.priceScore = targetVal
+ }
+ })
+ let x = false;
+ bidEvalDetailDTOList.map((item: any) => {
+ if (item.supplierRegisterId == val.supplierRegisterId && item.detailId == val.detailId) {
+ item.resultValue = targetVal
+ x = true
+ }
+ })
+ if (!x) {
+ if (val.id) {
+ bidEvalDetailDTOList.push({ 'categoryId': val.categoryId, 'resultValue': targetVal, 'id': val.id, 'supplierRegisterId': val.supplierRegisterId, 'detailId': val.detailId });
+ } else {
+ bidEvalDetailDTOList.push({ 'categoryId': val.categoryId, 'resultValue': targetVal, 'id': '', 'supplierRegisterId': val.supplierRegisterId, 'detailId': val.detailId });
+ }
+ }
+ setOfferSource([...offerSource])
+ }
+
+ const changeOffer = (page: any, category: any, totalSource: any) => { // 报价数据分页
+ if (bidEvalDetailDTOList.length > 0) {
+ saveSorce() // 保存
+ }
+ setOfferCurrent(page)
+ let currentDate = (page - 1) * 10
+ setOfferSource(totalSource.slice(currentDate, currentDate + 10))
+ }
+
+ const getRemark = (val: any, id: any) => { // 备注
+ if (val.remarks) {
+ remarkForm.setFieldsValue({ remarks: val.remarks })
+ } else {
+ remarkForm.setFieldsValue({ remarks: '' })
+ }
+ if (val.detailId) {
+ setRemarksVal({ 'categoryId': val.categoryId, 'id': val.id, 'supplierRegisterId': id, 'detailId': val.detailId, 'resultValue': val.resultValue, 'remarks': val.remarks })
+ } else {
+ setRemarksVal({ 'categoryId': val.categoryId, 'id': '', 'supplierRegisterId': id, 'detailId': val.id, 'resultValue': '', 'remarks': '' })
+ }
+ setRemarkVisible(true)
+ }
+
+ const closeRemarks = () => { // 关闭备注
+ if (editable) {
+ let x = false;
+ bidEvalDetailDTOList.map((item: any) => {
+ if (item.supplierRegisterId == remarksVal.supplierRegisterId && item.detailId == remarksVal.detailId) {
+ item.remarks = remarkForm.getFieldsValue().remarks
+ dataSource.map((item: any) => {
+ if (remarksVal.detailId == item.id) {
+ item.scoreMap[remarksVal.supplierRegisterId].remarks = remarkForm.getFieldsValue().remarks
+ }
+ })
+ x = true
+ }
+ })
+ if (!x) {
+ dataSource.map((item: any) => {
+ if (remarksVal.detailId) {
+ if (remarksVal.detailId == item.id && item.scoreMap && item.scoreMap[remarksVal.supplierRegisterId] && item.scoreMap[remarksVal.supplierRegisterId].remarks != remarkForm.getFieldsValue().remarks) {
+ bidEvalDetailDTOList.push({ 'categoryId': remarksVal.categoryId, 'id': remarksVal.id, 'supplierRegisterId': remarksVal.supplierRegisterId, 'detailId': remarksVal.detailId, 'resultValue': remarksVal.resultValue, 'remarks': remarkForm.getFieldsValue().remarks });
+ item.scoreMap[remarksVal.supplierRegisterId].remarks = remarkForm.getFieldsValue().remarks
+ } else if (remarksVal.detailId == item.id && remarksVal.id == '') {
+ bidEvalDetailDTOList.push({ 'categoryId': remarksVal.categoryId, 'id': remarksVal.id, 'supplierRegisterId': remarksVal.supplierRegisterId, 'detailId': remarksVal.detailId, 'resultValue': remarksVal.resultValue, 'remarks': remarkForm.getFieldsValue().remarks });
+ if (item.scoreMap == null) {
+ item.scoreMap = []
+ }
+ item.scoreMap[remarksVal.supplierRegisterId] = { 'categoryId': remarksVal.categoryId, 'id': '', 'supplierRegisterId': remarksVal.supplierRegisterId, 'detailId': remarksVal.detailId, 'resultValue': '', 'remarks': remarkForm.getFieldsValue().remarks }
+ } else if (remarksVal.detailId == item.id) {
+ bidEvalDetailDTOList.push({ 'categoryId': remarksVal.categoryId, 'id': remarksVal.id, 'supplierRegisterId': remarksVal.supplierRegisterId, 'detailId': remarksVal.detailId, 'resultValue': remarksVal.resultValue, 'remarks': remarkForm.getFieldsValue().remarks });
+ item.scoreMap[remarksVal.supplierRegisterId].remarks = remarkForm.getFieldsValue().remarks
+ }
+ } else {
+ if (remarkForm.getFieldsValue().remarks != '') {
+ bidEvalDetailDTOList.push({ 'categoryId': remarksVal.categoryId, 'id': '', 'supplierRegisterId': remarksVal.supplierRegisterId, 'detailId': remarksVal.detailId, 'resultValue': remarksVal.resultValue, 'remarks': remarkForm.getFieldsValue().remarks });
+ item.scoreMap[remarksVal.supplierRegisterId] = { 'remarks': remarkForm.getFieldsValue().remarks }
+ }
+ }
+ })
+ setDataSource([...dataSource])
+ }
+ }
+ setRemarkVisible(false)
+ }
+
+ const supplierTab = (category: any) => { // 供应商列头接口
+ let date = {
+ assessRoomId: assessRoomId,
+ reviewTurnId: reviewTurnId,
+ reviewType: "2"
+ }
+ getPreScoreRegister({ ...date }).then((res) => {
+ if (res.code == 200) {
+ setTotal(res.data.length)
+ setTotalSupplier(res.data)
+ changePagination(1, category, res.data)
+ getFirstTrialTableDetailed(res.data, date);
+ }
+ })
+ }
+
+ let supplierId: any = [] // 供应商数组id
+ const changePagination = (page: any, category: any, totalSupplierColumns: any) => { // 供应商列头
+ if (bidEvalDetailDTOList.length > 0) {
+ saveSorce() // 保存
+ }
+ setCurrent(page)
+ let currentDate = (page - 1) * 3
+ let newColumns = cloneDeep(columns);
+
+ totalSupplierColumns.slice(currentDate, currentDate + 3).map((item: any) => {
+ supplierId.push(item.supplierRegisterId)
+ newColumns.push({
+ title: item.supplierRegisterName,
+ dataIndex: item.supplierRegisterId,
+ editable: true,
+ render: (text: any, record: any) => {
+ if (record.scoreMethod == '0') { // 单选
+ const radioOptions: any[] = [];
+ record.standardList.map((item: any) => {
+ radioOptions.push({ label: item.standardName + '(' + item.standardDetailScore + '分)', value: item.standardDetailScore + '-' + item.id })
+ })
+ if (record.scoreMap && record.scoreMap[item.supplierRegisterId]) {
+ return (
+
+ onChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}
+ />
+
+
+ )
+ } else {
+ return (
+
+ onChange(e, record, item.supplierRegisterId)}
+ />
+
+
+ )
+ }
+ } else if (record.scoreMethod == '1') { // 多选
+ const checkboxOptions: any[] = [];
+ record.standardList.map((item: any) => {
+ checkboxOptions.push({ label: item.standardName + '(' + item.standardDetailScore + '分)', value: item.standardDetailScore + '-' + item.id })
+ })
+ if (record?.scoreMap && record?.scoreMap[item.supplierRegisterId] && (record?.scoreMap[item.supplierRegisterId]?.standardId || record?.scoreMap[item.supplierRegisterId]?.id)) {
+ let defaultArr = record.scoreMap[item.supplierRegisterId].standardId.split(",")
+ let defaultValue: any = []
+ record.standardList.map((item: any) => {
+ defaultArr.map((val: any) => {
+ if (item.id == val) {
+ defaultValue.push(item.standardDetailScore + '-' + item.id)
+ }
+ })
+ })
+ return (
+
+ checkChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId)}
+ />
+
+
+ )
+ } else {
+ return (
+
+ checkChange(e, record, item.supplierRegisterId)}
+ />
+
+
+ )
+ }
+ } else if (record.scoreMethod == '2') { // 人工
+ if (record.scoreMap && record.scoreMap[item.supplierRegisterId]) {
+ return (
+
+ 评分区间:{record.lowScore}分~{record.highScore}分} placement="topLeft">
+ inputChange(e, record.scoreMap[item.supplierRegisterId], item.supplierRegisterId, record.highScore, record.lowScore)}
+ />
+
+
+
+
+ )
+ } else {
+ return (
+
+ 评分区间:{record.lowScore}分~{record.highScore}分} placement="topLeft">
+ inputChange(e, record, item.supplierRegisterId, record.highScore, record.lowScore)} style={{ width: '50%' }} />
+
+
+
+
+ )
+ }
+ } else if (record.scoreMethod == '4') { // 步长
+ let optionLength = record.highScore / record.lowScore
+ let optionArr: any = []
+ for (let i = 1; i <= optionLength; i++) {
+ optionArr.push(record.lowScore * i)
+ }
+ if (record.scoreMap && record.scoreMap[item.supplierRegisterId]) {
+ return (
+
+
+
+
+ )
+ } else {
+ return (
+
+
+
+
+ )
+ }
+ }
+ },
+ })
+ })
+ setSupplierColumns([...newColumns])
+ ratingData(category)
+ }
+
+
+
+ //询价项目- 报价 -查看报价详情
+ const lookFileDetails = async (record: any) => {
+ const turnId = getURLInformation("turnId")
+ await getPage(turnId).then(async res => {
+ if (res?.code == 200 && res?.success == true) {
+ const data = res?.data
+ let offerId = ''
+ if (data?.length > 0) {
+ data.forEach((e: any) => {
+ if (e.id == record?.supplierRegisterId) {
+ offerId = e.offerOrderNo
+ }
+ });
+ }
+ await getProjectById(getProId()).then(response => {
+ if (response?.code == 200 && response?.success == true) {
+ const data = response?.data
+ // window.open(`${REACT_APP_XUNJIA_REDIRECT}/inquiryoffer/ztbViewOffer.do?inquiry_no=${resData?.ebpProjectNumber}&offer_no=${offerId}`)
+ const page = `quote-ztbIndex&inqueryNo=${data?.ebpProjectNumber}&offNo=${record?.offerOrderNo}`;
+ const userId = roleCode == "ebtp-supplier" ? record.bidUserId : REACT_APP_XUNJIA_UID;
+ getOfferUrl({ userId, page }).then(response => {
+ if (response?.code == 200) {
+ window.open(response?.data);
+ }
+ })
+ }
+ })
+ }
+ })
+ }
+
+ const ratingData = async (category: any) => { // 评分数据
+ if (!category) return;
+ setSpinVisible(true)
+ totalQualified = []
+ let query = {
+ reviewTurnId: reviewTurnId,
+ reviewType: "2",
+ assessRoomId: assessRoomId,
+ category: category,
+ supplierRegisterIds: supplierId
+ }
+ await getPreScoreScoreDetail({ ...query }).then((res) => { // 评分数据
+ if (res.code == 200) {
+ setTypeId(res.data.categoryId) // 设置类别id
+ setTypeCategory(res.data.category) // 设置类别
+ setSpinVisible(false)
+ if (res.data.judgesStatus != '1') {
+ disabled = true
+ setIsDisabled(true)
+ } else {
+ disabled = false
+ setIsDisabled(false)
+ }
+ setSubId(res.data.id)
+ // setDataSource(res.data.detailList)
+ // totalQualified = res.data.detailList
+ setDataSource(createNewArr(res.data.detailList, 'categoryName'))
+ totalQualified = createNewArr(res.data.detailList, 'categoryName')
+ } else {
+ setSpinVisible(false)
+ }
+ }).finally(() => {
+ setSpinVisible(false)
+ })
+ }
+
+ const onChange = (e: any, val: any, id: any) => { // 单选框操作
+ let detailValue = e.target.value.split("-")[0]
+ let standardId = e.target.value.split("-")[1]
+ totalQualified.map((item: any) => {
+ if (val.detailId) {
+ if (val.detailId == item.id) {
+ for (let i = 0; i < supplierId.length; i++) {
+ if (id == supplierId[i]) {
+ item.scoreMap[supplierId[i]].resultValue = detailValue
+ item.scoreMap[supplierId[i]].detailValue = detailValue
+ item.scoreMap[supplierId[i]].standardId = standardId
+ }
+ }
+ }
+ } else {
+ if (val.id == item.id) {
+ for (let i = 0; i < supplierId.length; i++) {
+ if (id == supplierId[i]) {
+ if (item.scoreMap == null) {
+ item.scoreMap = []
+ }
+ item.scoreMap[supplierId[i]] = { 'categoryId': val.categoryId, 'detailValue': detailValue, 'resultValue': detailValue, 'standardId': standardId, 'id': '', 'supplierRegisterId': supplierId[i], 'detailId': val.id, 'remarks': '' }
+ }
+ }
+ }
+ }
+ })
+ let x = false;
+ if (val.detailId) {
+ bidEvalDetailDTOList.map((item: any) => {
+ if (val.detailId && item.supplierRegisterId == id && item.id == val.id) {
+ item.resultValue = detailValue
+ item.detailValue = detailValue
+ item.standardId = standardId
+ x = true
+ }
+ })
+ }
+ if (!x) {
+ if (val.detailId) {
+ bidEvalDetailDTOList.push({ 'categoryId': val.categoryId, 'detailValue': detailValue, 'resultValue': detailValue, 'standardId': standardId, 'id': val.id, 'supplierRegisterId': val.supplierRegisterId, 'detailId': val.detailId, 'remarks': val.remarks });
+ } else {
+ bidEvalDetailDTOList.push({ 'categoryId': val.categoryId, 'detailValue': detailValue, 'resultValue': detailValue, 'standardId': standardId, 'id': '', 'supplierRegisterId': id, 'detailId': val.id, 'remarks': '' });
+ }
+ }
+ setDataSource([...totalQualified])
+ }
+
+ const checkChange = (list: any, val: any, id: any) => { // 复选框操作
+ let detailValue: any, resultValue: any = 0, standardId: any
+ let detailValueArr: any = []
+ let standardIdArr: any = []
+ if (val.detailId) {
+ for (let i = 0; i < list.length; i++) {
+ detailValueArr.push(list[i].split("-")[0])
+ standardIdArr.push(list[i].split("-")[1])
+ resultValue += Number(list[i].split("-")[0])
+ }
+ detailValue = detailValueArr.toString()
+ standardId = standardIdArr.toString()
+ if (resultValue == 0 && detailValue == "" && standardId == "") {
+ resultValue = ""
+ }
+ } else {
+ detailValue = list[0].split("-")[0]
+ resultValue = list[0].split("-")[0]
+ standardId = list[0].split("-")[1]
+ }
+ totalQualified.map((item: any) => { // 处理页面回显
+ if (val.detailId) {
+ if (val.detailId == item.id) {
+ for (let i = 0; i < supplierId.length; i++) {
+ if (id == supplierId[i]) {
+ item.scoreMap[supplierId[i]].resultValue = resultValue
+ item.scoreMap[supplierId[i]].detailValue = detailValue
+ item.scoreMap[supplierId[i]].standardId = standardId
+ }
+ }
+ }
+ } else {
+ if (val.id == item.id) {
+ for (let i = 0; i < supplierId.length; i++) {
+ if (id == supplierId[i]) {
+ if (item.scoreMap == null) {
+ item.scoreMap = []
+ }
+ if (item.scoreMap[supplierId[i]]) {
+ item.scoreMap[supplierId[i]] = { 'categoryId': val.categoryId, 'detailValue': detailValue, 'resultValue': resultValue, 'standardId': standardId, 'id': item.scoreMap[supplierId[i]].id, 'supplierRegisterId': id, 'detailId': val.id, 'remarks': '' }
+ } else {
+ item.scoreMap[supplierId[i]] = { 'categoryId': val.categoryId, 'detailValue': detailValue, 'resultValue': resultValue, 'standardId': standardId, 'id': '', 'supplierRegisterId': id, 'detailId': val.id, 'remarks': '' }
+ }
+ }
+ }
+ }
+ }
+ })
+ let x = false;
+ if (val.detailId) { // 处理数据选中
+ bidEvalDetailDTOList.map((item: any) => {
+ if (item.supplierRegisterId == id && item.detailId == val.detailId) {
+ item.resultValue = resultValue
+ item.detailValue = detailValue
+ item.standardId = standardId
+ x = true
+ }
+ })
+ } else {
+ if (bidEvalDetailDTOList) {
+ bidEvalDetailDTOList.map((item: any) => {
+ if (item.supplierRegisterId == id && item.detailId == val.id) {
+ item.resultValue = resultValue
+ item.detailValue = detailValue
+ item.standardId = standardId
+ x = true
+ }
+ })
+ }
+ }
+ if (!x) { // 向保存数组添加数据
+ if (val.detailId) {
+ bidEvalDetailDTOList.push({ 'categoryId': val.categoryId, 'detailValue': detailValue, 'resultValue': resultValue, 'standardId': standardId, 'id': val.id, 'supplierRegisterId': val.supplierRegisterId, 'detailId': val.detailId, 'remarks': val.remarks });
+ } else {
+ bidEvalDetailDTOList.push({ 'categoryId': val.categoryId, 'detailValue': detailValue, 'resultValue': resultValue, 'standardId': standardId, 'id': '', 'supplierRegisterId': id, 'detailId': val.id, 'remarks': '' });
+ }
+ }
+ setDataSource([...totalQualified])
+ }
+
+ const handleChange = (e: any, val: any, id: any) => { // 下拉框操作
+ totalQualified.map((item: any) => { // 处理页面回显
+ if (val.detailId) {
+ if (val.detailId == item.id) {
+ for (let i = 0; i < supplierId.length; i++) {
+ if (id == supplierId[i]) {
+ item.scoreMap[supplierId[i]].resultValue = e
+ item.scoreMap[supplierId[i]].detailValue = e
+ }
+ }
+ }
+ } else {
+ if (val.id == item.id) {
+ for (let i = 0; i < supplierId.length; i++) {
+ if (id == supplierId[i]) {
+ if (item.scoreMap == null) {
+ item.scoreMap = []
+ }
+ item.scoreMap[supplierId[i]] = { 'categoryId': val.categoryId, 'detailValue': e, 'resultValue': e, 'id': '', 'supplierRegisterId': id, 'detailId': val.id, 'remarks': '' }
+ }
+ }
+ }
+ }
+ })
+ let x = false;
+ if (val.detailId) {
+ bidEvalDetailDTOList.map((item: any) => {
+ if (item.supplierRegisterId == id && item.detailId == val.detailId) {
+ item.resultValue = e
+ item.detailValue = e
+ x = true
+ }
+ })
+ }
+ if (!x) {
+ if (val.detailId) {
+ bidEvalDetailDTOList.push({ 'categoryId': val.categoryId, 'detailValue': e, 'resultValue': e, 'id': val.id, 'supplierRegisterId': val.supplierRegisterId, 'detailId': val.detailId, 'remarks': val.remarks });
+ } else {
+ bidEvalDetailDTOList.push({ 'categoryId': val.categoryId, 'detailValue': e, 'resultValue': e, 'id': '', 'supplierRegisterId': id, 'detailId': val.id, 'remarks': '' });
+ }
+ }
+ setDataSource([...totalQualified])
+ }
+
+ const inputChange = (e: any, val: any, id: any, sorce: any, lowScore: any) => { // 输入框操作
+ let inpVal = e.target.value
+ let inputNum = /^(\-|\+?)\d{0,4}(\.\d{0,5})?$/
+ if (inputNum.test(inpVal)) {
+ if (Number(inpVal) > sorce) {
+ message.error('输入分值不可大于最高分值!')
+ inpVal = sorce
+ }
+ if (Number(inpVal) < lowScore) {
+ message.error('输入分值不可小于最低分值!')
+ inpVal = lowScore
+ }
+ } else {
+ message.error('请输入正确的分值!')
+ inpVal = inpVal.substring(0, inpVal.length - 1)
+ }
+ totalQualified.map((item: any) => { // 处理页面回显
+ if (val.detailId) {
+ if (val.detailId == item.id) {
+ for (let i = 0; i < supplierId.length; i++) {
+ if (id == supplierId[i]) {
+ item.scoreMap[supplierId[i]].resultValue = inpVal
+ }
+ }
+ }
+ } else {
+ if (val.id == item.id) {
+ for (let i = 0; i < supplierId.length; i++) {
+ if (id == supplierId[i]) {
+ if (item.scoreMap == null) {
+ item.scoreMap = []
+ }
+ item.scoreMap[supplierId[i]] = { 'categoryId': val.categoryId, 'detailValue': inpVal, 'resultValue': inpVal, 'id': '', 'supplierRegisterId': id, 'detailId': val.id, 'remarks': '' }
+ }
+ }
+ }
+ }
+ })
+ let x = false;
+ if (val.detailId) {
+ bidEvalDetailDTOList.map((item: any) => {
+ if (item.supplierRegisterId == id && item.detailId == val.detailId) {
+ item.resultValue = inpVal
+ item.detailValue = inpVal
+ x = true
+ }
+ })
+ }
+ if (!x) {
+ if (val.detailId) {
+ bidEvalDetailDTOList.push({ 'categoryId': val.categoryId, 'detailValue': inpVal, 'resultValue': inpVal, 'id': val.id, 'supplierRegisterId': val.supplierRegisterId, 'detailId': val.detailId, 'remarks': val.remarks });
+ } else {
+ bidEvalDetailDTOList.push({ 'categoryId': val.categoryId, 'detailValue': inpVal, 'resultValue': inpVal, 'id': '', 'supplierRegisterId': id, 'detailId': val.id, 'remarks': '' });
+ }
+ }
+ setDataSource([...totalQualified])
+ }
+
+ const gettabList = () => { // tab
+ let date = {
+ assessRoomId: assessRoomId,
+ reviewTurnId: reviewTurnId,
+ rvwType: reviewType
+ }
+ getPreScoreTabList({ ...date }).then((res) => {
+ if (res.code == 200) {
+ setDateLength(res.data.length)
+ if (res.data.length > 0) {
+ supplierTab(res.data[0].category) // 供应商列头
+ if (res.data[0].name != '报价') {
+ setTabListName(res.data[0].name)
+ setTabList(res.data) // tab数据
+ setTypeId(res.data[0].id) // 设置类别id
+ setTypeCategory(res.data[0].category) // 设置类别
+ } else if (res.data[0].name == '报价') {
+ setTabListName(res.data[0].name)
+ setTabList(res.data) // tab数据
+ setTypeId(res.data[0].id) // 设置类别id
+ setTypeCategory(res.data[0].category) // 设置类别
+ offerList(res.data[0].category)
+ }
+ }
+ }
+ })
+ }
+
+ /**
+ * 获取祥审记录表数据
+ * @param defaultSupplierData
+ * @param findScoreRecordParams
+ */
+ const getFirstTrialTableDetailed = (defaultSupplierData: any, findScoreRecordParams: any) => {
+ setFirstTrialTableDetailedTable(
+ )
+ }
+
+
+ useEffect(() => {
+ const initializePage = async () => {
+ const nodeId = getURLInformation("nodeId");
+ if (nodeId) {
+ const queryRes = await getQueryInfo(nodeId);
+ if (queryRes.code == 200) {
+ setEditable(queryRes.data.nodeStatus === 3);
+ editableRef.current = queryRes.data.nodeStatus === 3;
+ }
+ }
+
+ bidEvalDetailDTOList = []
+ let date = {
+ reviewTurnId: getURLInformation("turnId"),
+ reviewType: '2',
+ }
+ const res = await getEval({ ...date })
+ if (res.code == 200) {
+ assessRoomId = res.data.assessRoomId
+ reviewTurnId = res.data.reviewTurnId
+ reviewType = res.data.reviewType
+ bidEvalId = res.data.id
+ if (res.data.reviewStatus != 1) {
+ endProgress = true
+ setIsEndProgress(true)
+ } else {
+ endProgress = false
+ setIsEndProgress(false)
+ }
+ gettabList()
+ }
+ }
+ initializePage();
+
+ }, [1]);
+
+ return (
+ <>
+
+
+
+ {
+ tabList.map((item: any, index: any) => {
+ if (item.name == '报价') {
+ return (
+
+
+ {
+ automaticOffer == '2' ?
+
+
+
+
+
+
changeOffer(e, typeId, offerTotalSource)}
+ size="small"
+ className="mb8"
+ />
+ :
+
+
+ 1. 确定有效报价
+ 注:以下所述平均报价、最低报价、最高报价均根据有效报价计算得出,非有效报价不参与计算,但不以此否决其投标。
+ 确定规则为:{tit1}
+
+
({
+ disabled: isDisabledOffer || isEndProgress,
+ }),
+ }}
+ />
+
+
+
+ 最低报价:{smallPrice}(元)最高报价:{bigPrice}(元)平均报价:{averagePrice}(元)
+
+
+
+ }
+
+
+ )
+ } else {
+ return (
+
+
+
+
+
+
+
+
+
changePagination(e, typeCategory, totalSupplier)}
+ size="small"
+ className="mb8"
+ />
+
+
+
+
+ )
+ }
+ })
+ }
+
+
+ setRemarkVisible(false)}
+ onOk={() => closeRemarks()}
+ okButtonProps={{
+ disabled: !editable,
+ }}
+ centered
+ >
+
+
+
+
+
+ setDetailVisible(false)}
+ footer={null}
+ centered
+ style={{ maxHeight: modalHeight }}
+ bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto' }}
+ >
+ {firstTrialTableDetailedTable}
+
+
+ >
+ )
+}
+export default PreScore;
\ No newline at end of file
diff --git a/src/pages/Evaluation/BidDetailed/BidDetailedReview/service.ts b/src/pages/Evaluation/BidDetailed/BidDetailedReview/service.ts
index 62fc3ee..8bc174d 100644
--- a/src/pages/Evaluation/BidDetailed/BidDetailedReview/service.ts
+++ b/src/pages/Evaluation/BidDetailed/BidDetailedReview/service.ts
@@ -13,6 +13,13 @@ export async function getTabList(params: any) { // tab
params
});
}
+// 预打分页面专有
+export async function getPreScoreTabList(params: any) { // tab
+ return request('/api/biz-service-ebtp-rsms/v1/eval/manager/findCategoryTabList', {
+ method: 'get',
+ params
+ });
+}
// export async function getProgress(data: any) { // 我的进度
// return request('/v1/bid/eval/detail/evalProgress', {
@@ -41,6 +48,13 @@ export async function getScoreDetail(data: any) { // 评分数据
data: data
});
}
+// 预打分页面专有
+export async function getPreScoreScoreDetail(data: any) { // 评分数据
+ return request('/api/biz-service-ebtp-rsms/v1/eval/manager/findReviewConfig', {
+ method: 'post',
+ data: data
+ });
+}
export async function getRegister(params: any) { // 供应商动态列头
return request('/api/biz-service-ebtp-rsms/v1/bid/eval/detail/findRegister', {
@@ -48,6 +62,13 @@ export async function getRegister(params: any) { // 供应商动态列头
params
});
}
+// 预打分页面专有
+export async function getPreScoreRegister(params: any) { // 供应商动态列头
+ return request('/api/biz-service-ebtp-rsms/v1/eval/manager/findRegister', {
+ method: 'get',
+ params
+ });
+}
// export async function submitDetail(data: any) { // 保存
// return request('/v1/bid/eval/detail', {
@@ -62,6 +83,13 @@ export async function submitDetail(data: any) { // 保存
data: data
});
}
+// 预打分页面专有
+export async function getPreScoreSubmitDetail(data: any) { // 保存
+ return request('/api/biz-service-ebtp-rsms/v1/eval/manager/save', {
+ method: 'post',
+ data: data
+ });
+}
// export async function updateJudgesStatus(data: any) { // 提交
// return request('/v1/bid/eval/summary/insertDeviatedWarn', {
@@ -132,6 +160,14 @@ export async function saveOffer(data: any) { // 自动报价保存
});
}
+// 预打分页面专有
+export async function getPreScoreSaveOffer(data: any) { // 自动报价保存
+ return request('/api/biz-service-ebtp-rsms/v1/eval/manager/save', {
+ method: 'post',
+ data: data
+ });
+}
+
/**
* 查询已报名的供应商
* @param params
diff --git a/src/pages/Evaluation/BidPreliminary/BidPreliminaryManager/BPM.js b/src/pages/Evaluation/BidPreliminary/BidPreliminaryManager/BPM.js
index 56282c5..cbeb7e4 100644
--- a/src/pages/Evaluation/BidPreliminary/BidPreliminaryManager/BPM.js
+++ b/src/pages/Evaluation/BidPreliminary/BidPreliminaryManager/BPM.js
@@ -2,7 +2,6 @@ import React, {PureComponent} from 'react';
import {Divider,Button,Form,Card,Tabs,Table,Tooltip,Input,Select,Row,Col,message,Modal,Spin,Pagination} from 'antd';
// import './index.less';
import { connect } from "dva";
-// import { routerRedux } from 'dva/router';
import { getRoomId } from '@/utils/session';
import { getURLInformation } from '@/utils/CommonUtils';
import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
diff --git a/src/pages/MainPage/ProjectManager/Jury.js b/src/pages/MainPage/ProjectManager/Jury.js
index 5affae0..210aca0 100644
--- a/src/pages/MainPage/ProjectManager/Jury.js
+++ b/src/pages/MainPage/ProjectManager/Jury.js
@@ -4,7 +4,6 @@ import { history } from '@umijs/max';
import { connect } from 'dva';
import './index.less';
import talkPng from '@/images/talk/talk.png';
-// import { routerRedux } from 'dva/router';
import { RightOutlined } from '@ant-design/icons';
import moment from 'moment';
import { jurySaveInfo, getRA } from '@/utils/session';
diff --git a/src/pages/MainPage/ProjectManager/disposalManager.js b/src/pages/MainPage/ProjectManager/disposalManager.js
index 0ce3836..be21452 100644
--- a/src/pages/MainPage/ProjectManager/disposalManager.js
+++ b/src/pages/MainPage/ProjectManager/disposalManager.js
@@ -4,7 +4,6 @@ import { Row, Col, Tooltip, Card, List, DatePicker, Button, Statistic, Spin, Emp
import { connect } from 'dva';
import './index.less';
import talkPng from '@/images/talk/talk.png';
-// import { routerRedux } from 'dva/router';
import { RightOutlined } from '@ant-design/icons';
import moment from 'moment';
import { auctionFollowUpAProjectManager, getRA } from '@/utils/session';
diff --git a/src/pages/MainPage/ProjectManager/index.less b/src/pages/MainPage/ProjectManager/index.less
index 742a75b..8afc3de 100644
--- a/src/pages/MainPage/ProjectManager/index.less
+++ b/src/pages/MainPage/ProjectManager/index.less
@@ -87,6 +87,9 @@
border-radius: 4px;
}
}
+ .cardtre {
+ height: 100%;
+ }
}
.topt::-webkit-scrollbar {
width: 8px;
diff --git a/src/pages/MainPage/ProjectManager/manager.js b/src/pages/MainPage/ProjectManager/manager.js
index 7f25f07..e7c9a4d 100644
--- a/src/pages/MainPage/ProjectManager/manager.js
+++ b/src/pages/MainPage/ProjectManager/manager.js
@@ -5,7 +5,6 @@ import { Row, Col, Tooltip, Card, List, DatePicker, Button, Statistic, Spin, Emp
import { connect } from 'dva';
import './index.less';
import talkPng from '@/images/talk/talk.png';
-// import { routerRedux } from 'dva/router';
import { RightOutlined } from '@ant-design/icons';
import moment from 'moment';
import { followUpAProjectManager, getSessionUserData } from '@/utils/session';
diff --git a/src/pages/MainPage/ProjectManager/managerAdmin.js b/src/pages/MainPage/ProjectManager/managerAdmin.js
index 01d7ce2..d298e95 100644
--- a/src/pages/MainPage/ProjectManager/managerAdmin.js
+++ b/src/pages/MainPage/ProjectManager/managerAdmin.js
@@ -4,7 +4,6 @@ import { Row, Col, Tooltip, Card, List, DatePicker, Button, Statistic, Spin, Emp
import { connect } from 'dva';
import './index.less';
import talkPng from '@/images/talk/talk.png';
-// import { routerRedux } from 'dva/router';
import { RightOutlined } from '@ant-design/icons';
import moment from 'moment';
import { getRA } from '@/utils/session';
diff --git a/src/pages/MainPage/ProjectManager/managerSubAdmin.js b/src/pages/MainPage/ProjectManager/managerSubAdmin.js
index 14e3920..9a8e31e 100644
--- a/src/pages/MainPage/ProjectManager/managerSubAdmin.js
+++ b/src/pages/MainPage/ProjectManager/managerSubAdmin.js
@@ -4,7 +4,6 @@ import { Row, Col, Tooltip, Card, List, DatePicker, Button, Statistic, Spin, Emp
import { connect } from 'dva';
import './index.less';
import talkPng from '@/images/talk/talk.png';
-// import { routerRedux } from 'dva/router';
import { RightOutlined } from '@ant-design/icons';
import moment from 'moment';
import { getRA } from '@/utils/session';
diff --git a/src/pages/MainPage/ProjectManager/participants.js b/src/pages/MainPage/ProjectManager/participants.js
index 89d8970..ec567b9 100644
--- a/src/pages/MainPage/ProjectManager/participants.js
+++ b/src/pages/MainPage/ProjectManager/participants.js
@@ -4,7 +4,6 @@ import { Row, Col, Tooltip, Card, List, DatePicker, Button, Statistic, Spin, Emp
import { connect } from 'dva';
import './index.less';
import talkPng from '@/images/talk/talk.png';
-// import { routerRedux } from 'dva/router';
import { RightOutlined } from '@ant-design/icons';
import moment from 'moment';
import { getRA } from '@/utils/session';
diff --git a/src/pages/MainPage/ProjectManager/purchaseManager.js b/src/pages/MainPage/ProjectManager/purchaseManager.js
index 10a22c2..a6916cd 100644
--- a/src/pages/MainPage/ProjectManager/purchaseManager.js
+++ b/src/pages/MainPage/ProjectManager/purchaseManager.js
@@ -20,7 +20,6 @@ import {
import { connect } from 'dva';
import './index.less';
import talkPng from '@/images/talk/talk.png';
-// import { routerRedux } from 'dva/router';
import { RightOutlined } from '@ant-design/icons';
import moment from 'moment';
import { followUpAProjectManager, getRA, getSessionUserData } from '@/utils/session';
diff --git a/src/pages/MainPage/ProjectManager/supplier.js b/src/pages/MainPage/ProjectManager/supplier.js
index d44a82b..77ccb3e 100644
--- a/src/pages/MainPage/ProjectManager/supplier.js
+++ b/src/pages/MainPage/ProjectManager/supplier.js
@@ -5,7 +5,6 @@ import { history } from '@umijs/max';
import { connect } from 'dva';
import './index.less';
import talkPng from '@/images/talk/talk.png';
-// import { routerRedux } from 'dva/router';
import { RightOutlined } from '@ant-design/icons';
import moment from 'moment';
import { followUpAProjectSupplier, getSessionUserData, getRA } from '@/utils/session';
diff --git a/src/pages/Project/ProjectManage/Examination/components/ProjectManage.tsx b/src/pages/Project/ProjectManage/Examination/components/ProjectManage.tsx
index b14e160..05ba20d 100644
--- a/src/pages/Project/ProjectManage/Examination/components/ProjectManage.tsx
+++ b/src/pages/Project/ProjectManage/Examination/components/ProjectManage.tsx
@@ -4,7 +4,7 @@ import ProTable, { ProColumns } from '@ant-design/pro-table';
import tableProps from '@/utils/tableProps';
import { Button, Spin } from 'antd';
import React, { useState } from 'react';
-import { useHistory } from '@umijs/max';
+import { history } from '@umijs/max';
import { getPage } from '../service';
interface ProjectManageProps {
@@ -35,7 +35,7 @@ const ProjectManage: React.FC = (props) => {
const procurementTypeEntrust = 'procurement_type=entrust';
//采购方式
const procurementModeEntrust = 'procurement_mode=entrust';
- // const history = useHistory();
+
const columns: ProColumns[] = [
{
diff --git a/src/pages/Project/ProjectManage/ProjectManager/ProjectDocumentation/components/ProjectDocumentation.tsx b/src/pages/Project/ProjectManage/ProjectManager/ProjectDocumentation/components/ProjectDocumentation.tsx
index 2400dbd..cf5cbe6 100644
--- a/src/pages/Project/ProjectManage/ProjectManager/ProjectDocumentation/components/ProjectDocumentation.tsx
+++ b/src/pages/Project/ProjectManage/ProjectManager/ProjectDocumentation/components/ProjectDocumentation.tsx
@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import { queryingPagingData } from '@/utils/PageUtils';
import { getDictNameByVal, getProjectTypeCode, getURLInformation, getUrlParam, getUrlRelativePath, isEmpty, isNotEmpty, multipleTypeTransform, proTableValueEnum, proTableValueEnumOther } from '@/utils/CommonUtils';
-import { useHistory } from '@umijs/max';
+import { history } from '@umijs/max';
import { followUpAProjectManager, getDicData, projectDataItem, getSessionUserData } from '@/utils/session';
import ExceptionHandling from './ExceptionHandling/ExceptionHandling';
import { Button, Card, Col, Popover, Progress, Row, Tag, message } from 'antd';
@@ -37,7 +37,7 @@ const ProjectDocumentation: React.FC = () => {
//获取字典
const getDict: any = getDicData();
const dictData = JSON.parse(getDict);
- // const history = useHistory();
+
/**
* proList信息
*/
diff --git a/src/pages/Project/ProjectManage/ProjectManager/PurchasingManagerEnquiries/components/PurchasingManagerEnquiries.tsx b/src/pages/Project/ProjectManage/ProjectManager/PurchasingManagerEnquiries/components/PurchasingManagerEnquiries.tsx
index 40ef030..d301e42 100644
--- a/src/pages/Project/ProjectManage/ProjectManager/PurchasingManagerEnquiries/components/PurchasingManagerEnquiries.tsx
+++ b/src/pages/Project/ProjectManage/ProjectManager/PurchasingManagerEnquiries/components/PurchasingManagerEnquiries.tsx
@@ -14,7 +14,7 @@ import ProTable, { ProColumns } from '@ant-design/pro-table';
import tableProps from '@/utils/tableProps';
import { Button, Card, PageHeader } from 'antd';
import React, { useState } from 'react';
-import { useHistory } from '@umijs/max';
+import { history } from '@umijs/max';
import kefu from '@/assets/img/kefu.png' //智慧客服
import { submitHiddenForm, createHiddenForm } from '@/utils/CustomerService' //智慧客服
const PurchasingManagerEnquiries: React.FC = () => {
@@ -30,7 +30,7 @@ const PurchasingManagerEnquiries: React.FC = () => {
const procurementTypeEntrust = 'procurement_type=entrust';
//采购方式
const procurementModeEntrust = 'procurement_mode=entrust';
- // const history = useHistory();
+
const columns: ProColumns[] = [
{
title: '序号',
diff --git a/src/pages/Project/ProjectManage/Supervision/components/FavoritesList.tsx b/src/pages/Project/ProjectManage/Supervision/components/FavoritesList.tsx
index 988f07d..8458ed8 100644
--- a/src/pages/Project/ProjectManage/Supervision/components/FavoritesList.tsx
+++ b/src/pages/Project/ProjectManage/Supervision/components/FavoritesList.tsx
@@ -4,7 +4,7 @@ import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
import tableProps from '@/utils/tableProps';
import { Button, message, Popconfirm, Spin, Space, Tag } from 'antd';
import React, { useRef, useState } from 'react';
-import { useHistory } from '@umijs/max';
+import { history } from '@umijs/max';
import { getFavoritesList, removePublic, toPublic, updateReadStatus } from '../service';
interface FavoritesListProps {
@@ -43,7 +43,7 @@ const FavoritesList: React.FC = (props) => {
const [selectedRows, setSelectedRows] = useState([]);
- // const history = useHistory();
+
const ref = useRef();
const columns: ProColumns[] = [
{
diff --git a/src/pages/Project/ProjectManage/Supervision/components/ProjectManage.tsx b/src/pages/Project/ProjectManage/Supervision/components/ProjectManage.tsx
index 2f7c425..35bc075 100644
--- a/src/pages/Project/ProjectManage/Supervision/components/ProjectManage.tsx
+++ b/src/pages/Project/ProjectManage/Supervision/components/ProjectManage.tsx
@@ -4,7 +4,7 @@ import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
import tableProps from '@/utils/tableProps';
import { Button, message, Space, Spin, Tag } from 'antd';
import React, { useRef, useState } from 'react';
-import { useHistory } from '@umijs/max';
+import { history } from '@umijs/max';
import { getPage, removePublic, toPublic } from '../service';
interface ProjectManageProps {
@@ -42,7 +42,7 @@ const ProjectManage: React.FC = (props) => {
//选中
const [selectedRows, setSelectedRows] = useState([]);
- // const history = useHistory();
+
const ref = useRef();
const columns: ProColumns[] = [
diff --git a/src/pages/ZBiXuan/EvaluationRoom/Config/FirstLimited/detailedStoreIn.tsx b/src/pages/ZBiXuan/EvaluationRoom/Config/FirstLimited/detailedStoreIn.tsx
new file mode 100644
index 0000000..80e7aa4
--- /dev/null
+++ b/src/pages/ZBiXuan/EvaluationRoom/Config/FirstLimited/detailedStoreIn.tsx
@@ -0,0 +1,1071 @@
+import React, { useEffect, useMemo, useRef, useState, } from 'react';
+import { Button, Radio, Input, Modal, Form, Row, Col, Select, Collapse, Checkbox, message, Spin, Popconfirm } from 'antd';
+import { history } from '@umijs/max';
+import ProTable, { EditableProTable, ProColumns } from '@ant-design/pro-table';
+import { PlusOutlined, EditOutlined, DeleteOutlined, CloseOutlined, ExclamationCircleOutlined, } from '@ant-design/icons';
+import { getPage, detailTem, requestCheckPreScore } from './service'
+import '@/assets/xsy_style.less'
+import './detailedStyles.less'
+import { btnAuthority } from '@/utils/authority';
+import { changeHighScore, checkEmpty, checkUnEmp, getQueryString, subCountScore } from '@/pages/Bid/ReviewConfig/Config/components/commonFunc';
+import FileTree, { getTreeDataOut } from '@/pages/Bid/ReviewConfig/Config/components/fileTree';
+import Preview from '@/pages/Bid/ReviewConfig/Config/components/preview';
+import TempleteBtns from '@/pages/Bid/ReviewConfig/Config/components/templeteBtns';
+import { delCate, delDet, delStan, save } from '@/pages/Bid/ReviewConfig/Config/components/service';
+import { getURLInformation } from '@/utils/CommonUtils';
+import { getDefId, getProMethod } from '@/utils/session';
+type detailType = {
+ show: string,
+}
+const DetailedStoreIn: React.FC = (props) => {
+ //===========================================================================================================state
+ const formLayout = {
+ labelCol: { span: 6 },
+ wrapperCol: { span: 18 },
+ };
+ const FormItem = Form.Item;
+ const [form] = Form.useForm();
+ const [formModal] = Form.useForm();
+ const { Option } = Select;
+ const { confirm } = Modal;
+ const { Panel } = Collapse;
+ const { TextArea } = Input;
+ const [assessRoomId, setAssessRoomId] = useState();//,评标室id
+ // const [turnSort, setTurnSort] = useState();//轮次号
+ const [commonId, setCommonId] = useState();//
+ const [nodeId, setNodeId] = useState();//
+ const [detId, setDetId] = useState();//整个详审的id
+ const [spin, setSpin] = useState(true);//蒙层
+ const [dis, setDis] = useState(true);//可编辑状态 true不能编辑
+ const [category, setCategory] = useState(false);//新增、修改类别窗口
+ const [isUpdateCate, isUpdateCateSet] = useState(false);//是否修改类别
+ const [upData, updataSet] = useState([]);//正在修改的数据
+ const [radioWeight, setRadioWeight] = useState();//是否启用权重
+ const [arithmeticErrorStatus, setArithmeticErrorStatus] = useState();//是否允许算数错误调整
+ const [oid, oidSet] = useState('')//下载excel oid
+ const mainDiv = useRef(null);
+ const [childs, childsSet] = useState([]);//子节点
+ const [roots, rootsSet] = useState([]);//根节点
+ const [treeData, setTreeData] = useState([]);//应答文件树
+ const [preScoreBtnLoading, setPreScoreBtnLoading] = useState(false);
+
+ //商务数据---包含商务子类
+ const [data1, setData1] = useState([]);
+ //技术数据
+ const [data2, setData2] = useState([]);
+ //服务数据
+ const [data3, setData3] = useState([]);
+ //鼠标移入行大类别名称
+ const [onRowCateName, onRowCateNameSet] = useState('');
+
+ //公共表格
+ const commonColumns: ProColumns[] = [
+ { title: '序号', valueType: 'index', width: 50 },
+ {
+ title: '评分项', dataIndex: 'scoreItem', width: '24%',
+ render: (_, record, index) => {
+ const idT = record.id != undefined ? record.id : record.tableId
+ return (
+
+ )
+ }
+ },
+ {
+ title: '评分标准', dataIndex: 'rvwStandard', width: '22%',
+ render: (_, record) => {
+ const idT = record.id != undefined ? record.id : record.tableId
+ const child = (
+
+ )
+ if (record.scoreMethod == '2') {
+ return {
+ children: child,
+ props: {
+ colSpan: 2,
+ },
+ };
+ } else {
+ return child
+ }
+ }
+ },
+ {
+ title: '详细评分标准', dataIndex: 'standardList',
+ render: (_, record) => {
+ if (record.scoreMethod == '2') {
+ return {
+ children: <>>,
+ props: { colSpan: 0 },
+ }
+ }
+ return (
+
+
+ showHeader={false}
+ columns={xizeColumns}
+ rowKey="id"
+ key={record.tableId}
+ size='small'
+ value={record.standardList}
+ onChange={() => {
+ // reTable()
+ }}
+ recordCreatorProps={{
+ newRecordType: 'dataSource',
+ hidden: dis,
+ // style: { width: '508px' },
+ creatorButtonText: '添加详细评分标准( 标准 —— 分值 )',
+ record: () => ({
+ id: Date.now(),
+ delId: Date.now(),
+ standardName: "",
+ standardDetailScore: '',
+ }),
+ }}
+ editable={{
+ // form: formT,
+ type: 'multiple',
+ actionRender: (row, config, defaultDoms) => {
+ if (row.index == 0) {
+ return []
+ }
+ return [xizePopconfirm(record, row)];
+ },
+ editableKeys: dis ? [] : record.standardList?.map((item: any) => item.id),
+ onValuesChange: (editRecord, recordList) => {
+ record.highScore = changeHighScore(record.scoreMethod, recordList)
+ record.standardList = recordList;
+ let re = true;
+ if (editRecord != undefined) {
+ let index = recordList.findIndex((item: any) => item.id == editRecord.id);
+ re = recordList[index].standardName === editRecord.standardName;
+ }
+ re && reTable();
+ },
+ }}
+ />
+
+ )
+ }
+ },
+ {
+ title: '最高分', dataIndex: 'highScore', width: 70,
+ render: (_, record) => {
+ return (
+ <>
+ {record.scoreMethod == 2 ?
+ {
+ const value = event.target.value;
+ record.highScore = value;
+ reTable()
+ }} />
+ :
+
+ }
+ >
+ )
+ }
+ },
+ {
+ title: '最低分', dataIndex: 'lowScore', width: 70,
+ render: (_, record) => {
+ if (record.scoreMethod == 2) {
+ return (
+ {
+ record.lowScore = event.target.value;
+ }} placeholder='最低分'
+ />
+ )
+ } else {
+ return null
+ }
+ }
+ },
+ {
+ title: '一致性', dataIndex: 'consistencyStatus', width: 60,
+ render: (_, record) => {
+ return (
+
+ )
+ }
+ },
+ {
+ title: '操作', dataIndex: 'option', width: 80,
+ valueType: 'option',
+ render: (_, record, index) => {
+ if (!dis) {
+ return (
+ <>
+ {
+ checkUnEmp(record.id) &&
+ <>
+ queryDetData()}
+ parentSpin={async (value) => setSpin(value)}
+ />
+
+ >
+ }
+ {index != 0 && conmmonDelConfirm(record)}
+ >
+ );
+ } else {
+ return <>>
+ }
+ }
+ },
+ ];
+ //细则表格类型定义
+ type DataSourceType = {
+ id: number;
+ delId?: number;//delId 前端新增才有,后端不存
+ index?: number;
+ standardName?: string;
+ standardDetailScore?: string;
+ children?: DataSourceType[];
+ };
+ //细则表格
+ const xizeColumns: ProColumns[] = [
+ {
+ title: '详细标准',
+ key: 'standardName',
+ dataIndex: 'standardName',
+ formItemProps: {
+ rules: [
+ {
+ required: true,
+ whitespace: true,
+ message: '此项是详细标准(必填项)',
+ },
+ {
+ max: 255,
+ whitespace: true,
+ message: '最长可输入255字',
+ },
+ ],
+ },
+ },
+ {
+ title: '分值',
+ key: 'standardDetailScore',
+ dataIndex: 'standardDetailScore',
+ width: 120,
+ formItemProps: {
+ rules: [
+ {
+ required: true,
+ whitespace: true,
+ message: '此项是分值(必填项)',
+ },
+ {
+ pattern: /(^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d{1,2})?$)/,
+ message: '请输入数值(最多两位小数)'
+ }
+ ],
+ },
+ },
+ {
+ title: '操作',
+ valueType: 'option',
+ width: 20,
+ render: (_, record) => {
+ return null;
+ },
+ },
+ ];
+ //============================================================================================================组件
+ const rePreview = useMemo(() => {//预览页面
+ return
+ }, [data1, data2, data3,])
+ const btnAttr = {
+ hidden: btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase']),
+ style: { marginRight: '10px' },
+ disabled: dis,
+ }
+ const returnTem = useMemo(() => {//模板
+ let tem = null;
+ if (nodeId && oid) {
+ tem = queryDetData()}
+ parentSpin={async (value) => setSpin(value)}
+ processData={(data) => processingData(data)}
+ />
+ }
+ return tem;
+ }, [assessRoomId, nodeId, detId, dis, oid])
+ function detailButtons() {//业务按钮组
+ return (
+ <>
+
+
+
+ queryDetData()}
+ parentSpin={async (value) => setSpin(value)}
+ />
+ {rePreview}
+ {returnTem}
+ {
+ getURLInformation("readStatus") != null ?
+
+ : null
+ }
+ >
+ )
+ }
+
+ //保存时提示
+ async function info(count: number, score1: number, score2: number, score3: number, allData: any) {
+ Modal.confirm({
+ title: '详审分数',
+ centered: true,
+ content:
+
总分:{count}分
+
商务:{score1}分
+
技术:{score2}分
+
服务:{score3}分
+
,
+ async onOk() {
+ const success = await save(allData);
+ if (success) {
+ await queryDetData();
+ } else {
+ setSpin(false);
+ }
+ },
+ onCancel() {
+ setSpin(false);
+ },
+ okText: '确认保存'
+ });
+ }
+ //新增类别Modal
+ function addCategoryModal() {
+ return (
+ { setCategory(false); formModal.resetFields() }}
+ onOk={() => {
+ formModal.validateFields().then(() => {
+ if (formModal.getFieldsValue().type === '请选择') {
+ message.error('请选择类别');
+ } else {
+ setCategory(false);
+ setSpin(true);
+ setTimeout(() => {
+ typeControl(formModal.getFieldsValue());
+ formModal.resetFields();
+ // mainDiv.current.scrollTop = mainDiv.current.scrollHeight;
+ }, 100);
+ }
+ })
+ }}
+ >
+
+
+ )
+ }
+ //返回单选按钮组
+ const returnRadios = () => {
+ return (
+
+ )
+ };
+ //返回折叠面板
+ const returnPanel = () => {
+ return (
+
+ {
+ data1.length != 0 &&
+
+ {data1?.map((item: any, mapindex: any) => { return returnTable(item, mapindex) })}
+
+ }
+ {
+ data2.length != 0 &&
+
+ {data2?.map((item: any, mapindex: any) => { return returnTable(item, mapindex) })}
+
+ }
+ {
+ data3.length != 0 &&
+
+ {data3?.map((item: any, mapindex: any) => { return returnTable(item, mapindex) })}
+
+ }
+
+ )
+ };
+ //返回子类表格
+ function returnTable(subData: any, mapindex: number, isBaojia?: boolean) {
+ const confirm = async () => {
+ const categoryName = subData.categoryName;
+ setSpin(true);
+ if (subData.id != undefined) {
+ //走接口删除
+ let success = await delCate(subData.id);
+ if (success) {
+ await queryDetData();
+ }
+ } else {
+ categoryName == '商务' && setData1(data1.filter((item: any) => item.key != subData.key));
+ categoryName == '技术' && setData2(data2.filter((item: any) => item.key != subData.key));
+ categoryName == '服务' && setData3(data3.filter((item: any) => item.key != subData.key));
+ message.success('删除成功');
+ }
+ setSpin(false);
+ }
+
+ if (radioWeight == 1 && subData.weights == undefined || subData.weights == null) {
+ let datat = [];
+ if (subData.categoryName == '商务') {
+ datat = [...data1]
+ datat[mapindex].weights = 100
+ setData1(datat);
+ } else if (subData.categoryName == '技术') {
+ datat = [...data2]
+ datat[mapindex].weights = 100
+ setData2(datat);
+ } else if (subData.categoryName == '服务') {
+ datat = [...data3]
+ datat[mapindex].weights = 100
+ setData3(datat);
+ }
+ }
+ return (
+
+
+
+ {
+ radioWeight == 1 ?
+ subData.name + `( 所占权重:${subData.weights}% , 本表格内所有评分项计算后所得最高分:${(subData.weights * subCountScore(subData)) / 100} 分)`
+ : subData.name + `( 本表格内所有评分项计算后所得最高分:${subCountScore(subData)} 分)`
+ }
+
+ {
+ !dis &&
+
+
+
+
+
+
+ }
+
+
{
+ return {
+ onMouseEnter: event => { onRowCateNameSet(subData.categoryName) }, // 鼠标移入行
+ };
+ }}
+ />
+ {
+ !dis && subData.categoryName !== '报价' &&
+
+ }
+
+ )
+ }
+ //细则表格-删除气泡提示框
+ function xizePopconfirm(record: any, row: any) {
+ const confirm = async () => {
+ setSpin(true);
+ let id = row.id;
+ let success = false;
+ record.standardList = record.standardList.filter((item: any) => item.id != row.id);
+ record.highScore = changeHighScore(record.scoreMethod, record.standardList);
+ if (row.delId != undefined) {//delId 前端新增才有,后端不存
+ reTable();
+ message.success('删除成功');
+ } else {
+ success = await delStan({ id, detailId: record.id, highScore: record.highScore });
+ success && message.success('删除成功');
+ // queryDetData();
+ }
+ setSpin(false);
+ }
+ return (
+
+
+
+ )
+ }
+ //公共子类表格-删除气泡提示框
+ function conmmonDelConfirm(record: any) {
+ let id = record.id;
+ const idT = record.id != undefined ? record.id : record.tableId;
+ const confirm = async () => {
+ setSpin(true);
+ let success = false;
+ form.setFieldsValue({
+ [`scoreItem${idT}${record.key}`]: '',
+ [`rvwStandard${idT}${record.key}`]: '',
+ });
+ checkUnEmp(id) ? success = await delDet({ id }) : null;
+ if (success) {
+ queryDetData();
+ }
+ if (!checkUnEmp(id)) {
+ let dataT: any = []
+ record.categoryName == '商务' && (dataT = [...data1])
+ record.categoryName == '技术' && (dataT = [...data2])
+ record.categoryName == '服务' && (dataT = [...data3])
+ dataT?.map((item: any, index: any) => {
+ if (item.id == record.tableId || item.tableId == record.tableId) {
+ dataT[index].detailList = item.detailList.filter((item2: any) => item2.key != record.key)
+ }
+ })
+ record.categoryName == '商务' && setData1(dataT)
+ record.categoryName == '技术' && setData2(dataT)
+ record.categoryName == '服务' && setData3(dataT)
+ message.success('删除成功!')
+ }
+ setSpin(false);
+ }
+ return (
+
+
+
+ )
+ }
+ //继承上轮确认提示框
+ async function checkPreScore() {
+ setPreScoreBtnLoading(true);
+ const res = await requestCheckPreScore({
+ roomId: assessRoomId,
+ });
+ if (res?.code == 200 && res?.data) {
+ message.success('可以进行预打分,正在跳转至预打分页面');
+ setTimeout(() => {
+ history.push(`/ProjectLayout/ZStoreIn/PreScore?turnId=${getURLInformation("turnId")}&nodeId=${getURLInformation("nodeId")}`);
+ }, 1000);
+ return;
+ } else {
+ message.error('未到应答截止时间,不可进行预打分');
+ }
+ setPreScoreBtnLoading(false);
+ }
+ //===========================================================================================================FUNC
+ useEffect(() => {
+ queryDetData();
+ detailTem().then(res => {
+ res?.code == 200 ? oidSet(res.data?.documentCenterId) : null;
+ });
+ }, []);
+
+ //查询详审数据
+ const queryDetData = async () => {
+ let commonId: any = "";
+ if (getQueryString("id") != null) {
+ commonId = getQueryString("id")
+ }
+ let nodeId: any = '';
+ if (getQueryString("nodeId") != null) {
+ nodeId = getQueryString("nodeId")
+ }
+ const rvwType = 2;
+ setCommonId(commonId);
+ setNodeId(nodeId);
+ setSpin(true);
+ await getPage({ commonId, rvwType, nodeId }).then((res) => {
+ if (res.code == 200) {
+ processingData(res);
+ }
+ })
+ }
+ //处理数据
+ async function processingData(res: any) {
+ setData1([]);
+ setData2([]);
+ setData3([]);
+ let [data1T, data2T, data3T]: any = [[], [], []];
+ let arithmeticErrorStatus: any, weightsStatus: any = "";
+ let dis: any = true;
+ let detId = "";
+ let assessRoomId: any, turnSort: any = 0;
+ const info = res.data;
+ arithmeticErrorStatus = info.arithmeticErrorStatus != null ? info.arithmeticErrorStatus : 0;
+ weightsStatus = info.weightsStatus != null ? info.weightsStatus : 0;
+ assessRoomId = info.assessRoomId;
+ turnSort = info.reviewTurnSort;
+ info?.categoryList?.map((item: any) => {
+ const category = item.category;
+ category === '1' && data1T.push(item);
+ category === '2' && data2T.push(item);
+ category === '5' && data3T.push(item);
+ });
+ if (info.status == 0 || info.status == null) {
+ dis = false;
+ }
+ if (info.id != null) {
+ detId = info.id;
+ }
+ let tree = await getTreeDataOut(assessRoomId, turnSort);
+ rootsSet(tree.roots);
+ childsSet(tree.childs);
+ setTreeData(tree.treeData);
+
+ setDetId(detId);
+ setAssessRoomId(assessRoomId);
+ // setTurnSort(turnSort);
+ setData1(data1T); setData2(data2T); setData3(data3T);
+ setArithmeticErrorStatus(arithmeticErrorStatus);
+ setRadioWeight(weightsStatus);
+ setDis(dis);
+ setSpin(false);
+ }
+ //保存时执行的方法
+ async function saveFunc() {
+ setSpin(true);
+ const id = detId;
+ const rvwType = "2";//
+ const weightsStatus = radioWeight;
+ let pass = true;//校验是否通过
+ let categoryList: any[] = [];
+ let [typeScore1, typeScore2, typeScore3, score] = [0, 0, 0, 0,]
+ let [data1t, data2t, data3t] = [[...data1], [...data2], [...data3]];
+ if (data1t.length == 0 && data2t.length == 0 && data3t.length == 0) {
+ pass = false;
+ message.error('请新增类别');
+ }
+ pass && await form.validateFields().catch((errorInfo) => {
+ pass = false;
+ message.error(errorInfo.errorFields[0].errors);
+ })
+ if (pass && data1t.length > 0) {//校验商务类填写是否有误
+ data1t.map((item: any) => {
+ if (radioWeight == 0) {//不启用权重
+ item.weights = null;
+ typeScore1 += subCountScore(item);
+ } else {
+ typeScore1 += subCountScore(item) * item.weights / 100;
+ }
+ !checkEmpty(item.detailList, '商务', item.name) && (pass = false);
+ })
+ score = score + typeScore1;
+ }
+ if (pass && data2t.length > 0) {//校验技术类填写是否有误
+ data2t.map((item: any) => {
+ if (radioWeight == 0) {//不启用权重
+ item.weights = null;
+ typeScore2 += subCountScore(item);
+ } else {
+ typeScore2 += subCountScore(item) * item.weights / 100;
+ }
+ !checkEmpty(item.detailList, '技术', item.name) && (pass = false);
+ })
+ score = score + typeScore2;
+ }
+ if (pass && data3t.length > 0) {//校验服务类填写是否有误
+ data3t.map((item: any) => {
+ if (radioWeight == 0) {//不启用权重
+ item.weights = null;
+ typeScore3 += subCountScore(item);
+ } else {
+ typeScore3 += subCountScore(item) * item.weights / 100;
+ }
+ !checkEmpty(item.detailList, '服务', item.name) && (pass = false);
+ })
+ score = score + typeScore3;
+ }
+ if (pass) {//合数据
+ categoryList = [...data1t, ...data2t, ...data3t,]
+ let allData = { commonId, weightsStatus, arithmeticErrorStatus, rvwType, categoryList, nodeId }
+ id != '' && (allData['id'] = id);
+ await info(score, typeScore1, typeScore2, typeScore3, allData);//显示分值 让用户确认 确认后执行保存方法
+ } else {
+ setSpin(false);
+ }
+ }
+ //新增、修改类别
+ const typeControl = async (values: any) => {
+ const { name, type, weights } = values;
+ let tableId = Date.now();
+ let subCate = {
+ categoryName: type,//大类别名称
+ weights: weights == undefined ? 100 : weights,
+ name: name,//字类名
+ tableId: tableId,
+ key: 0,
+ detailList: [{//初始值---新增用
+ key: 0,
+ tableId: tableId,
+ scoreItem: "",//评分项
+ categoryName: type,//大类别名称
+ rvwStandard: "",//评分标准
+ consistencyStatus: 0,//一致性
+ scoreMethod: "0",//评分方式
+ standardList: [{ id: Date.now(), delId: Date.now(), standardName: '', standardDetailScore: '' }],//细则
+ highScore: 0,//最高分
+ lowScore: 0,//最低分
+ stepScore: 0,//步长分值
+ priceMultiplier: 1,//基准价系数
+ priceMultiplierSecond: 1,//基准价系数2
+ lowScoreSecond: 0,//最低分2
+ avgPriceMultiplier: 1,//平均报价系数
+ includeHighStatus: 1,//最高价 含税不含税
+ includeHighPrice: '',
+ includeLowStatus: 1,//最低价 含税不含税
+ includeLowPrice: '',
+ }]
+ }
+ let data1T: any = [...data1]
+ let data2T: any = [...data2]
+ let data3T: any = [...data3]
+ const add = (type: any) => {
+ if (type == '商务') {
+ subCate['key'] = data1.length;
+ subCate['category'] = '1';
+ setData1([...data1T, subCate])
+ } else if (type == '技术') {
+ subCate['key'] = data2.length;
+ subCate['category'] = '2';
+ setData2([...data2T, subCate])
+ } else if (type == '服务') {
+ subCate['key'] = data3.length;
+ subCate['category'] = '5';
+ setData3([...data3T, subCate])
+ }
+ }
+ if (isUpdateCate) {//修改
+ const oldCategoryName = upData.categoryName;
+ subCate = upData.key;
+ upData.name = name;
+ upData.categoryName = type;
+ upData.weights = weights == undefined ? 100 : weights;
+ //删原数据
+ if (oldCategoryName == '商务') {
+ if (oldCategoryName != type) {
+ data1T = data1T.filter((item: any) => item.key != undefined ? item.key != upData.key : item.id != upData.id);
+ } else {
+ let index = data1T.findIndex((item: any) => item.key != undefined ? item.key == upData.key : item.id == upData.id)
+ data1T[index] = upData;
+ }
+ setData1(data1T)
+ }
+ if (oldCategoryName == '技术') {
+ if (oldCategoryName != type) {
+ data2T = data2T.filter((item: any) => item.key != undefined ? item.key != upData.key : item.id != upData.id);
+ } else {
+ let index = data2T.findIndex((item: any) => item.key != undefined ? item.key == upData.key : item.id == upData.id)
+ data2T[index] = upData;
+ }
+ setData2(data2T)
+ }
+ if (oldCategoryName == '服务') {
+ if (oldCategoryName != type) {
+ data3T = data3T.filter((item: any) => item.key != undefined ? item.key != upData.key : item.id != upData.id);
+ } else {
+ let index = data3T.findIndex((item: any) => item.key != undefined ? item.key == upData.key : item.id == upData.id)
+ data3T[index] = upData;
+ }
+ setData3(data3T)
+ }
+ subCate = upData;
+ oldCategoryName != type && add(type);
+ } else {
+ add(type);
+ }
+ scrollToAnchor(subCate.name + subCate.key)
+ setSpin(false);
+ }
+ //表格新增一行
+ function addOneRow(categoryName: string, key: number, tableId: any, id: any) {
+ const oneRow = {//初始值---新增用
+ tableId: tableId ? tableId : id,
+ scoreItem: "",//评分项
+ rvwStandard: "",//评分标准
+ categoryName: categoryName,
+ consistencyStatus: 0,//一致性
+ scoreMethod: "0",//评分方式
+ standardList: [{ id: Date.now(), standardName: '', standardDetailScore: '' }],//细则
+ highScore: 0,//最高分
+ lowScore: 0,//最低分
+ stepScore: 0,//步长分值
+ priceMultiplier: 1,//基准价系数
+ priceMultiplierSecond: 1,//基准价系数2
+ lowScoreSecond: 0,//最低分2
+ avgPriceMultiplier: 1,//平均报价系数
+ includeHighStatus: 1,//最高价 含税不含税
+ includeLowStatus: 1,//最低价 含税不含税
+ };
+
+ const setData = (data: any) => {
+ let dataFirst: any[] = [];
+ data.map((item: any, index: any) => {//大类 含子表格数据[]
+ let dataSecond: any[] = [];
+ item.detailList.map((item2: any) => {
+ dataSecond.push(item2)
+ })
+ if (index == key) {
+ oneRow['key'] = dataSecond[dataSecond.length - 1] ? dataSecond[dataSecond.length - 1].key + 1 : 0;
+ dataSecond.push(oneRow)
+ }
+ item.detailList = dataSecond;
+ dataFirst.push(item);
+ })
+ return dataFirst;
+ }
+ if (categoryName == '商务') {
+ setData1(setData(data1))
+ } else if (categoryName == '技术') {
+ setData2(setData(data2))
+ } else if (categoryName == '服务') {
+ setData3(setData(data3))
+ }
+ }
+
+ //根据name subname 定位表格、数据并重新赋值
+ function reTable() {
+ let data: any = [];
+ if (onRowCateName === '商务') {
+ data = [...data1];
+ setData1(data);
+ } else if (onRowCateName === '技术') {
+ data = [...data2];
+ setData2(data);
+ } else if (onRowCateName === '服务') {
+ data = [...data3];
+ setData3(data);
+ }
+
+ }
+ //缓慢滚动
+ const scrollToAnchor = (anchorName: any) => {
+ if (anchorName) {
+ let anchorElement = document.getElementById(anchorName);
+ if (anchorElement) {
+ anchorElement.scrollIntoView(
+ { behavior: 'smooth' }
+ );
+ }
+ }
+ }
+ return (
+
+
+
+
编辑详审细则
+
+ {detailButtons()}{/* 业务按钮组 */}
+
+
+
+ {returnRadios()}{/* 单选按钮组 */}
+
+ {returnPanel()}{/* 折叠面板 */}
+
+
+ {/* 新增类别Modal */}
+ {addCategoryModal()}
+
+ )
+}
+export default DetailedStoreIn;
\ No newline at end of file
diff --git a/src/pages/ZBiXuan/EvaluationRoom/Config/FirstLimited/service.ts b/src/pages/ZBiXuan/EvaluationRoom/Config/FirstLimited/service.ts
index 11f7094..439dcc8 100644
--- a/src/pages/ZBiXuan/EvaluationRoom/Config/FirstLimited/service.ts
+++ b/src/pages/ZBiXuan/EvaluationRoom/Config/FirstLimited/service.ts
@@ -23,4 +23,10 @@ export async function getParentConfig(params:any) {
});
};
+// 预打分检查
+export async function requestCheckPreScore(params:any) {
+ return request(`/api/biz-service-ebtp-resps/v1/tdoc/validTdocEndDateByRoomId?roomId=${params.roomId}`,{
+ method: 'POST',
+ });
+};
diff --git a/src/pages/ZBiXuan/EvaluationRoom/View/BidDetailedManager/BPR.js b/src/pages/ZBiXuan/EvaluationRoom/View/BidDetailedManager/BPR.js
index 22f0ca5..98d9e4a 100644
--- a/src/pages/ZBiXuan/EvaluationRoom/View/BidDetailedManager/BPR.js
+++ b/src/pages/ZBiXuan/EvaluationRoom/View/BidDetailedManager/BPR.js
@@ -2,7 +2,6 @@ import React, {PureComponent} from 'react';
import {Divider,Button,Form,Card,Tabs,Table,Tooltip,Input,Select,Row,Col,message,Modal,Pagination,Spin} from 'antd';
// import './index.less';
import { connect } from "dva";
-// import { routerRedux } from 'dva/router';
import { getRoomId } from '@/utils/session';
import { getURLInformation } from '@/utils/CommonUtils';
diff --git a/src/pages/ZBiXuan/EvaluationRoom/View/BidNumberManager/BPR.js b/src/pages/ZBiXuan/EvaluationRoom/View/BidNumberManager/BPR.js
index 9024113..102664b 100644
--- a/src/pages/ZBiXuan/EvaluationRoom/View/BidNumberManager/BPR.js
+++ b/src/pages/ZBiXuan/EvaluationRoom/View/BidNumberManager/BPR.js
@@ -2,7 +2,6 @@ import React, {PureComponent} from 'react';
import {Divider,Button,Form,Card,Tabs,Table,Tooltip,Input,Select,Row,Col,message,Modal,Pagination,Spin} from 'antd';
// import './index.less';
import { connect } from "dva";
-// import { routerRedux } from 'dva/router';
import { getRoomId } from '@/utils/session';
import { getURLInformation } from '@/utils/CommonUtils';
diff --git a/src/utils/IParticipateIn.tsx b/src/utils/IParticipateIn.tsx
index 5459ac9..68654e7 100644
--- a/src/utils/IParticipateIn.tsx
+++ b/src/utils/IParticipateIn.tsx
@@ -11,7 +11,7 @@ import ProTable from '@ant-design/pro-table';
import tableProps from '@/utils/tableProps';
import { Button, Card, Checkbox, Form, Input, message, Modal } from 'antd';
import React, { useEffect, useState } from 'react';
-import { useHistory } from '@umijs/max';
+import { history } from '@umijs/max';
import { getBidMethodDictTypeCode, getProTypeCodeByBidMethodDict, isNotEmpty } from './CommonUtils';
import { queryingPagingData } from './PageUtils';
@@ -75,7 +75,7 @@ const IParticipateIn: React.FC = (props) => {
const [sectionCheckbox, setSectionCheckbox] = useState();
//采购方式
const [bidMethodDict, setBidMethodDict] = useState('');
- // const history = useHistory();
+
//联系人数据
const [contactsItem, setContactsItem] = useState(null);
useEffect(() => {
diff --git a/tsconfig.json b/tsconfig.json
index 814972c..7184137 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -11,7 +11,6 @@
"moduleResolution": "node",
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
- "suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true,
"allowJs": true,
"skipLibCheck": true,