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

修改需求报价审核的bug

parent ebc0a408
......@@ -24,7 +24,7 @@ const comfirmDialog: React.FC<Params> = (props) => {
}
const handletOk = (values: any) => {
let value = { ...values }
value.id = props.id
value.id = Number(props.id)
console.log('value',value)
if(props.type == 1){
PublicApi.postOrderRequisitionFormAudit(value).then(res => {
......
......@@ -326,25 +326,25 @@ const DetailsInfo: React.FC<dataInfoType> = (props) => {
const init = () => {
PublicApi.getOrderQuotationDetails({ id: id }).then(res => {
let {data} = res
// if(pagetype == 2){
// if(data.interiorState === 3){//一级的审核通过变为2级的待审核
// data.interiorState = 2
// }
// }
if(pagetype == 2){
if(data.interiorState === 3){//一级的审核通过变为2级的待审核
data.interiorState = 2
}
}
setdataInfo(data)
getOrderProductAll(data.requisitionFormId)
// interiorStateList = [...data.interiorRequisitionFormStateResponses]
// if(pagetype == 1 || pagetype == 2){
// if(data.interiorState === 2){
// setIsextraOption(true)
// }
// }else if(pagetype == 3){
// if(data.externalState == 1){
// setIsextraOption(true)
// }
// }
if(pagetype == 1 || pagetype == 2){
if(data.interiorState === 2){
setIsextraOption(true)
}
}else if(pagetype == 3){
if(data.externalState == 1){
setIsextraOption(true)
}
}
// PublicApi.getLogisticsSelectListShipperAddress().then(res => {
// res.data.forEach(item => {
......
......@@ -563,69 +563,88 @@ const Detail: React.FC<{}> = () => {
* @param {type}
* @return {type}
*/
if (id) {
PublicApi.getOrderQuotationDetails({ id: id }).then(res => {
const pathname = history.location.pathname
if (pathname === "/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList/add" && id) {
PublicApi.getOrderQuotationRequisitionFormDetails({ id: id }).then(res => {
if (res.code === 1000) {
let data = res.data
console.log(data, '数据展示')
let areaCodeList = []
setdataInfo(data)//总
//地区
setinitialValues(data)
tabForm.resetFields()
setinitialValues({
quotationSummary: data,
})
getOrderProductAll(data.requisitionFormId) //查询规格 赋值弹窗单位和采购数量
tabForm.resetFields()
}
})
} else {
if (id) {
PublicApi.getOrderQuotationDetails({ id: id }).then(res => {
if (res.code === 1000) {
let data = res.data
let areaCodeList = []
setdataInfo(data)//总
//地区
setinitialValues(data)
tabForm.resetFields()
getOrderProductAll(data.requisitionFormId) //查询规格 赋值弹窗单位和采购数量
}
})
//商品列表 为动态列渲染做
// PublicApi.getOrderRequisitionFormProductAll({ id: id }).then(res => {
// if (res.code === 1000) {
// let { data } = res
// //商品
// let source = []
// let otherColumnkey = []//动态列的展示
// data.forEach((v)=> {
// let obj:any = {}
// obj.model = v.model
// obj.id = v.id
// obj.brand = v.brand
// obj.purchaseNuit = v.purchaseNuit
// obj.purchaseQuantity = v.purchaseQuantity
// if(v.productAttributeJson){
// JSON.parse(v.productAttributeJson).forEach(child => {
// Object.keys(child).forEach(key => {
// //获取列头
// otherColumnkey.push({
// title: key,
// dataIndex: key,
// key: key,
// align:'center'
// })
// // console.log('key',key,child,child[key])
// obj[key] = child[key]
// })
// });
// }
// source.push(obj)
// })
// console.log([...source])
// setotherList([...otherColumnkey])//生成列
// setproductSource([...source])
// }
// })
}
}
if(id) {
PublicApi.getOrderQuotationParticulars({ id: id }).then(res => {
if (res.code === 1000) {
let { data } = res.data
setproductSource([...data])
}
})
//商品列表 为动态列渲染做
// PublicApi.getOrderRequisitionFormProductAll({ id: id }).then(res => {
// if (res.code === 1000) {
// let { data } = res
// //商品
// let source = []
// let otherColumnkey = []//动态列的展示
// data.forEach((v)=> {
// let obj:any = {}
// obj.model = v.model
// obj.id = v.id
// obj.brand = v.brand
// obj.purchaseNuit = v.purchaseNuit
// obj.purchaseQuantity = v.purchaseQuantity
// if(v.productAttributeJson){
// JSON.parse(v.productAttributeJson).forEach(child => {
// Object.keys(child).forEach(key => {
// //获取列头
// otherColumnkey.push({
// title: key,
// dataIndex: key,
// key: key,
// align:'center'
// })
// // console.log('key',key,child,child[key])
// obj[key] = child[key]
// })
// });
// }
// source.push(obj)
// })
// console.log([...source])
// setotherList([...otherColumnkey])//生成列
// setproductSource([...source])
// }
// })
}
}, [])
const formTime = (text) => {
......
......@@ -487,8 +487,24 @@ const Detail: React.FC<{}> = () => {
dataIndex: 'purchaseQuantity',
key: 'purchaseQuantity',
align: 'center'
},
{
title: '操作',
dataIndex: 'option',
key: 'option',
align: 'center',
render:(text: any, records: any, index:number) => {
return(
<Button type='link' onClick={() => handleDelete(records,index)}>删除</Button>
)
}
}
]
const handleDelete = (value:any, index:number) => {
const data = [...productSource];
data.splice(index, 1)
setproductSource(data);
}
const formSearch: ISchema = {
type: 'object',
properties: {
......
......@@ -55,13 +55,19 @@ const List:React.FC<{}> = () => {
const format = (text) => {
return <>{moment(text).format("YYYY-MM-DD HH:mm:ss")}</>
}
const handleToDetail= (id) => {
// history.push(`/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail?page_type=${4}&id=${id}`)
history.push(`/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail?id=${id}`)
}
const columns : ColumnType<any>[] = [
{
title:'需求单号',
key:'requisitionFormNo',
dataIndex:'requisitionFormNo',
align:'center'
align:'center',
render: (text: any,records: any) => <EyePreview type="button" handleClick={() => {
handleToDetail(records.id)
}}>{text}</EyePreview>
},
{
title:'需求摘要',
......
......@@ -30,6 +30,7 @@ const AddQuotes: React.FC<{}> = () => {
})
}
useEffect(() => {
console.log(history.location)
if (id) {
handleGetDetails();
setCount('3');
......
......@@ -66,8 +66,8 @@ const TradingConditions: React.FC<queryProps> = (props) => {
packRequire: editData.packRequire,
otherRequire: editData.otherRequire,
offer: editData.offer,
quotationAsTime: moment(editData.quotationAsTime),
deliveryTime: moment(editData.deliveryTime),
quotationAsTime: moment(editData.quotationAsTime).format("x"),
deliveryTime: moment(editData.deliveryTime).format("x"),
fullAddressId: editData.fullAddressId,
})
}
......
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