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
68aa56a6
Commit
68aa56a6
authored
Jul 30, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
8c05a18d
a394831e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
13 deletions
+28
-13
index.tsx
src/pages/transaction/components/TableLayout/index.tsx
+8
-1
basic.tsx
...seAbility/purchaseInquiry/addInquiry/components/basic.tsx
+1
-7
material.tsx
...bility/purchaseInquiry/addInquiry/components/material.tsx
+2
-0
index.tsx
...urchaseAbility/purchaseInquiry/addInquiry/modal/index.tsx
+15
-3
addRule.tsx
src/pages/transaction/transactionRules/addRule.tsx
+2
-2
No files found.
src/pages/transaction/components/TableLayout/index.tsx
View file @
68aa56a6
...
@@ -56,11 +56,18 @@ const Table: React.FC<Iprops> = (props: any) => {
...
@@ -56,11 +56,18 @@ const Table: React.FC<Iprops> = (props: any) => {
/** 列表数据 */
/** 列表数据 */
const
fetchData
=
(
params
?:
any
)
=>
{
const
fetchData
=
(
params
?:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
Array
.
isArray
(
fetch
))
{
fetch
({
...
params
}).
then
(
res
=>
{
fetch
({
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
resolve
(
res
.
data
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
warn
(
error
)
console
.
warn
(
error
)
})
})
return
}
resolve
({
code
:
1000
,
data
:
fetch
})
})
})
}
}
...
@@ -119,7 +126,7 @@ const Table: React.FC<Iprops> = (props: any) => {
...
@@ -119,7 +126,7 @@ const Table: React.FC<Iprops> = (props: any) => {
<
StandardTable
<
StandardTable
currentRef=
{
tableRef
}
currentRef=
{
tableRef
}
columns=
{
columns
}
columns=
{
columns
}
tableProps=
{
{
rowKe
w
:
'id'
}
}
tableProps=
{
{
rowKe
y
:
'id'
}
}
rowSelection=
{
selectedRow
&&
rowSelection
}
rowSelection=
{
selectedRow
&&
rowSelection
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
controlRender=
{
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/components/basic.tsx
View file @
68aa56a6
...
@@ -109,10 +109,8 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
...
@@ -109,10 +109,8 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
city
[
idx
]
=
{
citydata
:
res
.
data
}
city
[
idx
]
=
{
citydata
:
res
.
data
}
setcity
([...
city
])
setcity
([...
city
])
}
}
})
})
.
catch
(()
=>
{})
}
}
}).
catch
(
error
=>
{
console
.
warn
(
error
)
})
})
}
else
{
}
else
{
...
@@ -130,13 +128,11 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
...
@@ -130,13 +128,11 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
})
})
setcity
([...
city
])
setcity
([...
city
])
}
}
console
.
log
(
2
)
setrequisitionFormAddress
(
result
);
setrequisitionFormAddress
(
result
);
}
}
/** 选择城市的时候下拉就调用方 */
/** 选择城市的时候下拉就调用方 */
const
onDropdownVisibleChange
=
()
=>
{
const
onDropdownVisibleChange
=
()
=>
{
console
.
log
(
1
)
return
new
Promise
(
reslove
=>
reslove
(
code
)).
then
((
res
:
any
)
=>
{
return
new
Promise
(
reslove
=>
reslove
(
code
)).
then
((
res
:
any
)
=>
{
city
.
forEach
((
item
:
any
)
=>
{
city
.
forEach
((
item
:
any
)
=>
{
item
.
citydata
.
filter
(
it
=>
{
item
.
citydata
.
filter
(
it
=>
{
...
@@ -148,8 +144,6 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
...
@@ -148,8 +144,6 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
})
})
})
})
setcity
([...
city
])
setcity
([...
city
])
}).
catch
(
error
=>
{
console
.
warn
(
error
)
})
})
}
}
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/components/material.tsx
View file @
68aa56a6
...
@@ -182,6 +182,7 @@ const Material: React.FC<Iprops> = (props: any) => {
...
@@ -182,6 +182,7 @@ const Material: React.FC<Iprops> = (props: any) => {
}
}
},
[
fetchdata
])
},
[
fetchdata
])
return
(
return
(
<>
<>
<
Form
<
Form
...
@@ -222,6 +223,7 @@ const Material: React.FC<Iprops> = (props: any) => {
...
@@ -222,6 +223,7 @@ const Material: React.FC<Iprops> = (props: any) => {
{
materielMode
===
1
{
materielMode
===
1
&&
(
&&
(
<
AnchorModal
<
AnchorModal
dataSource=
{
dataSource
}
preview=
{
isPreview
}
preview=
{
isPreview
}
edit=
{
edit
}
edit=
{
edit
}
visible=
{
flag
}
visible=
{
flag
}
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/modal/index.tsx
View file @
68aa56a6
...
@@ -18,6 +18,8 @@ const layout: any = {
...
@@ -18,6 +18,8 @@ const layout: any = {
};
};
interface
AnchorModalProps
{
interface
AnchorModalProps
{
/** 列表数据 */
dataSource
?:
any
[],
/** 显示隐藏 */
/** 显示隐藏 */
visible
?:
boolean
,
visible
?:
boolean
,
/** 是否查看数据 */
/** 是否查看数据 */
...
@@ -32,13 +34,14 @@ interface AnchorModalProps {
...
@@ -32,13 +34,14 @@ interface AnchorModalProps {
const
AnchorModal
:
React
.
FC
<
AnchorModalProps
>
=
(
props
:
any
)
=>
{
const
AnchorModal
:
React
.
FC
<
AnchorModalProps
>
=
(
props
:
any
)
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
{
visible
,
preview
,
edit
,
onClose
,
onConfirm
}
=
props
;
const
{
dataSource
,
visible
,
preview
,
edit
,
onClose
,
onConfirm
}
=
props
;
const
[
loading
,
setloading
]
=
useState
<
boolean
>
(
false
);
const
[
loading
,
setloading
]
=
useState
<
boolean
>
(
false
);
const
[
searchVisible
,
setSearchVisible
]
=
useState
<
boolean
>
(
false
)
const
[
searchVisible
,
setSearchVisible
]
=
useState
<
boolean
>
(
false
)
const
[
isSeleted
,
setIsSeleted
]
=
useState
<
number
>
(
1
);
const
[
isSeleted
,
setIsSeleted
]
=
useState
<
number
>
(
1
);
const
[
category
,
setcategory
]
=
useState
([]);
const
[
category
,
setcategory
]
=
useState
([]);
const
[
files
,
setFiles
]
=
useState
([]);
const
[
files
,
setFiles
]
=
useState
([]);
const
[
product
,
setProduct
]
=
useState
<
any
>
({});
const
[
product
,
setProduct
]
=
useState
<
any
>
({});
const
[
ids
,
setIds
]
=
useState
<
Array
<
number
>
[]
>
([])
const
[
menu
]
=
useState
([
const
[
menu
]
=
useState
([
{
id
:
1
,
label
:
'基本信息'
},
{
id
:
1
,
label
:
'基本信息'
},
...
@@ -99,7 +102,6 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
...
@@ -99,7 +102,6 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
console
.
warn
(
error
)
console
.
warn
(
error
)
})
})
}).
then
((
data
:
any
)
=>
{
}).
then
((
data
:
any
)
=>
{
console
.
log
(
data
)
setcategory
(
data
)
setcategory
(
data
)
})
})
}
}
...
@@ -110,7 +112,6 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
...
@@ -110,7 +112,6 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
setIsSeleted
(
1
)
setIsSeleted
(
1
)
searchCategoryTree
(
null
);
searchCategoryTree
(
null
);
if
(
!
isEmpty
(
edit
))
{
if
(
!
isEmpty
(
edit
))
{
console
.
log
(
edit
)
form
.
setFieldsValue
({
form
.
setFieldsValue
({
number
:
edit
.
number
,
number
:
edit
.
number
,
name
:
edit
.
name
,
name
:
edit
.
name
,
...
@@ -122,11 +123,22 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
...
@@ -122,11 +123,22 @@ const AnchorModal: React.FC<AnchorModalProps> = (props: any) => {
})
})
setFiles
(
edit
.
urls
)
setFiles
(
edit
.
urls
)
}
}
if
(
!
isEmpty
(
dataSource
))
{
const
arr
:
Array
<
number
>
[]
=
[]
dataSource
.
forEach
(
item
=>
{
arr
.
push
(
item
.
goodsId
)
});
setIds
(
arr
)
}
},
[
visible
]);
},
[
visible
]);
/** 选择货品点击 */
/** 选择货品点击 */
const
confirm
=
(
selectRowKeys
:
string
[]
|
number
[],
selectRowRecord
:
any
)
=>
{
const
confirm
=
(
selectRowKeys
:
string
[]
|
number
[],
selectRowRecord
:
any
)
=>
{
const
selectRow
=
selectRowRecord
;
const
selectRow
=
selectRowRecord
;
if
(
ids
.
includes
(
selectRow
[
0
].
id
))
{
message
.
error
(
'货品已存在,请勿重复选择!'
)
return
}
if
(
selectRow
.
length
>
0
)
{
if
(
selectRow
.
length
>
0
)
{
const
data
:
any
=
selectRow
[
0
]
const
data
:
any
=
selectRow
[
0
]
if
(
data
.
customerCategory
.
category
)
{
if
(
data
.
customerCategory
.
category
)
{
...
...
src/pages/transaction/transactionRules/addRule.tsx
View file @
68aa56a6
...
@@ -30,8 +30,8 @@ const AddRule:React.FC<{}> = (props) => {
...
@@ -30,8 +30,8 @@ const AddRule:React.FC<{}> = (props) => {
setIsDisabled
(
true
)
setIsDisabled
(
true
)
if
(
values
?.
products
)
if
(
values
?.
products
)
values
.
products
=
values
.
products
.
map
(
item
=>
({
values
.
products
=
values
.
products
.
map
(
item
=>
({
product
Id
:
item
.
id
,
sku
Id
:
item
.
id
,
commodity
Id
:
item
.
commodityId
,
product
Id
:
item
.
commodityId
,
name
:
item
.
name
,
name
:
item
.
name
,
category
:
item
.
customerCategoryName
,
category
:
item
.
customerCategoryName
,
priceType
:
item
.
priceType
,
priceType
:
item
.
priceType
,
...
...
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