Commit 5009f32c authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents 7fed9f56 2a5f1a20
......@@ -204,7 +204,7 @@ export const createSchema = (addressType = 2): ISchema => {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
label: '{{ required("手机号码") }}',
label: `{{ required("${intl.formatMessage({id: 'contract.shoujihaoma'})}") }}`,
wrapperCol: 24,
},
properties: {
......
......@@ -8,14 +8,22 @@ interface AnchorPageItemProps {
* key,实际就是 标签id
*/
itemKey: string,
/**
* 自定义外部样式
*/
customStyle?: React.HTMLAttributes<HTMLDivElement>,
/**
* 自定义外部 className
*/
className?: string,
children?: React.ReactNode,
}
const AnchorPageItem: React.FC<AnchorPageItemProps> = (props: AnchorPageItemProps) => {
const { itemKey, children } = props;
const { itemKey, customStyle, className, children } = props;
return (
<div id={itemKey}>
<div id={itemKey} style={customStyle} className={className}>
{children}
</div>
);
......
......@@ -58,8 +58,8 @@ const AnchorPage = (props: IProps) => {
onBack,
children,
} = props;
const firstKey = anchors.length ? `#${anchors[0].key}` : '';
const [current, setCurrent] = useState(firstKey);
const defaultKey = anchors.length ? `#${anchors[0].key}` : '';
const [current, setCurrent] = useState(defaultKey);
const [rect, measuredRef] = useClientRect();
const mounted = useRef(false);
......@@ -72,6 +72,13 @@ const AnchorPage = (props: IProps) => {
};
}, []);
useEffect(() => {
const firstKey = anchors.length ? `#${anchors[0].key}` : '';
if (firstKey && firstKey !== current) {
setCurrent(firstKey);
}
}, [anchors]);
const handleBack = () => {
if (onBack) {
onBack();
......@@ -86,7 +93,8 @@ const AnchorPage = (props: IProps) => {
return;
}
if (!currentActiveLink) {
mounted.current && setCurrent(firstKey);
const firstKey = anchors.length ? `#${anchors[0].key}` : '';
mounted.current && firstKey && setCurrent(firstKey);
}
};
......
......@@ -54,11 +54,11 @@ export default {
'afterService.common.return.products':'Return products',
'afterService.common.return.refunded':'Refunded',
'afterService.common.replace.products':'Replacement products',
'afterService.common.repair.products':'Repair products',
'afterService.common.basicInfo.applyNo':'Application number',
'afterService.common.basicInfo.orderType':'After-sales order type',
'afterService.common.basicInfo.applyTime':'Document time',
......@@ -90,7 +90,7 @@ export default {
'afterService.common.applyVerify':'Document review',
'afterService.common.confirmApply':'Confirm application form',
'afterService.common.confirmVerify':'Confirm documents',
'afterService.common.refundReceived':'Return goods receipt',
'afterService.common.refundReceived':'Return goods',
'afterService.common.refund':'Refund',
'afterService.common.stop':'Abort',
......@@ -219,4 +219,4 @@ export default {
'afterService.apply.repairReason.required':'Please fill in the reason for repair',
'afterService.apply.shippingAddress.repair':'Repair Address',
'afterService.apply.shippingAddress.repair.required':'Please select a repair address',
}
\ No newline at end of file
}
......@@ -3,7 +3,7 @@ export default {
'afterService.components.CheckVoucherModal.title':'View voucher',
'afterService.components.DeliverDrawer.title':'{type} delivery processing',
'afterService.components.DeliverDrawer.title':'delivery processing',
'afterService.components.DeliverDrawer.overflow':'The value filled in has exceeded the delivery quantity of {flow}, please fill in again',
'afterService.components.DeliverDrawer.type.replace':'Replacement',
'afterService.components.DeliverDrawer.type.refund':'Return goods',
......@@ -15,17 +15,17 @@ export default {
'afterService.components.DeliverDrawer.category':'Category',
'afterService.components.DeliverDrawer.brand':'Brand',
'afterService.components.DeliverDrawer.unit':'Unit',
'afterService.components.DeliverDrawer.applyCount':'{type} Quantity',
'afterService.components.DeliverDrawer.applyCount':'Quantity',
'afterService.components.DeliverDrawer.deliveryCount':'Delivered {flow}',
'afterService.components.DeliverDrawer.noDeliveryCount':'Not delivered in {flow}',
'afterService.components.DeliverDrawer.receiveCount':'Received {flow}',
'afterService.components.DeliverDrawer.subCount':'Number of differences',
'afterService.components.DeliverDrawer.count':'{flow} delivery quantity',
'afterService.components.DeliverDrawer.count.required':'Please enter {flow} delivery quantity',
'afterService.components.DeliverDrawer.count':'delivery quantity',
'afterService.components.DeliverDrawer.count.required':'Please enter delivery quantity',
'afterService.components.DeliverDrawer.count.legal':'Keep up to 3 decimal places, greater than or equal to 0',
'afterService.components.DeliverDrawer.returnDeliverAddress':'{flow} delivery address',
'afterService.components.DeliverDrawer.returnDeliverAddress.required':'Please select {flow} delivery address',
'afterService.components.DeliverDrawer.deliveryTime':'{flow} delivery time',
'afterService.components.DeliverDrawer.returnDeliverAddress':'delivery address',
'afterService.components.DeliverDrawer.returnDeliverAddress.required':'Please select delivery address',
'afterService.components.DeliverDrawer.deliveryTime':'delivery time',
'afterService.components.DeliverDrawer.logisticsOrderNo':'logistics order number',
'afterService.components.DeliverDrawer.logisticsName':'logistics company',
......
......@@ -22,7 +22,7 @@ export default {
'components.qingshuru':'Please enter',
'components.diqu':'Region',
'components.shengfenzhixiashi':'-Province/municipalities-',
'components.shi':'--',
'components.shi':'-City-',
'components.qu':'-zone-',
'components.jiedao':'-Street-',
'components.xiangxidizhi':'Detailed address',
......@@ -58,8 +58,8 @@ export default {
'components.zhanghukeyongyueyuan':'Account available balance (yuan)',
'components.bencixuzhifuyuan':'Pay this time (yuan)',
'components.cha':'Poor',
'components.zhong':'',
'components.liang':'',
'components.zhong':'centre',
'components.liang':'good',
'components.you':'Excellent',
'components.zhanbi':'Proportion',
'components.fanbi':'Inverse ratio',
......@@ -69,7 +69,7 @@ export default {
'components.suoyou':'All',
'components.tianjia':'Add',
'components.guishudishi':'Attribution to the city',
'components.companyLOGO':'公司LOGO',
'components.companyLOGO':'Company LOGO',
'components.companyjianjie':'Company Profile',
'components.changfangzhaopian':'Factory photos',
'components.zizhirongyu':'Qualification honor',
......@@ -187,7 +187,7 @@ export default {
'components.dianjichaxunliebiaoke':'Click to query, the list can display the new products',
'components.anpinyinsousuo':'Search by pinyin',
'components.chaping':'bad review',
'components.zhongping':'中评',
'components.zhongping':'commMiddle',
'components.haoping':'good comment',
'components.tuozhuaishangchuan':'Drag and drop upload',
'components.shangchuan':'Upload',
......@@ -196,7 +196,7 @@ export default {
'components.qingxuanzequ':'Please select a district',
'components.zanwushuju':'No data yet',
'components.gong':'Total',
'components.tiao':'',
'components.tiao':'strip',
'components.quedingyaozhixingzhegecao':'Are you sure you want to perform this operation?',
'components.shi1':'Yes',
'components.fou':'No',
......
......@@ -21,10 +21,10 @@ export default {
'components.ren': '사람',
'components.qingshuru': '입력하십시오.',
'components.diqu': '지역.',
'components.shengfenzhixiaashi': '-성/시-',
'components.shi':'-시-',
'components.qu':'-영역-',
'components.jiedao':'-거리-',
'components.shengfenzhixiashi': '-성/시-',
'components.shi': '-시-',
'components.qu': '-영역-',
'components.jiedao': '-거리-',
'components.xiangxidizhi': '상세 주소',
'components.qingshuruxiangxidizhi': '상세 주소를 입력하십시오(최대 60자, 30자).',
'components.qingshuruxiangxidizhi1': '상세 주소를 입력하십시오.',
......@@ -243,7 +243,7 @@ export default {
'components.dianjixiazaishoujikehu': '클릭하여 핸드폰 클라이언트 다운로드',
'components.dianjiyoushangjiaoxuanzeliu': '오른쪽 상단을 클릭하여 브라우저 열기 선택',
'components.lingxishangchengAPP': '옌옌상점 APP',
'components.CopyRightguangzhoushishushangyun':'Copy Right©Guangzhou Shushangyun Network Technology Co., Ltd. 粤ICP备13044797号-5',
'components.CopyRightguangzhoushishushangyun': 'Copy Right©Guangzhou Shushangyun Network Technology Co., Ltd. 粤ICP备13044797号-5',
'components.mianzhaishengming': '면책 성명',
'components.fuwutiaokuan': '서비스 약관',
'components.lianxiwomen': '연락처',
......
......@@ -54,11 +54,11 @@ export default {
'afterService.common.return.products': '退货商品',
'afterService.common.return.refunded': '已退款',
'afterService.common.replace.products': '换货商品',
'afterService.common.repair.products': '维修商品',
'afterService.common.basicInfo.applyNo': '申请单号',
'afterService.common.basicInfo.orderType': '售后订单类型',
'afterService.common.basicInfo.applyTime': '单据时间',
......@@ -219,4 +219,4 @@ export default {
'afterService.apply.repairReason.required': '请填写维修原因',
'afterService.apply.shippingAddress.repair': '维修地址',
'afterService.apply.shippingAddress.repair.required': '请选择维修地址',
}
\ No newline at end of file
}
......@@ -356,7 +356,7 @@ const DeliverDrawer: React.FC<IProps> = (props) => {
}),
state => {
if (+value > +noDeliveryCountValue) {
state.errors = [intl.formatMessage({ id: 'afterService.components.DeliverDrawer.overflow' }, { flow: FLOW_TYPE_NAME_MAP[flowType] })];;
state.errors = [intl.formatMessage({ id: 'afterService.components.DeliverDrawer.overflow' }, { flow: FLOW_TYPE_NAME_MAP[flowType] })];
} else {
state.errors = [];
}
......
......@@ -16,6 +16,7 @@ import ProgressLayout, { ProgressValue } from '@/pages/transaction/purchaseAbili
import CommonLayout from '@/pages/transaction/purchaseAbility/components/detail/components/bidCommonLayout';
import { getSettleAccountsBusinessReconciliationDetailReconciliation, getSettleAccountsBusinessReconciliationReconciliationRowList } from '@/services/SettleV2Api'
import BusinessFileLayout from '../../components/BusinessFileLayout';
const intl = getIntl();
const TABLINK = [
......@@ -85,7 +86,7 @@ const SearchDetail = () => {
{ label: intl.formatMessage({ id: 'balance.shoukuanfang' }), extra: data.payer, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.fukuanfang' }), extra: data.payee, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.faqiduizhangfang' }), extra: data.launchReconciliation, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.duizhangzongjine' }), extra: ${data.reconciliationMoneyAmount}`, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.duizhangzongjine' }), extra: ${priceFormat(data.reconciliationMoneyAmount)}`, type: 'text' },
{ label: intl.formatMessage({ id: 'balance.danjushijian' }), extra: data.createTime, type: 'text' },
]
},
......@@ -164,6 +165,7 @@ const SearchDetail = () => {
title: '单价(含税)',
key: 'price',
dataIndex: 'price',
render: (text: any) => ${priceFormat(text)}`
},
{
title: '待对账数量',
......@@ -174,6 +176,7 @@ const SearchDetail = () => {
title: '待对账金额(含税)',
key: 'reconciliationMoneyAmount',
dataIndex: 'reconciliationMoneyAmount',
render: (text: any) => ${priceFormat(text)}`
},
{
title: '本次对账数量',
......@@ -184,6 +187,7 @@ const SearchDetail = () => {
title: '本次对账金额(含税)',
key: 'currentMoney',
dataIndex: 'currentMoney',
render: (text: any) => ${priceFormat(text)}`
},
];
......@@ -196,30 +200,30 @@ const SearchDetail = () => {
}
return (
<PeripheralLayout
no={dataSource?.reconciliationNo}
detail={dataSource?.reconciliationAbstract}
tabLink={_tabs}
components={
<Fragment>
<ProgressLayout effect={[{ title: '外部流转', state: 1, logs: [] }]} />
<CommonLayout layoutId="basicLayout" title={intl.formatMessage({ id: 'balance.jibenxinxi' })} effect={basicEffect} commonSpan={12} />
<Card id='billLayout' title={intl.formatMessage({ id: 'balance.duizhangdanmingxi' })}>
<StandardTable
keepAlive={false}
currentRef={currentRef}
columns={columns}
tableProps={{ rowKey: 'reconciliationRowId' }}
fetchTableData={(params: any) => loadingTableData(params)}
/>
</Card>
<Card id='fileLayout' title={intl.formatMessage({ id: 'balance.fujian' })}>
</Card>
<CommonLayout layoutId="invoiceLayout" title={intl.formatMessage({ id: 'balance.fapiaoxinxi' })} effect={invoiceEffect} commonSpan={12} />
</Fragment>
}
/>
<div style={{margin: '-24px -24px 0'}}>
<PeripheralLayout
no={dataSource?.reconciliationNo}
detail={dataSource?.reconciliationAbstract}
tabLink={_tabs}
components={
<Fragment>
<ProgressLayout effect={[{ title: '外部流转', state: 1, logs: [] }]} />
<CommonLayout layoutId="basicLayout" title={intl.formatMessage({ id: 'balance.jibenxinxi' })} effect={basicEffect} commonSpan={12} />
<Card id='billLayout' title={intl.formatMessage({ id: 'balance.duizhangdanmingxi' })}>
<StandardTable
keepAlive={false}
currentRef={currentRef}
columns={columns}
tableProps={{ rowKey: 'reconciliationRowId' }}
fetchTableData={(params: any) => loadingTableData(params)}
/>
</Card>
<BusinessFileLayout fetchdata={dataSource?.files} editAble={false} />
<CommonLayout layoutId="invoiceLayout" title={intl.formatMessage({ id: 'balance.fapiaoxinxi' })} effect={invoiceEffect} commonSpan={12} />
</Fragment>
}
/>
</div>
)
}
export default SearchDetail;
......@@ -8,7 +8,7 @@ import { GlobalConfig } from '@/global/config'
import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat';
import StatusTag from '@/components/StatusTag';
import { getSettleAccountsBusinessReconciliationDetailReconciliation, getSettleAccountsBusinessReconciliationReconciliationRowList, postSettleAccountsBusinessReconciliationUpdateReconciliation, postSettleAccountsBusinessReconciliationSaveReconciliation } from '@/services/SettleV2Api'
import { getSettleAccountsBusinessReconciliationDetailReconciliation, getSettleAccountsBusinessReconciliationReconciliationRowList, postSettleAccountsBusinessReconciliationUpdateReconciliation, postSettleAccountsBusinessReconciliationSaveReconciliation, postSettleAccountsBusinessReconciliationGenerateReconciliation } from '@/services/SettleV2Api'
import PeripheralLayout from '@/pages/transaction/purchaseAbility/components/detail';
import Card from '@/pages/transaction/purchaseAbility/components/card';
......@@ -35,6 +35,7 @@ const Add = () => {
id,
no
},
state,
pathname,
} = history.location;
const [form] = Form.useForm();
......@@ -42,6 +43,7 @@ const Add = () => {
const [path] = useState(pathname.split('/')[pathname.split('/').length - 1]);
const [dataSource, setDataSource] = useState<any>({});
const [tabelSource, setTabelSource] = useState<any>([]);
const [ids, setIds] = useState<any>([]);
const [drawerVisible, setDrawerVisible] = useState<boolean>(false);
const [unsaved, setUnsaved] = useState(false);
const [submitLoading, setSubmitLoading] = useState(false);
......@@ -50,9 +52,9 @@ const Add = () => {
const _tabs = useMemo(() => {
let _list = [];
TABLINK.forEach((item) => {
if (item.id === 'billLayout') {
item.title = `${item.title}${tabelSource.length ? '' : '(' + tabelSource.length + ')'}`
}
// if (item.id === 'billLayout') {
// item.title = `${item.title}${tabelSource.length ? '' : '(' + tabelSource.length + ')'}`
// }
_list.push(item)
})
return _list;
......@@ -130,7 +132,11 @@ const Add = () => {
if (_editAble) {
setUnsaved(true)
if (path === 'add') {
postSettleAccountsBusinessReconciliationGenerateReconciliation({ SettlementGenerateVO: state?.ros }).then((res) => {
if (res.code === 1000) {
}
})
} else {
_getDetail();
_getRowList();
......@@ -278,6 +284,8 @@ const Add = () => {
}
const _dataSource = { ...dataSource };
_dataSource.reconciliationMoneyAmount = _amount;
const _ids = tabelSource.map((item) => item.productId);
setIds(_ids);
setDataSource(_dataSource);
}, [tabelSource])
......@@ -289,16 +297,18 @@ const Add = () => {
reconciliationAbstract: formRes.reconciliationAbstract,
reconciliationMoneyAmount: formRes.reconciliationMoneyAmount,
remark: formRes.remark,
reconciliationNo: no,
rows: tabelSource
}
if (filesRef?.current?.data && filesRef?.current?.data.length > 0) {
_params.files = filesRef?.current?.data;
}
if (_flag) {
_params.payer = dataSource.payer;
_params.payee = dataSource.payee;
_params.launchReconciliation = dataSource.launchReconciliation;
} else {
_params.reconciliationId = id;
_params.reconciliationNo = no;
}
_fetch = _flag ? postSettleAccountsBusinessReconciliationSaveReconciliation : postSettleAccountsBusinessReconciliationUpdateReconciliation;
setSubmitLoading(true)
......@@ -315,8 +325,15 @@ const Add = () => {
})
}
const addRows = (rows) => {
const _tabelSource = [...tabelSource];
const _rows = _tabelSource.concat(rows);
setTabelSource(_rows);
setDrawerVisible(false);
}
return (
<>
<div style={{ margin: '-24px -24px 0' }}>
<PeripheralLayout
no={_title}
tabLink={_tabs}
......@@ -372,14 +389,23 @@ const Add = () => {
</Card>
<BusinessFileLayout fetchdata={[]} currentRef={filesRef} editAble={_editAble} />
<DetailDrawer
searchParams={
{
payer: dataSource.payer,
payee: dataSource.payee,
taxRate: tabelSource?.[0]?.taxRate || '',
ids: ids?.join(',') || ''
}
}
visible={drawerVisible}
onClose={() => { setDrawerVisible(false) }}
onOk={addRows}
/>
</Form>
}
/>
<Prompt when={unsaved} message={intl.formatMessage({ id: 'common.tip.save.confirm' }, { default: '您还有未保存的内容,是否确定要离开?' })} />
</>
</div>
)
}
export default Add;
......@@ -37,8 +37,8 @@ const BusinessFileLayout: React.FC<BusinessFileLayoutProps> = (props: BusinessFi
if (file.response) {
if (file.response.code === 1000) {
arr.push({
name: file.name,
url: file.response.data
fileName: file.name,
fileUrl: file.response.data
})
setloading(false);
}
......@@ -71,9 +71,9 @@ const BusinessFileLayout: React.FC<BusinessFileLayoutProps> = (props: BusinessFi
<div>
{files.length > 0 && files.map((v, index) => (
<div key={index} className={styles.upload_item}>
<a className={styles.upload_left} href={v.url} target='_blank'>
<a className={styles.upload_left} href={v.fileUrl} target='_blank'>
<LinkOutlined />
<span>{v.name}</span>
<span>{v.fileName}</span>
</a>
{editAble && <div className={styles.upload_right} onClick={() => removeFiles(index)}>
<DeleteOutlined />
......
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