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

解决需求报价新增bug

parent 43590d64
......@@ -287,3 +287,62 @@ export const searchFilterInteriorState = [
label: '审核不通过', value: 6
}
]
/***********************需求报价******************************* */
/**
* @description: 需求报价外部状态筛选
* @param {type} 外部状态:
* @return {type} 1.提交需求单 2.审核需求单 3.提交报价单 4.确认报价单 5.完成 6.审核不通过 7.取消报价单
*/
export const demandQuoteExternalState = [
{
label: '提交需求单', value: 1
},
{
label: '审核需求单', value: 2
},
{
label: '提交报价单', value: 3
},
{
label: '确认报价单', value: 4
},
{
label: '完成', value: 5
},
{
label: '审核不通过', value: 6
},
{
label: '取消报价单', value: 7
}
]
/**
* @description: 需求报价内部状态筛选
* @param {type} 内部状态:
* @return {type} 1.新增需求单 2.审核需求单一级 3.审核需求单二级 4.提交需求单 5.完成 6.审核不通过 7.取消报价单
*/
export const demandQuoteInteriorState = [
{
label: '新增需求单', value: 1
},
{
label: '审核需求单一级', value: 2
},
{
label: '审核需求单二级', value: 3
},
{
label: '提交需求单', value: 4
},
{
label: '完成', value: 5
},
{
label: '审核不通过', value: 6
},
{
label: '取消报价单', value: 7
}
]
\ No newline at end of file
......@@ -17,7 +17,7 @@ export interface InquiryModalTableProps extends ModalTableProps {
* @return {type}
*/
const fetchEqData = async (params: any) => {
const res = await PublicApi.getOrderQuotationRequisitionFormList(params);
const res = await PublicApi.getOrderQuotationRequisitionFormList({...params,externalState: 2});
return res.data
}
const formTime = (text) => {
......
......@@ -6,7 +6,7 @@
* @LastEditTime: 2020-09-24 11:25:03
*/
import React, { Component, useState, useRef, useEffect, useImperativeHandle } from 'react';
import { Modal, Button, Space, Form, Radio, AutoComplete, Badge, Tabs, Input, Select, Checkbox } from 'antd'
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'
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable'
......@@ -192,7 +192,12 @@ const comfirmDialog: React.FC<Params> = (props, { onRef }) => {
Curform.validateFields().then(v => {
props.onOK(v, commodityAttributedataSource)
props.productAttributeJson(commodityAttributedataSource)
setcommodityAttributedataSource({})
productRowCtl.setSelectRow([]);
productRowCtl.setSelectedRowKeys([])
Curform.resetFields()
}).catch(err => {
message.error('有必填选项没选择或填写,请检查!')
})
}
......@@ -262,6 +267,7 @@ const comfirmDialog: React.FC<Params> = (props, { onRef }) => {
<Modal
title={headerTitle}
width={800}
zIndex={999}
visible={props.dialogVisible}
onOk={() => handletOk()}
onCancel={() => props.onCancel()}
......
......@@ -100,6 +100,12 @@ const List:React.FC<{listParams}> = (props) => {
align:'left'
},
{
title:'需求会员',
key:'demandMembers',
dataIndex:'demandMembers',
align:'left'
},
{
title:'交付日期',
key:'deliveryTime',
dataIndex:'deliveryTime',
......
import { ISchema} from '@formily/antd'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import {TimeList} from '../../common/statusList'
import {TimeList, demandQuoteExternalState} from '../../common/statusList'
import TranactionRoute from 'config/routes/tranactionRoute'
/**
......@@ -143,7 +143,7 @@ export const enquierySearchSchema: ISchema = {
},
"x-component-props":{
placeholder:'搜索',
placeholder:'需求单号',
align: 'flex-left',
}
}
......@@ -172,34 +172,42 @@ export const enquierySearchSchema: ISchema = {
inline: true
},
properties:{
details: {
type:'string',
"x-component-props":{
placeholder:'需求摘要'
}
},
demandMembers:{
type:'string',
"x-component-props":{
placeholder:'询价会员'
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:[]
// },
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: []
}
},
externalState:{
type:'string',
"x-component-props":{
placeholder:'外部状态'
},
enum: demandQuoteExternalState
},
voucherTime:{
type:'string',
default: 0,
"x-component-props":{
placeholder:'请选择单据时间'
},
......
......@@ -398,10 +398,9 @@ const Detail: React.FC<{}> = () => {
* @return {type}
*/
const hanldeDeleteModel = (index) => {
let list = productSource.slice(1, index)
// let ol = otherList.slice(1,index)
// setotherList([...ol])
setproductSource([...list])
const list = [...productSource];
list.splice(index, 1);
setproductSource(list)
}
const equiryColumns: ColumnType<any>[] = [
......@@ -476,7 +475,15 @@ const Detail: React.FC<{}> = () => {
setdialogVisible(true)
setmode(1)
}}>编辑</Button>
<Button type="link" onClick={(index) => hanldeDeleteModel(index)}>删除</Button>
<Popconfirm
title="确定要删除吗?"
okText="是"
cancelText="否"
onConfirm={() => hanldeDeleteModel(index)}
>
<Button type="link">删除</Button>
</Popconfirm>
</>
},
]
......
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