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
linweijiong
jinfa-platform
Commits
5a6b5d96
Commit
5a6b5d96
authored
Sep 15, 2020
by
LeeJiancong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'对接新增报价单大模块'
parent
bf9e380b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
98 additions
and
67 deletions
+98
-67
tranactionRoute.ts
config/routes/tranactionRoute.ts
+1
-12
tableStatusList.tsx
src/pages/transaction/common/tableStatusList.tsx
+10
-5
productModal.tsx
...ages/transaction/enquiryOffer/components/productModal.tsx
+84
-45
detail.tsx
src/pages/transaction/enquiryOffer/toAddSubmit/detail.tsx
+0
-0
index.tsx
src/pages/transaction/enquiryOffer/toAddSubmit/index.tsx
+2
-2
detail.tsx
src/pages/transaction/enquirySubmit/toAddSubmit/detail.tsx
+1
-3
No files found.
config/routes/tranactionRoute.ts
View file @
5a6b5d96
...
...
@@ -3,7 +3,7 @@
* @Date: 2020-07-31 19:56:22
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-1
1 10:17:58
* @LastEditTime: 2020-09-1
5 15:20:45
*/
const
TranactionRoute
=
{
...
...
@@ -79,26 +79,22 @@ const TranactionRoute = {
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/enquirySearch'
,
name
:
'enquirySearch'
,
key
:
'enquirySearch'
,
component
:
'@/pages/transaction/enquirySubmit/enquirySearch'
},
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/toAddSubmitList'
,
name
:
'toAddSubmitList'
,
key
:
'toAddSubmitList'
,
component
:
'@/pages/transaction/enquirySubmit/toAddSubmit'
},
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/addEnquiry'
,
name
:
'addEnquiry'
,
key
:
'addEnquiry'
,
component
:
'@/pages/transaction/enquirySubmit/toAddSubmit/detail'
,
hideInMenu
:
true
,
},
{
//需求单详情
path
:
'/memberCenter/tranactionAbility/enquirySubmit/viewEnquiryDetail'
,
name
:
'viewEnquiryDetail'
,
key
:
'viewEnquiryDetail'
,
component
:
'@/pages/transaction/enquirySubmit/components/detail'
,
hideInMenu
:
true
,
},
...
...
@@ -106,19 +102,16 @@ const TranactionRoute = {
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/enquiryOne'
,
name
:
'enquiryOne'
,
key
:
'enquiryOne'
,
component
:
'@/pages/transaction/enquirySubmit/enquiryOne'
},
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/enquiryTwo'
,
name
:
'enquiryTwo'
,
key
:
'enquiryTwo'
,
component
:
'@/pages/transaction/enquirySubmit/enquiryTwo'
},
{
path
:
'/memberCenter/tranactionAbility/enquirySubmit/toSubmit'
,
name
:
'toSubmit'
,
key
:
'toSubmit'
,
component
:
'@/pages/transaction/enquirySubmit/toSubmit'
},
...
...
@@ -140,13 +133,11 @@ const TranactionRoute = {
{
path
:
'/memberCenter/tranactionAbility/enquiryOffer/enquirySearch'
,
name
:
'enquirySearch'
,
key
:
'enquirySearch'
,
component
:
'@/pages/transaction/enquiryOffer/enquirySearch'
},
{
//需求单详情
path
:
'/memberCenter/tranactionAbility/enquiryOffer/viewEnquiryDetail'
,
name
:
'viewEnquiryDetail'
,
key
:
'viewEnquiryDetail'
,
component
:
'@/pages/transaction/enquiryOffer/components/detail'
,
hideInMenu
:
true
,
},
...
...
@@ -155,14 +146,12 @@ const TranactionRoute = {
{
path
:
'/memberCenter/tranactionAbility/enquiryOffer/toAddSubmitList'
,
name
:
'toAddSubmitList'
,
key
:
'toAddSubmitList'
,
component
:
'@/pages/transaction/enquiryOffer/toAddSubmit'
},
//新增
{
path
:
'/memberCenter/tranactionAbility/enquiryOffer/addEnquiry'
,
name
:
'addEnquiry'
,
key
:
'addEnquiry'
,
component
:
'@/pages/transaction/enquiryOffer/toAddSubmit/detail'
,
hideInMenu
:
true
,
},
...
...
src/pages/transaction/common/tableStatusList.tsx
View file @
5a6b5d96
import
React
,
{
Component
,
ReactNode
}
from
'react'
;
import
{
Badge
}
from
'antd'
/****** *********************** 需求单 ************************** */
/**
* @description: 一级
* @description:
需求提交
一级
* @param {type}
* @return {type}
*/
...
...
@@ -17,7 +17,7 @@ export const interiorState = (text:any) => {
/**
* @description: 二级
* @description:
需求提交
二级
* @param {type}
* @return {type}
*/
...
...
@@ -62,4 +62,10 @@ export const enquirySearchexternalState = (text:any) => {
text
===
6
?
component
=
<
Badge
status=
'error'
text=
"审核不通过"
/>:
component
=
<
Badge
status=
"default"
text=
"取消报价单"
/>
return
component
;
}
\ No newline at end of file
}
/****** *********************** 报价单 ************************** */
src/pages/transaction/enquiryOffer/components/productModal.tsx
View file @
5a6b5d96
...
...
@@ -3,9 +3,9 @@
* @Date: 2020-08-28 10:07:45
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-1
2 11:40:07
* @LastEditTime: 2020-09-1
5 14:32:41
*/
import
React
,
{
Component
,
useState
,
useEffect
}
from
'react'
;
import
React
,
{
Component
,
useState
,
useRef
,
useEffect
,
useImperativeHandle
}
from
'react'
;
import
{
Modal
,
Button
,
Space
,
Form
,
Radio
,
AutoComplete
,
Badge
,
Tabs
,
Input
,
Select
,
Checkbox
}
from
'antd'
import
{
PublicApi
}
from
'@/services/api'
import
ModalTable
from
'@/components/ModalTable'
...
...
@@ -20,13 +20,17 @@ const { TextArea } = Input
export
interface
Params
{
sourceData
?:
Array
<
any
>
[],
eqInfo
:
any
,
id
?:
any
,
mode
?:
number
,
type
?:
number
|
string
,
dialogVisible
:
boolean
;
currentRef
?:
any
;
onCancel
:
Function
;
onRef
?:
any
;
onOK
?:
Function
;
initialValues
?:
any
;
productAttributeJson
:
Function
;
//明细中的属性
dontReceive
?:
boolean
;
//默认展示
}
const
layout
=
{
...
...
@@ -44,10 +48,10 @@ const layout = {
* @param {type}
* @return {type}
*/
//
const fetchData = async (params) => {
//
const res = await PublicApi.getProductCommodityCommonGetCommodityDetailList({ ...params, environment: 1, shopType: 1 })
//
return res.data
//
}
const
fetchData
=
async
(
params
)
=>
{
const
res
=
await
PublicApi
.
getProductCommodityCommonGetCommodityDetailList
({
...
params
,
environment
:
1
,
shopType
:
1
})
return
res
.
data
}
//数据是真实的 只是模拟
let
data
=
[
...
...
@@ -69,18 +73,18 @@ let data = [
unitName
:
"件"
}
]
const
fetchData
=
params
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
queryResult
=
data
.
find
(
v
=>
v
.
key
===
params
.
keywords
);
setTimeout
(()
=>
{
resolve
({
code
:
200
,
message
:
''
,
data
:
queryResult
?
[
queryResult
]
:
data
,
});
},
1000
);
});
};
//
const fetchData = params => {
//
return new Promise((resolve, reject) => {
//
const queryResult = data.find(v => v.key === params.keywords);
//
setTimeout(() => {
//
resolve({
//
code: 200,
//
message: '',
//
data: queryResult ? [queryResult] : data,
//
});
//
}, 1000);
//
});
//
};
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -113,7 +117,9 @@ const columns: ColumnType<any>[] = [
* @param {type}
* @return {type}
*/
const
comfirmDialog
:
React
.
FC
<
Params
>
=
(
props
)
=>
{
const
comfirmDialog
:
React
.
FC
<
Params
>
=
(
props
,{
onRef
})
=>
{
// const {onRef} = props
// const cRef = props.currentRef
// console.log('数据',props.sourceData)
const
[
visible
,
setsVisible
]
=
useState
(
false
)
//state hook写法
const
[
Curform
]
=
Form
.
useForm
()
...
...
@@ -128,6 +134,14 @@ const comfirmDialog: React.FC<Params> = (props) => {
const
[
placeOfOriginList
,
setplaceOfOriginList
]
=
useState
([])
//产地
const
handleCancel
=
()
=>
{
}
const
inRef
=
useRef
<
any
>
({})
useImperativeHandle
(
onRef
,()
=>
{
retSetForm
:
()
=>
{
Curform
.
resetFields
()
}
})
//选择商品
const
handleLink
=
()
=>
{
...
...
@@ -137,16 +151,24 @@ const comfirmDialog: React.FC<Params> = (props) => {
const
handleSelectOk
=
()
=>
{
console
.
log
(
'数据'
,
productRowCtl
);
const
selectRow
=
productRowCtl
.
selectRow
[
0
]
let
{
commodityId
,
id
,
goodsId
,
roleId
,
name
,
brandName
}
=
selectRow
let
{
commodityId
,
id
,
customerCategoryName
,
goodsId
,
roleId
,
name
,
brandName
}
=
selectRow
Curform
.
setFieldsValue
({
name
:
name
,
//商品名称
brand
:
brandName
brand
:
brandName
,
category
:
customerCategoryName
})
//查询属性
PublicApi
.
getProductCommodityGetCommodity
({
id
:
commodityId
}).
then
(
res
=>
{
//查询属性
// PublicApi.getProductCommodityGetCommodity({ id: commodityId }).then(res => {
// if (res.code === 1000) {
// let { data } = res || {}
// setcommodityAttributedataSource(data)
// }
// })
PublicApi
.
getProductCommodityGetCommodityAttributeByUnitPriceAndPicId
({
unitPriceAndPicId
:
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
{
data
}
=
res
||
{}
setcommodityAttributedataSource
(
data
)
console
.
log
(
'data'
,
data
)
}
})
setsVisible
(
false
)
...
...
@@ -155,22 +177,21 @@ const comfirmDialog: React.FC<Params> = (props) => {
setsVisible
(
false
)
}
/**
* @description: 报价明细
* @param {type}
* @return {type}
*/
const
handletOk
=
()
=>
{
Curform
.
validateFields
().
then
(
v
=>
{
console
.
log
(
'表单'
,
v
)
// props.onOK(v)
props
.
onOK
(
v
,
commodityAttributedataSource
)
props
.
productAttributeJson
(
commodityAttributedataSource
)
Curform
.
resetFields
()
})
// if(props.type){
// value.type = props.type
// }
// console.log('列表',value)
}
useEffect
(()
=>
{
// onRef(inRef)
return
()
=>
{
}
},
[])
...
...
@@ -284,10 +305,10 @@ const comfirmDialog: React.FC<Params> = (props) => {
</>
)
}
const
placeholderText
=
'请先选择对应需求单号'
return
(
<>
<
Modal
// title={props.mode === 0 ? '新增报价明细' : '查看报价明细'}
title=
{
headerTitle
}
width=
{
800
}
...
...
@@ -302,10 +323,14 @@ const comfirmDialog: React.FC<Params> = (props) => {
<
Form
{
...
layout
}
colon=
{
false
}
ref=
{
inRef
}
labelAlign=
"left"
form=
{
Curform
}
autoComplete=
"off"
initialValues=
{
{
purchaseQuantity
:
props
.
eqInfo
.
purchaseQuantity
,
purchaseNuit
:
props
.
eqInfo
.
purchaseNuit
}
}
>
<
Tabs
defaultActiveKey=
'tab1'
...
...
@@ -317,12 +342,17 @@ const comfirmDialog: React.FC<Params> = (props) => {
name=
'model'
rules=
{
[
{
required
:
true
}
]
}
>
<
Select
>
<
Option
value=
"1"
>
11
</
Option
>
<
Select
placeholder=
"请先选择对应需求单号"
>
{
props
.
eqInfo
.
modelList
.
map
((
item
,
index
)
=>
{
return
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>
})
}
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
...
...
@@ -350,6 +380,13 @@ const comfirmDialog: React.FC<Params> = (props) => {
>
<
Input
disabled
placeholder=
''
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'品类'
name=
'category'
hidden
>
<
Input
disabled
placeholder=
''
/>
</
Form
.
Item
>
</
Tabs
.
TabPane
>
{
...
...
@@ -372,8 +409,8 @@ const comfirmDialog: React.FC<Params> = (props) => {
}
{
commodityAttributedataSource
.
commodityAttributeList
.
length
>
0
&&
commodityAttributedataSource
.
commodityAttributeList
.
map
((
item
:
any
)
=>
<>
<
TabPane
tab=
{
item
.
customerAttribute
.
name
}
key=
{
item
.
customerAttribute
.
id
}
>
commodityAttributedataSource
.
length
>
0
&&
commodityAttributedataSource
.
map
((
item
:
any
)
=>
<>
<
TabPane
tab=
{
item
.
customerAttribute
.
name
}
key=
{
item
.
customerAttribute
.
name
}
>
<
Space
key=
{
item
.
customerAttribute
.
id
}
direction=
"vertical"
size=
{
16
}
>
{
item
.
customerAttributeValueList
.
map
((
child
,
childIndex
)
=>
{
return
<
Badge
text=
{
child
.
value
}
key=
{
childIndex
}
status=
"default"
/>
...
...
@@ -391,12 +428,11 @@ const comfirmDialog: React.FC<Params> = (props) => {
name=
'purchaseNuit'
rules=
{
[
{
required
:
true
,
message
:
"请先选择需求单"
required
:
true
}
]
}
>
<
Input
placeholder=
''
/>
<
Input
disabled
placeholder=
{
placeholderText
}
/>
</
Form
.
Item
>
<
Form
.
Item
...
...
@@ -404,12 +440,11 @@ const comfirmDialog: React.FC<Params> = (props) => {
name=
'purchaseQuantity'
rules=
{
[
{
required
:
true
,
message
:
"请先选择需求单"
required
:
true
}
]
}
>
<
Input
placeholder=
''
/>
<
Input
disabled
placeholder=
{
placeholderText
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'报价单价'
...
...
@@ -453,6 +488,10 @@ const comfirmDialog: React.FC<Params> = (props) => {
)
}
comfirmDialog
.
defaultProps
=
{
eqInfo
:{
// purchaseQuantity: '',//数量
// purchaseNuit:''//单位
},
//规格列表
dontReceive
:
true
,
type
:
1
//1.支付宝 2.支付宝转账到银行卡参数配置 3.微信
...
...
src/pages/transaction/enquiryOffer/toAddSubmit/detail.tsx
View file @
5a6b5d96
This diff is collapsed.
Click to expand it.
src/pages/transaction/enquiryOffer/toAddSubmit/index.tsx
View file @
5a6b5d96
...
...
@@ -3,7 +3,7 @@
* @Date: 2020-08-24 11:39:11
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-1
1 16:59:50
* @LastEditTime: 2020-09-1
5 14:11:15
*/
import
React
,
{
ReactNode
,
useRef
,
useState
,
useEffect
}
from
'react'
;
import
{
history
}
from
'umi'
;
...
...
@@ -158,7 +158,7 @@ const List:React.FC<{}> = () => {
},[])
const
toEdit
=
(
id
:
number
|
string
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/enquiry
Submit
/addEnquiry?id=
${
id
}
`
)
history
.
push
(
`/memberCenter/tranactionAbility/enquiry
Offer
/addEnquiry?id=
${
id
}
`
)
}
/**
* @description: 删除
...
...
src/pages/transaction/enquirySubmit/toAddSubmit/detail.tsx
View file @
5a6b5d96
...
...
@@ -3,7 +3,7 @@
* @Date: 2020-08-24 11:39:29
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-1
1 11:43:1
6
* @LastEditTime: 2020-09-1
5 15:15:3
6
*/
import
React
,
{
Component
,
useState
,
useEffect
}
from
'react'
import
ReactDOM
from
'react-dom'
...
...
@@ -912,7 +912,6 @@ const Detail: React.FC<{}> = () => {
if
(
id
)
{
//修改
values
[
'id'
]
=
id
console
.
log
(
'编辑'
,
values
)
return
PublicApi
.
postOrderRequisitionFormUpdate
(
values
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
...
...
@@ -922,7 +921,6 @@ const Detail: React.FC<{}> = () => {
})
}
else
{
PublicApi
.
postOrderRequisitionFormAdd
(
values
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
...
...
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