Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈智峰
jinfa-platform
Commits
9729e798
Commit
9729e798
authored
Nov 20, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取消货品联动,货品选择只做新增操作
parent
42e2522f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
33 deletions
+20
-33
useBusinessEffects.ts
.../bills/components/BillsForm/effects/useBusinessEffects.ts
+1
-1
index.tsx
...ion/stockSellStorage/bills/components/BillsForm/index.tsx
+19
-32
No files found.
src/pages/transaction/stockSellStorage/bills/components/BillsForm/effects/useBusinessEffects.ts
View file @
9729e798
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-1
0-23 16:00:01
* @LastEditTime: 2020-1
1-20 16:25:08
* @Description: 联动逻辑相关
*/
import
{
Modal
}
from
'antd'
;
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/index.tsx
View file @
9729e798
...
...
@@ -179,9 +179,6 @@ const BillsForm: React.FC<BillsFormProps> = ({
invoicesDetailsRequests
:
details
,
...
rest
,
});
productRowCtl
.
setSelectRow
(
details
);
productRowCtl
.
setSelectedRowKeys
(
details
.
map
(
item
=>
item
.
id
));
}).
finally
(()
=>
{
setInfoLoading
(
false
);
});
...
...
@@ -537,29 +534,27 @@ const BillsForm: React.FC<BillsFormProps> = ({
const
values
=
[];
productRowCtl
.
selectRow
.
forEach
(
item
=>
{
const
existing
=
preValues
.
find
(
val
=>
val
.
goodsId
===
item
.
id
);
const
atom
=
existing
?
existing
:
{
itemNo
:
item
.
code
,
goodsId
:
item
.
id
,
itemNmae
:
item
.
name
,
specifications
:
item
.
type
,
category
:
item
.
customerCategory
?
item
.
customerCategory
.
name
:
''
,
brand
:
item
.
brand
?
item
.
brand
.
name
:
''
,
unit
:
item
.
unitName
,
costPrice
:
item
.
costPrice
,
product
:
undefined
,
productName
:
item
.
productName
,
productId
:
''
,
price
:
''
,
productCount
:
0
,
amount
:
''
,
};
const
atom
=
{
itemNo
:
item
.
code
,
goodsId
:
item
.
id
,
itemNmae
:
item
.
name
,
specifications
:
item
.
type
,
category
:
item
.
customerCategory
?
item
.
customerCategory
.
name
:
''
,
brand
:
item
.
brand
?
item
.
brand
.
name
:
''
,
unit
:
item
.
unitName
,
costPrice
:
item
.
costPrice
,
product
:
undefined
,
productName
:
item
.
productName
,
productId
:
''
,
price
:
''
,
productCount
:
0
,
amount
:
''
,
};
values
.
push
(
atom
);
});
addSchemaAction
.
setFieldValue
(
'invoicesDetailsRequests'
,
values
);
addSchemaAction
.
setFieldValue
(
'invoicesDetailsRequests'
,
preValues
.
concat
(
values
));
productRowCtl
.
setSelectRow
([]);
productRowCtl
.
setSelectedRowKeys
([]);
setVisible
(
false
);
}
...
...
@@ -575,15 +570,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
}
const
handleRemoveItem
=
(
index
:
number
)
=>
{
const
newSelectRow
=
[...
productRowCtl
.
selectRow
];
const
newSelectedRowKeys
=
[...
productRowCtl
.
selectedRowKeys
];
const
newValue
=
[...
addSchemaAction
.
getFieldValue
(
'invoicesDetailsRequests'
)];
newSelectRow
.
splice
(
index
,
1
);
newSelectedRowKeys
.
splice
(
index
,
1
);
productRowCtl
.
setSelectRow
(
newSelectRow
);
productRowCtl
.
setSelectedRowKeys
(
newSelectedRowKeys
);
newValue
.
splice
(
index
,
1
);
addSchemaAction
.
setFieldValue
(
'invoicesDetailsRequests'
,
newValue
);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment