Commit 52e890ab authored by XieZhiXiong's avatar XieZhiXiong
parents b67e6c03 ebc0a408
export default {
'/api': {
'target': 'http://10.0.0.25:8100/',
'target': 'http://10.0.0.10:8100/',
'changeOrigin': true,
'pathRewrite': { '^/api': '' },
}
......
......@@ -27,14 +27,14 @@ export default [
name: 'addEnquiryOrder',
component: '@/pages/transaction/goodsOffer/addEnquiryOrder'
},
// 新建价单
// 新建价单
{
path: '/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/add',
name: 'add',
hideInMenu: true,
component: '@/pages/transaction/goodsOffer/addEnquiryOrder/add'
},
// 编辑价单
// 编辑价单
{
path: '/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/edit',
name: 'edit',
......
......@@ -94,40 +94,49 @@ export const filterInteriorStateList = [
/**
* @description: 商品询价外部状态筛选
* @param {type}
* @return {type} 内
* @return {type} 内 1.提交询价单 2.提交报价单 3.确认报价单 4.报价通过 5.报价不通过
*/
export const filterExternalState = [
{
text: '待提交', value: 1
text: '提交询价单', value: 1
},
{
text: '提交询价单', value: 2
},
{
text: '待确认', value: 2
text: '确认询价单', value: 3
},
{
text: '接受报价', value: 3
text: '询价通过', value: 4
},
{
text: '不接受报价', value: 4
text: '询价不通过', value: 4
}
]
/**
* @description: 商品询价内部状态筛选
* @param {type}
* @return {type} 内
* @return {type} 内 1.新增询价单 2.审核询价单 3.审核询价单 4.提交询价单 5.完成 6.审核不通过
*/
export const filterInternalState = [
{
text: '待提交审核', value: 1
text: '新增询价单', value: 1
},
{
text: '审核询价单', value: 2
},
{
text: '待审核', value: 2
text: '审核询价单', value: 3
},
{
text: '审核通过', value: 3
text: '提交询价单', value: 4
},
{
text: '审核不通过', value: 4
text: '完成', value: 5
},
{
text: '审核不通过', value: 6
}
]
......
......@@ -131,13 +131,15 @@ export const enquiryOfferConfirmSearchInteriorState = (text:any) => {
/**
* @description: 内部状态查询
* @param {type}
* @return {type}
* @return {type} 1.新增询价单 2.审核询价单 3.审核询价单 4.提交询价单 5.完成 6.审核不通过
*/
export const quoteOrderInternalState = (text:any) => {
let component: ReactNode = null;
text === 1 ? component = <Badge status='default' text="待提交审核" />:
text === 2 ? component = <Badge status='warning' text="待审核" />:
text === 3 ? component = <Badge status='success' text="审核通过" />:
text === 1 ? component = <Badge status='default' text="新增询价单" />:
text === 2 ? component = <Badge status='warning' text="审核询价单" />:
text === 3 ? component = <Badge status='warning' text="审核询价单" />:
text === 4 ? component = <Badge status='processing' text="提交询价单" />:
text === 5 ? component = <Badge status='success' text="完成" />:
component = <Badge status='error' text="审核不通过" />
return component;
}
......@@ -145,12 +147,14 @@ export const quoteOrderInternalState = (text:any) => {
/**
* @description: 确认询价报价-报价单查询-外部状态查询
* @param {type}
* @return {type}
* @return {type} 1.提交询价单 2.提交报价单 3.确认报价单 4.报价通过 5.报价不通过
*/
export const inquiryQuoteOuterState = (text:any) => {
let component: ReactNode = null;
text === 1 ? component = <Tag color="processing">待确认</Tag>:
text === 2 ? component = <Tag color="success">接受报价</Tag>:
component = <Tag color="error">不接受报价</Tag>
text === 1 ? component = <Tag color="default">提交询价单</Tag>:
text === 2 ? component = <Tag color="default">提交报价单</Tag>:
text === 1 ? component = <Tag color="processing">确认报价单</Tag>:
text === 2 ? component = <Tag color="success">报价通过</Tag>:
component = <Tag color="error">报价不通过</Tag>
return component;
}
\ No newline at end of file
......@@ -45,9 +45,13 @@ const comfirmDialog: React.FC<Params> = (props) => {
}
const handletOk = async () => {
try {
const v = await form.validateFields();
console.log(v, 1008611)
props.onOK(v)
const value = await form.validateFields();
for(let key in value) {
if(key !== 'model' && key !== 'brand' && key !== 'purchaseNuit' && key !== 'purchaseQuantity') {
value[key] = value[key].join('/');
}
}
props.onOK(value)
} catch(err) {
message.error('有必填项没填写请检查!')
}
......@@ -66,7 +70,7 @@ const comfirmDialog: React.FC<Params> = (props) => {
}
}, [])
const onChange = (e, attrItem) => {
console.log(e,attrItem, 10086)
console.log(e.join('/'),attrItem, 10086)
}
const renderTabPanchildren = (item: any) => {
......@@ -236,7 +240,7 @@ const comfirmDialog: React.FC<Params> = (props) => {
message: '此项为必填项'
}]}
>
<Input placeholder='' />
<Input type='number' placeholder='' />
</Form.Item>
</Tabs.TabPane>
......
......@@ -623,7 +623,7 @@ const Detail: React.FC<{}> = () => {
}
//品类
if (data.productCategory) {
setcustomerCategoryId([data.productCategory.key])
setcustomerCategoryId([data.productCategory.ids])
initCreatePro(data.productCategory.key, false)//生产弹窗
}
......@@ -799,33 +799,27 @@ const Detail: React.FC<{}> = () => {
} else {
if (values.customerCategoryId && values.customerCategoryId.length > 0) {
values['productCategory'] = {}
const categoryArray: any[] = [];
seletCategoryNameList.forEach(item => {
categoryArray.push({
id: item.id,
key: item.id,
level: '',
name: item.title,
type: ''
})
values.productCategory.id = values.customerCategoryId[0]
values.productCategory.key = values.customerCategoryId[0]
let NameList = seletCategoryNameList.map((v) => {
return v.title
})
values.productCategorys = categoryArray;
delete values.customerCategoryId
values.productCategory.name = NameList.join('-')
values.productCategory.ids = values.customerCategoryId;
delete values.customerCategoryId;
}
}
} else {
if (values.customerCategoryId && values.customerCategoryId.length > 0) {
values['productCategory'] = {}
const categoryArray: any[] = [];
seletCategoryNameList.forEach(item => {
categoryArray.push({
id: Number(item.id),
key: item.id,
name: item.title,
})
values.productCategory.id = values.customerCategoryId[values.customerCategoryId.length - 1]
values.productCategory.key = values.customerCategoryId[values.customerCategoryId.length - 1]
let NameList = seletCategoryNameList.map((v) => {
return v.title
})
values.productCategorys = categoryArray;
delete values.customerCategoryId
values.productCategory.name = NameList.join('-');
values.productCategory.ids = values.customerCategoryId;
delete values.customerCategoryId;
}
}
if (values.deliveryTime) {
......@@ -959,10 +953,6 @@ const Detail: React.FC<{}> = () => {
})
}
// 获得key
for (let k in item) {
console.log(k, k)
}
list.push(item)
console.log(list, '嘿嘿嘿1000')
......@@ -1184,7 +1174,7 @@ const Detail: React.FC<{}> = () => {
</TabPane>
<TabPane tab="添加商品" key='2'>
<Button style={{ marginBottom: 16, marginTop: 24 }} block icon={<PlusOutlined />} onClick={() => handleOptionBtn(1)} type='dashed'>添加商品</Button>
<Table rowKey={"title"} dataSource={productSource} columns={equiryColumns} pagination={pagination} />
<Table rowKey={(record, index) => `table-row-key-${index}`} dataSource={productSource} columns={equiryColumns} pagination={pagination} />
</TabPane>
<TabPane tab="交易条件" key='3'>
<Row>
......
......@@ -104,7 +104,6 @@ const AddQuotes: React.FC<{}> = () => {
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
title={id ? '编辑询价单' : '新建询价单'}
extra={
<Button type="primary" onClick={onSumbit}> 保存</Button>
}
......
......@@ -31,6 +31,7 @@ const BasicInfo: React.FC<queryProps> = (props) => {
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'memberId', type: 'radio' });
const handleOkAddMember = () => {
setVisibleChannelMember(false)
console.log(memberRowCtl.selectRow)
setmemberList(memberRowCtl.selectRow);
getMemberList(memberRowCtl.selectRow); // 回传给父级
}
......
......@@ -30,14 +30,14 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
// 会员添加弹窗控制
const [visibleChannelMember, setVisibleChannelMember] = useState(false);
const [goodsList, setgoodsList] = useState([]);
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'commodityId' });
const [memberRowSelection, memberRowCtl] = useRowSelectionTable({ customKey: 'id' });
const handleOkAddMember = () => {
setVisibleChannelMember(false);
const arr: any[] = []
memberRowCtl.selectRow.forEach((v, i) => {
arr.push({
productId: v.commodityId,
productId: v.id,
productName: v.name,
inquiryListNo: v.customerCategoryName,
brand: v.brandName,
......@@ -248,7 +248,7 @@ const EnquiryGoods: React.FC<queryProps> = (props) => {
}
}
tableProps={{
rowKey: 'commodityId'
rowKey: 'id'
}}
{...restProps}
/>
......
......@@ -92,7 +92,7 @@ const AddEnquiryOrder: React.FC<{}> = () => {
return (
<>
<Button type='link' disabled={record.interiorState !== 1} onClick={() => { setId(record.id); setvisible(true)}}>提交审核</Button>
<Button type="link" disabled={record.interiorState !== 4 && record.externalState !== 1 }><Link to={`/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/edit?id=${record.id}`}>编辑</Link></Button>
<Button type="link" disabled={record.interiorState !== 1 && record.interiorState !== 6 }><Link to={`/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder/edit?id=${record.id}`}>编辑</Link></Button>
<Popconfirm
title="确定要删除吗?"
okText="是"
......
......@@ -97,7 +97,7 @@ const ReviewList: React.FC<parmas> = (props) => {
title: '操作',
key: 'options',
dataIndex: 'options',
render: (text: any, record: any) => <Button disabled={record.interiorState === 1 || record.interiorState === 3} type='link' onClick={()=>{setId(record.id);setvisible(true);}}>审核</Button>
render: (text: any, record: any) => <Button disabled={record.interiorState === 1 && record.interiorState === 3} type='link' onClick={()=>{setId(record.id);setvisible(true);}}>审核</Button>
},
]
const format = (text) => {
......
......@@ -91,7 +91,6 @@ const AddQuotes: React.FC<{}> = () => {
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
title={id ? '编辑报价单' : '新建报价单'}
extra={
<Button type="primary" onClick={onSumbit}> 保存</Button>
}
......
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