Commit b475d4ef authored by XieZhiXiong's avatar XieZhiXiong

跳转进销存单据

parent f47136da
...@@ -107,7 +107,7 @@ export const useSelfTable = () => { ...@@ -107,7 +107,7 @@ export const useSelfTable = () => {
} }
const handleAdd = async (record) => { const handleAdd = async (record) => {
history.push(`/memberCenter/tranactionAbility/stockSellStorage/addBills?relevanceInvoicesId=${record.id}&invoicesTypeId=S002&relevanceInvoices=1`) history.push(`/memberCenter/tranactionAbility/stockSellStorage/addBills?orderNo=${record.orderNo}&deliveryAddresId=${record.deliveryAddresId}&relevanceInvoicesId=${record.id}&invoicesTypeId=S002&relevanceInvoices=1`)
} }
return { return {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47 * @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-09-24 16:02:02 * @LastEditTime: 2020-09-24 20:11:39
* @Description: 联动逻辑相关 * @Description: 联动逻辑相关
*/ */
import { FormEffectHooks, FormPath } from '@formily/antd'; import { FormEffectHooks, FormPath } from '@formily/antd';
...@@ -314,6 +314,7 @@ export const useBusinessEffects = (context, actions) => { ...@@ -314,6 +314,7 @@ export const useBusinessEffects = (context, actions) => {
onFieldValueChange$('orderNo').subscribe(fieldState => { onFieldValueChange$('orderNo').subscribe(fieldState => {
const relevanceInvoicesVal = getFieldValue('relevanceInvoices'); const relevanceInvoicesVal = getFieldValue('relevanceInvoices');
const first = fieldState.value && fieldState.value[0]; const first = fieldState.value && fieldState.value[0];
console.log('first', first)
setFieldValue('memberName', first ? first.memberName : ''); setFieldValue('memberName', first ? first.memberName : '');
setFieldValue('relevanceInvoicesId', first ? first.id : null); setFieldValue('relevanceInvoicesId', first ? first.id : null);
......
...@@ -46,6 +46,11 @@ const AddBills: React.FC<{}> = (props: any) => { ...@@ -46,6 +46,11 @@ const AddBills: React.FC<{}> = (props: any) => {
pageStatus, pageStatus,
preview, preview,
id, id,
invoicesTypeId,
relevanceInvoices,
orderNo,
deliveryAddresId,
relevanceInvoicesId,
} = usePageStatus(); } = usePageStatus();
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
const [productRowSelection, productRowCtl] = useRowSelectionTable({ type: 'checkbox' }); const [productRowSelection, productRowCtl] = useRowSelectionTable({ type: 'checkbox' });
...@@ -156,6 +161,15 @@ const AddBills: React.FC<{}> = (props: any) => { ...@@ -156,6 +161,15 @@ const AddBills: React.FC<{}> = (props: any) => {
); );
useEffect(() => { useEffect(() => {
if (invoicesTypeId && relevanceInvoices && orderNo && deliveryAddresId && relevanceInvoicesId) {
setBillInfo({
invoicesTypeId,
relevanceInvoices: +relevanceInvoices,
orderNo: orderNo ? [{ orderNo, id: +relevanceInvoicesId }] : [],
deliveryAddresId: +deliveryAddresId,
});
}
getBillInfo(); getBillInfo();
}, []); }, []);
......
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