Commit 728672c8 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents d96e6859 2c3d28fa
......@@ -199,6 +199,9 @@ const SettlementList: React.FC = () => {
case 6:
window.open(`/memberCenter/balance/businessRequestFundsCollaboration/search/preview?id=${record.dataId}&no=${record.orderNo}`)
break;
case 7:
window.open(`/memberCenter/balance/businessReconciliation/search/preview?id=${record.dataId}&no=${record.orderNo}`)
break;
default:
break;
}
......
......@@ -196,7 +196,7 @@ const Add = () => {
const _i = _dataSource.findIndex((item) => item.productId === record.productId);
let _item = { ..._dataSource[_i] };
_item.currentReconciliationQuantity = Number(_val);
_item.currentMoney = _val * Number(record.price);
_item.currentMoney = _val * Number(record.billType === 3 ? (-record.price) : record.price);
_dataSource[_i] = _item;
setTabelSource(_dataSource);
}
......
......@@ -598,14 +598,14 @@ const Add = () => {
}
}, {
title: '已付款',
key: 'paidAmount',
dataIndex: 'paidAmount',
key: 'paid',
dataIndex: 'paid',
width: 150,
render: (text: any) => ${priceFormat(text)}`
}, {
title: '已请款待付款',
key: 'appliedNotPayAmount',
dataIndex: 'appliedNotPayAmount',
key: 'appliedUnpaid',
dataIndex: 'appliedUnpaid',
width: 150,
render: (text: any) => ${priceFormat(text)}`
}, {
......
......@@ -12,7 +12,7 @@ import PeripheralLayout from '@/pages/transaction/purchaseAbility/components/det
import Card from '@/pages/transaction/purchaseAbility/components/card';
import CommonLayout from '@/pages/transaction/purchaseAbility/components/detail/components/bidCommonLayout';
import { getSettleAccountsBusinessApplyAmountDetailApplyAmount, getSettleAccountsBusinessApplyAmountApplyAmountRowList } from '@/services/SettleV2Api'
import { getSettleAccountsBusinessApplyAmountDetailApplyAmount, getSettleAccountsBusinessApplyAmountApplyAmountRowList, postSettleAccountsBusinessApplyAmountFindCanApplyAmountRos } from '@/services/SettleV2Api'
import WriteOffDrawer from '../../components/WriteOffDrawer'
......@@ -104,9 +104,28 @@ const SearchDetail = () => {
})
}
const _openWriteOff = (record) => {
setWriteOffRecord(record)
setWriteOffVisible(true)
const _openWriteOff = (record: any, type: number) => {
if (type === 1) {
setWriteOffRecord(record)
setWriteOffVisible(true)
} else {
const _params = {
billId: record.billId,
sourceContractId: record.sourceContractId,
notQueryDetailId: record.id,
taxRate: record.taxRate,
current: 1,
pageSize: 99999
};
postSettleAccountsBusinessApplyAmountFindCanApplyAmountRos(_params).then((res) => {
if (res.code === 1000) {
const _record = { ...record };
_record.writeOffRecords = res.data.data;
setWriteOffRecord(_record)
setWriteOffVisible(true)
}
})
}
}
useEffect(() => {
......@@ -193,13 +212,13 @@ const SearchDetail = () => {
title: '核销金额',
key: 'writeOffAmount',
dataIndex: 'writeOffAmount',
render: (text: any, record: any) => text > 0 && <Button type='link' onClick={() => { _openWriteOff(record) }}>¥ ${priceFormat(text)}</Button>
render: (text: any, record: any) => text > 0 && <Button type='link' onClick={() => { _openWriteOff(record, 1) }}>¥ {priceFormat(text)}</Button>
},
{
title: '可核销金额',
key: 'canWriteOffAmount',
dataIndex: 'canWriteOffAmount',
render: (text: any, record: any) => text > 0 && <Button type='link' onClick={() => { _openWriteOff(record) }}>¥ ${priceFormat(text)}</Button>
render: (text: any, record: any) => text > 0 && <Button type='link' onClick={() => { _openWriteOff(record, 2) }}>¥ {priceFormat(text)}</Button>
},
];
......
......@@ -12,7 +12,7 @@ import PeripheralLayout from '@/pages/transaction/purchaseAbility/components/det
import Card from '@/pages/transaction/purchaseAbility/components/card';
import CommonLayout from '@/pages/transaction/purchaseAbility/components/detail/components/bidCommonLayout';
import { getSettleAccountsBusinessApplyAmountDetailApplyAmount, getSettleAccountsBusinessApplyAmountApplyAmountRowList } from '@/services/SettleV2Api'
import { getSettleAccountsBusinessApplyAmountDetailApplyAmount, getSettleAccountsBusinessApplyAmountApplyAmountRowList, postSettleAccountsBusinessApplyAmountFindCanApplyAmountRos } from '@/services/SettleV2Api'
import WriteOffDrawer from '../../components/WriteOffDrawer'
......@@ -104,9 +104,28 @@ const SearchDetail = () => {
})
}
const _openWriteOff = (record) => {
setWriteOffRecord(record)
setWriteOffVisible(true)
const _openWriteOff = (record: any, type: number) => {
if (type === 1) {
setWriteOffRecord(record)
setWriteOffVisible(true)
} else {
const _params = {
billId: record.billId,
sourceContractId: record.sourceContractId,
notQueryDetailId: record.id,
taxRate: record.taxRate,
current: 1,
pageSize: 99999
};
postSettleAccountsBusinessApplyAmountFindCanApplyAmountRos(_params).then((res) => {
if (res.code === 1000) {
const _record = { ...record };
_record.writeOffRecords = res.data.data;
setWriteOffRecord(_record)
setWriteOffVisible(true)
}
})
}
}
useEffect(() => {
......@@ -118,7 +137,7 @@ const SearchDetail = () => {
window.open(`/memberCenter/tranactionAbility/saleOrder/orderList/preview?id=${record.billId}`)
} else if (record.billType === 2) {
window.open(`/memberCenter/contract/coordination/coordinationList/details?contractId=${record.billId}`)
}else {
} else {
window.open(`/memberCenter/afterService/returnManage/returnQuery/detail?id=${record.billId}`)
}
}
......@@ -128,7 +147,7 @@ const SearchDetail = () => {
title: '单据号',
key: 'billNo',
dataIndex: 'billNo',
render: (text: any, record: any) => <Button type='link' onClick={() => {_handleOpen(record)}}>{text}</Button>
render: (text: any, record: any) => <Button type='link' onClick={() => { _handleOpen(record) }}>{text}</Button>
},
{
title: '单据摘要',
......@@ -193,13 +212,13 @@ const SearchDetail = () => {
title: '核销金额',
key: 'writeOffAmount',
dataIndex: 'writeOffAmount',
render: (text: any, record: any) => text > 0 && <Button type='link' onClick={() => { _openWriteOff(record) }}>¥ ${priceFormat(text)}</Button>
render: (text: any, record: any) => text > 0 && <Button type='link' onClick={() => { _openWriteOff(record, 1) }}>¥ {priceFormat(text)}</Button>
},
{
title: '可核销金额',
key: 'canWriteOffAmount',
dataIndex: 'canWriteOffAmount',
render: (text: any, record: any) => text > 0 && <Button type='link' onClick={() => { _openWriteOff(record) }}>¥ ${priceFormat(text)}</Button>
render: (text: any, record: any) => text > 0 && <Button type='link' onClick={() => { _openWriteOff(record, 2) }}>¥ {priceFormat(text)}</Button>
},
];
......
import React, { useMemo } from 'react';
import { useSelector } from '@linkseeks/design-react';
import { changeProps } from '@linkseeks/design-core';
import ComponentModule from './ComponentModule';
import styles from './index.less';
import attemptImg from '@/assets/activity/attempt.png';
import bargainImg from '@/assets/activity/bargain.png';
import buySwapImg from '@/assets/activity/buySwap.png';
import combinationImg from '@/assets/activity/combination.png';
import fullMoneyDiscountImg from '@/assets/activity/fullMoneyDiscount.png';
import fullMoneySubImg from '@/assets/activity/fullMoneySub.png';
import fullQuantityDiscountImg from '@/assets/activity/fullQuantityDiscount.png';
import fullQuantitySubImg from '@/assets/activity/fullQuantitySub.png';
import fullSwapImg from '@/assets/activity/fullSwap.png';
import giveProductImg from '@/assets/activity/giveProduct.png';
import groupPurchaseImg from '@/assets/activity/groupPurchase.png';
import morePieceImg from '@/assets/activity/morePiece.png';
import plummetImg from '@/assets/activity/plummet.png';
import preSaleImg from '@/assets/activity/preSale.png';
import secKillImg from '@/assets/activity/secKill.png';
import setMealImg from '@/assets/activity/setMeal.png';
import discountImg from '@/assets/activity/discount.png';
import specialOfferImg from '@/assets/activity/specialOffer.png';
import giveCouponImg from '@/assets/activity/giveCoupon.png';
const ACTIVITYS = ["specialOffer", "plummet", "discount", "fullQuantitySub", "fullQuantityDiscount", "fullMoneySub", "fullMoneyDiscount", "giveProduct", "giveCoupon", "morePiece", "combination", "groupPurchase", "bargain", "secKill", "fullSwap", "buySwap", "preSale", "setMeal", "attempt"];
type ModuleType = {
title: string,
visible: boolean,
dataIndex: string,
treeKey: string,
}
const ModuleContainer = () => {
const { pageConfig } = useSelector(['pageConfig']);
const modules = useMemo(() => {
const config = pageConfig;
const res: ModuleType[] = [];
Object.keys(config).forEach((_item) => {
const { props = {} } = config[_item];
const dataIndex = config[_item]?.otherProps?.type;
if (ACTIVITYS.includes(dataIndex)) {
const visible = typeof props.visible === 'undefined' ? true : (props as any)?.visible;
res.push({
title: (props as any)?.title || _item,
visible: visible,
dataIndex: dataIndex,
treeKey: _item,
});
}
});
return res;
}, [pageConfig]);
const onModuleVisibleChange = (checked: boolean, option) => {
const props = pageConfig[option.treeKey];
changeProps({
treeKey: option.treeKey,
props: {
...props,
visible: checked
}
});
};
const imgMap = {
"attempt": attemptImg,
"bargain": bargainImg,
"buySwap": buySwapImg,
"combination": combinationImg,
"fullMoneyDiscount": fullMoneyDiscountImg,
"fullMoneySub": fullMoneySubImg,
"fullQuantityDiscount": fullQuantityDiscountImg,
"fullQuantitySub": fullQuantitySubImg,
"fullSwap": fullSwapImg,
"giveProduct": giveProductImg,
"groupPurchase": groupPurchaseImg,
"morePiece": morePieceImg,
"plummet": plummetImg,
"preSale": preSaleImg,
"secKill": secKillImg,
"setMeal": setMealImg,
"discount": discountImg,
"specialOffer": specialOfferImg,
"giveCoupon": giveCouponImg,
};
return (
<div className={styles.module}>
{
modules.map((_item) => {
const { visible, title, dataIndex } = _item;
return (
<div className={styles.moduleItem} key={dataIndex}>
<ComponentModule image={imgMap[dataIndex]} treeKey={_item.treeKey} title={title} visible={visible} onChange={onModuleVisibleChange} dataIndex={dataIndex} />
</div>
);
})
}
</div>
);
};
export default ModuleContainer;
......@@ -344,7 +344,11 @@ const WebComponentModule: React.FC<Iprops> = (props: Iprops) => {
})
return;
}
const newKey = Object.keys(pageConfig).length + 1
const childNodes = [...pageConfig[0].childNodes];
childNodes.sort((a, b) => +a - +b);
const newKey = childNodes[childNodes.length - 1] + 1
addChildComponent({
newKey: `${newKey}`,
......
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