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
eae42aa1
Commit
eae42aa1
authored
Sep 04, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
851998ab
38aa787a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
527 additions
and
178 deletions
+527
-178
menu.ts
src/locales/zh-CN/menu.ts
+3
-2
index.ts
src/module/channelProductModule/index.ts
+5
-2
addPropertyValue.tsx
...pages/classAndProperty/propertyValue/addPropertyValue.tsx
+2
-1
index.tsx
src/pages/classAndProperty/propertyValue/index.tsx
+5
-3
selectChannel.tsx
...pages/commodity/products/addChannelItem/selectChannel.tsx
+93
-61
selectProduct.tsx
...pages/commodity/products/addChannelItem/selectProduct.tsx
+1
-1
setPrice.tsx
src/pages/commodity/products/addChannelItem/setPrice.tsx
+10
-7
addDirectChannel.tsx
src/pages/commodity/products/addDirectChannel.tsx
+5
-1
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+33
-3
index.less
src/pages/commodity/products/addProductsItem/index.less
+58
-0
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+1
-0
productDescFormCloud.tsx
...mmodity/products/addProductsItem/productDescFormCloud.tsx
+0
-0
productDescFormDefault.tsx
...odity/products/addProductsItem/productDescFormDefault.tsx
+3
-3
index.less
src/pages/commodity/products/index.less
+13
-1
viewProducts.tsx
src/pages/commodity/products/viewProducts.tsx
+12
-7
addBrand.tsx
src/pages/trademark/addBrand.tsx
+4
-4
index.tsx
src/pages/trademark/index.tsx
+3
-1
detailFormColumnType.ts
src/pages/transaction/common/detailFormColumnType.ts
+177
-69
detail.tsx
src/pages/transaction/enquirySubmit/components/detail.tsx
+0
-0
detail.tsx
src/pages/transaction/enquirySubmit/toAddSubmit/detail.tsx
+89
-9
index.ts
src/store/channelProduct/index.ts
+10
-3
No files found.
src/locales/zh-CN/menu.ts
View file @
eae42aa1
/*
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors:
XieZhiXi
ong
* @LastEditTime: 2020-09-0
3 09:56:52
* @LastEditors:
LeeJianc
ong
* @LastEditTime: 2020-09-0
4 17:28:55
*/
export
default
{
...
...
@@ -112,6 +112,7 @@ export default {
'menu.tranactionAbility.enquirySubmit'
:
'需求发布'
,
'menu.tranactionAbility.enquirySubmit.toAddSubmitList'
:
'待新增需求单'
,
'menu.tranactionAbility.enquirySubmit.addEnquiry'
:
'新增需求单'
,
'menu.tranactionAbility.enquirySubmit.viewEnquiryDetail'
:
'需求单详情'
,
'menu.tranactionAbility.enquirySubmit.enquiryOne'
:
'待审核报价单(一级)'
,
'menu.tranactionAbility.enquirySubmit.enquiryTwo'
:
'待审核报价单(二级)'
,
'menu.tranactionAbility.purchaseOrder'
:
'采购订单'
,
...
...
src/module/channelProductModule/index.ts
View file @
eae42aa1
import
{
GetProductChannelCommodityGetCommodityListResponseDetail
}
from
'@/services'
;
import
{
GetProductChannelCommodityGetCommodityListResponseDetail
,
GetProductChannelCommodityGetCommodityUnitPriceResponse
}
from
'@/services'
;
export
interface
IChannelProductModule
{
productSelectRowInStore
:
GetProductChannelCommodityGetCommodityListResponseDetail
;
priceType
:
number
;
productName
:
string
;
currentActiveKey
:
number
;
currentActiveKey
:
string
;
currentOperateChannel
:
string
;
tableDataInSetPrice
:
GetProductChannelCommodityGetCommodityUnitPriceResponse
[];
setProductSelectRowInStore
(
data
:
GetProductChannelCommodityGetCommodityListResponseDetail
):
void
;
setPriceType
(
data
:
number
):
void
;
setProductName
(
data
:
string
):
void
;
setCurrentActiveKey
(
data
:
string
):
void
;
setCurrentOperateChannel
(
data
:
string
):
void
;
setTableDataInSetPrice
(
data
:
GetProductChannelCommodityGetCommodityUnitPriceResponse
[]):
void
;
}
\ No newline at end of file
src/pages/classAndProperty/propertyValue/addPropertyValue.tsx
View file @
eae42aa1
...
...
@@ -74,6 +74,7 @@ const AddPropertyValue: React.FC<{}> = () => {
const
handleSubmitAllSetting
=
()
=>
{
attrValueForm
.
validateFields
().
then
(
values
=>
{
const
{
attrId
,
attrName
}
=
history
.
location
.
query
let
pararms
=
{...
values
}
delete
pararms
.
attributeName
if
(
JSON
.
stringify
(
pararms
.
attributeValue
)
===
'{}'
)
...
...
@@ -82,7 +83,7 @@ const AddPropertyValue: React.FC<{}> = () => {
PublicApi
.
postProductCustomerSaveOrUpdateCustomerAttributeValue
(
pararms
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
// history.goBack()
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue?
before=
${
history
.
location
.
query
.
attrId
}
`
)
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue?
attrId=
${
attrId
}
&attrName=
${
attrName
}
`
)
})
}).
catch
(
error
=>
{
...
...
src/pages/classAndProperty/propertyValue/index.tsx
View file @
eae42aa1
...
...
@@ -51,8 +51,8 @@ const PropertyValue: React.FC<{}> = () => {
useEffect
(()
=>
{
let
prefix
=
sessionStorage
.
getItem
(
'beforeKeyPrefix'
)
let
beforeKey
=
history
.
location
.
query
.
before
console
.
log
(
prefix
,
beforeKey
)
let
beforeKey
=
history
.
location
.
query
.
attrId
if
(
beforeKey
){
// 展开之前的选择项
setSelectKey
(
beforeKey
)
treeActions
.
setExpandedKeys
([
`
${
prefix
}
_
${
beforeKey
}
`
])
// 拼接不正常的key
...
...
@@ -240,7 +240,9 @@ const PropertyValue: React.FC<{}> = () => {
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue/addPropertyValue?attrId=${selectKey}&attrName=${selectNode._title}`
)
}
}
onClick=
{
()
=>
{
history
.
push
(
`/memberCenter/commodityAbility/classAndProperty/propertyValue/addPropertyValue?attrId=${selectKey||history.location.query.attrId}&attrName=${selectNode?._title||history.location.query.attrName}`
)
}
}
>
新建
</
Button
>
...
...
src/pages/commodity/products/addChannelItem/selectChannel.tsx
View file @
eae42aa1
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
import
{
history
}
from
'umi'
;
import
{
Button
,
Form
,
Card
,
Tabs
,
Input
,
Radio
,
Table
,
message
,
Row
,
Col
}
from
'antd'
import
{
Button
,
Form
,
Card
,
Tabs
,
Input
,
Radio
,
Table
,
message
,
Row
,
Col
,
Select
}
from
'antd'
import
{
PlusOutlined
,
SettingOutlined
,
}
from
'@ant-design/icons'
...
...
@@ -14,6 +14,7 @@ import { store } from '@/store'
import
{
inject
,
observer
}
from
'mobx-react'
const
{
Search
}
=
Input
const
{
Option
}
=
Select
const
layout
=
{
labelCol
:
{
...
...
@@ -24,6 +25,12 @@ const layout = {
},
}
interface
IOption
{
key
:
string
;
value
:
number
;
children
:
string
;
}
interface
IProps
{
onRef
:
(
refs
:
any
)
=>
void
;
}
...
...
@@ -37,6 +44,7 @@ const SelectChannel:React.FC<IProps> = (props) => {
const
[
memberRoleList
,
setMemberRoleList
]
=
useState
<
any
[]
>
([])
const
[
selectedMemberRowKeys
,
setSelectedMemberRowKeys
]
=
useState
<
any
>
([])
const
[
selectMemberRow
,
setSelectMemberRow
]
=
useState
<
any
[]
>
([])
// 选中的会员弹框数据
const
[
selectedOption
,
setSelectedOption
]
=
useState
<
IOption
>
()
const
{
ChannelProudctStore
}
=
store
const
{
...
...
@@ -117,12 +125,25 @@ const SelectChannel:React.FC<IProps> = (props) => {
useEffect
(()
=>
{
onRef
(
formMember
)
// 获取所有的会员角色
PublicApi
.
getMemberManageRoleList
().
then
(
res
=>
{
const
{
data
}
=
res
setMemberRoleList
(
data
)
if
(
data
.
length
>
0
){
let
initSelectOption
=
{
key
:
'0'
,
value
:
data
[
0
].
roleId
,
children
:
data
[
0
].
roleName
}
setSelectedOption
(
initSelectOption
)
}
})
},
[])
// 获取渠道会员
const
fetchMemberData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getMemberManageChannelLowerPage
(
params
).
then
(
res
=>
{
PublicApi
.
getMemberManageChannelLowerPage
(
{
memberIds
:
[],
name
:
selectedOption
.
children
,
roleId
:
selectedOption
.
value
,...
params
}
).
then
(
res
=>
{
const
{
data
}
=
res
resolve
(
data
)
})
...
...
@@ -170,68 +191,79 @@ const SelectChannel:React.FC<IProps> = (props) => {
setCurrentOperateChannel
(
'所有渠道会员'
)
}
const
roleChange
=
(
value
:
number
,
option
:
IOption
)
=>
{
setSelectedOption
(
option
)
}
return
(<>
<
Row
>
<
Col
span=
{
18
}
>
<
Form
{
...
layout
}
form=
{
formMember
}
name=
"add-channel-merchant"
labelAlign=
"left"
>
{
/* {
memberRoleList.length>0 && <Form.Item name="channelMemberRoleId">
<Radio.Group buttonStyle="solid" className={styles.customizeRadio}>
{
memberRoleList.map((item, index) => (
<Radio.Button key={index} value={item.roleId}>{item.roleName}</Radio.Button>
))
}
</Radio.Group>
</Form.Item>
} */
}
<
Form
.
Item
name=
"channelMemberRoleId"
>
<
Radio
.
Group
buttonStyle=
"solid"
defaultValue=
{
1
}
className=
{
styles
.
customizeRadio
}
>
<
Radio
.
Button
key=
{
1
}
value=
{
1
}
>
渠道采购商
</
Radio
.
Button
>
<
Radio
.
Button
key=
{
2
}
value=
{
2
}
>
渠道自有采购商
</
Radio
.
Button
>
</
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
name=
"isAllMember"
label=
"选择渠道会员"
rules=
{
[{
required
:
true
,
message
:
'请选择渠道会员'
}]
}
initialValue=
{
isAllMember
}
{
memberRoleList
.
length
>
0
&&
<>
<
Col
span=
{
18
}
>
<
Form
{
...
layout
}
form=
{
formMember
}
name=
"add-channel-merchant"
labelAlign=
"left"
colon=
{
false
}
initialValues=
{
{
channelMemberRoleId
:
memberRoleList
[
0
].
roleId
}
}
>
<
Radio
.
Group
onChange=
{
handleIsAllMemberChange
}
>
<
Radio
value=
{
true
}
>
所有渠道会员(默认)
</
Radio
>
<
Radio
value=
{
false
}
>
指定渠道会员
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
</
Form
>
</
Col
>
<
Col
span=
{
6
}
style=
{
{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
flexWrap
:
'wrap'
}
}
>
<
div
>
<
p
>
<
Search
placeholder=
"渠道会员名称"
onSearch=
{
value
=>
console
.
log
(
value
)
}
style=
{
{
width
:
256
}
}
/>
</
p
>
</
div
>
<
div
>
<
p
>
<
Button
type=
"text"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
clickBatchSetting
}
>
批量设置渠道商品
</
Button
>
</
p
>
</
div
>
</
Col
>
{
/* <Form.Item name="channelMemberRoleId">
<Radio.Group buttonStyle="solid" defaultValue={1} className={styles.customizeRadio}>
<Radio.Button key={1} value={1}>渠道采购商</Radio.Button>
<Radio.Button key={2} value={2}>渠道自有采购商</Radio.Button>
</Radio.Group>
</Form.Item> */
}
<
Form
.
Item
label=
"选择渠道角色"
name=
"channelMemberRoleId"
>
<
Select
onChange=
{
roleChange
}
placeholder=
"选择渠道会员角色"
>
{
memberRoleList
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
}
value=
{
item
.
roleId
}
>
{
item
.
roleName
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
name=
"isAllMember"
label=
"选择渠道会员"
rules=
{
[{
required
:
true
,
message
:
'请选择渠道会员'
}]
}
initialValue=
{
isAllMember
}
>
<
Radio
.
Group
onChange=
{
handleIsAllMemberChange
}
>
<
Radio
value=
{
true
}
>
所有渠道会员(默认)
</
Radio
>
<
Radio
value=
{
false
}
>
指定渠道会员
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
</
Form
>
</
Col
>
<
Col
span=
{
6
}
style=
{
{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
flexWrap
:
'wrap'
}
}
>
<
div
>
<
p
>
<
Search
placeholder=
"渠道会员名称"
onSearch=
{
value
=>
console
.
log
(
value
)
}
style=
{
{
width
:
256
}
}
/>
</
p
>
</
div
>
<
div
>
<
p
>
<
Button
type=
"text"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
clickBatchSetting
}
>
批量设置渠道商品
</
Button
>
</
p
>
</
div
>
</
Col
>
</>
}
</
Row
>
{
!
isAllMember
?
<>
...
...
src/pages/commodity/products/addChannelItem/selectProduct.tsx
View file @
eae42aa1
...
...
@@ -116,7 +116,7 @@ const SelectProduct:React.FC<IProps> = (props) => {
]
useEffect
(()
=>
{
onRef
(
productFormRef
)
onRef
(
formProduct
)
formProduct
.
setFieldsValue
({
source
:
source
})
// 获取会员角色列表
...
...
src/pages/commodity/products/addChannelItem/setPrice.tsx
View file @
eae42aa1
...
...
@@ -69,11 +69,12 @@ const SetPrice:React.FC<IProps> = (props) => {
priceType
,
productName
,
productSelectRowInStore
,
currentOperateChannel
currentOperateChannel
,
setTableDataInSetPrice
}
=
ChannelProudctStore
useEffect
(()
=>
{
onRef
(
formPrice
)
},
[])
...
...
@@ -93,6 +94,7 @@ const SetPrice:React.FC<IProps> = (props) => {
}
const
structureTable
=
(
data
:
any
,
name
?:
string
)
=>
{
console
.
log
(
data
,
'structureTableData'
)
// 构建table 列columns
let
col
:
any
=
[]
let
temp
:
any
=
[]
...
...
@@ -148,11 +150,11 @@ const SetPrice:React.FC<IProps> = (props) => {
})
_tableData
.
push
({
"id"
:
item
.
id
,
// 行数据id
"goodsId"
:
item
.
goods
.
id
,
// 货品ID
"goodsId"
:
item
.
goods
?.
id
||
''
,
// 货品ID 可能为null
"索引"
:
index
,
// "商品名称": productRowCtl.selectRow[0].name,
"商品名称"
:
name
||
productName
,
"对应货品"
:
item
.
goods
.
name
,
"对应货品"
:
item
.
goods
?.
name
||
''
,
...
temp
,
"单价"
:
item
.
unitPrice
})
...
...
@@ -322,6 +324,7 @@ const SetPrice:React.FC<IProps> = (props) => {
newTabeData
[
curretSetPriceRow
[
'索引'
]]
=
_row
}
setPriceTableData
(
newTabeData
)
console
.
log
(
newTabeData
,
'价格修改之后的tableData'
)
})
}
...
...
@@ -398,9 +401,9 @@ const SetPrice:React.FC<IProps> = (props) => {
</
Button
>
{
priceTableData
.
length
>
0
&&
priceType
!=
2
&&
<
Button
type=
"text"
style=
{
{
float
:
'right'
}
}
<
Button
type=
"text"
style=
{
{
float
:
'right'
}
}
onClick=
{
clickBatchSetPrice
}
>
<
SettingOutlined
/>
...
...
src/pages/commodity/products/addDirectChannel.tsx
View file @
eae42aa1
...
...
@@ -35,7 +35,10 @@ const AddDirectChannel:React.FC<{}> = (props) => {
}
=
ChannelProudctStore
useEffect
(()
=>
{
console
.
log
(
'初始化'
)
return
()
=>
{
setCurrentActiveKey
(
'1'
)
}
},
[])
...
...
@@ -47,6 +50,7 @@ const AddDirectChannel:React.FC<{}> = (props) => {
const
onSave
=
()
=>
{
let
data
=
formRefs
.
map
(
async
__
=>
{
console
.
log
(
__
,
'____'
)
return
(
await
__
.
validateFields
()
)
...
...
src/pages/commodity/products/addProducts.tsx
View file @
eae42aa1
...
...
@@ -14,11 +14,15 @@ import PriceAttributeForm from './addProductsItem/priceAttributeForm'
import
LogisticsForm
from
'./addProductsItem/logisticsForm'
import
OtherForm
from
'./addProductsItem/otherForm'
import
ProductImageForm
from
'./addProductsItem/productImageForm'
import
ProductDescFormOne
from
'./addProductsItem/productDescFormOne'
import
ProductDescFormDefualt
from
'./addProductsItem/productDescFormDefault'
import
ProductDescFormCloud
from
'./addProductsItem/productDescFormCloud'
import
{
inject
,
observer
}
from
'mobx-react'
import
{
store
}
from
'@/store'
import
{
PublicApi
}
from
'@/services/api'
import
{
render
}
from
'@/app'
;
const
demoFetch
=
require
(
'../../../../demo'
).
fetchConfig
const
{
TabPane
}
=
Tabs
...
...
@@ -28,6 +32,7 @@ const AddProducts: React.FC<{}> = (props) => {
const
[
attributeList
,
setAttributeList
]
=
useState
<
any
[]
>
([])
const
[
clickTabIndex
,
setClickTabIndex
]
=
useState
<
string
[]
>
([
'1'
])
const
[
isDisableSaveBtn
,
setIsDisableSaveBtn
]
=
useState
<
boolean
>
(
false
)
const
[
currentTemplateName
,
setCurrentTemplateName
]
=
useState
<
string
>
()
let
[
formRefs
,
setFormRefs
]
=
useState
([])
//子form的ref数组
const
{
ProductStore
}
=
store
const
{
...
...
@@ -45,6 +50,8 @@ const AddProducts: React.FC<{}> = (props) => {
}
=
ProductStore
useEffect
(()
=>
{
productDescriptionTemplate
()
const
{
id
}
=
history
.
location
.
query
if
(
id
){
const
makeRequest
=
async
()
=>
{
...
...
@@ -60,10 +67,30 @@ const AddProducts: React.FC<{}> = (props) => {
return
()
=>
{
clearData
([])
console
.
log
(
'添加商品组件卸载'
)
}
},
[])
// useEffect(() => {
// renderTemplate(currentTemplateName)
// }, [currentTemplateName])
// 获取页面使用模板
const
productDescriptionTemplate
=
async
()
=>
{
let
globalData
=
await
demoFetch
()
PublicApi
.
getTemplateGoodsFindUseGoodsTemplate
({
siteId
:
globalData
.
global
.
siteId
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
setCurrentTemplateName
(
res
.
data
.
fileName
)
})
}
// 切换模板
const
renderTemplate
=
()
=>
{
// if(currentTemplateName === 'science')
return
<
ProductDescFormDefualt
/>
// else if(currentTemplateName === 'cloud')
// return <ProductDescFormCloud />
}
const
onSave
=
()
=>
{
setIsDisableSaveBtn
(
true
)
const
{
id
}
=
history
.
location
.
query
...
...
@@ -296,7 +323,10 @@ const AddProducts: React.FC<{}> = (props) => {
<
ProductImageForm
/>
</
TabPane
>
<
TabPane
tab=
"商品描述"
key=
"6"
>
<
ProductDescFormOne
/>
{
/* <ProductDescFormDefualt /> */
}
{
renderTemplate
()
}
</
TabPane
>
<
TabPane
tab=
"物流信息"
key=
"7"
>
<
LogisticsForm
...
...
src/pages/commodity/products/addProductsItem/index.less
View file @
eae42aa1
...
...
@@ -46,4 +46,61 @@
position: absolute;
bottom: 0;
}
}
// productDescFormCloud // yunxiancai template
.cloud-container{
width: 790px;
}
.cloud-media-content-box{
width: 790px;
margin: 24px 0;
height: auto !important;
}
.cloud-descript-box{
position: relative;
width: 790px;
margin: 24px 0;
border:1px solid rgba(235,236,240,1);
text-align: center;
color:rgba(151,160,175,1);
// height: 148px;
height: 48px;
p{
height: 128px;
line-height: 128px;
}
.cloudPVideo, .cloudMiddleAddBtn{
// height: 44px;
// line-height: 1.5;
position: absolute;
top:50%;
left:50%;
transform: translate(-50%, -50%);
}
.cloudDivVideo, .cloudDivImage{
margin: 24px auto;
height: auto;
img{
width: 320px;
height: 240px;
}
}
.cloud-right-btn{
position: absolute;
top: 0;
right: 0;
Button{
display: block;
width:36px;
height:36px;
background:rgba(250,251,252,1);
border-color: #ebecf0;
border-radius: 0px;
border-top: none;
border-right: none;
}
}
}
\ No newline at end of file
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
eae42aa1
...
...
@@ -72,6 +72,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
if
(
history
.
location
.
query
?.
id
){
// 编辑情况下 用于判断价格类型和显示单位
setPlanPrice
(
productInfoByEdit
?.
priceType
)
handleUnitSearch
(
getPriceAttributeFormParamsByEdit
.
unitName
)
setMinOrderNumber
(
productInfoByEdit
?.
minOrder
)
// 先设置最小起订数 便于后续价格校验
}
return
()
=>
{
console
.
log
(
'价格属性组件卸载'
)
...
...
src/pages/commodity/products/addProductsItem/productDescFormCloud.tsx
0 → 100644
View file @
eae42aa1
This diff is collapsed.
Click to expand it.
src/pages/commodity/products/addProductsItem/productDescForm
One
.tsx
→
src/pages/commodity/products/addProductsItem/productDescForm
Default
.tsx
View file @
eae42aa1
...
...
@@ -15,7 +15,7 @@ export interface Iprops {
import
{
inject
,
observer
}
from
'mobx-react'
import
{
store
}
from
'@/store'
const
ProductDescForm
One
:
React
.
FC
<
Iprops
>
=
(
props
)
=>
{
const
ProductDescForm
Defualt
:
React
.
FC
<
Iprops
>
=
(
props
)
=>
{
const
[
fileImageList
,
setFileImageList
]
=
useState
<
any
>
([])
const
[
videoList
,
setVideoList
]
=
useState
<
any
>
([])
...
...
@@ -180,4 +180,4 @@ const ProductDescFormOne: React.FC<Iprops> = (props) => {
</>)
}
export
default
observer
(
ProductDescFormOne
)
\ No newline at end of file
export
default
observer
(
ProductDescFormDefualt
)
\ No newline at end of file
src/pages/commodity/products/index.less
View file @
eae42aa1
...
...
@@ -145,11 +145,13 @@
padding: 12px 0;
border:1px solid rgba(235,236,240,1);
display: flex;
flex-flow: wrap;
justify-content: left;
.imgItem{
width:180px;
height:180px;
margin-left: 16px;
margin-bottom: 12px;
border:1px solid rgba(235,236,240,1);
img{
width: 100%;
...
...
@@ -161,11 +163,18 @@
height:240px;
margin-left: 16px;
border:1px solid rgba(235,236,240,1);
video {
width: 100%;
height: 100%;
}
}
p{
padding: 16px;
padding:
0
16px;
}
}
.description-word-box{
flex-direction: column;
}
.product-img-box{
margin: 24px;
padding: 12px 0;
...
...
@@ -192,6 +201,9 @@
border-radius:4px;
color:rgba(0,179,122,1);
}
.descript-null {
opacity: 0.6;
}
// 修改单价
.site-input-right {
...
...
src/pages/commodity/products/viewProducts.tsx
View file @
eae42aa1
...
...
@@ -8,6 +8,7 @@ import {
UserOutlined
}
from
'@ant-design/icons'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
cx
from
'classnames'
import
ReutrnEle
from
'@/components/ReturnEle'
import
styles
from
"./index.less"
import
{
PublicApi
}
from
'@/services/api'
...
...
@@ -583,10 +584,14 @@ const viewProducts: React.FC<{}> = () => {
</
Space
>
<
Space
direction=
"vertical"
style=
{
{
width
:
'100%'
}
}
>
<
Card
headStyle=
{
{
borderBottom
:
'none'
}
}
title=
"商品描述"
>
{
/* 预留 文字区块 */
}
{
/* <div className={styles.descriptionBox}>
<p>商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述</p>
</div> */
}
{
/* 文字区块 */
}
<
div
className=
{
cx
(
styles
.
descriptionBox
,
styles
.
descriptionWordBox
)
}
>
{
productDetail
?.
commodityRemark
?.
word
?.
length
>
0
?
productDetail
?.
commodityRemark
?.
word
.
map
((
_item
,
_index
)
=>
_item
&&
<
p
>
{
_item
}
</
p
>
)
:
<
p
className=
{
styles
.
descriptNull
}
>
暂无文字数据
</
p
>
}
</
div
>
{
/* 视频区块 */
}
<
div
className=
{
styles
.
descriptionBox
}
>
{
...
...
@@ -594,15 +599,15 @@ const viewProducts: React.FC<{}> = () => {
<
video
src=
{
_item
}
controls=
{
true
}
>
您的浏览器不支持视频标签,请及时升级。
</
video
>
</
div
>)
:
<
p
>
暂无
数据
</
p
>
</
div
>)
:
<
p
className=
{
styles
.
descriptNull
}
>
暂无视频
数据
</
p
>
}
</
div
>
{
/* 图片区块 */
}
<
div
className=
{
styles
.
descriptionBox
}
>
{
productDetail
?.
commodityRemark
?.
image
?.
length
>
0
?
productDetail
?.
commodityRemark
?.
image
.
map
((
_item
,
_index
)
=>
<
div
key=
{
_index
}
className=
{
styles
.
imgItem
}
>
productDetail
?.
commodityRemark
?.
image
?.
length
>
0
?
productDetail
?.
commodityRemark
?.
image
.
map
((
_item
,
_index
)
=>
_item
&&
<
div
key=
{
_index
}
className=
{
styles
.
imgItem
}
>
<
img
src=
{
_item
}
/>
</
div
>)
:
<
p
>
暂无
数据
</
p
>
</
div
>)
:
<
p
className=
{
styles
.
descriptNull
}
>
暂无图片
数据
</
p
>
}
</
div
>
</
Card
>
...
...
src/pages/trademark/addBrand.tsx
View file @
eae42aa1
...
...
@@ -149,7 +149,7 @@ const AddBrand: React.FC<{}> = () => {
//@ts-ignore
PublicApi
.
postProductBrandApplyCheckBrand
({
id
:
responseId
}).
then
(
res
=>
{
setCurrentStep
(
1
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
history
.
goBack
()
},
1000
)
})
...
...
@@ -263,10 +263,10 @@ const AddBrand: React.FC<{}> = () => {
<
Space
direction=
"vertical"
style=
{
{
width
:
'100%'
}
}
>
<
Card
headStyle=
{
{
borderBottom
:
'none'
}
}
title=
{
tips
}
>
<
Row
>
<
Col
span=
{
2
}
>
{
/*
<Col span={2}>
<div>横版</div>
</
Col
>
<
Col
span=
{
2
2
}
>
</Col>
*/
}
<
Col
span=
{
2
4
}
>
<
Form
.
Item
name=
"proveUrl"
// valuePropName="fileList"
...
...
src/pages/trademark/index.tsx
View file @
eae42aa1
...
...
@@ -142,12 +142,14 @@ const Trademark: React.FC<{}> = () => {
const
handelDelete
=
(
record
:
any
)
=>
{
PublicApi
.
postProductBrandDeleteBrand
({
id
:
record
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
ref
.
current
.
reload
()
})
}
const
handleApplyCheck
=
(
record
:
any
)
=>
{
PublicApi
.
postProductBrandApplyCheckBrand
({
id
:
record
.
id
}).
then
(
res
=>
{
ref
.
current
.
reload
()
ref
.
current
.
reload
()
})
}
...
...
src/pages/transaction/
enquirySubmit/toAddSubmit
/detailFormColumnType.ts
→
src/pages/transaction/
common
/detailFormColumnType.ts
View file @
eae42aa1
...
...
@@ -3,69 +3,10 @@
* @Date: 2020-08-27 16:27:53
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-0
1 10:08:44
* @LastEditTime: 2020-09-0
4 17:01:46
*/
import
{
ColumnType
}
from
'antd/lib/table/interface'
export
const
equiryColumns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'memberId'
,
align
:
'center'
,
key
:
'memberId'
,
},
{
title
:
'商品规格型号'
,
dataIndex
:
'name'
,
key
:
'name'
,
align
:
'left'
},
{
title
:
'品牌'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'颜色'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'尺码'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'面料'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'产地'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'单位'
,
dataIndex
:
'levelTag'
,
key
:
'levelTag'
,
align
:
'center'
},
{
title
:
'采购数量'
,
dataIndex
:
'levelTag'
,
key
:
'levelTag'
,
align
:
'center'
}
]
import
moment
from
'moment'
export
const
dockingColumn
:
ColumnType
<
any
>
[]
=
[
{
title
:
'序号'
,
...
...
@@ -109,21 +50,188 @@ export const dockingColumn: ColumnType<any>[] = [
},
{
title
:
'状态'
,
title
:
'
需求发送
状态'
,
dataIndex
:
'state'
,
key
:
'state'
,
align
:
'center'
},
{
title
:
'操作'
,
dataIndex
:
'levelTag'
,
key
:
'levelTag'
,
align
:
'center'
align
:
'center'
,
render
:(
text
:
any
)
=>
(
text
==
0
?
'未发生需求'
:
'已发送需求'
)
}
]
export
const
memberColumn
=
(
children
?)
=>
{
let
columns
:
ColumnType
<
any
>
[]
=
[]
columns
=
[
{
title
:
'序号'
,
dataIndex
:
'memberId'
,
align
:
'center'
,
key
:
'memberId'
,
},
{
title
:
'会员名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
align
:
'left'
},
{
title
:
'会员类型'
,
dataIndex
:
'memberTypeName'
,
key
:
'memberTypeName'
,
align
:
'center'
},
{
title
:
'会员角色'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'会员等级'
,
dataIndex
:
'levelTag'
,
key
:
'levelTag'
,
align
:
'center'
},
{
title
:
'是否归属会员'
,
dataIndex
:
'membershipOrNot'
,
key
:
'membershipOrNot'
,
align
:
'center'
,
render
:(
text
:
any
)
=>
(
text
==
0
?
'否'
:
'是'
)
},
{
title
:
'需求发送状态'
,
dataIndex
:
'state'
,
key
:
'state'
,
align
:
'center'
,
render
:(
text
:
any
,
records
,
index
)
=>
children
?
children
(
text
,
records
,
index
)
:
''
}
]
return
columns
}
/**
* @description: 内部流转interiorRequisitionForms
* 外部流转 externalRequisitionForms
* @param {type}
* @return {type}
*/
export
const
externalColumn
=
(
childeren
,
stateList
?)
=>
{
let
culumn
:
ColumnType
<
any
>
[]
=
[]
return
culumn
=
[
{
title
:
'序号'
,
dataIndex
:
'id'
,
align
:
'center'
,
key
:
'id'
,
},
{
title
:
'操作角色'
,
dataIndex
:
'roleName'
,
align
:
'center'
,
key
:
'roleName'
,
},
{
title
:
'状态'
,
dataIndex
:
'state'
,
align
:
'center'
,
key
:
'state'
,
render
:(
text
:
any
,
record
:
any
)
=>
stateList
(
text
)
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
align
:
'center'
,
key
:
'operation'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
align
:
'center'
,
key
:
'operationTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
childeren
(
text
)
},
{
title
:
'审核意见'
,
dataIndex
:
'auditOpinion'
,
align
:
'left'
,
key
:
'auditOpinion'
}
]
}
export
const
interiorColumn
=
(
childeren
,
stateList
?)
=>
{
let
culumn
:
ColumnType
<
any
>
[]
=
[]
return
culumn
=
[
{
title
:
'序号'
,
dataIndex
:
'id'
,
align
:
'center'
,
key
:
'id'
,
},
{
title
:
'操作人'
,
dataIndex
:
'roleName'
,
align
:
'center'
,
key
:
'roleName'
,
},
{
title
:
'部门'
,
dataIndex
:
'department'
,
align
:
'center'
,
key
:
'department'
,
},
{
title
:
'职位'
,
dataIndex
:
'position'
,
align
:
'center'
,
key
:
'position'
,
},
{
title
:
'状态'
,
dataIndex
:
'state'
,
align
:
'center'
,
key
:
'state'
,
render
:(
text
:
any
,
record
:
any
)
=>
stateList
(
text
)
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
align
:
'center'
,
key
:
'operation'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
align
:
'center'
,
key
:
'operationTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
childeren
(
text
)
},
{
title
:
'审核意见'
,
dataIndex
:
'auditOpinion'
,
align
:
'left'
,
key
:
'auditOpinion'
}
]
}
...
...
src/pages/transaction/enquirySubmit/components/detail.tsx
View file @
eae42aa1
This diff is collapsed.
Click to expand it.
src/pages/transaction/enquirySubmit/toAddSubmit/detail.tsx
View file @
eae42aa1
...
...
@@ -19,11 +19,11 @@ import {
import
{
history
}
from
'umi'
import
{
LinkOutlined
,
PlusOutlined
,
QuestionCircleOutlined
,
MinusOutlined
,
MinusCircleOutlined
}
from
'@ant-design/icons'
import
{
Row
,
Col
,
Card
,
Button
,
Table
,
Popconfirm
,
Radio
,
DatePicker
,
Form
,
Spin
,
Select
,
Cascader
,
Tabs
,
Input
,
Tooltip
,
Space
}
from
'antd'
;
Form
,
Spin
,
Select
,
Switch
,
Cascader
,
Tabs
,
Input
,
Tooltip
,
Space
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
moment
from
'moment'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
dockingColumn
}
from
'.
/detailFormColumnType'
import
{
memberColumn
}
from
'../../common
/detailFormColumnType'
import
{
getAuth
}
from
'@/utils/auth'
import
{
PublicApi
}
from
'@/services/api'
import
styles
from
'./templateForm.less'
;
...
...
@@ -41,6 +41,7 @@ import {
import
{
store
}
from
'@/store'
import
colorTag
from
'@/pages/logistics/colorTag'
import
{
Effects
}
from
'bizcharts'
import
{
check
}
from
'prettier'
const
{
TabPane
}
=
Tabs
const
{
TextArea
}
=
Input
...
...
@@ -112,6 +113,7 @@ const Detail: React.FC<{}> = () => {
const
[
categoryId
,
setcategoryId
]
=
useState
(
null
)
//选择的分类id
const
[
otherList
,
setotherList
]
=
useState
([])
//动态tab循环
const
[
dockingList
,
setdockingList
]
=
useState
([])
//需求列表
const
[
memberList
,
setmemberList
]
=
useState
([])
const
[
productSource
,
setproductSource
]
=
useState
([])
//商品列表 新增
const
[
shipperAddressList
,
setshipperAddressList
]
=
useState
([])
const
[
CategoryTreeOne
,
setCategoryTreeOne
]
=
useState
([])
...
...
@@ -280,6 +282,61 @@ const Detail: React.FC<{}> = () => {
// setShowCategory(null)
}
/**
* @description: 需求格式
* @param {type}
* @return {type}
*/
const
dockingColumn
:
ColumnType
<
any
>
[]
=
[
{
title
:
'序号'
,
dataIndex
:
'id'
,
align
:
'center'
,
key
:
'id'
,
},
{
title
:
'会员名称'
,
dataIndex
:
'memberName'
,
key
:
'memberName'
,
align
:
'left'
},
{
title
:
'会员类型'
,
dataIndex
:
'memberTypeName'
,
key
:
'memberTypeName'
,
align
:
'center'
},
{
title
:
'会员角色'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'会员等级'
,
dataIndex
:
'levelTag'
,
key
:
'levelTag'
,
align
:
'center'
},
{
title
:
'是否归属会员'
,
dataIndex
:
'membershipOrNot'
,
key
:
'membershipOrNot'
,
align
:
'center'
,
render
:(
text
:
any
)
=>
(
text
==
0
?
'否'
:
'是'
)
},
{
title
:
'需求发送状态'
,
dataIndex
:
'state'
,
key
:
'state'
,
align
:
'center'
}
]
const
equiryColumns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -328,8 +385,10 @@ const Detail: React.FC<{}> = () => {
// 会员添加弹窗控制
const
handleOkAddMember
=
()
=>
{
setVisibleChannelMember
(
false
)
setproductSource
(
memberRowCtl
.
selectRow
)
console
.
log
(
'memberRowCtl.selectRow'
,
memberRowCtl
.
selectRow
)
memberRowCtl
.
selectRow
.
forEach
((
v
)
=>
{
v
[
'state'
]
=
true
})
setmemberList
(
memberRowCtl
.
selectRow
)
}
const
[
pagination
,
setPagination
]
=
useState
({
...
...
@@ -560,7 +619,17 @@ const Detail: React.FC<{}> = () => {
console
.
log
(
'item'
,
item
)
})
values
[
'voucherTime'
]
=
null
values
[
'memberIds'
]
=
[]
values
[
'memberIds'
]
=
[]
// memberRowCtl.selectedRowKeys
if
(
platType
==
3
){
values
[
'memberIds'
]
=
memberList
.
filter
((
v
)
=>
v
.
state
).
map
(
v
=>
{
return
v
.
memberId
})
}
else
if
(
platType
==
2
){
values
[
'memberIds'
]
=
dockingList
.
filter
((
v
)
=>
v
.
state
).
map
(
v
=>
{
return
v
.
memberId
})
}
values
[
'demandDockings'
]
=
[]
values
[
'requisitionFormProducts'
]
=
[...
productList
]
console
.
log
(
'productList'
,
productList
)
...
...
@@ -620,6 +689,15 @@ const Detail: React.FC<{}> = () => {
};
console
.
log
(
'Received values of form: '
,
values
);
}
const
switchState
=
(
text
,
record
,
index
)
=>
{
console
.
log
(
66
,
text
,
record
,
index
)
return
<
Switch
defaultChecked=
{
text
?
true
:
false
}
size=
"small"
onChange=
{
(
checked
)
=>
{
console
.
log
(
checked
);
memberList
[
index
].
state
=
checked
setmemberList
([...
memberList
])
}
}
/>
}
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
...
...
@@ -1027,12 +1105,14 @@ const Detail: React.FC<{}> = () => {
</
Space
>
{
platType
==
3
&&
<
Button
style=
{
{
marginBottom
:
16
,
marginTop
:
24
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
handleOptionBtn
(
2
)
}
type=
'dashed'
>
选择会员
</
Button
>
<>
<
Button
style=
{
{
marginBottom
:
16
,
marginTop
:
24
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
handleOptionBtn
(
2
)
}
type=
'dashed'
>
选择会员
</
Button
>
<
Table
rowKey=
{
"id"
}
dataSource=
{
memberList
}
columns=
{
memberColumn
(
switchState
)
}
pagination=
{
pagination
}
/>
</>
}
{
platType
!=
1
&&
<
Table
dataSource=
{
dockingList
}
rowSelection=
{
rowSelection
}
columns=
{
dockingColumn
}
pagination=
{
pagination
}
/>
(
platType
!=
1
&&
platType
!=
3
)
&&
<
Table
rowKey=
{
"id"
}
dataSource=
{
dockingList
}
columns=
{
dockingColumn
}
pagination=
{
pagination
}
/>
}
...
...
src/store/channelProduct/index.ts
View file @
eae42aa1
import
{
action
,
computed
,
observable
,
runInAction
}
from
'mobx'
import
{
IChannelProductModule
}
from
'@/module/channelProductModule'
;
// mobx要用到的数据类型
import
{
GetProductChannelCommodityGetCommodityListResponseDetail
,
GetProductChannelCommodityGetCommodityUnitPriceResponse
}
from
'@/services'
;
/**
* 渠道直采商品
...
...
@@ -7,12 +8,13 @@ import { IChannelProductModule } from '@/module/channelProductModule'; // mobx
class
ChannelProductStore
implements
IChannelProductModule
{
// 选择商品区块
@
observable
public
productSelectRowInStore
:
any
=
null
;
@
observable
public
productSelectRowInStore
:
GetProductChannelCommodityGetCommodityListResponseDetail
=
null
;
@
observable
public
priceType
:
number
=
null
@
observable
public
productName
:
string
=
null
@
observable
public
currentActiveKey
:
string
=
'1'
@
observable
public
currentOperateChannel
:
string
=
null
@
observable
public
tableDataInSetPrice
:
GetProductChannelCommodityGetCommodityUnitPriceResponse
[]
=
null
// 加工接口返回的数据,用户编辑回显数据
// @computed
...
...
@@ -23,7 +25,7 @@ class ChannelProductStore implements IChannelProductModule {
// }
@
action
.
bound
public
setProductSelectRowInStore
(
data
:
any
)
{
public
setProductSelectRowInStore
(
data
:
GetProductChannelCommodityGetCommodityListResponseDetail
)
{
this
.
productSelectRowInStore
=
data
;
}
...
...
@@ -47,6 +49,11 @@ class ChannelProductStore implements IChannelProductModule {
this
.
currentOperateChannel
=
data
;
}
@
action
.
bound
public
setTableDataInSetPrice
(
data
:
GetProductChannelCommodityGetCommodityUnitPriceResponse
[]){
this
.
tableDataInSetPrice
=
data
;
}
}
export
default
ChannelProductStore
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