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
c5959296
Commit
c5959296
authored
Jan 10, 2022
by
卢均锐
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
* 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
: fix: 处理商品新增/编辑页面报警告的问题
parents
e5f571aa
386e40b3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
65 deletions
+26
-65
responseCode.ts
src/locales/zh-CN/responseCode.ts
+1
-1
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+13
-11
basicInfoForm.tsx
...ages/commodity/products/addProductsItem/basicInfoForm.tsx
+9
-43
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+3
-3
productDescFormYang.tsx
...ommodity/products/addProductsItem/productDescFormYang.tsx
+0
-1
index.tsx
...ransaction/saleOrder/addLogisticsOrder/constant/index.tsx
+0
-6
No files found.
src/locales/zh-CN/responseCode.ts
View file @
c5959296
...
...
@@ -967,7 +967,7 @@ export default {
"37143"
:
"已存在适用于指定合同的采购流程规则,不能配置适用所有合同的采购流程规则"
,
"37144"
:
"供应商未配置交易流程规则"
,
"37145"
:
"供应商配置的交易流程规则中未包含采购商品"
,
"37146"
:
"当前
供应
会员未配置采购交易流程,无法提交订单"
,
"37146"
:
"当前
采购
会员未配置采购交易流程,无法提交订单"
,
"56041"
:
"活动商品不能为空"
,
"56042"
:
"已达到活动最大限购数量,您最多可购买%s件!"
,
"56043"
:
"已超出账户id限购数"
,
...
...
src/pages/commodity/products/addProducts.tsx
View file @
c5959296
...
...
@@ -30,12 +30,14 @@ const AddProducts: React.FC<{}> = (props) => {
const
{
siteId
}
=
SiteStore
const
[
isEnableCheck
,
setIsEnableCheck
]
=
useState
(
true
)
const
[
responseId
,
setReponseId
]
=
useState
<
number
>
(
null
)
const
[
attributeList
,
setAttributeList
]
=
useState
<
any
[]
>
([])
//
const [attributeList, setAttributeList] = useState<any[]>([])
const
[
clickTabIndex
,
setClickTabIndex
]
=
useState
<
string
[]
>
([
'1'
])
const
[
clickCurrentIndex
,
setClickCurrentIndex
]
=
useState
<
string
>
(
'1'
)
const
[
isDisableSaveBtn
,
setIsDisableSaveBtn
]
=
useState
<
boolean
>
(
false
)
const
[
currentTemplateName
,
setCurrentTemplateName
]
=
useState
<
string
>
()
let
[
formRefs
,
setFormRefs
]
=
useState
([])
//子form的ref数组
// let [formRefs, setFormRefs] = useState([]) //子form的ref数组
const
childFormRefs
=
useRef
([])
// 子form的ref数组
const
attributeListRef
=
useRef
([])
// 品类下的属性传递给商品属性tab
const
clearPartRef
=
useRef
<
number
>
(
1
)
const
{
ProductStore
}
=
store
...
...
@@ -152,9 +154,9 @@ const AddProducts: React.FC<{}> = (props) => {
const
onSave
=
()
=>
{
setIsDisableSaveBtn
(
true
)
const
{
id
}
=
history
.
location
.
query
if
(
formRefs
.
length
>
0
)
{
if
(
childFormRefs
.
current
.
length
>
0
)
{
try
{
let
data
=
formRefs
.
map
(
async
__
=>
{
let
data
=
childFormRefs
.
current
.
map
(
async
__
=>
{
return
(
await
__
.
current
.
validateFields
()
)
...
...
@@ -402,21 +404,21 @@ const AddProducts: React.FC<{}> = (props) => {
<
Tabs
onChange=
{
callback
}
type=
"card"
defaultActiveKey=
"1"
>
<
TabPane
tab=
{
intl
.
formatMessage
({
id
:
'commodity.products.addProducts.tab.1'
})
}
key=
"1"
>
<
BasicInfoForm
onRef=
{
(
refs
)
=>
setFormRefs
([...
formRefs
,
refs
])
}
onChangeAttributeList=
{
(
_lists
:
any
)
=>
setAttributeList
(
_lists
)
}
/>
onRef=
{
(
refs
)
=>
childFormRefs
.
current
=
[...
childFormRefs
.
current
,
refs
]
}
onChangeAttributeList=
{
(
_lists
)
=>
attributeListRef
.
current
=
_lists
}
/>
</
TabPane
>
<
TabPane
tab=
{
intl
.
formatMessage
({
id
:
'commodity.products.addProducts.tab.2'
})
}
key=
"2"
>
<
SelectGoodsForm
/>
</
TabPane
>
<
TabPane
tab=
{
intl
.
formatMessage
({
id
:
'commodity.products.addProducts.tab.3'
})
}
key=
"3"
>
<
ProductAttributeForm
onRef=
{
(
refs
)
=>
setFormRefs
([...
formRefs
,
refs
])
}
attributesData=
{
attributeList
}
onRef=
{
(
refs
)
=>
childFormRefs
.
current
=
[...
childFormRefs
.
current
,
refs
]
}
attributesData=
{
attributeList
Ref
.
current
}
/>
</
TabPane
>
<
TabPane
tab=
{
intl
.
formatMessage
({
id
:
'commodity.products.addProducts.tab.4'
})
}
key=
"4"
>
<
PriceAttributeForm
onRef=
{
(
refs
)
=>
setFormRefs
([...
formRefs
,
refs
])
}
onRef=
{
(
refs
)
=>
childFormRefs
.
current
=
[...
childFormRefs
.
current
,
refs
]
}
/>
</
TabPane
>
<
TabPane
tab=
{
intl
.
formatMessage
({
id
:
'commodity.products.addProducts.tab.5'
})
}
key=
"5"
>
...
...
@@ -429,12 +431,12 @@ const AddProducts: React.FC<{}> = (props) => {
</
TabPane
>
<
TabPane
tab=
{
intl
.
formatMessage
({
id
:
'commodity.products.addProducts.tab.7'
})
}
key=
"7"
>
<
LogisticsForm
onRef=
{
(
refs
)
=>
setFormRefs
([...
formRefs
,
refs
])
}
onRef=
{
(
refs
)
=>
childFormRefs
.
current
=
[...
childFormRefs
.
current
,
refs
]
}
/>
</
TabPane
>
<
TabPane
tab=
{
intl
.
formatMessage
({
id
:
'commodity.products.addProducts.tab.8'
})
}
key=
"8"
>
<
OtherForm
onRef=
{
(
refs
)
=>
setFormRefs
([...
formRefs
,
refs
])
}
onRef=
{
(
refs
)
=>
childFormRefs
.
current
=
[...
childFormRefs
.
current
,
refs
]
}
/>
</
TabPane
>
</
Tabs
>
...
...
src/pages/commodity/products/addProductsItem/basicInfoForm.tsx
View file @
c5959296
...
...
@@ -103,9 +103,15 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
if
(
id
&&
getBasicFormParamsByEdit
?.
name
)
{
handleBrandSearch
(
getBasicFormParamsByEdit
.
brandName
)
onCustomerCategoryChange
(
getBasicFormParamsByEdit
.
customerCategoryId
)
// 赋[]初值 显示一行区域选择
if
(
!
getBasicFormParamsByEdit
.
commodityAreaList
.
length
)
{
getBasicFormParamsByEdit
.
commodityAreaList
[
0
]
=
[]
}
basicForm
.
setFieldsValue
(
getBasicFormParamsByEdit
)
setSelectBrandId
(
getBasicFormParamsByEdit
.
brandId
)
setIsUpdateAttribute
(
productInfoByEdit
.
isUpdateAttribute
)
}
else
{
basicForm
.
setFieldsValue
({
'commodityAreaList'
:
[[]]})
}
},
[
getBasicFormParamsByEdit
])
...
...
@@ -265,46 +271,6 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
</
Select
>
</
Form
.
Item
>
}
{
/* <Form.Item
name="customerCategoryId"
label="商品品类"
rules={[
{
required: true,
message: '请选择商品品类'
},
]}
>
<Cascader
allowClear={false}
disabled={history.location.query?.id}
options={customerCategoryTree}
fieldNames={{ label: 'title', value: 'id', children: 'children' }}
onChange={onCustomerCategoryChange}
placeholder="请选择品类"
/>
</Form.Item>
<Form.Item
name="brandId"
label="商品品牌"
>
<Select
disabled={!isUpdateAttribute}
showSearch={true}
showArrow={true}
placeholder="请输入或选择商品品牌"
allowClear
value={brandValue}
defaultActiveFirstOption={false}
filterOption={false}
onSearch={handleBrandSearch}
onChange={handleBrandChange}
onFocus={()=>handleBrandSearch(null)}
style={{ width: '100%' }}
>
{brandData.map(d => <Option value={d.id} key={d.id}>{d.name}</Option>)}
</Select>
</Form.Item> */
}
<
Form
.
Item
name=
"name"
label=
{
...
...
@@ -371,9 +337,9 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
</
Form
.
Item
>
<
Form
.
List
name=
"commodityAreaList"
>
{
(
fields
:
any
[],
{
add
,
remove
}:
any
)
=>
{
if
(
!
fields
.
length
)
{
add
()
}
//
if (!fields.length)
{
//
add()
//
}
return
(
<
div
>
{
fields
.
map
((
field
,
index
)
=>
(
...
...
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
c5959296
...
...
@@ -284,7 +284,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
let
_priceRange
=
_tableDataSource
[
record
[
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.index'
})]][
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.unitPrice'
})]
if
(
!
_priceRange
||
JSON
.
stringify
(
_priceRange
)
===
'{}'
)
return
null
return
Object
.
keys
(
_priceRange
).
map
((
v
,
i
)
=>
{
return
<
><
span
key=
{
i
}
>
{
v
===
'0-0'
?
''
:
`${v}:`
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
planPrice
===
3
?
''
:
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.currency'
})
}{
_priceRange
[
v
]
}
</
span
></
span
><
br
/></
>
return
<
p
key=
{
i
}
><
span
>
{
v
===
'0-0'
?
''
:
`${v}:`
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
planPrice
===
3
?
''
:
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.currency'
})
}{
_priceRange
[
v
]
}
</
span
></
span
></
p
>
})
}
})
...
...
@@ -295,7 +295,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
render
:
(
text
,
record
)
=>
{
const
assistPrice
=
_tableDataSource
[
record
[
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.index'
})]][
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.planPrice'
})]
if
(
assistPrice
&&
Array
.
isArray
(
assistPrice
))
{
return
assistPrice
.
map
(
p
=>
<
p
>
{
planPrice
===
3
?
p
:
`${intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.currency' })}${p}`
}
</
p
>)
return
assistPrice
.
map
(
(
p
,
i
)
=>
<
p
key=
{
i
}
>
{
planPrice
===
3
?
p
:
`${intl.formatMessage({ id: 'commodity.products.addProductsItem.priceAttributeForm.currency' })}${p}`
}
</
p
>)
}
else
if
(
assistPrice
)
{
return
planPrice
===
3
?
assistPrice
:
(
isNaN
(
assistPrice
)
?
`¥
${
0.00
}
`
:
`
${
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.currency'
})}${
assistPrice
}
`
)
}
...
...
@@ -305,7 +305,7 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
title
:
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.option'
}),
dataIndex
:
'option'
,
width
:
100
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
render
:
(
text
,
record
)
=>
{
return
(
<>
<
Button
type=
'link'
onClick=
{
()
=>
clickSetPrice
(
record
)
}
>
{
planPrice
===
3
?
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.button.1'
})
:
intl
.
formatMessage
({
id
:
'commodity.products.addProductsItem.priceAttributeForm.button.2'
})
}
</
Button
>
...
...
src/pages/commodity/products/addProductsItem/productDescFormYang.tsx
View file @
c5959296
...
...
@@ -76,7 +76,6 @@ const ProductDescFormDefualt: React.FC<{}> = () => {
},
[
selectCategoryId
])
useEffect
(()
=>
{
console
.
log
(
fileImageList
,
'fileImageList'
)
// 设置传输数据
setProductDescription
({
video
:
videoList
,
...
...
src/pages/transaction/saleOrder/addLogisticsOrder/constant/index.tsx
View file @
c5959296
...
...
@@ -22,12 +22,6 @@ export const PriceComp = (props) => {
/**新增物流单 初始值转换 */
export
const
procurmentRenderInit
=
(
initValue
:
any
)
=>
{
return
{
// ...initValue.requirement,
// vendorMemberId: initValue.vendorMemberId,
// vendorMemberName: initValue.vendorMemberName,
// vendorRoleId: initValue.vendorRoleId,
// product: initValue.product,
digest
:
initValue
.
digest
,
shipmentOrderId
:
initValue
.
deliveryNo
,
relevanceOrderId
:
initValue
.
orderId
,
relevanceOrderCode
:
initValue
.
orderNo
,
...
...
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