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