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

修改需求报价,需求发布文字不对应原型,和添加商品的的问题

parent d650a5b4
......@@ -285,10 +285,7 @@ const detailInfo: React.FC<{}> = () => {
const handleModalOK = () => {
setvisible(false)
ref.current.reload()
setTimeout(() => {
history.goBack()
}, 1000)
history.goBack()
}
......
......@@ -274,7 +274,7 @@ const Deatail: React.FC<{}> = () => {
useEffect(() => {
let _title = pageStatus === PageStatus.PREVIEW ? '查看' : id ? '编辑' : '新建'
setHeaderTitle(`${_title}物流单`)
PublicApi.getLogisticsSelectListCompany({cooperateType: 1}).then(res => {
PublicApi.getLogisticsSelectListCompany({cooperateType: '1'}).then(res => {
let list = []
res.data.forEach(item => {
list.push({ value: item.id, label: item.name })
......
......@@ -345,4 +345,57 @@ export const demandQuoteInteriorState = [
{
label: '取消报价单', value: 7
}
]
/****************************确认需求报价********************************/
/**
* @description: 确认需求报价外部状态筛选
* @param {type} 外部状态:
* @return {type} 1.待提交需求单 2.待审核需求单 3.待提交报价单 4.待确认报价单 5.确认通过 6.确认不通过
*/
export const confirmDemandQuoteExternalState = [
{
label: '待提交需求单', value: 1
},
{
label: '待审核需求单', value: 2
},
{
label: '待提交报价单', value: 3
},
{
label: '待确认报价单', value: 4
},
{
label: '确认通过', value: 5
},
{
label: '确认不通过', value: 6
}
]
/**
* @description: 确认需求报价内部状态筛选
* @param {type} 内部状态:
* @return {type} 1.待提交审核 2.待审核报价单 3.待审核报价单 4.待提交报价单 5.完成(审核通过) 6.审核不通过
*/
export const confirmDemandQuoteInteriorState = [
{
label: '待提交审核', value: 1
},
{
label: '待审核报价单', value: 2
},
{
label: '待审核报价单', value: 3
},
{
label: '待提交报价单', value: 4
},
{
label: '完成(审核通过)', value: 5
},
{
label: '审核不通过', value: 6
}
]
\ No newline at end of file
......@@ -139,7 +139,7 @@ const List: React.FC<listParams> = (props) => {
align: 'left'
},
{
title: '报价截时间',
title: '报价截时间',
key: 'quotationAsTime',
dataIndex: 'quotationAsTime',
align: 'center',
......@@ -195,69 +195,6 @@ const List: React.FC<listParams> = (props) => {
onClick={() => history.push(`/memberCenter/tranactionAbility/enquiryOffer/toSubmit/detail?id=${record.id}`)}
>提交</Button>}
</>
// <>
// {
// (props.type === 1 || props.type === 2) ? (
// <>
// {/* 待审核一级 */}
// {props.type === 1 && (
// <Button
// type="link"
// onClick={() =>
// // history.push(`/memberCenter/tranactionAbility/enquiryOffer/viewEnquiryDetail?page_type=${props.type}&id=${record.id}`)
// history.push(`/memberCenter/tranactionAbility/enquiryOffer/enquiryOne/detail?id=${record.id}`)
// }
// >
// 审核
// </Button>
// )}
// {/* 待审核二级 */}
// {props.type === 2 && (
// <Button
// type="link"
// onClick={() =>
// // history.push(`/memberCenter/tranactionAbility/enquiryOffer/viewEnquiryDetail?page_type=${props.type}&id=${record.id}`)
// history.push(`/memberCenter/tranactionAbility/enquiryOffer/enquiryTwo/detail?id=${record.id}`)
// }
// >
// 审核
// </Button>
// )}
// </>
// ) : (
// <>
// {/* 待提交 */}
// {
// (props.type === 3 && record.externalState === 1) && (
// <Button
// type="link"
// onClick={() =>
// history.push(`/memberCenter/tranactionAbility/enquiryOffer/toSubmit/detail?id=${record.id}`)
// }
// >
// 提交
// </Button>
// )
// }
// {
// (record.externalState === 1 && record.interiorState === 1) && (
// <>
// <Popconfirm title="确定要删除吗?" okText="是" cancelText="否" onConfirm={() => handleDelete([record.id])}>
// <Button type='link'>
// 删除
// </Button>
// </Popconfirm>
// <Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}>
// <Button type='link'>提交</Button>
// </Popconfirm>
// </>
// )
// }
// </>
// )
// }
// </>
)
}
},
......
......@@ -5,7 +5,7 @@
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-24 11:25:03
*/
import React, { Component, useState, useRef, useEffect, useImperativeHandle } from 'react';
import React, { Component, useState, useRef, useEffect, useImperativeHandle, ReactNode } from 'react';
import { Modal, Button, Space, Form, Radio, AutoComplete, Badge, Tabs, Input, Select, Checkbox, message } from 'antd'
import { PublicApi } from '@/services/api'
import ModalTable from '@/components/ModalTable'
......@@ -88,9 +88,9 @@ let data = [
const columns: ColumnType<any>[] = [
{
title: 'ID',
dataIndex: 'commodityId',
dataIndex: 'id',
align: 'center',
key: 'commodityId',
key: 'id',
},
{
title: '商品名称',
......
......@@ -32,7 +32,7 @@ export const commonEnquieryOfferSchema: ISchema = {
},
"x-component-props":{
placeholder:'报价单搜索'
placeholder:'报价单'
}
}
}
......@@ -65,20 +65,20 @@ export const commonEnquieryOfferSchema: ISchema = {
},
"x-component-props":{
placeholder:'询价单'
placeholder:'需求单号'
}
},
details:{
type:'string',
"x-component-props":{
placeholder:'报价摘要'
placeholder:'报价摘要'
}
},
demandMembers:{
type:'string',
"x-component-props":{
placeholder:'询价会员'
placeholder:'需求会员'
}
},
// category:{
......@@ -102,7 +102,6 @@ export const commonEnquieryOfferSchema: ISchema = {
// },
voucherTime:{
type:'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
},
......
......@@ -579,7 +579,7 @@ const Detail: React.FC<{}> = () => {
setdataInfo(data)//总
//地区
setinitialValues(data)
getOrderProductAll(data.requisitionFormId) //查询规格 赋值弹窗单位和采购数量
getOrderProductAll(id) //查询规格 赋值弹窗单位和采购数量
tabForm.resetFields()
}
})
......
......@@ -74,7 +74,7 @@ const List:React.FC<{}> = () => {
render:(text:any, record:any) => <EyePreview type="button" url={`/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/demand/preview?id=${record.id}`}>{text}</EyePreview>
},
{
title:'报价摘要',
title:'报价摘要',
key:'quotationSummary',
dataIndex:'quotationSummary',
align:'left'
......
......@@ -157,7 +157,7 @@ const List: React.FC<listParams> = (props) => {
align: 'left'
},
{
title: '需求会员',
title: '报价会员',
key: 'demandMembers',
dataIndex: 'demandMembers',
align: 'left'
......
......@@ -133,7 +133,7 @@ const List:React.FC<listParams> = (props) => {
align:'left'
},
{
title:'需求会员',
title:'报价会员',
key:'demandMembers',
dataIndex:'demandMembers',
align:'left'
......
import { ISchema} from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import {TimeList} from '../../common/statusList'
import {TimeList, confirmDemandQuoteExternalState, confirmDemandQuoteInteriorState} from '../../common/statusList'
import TranactionRoute from 'config/routes/tranactionRoute'
/**
......@@ -32,7 +32,7 @@ export const commonEnquieryOfferSchema: ISchema = {
},
"x-component-props":{
placeholder:'报价单搜索'
placeholder:'报价单'
}
}
}
......@@ -65,14 +65,14 @@ export const commonEnquieryOfferSchema: ISchema = {
},
"x-component-props":{
placeholder:'询价单'
placeholder:'需求单号'
}
},
details:{
type:'string',
"x-component-props":{
placeholder:'报价摘要'
placeholder:'报价摘要'
}
},
demandMembers:{
......@@ -102,7 +102,6 @@ export const commonEnquieryOfferSchema: ISchema = {
// },
voucherTime:{
type:'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
},
......@@ -242,7 +241,7 @@ export const enquieryOfferSearchSchema: ISchema = {
},
"x-component-props":{
placeholder:'搜索',
placeholder:'报价单号',
align: 'flex-left',
}
}
......@@ -274,13 +273,13 @@ export const enquieryOfferSearchSchema: ISchema = {
requisitionFormNo:{
type:'string',
"x-component-props":{
placeholder:'对应需求单号'
placeholder:'需求单号'
}
},
quotationSummary:{
type:'string',
"x-component-props":{
placeholder:'摘要'
placeholder:'报价单摘要'
}
},
demandMembers:{
......@@ -289,33 +288,27 @@ export const enquieryOfferSearchSchema: ISchema = {
placeholder:'报价会员'
}
},
// category:{
// type:'string',
// 'x-component': 'CustomInputSearch',
// 'x-component-props': {
// placeholder: '商品品类',
// showSearch: true,
// showArrow: true,
// defaultActiveFirstOption: false,
// filterOption: false,
// notFoundContent: null,
// style: { width: '174px', lineHeight: '32px' },
// searchValue: null,
// dataoption: []
// }
// // "x-component-props":{
// // placeholder:'请选择品类'
// // },
// // enum:[]
// },
voucherTime:{
type:'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
},
enum: TimeList
},
externalState:{
type:'string',
"x-component-props":{
placeholder:'外部状态'
},
enum: confirmDemandQuoteExternalState
},
interiorState:{
type:'string',
"x-component-props":{
placeholder:'内部状态'
},
enum: confirmDemandQuoteInteriorState
},
}
},
sumbit:{
......
......@@ -5,15 +5,16 @@
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-11 16:51:28
*/
import React, { Component, useState, useEffect, Fragment } from 'react';
import { Modal, Button, Form, Radio, AutoComplete, Tabs, Input, Select, Checkbox, message } from 'antd'
import React, { Component, useState, useEffect, Fragment, ReactNode } from 'react';
import { Modal, Button, Form, Radio, AutoComplete, Tabs, Input, Select, Checkbox, message, Tooltip } from 'antd'
import { PublicApi } from '@/services/api'
import { QuestionCircleOutlined } from '@ant-design/icons';
const { TabPane } = Tabs
const { Option } = Select
const { TextArea } = Input
export interface Params {
sourceData: Array<any>[],
sourceData: any,
id?: any,
mode: number,
type?: number | string,
......@@ -41,7 +42,6 @@ const layout = {
* @return {type}
*/
const comfirmDialog: React.FC<Params> = (props) => {
console.log(props.sourceData)
const [form] = Form.useForm()
const [placeOfOriginList, setplaceOfOriginList] = useState([])//产地
const handleCancel = () => {
......@@ -49,23 +49,20 @@ const comfirmDialog: React.FC<Params> = (props) => {
const handletOk = async () => {
try {
const value = await form.validateFields();
console.log(value, '添加商品')
if(props.view) {
props.onCancel()
const judgment = props.sourceData[0].attributeList;
if(judgment.length > 0) {
if(props.view) {
props.onCancel()
} else {
props.onOK(value)
}
} else {
props.onOK(value)
message.error('商品不在上述所列商品品类之内,请您联系客服!')
}
} catch(err) {
message.error('有必填项没填写请检查!')
}
// if(props.type){
// value.type = props.type
// }
// console.log('列表',value)
}
useEffect(() => {
......@@ -166,6 +163,21 @@ const comfirmDialog: React.FC<Params> = (props) => {
}
}, [props.view])
const handleTabClick = (key:any) => {
console.log(key.split('-'), '点击的key')
}
const TabPaneTitle = (item:any) => {
let component: ReactNode = null;
if(item.attributeList.length === 0) {
component = <Tooltip trigger='click' placement='right' title="如果您需要的商品不在上述所列商品品类之内,请您联系客服!">
<span style={{marginRight: '5px'}}>{item.name}</span><QuestionCircleOutlined />
</Tooltip>
}else {
component = <span>{item.name}</span>
}
return component;
}
return (
<>
......@@ -191,6 +203,7 @@ const comfirmDialog: React.FC<Params> = (props) => {
<Tabs defaultActiveKey='tab1'
tabPosition="left"
onTabClick={handleTabClick}
>
<Tabs.TabPane tab='基本信息' key="tab-1">
<Form.Item
......@@ -225,7 +238,7 @@ const comfirmDialog: React.FC<Params> = (props) => {
{
props.sourceData.length > 0 && props.sourceData.map((attributeItem: any) => {
return (
<TabPane tab={attributeItem.name} key={attributeItem.id}>
<TabPane tab={TabPaneTitle(attributeItem)} key={attributeItem.id}>
{
renderTabPanchildren(attributeItem)
}
......
......@@ -44,7 +44,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
category: v.customerCategoryName,
brand: v.brandName,
unit: v.unitName,
purchaseQuantity: 1
purchaseCount: 1
})
setgoodsList(arr)
......@@ -176,7 +176,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
dataIndex: 'unit',
}, {
title: '采购数量',
dataIndex: 'purchaseQuantity',
dataIndex: 'purchaseCount',
render: (text: any, record: any) => (
<Form.Item name={record.productId} noStyle initialValue={record.purchaseQuantity}>
<InputNumber
......
......@@ -214,7 +214,7 @@ const AddEnquiryOrder: React.FC<{}> = () => {
actions={formActions}
onSubmit={values => search(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'quotationNo', FORM_FILTER_PATH)
useStateFilterSearchLinkageEffect($, actions, 'inquiryListNo', FORM_FILTER_PATH)
}}
expressionScope={{ controllerBtns }}
schema={commonEnquieryOfferSchema}
......
......@@ -35,6 +35,9 @@ const Details: React.FC<parmas> = (props) => {
const { id, page_type, view, action } = props;
console.log(action)
const [headerWrapperData, setheaderWrapperData] = useState<Array<any>>([]);
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
// steps 切换
const [detailData, setDetailData] = useState<any>({
externalStateStep: {
......@@ -102,32 +105,32 @@ const Details: React.FC<parmas> = (props) => {
dataIndex: 'productName',
}, {
title: '品类',
key: 'inquiryListNo',
dataIndex: 'inquiryListNo',
key: 'category',
dataIndex: 'category',
}, {
title: '品牌',
key: 'brand',
dataIndex: 'brand',
}, {
title: '单位',
key: 'nuit',
dataIndex: 'nuit',
key: 'unit',
dataIndex: 'unit',
}, {
title: '采购数量',
key: 'purchaseQuantity',
dataIndex: 'purchaseQuantity',
key: 'purchaseCount',
dataIndex: 'purchaseCount',
}]
// 条件交易&其他报价说明
const infoTem = {
base: {
title: '交易条件',
leftElem: [
{ title: '交付日期', key: '', value: data.deliveryTime },
{ title: '交付日期', key: '', value: format(data.deliveryTime)},
{ title: '交付地址', key: '', value: data.fullAddress },
{ title: '物流要求', key: '', value: data.logistics }
],
centerElem: [
{ title: '报价截止日期', key: '', value: data.quotationAsTime },
{ title: '报价截止日期', key: '', value: format(data.quotationAsTime) },
{ title: '报价要求', key: '', value: data.offer },
{ title: '包装要求', key: '', value: data.packRequire },
],
......@@ -164,9 +167,7 @@ const Details: React.FC<parmas> = (props) => {
})
})
}, [])
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
// 外部流转记录&内部流转记录
const flowRecord = {
external: [{
......
......@@ -37,19 +37,19 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
dataIndex: 'productName',
}, {
title: '品类',
dataIndex: 'inquiryListNo',
dataIndex: 'category',
}, {
title: '品牌',
dataIndex: 'brand',
}, {
title: '单位',
dataIndex: 'nuit',
dataIndex: 'unit',
}, {
title: '采购数量',
dataIndex: 'purchaseQuantity',
dataIndex: 'purchaseCount',
}, {
title: '报价单价',
dataIndex: 'pric',
dataIndex: 'price',
}, {
title: '金额',
dataIndex: 'money',
......
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