Commit 761e7c9a authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

Merge branch 'v2-220318' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into v2-220318

parents 047c8a69 4f6cbcf8
...@@ -53,7 +53,7 @@ const Products: React.FC<{}> = () => { ...@@ -53,7 +53,7 @@ const Products: React.FC<{}> = () => {
const [isBatch, setIsBatch] = useState<boolean>(false) // 是否批量上下架操作 const [isBatch, setIsBatch] = useState<boolean>(false) // 是否批量上下架操作
const [upDownModal, setUpDownModal] = useState<boolean>(false) const [upDownModal, setUpDownModal] = useState<boolean>(false)
const [shopsOption, setShopsOption] = useState<GetProductCommodityGetShopResponse>([]) const [shopsOption, setShopsOption] = useState<GetProductCommodityGetShopResponse>([])
const [currentOptionId, setCurrentOptionId] = useState<number>() const [currentOptionRow, setCurrentOptionRow] = useState<any>()
const [isDisabledOKbtn, setIsDisabledOKbtn] = useState<boolean>(false) const [isDisabledOKbtn, setIsDisabledOKbtn] = useState<boolean>(false)
const [exportQrcodeModal, setExportQrcodeModal] = useState<boolean>(false) const [exportQrcodeModal, setExportQrcodeModal] = useState<boolean>(false)
const [exportVisible, setExportVisible] = useState<boolean>(false) const [exportVisible, setExportVisible] = useState<boolean>(false)
...@@ -216,8 +216,8 @@ const Products: React.FC<{}> = () => { ...@@ -216,8 +216,8 @@ const Products: React.FC<{}> = () => {
[intl.formatMessage({ id: 'commodity.products.operationHandler.2' })]: () => clickSubmitCheck(record), [intl.formatMessage({ id: 'commodity.products.operationHandler.2' })]: () => clickSubmitCheck(record),
[intl.formatMessage({ id: 'commodity.products.operationHandler.3' })]: () => clickModify(record.id), [intl.formatMessage({ id: 'commodity.products.operationHandler.3' })]: () => clickModify(record.id),
[intl.formatMessage({ id: 'commodity.products.operationHandler.4' })]: () => confirmDelete(record.id), [intl.formatMessage({ id: 'commodity.products.operationHandler.4' })]: () => confirmDelete(record.id),
[intl.formatMessage({ id: 'commodity.products.operationHandler.5' })]: () => clickUp(1, record.id), [intl.formatMessage({ id: 'commodity.products.operationHandler.5' })]: () => clickUp(1, record),
[intl.formatMessage({ id: 'commodity.products.operationHandler.6' })]: () => clickUp(0, record.id), [intl.formatMessage({ id: 'commodity.products.operationHandler.6' })]: () => clickUp(0, record),
[intl.formatMessage({ id: 'commodity.products.operationHandler.7' })]: () => previewUpper(record.upperCommodityId), [intl.formatMessage({ id: 'commodity.products.operationHandler.7' })]: () => previewUpper(record.upperCommodityId),
} }
...@@ -376,11 +376,11 @@ const Products: React.FC<{}> = () => { ...@@ -376,11 +376,11 @@ const Products: React.FC<{}> = () => {
console.log('取消删除') console.log('取消删除')
} }
const clickUp = (param: number, id: number) => { // param: 0 下架 1上架 id为null批量上架 const clickUp = (param: number, record: any) => { // param: 0 下架 1上架 record.id为null批量上架
setCurrentOptionId(id) setCurrentOptionRow(record)
const fn = id ? getProductCommodityGetShop : postProductCommodityGetShopBatch const fn = record?.id ? getProductCommodityGetShop : postProductCommodityGetShopBatch
// @ts-ignore // @ts-ignore
fn(id ? { id } : { idList: currentCtrlRef.current.selectedRowKeys }, { ctlType: 'none' }).then(({data}) => { fn(record?.id ? { id: record.id } : { idList: currentCtrlRef.current.selectedRowKeys }, { ctlType: 'none' }).then(({data}) => {
setShopsOption(data.sort((a, b) => a.shopId - b.shopId)) setShopsOption(data.sort((a, b) => a.shopId - b.shopId))
let initValue = {} let initValue = {}
data.forEach(item => { data.forEach(item => {
...@@ -403,7 +403,7 @@ const Products: React.FC<{}> = () => { ...@@ -403,7 +403,7 @@ const Products: React.FC<{}> = () => {
// 1. 判断是否有店铺 // 1. 判断是否有店铺
const hasShop = await judgeStop(checkShops) const hasShop = await judgeStop(checkShops)
if(hasShop) { if(hasShop) {
const params = isBatch ? currentCtrlRef.current.selectedRowKeys: [currentOptionId] const params = isBatch ? currentCtrlRef.current.selectedRowKeys: [currentOptionRow.id]
// 2. 判断是否库存 // 2. 判断是否库存
const hasStore = await judgeStore(params) const hasStore = await judgeStore(params)
if(hasStore) { if(hasStore) {
...@@ -465,7 +465,8 @@ const Products: React.FC<{}> = () => { ...@@ -465,7 +465,8 @@ const Products: React.FC<{}> = () => {
item.skuIdList.forEach(_item => { item.skuIdList.forEach(_item => {
products.push({ products.push({
productId: item.commodityId, productId: item.commodityId,
skuId: _item skuId: _item,
crossBorder: isBatch ? currentCtrlRef.current.selectRow.filter(i => i.id === item.commodityId)[0]['isCrossBorder'] : currentOptionRow['isCrossBorder']
}) })
}) })
}) })
...@@ -502,7 +503,7 @@ const Products: React.FC<{}> = () => { ...@@ -502,7 +503,7 @@ const Products: React.FC<{}> = () => {
const upShops = shopsOption.filter(item => values[item.shopId]) const upShops = shopsOption.filter(item => values[item.shopId])
setIsDisabledOKbtn(true) setIsDisabledOKbtn(true)
let params = { let params = {
id: currentOptionId, id: currentOptionRow?.id,
shopList: upShops shopList: upShops
} }
if (isUp) { if (isUp) {
......
...@@ -9,7 +9,7 @@ import { getIntl } from 'umi'; ...@@ -9,7 +9,7 @@ import { getIntl } from 'umi';
const intl = getIntl(); const intl = getIntl();
export interface Iprops extends IAntdSchemaFormProps { export interface Iprops extends IAntdSchemaFormProps {
/* 显示隐藏 */ /* 显示隐藏 */
contractId: any, contractId: Number,
} }
const DetailedList: React.FC<Iprops> = ({ const DetailedList: React.FC<Iprops> = ({
contractId contractId
...@@ -30,7 +30,7 @@ const DetailedList: React.FC<Iprops> = ({ ...@@ -30,7 +30,7 @@ const DetailedList: React.FC<Iprops> = ({
return ( return (
<div> <div>
<EyePreview <EyePreview
url={`/memberCenter/contract/funds/bill/details?applyId=${record.id}&type=pageDetailList`} url={`/memberCenter/balance/businessRequestFunds/search/preview?id=${record.id}&no=${record.applyNo}`}
> >
{text} {text}
</EyePreview> </EyePreview>
......
...@@ -7,12 +7,13 @@ import EyePreview from '@/components/EyePreview'; ...@@ -7,12 +7,13 @@ import EyePreview from '@/components/EyePreview';
import moment from 'moment'; import moment from 'moment';
import { getContractExecuteExecuteInfoPayDetailList } from '@/services/ContractV2Api' import { getContractExecuteExecuteInfoPayDetailList } from '@/services/ContractV2Api'
import { getIntl } from 'umi'; import { getIntl } from 'umi';
import { getSettleAccountsBusinessApplyAmountBuyerApplyAmountList } from '@/services/SettleV2Api';
const intl = getIntl(); const intl = getIntl();
export interface Iprops extends IAntdSchemaFormProps { export interface Iprops extends IAntdSchemaFormProps {
/* 显示隐藏 */ /* 显示隐藏 */
visible: any, visible: boolean,
item: any, item: any,
contractId: any, contractId: number,
setDrawerModal: Function setDrawerModal: Function
} }
const DrawerModal: React.FC<Iprops> = ({ const DrawerModal: React.FC<Iprops> = ({
...@@ -21,7 +22,6 @@ const DrawerModal: React.FC<Iprops> = ({ ...@@ -21,7 +22,6 @@ const DrawerModal: React.FC<Iprops> = ({
setDrawerModal, setDrawerModal,
contractId, contractId,
}) => { }) => {
console.log(item)
const ref = useRef({}); const ref = useRef({});
const [selectRow, setSelectRow] = useState<any[]>([]) // 抽屉选择的行数据 const [selectRow, setSelectRow] = useState<any[]>([]) // 抽屉选择的行数据
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([]) const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
...@@ -40,10 +40,10 @@ const DrawerModal: React.FC<Iprops> = ({ ...@@ -40,10 +40,10 @@ const DrawerModal: React.FC<Iprops> = ({
}, },
{ title: intl.formatMessage({id: 'contract.zhuangtai'}), dataIndex: 'statusName', align: 'left', }, { title: intl.formatMessage({id: 'contract.zhuangtai'}), dataIndex: 'statusName', align: 'left', },
{ {
title: intl.formatMessage({id: 'contract.qingkuanshijian'}), dataIndex: 'orderTime', align: 'left', title: intl.formatMessage({id: 'contract.qingkuanshijian'}), dataIndex: 'createTime', align: 'left',
render: (text: any, record: any) => ( // render: (text: any, record: any) => (
<div>{moment(Number(text)).format('YYYY-MM-DD')}</div> // <div>{moment(Number(text)).format('YYYY-MM-DD')}</div>
) // )
}, },
{ {
title: intl.formatMessage({id: 'contract.qingkuanjine'}), dataIndex: 'applyAmount', align: 'left', title: intl.formatMessage({id: 'contract.qingkuanjine'}), dataIndex: 'applyAmount', align: 'left',
...@@ -53,14 +53,14 @@ const DrawerModal: React.FC<Iprops> = ({ ...@@ -53,14 +53,14 @@ const DrawerModal: React.FC<Iprops> = ({
}, },
{ {
title: intl.formatMessage({id: 'contract.fukuanshijian'}), dataIndex: 'payTime', align: 'left', title: intl.formatMessage({id: 'contract.fukuanshijian'}), dataIndex: 'payTime', align: 'left',
render: (text: any, record: any) => ( // render: (text: any, record: any) => (
<div>{moment(Number(text)).format('YYYY-MM-DD')}</div> // <div>{moment(Number(text)).format('YYYY-MM-DD')}</div>
) // )
}, },
{ {
title: intl.formatMessage({id: 'contract.fukuanjine'}), dataIndex: 'payAmount', align: 'left', title: intl.formatMessage({id: 'contract.fukuanjine'}), dataIndex: 'payAmount', align: 'left',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<div>{intl.formatMessage({ id: 'common.money' })}{text ? text : 0}</div> <div>{intl.formatMessage({ id: 'common.money' })}{record.status === 3 ? record.applyAmount : text ? text :0}</div>
) )
}, },
] ]
...@@ -75,14 +75,16 @@ const DrawerModal: React.FC<Iprops> = ({ ...@@ -75,14 +75,16 @@ const DrawerModal: React.FC<Iprops> = ({
/* 请求查看付款明细 */ /* 请求查看付款明细 */
const fetchTableData = (params) => { const fetchTableData = (params) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getContractExecuteExecuteInfoPayDetailList({ // /settle/accounts/business/apply/amount/buyer/apply/amount/list
// getContractExecuteExecuteInfoPayDetailList
getSettleAccountsBusinessApplyAmountBuyerApplyAmountList({
...params, ...params,
executeId: item.id, executeId: item.id,
contractId, contractId,
}).then(res => { }).then(res => {
console.log(res,'res')
if (res.code === 1000) { if (res.code === 1000) {
console.log(res.data, '请求查看付款明细') resolve(res.data)
resolve(res)
} }
}).catch((err) => { }).catch((err) => {
resolve([]) resolve([])
......
...@@ -9,7 +9,7 @@ const Option = Select.Option; ...@@ -9,7 +9,7 @@ const Option = Select.Option;
const intl = getIntl(); const intl = getIntl();
export interface Iprops extends IAntdSchemaFormProps { export interface Iprops extends IAntdSchemaFormProps {
/* 显示隐藏 */ /* 显示隐藏 */
ModalVisible: any, ModalVisible: boolean,
payType: any, payType: any,
selectRowList: any, selectRowList: any,
contractId: any, contractId: any,
......
...@@ -16,20 +16,23 @@ import EyePreview from '@/components/EyePreview'; ...@@ -16,20 +16,23 @@ import EyePreview from '@/components/EyePreview';
import moment from 'moment'; import moment from 'moment';
import { getContractExecuteExecuteInfoPayDetailInfoPagePayDetail } from '@/services/ContractV2Api' import { getContractExecuteExecuteInfoPayDetailInfoPagePayDetail } from '@/services/ContractV2Api'
import { getIntl } from 'umi'; import { getIntl } from 'umi';
import { getSettleAccountsBusinessApplyAmountApplyAmountRowList, getSettleAccountsBusinessApplyAmountDetailApplyAmount } from '@/services/SettleV2Api';
const intl = getIntl(); const intl = getIntl();
export interface Iprops extends IAntdSchemaFormProps { export interface Iprops extends IAntdSchemaFormProps {
popupshow: any, popupshow: any,
basicData?: any, basicData?: any,
setDrawerModal: Function, setDrawerModal: Function,
applyId: any applyId: any,
applyNo: string,
} }
const { Text } = Typography; const { Text } = Typography;
const PopupDrawer: React.FC<Iprops> = ({ const PopupDrawer: React.FC<Iprops> = ({
popupshow, popupshow,
basicData, basicData,
setDrawerModal, setDrawerModal,
applyId applyId,
applyNo
}) => { }) => {
console.log(basicData, applyId) console.log(basicData, applyId)
const ref = useRef<any>({}); const ref = useRef<any>({});
...@@ -37,57 +40,57 @@ const PopupDrawer: React.FC<Iprops> = ({ ...@@ -37,57 +40,57 @@ const PopupDrawer: React.FC<Iprops> = ({
const [orderAmount, setorderAmount] = useState(0) // 订单金额 const [orderAmount, setorderAmount] = useState(0) // 订单金额
const columns: ColumnType<any>[] = [{ const columns: ColumnType<any>[] = [{
title: intl.formatMessage({ id: 'contract.danjuhaozhaiyao' }), title: intl.formatMessage({ id: 'contract.danjuhaozhaiyao' }),
dataIndex: 'orderNO', dataIndex: 'billNo',
align: 'left', align: 'left',
render: (text: any, record: any) => { render: (text: any, record: any) => {
return ( return (
<div> <div>
<EyePreview <EyePreview
url="button" url={record.billType === 1 ? `/memberCenter/tranactionAbility/saleOrder/orderList/preview?id=${record.billId}` : `/memberCenter/afterService/returnManage/returnQuery/detail?id=${record.billId}`}
> >
{text} {text}
</EyePreview> </EyePreview>
<p>{record.orderAbstract}</p> {/* <p>{record.}</p> */}
</div> </div>
); );
}, },
}, { }, {
title: intl.formatMessage({ id: 'contract.danjuleixing' }), title: intl.formatMessage({ id: 'contract.danjuleixing' }),
dataIndex: 'orderTypeName', dataIndex: 'billTypeName',
align: 'left', align: 'left',
}, { }, {
title: intl.formatMessage({ id: 'contract.danjushijian' }), title: intl.formatMessage({ id: 'contract.danjushijian' }),
dataIndex: 'orderTime', dataIndex: 'billTime',
align: 'left', align: 'left',
}, },
{ {
title: intl.formatMessage({ id: 'contract.danjuzhuangtai' }), title: intl.formatMessage({ id: 'contract.danjuzhuangtai' }),
dataIndex: 'payeeMemberName', dataIndex: 'billStatus',
align: 'left', align: 'left',
}, },
{ {
dataIndex: 'orderAmount', dataIndex: 'billRowAmount',
title: ( title: (
<Space direction='vertical'> <Space direction='vertical'>
<Text>{intl.formatMessage({ id: 'contract.danjujine' })}</Text> <Text>{intl.formatMessage({ id: 'contract.danjujine' })}</Text>
<Text>{intl.formatMessage({ id: 'contract.heji' })}: {intl.formatMessage({ id: 'common.money' })}{orderAmount}</Text> {/* <Text>{intl.formatMessage({ id: 'contract.heji' })}: {intl.formatMessage({ id: 'common.money' })}{orderAmount}</Text> */}
</Space> </Space>
), ),
}, },
{ {
title: intl.formatMessage({ id: 'contract.hanshuishuil' }), title: intl.formatMessage({ id: 'contract.hanshuishuil' }),
dataIndex: 'isHasTaxName', dataIndex: 'hasTaxName',
align: 'left' align: 'left'
}, },
{ {
dataIndex: 'payAmount', dataIndex: 'applyPayment',
align: 'left', align: 'left',
title: ( title: (
<Space direction='vertical'> <Space direction='vertical'>
<Text>{intl.formatMessage({ id: 'contract.fukuanjine' })}</Text> <Text>{intl.formatMessage({ id: 'contract.fukuanjine' })}</Text>
<Text>{intl.formatMessage({ id: 'contract.heji' })}: {intl.formatMessage({ id: 'common.money' })}{payAmount}</Text> {/* <Text>{intl.formatMessage({ id: 'contract.heji' })}: {intl.formatMessage({ id: 'common.money' })}{payAmount}</Text> */}
</Space> </Space>
), ),
}, },
...@@ -96,16 +99,20 @@ const PopupDrawer: React.FC<Iprops> = ({ ...@@ -96,16 +99,20 @@ const PopupDrawer: React.FC<Iprops> = ({
// 模拟请求 // 模拟请求
const fetchData = (params?: any) => { const fetchData = (params?: any) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getContractExecuteExecuteInfoPayDetailInfoPagePayDetail({ // /settle/accounts/business/apply/amount/detail/apply/amount
applyId, // getContractExecuteExecuteInfoPayDetailInfoPagePayDetail
// /api/settle/accounts/business/apply/amount/apply/amount/row/list
getSettleAccountsBusinessApplyAmountApplyAmountRowList({
applyAmountId: applyId,
applyNo,
...params, ...params,
}).then(res => { }).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
resolve(res.data) resolve(res.data)
let payAmount = 0, orderAmount = 0; let payAmount = 0, orderAmount = 0;
res.data.data.map((item: any) => { res.data.data.map((item: any) => {
payAmount += item.payAmount; payAmount += item.billRowAmount;
orderAmount += item.orderAmount orderAmount += item.applyPayment
}) })
console.log(payAmount, orderAmount) console.log(payAmount, orderAmount)
setpayAmount(payAmount) setpayAmount(payAmount)
...@@ -145,7 +152,7 @@ const PopupDrawer: React.FC<Iprops> = ({ ...@@ -145,7 +152,7 @@ const PopupDrawer: React.FC<Iprops> = ({
<div className={style.memuItem}> <div className={style.memuItem}>
<div className={style.menuCard}> <div className={style.menuCard}>
<div className={style.menulabel}>{intl.formatMessage({ id: 'contract.shoukuanzhanghu' })}</div> <div className={style.menulabel}>{intl.formatMessage({ id: 'contract.shoukuanzhanghu' })}</div>
<div className={style.card}>{basicData.payeeName}</div> <div className={style.card}>{basicData.accountName}</div>
</div> </div>
<div className={style.menuCard}> <div className={style.menuCard}>
<div className={style.menulabel}>{intl.formatMessage({ id: 'contract.yinhangzhanghao' })}</div> <div className={style.menulabel}>{intl.formatMessage({ id: 'contract.yinhangzhanghao' })}</div>
...@@ -164,7 +171,7 @@ const PopupDrawer: React.FC<Iprops> = ({ ...@@ -164,7 +171,7 @@ const PopupDrawer: React.FC<Iprops> = ({
<div className={style.memuItem}> <div className={style.memuItem}>
<div className={style.menuCard}> <div className={style.menuCard}>
<div className={style.menulabel}>{intl.formatMessage({ id: 'contract.fukuanjine' })}</div> <div className={style.menulabel}>{intl.formatMessage({ id: 'contract.fukuanjine' })}</div>
<div className={style.card}>{intl.formatMessage({id: 'common.money'})} {basicData.payAmount}</div> <div className={style.card}>{intl.formatMessage({ id: 'common.money' })} {basicData.applyAmount}</div>
</div> </div>
<div className={style.menuCard}> <div className={style.menuCard}>
<div className={style.menulabel}>{intl.formatMessage({ id: 'contract.fukuanshijian' })}</div> <div className={style.menulabel}>{intl.formatMessage({ id: 'contract.fukuanshijian' })}</div>
...@@ -194,7 +201,7 @@ const PopupDrawer: React.FC<Iprops> = ({ ...@@ -194,7 +201,7 @@ const PopupDrawer: React.FC<Iprops> = ({
</div> </div>
</div> </div>
</div> </div>
<div className={style.PopupTitle}>{intl.formatMessage({id: 'contract.fukuanmingxi'})}</div> <div className={style.PopupTitle}>{intl.formatMessage({ id: 'contract.fukuanmingxi' })}</div>
<StandardTable <StandardTable
rowKey="id" rowKey="id"
style={{ style={{
......
...@@ -98,7 +98,8 @@ const situationList: React.FC<Iprops> = ({ contractId }) => { ...@@ -98,7 +98,8 @@ const situationList: React.FC<Iprops> = ({ contractId }) => {
return ( return (
<div> <div>
<EyePreview <EyePreview
url={`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/preview?id=${record.orderId}`} url={record.orderType === 1 ? `/memberCenter/tranactionAbility/saleOrder/orderList/preview?id=${record.orderId}` : `/memberCenter/afterService/returnManage/returnQuery/detail?id=${record.orderId}`}
// url={`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/preview?id=${record.orderId}`}
> >
{text} {text}
</EyePreview> </EyePreview>
...@@ -176,21 +177,21 @@ const situationList: React.FC<Iprops> = ({ contractId }) => { ...@@ -176,21 +177,21 @@ const situationList: React.FC<Iprops> = ({ contractId }) => {
<span>{intl.formatMessage({ id: 'common.money' })}{text}</span> <span>{intl.formatMessage({ id: 'common.money' })}{text}</span>
) )
}, },
{ // {
title: intl.formatMessage({ id: 'contract.caozuo' }), dataIndex: 'type', align: 'center', // title: intl.formatMessage({ id: 'contract.caozuo' }), dataIndex: 'type', align: 'center',
render: (text, record) => { // render: (text, record) => {
// 已付款大于0或已请款待付款大于0的才显示查看付款明细按钮。 // // 已付款大于0或已请款待付款大于0的才显示查看付款明细按钮。
return ( // return (
<div> // <div>
{ // {
// onClick = {() => getPayment(record.id)} // // onClick = {() => getPayment(record.id)}
record.payAmount > 0 || record.unPayApplyAmount > 0 && <a className={style.gesture}>{intl.formatMessage({id: 'contract.zhakanfukuanmingxi'})}</a> // record.payAmount > 0 || record.unPayApplyAmount > 0 && <a className={style.gesture}>{intl.formatMessage({id: 'contract.zhakanfukuanmingxi'})}</a>
} // }
</div> // </div>
) // )
} // }
}, // },
]; ];
const handlePaginationChange = (current: number, pageSize: number) => { const handlePaginationChange = (current: number, pageSize: number) => {
const data = { const data = {
...@@ -247,7 +248,7 @@ const situationList: React.FC<Iprops> = ({ contractId }) => { ...@@ -247,7 +248,7 @@ const situationList: React.FC<Iprops> = ({ contractId }) => {
value={value} value={value}
onChange={(e) => setvalue(e.target.value)} onChange={(e) => setvalue(e.target.value)}
/> />
<Button style={{ paddingLeft: 10, paddingRight: 10, marginLeft: 10, marginRight: 10 }} onClick={Reset}> {intl.formatMessage({id: 'contract.zhongzhi'})} </Button> <Button style={{ paddingLeft: 10, paddingRight: 10, marginLeft: 10, marginRight: 10 }} onClick={Reset}> {intl.formatMessage({ id: 'contract.zhongzhi' })} </Button>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -18,6 +18,7 @@ import { ...@@ -18,6 +18,7 @@ import {
FileWordFilled FileWordFilled
} from '@ant-design/icons' } from '@ant-design/icons'
import { getContractCoordinationGetDetail, getContractExecuteExecuteInfoPayDetailInfo, getContractSignatureGetHandSignatureUrl, postContractCoordinationExamineStepOne, postContractCoordinationExamineStepTwo, postContractCoordinationSign, postContractCoordinationSubmitExamine } from '@/services/ContractV2Api' import { getContractCoordinationGetDetail, getContractExecuteExecuteInfoPayDetailInfo, getContractSignatureGetHandSignatureUrl, postContractCoordinationExamineStepOne, postContractCoordinationExamineStepTwo, postContractCoordinationSign, postContractCoordinationSubmitExamine } from '@/services/ContractV2Api'
import { getSettleAccountsBusinessApplyAmountDetailApplyAmount } from '@/services/SettleV2Api';
const { Link } = Anchor; const { Link } = Anchor;
const activeAnchorClassName = 'ant-anchor-link-active' const activeAnchorClassName = 'ant-anchor-link-active'
const Details = (props: any) => { const Details = (props: any) => {
...@@ -83,7 +84,7 @@ const Details = (props: any) => { ...@@ -83,7 +84,7 @@ const Details = (props: any) => {
], ],
col3: [ col3: [
{ label: intl.formatMessage({ id: 'contract.hetongyouxiaoqi' }), extra: `${basics.startTime}${intl.formatMessage({id: 'common.text.to'})}${basics.endTime}` }, { label: intl.formatMessage({ id: 'contract.hetongyouxiaoqi' }), extra: `${basics.startTime}${intl.formatMessage({ id: 'common.text.to' })}${basics.endTime}` },
], ],
} }
if (type) { if (type) {
...@@ -298,20 +299,25 @@ const Details = (props: any) => { ...@@ -298,20 +299,25 @@ const Details = (props: any) => {
} }
const [applyId, setapplyId] = useState<any>('') const [applyId, setapplyId] = useState<any>('')
const [applyNo, setapplyNo] = useState<any>('')
/* 点击查看详情回调 */ /* 点击查看详情回调 */
const setkey = (item) => { const setkey = (item) => {
setDrawerModal()
if (item.id) { if (item.id) {
setapplyId(item.id) setapplyId(item.id)
getContractExecuteExecuteInfoPayDetailInfo({ setapplyNo(item.applyAmountNo)
contractId, // api/settle/accounts/business/apply/amount/detail/apply/amount
applyId: item.id // getContractExecuteExecuteInfoPayDetailInfo
}).then(res => { getSettleAccountsBusinessApplyAmountDetailApplyAmount({
applyNo: item.applyAmountNo,
applyAmountId: item.id,
}).then((res: any) => {
console.log(res); console.log(res);
if (res.code === 1000) { if (res.code === 1000) {
console.log(res.data) console.log(res.data)
res.data.invoiceProveVOList = res.data.invoiceProveVOList ? res.data.invoiceProveVOList : []; res.data.invoiceProveVOList = res.data.invoiceProveVOList ? res.data.invoiceProveVOList : [];
setbasicData(res.data) setbasicData(res.data)
setDrawerModal()
} }
}) })
} }
...@@ -499,7 +505,7 @@ const Details = (props: any) => { ...@@ -499,7 +505,7 @@ const Details = (props: any) => {
</Form> </Form>
</Modal> </Modal>
{/* 查看付款计划明细弹出组建 */} {/* 查看付款计划明细弹出组建 */}
<PopupDrawer popupshow={Popup} basicData={basicData} setDrawerModal={setDrawerModal} applyId={applyId} /> <PopupDrawer popupshow={Popup} applyNo={applyNo} basicData={basicData} setDrawerModal={setDrawerModal} applyId={applyId} />
</div> </div>
) )
} }
......
...@@ -250,7 +250,7 @@ export const evaluateAddSchema: ISchema = { ...@@ -250,7 +250,7 @@ export const evaluateAddSchema: ISchema = {
required: true, required: true,
}, },
{ {
pattern: /\d+/, pattern: /^\d+$/,
message: intl.formatMessage({ id: 'member.evaluate.validate.number', defaultMessage: '请填写正整数' }), message: intl.formatMessage({ id: 'member.evaluate.validate.number', defaultMessage: '请填写正整数' }),
} }
] ]
...@@ -261,7 +261,7 @@ export const evaluateAddSchema: ISchema = { ...@@ -261,7 +261,7 @@ export const evaluateAddSchema: ISchema = {
required: false, required: false,
}, },
{ {
pattern: /\d+/, pattern: /^\d+$/,
message: intl.formatMessage({ id: 'member.evaluate.validate.number', defaultMessage: '请填写正整数' }), message: intl.formatMessage({ id: 'member.evaluate.validate.number', defaultMessage: '请填写正整数' }),
} }
] ]
......
...@@ -29,6 +29,9 @@ interface CommodityDrawerProps { ...@@ -29,6 +29,9 @@ interface CommodityDrawerProps {
} }
const _returnCategoryList = (list: any, obj: any) => { const _returnCategoryList = (list: any, obj: any) => {
if (!obj) {
return;
}
obj.name && list.unshift(obj.name); obj.name && list.unshift(obj.name);
if (obj.category) { if (obj.category) {
_returnCategoryList(list, obj.category); _returnCategoryList(list, obj.category);
......
...@@ -224,7 +224,7 @@ const EditPanel = () => { ...@@ -224,7 +224,7 @@ const EditPanel = () => {
}; };
const currentProps = type === 0 && componentType.includes('suggestProduct') ? formValueToProps['suggestProduct'] : formValueToProps[componentType]; const currentProps = type === 0 && componentType.includes('suggestProduct') ? formValueToProps['suggestProduct'] : formValueToProps[componentType];
if(componentType.includes('suggestProduct') && type === 0) { if(componentType.includes('suggestProduct') && values.type) {
setType(values.type); setType(values.type);
} }
changeProps({ changeProps({
......
...@@ -13,6 +13,7 @@ import { omit } from '@/utils' ...@@ -13,6 +13,7 @@ import { omit } from '@/utils'
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus' import { usePageStatus, PageStatus } from '@/hooks/usePageStatus'
import PositionSetting from './components/positionSetting' import PositionSetting from './components/positionSetting'
import { postProductFreightSpaceAdd } from '@/services/ProductV2Api' import { postProductFreightSpaceAdd } from '@/services/ProductV2Api'
import { returnClear } from './effects'
// import styled from 'styled-components' // import styled from 'styled-components'
// const WrapperLayout = styled(props => <div {...props} />)` // const WrapperLayout = styled(props => <div {...props} />)`
...@@ -63,7 +64,7 @@ const AddRepository: React.FC<{}> = (props) => { ...@@ -63,7 +64,7 @@ const AddRepository: React.FC<{}> = (props) => {
return ( return (
<PageHeaderWrapper <PageHeaderWrapper
onBack={() => history.goBack()} onBack={() => returnClear()}
backIcon={<ReutrnEle description={intl.formatMessage({ id: 'repositories.addRepository.back' })} />} backIcon={<ReutrnEle description={intl.formatMessage({ id: 'repositories.addRepository.back' })} />}
className='addRepository' className='addRepository'
title={pageStatus === PageStatus.PREVIEW ? intl.formatMessage({ id: 'repositories.addRepository.title.1' }) : intl.formatMessage({ id: 'repositories.addRepository.title.2' })} title={pageStatus === PageStatus.PREVIEW ? intl.formatMessage({ id: 'repositories.addRepository.title.1' }) : intl.formatMessage({ id: 'repositories.addRepository.title.2' })}
......
...@@ -16,7 +16,7 @@ import { getStepNumber } from '@/utils' ...@@ -16,7 +16,7 @@ import { getStepNumber } from '@/utils'
import { usePageStatus } from '@/hooks/usePageStatus' import { usePageStatus } from '@/hooks/usePageStatus'
import { useInitValue } from '@/formSchema/effects/useInitValue' import { useInitValue } from '@/formSchema/effects/useInitValue'
import { useLinkageUtils } from '@/utils/formEffectUtils' import { useLinkageUtils } from '@/utils/formEffectUtils'
import { useUnitPreview } from './effects' import { returnClear, useUnitPreview } from './effects'
import PositionSetting from './components/positionSetting' import PositionSetting from './components/positionSetting'
import { useHttpRequest } from '@/hooks/useHttpRequest' import { useHttpRequest } from '@/hooks/useHttpRequest'
import { getProductFreightSpaceAllotFoldLog, getProductFreightSpaceDetails, getProductFreightSpaceListByProductid, postProductFreightSpaceAllotExport, postProductFreightSpaceAllotFold, postProductFreightSpaceUpdata } from '@/services/ProductV2Api' import { getProductFreightSpaceAllotFoldLog, getProductFreightSpaceDetails, getProductFreightSpaceListByProductid, postProductFreightSpaceAllotExport, postProductFreightSpaceAllotFold, postProductFreightSpaceUpdata } from '@/services/ProductV2Api'
...@@ -198,7 +198,7 @@ const AddRepository: React.FC<{}> = (props) => { ...@@ -198,7 +198,7 @@ const AddRepository: React.FC<{}> = (props) => {
}) })
await postProductFreightSpaceUpdata(params) await postProductFreightSpaceUpdata(params)
setTimeout(() => { setTimeout(() => {
history.goBack(-1) history.goBack()
}, 1000) }, 1000)
} }
...@@ -207,7 +207,7 @@ const AddRepository: React.FC<{}> = (props) => { ...@@ -207,7 +207,7 @@ const AddRepository: React.FC<{}> = (props) => {
} }
return ( return (
<PageHeaderWrapper <PageHeaderWrapper
onBack={() => history.goBack()} onBack={() => returnClear()}
backIcon={<ReutrnEle description={intl.formatMessage({ id: 'repositories.adjustRepository.back' })} />} backIcon={<ReutrnEle description={intl.formatMessage({ id: 'repositories.adjustRepository.back' })} />}
className='addRepository' className='addRepository'
title={intl.formatMessage({ id: 'repositories.adjustRepository.title' })} title={intl.formatMessage({ id: 'repositories.adjustRepository.title' })}
......
...@@ -12,6 +12,7 @@ import { createFormActions } from '@formily/antd' ...@@ -12,6 +12,7 @@ import { createFormActions } from '@formily/antd'
import { usePageStatus, PageStatus } from '@/hooks/usePageStatus' import { usePageStatus, PageStatus } from '@/hooks/usePageStatus'
import BatchPositionSetting from './components/batchPositionSetting' import BatchPositionSetting from './components/batchPositionSetting'
import { postProductFreightSpaceAddBatch } from '@/services/ProductV2Api' import { postProductFreightSpaceAddBatch } from '@/services/ProductV2Api'
import { returnClear } from './effects'
const addSchemaAction = createFormActions() const addSchemaAction = createFormActions()
...@@ -68,7 +69,7 @@ const BatchAddRepository: React.FC<{}> = () => { ...@@ -68,7 +69,7 @@ const BatchAddRepository: React.FC<{}> = () => {
return ( return (
<PageHeaderWrapper <PageHeaderWrapper
onBack={() => history.goBack()} onBack={() => returnClear()}
backIcon={<ReutrnEle description={intl.formatMessage({ id: 'repositories.batchAddRepository.back' })} />} backIcon={<ReutrnEle description={intl.formatMessage({ id: 'repositories.batchAddRepository.back' })} />}
className='addRepository' className='addRepository'
title={pageStatus === PageStatus.PREVIEW ? intl.formatMessage({ id: 'repositories.batchAddRepository.title.1' }) : intl.formatMessage({ id: 'repositories.batchAddRepository.title.2' })} title={pageStatus === PageStatus.PREVIEW ? intl.formatMessage({ id: 'repositories.batchAddRepository.title.1' }) : intl.formatMessage({ id: 'repositories.batchAddRepository.title.2' })}
......
import { useEffect } from 'react' import { useEffect } from 'react'
import { history } from 'umi'
import { ISchemaFormActions, FormEffectHooks } from '@formily/antd'; import { ISchemaFormActions, FormEffectHooks } from '@formily/antd';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'; import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { getProductCustomerGetCustomerCategoryTree, getProductInventoryByItemNo, getProductSelectGetSelectBrand, getProductWarehouseAll } from '@/services/ProductV2Api'; import { getProductCustomerGetCustomerCategoryTree, getProductInventoryByItemNo, getProductSelectGetSelectBrand, getProductWarehouseAll } from '@/services/ProductV2Api';
import { clearModalParams } from '@/utils';
const { onFieldValueChange$ } = FormEffectHooks const { onFieldValueChange$ } = FormEffectHooks
export const useWarehouseSelect = (context: ISchemaFormActions) => { export const useWarehouseSelect = (context: ISchemaFormActions) => {
...@@ -77,3 +79,9 @@ export const searchCustomerCategoryOptionEffect = (context: any, fieldName: stri ...@@ -77,3 +79,9 @@ export const searchCustomerCategoryOptionEffect = (context: any, fieldName: stri
}) })
}) })
} }
/* 对于二级页面返回 清空筛选条件 */
export const returnClear = () => {
clearModalParams()
history.goBack()
}
...@@ -27,7 +27,7 @@ export const fetchOrderApi = { ...@@ -27,7 +27,7 @@ export const fetchOrderApi = {
/** 获取会员列表 */ /** 获取会员列表 */
async getMemberListByModelType(params) { async getMemberListByModelType(params) {
const { data } = BASE_CONFIG.global.siteInfo.enableMultiTenancy ? await getMemberManageUpperProviderMerchantPage(params) : await getMemberManageOrderBuyerMembers(params) const { data } = await getMemberManageOrderBuyerMembers(params)
return data return data
}, },
......
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