Commit 663b1874 authored by XieZhiXiong's avatar XieZhiXiong
parents bb4936a8 ec79aa54
...@@ -337,9 +337,15 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -337,9 +337,15 @@ const AddLogistics: React.FC<{}> = () => {
/** 选择物流服务伤 */ /** 选择物流服务伤 */
const handleSelectCompany = (option: any) => { const handleSelectCompany = (option: any) => {
const obj = { ...query } const obj = { ...query }
if (option) {
obj.companyId = option.value obj.companyId = option.value
obj.companyName = option.children obj.companyName = option.children
setmemberInfo({ memberId: option.memberid, roleId: option.roleid }) setmemberInfo({ memberId: option.memberid, roleId: option.roleid })
}else {
obj.companyId = ''
obj.companyName = ''
}
setQuery(obj) setQuery(obj)
} }
...@@ -382,21 +388,21 @@ const AddLogistics: React.FC<{}> = () => { ...@@ -382,21 +388,21 @@ const AddLogistics: React.FC<{}> = () => {
}) })
break; break;
case 4: case 4:
PublicApi.getAsReplaceGoodsPageReturnCommodityByLogistics({ ...params, dataId: query.relevanceOrderId }).then(res => { PublicApi.getAsReplaceGoodsPageReturnCommodityByLogistics({ ...params, dataId: query.shipmentOrderId ? query.shipmentOrderId : query.relevanceOrderId }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
resolve(res.data) resolve(res.data)
} }
}) })
break; break;
case 5: case 5:
PublicApi.getAsReplaceGoodsPageReplaceCommodityByLogistics({ ...params, dataId: query.relevanceOrderId }).then(res => { PublicApi.getAsReplaceGoodsPageReplaceCommodityByLogistics({ ...params, dataId: query.shipmentOrderId ? query.shipmentOrderId : query.relevanceOrderId }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
resolve(res.data) resolve(res.data)
} }
}) })
break; break;
case 6: case 6:
PublicApi.getAsReturnGoodsPageCommodityByLogistics({ ...params, dataId: query.relevanceOrderId }).then(res => { PublicApi.getAsReturnGoodsPageCommodityByLogistics({ ...params, dataId: query.shipmentOrderId ? query.shipmentOrderId : query.relevanceOrderId }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
resolve(res.data) resolve(res.data)
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { history } from 'umi'; import { history } from 'umi';
import { Button, Card, Tabs, Space, Input, InputNumber } from 'antd'; import { Button, Card, Tabs, Space, Input, InputNumber, message } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import PayWayRadio from './components/payWayRadio'; import PayWayRadio from './components/payWayRadio';
...@@ -59,7 +59,7 @@ const PayWaySetTemplate: React.FC<{}> = () => { ...@@ -59,7 +59,7 @@ const PayWaySetTemplate: React.FC<{}> = () => {
console.log(value, type) console.log(value, type)
const data = [...payItem]; const data = [...payItem];
if (type === 2) { if (type === 2) {
data[idx].payParametersList.push(value) data[idx].payParametersList = [...data[idx].payParametersList, value]
} else { } else {
data[idx].payParametersAddListRequests = [...data[idx].payParametersAddListRequests, value] data[idx].payParametersAddListRequests = [...data[idx].payParametersAddListRequests, value]
} }
...@@ -96,14 +96,40 @@ const PayWaySetTemplate: React.FC<{}> = () => { ...@@ -96,14 +96,40 @@ const PayWaySetTemplate: React.FC<{}> = () => {
/**保存更新 */ /**保存更新 */
const onHnadleSubmit = () => { const onHnadleSubmit = () => {
let conditions = false;
let wayName = '';
payItem.forEach(item => {
if (item.id === 2 && item.isPitchOn === 1) {
if(item.payParametersAddListRequests.length > 0) {
conditions = true
} else {
conditions = false
wayName = item.way
return
}
} else if (item.id === 1 && item.isPitchOn === 1) {
if(item.payParametersAddListRequests.length > 0 && item.payParametersList.length > 0) {
conditions = true
} else {
conditions = false
wayName = item.way
return
}
} else {
conditions = true
}
})
if (conditions) {
PublicApi.postPayMemberQueryPlatformUpdate({ PublicApi.postPayMemberQueryPlatformUpdate({
platformPayWays: payItem platformPayWays: payItem
}).then(res => { }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
history.push('/memberCenter/payandSettle/paySetting/payParamsSetting') history.push('/memberCenter/payandSettle/paySetting/payParamsSetting')
// location.reload();
} }
}) })
} else {
message.error(`请新增${wayName}的支付参数配置`)
}
} }
/** */ /** */
......
...@@ -102,6 +102,10 @@ const Details: React.FC<parmas> = (props) => { ...@@ -102,6 +102,10 @@ const Details: React.FC<parmas> = (props) => {
// 模拟数据 // 模拟数据
const [data, setdata] = useState<any>({}); const [data, setdata] = useState<any>({});
// 询价商品 // 询价商品
const handleJump = (data:any) => {
console.log(data)
history.push(`/shop/commodity/detail?id=${data.productId}&shopId=${btoa(JSON.stringify({ roleId: data.memberRoleId, memberId: data.memberId }))}`)
}
const inquiryGoods: ColumnType<any>[] = [{ const inquiryGoods: ColumnType<any>[] = [{
title: 'ID', title: 'ID',
key: 'productId', key: 'productId',
...@@ -110,7 +114,7 @@ const Details: React.FC<parmas> = (props) => { ...@@ -110,7 +114,7 @@ const Details: React.FC<parmas> = (props) => {
title: '报价商品名称', title: '报价商品名称',
key: 'productName', key: 'productName',
dataIndex: 'productName', dataIndex: 'productName',
render: (text: any, record: any) => <EyePreview>{text}</EyePreview> render: (text: any, record: any) => <EyePreview type='button' handleClick={() => handleJump(record)}>{text}</EyePreview>
}, { }, {
title: '品类', title: '品类',
key: 'category', key: 'category',
......
...@@ -125,7 +125,7 @@ const AddQuotes: React.FC<parmas> = (props) => { ...@@ -125,7 +125,7 @@ const AddQuotes: React.FC<parmas> = (props) => {
} else { } else {
await PublicApi.postOrderInquiryListAdd(parmas).then(res => { await PublicApi.postOrderInquiryListAdd(parmas).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
history.goBack(); history.push('/memberCenter/tranactionAbility/goodsOffer/addEnquiryOrder');
} else { setloading(false); } } else { setloading(false); }
}) })
} }
......
...@@ -11,6 +11,7 @@ import moment from 'moment'; ...@@ -11,6 +11,7 @@ import moment from 'moment';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import GeneralExternalState from '@/pages/transaction/common/externalState'; import GeneralExternalState from '@/pages/transaction/common/externalState';
import GeneralInteriorState from '@/pages/transaction/common/interiorState'; import GeneralInteriorState from '@/pages/transaction/common/interiorState';
import EyePreview from '@/components/EyePreview';
const { TabPane } = Tabs; const { TabPane } = Tabs;
const { Step } = Steps; const { Step } = Steps;
...@@ -131,6 +132,10 @@ const Details: React.FC<parmas> = (props) => { ...@@ -131,6 +132,10 @@ const Details: React.FC<parmas> = (props) => {
} }
}) })
// 询价商品 // 询价商品
const handleJump = (data:any) => {
console.log(data)
history.push(`/shop/commodity/detail?id=${data.productId}&shopId=${btoa(JSON.stringify({ roleId: data.memberRoleId, memberId: data.memberId }))}`)
}
const inquiryGoods: ColumnType<any>[] = [{ const inquiryGoods: ColumnType<any>[] = [{
title: 'ID', title: 'ID',
key: 'productId', key: 'productId',
...@@ -139,6 +144,7 @@ const Details: React.FC<parmas> = (props) => { ...@@ -139,6 +144,7 @@ const Details: React.FC<parmas> = (props) => {
title: '报价商品名称', title: '报价商品名称',
key: 'productName', key: 'productName',
dataIndex: 'productName', dataIndex: 'productName',
render: (text: any, record: any) => <EyePreview type='button' handleClick={() => handleJump(record)}>{text}</EyePreview>
}, { }, {
title: '品类', title: '品类',
key: 'category', key: 'category',
......
...@@ -73,7 +73,7 @@ const PendingSubmit: React.FC<{}> = () => { ...@@ -73,7 +73,7 @@ const PendingSubmit: React.FC<{}> = () => {
dataIndex: 'options', dataIndex: 'options',
render: (text: any, record: any) => render: (text: any, record: any) =>
<Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}> <Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}>
<Button type='link'>提交价单</Button> <Button type='link'>提交价单</Button>
</Popconfirm> </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