Commit 6823f2bf authored by LeeJiancong's avatar LeeJiancong

'修改物流部分bug'

parent c3e407f1
......@@ -3,7 +3,7 @@
* @Date: 2020-07-31 19:56:22
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-17 11:12:24
* @LastEditTime: 2020-09-17 11:20:29
*/
const TranactionRoute = {
......@@ -160,7 +160,12 @@ const TranactionRoute = {
name:'enquiryTwo',
component: '@/pages/transaction/enquiryOffer/enquiryTwo'
},
//待提交报价单
{
path:'/memberCenter/tranactionAbility/enquiryOffer/toSubmit',
name:'toSubmit',
component: '@/pages/transaction/enquiryOffer/toSubmit'
}
]
},
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-09-17 11:01:06
* @LastEditTime: 2020-09-17 11:20:55
*/
export default {
......@@ -155,6 +155,7 @@ export default {
'menu.tranactionAbility.enquiryOffer.viewEnquiryDetail': '报价单详情',
'menu.tranactionAbility.enquiryOffer.enquiryOne': '待审核报价单(一级)',
'menu.tranactionAbility.enquiryOffer.enquiryTwo': '待审核报价单(二级)',
'menu.tranactionAbility.enquiryOffer.toSubmit': '待提交报价单',
......
......@@ -94,6 +94,7 @@ const company: React.FC<{}> = () => {
const [menuForm] = Form.useForm();
const [headerTitle, setHeaderTitle] = useState('新建物流公司')
const [Code, setCode] = useState('')
const [loading,setLoading] = useState<boolean>(false)
const [roleList, setroleList] = useState([])
const [codeDisabled, setCodeDisabled] = useState(false)
const [companyType, setCompanyType] = useState<number>(null)
......@@ -132,15 +133,19 @@ const company: React.FC<{}> = () => {
menuForm.validateFields().then((values: any) => {
if (id) {
values.id = id
setLoading(true)
PublicApi.postLogisticsCompanyUpdate(values).then(res => {
if (res.code === 1000) {
menuForm.resetFields()
setLoading(false)
history.goBack()
}
})
} else {
setLoading(true)
PublicApi.postLogisticsCompanyAdd(values).then(res => {
if (res.code === 1000) {
setLoading(false)
menuForm.resetFields()
history.goBack()
}
......@@ -327,9 +332,9 @@ const company: React.FC<{}> = () => {
<Row>
<Col span={6}></Col>
<Col span={18}>
<Button onClick={handleSubmitAllSetting} type="primary" style={{ marginTop: 32, marginBottom: 16, marginRight: 24 }}>
<Button loading={loading} onClick={handleSubmitAllSetting} type="primary" style={{ marginTop: 32, marginBottom: 16, marginRight: 24 }}>
保存
</Button>
</Button>
<Button onClick={handleCancel} style={{ marginTop: 32, marginBottom: 16 }}>
取消
</Button>
......
/*
* @Date: 2020-07-13 15:01:40
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-26 14:15:33
* @LastEditTime: 2020-09-17 17:17:12
*/
import React, { ReactNode, useRef } from 'react'
......@@ -77,9 +77,9 @@ const Company: React.FC<{}> = () => {
},
{
title: '属性名称',
title: '物流公司名称',
dataIndex: 'name',
align: 'center',
align: 'left',
key: 'name',
render: (text: any, record: any) => (
<EyePreview url={`/memberCenter/logisticsAbility/logistics/addCompany?id=${record.id}&preview=1`}>{text}</EyePreview>
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-15 10:31:55
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-25 17:24:36
* @LastEditTime: 2020-09-17 17:41:05
*/
import React, { Component, useState, useEffect } from 'react';
import ReactDOM from 'react-dom'
......@@ -63,6 +63,7 @@ for (let i = 10; i < 36; i++) {
const diaLogForm: React.FC<ListProps> = (props) => {
const type: string = history.location.query.page_type
const [areaCode, setAreaCode] = useState<number>(null)
const [loading, setloading] = useState<boolean>(false)
const [Options, setOptions] = useState([])
const [state, setState] = useState({ editable: true })
const [provinceName,setProvinceName] = useState('')
......@@ -100,27 +101,35 @@ const diaLogForm: React.FC<ListProps> = (props) => {
value.districtName = districtName
if (type == 1) {
if (id == 0) {
setloading(true)
PublicApi.postLogisticsShipperAddressAdd(value).then(res => {
if (res.code == 1000) {
setloading(false)
}
})
} else {
value.id = id
setloading(true)
PublicApi.postLogisticsShipperAddressUpdate(value).then(res => {
if (res.code == 1000) {
setloading(false)
}
})
}
} else {
if (id == 0) {
setloading(true)
PublicApi.postLogisticsReceiverAddressAdd(value).then(res => {
if (res.code == 1000) {
setloading(false)
}
})
} else {
value.id = id
setloading(true)
PublicApi.postLogisticsReceiverAddressUpdate(value).then(res => {
if (res.code == 1000) {
setloading(false)
}
})
}
......@@ -460,7 +469,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
</FormMegaLayout>
<FormButtonGroup offset={4}>
<Submit> 保存</Submit>
<Submit showLoading loading={loading}> 保存</Submit>
<Popconfirm
title="未保存,是否确定执行这个操作?"
onConfirm={confirm}
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-15 10:31:55
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-26 14:33:06
* @LastEditTime: 2020-09-17 17:22:21
*/
import React, { Component, useState, useEffect } from 'react';
import ReactDOM from 'react-dom'
......@@ -315,7 +315,10 @@ const diaLogForm: React.FC<ListProps> = (props) => {
name="explain"
x-component="TextArea"
x-component-props={{
placeholder: ''
placeholder: '最长60个字符,30个汉字'
}}
x-rules={{
max:30
}}
/>
</FormMegaLayout>
......
......@@ -3,7 +3,7 @@
* @Date: 2020-08-24 11:39:11
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-17 11:05:24
* @LastEditTime: 2020-09-17 13:58:22
*/
/**
* @description: 组件描述: 一级 二级 待提交报价单
......@@ -67,57 +67,63 @@ const List:React.FC<listParams> = (props) => {
}
const fetchData = async (params: any) => {
if(props.type === 1){//一级
const res = await PublicApi.getOrderRequisitionFormAuditList(params);
const res = await PublicApi.getOrderQuotationToAuditList(params);
return res.data
}else if(props.type === 2){//二级
const res = await PublicApi.getOrderRequisitionFormAuditTwoList(params);
const res = await PublicApi.getOrderQuotationToAuditTwoList(params);
return res.data
}
else if(props.type === 3){//待提交需求单
const res = await PublicApi.getOrderRequisitionFormSubmitList(params);
const res = await PublicApi.getOrderQuotationReviewedoList(params);
return res.data
}
}
/**
* @description:
* @param {type} 可以根据props.type处理
* @param {type} type: 1 需求发布 2报价 可以根据props.type处理
* @return {type}
*/
const handleToDetail= (id) => {
history.push(`/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail?page_type=${props.type}&id=${id}`)
const handleToDetail= (type,id) => {
if(type === 1){
history.push(`/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail?page_type=${4}&id=${id}`)
}else{
history.push(`/memberCenter/tranactionAbility/enquiryOffer/viewEnquiryDetail?page_type=${props.type}&id=${id}`)
}
}
const columns : ColumnType<any>[] = [
{
title:'报价单号',
key:'quotationNo',
dataIndex:'quotationNo',
align:'center',
render: (text: any,records: any) => <EyePreview type="button" handleClick={() => {
handleToDetail(2,records.id)
}}>{text}</EyePreview>
},
{
title:'需求单号',
key:'requisitionFormNo',
dataIndex:'requisitionFormNo',
align:'center',
render: (text: any,records: any) => <EyePreview type="button" handleClick={() => {
handleToDetail(records.id)
handleToDetail(1,records.id)
}}>{text}</EyePreview>
},
{
title:'需求摘要',
key:'details',
dataIndex:'details',
title:'报价单摘要',
key:'quotationSummary',
dataIndex:'quotationSummary',
align:'left'
},
{
title:'品类',
key:'category',
dataIndex:'category',
title:'需求会员',
key:'demandMembers',
dataIndex:'demandMembers',
align:'left'
},
{
title:'交付日期',
key:'deliveryTime',
dataIndex:'deliveryTime',
align:'center',
render:(text:any)=> format(text)
},
{
title:'报价截至时间',
key:'quotationAsTime',
dataIndex:'quotationAsTime',
......@@ -126,8 +132,8 @@ const List:React.FC<listParams> = (props) => {
},
{
title:'单据时间',
key:'voucherTime',
dataIndex:'voucherTime',
key:'documentsTime',
dataIndex:'documentsTime',
align:'center',
render:(text:any)=> format(text)
},
......@@ -168,7 +174,7 @@ const List:React.FC<listParams> = (props) => {
{
(props.type === 1 || props.type === 2) ?
<Button type="link" onClick={() =>
history.push(`/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail?page_type=${props.type}&id=${record.id}`)}>
history.push(`/memberCenter/tranactionAbility/enquiryOffer/viewEnquiryDetail?page_type=${props.type}&id=${record.id}`)}>
审核
</Button>
:
......@@ -176,7 +182,7 @@ const List:React.FC<listParams> = (props) => {
{
(props.type === 3 && record.externalState === 1) &&
<Button type="link" onClick={() =>
history.push(`/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail?page_type=${props.type}&id=${record.id}`)}>
history.push(`/memberCenter/tranactionAbility/enquiryOffer/viewEnquiryDetail?page_type=${props.type}&id=${record.id}`)}>
提交</Button>
}
{
......@@ -226,15 +232,15 @@ const List:React.FC<listParams> = (props) => {
return
}
if(props.type === 1){//一级
PublicApi.postOrderRequisitionFormAuditAll({ ids: ids }).then(res => {
PublicApi.postOrderQuotationDocumentsBulkReview({ ids: ids }).then(res => {
ref.current.reload()
})
}else if(props.type === 2){//二级
PublicApi.postOrderRequisitionFormAuditAllTwo({ ids: ids }).then(res => {
PublicApi.postOrderQuotationDocumentsBulkReviewTwo({ ids: ids }).then(res => {
ref.current.reload()
})
}else if(props.type === 3){//待提交审核
PublicApi.postOrderSubmitRequisitionFormAll({ ids: ids }).then(res => {
PublicApi.postOrderQuotationBulkQuotationSubmission({ ids: ids }).then(res => {
ref.current.reload()
})
}
......@@ -276,10 +282,6 @@ const List:React.FC<listParams> = (props) => {
const controllerBtns = <Row>
<Col span={24}>
<Space direction="horizontal" size={16}>
{
(props.type !== 1 && props.type !== 2 && props.type !== 3)&&
<Button type="primary" onClick={() => history.push('/memberCenter/tranactionAbility/enquirySubmit/addEnquiry')} icon={<PlusOutlined/>}>新建</Button>
}
<Button onClick={() => handleSubmitAll(selectedRowKeys)}>
{ (props.type == 1 || props.type == 2) ? '批量提交审核' :'批量审核通过'}
</Button>
......
This diff is collapsed.
import React, { Component } from 'react'
import OrderList from "../components/index"
const List = () => {
return (
<OrderList des='待提交报价单' type={3}/>
)
}
export default List
\ No newline at end of file
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