Commit 8ec4f895 authored by XieZhiXiong's avatar XieZhiXiong

Merge branch 'dev-srm' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into dev-srm

parents 298b56fd 8ccf5975
......@@ -28,6 +28,8 @@ const defaultCityData = { index: 0, provinceCode: 0, province: '', cityCode: 0,
const LogisticsInfo: React.FC<LogisticsInfoPropsType> = (props) => {
const { siteUrl, siteId } = props.SiteStore
const [door, setDoor] = useState<string>('');
const [resUrl, setResUrl] = useState<string>('');
const [formIsHalfFilledOut, setFormIsHalfFilledOut] = useState(false)
const [form] = Form.useForm()
const [allMallList, setAllMallList] = useState([])
......@@ -163,7 +165,6 @@ const LogisticsInfo: React.FC<LogisticsInfoPropsType> = (props) => {
}
const handleInputChange = (data: any) => {
console.log(data, 100086)
setMainBusiness(data);
form.setFieldsValue({
mainBusiness: data
......@@ -346,13 +347,12 @@ const LogisticsInfo: React.FC<LogisticsInfoPropsType> = (props) => {
const { value } = e.target;
const result = [...slideshowBOList];
result[index].link = value;
console.log(result)
setSlideshowBOList(result)
form.setFieldsValue({
slideshowBOList: result
})
}
/**
const handleMallSelectChange = (mallId: number) => {
setShopId(mallId)
if (!shopInfo) {
......@@ -395,10 +395,6 @@ const LogisticsInfo: React.FC<LogisticsInfoPropsType> = (props) => {
return result
}
const handleFormValueChange = () => {
setFormIsHalfFilledOut(true)
}
const getSelectMallStoreUrl = () => {
if (!shopInfo) {
return null
......@@ -415,6 +411,28 @@ const LogisticsInfo: React.FC<LogisticsInfoPropsType> = (props) => {
}
return null
}
*/
const handleFormValueChange = () => {
setFormIsHalfFilledOut(true)
}
/** 获取店铺链接 */
const checkUrl = (url) => {
if (url && typeof url === 'string') {
if (url.indexOf('/') === 0) {
return url.replace('/', '').trim()
} else {
return `${url}`.trim()
}
}
}
const handleMallSelectChange = (val, option) => {
setDoor(option.children);
if (option.url) {
checkUrl(option.url) ? setResUrl(`${checkUrl(option.url)}.${siteUrl}`) : setResUrl(`${siteUrl}`)
}
}
return (
<PageHeaderWrapper
......@@ -583,13 +601,17 @@ const LogisticsInfo: React.FC<LogisticsInfoPropsType> = (props) => {
<Select allowClear value={shopId} className={styles.form_item} onChange={handleMallSelectChange}>
{
allMallList.map(item => (
<Select.Option key={item.id} value={item.id}>{item.name}</Select.Option>
<Select.Option key={item.id} value={item.id} url={item.url}>{item.name}</Select.Option>
))
}
</Select>
{
getSelectMallStoreUrl()
}
{resUrl && (
<div className={styles.shop_url}>
<span>当前{door}链接:</span>
<label>{resUrl}</label>
<CopyOutlined className={styles.copy_icon} onClick={() => handleCopyLinke(resUrl)} />
</div>
)}
</Form.Item>
</TabPane>
<TabPane tab='SEO' key='2' forceRender>
......
......@@ -52,6 +52,11 @@ const CallForBidsSearchDetail: React.FC = () => {
// anchorTitleList.splice(-2, 1)
// }
// 勾选资格预审 才有资格预审信息
if(!data?.isQualificationCheck) {
anchorTitleList.forEach((ele, index) => ele['title'] === '资格预审要求' && anchorTitleList.splice(index, 1))
}
return (
<div>
<BidDetailContext.Provider value={formContext}>
......
......@@ -16,7 +16,7 @@ import { createAsyncFormActions } from '@formily/antd'
import moment from 'moment'
import { dataChangeUnix } from '../addNewBid/constant'
import '../../constants/index.less'
import { BidInsideWorkState, BidOuterWorkState } from '@/constants/procurement'
// import { BidInsideWorkState, BidOuterWorkState } from '@/constants/procurement'
const destroyActions = createAsyncFormActions()
const modifyActions = createAsyncFormActions()
......@@ -141,7 +141,7 @@ const callForBidsSearch: React.FC<{}> = () => {
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
schema: tableListSchema(),
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { BidInStateTexts, BidOutStateTexts } from '@/constants/procurement';
// import { BidInStateTexts, BidOutStateTexts } from '@/constants/procurement';
import { getInviteTenderInStatus, getInviteTenderOutStatus } from '@/pages/procurement/constants';
/**
* 招标查询列表高级筛选
*/
export const tableListSchema: ISchema = {
type: 'object',
properties: {
inviteTenderCode: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入招标编号',
align: 'flex-start',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
rowStyle: {
justifyContent: 'start',
export const tableListSchema: any = () => {
const BidInStateTexts = getInviteTenderInStatus()
const BidOutStateTexts = getInviteTenderOutStatus()
return {
type: 'object',
properties: {
inviteTenderCode: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入招标编号',
align: 'flex-start',
},
colStyle: {
marginRight: 20
}
},
properties: {
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
rowStyle: {
justifyContent: 'start',
},
colStyle: {
marginRight: 20
}
},
"[startTime,endTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['发布开始时间','发布结束时间'],
properties: {
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
}
},
},
"[registerStartTime,registerEndTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['报名开始时间','报名结束时间'],
"[startTime,endTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['发布开始时间','发布结束时间'],
},
},
},
"inviteTenderOutStatusList": {
type: 'string',
"x-component-props": {
placeholder: '请选择外部状态'
"[registerStartTime,registerEndTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['报名开始时间','报名结束时间'],
},
},
enum: Object.keys(BidOutStateTexts).map(item => ({
label: BidOutStateTexts[item],
value: item,
}))
},
"inviteTenderInStatusList": {
type: 'string',
"x-component-props": {
placeholder: '请选择内部状态'
"inviteTenderOutStatusList": {
type: 'string',
"x-component-props": {
placeholder: '请选择外部状态'
},
enum: BidOutStateTexts.map(item => ({
label: item['message'],
value: item['code'],
}))
},
enum: Object.keys(BidInStateTexts).map(item => ({
label: BidInStateTexts[item],
value: item,
}))
},
"[preCheckStartTime,preCheckEndTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['预审开始时间','预审结束时间'],
"inviteTenderInStatusList": {
type: 'string',
"x-component-props": {
placeholder: '请选择内部状态'
},
enum: BidInStateTexts.map(item => ({
label: item['message'],
value: item['code'],
}))
},
},
"[inviteTenderStartTime,inviteTenderEndTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['投标开始时间','投标结束时间'],
"[preCheckStartTime,preCheckEndTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['预审开始时间','预审结束时间'],
},
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
"[inviteTenderStartTime,inviteTenderEndTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['投标开始时间','投标结束时间'],
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
},
}
}
}
......@@ -19,10 +19,10 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
return <div className={style.totalWrapper}>
<Row>
<Col span={4}></Col>
<Col span={4}></Col>
<Col span={4} lg={6}></Col>
<Col span={4} lg={6}></Col>
{
columns.map((item, index) => index > 1 ? (<Col span={4}>
columns.map((item, index) => index > 1 ? (<Col span={4} lg={6}>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>报价小计:</p></Col>
......@@ -42,10 +42,10 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
</Row>
<Divider dashed={true} style={{margin: 0, marginBottom: 8}} />
<Row>
<Col span={4}></Col>
<Col span={4}></Col>
<Col span={4} lg={6}></Col>
<Col span={4} lg={6}></Col>
{
columns.map((item, index) => index > 1 ? (<Col span={4}>
columns.map((item, index) => index > 1 ? (<Col span={4} lg={6}>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标数量:</p></Col>
......
......@@ -149,10 +149,10 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
<Col span={24}>
{/* header */}
<Row>
<Col span={4}><p className={style.bidTableHead}>采购物料</p></Col>
<Col span={4}><p className={style.bidTableHead}>采购数量</p></Col>
<Col span={4} lg={6}><p className={style.bidTableHead}>采购物料</p></Col>
<Col span={4} lg={6}><p className={style.bidTableHead}>采购数量</p></Col>
{
tableColumns.map((item, index) => index > 1 ? (<Col span={4} key={`column_${index}`}>
tableColumns.map((item, index) => index > 1 ? (<Col span={4} lg={6} key={`column_${index}`}>
<p className={style.bidTableHead}>
<RenderRanking title={item.title} level={index-1} />
</p>
......@@ -166,7 +166,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
tableColumns.map((_item, _index) => {
const { title, dataIndex } = _item
if(title === '采购物料') {
return (<Col span={4} style={{paddingTop: 0, marginTop: 0}}>
return (<Col span={4} lg={6} style={{paddingTop: 0, marginTop: 0}}>
<div className={style.materialInfo}>
<span className={style.rankNumber}>{index+1}</span>
<div className={style['card-list']}>
......@@ -202,7 +202,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
</div>
</Col>)
} else if(title === '采购数量') {
return (<Col span={4}>
return (<Col span={4} lg={6}>
<div className={style.amountInfo}>
<span>{item[dataIndex]}</span>
<br />
......@@ -210,7 +210,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
</div>
</Col>)
} else {
return (<Col span={4}>
return (<Col span={4} lg={6}>
<GivenBidItem currentData={item} datas={tableDataSource} currentColumn={_item} columns={tableColumns} currentIndex={index} />
</Col>)
}
......
......@@ -40,7 +40,7 @@ const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
<div className={style.participateWrapper}>
<Row gutter={[16, 0]}>
{
participateList.map((item, index) => (<Col span={4} key={index}>
participateList.map((item, index) => (<Col span={4} lg={6} key={index}>
<div className={style.participateContent}>
<div className={style.topWrapper}>
<h3>{item.company}</h3>
......
......@@ -19,10 +19,10 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
return <div className={style.totalWrapper}>
<Row>
<Col span={4}></Col>
<Col span={4}></Col>
<Col span={4} lg={6}></Col>
<Col span={4} lg={6}></Col>
{
columns.map((item, index) => index > 1 ? (<Col span={4}>
columns.map((item, index) => index > 1 ? (<Col span={4} lg={6}>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>报价小计:</p></Col>
......@@ -42,10 +42,10 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
</Row>
<Divider dashed={true} style={{margin: 0, marginBottom: 8}} />
<Row>
<Col span={4}></Col>
<Col span={4}></Col>
<Col span={4} lg={6}></Col>
<Col span={4} lg={6}></Col>
{
columns.map((item, index) => index > 1 ? (<Col span={4}>
columns.map((item, index) => index > 1 ? (<Col span={4} lg={6}>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标数量:</p></Col>
......
......@@ -149,10 +149,10 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
<Col span={24}>
{/* header */}
<Row>
<Col span={4}><p className={style.bidTableHead}>采购物料</p></Col>
<Col span={4}><p className={style.bidTableHead}>采购数量</p></Col>
<Col span={4} lg={6}><p className={style.bidTableHead}>采购物料</p></Col>
<Col span={4} lg={6}><p className={style.bidTableHead}>采购数量</p></Col>
{
tableColumns.map((item, index) => index > 1 ? (<Col span={4} key={`column_${index}`}>
tableColumns.map((item, index) => index > 1 ? (<Col span={4} lg={6} key={`column_${index}`}>
<p className={style.bidTableHead}>
<RenderRanking title={item.title} level={index-1} />
</p>
......@@ -166,7 +166,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
tableColumns.map((_item, _index) => {
const { title, dataIndex } = _item
if(title === '采购物料') {
return (<Col span={4} style={{paddingTop: 0, marginTop: 0}}>
return (<Col span={4} lg={6} style={{paddingTop: 0, marginTop: 0}}>
<div className={style.materialInfo}>
<span className={style.rankNumber}>{index+1}</span>
<div className={style['card-list']}>
......@@ -202,7 +202,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
</div>
</Col>)
} else if(title === '采购数量') {
return (<Col span={4}>
return (<Col span={4} lg={6}>
<div className={style.amountInfo}>
<span>{item[dataIndex]}</span>
<br />
......@@ -210,7 +210,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
</div>
</Col>)
} else {
return (<Col span={4}>
return (<Col span={4} lg={6}>
<GivenBidItem currentData={item} datas={tableDataSource} currentColumn={_item} columns={tableColumns} currentIndex={index} />
</Col>)
}
......
......@@ -43,7 +43,7 @@ const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
<div className={style.participateWrapper}>
<Row gutter={[16, 0]}>
{
participateList.map((item, index) => (<Col span={4} key={index}>
participateList.map((item, index) => (<Col span={4} lg={6} key={index}>
<div className={style.participateContent}>
<div className={style.topWrapper}>
<h3>{item.company}</h3>
......
......@@ -44,14 +44,15 @@ const ReadyCheckedRegisterDetail: React.FC = () => {
const anchorTitleList = [
{ title: '流转进度', id: 'transferProcess', componentName: "TransferProcess" },
{ title: '基本信息', id: 'baseicInfo', type: "basicInfo" },
{ title: '招标物料', id: 'bidMaterial', componentName: "BidMaterial" },
{ title: '招标要求', id: 'bidNeed', type: "bidNeed" },
// { title: '招标物料', id: 'bidMaterial', componentName: "BidMaterial" },
// { title: '招标要求', id: 'bidNeed', type: "bidNeed" },
{ title: '报名要求', id: 'registerNeed', type: "registerNeed" },
{ title: '报名信息', id: 'registerInfo', type: 'registerInfo' },
{ title: '资格预审要求', id: 'checkNeed', type: "checkNeed" },
{ title: '评标要求', id: 'remarkNeed', type: "remarkNeed" },
{ title: '其他要求', id: 'otherNeed', type: "otherNeed" },
{ title: '招标方式', id: 'bidWay', componentName: "BidMethod" },
{ title: '报名文件', id: 'baseicInfo', type: "registerFile" },
// { title: '资格预审要求', id: 'checkNeed', type: "checkNeed" },
// { title: '评标要求', id: 'remarkNeed', type: "remarkNeed" },
// { title: '其他要求', id: 'otherNeed', type: "otherNeed" },
// { title: '招标方式', id: 'bidWay', componentName: "BidMethod" },
{ title: '流转记录', id: 'transferRecord', componentName: "BidTransformRecord" },
]
......
......@@ -30,10 +30,10 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
return <div className={style.totalWrapper}>
<Row>
<Col span={4}></Col>
<Col span={4}></Col>
<Col span={4} lg={6}></Col>
<Col span={4} lg={6}></Col>
{
columns.map((item, index) => index > 1 ? (<Col span={4}>
columns.map((item, index) => index > 1 ? (<Col span={4} lg={6}>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>报价小计:</p></Col>
......@@ -53,10 +53,10 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
</Row>
<Divider dashed={true} style={{margin: 0, marginBottom: 8}} />
<Row>
<Col span={4}></Col>
<Col span={4}></Col>
<Col span={4} lg={6}></Col>
<Col span={4} lg={6}></Col>
{
columns.map((item, index) => index > 1 ? (<Col span={4}>
columns.map((item, index) => index > 1 ? (<Col span={4} lg={6}>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标数量:</p></Col>
......
......@@ -122,10 +122,10 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
<Col span={24}>
{/* header */}
<Row>
<Col span={4}><p className={style.bidTableHead}>采购物料</p></Col>
<Col span={4}><p className={style.bidTableHead}>采购数量</p></Col>
<Col span={4} lg={6}><p className={style.bidTableHead}>采购物料</p></Col>
<Col span={4} lg={6}><p className={style.bidTableHead}>采购数量</p></Col>
{
tableColumns.map((item, index) => index > 1 ? (<Col span={4} key={`column_${index}`}>
tableColumns.map((item, index) => index > 1 ? (<Col span={4} lg={6} key={`column_${index}`}>
<p className={style.bidTableHead}>
<RenderRanking title={item.title} level={index-1} />
</p>
......@@ -139,7 +139,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
tableColumns.map((_item, _index) => {
const { title, dataIndex } = _item
if(title === '采购物料' && item[dataIndex]) {
return (<Col span={4} style={{paddingTop: 0, marginTop: 0}}>
return (<Col span={4} lg={6} style={{paddingTop: 0, marginTop: 0}}>
<div className={style.materialInfo}>
<span className={style.rankNumber}>{index+1}</span>
<div className={style['card-list']}>
......@@ -175,7 +175,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
</div>
</Col>)
} else if(title === '采购数量') {
return (<Col span={4}>
return (<Col span={4} lg={6}>
<div className={style.amountInfo}>
<span>{item[dataIndex]}</span>
<br />
......@@ -183,7 +183,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
</div>
</Col>)
} else {
return (<Col span={4}>
return (<Col span={4} lg={6}>
<GivenBidItem currentData={item} datas={tableDataSource} currentColumn={_item} columns={tableColumns} currentIndex={index} />
</Col>)
}
......
......@@ -44,7 +44,7 @@ const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
<div className={style.participateWrapper}>
<Row gutter={[16, 0]}>
{
participateList.map((item, index) => (<Col span={4} key={index}>
participateList.map((item, index) => (<Col span={4} lg={6} key={index}>
<div className={style.participateContent}>
<div className={style.topWrapper}>
<h3>{item.company}</h3>
......
......@@ -19,10 +19,10 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
return <div className={style.totalWrapper}>
<Row>
<Col span={4}></Col>
<Col span={4}></Col>
<Col span={4} lg={6}></Col>
<Col span={4} lg={6}></Col>
{
columns.map((item, index) => index > 1 ? (<Col span={4}>
columns.map((item, index) => index > 1 ? (<Col span={4} lg={6}>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>报价小计:</p></Col>
......@@ -42,10 +42,10 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
</Row>
<Divider dashed={true} style={{margin: 0, marginBottom: 8}} />
<Row>
<Col span={4}></Col>
<Col span={4}></Col>
<Col span={4} lg={6}></Col>
<Col span={4} lg={6}></Col>
{
columns.map((item, index) => index > 1 ? (<Col span={4}>
columns.map((item, index) => index > 1 ? (<Col span={4} lg={6}>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标数量:</p></Col>
......
......@@ -150,10 +150,10 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
<Col span={24}>
{/* header */}
<Row>
<Col span={4}><p className={style.bidTableHead}>采购物料</p></Col>
<Col span={4}><p className={style.bidTableHead}>采购数量</p></Col>
<Col span={4} lg={6}><p className={style.bidTableHead}>采购物料</p></Col>
<Col span={4} lg={6}><p className={style.bidTableHead}>采购数量</p></Col>
{
tableColumns.map((item, index) => index > 1 ? (<Col span={4} key={`column_${index}`}>
tableColumns.map((item, index) => index > 1 ? (<Col span={4} lg={6} key={`column_${index}`}>
<p className={style.bidTableHead}>
<RenderRanking title={item.title} level={index-1} />
</p>
......@@ -167,7 +167,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
tableColumns.map((_item, _index) => {
const { title, dataIndex } = _item
if(title === '采购物料') {
return (<Col span={4} style={{paddingTop: 0, marginTop: 0}}>
return (<Col span={4} lg={6} style={{paddingTop: 0, marginTop: 0}}>
<div className={style.materialInfo}>
<span className={style.rankNumber}>{index+1}</span>
<div className={style['card-list']}>
......@@ -203,7 +203,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
</div>
</Col>)
} else if(title === '采购数量') {
return (<Col span={4}>
return (<Col span={4} lg={6}>
<div className={style.amountInfo}>
<span>{item[dataIndex]}</span>
<br />
......@@ -211,7 +211,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
</div>
</Col>)
} else {
return (<Col span={4}>
return (<Col span={4} lg={6}>
<GivenBidItem currentData={item} datas={tableDataSource} currentColumn={_item} columns={tableColumns} currentIndex={index} />
</Col>)
}
......
......@@ -43,7 +43,7 @@ const ParticipateInfo: React.FC<ParticipateInfoProps> = ({cardTitle}) => {
<div className={style.participateWrapper}>
<Row gutter={[16, 0]}>
{
participateList.map((item, index) => (<Col span={4} key={index}>
participateList.map((item, index) => (<Col span={4} lg={6} key={index}>
<div className={style.participateContent}>
<div className={style.topWrapper}>
<h3>{item.company}</h3>
......
......@@ -38,7 +38,7 @@ const TenderSearch: React.FC<{}> = () => {
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
schema: tableListSchema(),
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { TenderOutStateTexts } from '@/constants/procurement';
// import { TenderOutStateTexts } from '@/constants/procurement';
import { getInviteSubmitTenderOutStatus } from '@/pages/procurement/constants';
/**
* 招标查询列表高级筛选
*/
export const tableListSchema: ISchema = {
type: 'object',
properties: {
inviteTenderCode: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入招标编号',
align: 'flex-start',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
rowStyle: {
justifyContent: 'start',
export const tableListSchema: any = () => {
const TenderOutStateTexts = getInviteSubmitTenderOutStatus()
return {
type: 'object',
properties: {
inviteTenderCode: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入招标编号',
align: 'flex-start',
},
colStyle: {
marginRight: 20
}
},
properties: {
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入投标项目',
}
},
submitTenderCode: {
type: 'string',
'x-component-props': {
placeholder: '请输入投标编号',
}
},
openTenderTime: {
type: 'string',
"x-component": 'data',
'x-component-props': {
placeholder: '开标开始时间',
showTime: true,
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
rowStyle: {
justifyContent: 'start',
},
},
submitTenderMemberName: {
type: 'string',
'x-component-props': {
placeholder: '请输入投标会员',
colStyle: {
marginRight: 20
}
},
submitTenderOutStatusList: {
type: 'string',
"x-component-props": {
placeholder: '请选择外部状态'
properties: {
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入投标项目',
}
},
enum: Object.keys(TenderOutStateTexts).filter(_item => Number(_item) >= 8).map(item => ({
label: TenderOutStateTexts[item],
value: item,
}))
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
submitTenderCode: {
type: 'string',
'x-component-props': {
placeholder: '请输入投标编号',
}
},
openTenderTime: {
type: 'string',
"x-component": 'data',
'x-component-props': {
placeholder: '开标开始时间',
showTime: true,
},
},
submitTenderMemberName: {
type: 'string',
'x-component-props': {
placeholder: '请输入投标会员',
}
},
submitTenderOutStatusList: {
type: 'string',
"x-component-props": {
placeholder: '请选择外部状态'
},
enum: TenderOutStateTexts.map(item => ({
label: item['message'],
value: item['code'],
}))
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
},
}
}
}
......@@ -19,10 +19,10 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
return <div className={style.totalWrapper}>
<Row>
<Col span={4}></Col>
<Col span={4}></Col>
<Col span={4} lg={6}></Col>
<Col span={4} lg={6}></Col>
{
columns.map((item, index) => index > 1 ? (<Col span={4}>
columns.map((item, index) => index > 1 ? (<Col span={4} lg={6}>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>报价小计:</p></Col>
......@@ -42,10 +42,10 @@ export const TotalAmount:React.FC<TotalAmountProps> = ({
</Row>
<Divider dashed={true} style={{margin: 0, marginBottom: 8}} />
<Row>
<Col span={4}></Col>
<Col span={4}></Col>
<Col span={4} lg={6}></Col>
<Col span={4} lg={6}></Col>
{
columns.map((item, index) => index > 1 ? (<Col span={4}>
columns.map((item, index) => index > 1 ? (<Col span={4} lg={6}>
<div className={style['card-list']}>
<Row>
<Col span={8}><p className={style['card-list_title']}>授标数量:</p></Col>
......
......@@ -167,10 +167,10 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
<Col span={24}>
{/* header */}
<Row>
<Col span={4}><p className={style.bidTableHead}>采购物料</p></Col>
<Col span={4}><p className={style.bidTableHead}>采购数量</p></Col>
<Col span={4} lg={6}><p className={style.bidTableHead}>采购物料</p></Col>
<Col span={4} lg={6}><p className={style.bidTableHead}>采购数量</p></Col>
{
tableColumns.map((item, index) => index > 1 ? (<Col span={4} key={`column_${index}`}>
tableColumns.map((item, index) => index > 1 ? (<Col span={4} lg={6} key={`column_${index}`}>
<p className={style.bidTableHead}>
<RenderRanking title={item.title} level={index-1} />
</p>
......@@ -184,7 +184,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
tableColumns.map((_item, _index) => {
const { title, dataIndex } = _item
if(title === '采购物料') {
return (<Col span={4} style={{paddingTop: 0, marginTop: 0}}>
return (<Col span={4} lg={6} style={{paddingTop: 0, marginTop: 0}}>
<div className={style.materialInfo}>
<span className={style.rankNumber}>{index+1}</span>
<div className={style['card-list']}>
......@@ -220,7 +220,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
</div>
</Col>)
} else if(title === '采购数量') {
return (<Col span={4}>
return (<Col span={4} lg={6}>
<div className={style.amountInfo}>
<span>{item[dataIndex]}</span>
<br />
......@@ -228,7 +228,7 @@ const BidConfirm: React.FC<BidConfirmProps> = ({cardTitle}) => {
</div>
</Col>)
} else {
return (<Col span={4}>
return (<Col span={4} lg={6}>
<GivenBidItem currentData={item} datas={tableDataSource} currentColumn={_item} columns={tableColumns} currentIndex={index} />
</Col>)
}
......
......@@ -43,6 +43,7 @@ const RemarkBidReport: React.FC<RemarkBidReportProps> = ({cardTitle}) => {
tempObject.id = item.id
tempObject.memberId = item.memberId
tempObject.memberName = item.memberName
if(item.evaluationTenderList)
for(let j = 0; j < item.evaluationTenderList.length; j++) {
let _item = item['evaluationTenderList'][j]
tempObject.expertExtractRecordId = _item['expertExtractRecord']['id']
......
import React from 'react'
import React, { useEffect, useState } from 'react'
import {history} from 'umi'
import { formatTimeString } from '@/utils'
import EyePreview from '@/components/EyePreview'
......@@ -6,6 +6,7 @@ import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import CustomTag from '@/pages/procurement/components/CustomTag'
import CustomBadge from '@/pages/procurement/components/customBadge'
import { CALLFORBID_TYPE, PURCHASE_TYPE } from '@/constants/procurement'
import { PublicApi } from '@/services/api'
/** 工具: 按属性归类 */
export const groupBy = (objectArray: any[], property: string) => {
......@@ -195,3 +196,125 @@ export const baseTenderListColumns: any[] = [
render: (text, r) => <CustomBadge text={text} color={r.submitTenderInStatusColor} />
},
]
/** 获取高级筛选状态 */
interface IState {
code: number;
message: string;
}
/** 招标管理 */
/** 招标 招标查询 内部状态 */
export const getInviteTenderInStatus = () => {
const [state, setstate] = useState<IState[]>([])
useEffect(() => {
PublicApi.getPurchaseInviteTenderGetInviteTenderInStatus({}).then(res => {
const { code, data } = res
if(code === 1000) {
setstate(data)
}
})
}, [])
return state
}
/** 招标 招标查询 外部状态 */
export const getInviteTenderOutStatus = () => {
const [state, setstate] = useState<IState[]>([])
useEffect(() => {
PublicApi.getPurchaseInviteTenderGetInviteTenderOutStatus({}).then(res => {
const { code, data } = res
if(code === 1000) {
setstate(data)
}
})
}, [])
return state
}
/** 招标 投标查询 外部状态 */
export const getInviteSubmitTenderOutStatus = () => {
const [state, setstate] = useState<IState[]>([])
useEffect(() => {
PublicApi.getPurchaseInviteTenderGetSubmitTenderOutStatus({}).then(res => {
const { code, data } = res
if(code === 1000) {
setstate(data)
}
})
}, [])
return state
}
/** 投标管理 */
/** 投标 招标查询 内部状态 */
export const getSubmitInviteTenderInStatus = () => {
const [state, setstate] = useState<IState[]>([])
useEffect(() => {
PublicApi.getPurchaseSubmitTenderGetInviteTenderInStatus({}).then(res => {
const { code, data } = res
if(code === 1000) {
setstate(data)
}
})
}, [])
return state
}
/** 投标 招标查询 外部状态 */
export const getSubmitInviteTenderOutStatus = () => {
const [state, setstate] = useState<IState[]>([])
useEffect(() => {
PublicApi.getPurchaseSubmitTenderGetInviteTenderOutStatus({}).then(res => {
const { code, data } = res
if(code === 1000) {
setstate(data)
}
})
}, [])
return state
}
/** 投标 投标查询 内部状态 */
export const getSubmitSubmitTenderInStatus = () => {
const [state, setstate] = useState<IState[]>([])
useEffect(() => {
PublicApi.getPurchaseSubmitTenderGetSubmitTenderInStatus({}).then(res => {
const { code, data } = res
if(code === 1000) {
setstate(data)
}
})
}, [])
return state
}
/** 投标 投标查询 外部状态 */
export const getSubmitSubmitTenderOutStatus = () => {
const [state, setstate] = useState<IState[]>([])
useEffect(() => {
PublicApi.getPurchaseSubmitTenderGetSubmitTenderOutStatus({}).then(res => {
const { code, data } = res
if(code === 1000) {
setstate(data)
}
})
}, [])
return state
}
......@@ -39,7 +39,7 @@ const callForBidsSearch: React.FC<{}> = () => {
formilyProps={{
ctx: {
inline: false,
schema: tableListSchema,
schema: tableListSchema(),
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
......
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { BidOutStateTexts, TenderInStateTexts, TenderOutStateTexts } from '@/constants/procurement';
import { getSubmitInviteTenderInStatus, getSubmitInviteTenderOutStatus } from '@/pages/procurement/constants';
// import { TenderInStateTexts, TenderOutStateTexts } from '@/constants/procurement';
/**
* 招标查询列表高级筛选
*/
export const tableListSchema: ISchema = {
type: 'object',
properties: {
inviteTenderCode: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入招标编号',
align: 'flex-start',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
rowStyle: {
justifyContent: 'start',
export const tableListSchema: any = () => {
const TenderInStateTexts = getSubmitInviteTenderInStatus()
const TenderOutStateTexts = getSubmitInviteTenderOutStatus()
return {
type: 'object',
properties: {
inviteTenderCode: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入招标编号',
align: 'flex-start',
},
colStyle: {
marginRight: 20
}
},
properties: {
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
}
},
"[startTime,endTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['发布开始时间','发布结束时间'],
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
rowStyle: {
justifyContent: 'start',
},
},
inviteTenderMemberName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标会员',
colStyle: {
marginRight: 20
}
},
"submitTenderOutStatusList": {
type: 'string',
"x-component-props": {
placeholder: '请选择外部状态'
properties: {
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
}
},
enum: Object.keys(TenderOutStateTexts).map(item => ({
label: BidOutStateTexts[item],
value: item,
}))
},
"submitTenderInStatusList": {
type: 'string',
"x-component-props": {
placeholder: '请选择内部状态'
"[startTime,endTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['发布开始时间','发布结束时间'],
},
},
enum: Object.keys(TenderInStateTexts).map(item => ({
label: TenderInStateTexts[item],
value: item,
}))
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
inviteTenderMemberName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标会员',
}
},
"submitTenderOutStatusList": {
type: 'string',
"x-component-props": {
placeholder: '请选择外部状态'
},
enum: TenderOutStateTexts.map(item => ({
label: item['message'],
value: item['code'],
}))
},
"submitTenderInStatusList": {
type: 'string',
"x-component-props": {
placeholder: '请选择内部状态'
},
enum: TenderInStateTexts.map(item => ({
label: item['message'],
value: item['code'],
}))
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
},
}
}
}
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { getSubmitSubmitTenderInStatus, getSubmitSubmitTenderOutStatus } from '@/pages/procurement/constants';
// import { TenderInStateTexts, TenderOutStateTexts } from '@/constants/procurement';
/**
* 投标查询列表高级筛选
*/
export const tableListSchema: ISchema = {
type: 'object',
properties: {
submitTenderCode: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入投标编号',
align: 'flex-start',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
colStyle: {
marginRight: 20
},
rowStyle: {
justifyContent: 'start',
export const tableListSchema: any = () => {
const TenderInStateTexts = getSubmitSubmitTenderInStatus()
const TenderOutStateTexts = getSubmitSubmitTenderOutStatus()
return {
type: 'object',
properties: {
submitTenderCode: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入投标编号',
align: 'flex-start',
},
},
properties: {
inviteTenderCode: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标编号',
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
colStyle: {
marginRight: 20
},
},
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
}
},
"[startTime,endTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['发布开始时间','发布结束时间'],
rowStyle: {
justifyContent: 'start',
},
},
inviteTenderMemberName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标会员',
}
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
properties: {
inviteTenderCode: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标编号',
},
},
projectName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标项目',
}
},
"[startTime,endTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['发布开始时间','发布结束时间'],
},
},
inviteTenderMemberName: {
type: 'string',
'x-component-props': {
placeholder: '请输入招标会员',
}
},
"submitTenderOutStatusList": {
type: 'string',
"x-component-props": {
placeholder: '请选择外部状态'
},
enum: TenderOutStateTexts.map(item => ({
label: item['message'],
value: item['code'],
}))
},
"submitTenderInStatusList": {
type: 'string',
"x-component-props": {
placeholder: '请选择内部状态'
},
enum: TenderInStateTexts.map(item => ({
label: item['message'],
value: item['code'],
}))
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
},
}
}
}
......@@ -92,7 +92,7 @@ const BidCommonLayout: React.FC<BidCommonLayoutProps> = (props: any) => {
<Divider dashed style={{ color: '#EBECF0' }} />
<div className={selfStyles.baseItem}>
<h5 className={selfStyles.label}>授标意见: </h5>
<h5 className={selfStyles.content}>{effect.signUpIdea}</h5>
<h5 className={selfStyles.content}>{effect.signUpIdea || '-'}</h5>
</div>
<div className={selfStyles.baseItem}>
<h5 className={selfStyles.label}>附件: </h5>
......
......@@ -148,8 +148,8 @@ const ContrastLyout1: React.FC<IProps> = (props: any) => {
if (data.length > 0) {
formatting(data, i);
} else {
message.error('当前暂无比价信息');
setDisabled(true);
// message.error('当前暂无比价信息');
setDisabled(false);
}
setLoading(false);
......
......@@ -91,6 +91,8 @@ const LowestQuotationRecord: React.FC<TableCommonLayoutProps> = (props: any) =>
const _returnBadge = (number) => {
const _number = Number(number ?? 0);
switch (_number) {
case 0:
return '-';
case 1:
return <img src={level1} alt='第一名' />;
case 2:
......
......@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
import { Modal } from 'antd';
import {
SchemaForm, SchemaMarkupField as Field,
createAsyncFormActions,
createFormActions,
FormEffectHooks,
} from '@formily/antd'
import { Input, Radio, DatePicker, Checkbox } from '@formily/antd-components'
......@@ -11,7 +11,7 @@ import moment from 'moment';
import styles from './index.less';
import { isEmpty } from 'lodash';
const actions = createAsyncFormActions()
const actions = createFormActions()
const { onFieldChange$ } = FormEffectHooks;
export interface IProps {
......@@ -42,6 +42,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
const [confirmLoading, setConfirmLoading] = useState<boolean>(false);
const useFormEffects = () => {
const { setFieldState } = createFormActions()
if (modalType === 'audit') {
onFieldChange$('state').subscribe(({ value }) => {
actions.setFieldState('auditOpinion', state => {
......
......@@ -81,6 +81,8 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
const handleClose = () => {
onClose()
resetValue()
setFiles([])
setProductId(0)
}
/** 确定 */
const handleConfirm = () => {
......@@ -89,6 +91,8 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
attribute,
files,
})
setProductId(0)
setFiles([])
resetValue()
}
......@@ -146,9 +150,18 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
if (record.productId) {
GetCommodityAttribute(record.productId);
}
record.enclosureUrls && setFiles(record.enclosureUrls)
}
}, [rel, record])
const handleSelProduct = (data) => {
console.log(data);
data.id && setProductId(data.id);
data.productId && setProductId(data.productId);
setFlag(true)
}
return (
<>
<Drawer
......@@ -169,10 +182,10 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
>
<Button onClick={handleClose} style={{ marginRight: 8 }}>
取消
</Button>
</Button>
<Button onClick={handleConfirm} type="primary">
确定
</Button>
</Button>
</div>
)}
</>
......@@ -226,7 +239,7 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
}}
>
基本信息
</span>
</span>
</>
}
/>
......@@ -261,7 +274,7 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
<div className={cx(style.box, style.boxBlue)}>
<div className={cx(style.title, style.tagBlue)}>
报价商品
<Text type='danger'>*</Text>
<Text type='danger'>*</Text>
</div>
<div className={style.content}>
{Object.keys(product).length > 0
......@@ -282,7 +295,7 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
</>
)}
{!preview && (
<Button onClick={() => { setFlag(true); setProductId(product.id); console.log(product) }} block type="dashed" style={{ margin: '16px 0px' }}>
<Button onClick={() => handleSelProduct(product)} block type="dashed" style={{ margin: '16px 0px' }}>
<PlusSquareOutlined />
选择商品
</Button>
......@@ -349,7 +362,7 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
}}
>
附件
</span>
</span>
</>
}
/>
......
......@@ -159,9 +159,12 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
}
useEffect(() => {
console.log(id)
if (id) {
console.log(2)
RowCtl.setSelectedRowKeys([id]);
} else {
console.log(1)
RowCtl.setSelectedRowKeys([]);
}
}, [visible])
......
......@@ -4,7 +4,7 @@
font-size: 12px;
color: #909399;
align-items: center;
margin-bottom: 10px;
margin-bottom: 6.5px;
.left{
width: 19px;
background-color: #F7F8FA;
......
......@@ -316,7 +316,6 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
const { value } = e.target;
const result = [...slideshowBOList];
result[index].link = value;
console.log(result)
setSlideshowBOList(result)
form.setFieldsValue({
slideshowBOList: result
......@@ -385,9 +384,10 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
setFormIsHalfFilledOut(true)
}
/** 获取店铺链接 */
const checkUrl = (url) => {
if (url && typeof url === 'string') {
if (url.indexOf('/') > -1) {
if (url.indexOf('/') === 0) {
return url.replace('/', '').trim()
} else {
return `${url}`.trim()
......@@ -395,11 +395,10 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
}
}
/** 获取店铺链接 */
const handleMallSelectChange = (val, option) => {
setDoor(option.children);
if (option.url) {
setResUrl(`${siteUrl}/${checkUrl(option.url)}`)
checkUrl(option.url) ? setResUrl(`${checkUrl(option.url)}.${siteUrl}`) : setResUrl(`${siteUrl}`)
}
}
......
......@@ -17,6 +17,11 @@ interface DetailBottomDrawerProps {
detail: any
}
const transforType = {
1: '是',
0: '否'
}
const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
const { visible, onClose, detail } = props;
const { awardProcess = [], materiels = [], offerCount, isOpenPurchase, isOpenRanking } = detail;
......@@ -61,13 +66,21 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
title: '含税/税率',
dataIndex: 'isTax',
key: 'isTax',
render: (text: any, record: any) => <Input value={record.taxRate} onChange={(e) => { _changeTax(record, e.target.value) }} addonAfter="%" />
render: (text: any, record: any) => (activeItem ?
<Space direction='vertical'>
<Text type='secondary' key={'isTax_1'} >{transforType[record.isTax]}</Text>
<Text type='secondary' key={'isTax_2'} >{record.taxRate ? `${record.taxRate}%` : '-'}</Text>
</Space>
: <Input value={record.taxRate} onChange={(e) => { _changeTax(record, e.target.value) }} addonAfter="%" />)
},
{
title: '单价(含税)',
dataIndex: 'unitPrice',
key: 'unitPrice',
render: (text: any, record: any) => <Input value={record.unitPrice} onChange={(e) => { _changeUnitPrice(record, e.target.value) }} addonBefore="¥" />
render: (text: any, record: any) => (activeItem ?
<Text type='secondary' key={'unitPrice_1'} >¥{priceFormat(record.unitPrice)}</Text>
:
<Input value={record.unitPrice} onChange={(e) => { _changeUnitPrice(record, e.target.value) }} addonBefore="¥" />)
},
{
title: '金额(含税)',
......@@ -122,7 +135,7 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
}
const bidOk = () => {
if(btnLoading){
if (btnLoading) {
return;
}
const _price = dataSource2.reduce((total: any, cur: any) => total + Number(cur.price), 0);
......
......@@ -15,6 +15,7 @@ import style from './index.less';
import DrawerWrite from '../modal/drawerWrite';
import { PublicApi } from '@/services/api';
import UploadImport from '@/components/UploadImport';
import EyePreview from '@/components/EyePreview';
const layout: any = {
colon: false,
......@@ -40,7 +41,9 @@ const Material: React.FC<Iprops> = (props: any) => {
/** 表单表头 */
const [flag, setFlag] = useState<boolean>(false);
const [edit, setEdit] = useState<any>({});
const [dataSource, setDataSource] = useState<any>([])
const [dataSource, setDataSource] = useState<any>([]);
const [eidtIndex, setEditIndex] = useState<number | null>();
const [isPreview, setIsPreview] = useState<boolean>(false);
/** 删除列表 */
const handleRemove = (index: number) => {
......@@ -50,9 +53,11 @@ const Material: React.FC<Iprops> = (props: any) => {
}
/** 编辑列表 */
const handleEdit = (data) => {
const handleEdit = (data, index, preview?) => {
setEditIndex(index)
setEdit(data);
setFlag(true)
setIsPreview(preview)
}
const columns: ColumnType<Object>[] = [
......@@ -65,6 +70,9 @@ const Material: React.FC<Iprops> = (props: any) => {
title: '物料名称',
key: 'name',
dataIndex: 'name',
render: (text: any, record: any, index: number) => (
<EyePreview type='button' handleClick={() => handleEdit(record, index, true) } >{text}</EyePreview>
)
},
{
title: '规格型号',
......@@ -97,7 +105,7 @@ const Material: React.FC<Iprops> = (props: any) => {
dataIndex: 'operate',
render: (_text: any, record: any, index: number) => (
<>
<Button type='link' onClick={() => handleEdit(record) }>编辑</Button>
<Button type='link' onClick={() => handleEdit(record, index)}>编辑</Button>
<Button onClick={() => handleRemove(index)} type='link'>删除</Button>
</>
)
......@@ -113,12 +121,23 @@ const Material: React.FC<Iprops> = (props: any) => {
/** 打开添加方式 */
const handleAddmode = () => {
setFlag(true)
setEdit({})
setEditIndex(null)
}
/** 关闭 */
const handleClose = () => {
setFlag(false)
setIsPreview(false)
}
/** 添加列表 */
const fetchTableList = (data: any) => {
if (Object.keys(data).length > 0) {
console.log(data, 98)
setDataSource([...dataSource, data]);
if (eidtIndex || eidtIndex === 0) {
dataSource[eidtIndex] = data;
setDataSource([...dataSource]);
} else {
setDataSource([...dataSource, data]);
}
setFlag(false);
}
}
......@@ -202,9 +221,10 @@ const Material: React.FC<Iprops> = (props: any) => {
{materielMode === 1
&& (
<DrawerWrite
preview={isPreview}
edit={edit}
flag={flag}
onClose={() => setFlag(false)}
onClose={handleClose}
onConfirm={fetchTableList}
/>
)}
......
......@@ -95,7 +95,7 @@ const SelectProduct: React.FC<Iprops> = (props: any) => {
<StandardTable
currentRef={ref}
columns={columns}
tableProps={{ rowKew: 'id' }}
tableProps={{ rowkey: 'id' }}
rowSelection={rowSelection}
fetchTableData={(params) => fetchGoodsData(params)}
controlRender={
......
......@@ -20,7 +20,7 @@ const tokenList = [
{ name: 'TransactionV2', token: '3ad04435494d01c359b9f07948338e019133a3e6c0fccdbe1bc3adc19cf1e0b1', categoryIds: [0] }, // 交易服务V2
{ name: 'ContractV2', token: 'bbf1f327cfe7c59d1e7fd9c5d25119829dd79d238b1f1c79ed97331e220721a4', categoryIds: [0] }, // 合同能力V2
{ name: 'OrderV2', token: '033f83bd5f519506f65f46d1513b1f8028a1dc1b5238d22edd0a2feb53cd3a19', categoryIds: [0], }, //订单服务V2
{ name: 'Platform', token: 'cadc3b13452c3ec67b5ef0c57063f12142e857a9eaa64669e80165adf42f5861', categoryIds: [0] }, // 平台后台v2
{ name: 'Platform', token: 'db3b086157528c865a1a1a9fafffa574e9c3f098c0518a7c374a72988ba1edbb', categoryIds: [0] }, // 平台后台v2
{ name: 'ProductV2', token: 'b915026587fa1f6edf056f3335817fe2d4b350b0aa84da456786e15e83d45827', categoryIds: [0], }, // 商品服务V2
{ name: 'TemplateV2', token: 'f0187aed046ac19accbed5c780cade01cf11b50a37099dab9d456195a4abd0d3', categoryIds: [0], }, // 页面模板服务V2
{ name: 'MemberV2', token: '87f86a297246fbf1c0dff7d34f13729cb194935a95db077a5009ac4ea48cea6f', categoryIds: [0]}, //会员服务 V2
......
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