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
ef6a34a3
Commit
ef6a34a3
authored
Sep 10, 2021
by
GuanHua
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
1ecb20b3
b83be64f
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
139 additions
and
40 deletions
+139
-40
index.tsx
src/components/AddressSelect/index.tsx
+3
-3
Roles.tsx
src/layouts/components/Roles.tsx
+1
-0
index.tsx
src/pages/afterService/components/DeliverDrawer/index.tsx
+9
-1
index.tsx
...ges/afterService/components/ExchangeDeliverInfo/index.tsx
+1
-1
verify.tsx
...rService/exchangeApplication/exchangePrDeliver/verify.tsx
+3
-1
verify.tsx
...afterService/returnApplication/returnPrDeliver/verify.tsx
+2
-0
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+0
-2
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+1
-3
index.tsx
...nsaction/dealAbility/inquiryOffer/inquirySearch/index.tsx
+90
-17
index.tsx
src/pages/transaction/purchaseOrder/index.tsx
+1
-0
index.tsx
...pages/transaction/purchaseOrder/orderCollectB2b/index.tsx
+4
-4
index.tsx
...pages/transaction/purchaseOrder/orderCollectSrm/index.tsx
+5
-5
index.tsx
src/pages/transaction/saleOrder/index.tsx
+19
-3
No files found.
src/components/AddressSelect/index.tsx
View file @
ef6a34a3
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-05 10:28:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-09-
03 19:17:17
* @LastEditTime: 2021-09-
10 10:27:19
* @Description: 地址选择 FormItem
*/
import
React
,
{
useState
,
useEffect
,
useMemo
,
useRef
}
from
'react'
;
...
...
@@ -489,8 +489,8 @@ const AddressSelect: React.FC<IProps> = (props) => {
label
:
`
${
item
.
name
}
${
item
.
fullAddress
}
${
item
.
phone
}
`
,
}));
},
[
list
]);
if
(
!
editable
&&
value
)
{
if
(
!
editable
)
{
const
current
=
list
.
find
((
item
)
=>
item
.
id
===
value
.
id
);
const
full
=
current
?
`
${
current
.
name
}
${
current
.
fullAddress
}
${
current
.
phone
}
`
:
null
;
const
isStr
=
typeof
value
===
'string'
;
...
...
src/layouts/components/Roles.tsx
View file @
ef6a34a3
...
...
@@ -7,6 +7,7 @@ import { PublicApi } from '@/services/api';
interface
MemberRole
{
memberRoleId
:
number
;
memberRoleName
:
string
;
roleType
:
number
,
};
const
Roles
:
React
.
FC
=
()
=>
{
...
...
src/pages/afterService/components/DeliverDrawer/index.tsx
View file @
ef6a34a3
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-17 10:22:51
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
8-20 14:19:21
* @LastEditTime: 2021-0
9-10 16:40:02
* @Description: 退货发货抽屉
*/
...
...
@@ -92,6 +92,10 @@ export type ValuesType = {
* 未退货发货数量
*/
noDeliveryCount
:
number
,
/**
* 数据id
*/
returnDetailId
:
number
,
}[],
/**
* 退货发货地址
...
...
@@ -148,6 +152,10 @@ type ProductListItemType = {
* 退货数量
*/
count
:
number
,
/**
* 数据id
*/
returnDetailId
:
number
,
}
export
type
AfterType
=
2
|
3
...
...
src/pages/afterService/components/ExchangeDeliverInfo/index.tsx
View file @
ef6a34a3
...
...
@@ -295,7 +295,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
)
:
null
}
{
radioValue
===
'2'
?
(
<>
<
Tabs
>
<
Tabs
defaultActiveKey=
{
detailed
?
`${detailed[detailed.length - 1].batch}`
:
''
}
>
{
detailed
.
map
((
item
)
=>
(
<
TabPane
tab=
{
`第 ${item.batch} 批次`
}
...
...
src/pages/afterService/exchangeApplication/exchangePrDeliver/verify.tsx
View file @
ef6a34a3
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
8-17 13:53:35
* @LastEditTime: 2021-0
9-10 16:58:46
* @Description:
*/
import
React
,
{
useState
}
from
'react'
;
...
...
@@ -39,6 +39,7 @@ const ExchangePrDeliverVerify: React.FC = () => {
productList
:
productList
.
map
((
item
)
=>
({
productId
:
item
.
productId
,
returnCount
:
+
item
.
count
,
returnDetailId
:
item
.
returnDetailId
,
})),
deliveryTime
:
moment
(
deliveryTime
).
valueOf
(),
logisticsName
:
logisticsNameTxt
,
...
...
@@ -94,6 +95,7 @@ const ExchangePrDeliverVerify: React.FC = () => {
receiveCount
:
item
.
receiveCount
,
subCount
:
item
.
subCount
,
count
:
item
.
noDeliveryCount
,
returnDetailId
:
item
.
detailId
,
}))
),
}
}
...
...
src/pages/afterService/returnApplication/returnPrDeliver/verify.tsx
View file @
ef6a34a3
...
...
@@ -39,6 +39,7 @@ const ReturnPrDeliverVerify: React.FC = () => {
productList
:
productList
.
map
((
item
)
=>
({
productId
:
item
.
productId
,
returnCount
:
+
item
.
count
,
returnDetailId
:
item
.
returnDetailId
,
})),
deliveryTime
:
moment
(
deliveryTime
).
valueOf
(),
logisticsName
:
logisticsNameTxt
,
...
...
@@ -95,6 +96,7 @@ const ReturnPrDeliverVerify: React.FC = () => {
receiveCount
:
item
.
receiveCount
,
subCount
:
item
.
subCount
,
count
:
item
.
noDeliveryCount
,
returnDetailId
:
item
.
returnDetailId
,
}))
),
}
}
...
...
src/pages/commodity/products/addProducts.tsx
View file @
ef6a34a3
...
...
@@ -254,7 +254,6 @@ const AddProducts: React.FC<{}> = (props) => {
return
e
}
_params
.
unitPriceAndPicList
=
_productAttributeAndImageParams
console
.
log
(
_productAttributeAndImageParams
,
productAttributeAndImageParams
,
'001'
)
}
else
{
// 编辑时没有点击商品图片(新增没有点击也就没有数据)
if
(
productInfoByEdit
){
_params
.
unitPriceAndPicList
=
productInfoByEdit
.
unitPriceAndPicList
...
...
@@ -271,7 +270,6 @@ const AddProducts: React.FC<{}> = (props) => {
}
})
}
console
.
log
(
_params
.
unitPriceAndPicList
,
priceAttributeParams
,
'001'
)
}
}
...
...
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
ef6a34a3
...
...
@@ -415,7 +415,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
/* 生成传输数据 */
const
constructedPrarams
=
()
=>
{
let
_paramsArray
:
any
[]
=
[];
console
.
log
(
combineAttributeArray
,
'combineAttributeArray'
)
Array
.
isArray
(
combineAttributeArray
)
?
combineAttributeArray
.
map
((
item
,
index
)
=>
{
// 非数组情况下默认无组合 从table数据中获取 // 当属性减少的时候 这个combine数组还是之前的 /* code1 */
let
_tempArr
:
any
=
[]
Array
.
isArray
(
item
)
?
item
.
map
((
_item
,
_index
)
=>
{
/* code2 */
...
...
@@ -425,7 +424,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
id
:
attributeObjArr
[
_index
].
customerAttributeId
,
name
:
attributeObjArr
[
_index
].
attributeName
}
console
.
log
(
attributeObjArr
,
attributeValObjArr
,
item
,
index
,
_item
,
_index
,
_tableDataSource
,
'调试属性'
)
//
console.log(attributeObjArr, attributeValObjArr, item, index, _item, _index, _tableDataSource, '调试属性')
// @fixed bug: 属性名称相同的情况下 只找第一个元素 会出现id异常
let
filterData
=
null
for
(
let
i
=
0
;
i
<
attributeValObjArr
.
length
;
i
++
)
{
...
...
@@ -435,7 +434,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
break
;
}
}
console
.
log
(
filterData
,
'fff'
)
_tempObject
.
customerAttributeValue
=
{
// @fixed bug: 属性名称相同的情况下 只找第一个元素 会出现id异常
id
:
filterData
?.
id
?
filterData
.
id
:
null
,
...
...
src/pages/transaction/dealAbility/inquiryOffer/inquirySearch/index.tsx
View file @
ef6a34a3
import
React
,
{
useRef
}
from
'react'
;
import
React
,
{
useRef
,
useState
,
useEffect
}
from
'react'
;
import
Table
from
'@/pages/transaction/components/tableLayout'
;
import
{
history
}
from
'umi'
;
import
{
Tag
,
Button
,
Modal
}
from
'antd'
;
import
{
Tag
,
Button
,
Modal
,
Form
,
Select
,
Typography
}
from
'antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
moment
from
'moment'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
INQUIRYSEARCHSCHEMA
}
from
'./schema'
;
import
{
EXTERNALSTATE_COLOR
}
from
'@/pages/transaction/components/stateColor'
;
import
{
setAuth
,
setRouters
}
from
'@/utils/auth'
;
import
{
setAuth
,
setRouters
,
getAuth
}
from
'@/utils/auth'
;
import
{
isEmpty
}
from
'@antv/util'
;
const
InquirySearch
=
()
=>
{
interface
MemberRole
{
memberRoleId
:
number
;
memberRoleName
:
string
;
roleType
:
number
,
};
const
InquirySearch
=
()
=>
{
const
reload
=
useRef
<
any
>
({});
const
[
form
]
=
Form
.
useForm
();
const
[
role
,
setRole
]
=
useState
<
MemberRole
[]
>
([]);
const
[
isModalVisible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
[
orderId
,
setOrderId
]
=
useState
<
string
>
(
''
);
const
[
isId
,
setIsId
]
=
useState
<
number
>
()
const
format
=
(
text
,
fmt
?:
string
)
=>
{
return
<>
{
moment
(
text
).
format
(
fmt
||
"YYYY-MM-DD HH:mm:ss"
)
}
</>
}
/** 二次询价 */
const
secondInquiry
=
(
id
)
=>
{
const
handleFieldsAPI
=
(
memberRoleId
:
number
,
id
?)
=>
{
PublicApi
.
postMemberLoginSwitchrole
({
memberRoleId
:
11
,
}).
then
(
res
=>
{
memberRoleId
,
}).
then
(
(
res
:
any
)
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
...
...
@@ -34,6 +44,26 @@ const InquirySearch = () => {
}).
catch
(
err
=>
{
})
}
/** 二次询价 */
const
secondInquiry
=
(
id
,
orderId
)
=>
{
const
userInfo
:
any
=
getAuth
()
||
{};
const
roles
=
userInfo
.
roles
.
filter
(
_item
=>
_item
.
roleType
===
2
);
setRole
(
roles
);
setOrderId
(
orderId
);
setIsId
(
id
)
if
(
!
isEmpty
(
roles
))
{
if
(
roles
.
length
===
1
)
{
handleFieldsAPI
(
roles
[
0
].
memberRoleId
,
id
);
}
else
{
setVisible
(
true
)
}
}
else
{
Modal
.
info
({
content
:
'当前登录会员没有服务消费者角色,无法进行二次询价。'
})
}
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'询价单号'
,
...
...
@@ -85,7 +115,7 @@ const InquirySearch = () => {
<
Button
disabled=
{
record
.
isQuoted
===
1
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/inquiryOffer/waitAddOffer/offer?id=${record.id}`
)
}
type=
'link'
>
报价
</
Button
>
)
}
{
(
record
.
isShowSecondInquiry
===
true
)
&&
(
<
Button
type=
'link'
onClick=
{
()
=>
secondInquiry
(
record
.
id
)
}
>
二次询价
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
secondInquiry
(
record
.
id
,
record
.
inquiryListNo
)
}
>
二次询价
</
Button
>
)
}
{
(
record
.
isShowSecondInquiry
===
false
)
&&
(
<
Button
...
...
@@ -101,15 +131,58 @@ const InquirySearch = () => {
}
];
useEffect
(()
=>
{
if
(
isModalVisible
)
{
form
.
setFieldsValue
({
'memberRoleId'
:
role
[
0
].
memberRoleId
})
}
},
[
isModalVisible
])
const
handleSubmit
=
()
=>
{
form
.
validateFields
().
then
(
res
=>
{
handleFieldsAPI
(
res
.
memberRoleId
,
isId
)
})
}
return
(
<
Table
schema=
{
INQUIRYSEARCHSCHEMA
}
columns=
{
columns
}
effects=
"inquiryListNo"
fetch=
{
PublicApi
.
getTransactionProductInquiryList
}
reload=
{
reload
}
externalStatusFetch=
{
PublicApi
.
getTransactionQuotationtInquiryExternalStateEnum
()
}
/>
<>
<
Table
schema=
{
INQUIRYSEARCHSCHEMA
}
columns=
{
columns
}
effects=
"inquiryListNo"
fetch=
{
PublicApi
.
getTransactionProductInquiryList
}
reload=
{
reload
}
externalStatusFetch=
{
PublicApi
.
getTransactionQuotationtInquiryExternalStateEnum
()
}
/>
{
!
isEmpty
(
role
)
&&
(
<
Modal
title=
'选择会员角色'
visible=
{
isModalVisible
}
onOk=
{
handleSubmit
}
onCancel=
{
()
=>
setVisible
(
false
)
}
>
<
Form
form=
{
form
}
layout=
'vertical'
>
<
Form
.
Item
>
当前询价单
<
Typography
.
Text
type=
'danger'
>
{
orderId
}
</
Typography
.
Text
>
二次询价生成的询价单可通过会员角色:
<
Typography
.
Text
type=
'danger'
>
{
role
[
0
].
memberRoleName
}
</
Typography
.
Text
>
进行查看。
</
Form
.
Item
>
<
Form
.
Item
label=
'会员角色'
tooltip=
'二次询价的会员角色'
name=
'memberRoleId'
rules=
{
[{
required
:
true
,
message
:
'请选择会员角色'
}]
}
>
<
Select
>
{
role
.
map
((
_item
,
_i
)
=>
(
<
Select
.
Option
key=
{
`role${_i}`
}
value=
{
_item
.
memberRoleId
}
>
{
_item
.
memberRoleName
}
</
Select
.
Option
>
))
}
</
Select
>
</
Form
.
Item
>
</
Form
>
</
Modal
>
)
}
</>
)
}
...
...
src/pages/transaction/purchaseOrder/index.tsx
View file @
ef6a34a3
...
...
@@ -121,6 +121,7 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
const
handleCancel
=
async
(
id
)
=>
{
destoryRef
.
current
.
setVisible
(
true
)
destroyActions
.
reset
()
destroyActions
.
setFieldValue
(
'orderId'
,
id
)
}
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/index.tsx
View file @
ef6a34a3
...
...
@@ -227,10 +227,10 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
const
address
=
deliveryAddress
[
0
]
return
{
...
item
,
addressId
:
address
.
id
,
address
:
address
.
fullAddress
,
receiver
:
address
.
shipperName
,
phone
:
address
.
phone
,
addressId
:
address
.
id
||
null
,
address
:
address
.
fullAddress
||
null
,
receiver
:
address
.
shipperName
||
null
,
phone
:
address
.
phone
||
null
,
}
})
...
...
src/pages/transaction/purchaseOrder/orderCollectSrm/index.tsx
View file @
ef6a34a3
...
...
@@ -25,7 +25,7 @@ import ContractModalTable from './components/contractModalTable'
import
MaterialModalTable
from
'./components/materialModalTable'
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
export
interface
PurchaseOrderDetailProps
{}
export
interface
PurchaseOrderDetailProps
{
}
const
RowStyle
=
styled
(
props
=>
<
Row
style=
{
{
marginTop
:
12
}
}
justify=
'end'
{
...
props
}
>
{
props
.
children
}
...
...
@@ -156,10 +156,10 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
spec
:
item
.
type
,
quotedSpec
:
item
.
relevanceProductType
,
deliveryType
:
item
.
logistics
,
addressId
:
address
.
id
,
address
:
address
.
fullAddress
,
receiver
:
address
.
shipperName
,
phone
:
address
.
phone
,
addressId
:
address
.
id
||
null
,
address
:
address
.
fullAddress
||
null
,
receiver
:
address
.
shipperName
||
null
,
phone
:
address
.
phone
||
null
,
}
})
...
...
src/pages/transaction/saleOrder/index.tsx
View file @
ef6a34a3
...
...
@@ -83,7 +83,6 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => {
// 单个转单
const
handelTransformOrder
=
(
r
)
=>
{
console
.
log
(
r
)
transformRef
.
current
.
setVisible
(
true
)
transformActions
.
setFieldValue
(
'orders'
,
[
{
id
:
1
,
orderNo
:
'TYBHU'
,
digest
:
'666'
,
vendorMemberName
:
'999'
,
createTime
:
'2015-12-20 20:15:12'
,
amount
:
'123'
},
...
...
@@ -93,7 +92,7 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => {
// 批量转单
const
handleSubmitTransform
=
()
=>
{
alert
(
'批量转单'
)
}
/** 参照后台数据生成 */
...
...
@@ -136,7 +135,7 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => {
</
Space
>
registerVirtualBox
(
"CustomTitle"
,
({
children
,
schema
})
=>
{
return
<
p
>
当前勾运了
3张订单进行转单,转单后生成的采购订单可通过账号“广州中石科技采购商角色”
进行查看
</
p
>
return
<
p
>
当前勾运了
<
b
>
3
</
b
>
张订单进行转单,转单后生成的采购订单可通过会员角色
<
b
>
采购商角色
</
b
>
进行查看
</
p
>
})
return
<
PageHeaderWrapper
>
...
...
@@ -276,6 +275,23 @@ const SaleOrder: React.FC<SaleOrderProps> = (props) => {
schema=
{
{
type
:
'object'
,
properties
:
{
roleType
:
{
type
:
'number'
,
title
:
'会员角色(转单采购)'
,
enum
:
[
{
label
:
'采购商(默认)'
,
value
:
1
},
{
label
:
'渠道采购商'
,
value
:
2
}
],
"x-component-props"
:
{
require
:
true
,
}
},
NOT_SUBMIT_TITLE
:
{
type
:
'object'
,
"x-component"
:
"CustomTitle"
,
...
...
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