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

fix: srm订单去除供方库存显示,处理招标专家评标分数提交异常

parent a636e27c
......@@ -239,7 +239,7 @@ export const addOrderModalSchema: ISchema = {
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '请输入物料编号',
align: 'flex-left',
align: 'flex-start',
},
},
[FORM_FILTER_PATH]: {
......@@ -249,7 +249,7 @@ export const addOrderModalSchema: ISchema = {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
marginRight: 0,
}
},
colStyle: {
......@@ -265,9 +265,8 @@ export const addOrderModalSchema: ISchema = {
},
type: {
type: 'string',
"x-component": 'SearchSelect',
"x-component-props": {
placeholder: '物料名称',
placeholder: '规格型号',
}
},
submit: {
......@@ -1049,12 +1048,21 @@ export const contractSchema: ISchema = {
}
},
},
"[startTime,endTime]": {
type: 'string',
"x-component": "dateSelect",
"x-component-props": {
placeholder: '合同有效时间',
}
// "[startTime,endTime]": {
// type: 'string',
// "x-component": "dateSelect",
// "x-component-props": {
// placeholder: '合同有效时间',
// }
// },
"[startTime, endTime]": {
type: 'daterange',
'x-component-props': {
placeholder: ['有效开始时间','有效结束时间'],
style: {
width: 160,
},
},
},
submit: {
"x-component": 'Submit',
......
......@@ -66,7 +66,7 @@ export const selectBidSchema: ISchema = {
},
colStyle: {
marginRight: 20
}
},
},
properties: {
projectName: {
......
......@@ -32,6 +32,10 @@ const OnlineRemark: React.FC<RemarkBidReportProps> = ({cardTitle, addSchemaActio
// console.log(v.target.value, index)
}
const handleSubmit = (values) => {
onConfirm && onConfirm(values)
}
const onBlurInput = (v, index) => {
const hasValues = addSchemaAction.getFieldValue('evaluationTenderList')
if(hasValues.length) {
......@@ -103,7 +107,7 @@ const OnlineRemark: React.FC<RemarkBidReportProps> = ({cardTitle, addSchemaActio
}
}
}}
onSubmit={onConfirm}
onSubmit={handleSubmit}
effects={($, ctx) => {
$('onFormMount').subscribe(async () => {
$('onFieldValueChange', 'evaluationTenderList').subscribe(state => {
......
......@@ -50,11 +50,12 @@ export const RemarkTableCell:React.FC<TableCellProps> = ({
const save = async e => {
try {
const values = await form.validateFields()
console.log(values, 'vvv')
console.log(values, e, 'vvv')
values.totalScore = Object.values(values).reduce((a, b) => Number(a) + Number(b), 0)
handleSave({ ...record, ...values })
} catch (errInfo) {
console.log('Save failed:', errInfo)
handleSave({ ...record, ...errInfo.values })
}
};
......@@ -81,7 +82,7 @@ export const RemarkTableCell:React.FC<TableCellProps> = ({
<Form.Item
style={{ margin: 0 }}
name={dataIndex}
initialValue={record[dataIndex] || ''}
initialValue={record[dataIndex] || null}
rules={[
{
required: true,
......
import React, { useState, useEffect, useRef } from 'react';
import { Button, Row, Col, Radio, Table } from 'antd';
import { Button, Row, Col, Radio, Table, message } from 'antd';
import OrderDetailWrapper from '@/pages/transaction/components/OrderDetailWrapper';
import PreLoading from '@/components/PreLoading';
import { RemarkDetailContext } from '@/pages/procurement/_public/bid/context';
......@@ -54,37 +54,45 @@ const ReadyExpertRemarkDetail: React.FC = () => {
}
}).filter(_ => Boolean(_))
let evaluationList = []
for(let i = 0; i < _value.length; i++) {
let item = _value[i]
let keys = Object.keys(item)
for(let j = 0; j < keys.length; j++) {
let _item = keys[j]
if(_item.indexOf('score') !== -1) {
let contentId = _item.split('_')[1]
let content = templateContentList.filter(_ => _.id === Number(contentId))[0]
// if(content?.id) delete content.id
evaluationList.push({
inviteTenderMemberId: item.memberId,
inviteTenderMemberName: item.memberName,
score: Number(item[_item]),
...content,
})
try {
let evaluationList = []
for(let i = 0; i < _value.length; i++) {
let item = _value[i]
let keys = Object.keys(item)
for(let j = 0; j < keys.length; j++) {
let _item = keys[j]
if(_item.indexOf('score') !== -1) {
let contentId = _item.split('_')[1]
let content = templateContentList.filter(_ => _.id === Number(contentId))[0]
// 判断分值是否有null或者""
if(item[_item] === null || item[_item] === "") {
throw "请正确填写评标分值"
}
evaluationList.push({
inviteTenderMemberId: item.memberId,
inviteTenderMemberName: item.memberName,
score: Number(item[_item]),
...content,
})
}
}
}
}
evaluationList = evaluationList.map(item => {
delete item.id
return item
})
evaluationList = evaluationList.map(item => {
delete item.id
return item
})
const res = await PublicApi.postPurchaseExpertExtractRecordEvaluationTender({id, evaluationTenderList: evaluationList.filter(Boolean), evaluationTenderRecommendList})
const res = await PublicApi.postPurchaseExpertExtractRecordEvaluationTender({id, evaluationTenderList: evaluationList.filter(Boolean), evaluationTenderRecommendList})
if(res.code === 1000) {
history.goBack()
}
if(res.code === 1000) {
history.goBack()
}
console.log(evaluationTenderRecommendList, evaluationList)
console.log(evaluationTenderRecommendList, evaluationList)
} catch (error) {
console.log(error)
return message.error(error)
}
}
return (
......
......@@ -306,12 +306,6 @@ const OrderDeleveRecord:React.FC<OrderDeleveRecordProps> = (props) => {
render: (t, r) => t ? `${t}/${r.quotedName || ''}/${r.quotedCategory || ''}/${r.quotedBrand || ''}` : ''
},
{
title: '单价',
dataIndex: 'price',
align: 'center',
key: 'price',
},
{
title: '采购数量',
dataIndex: 'quantity',
align: 'center',
......
......@@ -66,7 +66,7 @@ export const ProductTableCell:React.FC<ProductTableCellProps> = ({
ref={formItemRef}
onChange={save}
{...formItemProps}
id={dataIndex + record.id}
id={dataIndex + record.productId}
className="delivery_amount_input"
/>
}
......
......@@ -68,7 +68,7 @@ export const schema: ISchema = {
type: 'array',
"x-component": 'MultTable',
"x-component-props": {
rowKey: 'skuId',
rowKey: 'productId',
columns: "{{productColumns}}",
components: "{{productComponents}}",
// expandable: "{{productChildren}}",
......
......@@ -18,7 +18,7 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
const handleSave = row => {
return new Promise((resolve, reject) => {
const newData = [...ctx.getFieldValue('products')];
const index = newData.findIndex(item => row.skuId === item.skuId);
const index = newData.findIndex(item => row.productId === item.productId);
const item = newData[index];
newData.splice(index, 1, {
...item,
......
......@@ -350,12 +350,12 @@ const OrderProductTable:React.FC<OrderProductTableProps> = ({editable}) => {
align: 'left',
key: 'price',
},
{
title: '供方库存',
dataIndex: 'stock',
align: 'center',
key: 'stock',
},
// {
// title: '供方库存',
// dataIndex: 'stock',
// align: 'center',
// key: 'stock',
// },
{
title: '采购数量',
dataIndex: 'quantity',
......
......@@ -310,12 +310,6 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
render: (t, r) => t ? `${t}/${r.quotedName || ''}/${r.quotedCategory || ''}/${r.quotedBrand || ''}` : ''
},
{
title: '单价',
dataIndex: 'price',
align: 'center',
key: 'price',
},
{
title: '采购数量',
dataIndex: 'quantity',
align: 'center',
......
......@@ -512,12 +512,12 @@ const SaleOrderProductTable:React.FC<OrderProductTableProps> = (props) => {
align: 'left',
key: 'price',
},
{
title: '供方库存',
dataIndex: 'stock',
align: 'center',
key: 'stock',
},
// {
// title: '供方库存',
// dataIndex: 'stock',
// align: 'center',
// key: 'stock',
// },
{
title: '采购数量',
dataIndex: 'quantity',
......
// @统一处理 业务表格内不嵌套NiceForm组件的高级筛选 间距异常问题
.god-schema-form {
& > .ant-form-item {
margin-bottom: 0 !important;
}
& > .ant-row-end {
margin-top: 24px !important;
}
}
// .god-schema-form {
// & > .ant-form-item {
// margin-bottom: 0 !important;
// }
// & > .ant-row-end {
// margin-top: 24px !important;
// }
// }
......@@ -62,12 +62,12 @@ export const materialColumns: any[] = [
align: 'center',
key: 'contractFreeCount'
},
{
title: '供方库存',
dataIndex: 'supplierInventory',
align: 'center',
key: 'supplierInventory'
},
// {
// title: '供方库存',
// dataIndex: 'supplierInventory',
// align: 'center',
// key: 'supplierInventory'
// },
]
const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
......
......@@ -550,12 +550,12 @@ export const materialInfoColumns: any[] = [
align: 'left',
key: 'price',
},
{
title: '供方库存',
dataIndex: 'inventory',
align: 'center',
key: 'inventory',
},
// {
// title: '供方库存',
// dataIndex: 'inventory',
// align: 'center',
// key: 'inventory',
// },
{
title: '采购数量',
dataIndex: 'purchaseCount',
......
......@@ -97,7 +97,6 @@ const ContractModalTable:React.FC<ContractModalTableProps> = (props) => {
schemaAction.setFieldValue('vendorMemberId', item.partyBMemberId)
schemaAction.setFieldValue('vendorRoleId', item.partyBRoleId)
schemaAction.setFieldValue('digest', item.contractAbstract)
// schemaAction.setFieldValue('contractId', item.id)
}
confirmModal && confirmModal()
setVisible(false)
......
......@@ -2,9 +2,6 @@ import React, { useEffect } from 'react'
import ModalTable, { ModalTableProps } from '@/components/ModalTable'
import { fetchOrderApi } from '../../apis'
import { ISchemaFormActions, ISchemaFormAsyncActions } from '@formily/antd'
import { PublicApi } from '@/services/api'
import { EnvironmentOutlined } from '@ant-design/icons'
import { Popover, Space, Row, message } from 'antd'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { addContractOrderModalSchema } from '@/components/ModalTable/schema'
......@@ -33,6 +30,12 @@ export const materialColumns: any[] = [
key: 'materielNo',
},
{
title: '规格型号',
dataIndex: 'type',
align: 'center',
key: 'type',
},
{
title: '物料名称',
dataIndex: 'materielName',
align: 'center',
......@@ -62,12 +65,12 @@ export const materialColumns: any[] = [
align: 'center',
key: 'contractFreeCount'
},
{
title: '供方库存',
dataIndex: 'supplierInventory',
align: 'center',
key: 'supplierInventory'
},
// {
// title: '供方库存',
// dataIndex: 'supplierInventory',
// align: 'center',
// key: 'supplierInventory'
// },
]
const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
......
......@@ -350,12 +350,12 @@ export const materialInfoColumns: any[] = [
align: 'left',
key: 'price',
},
{
title: '供方库存',
dataIndex: 'stock',
align: 'center',
key: 'stock',
},
// {
// title: '供方库存',
// dataIndex: 'stock',
// align: 'center',
// key: 'stock',
// },
{
title: '采购数量',
dataIndex: 'quantity',
......
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