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
8e828c96
Commit
8e828c96
authored
Sep 02, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:
parent
962e2f01
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
46 additions
and
138 deletions
+46
-138
index.tsx
src/pages/commodity/products/constant/index.tsx
+24
-21
directChannel.tsx
src/pages/commodity/products/directChannel.tsx
+3
-3
fastModifyPrice.tsx
src/pages/commodity/products/fastModifyPrice.tsx
+3
-3
index.tsx
src/pages/commodity/products/index.tsx
+3
-3
viewProducts.tsx
src/pages/commodity/products/viewProducts.tsx
+8
-4
customBadge.tsx
src/pages/procurement/components/customBadge.tsx
+0
-28
addBrand.tsx
src/pages/trademark/addBrand.tsx
+0
-42
index.tsx
src/pages/trademark/index.tsx
+3
-13
viewBrand.tsx
src/pages/trademark/viewBrand.tsx
+0
-0
index.tsx
...er/orderCollectB2b/components/inquiryModalTable/index.tsx
+1
-7
index.tsx
...pages/transaction/purchaseOrder/orderCollectB2b/index.tsx
+1
-14
No files found.
src/pages/commodity/products/constant/index.tsx
View file @
8e828c96
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
ISchema
}
from
'@formily/antd'
;
import
{
Badge
}
from
'antd'
;
import
{
ColumnType
}
from
'antd/lib/table'
;
import
moment
from
'moment'
;
import
React
,
{
ReactNode
}
from
'react'
...
...
@@ -20,6 +20,18 @@ export const productStatusLabel = [
'未上架'
]
/** 商品状态对应的颜色 */
export
const
productStatusColor
=
[
''
,
'blue'
,
'cyan'
,
'orange'
,
'green'
,
'green'
,
'purple'
,
'gold'
,
]
/** 品类类型 */
export
const
customerCategoryTypeLabel
=
[
''
,
...
...
@@ -62,6 +74,15 @@ export enum CommodityType {
AGENT_SALE_COMMODITY
=
3
,
}
/** 商品的操作文本 */
export
const
opeartionLabel
=
[
''
,
'提交审核'
,
'修改商品'
,
'审核商品'
]
/** 查看商品 审核历史列 */
export
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -79,31 +100,13 @@ export const columns: ColumnType<any>[] = [
title
:
'状态'
,
dataIndex
:
'status'
,
key
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
if
(
record
.
status
===
4
)
component
=
(<><
span
className=
"commonStatusValid"
></
span
>
审核通过
</>)
else
if
(
record
.
status
===
1
)
component
=
(<><
span
className=
"commonStatusInvalid"
></
span
>
待提交审核
</>)
else
if
(
record
.
status
===
2
)
component
=
(<><
span
className=
"commonStatusModify"
></
span
>
待审核
</>)
else
if
(
record
.
status
===
3
)
component
=
(<><
span
className=
"commonStatusStop"
></
span
>
审核不通过
</>)
return
component
}
render
:
(
t
,
r
)
=>
<
Badge
color=
{
productStatusColor
[
t
]
}
text=
{
productStatusLabel
[
t
]
}
/>
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
key
:
'operation'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
if
(
record
.
operation
===
1
)
return
'提交审核'
else
if
(
record
.
operation
===
2
)
return
'修改商品'
else
if
(
record
.
operation
===
3
)
return
'审核商品'
}
render
:
text
=>
opeartionLabel
[
text
]
},
{
title
:
'操作时间'
,
...
...
src/pages/commodity/products/directChannel.tsx
View file @
8e828c96
import
React
,
{
useState
,
useEffect
,
useRef
,
ReactNode
}
from
'react'
import
{
history
}
from
'umi'
import
{
Button
,
Form
,
Card
,
Modal
,
Select
,
Row
,
Col
,
Dropdown
,
Tooltip
,
Menu
,
Space
,
message
,
Checkbox
}
from
'antd'
import
{
Button
,
Form
,
Card
,
Modal
,
Select
,
Row
,
Col
,
Dropdown
,
Tooltip
,
Menu
,
Space
,
message
,
Checkbox
,
Badge
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PlusOutlined
,
...
...
@@ -27,7 +27,7 @@ import { searchBrandOptionEffect, searchCustomerCategoryOptionEffect } from './e
import
EyePreview
from
'@/components/EyePreview'
import
moment
from
'moment'
import
{
GetProductChannelCommodityGetShopResponse
}
from
'@/services/ProductApi'
import
{
productStatusLabel
}
from
'./constant'
import
{
productStatus
Color
,
productStatus
Label
}
from
'./constant'
// 定义选择的行数据的类型
interface
Item
{
...
...
@@ -146,7 +146,7 @@ const DirectChannel: React.FC<{}> = () => {
title
:
'商品状态'
,
dataIndex
:
'status'
,
key
:
'id'
,
render
:
(
t
ext
:
any
,
record
:
any
)
=>
<><
span
className=
"commonStatusModify"
></
span
>
{
productStatusLabel
[
text
]
}
<
/>
render
:
(
t
)
=>
<
Badge
color=
{
productStatusColor
[
t
]
}
text=
{
productStatusLabel
[
t
]
}
/>
},
{
title
:
'操作'
,
...
...
src/pages/commodity/products/fastModifyPrice.tsx
View file @
8e828c96
import
React
,
{
useState
,
useEffect
,
useRef
,
ReactNode
}
from
'react'
import
{
Button
,
Form
,
Card
,
Modal
,
Checkbox
,
Row
,
Col
,
Input
,
}
from
'antd'
import
{
Button
,
Form
,
Card
,
Modal
,
Checkbox
,
Row
,
Col
,
Input
,
Badge
,
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PlusOutlined
,
...
...
@@ -16,7 +16,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
searchCustomerCategoryOptionEffect
,
searchBrandOptionEffect
}
from
'./effect'
import
{
fastSchema
}
from
'./schema/productSchema'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
priceTypeLabel
,
productStatusLabel
,
validatorNumberRange
}
from
'./constant'
import
{
priceTypeLabel
,
productStatus
Color
,
productStatus
Label
,
validatorNumberRange
}
from
'./constant'
const
formActions
=
createFormActions
();
...
...
@@ -103,7 +103,7 @@ const FastModifyPrice: React.FC<{}> = () => {
title
:
'状态'
,
dataIndex
:
'status'
,
key
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<><
span
className=
"commonStatusModify"
></
span
>
{
productStatusLabel
[
text
]
}
<
/>
render
:
(
text
)
=>
<
Badge
color=
{
productStatusColor
[
text
]
}
text=
{
productStatusLabel
[
text
]
}
/>
},
{
title
:
'操作'
,
...
...
src/pages/commodity/products/index.tsx
View file @
8e828c96
import
React
,
{
useState
,
useEffect
,
useRef
,
useMemo
}
from
'react'
import
{
history
}
from
'umi'
import
{
Button
,
Form
,
Card
,
Modal
,
Result
,
Progress
,
Select
,
Tooltip
,
Checkbox
,
Row
,
Col
,
Dropdown
,
Menu
,
Space
,
message
}
from
'antd'
import
{
Button
,
Form
,
Card
,
Modal
,
Result
,
Progress
,
Select
,
Tooltip
,
Checkbox
,
Row
,
Col
,
Dropdown
,
Menu
,
Space
,
message
,
Badge
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PlusOutlined
,
...
...
@@ -28,7 +28,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
searchBrandOptionEffect
,
searchCustomerCategoryOptionEffect
}
from
'./effect'
import
{
getAuth
}
from
'@/utils/auth'
import
useSetSearchValueInTable
from
'@/hooks/useSetSearchValueInTable'
import
{
priceTypeLabel
,
productStatusLabel
}
from
'./constant'
import
{
priceTypeLabel
,
productStatus
Color
,
productStatus
Label
}
from
'./constant'
import
EyePreview
from
'@/components/EyePreview'
import
UpperProductModalTable
from
'./components/upperProductModalTable'
import
{
Item
}
from
'@/components/ButtonTabs'
...
...
@@ -164,7 +164,7 @@ const Products: React.FC<{}> = () => {
title
:
'商品状态'
,
dataIndex
:
'status'
,
key
:
'status'
,
render
:
t
ext
=>
<><
span
className=
"commonStatusModify"
></
span
>
{
productStatusLabel
[
text
]
}
<
/>
render
:
t
=>
<
Badge
color=
{
productStatusColor
[
t
]
}
text=
{
productStatusLabel
[
t
]
}
/>
},
{
title
:
'操作'
,
...
...
src/pages/commodity/products/viewProducts.tsx
View file @
8e828c96
import
React
,
{
useState
,
ReactNode
,
useEffect
}
from
'react'
import
{
history
}
from
'umi'
import
{
Steps
,
Card
,
Space
,
Tooltip
,
Row
,
Col
,
Descriptions
,
Table
,
Tabs
,
Tag
,
Divider
}
from
'antd'
import
{
Steps
,
Card
,
Space
,
Tooltip
,
Row
,
Col
,
Descriptions
,
Table
,
Tabs
,
Tag
,
Divider
,
Badge
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
QuestionCircleOutlined
,
...
...
@@ -15,7 +15,7 @@ import {
GetProductCommodityGetCommodityResponse
,
GetProductCommodityGetCommodityCheckRecordResponse
,
}
from
'@/services/ProductApi'
import
{
carriageTypeLabel
,
columns
,
customerCategoryTypeLabel
,
deliveryTypeLabel
,
priceTypeLabel
,
productStatusLabel
}
from
'./constant'
import
{
carriageTypeLabel
,
columns
,
customerCategoryTypeLabel
,
deliveryTypeLabel
,
priceTypeLabel
,
productStatus
Color
,
productStatus
Label
}
from
'./constant'
interface
IAttributeByValue
{
groupName
:
string
;
...
...
@@ -112,8 +112,12 @@ const viewProducts: React.FC<{}> = () => {
<
Descriptions
colon=
{
true
}
style=
{
{
paddingLeft
:
128
}
}
>
<
Descriptions
.
Item
label=
"商品品牌"
>
{
productDetail
?.
brand
?.
name
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"商品品类"
>
{
productDetail
?.
customerCategory
?.
fullName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"商品状态"
><
span
className=
"commonStatusModify"
></
span
>
{
productStatusLabel
[
productDetail
?.
status
]
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"商品类型"
><
span
className=
"commonStatusValid"
></
span
>
{
customerCategoryTypeLabel
[
productDetail
?.
customerCategory
?.
type
]
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"商品状态"
>
<
Badge
color=
{
productStatusColor
[
productDetail
?.
status
]
}
text=
{
productStatusLabel
[
productDetail
?.
status
]
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"商品类型"
>
<
Badge
color=
{
productStatusColor
[
productDetail
?.
customerCategory
?.
type
]
}
text=
{
customerCategoryTypeLabel
[
productDetail
?.
customerCategory
?.
type
]
}
/>
</
Descriptions
.
Item
>
{
productDetail
?.
commodityShopList
?.
length
>
0
&&
<
Descriptions
.
Item
label=
"上架商城"
>
...
...
src/pages/procurement/components/customBadge.tsx
View file @
8e828c96
...
...
@@ -10,34 +10,6 @@ export interface StatusColorsProps {
color
:
string
,
}
// className映射
const
classNameMap
=
[
"commonStatusStop"
,
// 灰色
"commonStatusInvalid"
,
// 黄色
"commonStatusModify"
,
// 蓝色
"commonStatusValid"
,
// 绿色
"commonStatusStop"
,
// 灰色
"commonStatusInvalid"
,
// 黄色
"commonStatusModify"
,
// 蓝色
"commonStatusValid"
,
// 绿色
"commonStatusStop"
,
// 灰色
"commonStatusInvalid"
,
// 黄色
"commonStatusModify"
,
// 蓝色
"commonStatusValid"
,
// 绿色
"commonStatusStop"
,
// 灰色
"commonStatusInvalid"
,
// 黄色
"commonStatusModify"
,
// 蓝色
"commonStatusValid"
,
// 绿色
"commonStatusStop"
,
// 灰色
"commonStatusInvalid"
,
// 黄色
"commonStatusModify"
,
// 蓝色
"commonStatusValid"
,
// 绿色
]
// 订单内部状态显示
const
CustomBadge
:
React
.
FC
<
StatusColorsProps
>
=
(
props
)
=>
{
// const { status, type } = props
...
...
src/pages/trademark/addBrand.tsx
View file @
8e828c96
...
...
@@ -232,22 +232,6 @@ const AddBrand: React.FC<{}> = () => {
>
<
Input
disabled=
{
banSomeField
}
placeholder=
"输入品牌名称"
/>
</
Form
.
Item
>
{
/* <Form.Item
label='审核状态'
name="status"
initialValue={1}
style={{display:'none'}}
>
<span className="commonStatusModify"></span>待提交审核
</Form.Item>
<Form.Item
label='是否有效'
name="isEnable"
initialValue={true}
style={{display:'none'}}
>
<span className="commonStatusValid"></span>有效
</Form.Item> */
}
<
Form
.
Item
name=
"logoUrl"
label=
{
<
span
>
品牌LOGO
</
span
>
}
...
...
@@ -261,19 +245,6 @@ const AddBrand: React.FC<{}> = () => {
]
}
className=
{
styles
.
uploadForm
}
>
{
/* <Upload
disabled={banSomeField}
name="file"
listType="picture-card"
className="avatar-uploader"
showUploadList={false}
action="/api/file/file/upload"
beforeUpload={beforeLogoUpload}
onChange={handleUploadLogoChange}
data={{ fileType: UPLOAD_TYPE }}
>
{logoUrl ? <img src={logoUrl} alt="avatar" style={{ width: 102, height: 102, objectFit: 'cover' }} /> : uploadLogoButton}
</Upload> */
}
<
UploadImage
disabled=
{
banSomeField
}
listType=
"picture-card"
...
...
@@ -297,19 +268,6 @@ const AddBrand: React.FC<{}> = () => {
name=
"proveUrl"
// valuePropName="fileList"
>
{
/* <Upload
name="file"
listType="picture-card"
className="avatar-uploader"
action="/api/file/file/upload"
fileList={fileList}
beforeUpload={beforeUpload}
onChange={handleChange}
data={{ fileType: UPLOAD_TYPE }}
showUploadList={{ showPreviewIcon: false }}
>
{fileList.length >= 20 ? null : uploadButton}
</Upload> */
}
<
UploadImage
listType=
"picture-card"
fileList=
{
fileList
}
...
...
src/pages/trademark/index.tsx
View file @
8e828c96
import
React
,
{
ReactNode
,
useRef
,
useEffect
,
useMemo
}
from
'react'
import
{
history
}
from
'umi'
import
{
Button
,
Popconfirm
,
Card
,
message
,
Dropdown
,
Menu
,
Modal
,
Space
}
from
'antd'
import
{
Button
,
Popconfirm
,
Card
,
message
,
Dropdown
,
Menu
,
Modal
,
Space
,
Badge
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PlusOutlined
,
...
...
@@ -20,6 +20,7 @@ import { FORM_FILTER_PATH } from '@/formSchema/const'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
useSetSearchValueInTable
from
'@/hooks/useSetSearchValueInTable'
import
{
productStatusColor
,
productStatusLabel
}
from
'../commodity/products/constant'
const
{
confirm
}
=
Modal
...
...
@@ -114,18 +115,7 @@ const Trademark: React.FC<{}> = () => {
title
:
'审核状态'
,
dataIndex
:
'status'
,
key
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
if
(
record
.
status
===
1
)
component
=
(<><
span
className=
"commonStatusInvalid"
></
span
>
待提交审核
</>)
else
if
(
record
.
status
===
2
)
component
=
(<><
span
className=
"commonStatusModify"
></
span
>
待审核
</>)
else
if
(
record
.
status
===
3
)
component
=
(<><
span
className=
"commonStatusStop"
></
span
>
审核不通过
</>)
else
if
(
record
.
status
===
4
)
component
=
(<><
span
className=
"commonStatusValid"
></
span
>
审核通过
</>)
return
component
}
render
:
(
t
)
=>
<
Badge
color=
{
productStatusColor
[
t
]
}
text=
{
productStatusLabel
[
t
]
}
/>
},
{
title
:
'操作'
,
...
...
src/pages/trademark/viewBrand.tsx
View file @
8e828c96
This diff is collapsed.
Click to expand it.
src/pages/transaction/purchaseOrder/orderCollectB2b/components/inquiryModalTable/index.tsx
View file @
8e828c96
...
...
@@ -47,18 +47,12 @@ const InquiryModalTable:React.FC<InquiryModalTableProps> = (props) => {
id
:
item
.
inquiryListId
})
// 将询价报价单的id字段 冗余给商品列表
// schemaAction.setFieldValue('orderProductRequests', data.map((v: any) => {
// v.memberId = item.offerMemberId
// v.memberRoleId = item.offerMemberRoleId
// return v
// }))
let
newData
=
data
.
map
((
v
:
any
)
=>
{
v
.
memberId
=
item
.
offerMemberId
v
.
memberRoleId
=
item
.
offerMemberRoleId
return
v
})
// 把地址信息冗余给商品字段render
schemaAction
.
setFieldValue
(
'products'
,
await
filterProductDataById
([],
newData
))
schemaAction
.
setFieldValue
(
'vendorMemberName'
,
item
.
offerMemberName
)
schemaAction
.
setFieldValue
(
'vendorMemberId'
,
item
.
offerMemberId
)
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/index.tsx
View file @
8e828c96
...
...
@@ -22,7 +22,6 @@ import { useProductTable } from './model/useProductTable'
import
styled
from
'styled-components'
import
{
useUpdate
}
from
'@umijs/hooks'
import
{
PublicApi
}
from
'@/services/api'
import
{
formatTimeString
}
from
'@/utils'
import
{
changeRouterTitleByStatus
}
from
'../../_public/order/utils'
import
{
ReadyAddOrderDetailContext
}
from
'../context'
import
{
help
}
from
'../../common'
...
...
@@ -138,7 +137,6 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
// 订单商品
const
{
productAddButton
,
productRef
,
productColumns
,
productComponents
,
...
sectionProps
}
=
useProductTable
(
addSchemaAction
)
let
timerSignature
=
null
// 页面进入时, 当前所处的下单模式
useEffect
(()
=>
{
if
(
id
)
{
...
...
@@ -161,11 +159,6 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
shopDataRef
.
current
.
orderMode
=
parseInt
(
modelType
)
}
return
()
=>
{
clearInterval
(
timerSignature
)
timerSignature
=
null
}
},
[])
const
handleSubmit
=
async
(
value
)
=>
{
...
...
@@ -218,7 +211,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
setBtnLoading
(
true
)
/** 字段转换 */
//
合同下单
取供应商默认的发货地址
// 取供应商默认的发货地址
const
{
data
:
deliveryAddress
}
=
await
PublicApi
.
getLogisticsSelectListMemberShipperAddress
({
memberId
:
params
.
vendorMemberId
,
roleId
:
params
.
vendorRoleId
...
...
@@ -282,8 +275,6 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
}
}
const
_params
=
procurementProcessField
(
params
)
const
shops
=
addSchemaAction
.
getFieldState
(
'shopId'
).
props
.
enum
||
[]
...
...
@@ -292,8 +283,6 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
params
.
shopEnvironment
=
shop
[
'environment'
]
params
.
shopName
=
shop
[
'label'
]
console
.
log
(
_params
)
if
(
id
)
{
fnResult
=
await
PublicApi
.
postOrderBuyerCreateB2bUpdate
({...
_params
,
orderId
:
id
})
}
else
{
...
...
@@ -411,10 +400,8 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
<
NiceForm
loading=
{
formLoading
}
previewPlaceholder=
' '
// editable={pageStatus !== PageStatus.PREVIEW}
value=
{
initFormValue
}
actions=
{
addSchemaAction
}
// schema={mergeAllSchemas[page_type]}
schema=
{
initFormSchema
}
onSubmit=
{
handleSubmit
}
components=
{
{
...
...
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