Commit e52a2a12 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix: 修改采购确认报价修改授标结果

parent 380758d0
......@@ -47,6 +47,14 @@ export const confirmOfferRoute = [
noMargin: true,
},
{
/** 修改授标结果 */
path: '/memberCenter/procurementAbility/confirmOffer/edit',
name: '修改授标结果',
component: '@/pages/transaction/purchaseAbility/confirmOffer/contrast',
hideInMenu: true,
noMargin: true,
},
{
/** 待审核授标结果(一级) */
path: '/memberCenter/procurementAbility/confirmOffer/auditResultsOne',
name: '待审核授标结果(一级)',
......
......@@ -34,7 +34,11 @@
padding-top: 24px;
.iconStyle {
font-size: 45px;
color: #00b37a;
color: @status-valid;
}
.iconErrorStyle {
font-size: 45px;
color: @status-fail;
}
}
.footer {
......
import React, { ReactNode, useState } from 'react';
import { Modal, Button, Result, Upload, Progress } from 'antd';
import { Modal, Button, Result, Upload, Progress, Typography, message } from 'antd';
import { CheckCircleOutlined, CloseCircleOutlined, FileExcelFilled } from '@ant-design/icons';
import style from './index.less';
import { uploadFileExcel } from '@/services/file';
......@@ -19,10 +19,12 @@ interface UploadImportProps {
onClose?: (e) => void,
/** 成功导入后返回数据 */
fetchData?: (e) => void,
/** 下载链接 */
downLink?: string
}
const UploadImport: React.FC<UploadImportProps> = (props: any) => {
const { visible, title, width, fetchData, checkfetch, importfetch, onClose } = props;
const { visible, title, width, fetchData, checkfetch, importfetch, onClose, downLink } = props;
const [percent, setPercent] = useState<number>(0);
const [step, setStep] = useState<number>(0);
const [fileList, setFileList] = useState<any[]>([]);
......@@ -31,7 +33,7 @@ const UploadImport: React.FC<UploadImportProps> = (props: any) => {
/** 第一步: 导入检查 -> 成功 or 失败 */
const firstStep = <>
<ul className={style.ulStyle}>
<li className={style.wranText}><span>1</span>点击下载 EXCEL文件模板 下载</li>
<li className={style.wranText}><span>1</span>点击下载 EXCEL文件模板 <Typography.Link href={downLink} target="_blank">下载</Typography.Link></li>
<li className={style.wranText}><span>2</span>按照模板整理货品资料</li>
<li className={style.wranText}><span>3</span>点击导入按钮,导入整理好的货品资料</li>
</ul>
......@@ -66,11 +68,11 @@ const UploadImport: React.FC<UploadImportProps> = (props: any) => {
if (file.response) {
const { code } = file.response;
if (code !== 1000) {
message.error(file.response.message)
setStep(2)
return
}
setStep(1)
console.log(file, 965)
}
}
const handleNext = () => {
......@@ -167,10 +169,10 @@ const UploadImport: React.FC<UploadImportProps> = (props: any) => {
)}
{ step === 2 && (
<Result
icon={<li className={style.iconParent}><CloseCircleOutlined className={style.iconStyle} /></li>}
icon={<li className={style.iconParent}><CloseCircleOutlined className={style.iconErrorStyle} /></li>}
style={{ padding: 0, minHeight: '327px' }}
title={firstStep2}
extra={<Button>导出错误日志</Button>}
extra={<Button onClick={continueImport}>导出错误日志</Button>}
/>
)}
{ step === 3 && (
......@@ -188,10 +190,10 @@ const UploadImport: React.FC<UploadImportProps> = (props: any) => {
)}
{ step === 4 && (
<Result
icon={<li className={style.iconParent}><CloseCircleOutlined className={style.iconStyle} /></li>}
icon={<li className={style.iconParent}><CloseCircleOutlined className={style.iconErrorStyle} /></li>}
style={{ padding: 0, minHeight: '327px' }}
title={firstStep4}
extra={<Button>导出错误日志</Button>}
extra={<Button onClick={continueImport}>导出错误日志</Button>}
/>
)}
</Modal>
......
import { ISchema } from '@formily/antd';
import React, { useEffect, useRef, useState } from 'react';
import { Modal, Row, Col, Drawer,Button } from 'antd';
import { Modal, Row, Col, Drawer, Button } from 'antd';
import { createFormActions } from '@formily/antd';
import { StandardTable } from 'god';
import { ColumnsType } from 'antd/es/table';
......@@ -36,11 +36,11 @@ interface Iprops {
/**
* rowSelection
*/
value?: {[key: string]: any}[],
value?: { [key: string]: any }[],
/**
* onChange
*/
expressionScope?: {[key: string]: any}
expressionScope?: { [key: string]: any }
/**
* format话参数
*/
......@@ -48,7 +48,7 @@ interface Iprops {
effects?: ($, actions) => void,
fetchData: (params: any) => any,
onClose: () => void,
onOk: (selectRow: number[] | string[], selectedRows: {[key: string]: any}[]) => void,
onOk: (selectRow: number[] | string[], selectedRows: { [key: string]: any }[]) => void,
}
......@@ -57,9 +57,9 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
const ref = useRef<any>({});
const isFirstLoad = useRef<boolean>(true)
const [selectRow, setSelectRow] = useState<number[] | string[]>(() => {
return value.map( (_row) => typeof tableProps.rowKey === 'string' ? _row[tableProps.rowKey as string] : tableProps.rowKey(_row))
return value.map((_row) => typeof tableProps.rowKey === 'string' ? _row[tableProps.rowKey as string] : tableProps.rowKey(_row))
})
const [selectRowRecord, setSelectRowRecord] = useState<{[key: string]: any}[]>([]);
const [selectRowRecord, setSelectRowRecord] = useState<{ [key: string]: any }[]>([]);
useEffect(() => {
if (!visible) {
......@@ -68,7 +68,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
const keys = value.map(
(_row) => {
// console.log(typeof tableProps.rowKey === 'string' && tableProps.rowKey(_row))
return typeof tableProps.rowKey === 'string' ? _row[tableProps.rowKey as string] : tableProps.rowKey(_row)
return typeof tableProps.rowKey === 'string' ? _row[tableProps.rowKey as string] : tableProps.rowKey(_row)
});
setSelectRow(keys)
setSelectRowRecord(value);
......@@ -88,7 +88,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
useEffect(() => {
if (!visible) {
return ;
return;
}
if (!isFirstLoad.current) {
ref.current?.reload?.();
......@@ -98,7 +98,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
const onSelectChange = (record, selected: boolean, selectedRows) => {
const recordRows = customizeRadio || mode === 'radio' ? selectedRows.slice(-1) : selectedRows;
const keys = recordRows.map((_item) => typeof tableProps.rowKey === 'string' ? _item[tableProps.rowKey as string] : tableProps.rowKey(_item));
const keys = recordRows.map((_item) => typeof tableProps.rowKey === 'string' ? _item[tableProps.rowKey as string] : tableProps.rowKey(_item));
setSelectRowRecord(selectedRows)
setSelectRow(keys)
};
......@@ -112,7 +112,7 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
const renderFooter = () => {
return (
<div style={{ textAlign: 'right'}}>
<div style={{ textAlign: 'right' }}>
<Button onClick={handleOnClose} style={{ marginRight: 8 }}>
取消
</Button>
......@@ -123,13 +123,14 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
)
}
const otherProps = modalType === 'Drawer' ? { footer: renderFooter() } : { onOk: handleOk}
const otherProps = modalType === 'Drawer' ? { footer: renderFooter() } : { onOk: handleOk }
return (
<Component
title={title}
visible={visible}
onClose={handleOnClose}
onCancel={handleOnClose}
// onOk={handleOk}
width={840}
......@@ -149,12 +150,10 @@ const TableModal: React.FC<Iprops> = (props: Iprops) => {
selectedRowKeys: selectRow,
hideSelectAll: customizeRadio,
}}
formRender={(child, ps) => (
<div style={{display: "flex", flexDirection: 'row', justifyContent: 'space-between'}}>
<div>{child}</div>
<div>{ps}</div>
</div>
)}
formRender={(child, ps) => <Row justify='space-between' style={{ marginBottom: 16 }}>
<Col span={18} style={{ zIndex: 99 }}>{child}</Col>
<Col style={{ marginTop: 4 }}>{ps}</Col>
</Row >}
controlRender={
<NiceForm
schema={schema}
......
......@@ -168,3 +168,89 @@ const AddQuotes: React.FC<parmas> = (props) => {
}
export default AddQuotes
// import React, { useState, useEffect } from "react";
// import { Form } from "antd";
// import { Prompt } from 'umi';
// import { Context } from '@/pages/transaction/components/detailLayout/components/context';
// import AddedLayout from "@/pages/transaction/components/detailLayout";
// import BasicInfoLayout from "./components/basicInfo";
// import ProductQuoteLayout from "./components/productQuote";
// import OtherExplainLayout from "./components/otherExplain";
// import AttachLayout from "./components/attach";
// import { PublicApi } from "@/services/api";
// const layout: any = {
// colon: false,
// labelCol: { style: { width: "144px" } },
// labelAlign: "left"
// };
// interface AddedFormLayoutProps {
// /** 是否编辑 */
// isEdit?: boolean,
// /** id */
// id?: number,
// /** 提交的接口 */
// fetchRequest?: () => Promise<unknown>,
// /** 本地缓存的名称 */
// spam?: string,
// /** 标题 */
// title?: string,
// }
// const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
// const { isEdit, id, fetchRequest, spam, title } = props;
// const [form] = Form.useForm();
// const [unsaved, setUnsaved] = useState<boolean>(false);
// const [dataSource, setDataSource] = useState({});
// useEffect(() => {
// if (id && !spam) {
// } else if (id && spam) {
// PublicApi.getTransactionProductInquiryDetails({ id }).then(res => {
// if (res.code !== 1000) {
// return
// }
// setDataSource(res.data);
// form.setFieldsValue({
// ...res.data,
// })
// })
// }
// }, [])
// return (
// <Context.Provider value={dataSource}>
// <AddedLayout
// detail={title}
// hideBreak
// tabLink={[
// { id: "basicInfoLayout", title: "基本信息" },
// { id: "productQuoteLayout", title: "商品报价" },
// { id: "otherExplainLayout", title: "其他说明" },
// { id: "attachLayout", title: "附件" },
// ]}
// components={
// <Form
// {...layout}
// colon={false}
// form={form}
// onValuesChange={() => {
// if (!unsaved) {
// setUnsaved(true)
// }
// }}
// >
// <BasicInfoLayout />
// <ProductQuoteLayout />
// <OtherExplainLayout />
// <AttachLayout />
// </Form>
// }
// />
// <Prompt when={unsaved} message="您还有未保存的内容,是否确定要离开?" />
// </Context.Provider>
// )
// }
// export default AddedFormLayout;
import React from 'react';
import { Form, Row, Col } from 'antd';
import Card from '@/pages/transaction/components/card';
import UploadFiles from '@/components/UploadFiles/UploadFiles';
const AttachLayout = () => {
const customizeItemRender = (file) => {
console.log(file)
}
return (
<Card
id="attachLayout"
title="附件"
>
<Row gutter={[48, 24]}>
<Col span={12}>
<Form.Item label="附件" name="enclosureUrls">
<UploadFiles beforeUpload={customizeItemRender} />
</Form.Item>
</Col>
</Row>
</Card>
)
}
export default AttachLayout;
......@@ -181,3 +181,196 @@ const BasicInfo: React.FC<queryProps> = (props) => {
}
export default BasicInfo
// import React, { useCallback, useState, useContext } from 'react';
// import { Row, Col, Form, Input, Button, Typography } from 'antd';
// import { Context } from '@/pages/transaction/components/detailLayout/components/context';
// import { LinkOutlined } from '@ant-design/icons';
// import Card from '@/pages/transaction/components/card';
// import style from './index.less';
// import TableModal from '@/pages/transaction/components/TableModal';
// import { PublicApi } from '@/services/api';
// import moment from 'moment';
// import { FORM_FILTER_PATH } from '@/formSchema/const';
// import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
// interface BasicInfoLayoutProps {
// }
// const BasicInfoLayout: React.FC<BasicInfoLayoutProps> = () => {
// const context = useContext(Context);
// const format = (text, fmt?: string) => {
// return <>{moment(text).format(fmt || "YYYY-MM-DD HH:mm:ss")}</>
// }
// const [visible, setVisible] = useState<boolean>(false);
// const columns: any = [
// {
// title: '询价单号',
// dataIndex: 'orderNo',
// key: 'orderNo',
// },
// {
// title: '询价单摘要',
// dataIndex: 'details',
// key: 'details',
// },
// {
// title: '询价会员',
// dataIndex: 'memberName',
// key: 'memberName',
// },
// {
// title: '单据时间',
// dataIndex: 'documentTime',
// key: 'documentTime',
// render: (text: any, record: any) => format(text)
// }
// ]
// const handleFetchData = useCallback((params: any) => {
// return new Promise(resolve => {
// PublicApi.getTransactionCorrespondingInquiryNumber({ ...params }).then(res => {
// if (res.code !== 1000) {
// return
// }
// resolve(res.data)
// })
// })
// }, [])
// const toggle = (flag: boolean) => {
// setVisible(flag)
// }
// const handleSubmit = (selectRowKeys: string[] | number[], selectRowRecord: any) => {
// const target = selectRowRecord[0];
// console.log(target)
// toggle(false)
// }
// return (
// <Card
// id="basicInfoLayout"
// title="基本信息"
// >
// <Row gutter={[48, 24]}>
// <Col span={12}>
// <Form.Item label="报价单摘要" name="details" rules={[{ required: true, message: '请输入报价单摘要' }]}>
// <Input />
// </Form.Item>
// <Form.Item label="对应询价单号" name='inquiryListNo' rules={[{ required: true, message: '请选择对应询价单号' }]}>
// <Input.Search readOnly onSearch={() => toggle(true)} enterButton={<Button style={{ height: '31.19px' }} icon={<LinkOutlined />}>选择</Button>} />
// </Form.Item>
// </Col>
// <Col span={12} className={style.searchColor}>
// <Form.Item style={{ marginBottom: '0px' }} label="询价会员">
// <Typography.Text>{context.inquiryListMemberName && context.inquiryListMemberName}</Typography.Text>
// </Form.Item>
// <Form.Item style={{ marginBottom: '0px' }} label="报价截止时间">
// <Typography.Text>{context.quotationAsTime && format(context.quotationAsTime)}</Typography.Text>
// </Form.Item>
// <Form.Item style={{ marginBottom: '0px' }} label="单据时间">
// <Typography.Text>{context.voucherTime && format(context.voucherTime)}</Typography.Text>
// </Form.Item>
// </Col>
// </Row>
// <TableModal
// modalType="Drawer"
// visible={visible}
// title="选择会员"
// mode="radio"
// tableProps={{
// rowKey: 'id',
// }}
// fetchData={handleFetchData}
// onClose={() => toggle(false)}
// onOk={handleSubmit}
// columns={columns}
// effects={($, actions) => {
// useStateFilterSearchLinkageEffect($, actions, "inquiryListNo", FORM_FILTER_PATH)
// }}
// schema={{
// type: 'object',
// properties: {
// megalayout: {
// type: 'object',
// "x-component": 'mega-layout',
// properties: {
// inquiryListNo: {
// type: 'string',
// "x-component": "Search",
// "x-mega-props": {
// },
// "x-component-props": {
// placeholder: '询价单号',
// align: 'flex-left',
// }
// }
// }
// },
// [FORM_FILTER_PATH]: {
// type: 'object',
// "x-component": "flex-layout",
// "x-component-props": {
// rowStyle: {
// justifyContent: 'flex-start',
// flexWrap: 'nowrap'
// },
// colStyle: {//改变间隔
// marginRight: 20
// }
// },
// properties: {
// PRO_LAYOUT: {
// type: 'object',
// "x-component": 'mega-layout',
// "x-mega-props": {
// span: 5
// },
// "x-component-props": {
// inline: true
// },
// properties: {
// memberName: {
// type: 'string',
// "x-component-props": {
// placeholder: '询价会员'
// },
// },
// details: {
// type: 'string',
// "x-component-props": {
// placeholder: '询价单摘要'
// },
// },
// "[startDocumentsTime,endDocumentsTime]": {
// type: "string",
// "x-component": "dateSelect",
// "x-component-props": {
// placeholder: "单据时间(全部)",
// }
// },
// }
// },
// sumbit: {
// "x-component": 'Submit',
// "x-mega-props": {
// span: 1
// },
// "x-component-props": {
// children: '查询'
// }
// }
// }
// }
// }
// }}
// />
// </Card>
// )
// }
// export default BasicInfoLayout;
import React from 'react';
import { Row, Col, Form, Input, InputNumber } from 'antd';
import Card from '@/pages/transaction/components/card';
interface OtherExplainLayoutProps {
}
const OtherExplainLayout: React.FC<OtherExplainLayoutProps> = (props: any) => {
return (
<Card
id="otherExplainLayout"
title="其他说明"
>
<Row gutter={[48, 24]}>
<Col span={12}>
<Form.Item label='最小起订' name='minimumOrder' rules={[{ required: true, message: '请输入最小起订' }]}>
<InputNumber style={{ width: '100%' }} />
</Form.Item>
<Form.Item label='交付说明' name='deliveryInstructions'>
<Input.TextArea autoSize placeholder='最长100个字符,50个汉字' />
</Form.Item>
<Form.Item label='付款说明' name='paymentType'>
<Input.TextArea autoSize placeholder='最长100个字符,50个汉字' />
</Form.Item>
<Form.Item label='税费说明' name='taxes'>
<Input.TextArea autoSize placeholder='最长100个字符,50个汉字' />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item label='物流说明' name='logistics'>
<Input.TextArea autoSize placeholder='最长100个字符,50个汉字' />
</Form.Item>
<Form.Item label='包装说明' name='packRequire'>
<Input.TextArea autoSize placeholder='最长100个字符,50个汉字' />
</Form.Item>
<Form.Item label='其他说明' name='otherRequire'>
<Input.TextArea autoSize placeholder='最长100个字符,50个汉字' />
</Form.Item>
</Col>
</Row>
</Card>
)
}
export default OtherExplainLayout;
import React, { useState } from 'react';
import { Form, Button, Table, InputNumber, Image } from 'antd';
import { LinkOutlined } from '@ant-design/icons';
import { ColumnType } from 'antd/lib/table/interface';
import Card from '@/pages/transaction/components/card';
interface ProductQuoteLayoutProps {
}
const ProductQuoteLayout: React.FC<ProductQuoteLayoutProps> = () => {
const [dataSource, setDataSource] = useState<any[]>([])
const columns: ColumnType<any>[] = [
{
title: "商品ID",
key: "productId",
dataIndex: "productId",
},
{
title: "商品图片",
key: "imgUrl",
dataIndex: "imgUrl",
render: (text) => <Image width={32} height={32} src={text} />
},
{
title: "商品名称",
key: "productName",
dataIndex: "productName",
},
{
title: "品类",
key: "category",
dataIndex: "category",
},
{
title: "品牌",
key: "brand",
dataIndex: "brand",
},
{
title: "采购数量/单位",
key: "purchaseCount",
dataIndex: "purchaseCount",
},
{
title: "含税/税率",
key: "",
dataIndex: ""
},
{
title: "报价单价",
key: "price",
dataIndex: "price",
render: (text, _data, index) => (
<Form.Item initialValue={text} name={`purchaseCount${index}`} rules={[{ required: true, message: '请输入采购数量' }]} style={{ marginBottom: '0px' }}>
<InputNumber min={1} />
</Form.Item>
)
},
{
title: "金额",
key: "money",
dataIndex: "money"
},
{
title: "操作",
key: "operate",
dataIndex: "operate",
render: (_text, _data, index) => (
<Button type="link">历史报价</Button>
)
},
]
return (
<Card
id="productQuoteLayout"
title="商品报价"
>
<Form.Item
name="inquiryListProductRequests"
rules={[{ required: true, message: "请添加商品" }]}
>
<Table
rowKey="productId"
columns={columns}
dataSource={dataSource}
pagination={false}
/>
</Form.Item>
</Card>
)
}
export default ProductQuoteLayout;
......@@ -10,4 +10,4 @@ const Quote: React.FC<{}> = () => {
/>
)
}
export default Quote;
\ No newline at end of file
export default Quote;
......@@ -61,6 +61,9 @@
position: relative;
overflow: hidden;
}
.isPrizeStyle {
border: 2px solid #00B37A;
}
.rankNumber {
width: 32px;
height: 32px;
......
import React, { useContext } from 'react';
import { Row, Col, Checkbox, InputNumber, Divider, Form, Typography, message } from 'antd';
import { Row, Col, Checkbox, InputNumber, Form, Typography } from 'antd';
import style from './index.less';
import { useBidTable } from '../../../effects/useBidTable';
import { BidDetailContext } from '../context'
import level1 from '@/assets/icons/the_first.png';
import level2 from '@/assets/icons/the_second.png';
import level3 from '@/assets/icons/the_third.png';
import { CheckCircleOutlined } from '@ant-design/icons';
import { sumBy } from 'lodash';
import { CheckCircleOutlined } from '@ant-design/icons'
import cx from 'classnames'
export interface ReduxProps {
redux?(e: any),
......@@ -72,15 +72,15 @@ const BidTable: React.FC<ReduxProps> = (props: any) => {
const chanegChecked = (e, index, idx) => {
if (e.target.checked) {
e.nativeEvent.path[8].style.border = '2px solid #00B37A';
e.nativeEvent.path[2].nextSibling.style.display = 'flex';
// e.nativeEvent.path[8].style.border = '2px solid #00B37A';
// e.nativeEvent.path[2].nextSibling.style.display = 'flex';
setAwardTaxProbability(100, index, idx, e.target.checked)
form.setFieldsValue({
[`awardTaxProbability_${index}_${idx}`]: 100
})
} else {
e.nativeEvent.path[8].style.border = 'none';
e.nativeEvent.path[2].nextSibling.style.display = 'none';
// e.nativeEvent.path[8].style.border = 'none';
// e.nativeEvent.path[2].nextSibling.style.display = 'none';
setAwardTaxProbability(0, index, idx, e.target.checked)
form.setFieldsValue({
[`awardTaxProbability_${index}_${idx}`]: undefined
......@@ -157,9 +157,9 @@ const BidTable: React.FC<ReduxProps> = (props: any) => {
<span style={{ color: "#909399" }}>({item.unit})</span>
</div>
</Col>
{ item.company.map((it: any, idx: number) => (
{item.company.map((it: any, idx: number) => (
<Col span={4} key={`company${idx + 1}`}>
<div className={style.throwBidInfo}>
<div className={cx(style.throwBidInfo, it.isPrize && style.isPrizeStyle)}>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>含税单价:</p></Col>
......@@ -193,18 +193,19 @@ const BidTable: React.FC<ReduxProps> = (props: any) => {
<>
<Form.Item noStyle>
<Checkbox
defaultChecked={false}
defaultChecked={it.isPrize}
style={{ marginRight: 16 }}
onChange={(e) => chanegChecked(e, index, idx)}
/>
</Form.Item>
<Form.Item
name={`awardTaxProbability_${index}_${idx}`}
style={{ marginBottom: 0, display: 'none' }}
style={{ marginBottom: 0, display: it.isPrize ? 'block' : 'none' }}
rules={[{
required: true,
message: ``,
}]}
initialValue={it.awardTaxProbability}
>
<InputNumber
min={0}
......@@ -217,7 +218,7 @@ const BidTable: React.FC<ReduxProps> = (props: any) => {
{preview && (
<div style={{ display: 'flex', alignItems: 'center' }}>
<Typography.Text>{it.isPrize ? `${it.awardTaxProbability}%` : '-'}</Typography.Text>
{ it.isPrize && <CheckCircleOutlined style={{ color: '#00B37A', fontSize: '12px', marginLeft: '4px' }} />}
{it.isPrize && <CheckCircleOutlined style={{ color: '#00B37A', fontSize: '12px', marginLeft: '4px' }} />}
</div>
)}
</div>
......
......@@ -40,11 +40,13 @@ export interface SizeType {
export interface IProps {
query?: queryType,
redux?(e: any),
preview?: boolean
preview?: boolean,
/** 是否编辑 */
isEdit?: boolean,
}
const ContrastLyout1: React.FC<IProps> = (props: any) => {
const { query: { id, turn }, redux, preview } = props;
const { query: { id, turn }, redux, preview, isEdit } = props;
const context = useContext(Context);
const [count, setCount] = useState<any>([]);
const [soure, setSoure] = useState<any>({});
......@@ -192,7 +194,9 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => {
* 2. preview 为 ture 表示查看详情的 立即调用比价接口
*/
const index = i ? i : idx
if (t !== turn && !preview) {
if (isEdit) {
offContrastPrice(t, data[0].isDecrypt, index)
} else if (t !== turn && !preview) {
offContrastPrice(t, data[0].isDecrypt, index)
} else if (preview) {
offContrastPrice(t, data[0].isDecrypt, index)
......
......@@ -203,12 +203,12 @@ const ContrastPrice = () => {
<ProgressLayout />
<BasicLayout effect={basicEffect} />
<ConditionLayout effect={conditionEffect} />
<ContrastLyout preview={link !== 'contrast' ? true : false} query={{ id, turn }} redux={handleContrastLyoutData} />
<ContrastLyout isEdit={link === 'edit' && true} preview={(link !== 'contrast' && link !== 'edit' ) ? true : false} query={{ id, turn }} redux={handleContrastLyoutData} />
<RecordLyout />
</Fragment>
}
/>
{ link === 'contrast' && (
{ (link === 'contrast' || link === 'edit' ) && (
<BidDetailContext.Provider value={auditDataSource}>
<BidModal
id={id}
......@@ -219,7 +219,7 @@ const ContrastPrice = () => {
/>
</BidDetailContext.Provider>
)}
{ (link !== 'contrast' && path !== 'confirmResults') && (
{ (link !== 'contrast' && path !== 'confirmResults' && link !== 'edit') && (
<ModalOperate
id={id}
title="单据审核"
......
......@@ -105,7 +105,13 @@ const ToComparePrices = () => {
}
{
(record.button === BUTTONAUTHORITY.SEVEN
) && <Button type='link'>修改授标结果</Button>
) &&
<Button
type='link'
onClick={() => history.push(`/memberCenter/procurementAbility/confirmOffer/edit?id=${record.id}&turn=${record.turn}`)}
>
修改授标结果
</Button>
}
<Button type='link' onClick={() => history.push(`/memberCenter/procurementAbility/confirmOffer/toComparePrices/preview?id=${record.id}&turn=${record.turn}`)}>查看</Button>
</>
......
......@@ -113,6 +113,7 @@
.delete_btn {
position: absolute;
z-index: 99;
width: 24px;
height: 24px;
border-radius: 4px;
......
import React, { useState, useEffect } from 'react'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { Form, Input, Button, Tooltip, Select, message, Upload, Typography, Tabs } from 'antd'
import { Form, Input, Button, Tooltip, Select, message, Upload, Typography, Tabs, Image } from 'antd'
import { Prompt } from 'umi'
import { inject } from 'mobx-react'
import { QuestionCircleOutlined, DeleteOutlined, CopyOutlined, UploadOutlined, LinkOutlined } from '@ant-design/icons'
......@@ -452,7 +452,9 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
companyPics.map((item, index) => (
<div key={index} className={cx(styles.upload_btn, styles.large, styles.upload)}>
<div className={styles.delete_btn} onClick={() => handleDeleteWorkShopImgItem(item)}><DeleteOutlined /></div>
<div className={styles.upload_img} style={{ backgroundImage: `url(${item})` }} />
<div className={styles.upload_img}>
<Image width="100%" height="100%" src={item} />
</div>
</div>
))
}
......@@ -477,7 +479,9 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
honorPics.map((item, index) => (
<div key={index} className={cx(styles.upload_btn, styles.large, styles.upload)}>
<div className={styles.delete_btn} onClick={() => handleDeleteHonorPicsItem(item)}><DeleteOutlined /></div>
<img className={styles.upload_img} src={item} />
<div className={styles.upload_img}>
<Image width="100%" height="100%" src={item} />
</div>
</div>
))
}
......@@ -559,7 +563,9 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
<div className={cx(styles.index_pics_list, styles.form_item)} >
<div key={index} className={cx(styles.upload_btn, styles.large, styles.upload)}>
<div className={styles.delete_btn} onClick={() => handleDeleteIndexPicsItem(item)}><DeleteOutlined /></div>
<img className={styles.upload_img} src={item.imgPath} />
<div className={styles.upload_img}>
<Image width="100%" height="100%" src={item.imgPath} />
</div>
</div>
<div className={styles.jump_link}>
<Typography.Text type='secondary'>跳转链接:</Typography.Text>
......
......@@ -316,6 +316,7 @@ const Material: React.FC<Iprops> = (props: any) => {
<UploadImport
visible={flag}
title='导入'
downLink="https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/采购需求单导入12ce2f3f6f7e4dfa8d8a7bc4cdf66f1d.xlsx"
checkfetch='/api/purchase/purchase/inquiry/import/excel/check'
importfetch='/api/purchase/purchase/inquiry/import/excel'
fetchData={fetchData}
......
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