Commit 69c448a9 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents c864738c cd961ec1
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-04-21 16:53:13
* @LastEditTime: 2021-08-26 16:31:22
*/
// import CommodityRoute from './commodityRoute' // 商品能力路由
// import MemberRoute from './memberRoute' // 会员能力路由
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-05 10:28:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-26 09:47:51
* @LastEditTime: 2021-08-26 18:16:30
* @Description: 地址选择 FormItem
*/
import React, { useState, useEffect, useMemo, useRef } from 'react';
......@@ -465,7 +465,6 @@ const AddressSelect: React.FC<IProps> = (props) => {
}, [list]);
if (!editable && value) {
console.log('list', list)
const current = list.find((item) => item.id === value);
const full = current ? `${current.name} ${current.fullAddress} ${current.phone}` : null;
const isStr = typeof value === 'string';
......
......@@ -390,32 +390,6 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
fullDate.push({
...product,
orderNo: product.orderNo, // 手动补全订单单号
payList:
product.payInfoList ?
product.payInfoList.map(item => {
const {
payPrice,
payTime,
payWay,
channel,
payCode,
ruleConfigurationId,
...rest
} = item;
return {
payAmount: payPrice,
payTime: payTime ? moment(payTime).format('YYYY-MM-DD HH:mm:ss') : null,
payWay,
channel,
payWayName: PAYWAY[payWay],
channelName: PAY_CHANNEL[channel],
transactionPayId: payCode,
payRuleId: ruleConfigurationId,
...rest,
}
}) :
[]
,
});
}
});
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 17:36:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-26 15:34:25
* @LastEditTime: 2021-08-26 19:54:01
* @Description: 查看退货数量与退款金额 抽屉
*/
import React, { useEffect, useState } from 'react';
......@@ -20,8 +20,6 @@ import schema from './schema';
import { createEffects } from './effects';
import Stamp from '../Stamp';
import SteamerTicket from './components/SteamerTicket';
import styles from './index.less';
import moment from 'moment';
const schemaAction = createAsyncFormActions();
const {
......@@ -222,7 +220,7 @@ const ReturnInfoDrawer: React.FC<ReturnInfoDrawerProps> = ({
payTime: item.payTime,
payRuleId: item.fundMode,
externalState: 3,
transactionPayId: '123', // 微信 或 其他第三方支付返回的 code,原路退款需要
transactionPayId: item.tradeNo, // 微信 或 其他第三方支付返回的 code,原路退款需要
}));
}
}
......
......@@ -427,29 +427,30 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
),
(
detailInfo
&& detailInfo.returnDeliveryGoodsList
&& detailInfo.returnDeliveryGoodsList.length > 0
? {
key: 'returnDeliveryGoodsList',
name: '退货发货信息',
}
: null
),
(
detailInfo
&& (
detailInfo.outerStatus === RETURN_OUTER_STATUS_TO_BE_REFUNDED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_UNCONFIRMED_REFUNDED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_NOT_RECEIVED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_UNCONFIRMED_FINISHED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_FINISHED
)
&& detailInfo.returnDeliveryGoodsList
&& detailInfo.returnDeliveryGoodsList.length > 0
? {
key: 'refundList',
name: '退款明细',
key: 'returnDeliveryGoodsList',
name: '退货发货信息',
}
: null
),
(
detailInfo
&& !isMateriel
&& (
detailInfo.outerStatus === RETURN_OUTER_STATUS_TO_BE_REFUNDED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_UNCONFIRMED_REFUNDED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_NOT_RECEIVED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_UNCONFIRMED_FINISHED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_FINISHED
)
? {
key: 'refundList',
name: '退款明细',
}
: null
),
{
key: 'workflowRecord',
name: '流转记录',
......
......@@ -690,7 +690,6 @@ const ReturnForm: React.FC<BillsFormProps> = ({
extraData: {
id: item.id,
returnReason: '',
payList: item.payList,
taskTypeKey: item.processKey,
remaining: item.quantity - (item.returnCount || 0), // 可退货数量
orderId: item.orderId,
......
......@@ -455,29 +455,30 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
),
(
detailInfo
&& detailInfo.returnDeliveryGoodsList
&& detailInfo.returnDeliveryGoodsList.length > 0
? {
key: 'returnDeliveryGoodsList',
name: '退货发货信息',
}
: null
),
(
detailInfo
&& (
detailInfo.outerStatus === RETURN_OUTER_STATUS_TO_BE_REFUNDED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_UNCONFIRMED_REFUNDED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_NOT_RECEIVED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_UNCONFIRMED_FINISHED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_FINISHED
)
&& detailInfo.returnDeliveryGoodsList
&& detailInfo.returnDeliveryGoodsList.length > 0
? {
key: 'refundList',
name: '退款明细',
key: 'returnDeliveryGoodsList',
name: '退货发货信息',
}
: null
),
(
detailInfo
&& !isMateriel
&& (
detailInfo.outerStatus === RETURN_OUTER_STATUS_TO_BE_REFUNDED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_UNCONFIRMED_REFUNDED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_NOT_RECEIVED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_UNCONFIRMED_FINISHED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_FINISHED
)
? {
key: 'refundList',
name: '退款明细',
}
: null
),
{
key: 'workflowRecord',
name: '流转记录',
......@@ -658,7 +659,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
{/* 退款明细信息 */}
{
detailInfo
&& isMateriel
&& !isMateriel
&& (
detailInfo.outerStatus === RETURN_OUTER_STATUS_TO_BE_REFUNDED ||
detailInfo.outerStatus === RETURN_OUTER_STATUS_UNCONFIRMED_REFUNDED ||
......
......@@ -143,16 +143,16 @@ export const upperCommodityColumns: ColumnType<any>[] = [
title: '商品名称',
dataIndex: 'name',
key: 'name',
width: 240,
width: 180,
ellipsis: true,
},
{
title: '商品品类',
title: '品类',
dataIndex: ['customerCategory', 'name'],
key: 'customerCategory.name',
},
{
title: '商品品牌',
title: '品牌',
dataIndex: ['brand', 'name'],
key: 'brand.name',
},
......
......@@ -181,6 +181,7 @@
.gesture{
color: #00B37A;
cursor:pointer;
// margin-right: 10px;
}
.wrapper{
:global {
......
......@@ -260,14 +260,26 @@ const Details = (props: any) => {
title: '操作', dataIndex: 'type', align: 'left',
render: (text, record) => {
// 已付款大于0或已请款待付款大于0的才显示查看付款明细按钮。
return (
<div>
{
record.payAmount > 0 || record.unPayApplyAmount > 0 && <a onClick={() => getPayment(record)} className={style.gesture}>查看付款明细</a>
}
let node = null;
if (record.payAmount !== 0) {
node =
<div>
<a onClick={() => getPayment(record)} className={style.gesture}>查看付款明细</a>
<a onClick={() => onModal(record, false)} style={{ marginLeft: 10 }} className={style.gesture}>请款</a>
</div>
return node;
} else if (record.unPayApplyAmount > 0) {
node = <div>
<a onClick={() => getPayment(record)} className={style.gesture}>查看付款明细</a>
<a onClick={() => onModal(record, false)} style={{ marginLeft: 10 }} className={style.gesture}>请款</a>
</div>
)
return node;
} else {
node = <div>
<a onClick={() => onModal(record, false)} style={{ marginLeft: 10 }} className={style.gesture}>请款</a>
</div>
return node;
}
}
},
];
......
......@@ -75,7 +75,7 @@ const table = (props: any) => {
dataIndex: 'orderAmount', align: 'center',
render: (text, record) =>
<div>
<div>{record.orderType == 2 ? `-${text}` : text}</div>
<div>{record.orderType == 2 ? `${text}` : text}</div>
</div>
},
......
......@@ -25,6 +25,7 @@ const FormList = (props: any) => {
list.map((item: any, index: number) => {
item.rowId = index + 1
item.price = '';
item.materielId = item.id
})
console.log(list)
setData(list)
......@@ -35,7 +36,7 @@ const FormList = (props: any) => {
return new Promise(resolve => {
PublicApi.getProductGoodsGetGoodsList(params).then(res => {
if (res.code === 1000) {
console.log(res.data, 1231321)
console.log(res.data)
resolve(res.data)
}
})
......@@ -119,6 +120,7 @@ const FormList = (props: any) => {
if (res.code === 1000) {
let data = res.data.data.map((item, index) => {
return {
materielId: _filterArr(sourceType, item, ['', 'productId', 'id', '']),
code: _filter(sourceType, item, ['', 'number', 'code', 'number']),// 物料编号
name: _filter(sourceType, item, ['', 'name', 'name', 'name']),//物料名称
type: _filter(sourceType, item, ['', 'model', 'type', 'model']),//物料规格
......@@ -313,6 +315,7 @@ const FormList = (props: any) => {
dataList.map(item => {
list.push({
id: 0,
materielId: item.materielId,
materielNo: item.code,
materielName: item.name,
type: item.type,
......
......@@ -84,9 +84,9 @@ export const useOrderDetail = (options: OrderDetailHookProps) => {
if(type === 'p_readyPayOrder') {
reloadPayList(id)
}
if(data.payments.length > 0){
setCurrentPayInfoId(data.payments[0].paymentId)
}
// if(data.payments.length > 0){
// setCurrentPayInfoId(data.payments[0].paymentId)
// }
} else {
message.error(msg)
}
......
......@@ -211,9 +211,9 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
// 开始提交线下支付数据
if(current === 1) {
const payOrderUrls = formRef.current.urlList
const vouchers = formRef.current.urlList
const checkedId = checked.id
if (!payOrderUrls || payOrderUrls.length === 0 || payOrderUrls.includes('')) {
if (!vouchers || vouchers.length === 0 || vouchers.includes('')) {
message.error('请先上传凭证')
return;
}
......@@ -267,7 +267,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
}
const handleSubmitPay = async () => {
const payOrderUrls = formRef.current.urlList
const vouchers = formRef.current.urlList
// 当前选中的支付信息
let payInfoObj = data.payments.filter(item => item.paymentId === Number(currentPayInfoId))[0]
let params: any = {
......@@ -283,8 +283,7 @@ const OrderPayModal: React.FC<OrderPayModalProps> = (props) => {
}
params.payPassword = encryptedByAES(code)
} else if(current === 1) {
// params.payOrderUrls = payOrderUrls.join(',')
params.payOrderUrls = payOrderUrls
params.vouchers = vouchers
}
if(!settleAccountsError) {
......
......@@ -27,18 +27,14 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = () => {
useEffect(() => {
// 过滤支付信息 取第一个待支付或者未到账的id
if(data?.payments?.length) {
let payments = data.payments.filter(item => item.showPayment)
let payments = data.payments.sort((a, b) => a.batchNo - b.batchNo).filter(item => item.showPayment)
console.log(data.payments.sort((a, b) => a.batchNo - b.batchNo), payments, 'lo')
if(payments.length) {
ctl.setPayId(payments[0].paymentId)
}
}
}, [])
const onChange = (activeKey) => {
// ctl.setPayId(activeKey)
}
const TabHeader = ({dataSource}) => {
return <Row justify='space-between' style={{minWidth: 216}}>
<Col>
......@@ -58,35 +54,43 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = () => {
</Col>
<Col>
<StatusColors status={dataSource.outerStatus} text={dataSource.outerStatusName} type='payOut'/>
{ dataSource.externalState === PayOutWorkState.CONFIRM_ACCOUNT && dataSource.payChannel === 5 && dataSource.payWay === 2 &&
<p className={style.look} onClick={()=>setVisible(true)}>查看 &gt;</p>
}
{ dataSource.vouchers.length ? <p className={style.look} onClick={()=>setVisible(true)}>查看 &gt;</p> : null}
</Col>
</Row>
}
const urlsDatas = data.payments.filter(item => item['payChannel'] === 5 && item['payWay'] === 2).map(_item => _item['voucher']).filter(__item => __item.length)
// const canCtlData = data.payments.find(v => v.showView) || {} //@todo 需后端提供showView字段支持
const canCtlData = data.payments.find(v => v.vouchers.length) || {}
const urlsDatas = canCtlData.vouchers || []
return (
<>
<Row gutter={24} style={{marginTop: 24}}>
<Col span={processEnum === 24 ? 12 : 24}>
<MellowCard bordered={false} fullHeight>
<Tabs defaultActiveKey='1' onChange={onChange}>
{ data.payments && data.payments.map(v => <TabPane key={v.paymentId} tab={<TabHeader dataSource={v}/>}>
<Row>
<Col className={style.fontGray} span={4}>支付环节: </Col>
<Col>{v.payNode}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付方式: </Col>
<Col>{v.payTypeName}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付渠道: </Col>
<Col>{v.payChannelName}</Col>
</Row>
</TabPane>) }
<Tabs defaultActiveKey='1'>
{
data.payments.length
?
data.payments.map(v => <TabPane key={v.paymentId} tab={<TabHeader dataSource={v}/>}>
<Row>
<Col className={style.fontGray} span={4}>支付环节: </Col>
<Col>{v.payNode}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付方式: </Col>
<Col>{v.payTypeName}</Col>
</Row>
<Row>
<Col className={style.fontGray} span={4}>支付渠道: </Col>
<Col>{v.payChannelName}</Col>
</Row>
</TabPane>)
:
null
}
</Tabs>
</MellowCard>
</Col>
......
......@@ -66,13 +66,16 @@ const InquiryModalTable:React.FC<InquiryModalTableProps> = (props) => {
visible={visible}
confirm={handleConfirm}
cancel={() => setVisible(false)}
fetchTableData={async (params) => (await PublicApi.getTransactionNotarizeEnquiryProductQuotationList({...params, externalState: 4}, {useCache: true, ttl: 10 * 1000})).data}
fetchTableData={async (params) => (await PublicApi.getTransactionNotarizeEnquiryProductQuotationList({...params, externalState: 4, shopId: schemaAction.getFieldValue('shopId')})).data}
rowSelection={rowSelection}
modalType='inquiryByDefault'
searchName="quotationNo"
tableProps={{
rowKey: 'id'
}}
resetModal={{
destroyOnClose: true
}}
{...restProps}
/>
)
......
......@@ -38,15 +38,12 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
}
const getPayLists = (memberId, memberRoleId) => {
const shopId = ctx.getFieldValue('shopId')
const products = ctx.getFieldValue('products').map(item => ({ productId: item.commodityId, skuId: item.productId }))
if(shopId && products?.lenght)
PublicApi.postOrderBuyerCreateB2bPaymentFind({
memberId,
roleId: memberRoleId,
shopId: shopId,
shopId: ctx.getFieldValue('shopId'),
orderMode: ctx.getFieldValue('orderMode'),
products: products
products: orderProducts.map(item => ({ productId: item.commodityId, skuId: item.productId }))
}, { ctlType: 'none' }).then(res => {
const { code, data } = res
if (code === 1000) {
......
......@@ -25,12 +25,14 @@ const ReadyConfirmContract: React.FC = () => {
// }
}
}
console.log(currentPayInfoId)
}, [data, currentPayInfoId])
const renderPayPrice = () => {
if(data){
if(data.payments.length > 0){
let obj = data.payments.filter(item => item.paymentId === Number(currentPayInfoId))[0]
console.log(obj, 'obj')
if(obj)
return obj.payAmount
}
......
......@@ -18,7 +18,6 @@ import DataSet from "@antv/data-set";
const CircleChart = props => {
const { sumPrice = 100, alreadyPay = 10 } = props
const { DataView } = DataSet;
const dv = new DataView();
const userData = [
{ type: '总金额', value: sumPrice - alreadyPay },
......
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