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
b1e3ed94
Commit
b1e3ed94
authored
Nov 13, 2020
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-paltform into dev
parents
ce0ba6ce
3ff59317
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
5 deletions
+29
-5
index.ts
src/module/productModule/index.ts
+2
-0
logisticsForm.tsx
...ages/commodity/products/addProductsItem/logisticsForm.tsx
+16
-2
priceAttributeForm.tsx
...commodity/products/addProductsItem/priceAttributeForm.tsx
+3
-2
index.tsx
src/pages/transaction/purchaseOrder/readyFileOrder/index.tsx
+1
-1
index.ts
src/store/product/index.ts
+7
-0
No files found.
src/module/productModule/index.ts
View file @
b1e3ed94
...
@@ -66,6 +66,7 @@ export interface IProductModule {
...
@@ -66,6 +66,7 @@ export interface IProductModule {
areaOption
:
any
[];
// 省市数据
areaOption
:
any
[];
// 省市数据
currentPageInStore
:
IPage
;
currentPageInStore
:
IPage
;
tabClickItem
:
any
[];
tabClickItem
:
any
[];
productPriceType
:
any
;
setAttributeLists
(
lists
:
any
[]):
void
;
setAttributeLists
(
lists
:
any
[]):
void
;
setProductName
(
name
:
string
):
void
;
setProductName
(
name
:
string
):
void
;
...
@@ -81,4 +82,5 @@ export interface IProductModule {
...
@@ -81,4 +82,5 @@ export interface IProductModule {
setProductInfoByEdit
(
data
:
GetProductCommodityGetCommodityResponse
):
void
;
setProductInfoByEdit
(
data
:
GetProductCommodityGetCommodityResponse
):
void
;
setCurrentPageInStore
(
data
:
IPage
):
void
;
setCurrentPageInStore
(
data
:
IPage
):
void
;
setTabClickItem
(
data
:
any
):
void
;
setTabClickItem
(
data
:
any
):
void
;
setProductPriceType
(
data
:
any
):
void
;
}
}
src/pages/commodity/products/addProductsItem/logisticsForm.tsx
View file @
b1e3ed94
...
@@ -36,8 +36,9 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
...
@@ -36,8 +36,9 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
const
[
deliveryType
,
setDeliveryType
]
=
useState
<
number
>
(
1
)
const
[
deliveryType
,
setDeliveryType
]
=
useState
<
number
>
(
1
)
const
[
carriageType
,
setCarriageType
]
=
useState
<
number
>
()
const
[
carriageType
,
setCarriageType
]
=
useState
<
number
>
()
const
flagRef
=
useRef
<
boolean
>
(
false
)
const
flagRef
=
useRef
<
boolean
>
(
false
)
const
[
banCarriageType
,
setBanCarriageType
]
=
useState
(
false
)
const
{
productInfoByEdit
,
selectCategoryId
}
=
ProductStore
const
{
productInfoByEdit
,
selectCategoryId
,
productPriceType
}
=
ProductStore
useEffect
(()
=>
{
useEffect
(()
=>
{
//传入ref给父级
//传入ref给父级
...
@@ -75,12 +76,25 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
...
@@ -75,12 +76,25 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
}
}
},
[
selectCategoryId
])
},
[
selectCategoryId
])
useEffect
(()
=>
{
console
.
log
(
productPriceType
)
if
(
productPriceType
===
3
){
logisticsForm
.
setFieldsValue
({
carriageType
:
1
})
setCarriageType
(
1
)
setBanCarriageType
(
true
)
}
else
{
setBanCarriageType
(
false
)
}
},
[
productPriceType
])
const
changeDeliveryType
=
(
e
)
=>
{
const
changeDeliveryType
=
(
e
)
=>
{
console
.
log
(
e
)
setDeliveryType
(
e
.
target
.
value
)
setDeliveryType
(
e
.
target
.
value
)
setCarriageType
(
1
)
setCarriageType
(
1
)
setIsTemplate
(
false
)
setIsTemplate
(
false
)
logisticsForm
.
resetFields
()
logisticsForm
.
resetFields
()
logisticsForm
.
setFieldsValue
({
deliveryType
:
e
.
target
.
value
})
logisticsForm
.
setFieldsValue
({
deliveryType
:
e
.
target
.
value
})
logisticsForm
.
setFieldsValue
({
carriageType
:
1
})
}
}
const
onChangeTemplate
=
(
e
)
=>
{
const
onChangeTemplate
=
(
e
)
=>
{
...
@@ -126,7 +140,7 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
...
@@ -126,7 +140,7 @@ const LogisticsForm: React.FC<Iprops> = (props) => {
},
},
]
}
]
}
>
>
<
Radio
.
Group
onChange=
{
(
e
)
=>
setCarriageType
(
e
.
target
.
value
)
}
>
<
Radio
.
Group
onChange=
{
(
e
)
=>
setCarriageType
(
e
.
target
.
value
)
}
disabled=
{
banCarriageType
}
>
<
Radio
value=
{
1
}
>
卖家承担运费(默认)
</
Radio
>
<
Radio
value=
{
1
}
>
卖家承担运费(默认)
</
Radio
>
<
Radio
value=
{
2
}
>
买家承担运费
</
Radio
>
<
Radio
value=
{
2
}
>
买家承担运费
</
Radio
>
</
Radio
.
Group
>
</
Radio
.
Group
>
...
...
src/pages/commodity/products/addProductsItem/priceAttributeForm.tsx
View file @
b1e3ed94
...
@@ -71,7 +71,8 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
...
@@ -71,7 +71,8 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
getPriceAttributeFormParamsByEdit
,
getPriceAttributeFormParamsByEdit
,
selectCategoryId
,
selectCategoryId
,
productAttributeAndImageParams
,
productAttributeAndImageParams
,
tabClickItem
tabClickItem
,
setProductPriceType
}
=
ProductStore
}
=
ProductStore
// const memoizedValue = useMemo(() => {
// const memoizedValue = useMemo(() => {
...
@@ -466,8 +467,8 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
...
@@ -466,8 +467,8 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
setPriceForm
.
resetFields
()
setPriceForm
.
resetFields
()
setLadderPrice
(
false
)
setLadderPrice
(
false
)
setPlanPrice
(
v
.
target
.
value
)
setPlanPrice
(
v
.
target
.
value
)
setProductPriceType
(
v
.
target
.
value
)
setIsChangePriceType
(
true
)
setIsChangePriceType
(
true
)
console
.
log
(
'价格类型变动'
)
}
}
const
setPriceOk
=
()
=>
{
const
setPriceOk
=
()
=>
{
...
...
src/pages/transaction/purchaseOrder/readyFileOrder/index.tsx
View file @
b1e3ed94
...
@@ -40,7 +40,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
...
@@ -40,7 +40,7 @@ const FirstApprovedOrder:React.FC<FirstApprovedOrderProps> = (props) => {
message
.
error
(
'请先勾选订单'
)
message
.
error
(
'请先勾选订单'
)
return
;
return
;
}
}
const
canBitch
=
!
rowSelectionCtl
.
selectRow
.
some
(
v
=>
v
.
purchaseOrderI
nteriorState
!==
PurchaseOrderInsideWorkState
.
FILLING_ORDER
)
const
canBitch
=
!
rowSelectionCtl
.
selectRow
.
some
(
v
=>
v
.
i
nteriorState
!==
PurchaseOrderInsideWorkState
.
FILLING_ORDER
)
if
(
canBitch
)
{
if
(
canBitch
)
{
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
const
{
code
}
=
await
run
({
ids
:
rowSelectionCtl
.
selectedRowKeys
})
if
(
code
===
1000
)
{
if
(
code
===
1000
)
{
...
...
src/store/product/index.ts
View file @
b1e3ed94
...
@@ -17,6 +17,7 @@ class ProductStore implements IProductModule {
...
@@ -17,6 +17,7 @@ class ProductStore implements IProductModule {
@
observable
public
isAllAttributePic
:
boolean
=
true
;
// 是否所有属性共用
@
observable
public
isAllAttributePic
:
boolean
=
true
;
// 是否所有属性共用
@
observable
public
currentPageInStore
:
IPage
=
{
current
:
null
,
pageSize
:
null
};
// 页码相关
@
observable
public
currentPageInStore
:
IPage
=
{
current
:
null
,
pageSize
:
null
};
// 页码相关
@
observable
public
tabClickItem
:
any
[]
=
[];
// tab标签页点击项
@
observable
public
tabClickItem
:
any
[]
=
[];
// tab标签页点击项
@
observable
public
productPriceType
:
any
=
null
;
// 商品价格类型
/** 计算操作 **/
/** 计算操作 **/
// 加工接口返回的数据,用户编辑回显数据
// 加工接口返回的数据,用户编辑回显数据
...
@@ -138,6 +139,7 @@ class ProductStore implements IProductModule {
...
@@ -138,6 +139,7 @@ class ProductStore implements IProductModule {
this
.
attributeLists
=
[];
this
.
attributeLists
=
[];
this
.
selectCategoryId
=
null
;
this
.
selectCategoryId
=
null
;
this
.
selectBrandId
=
null
;
this
.
selectBrandId
=
null
;
this
.
productPriceType
=
null
;
}
}
// 编辑时 品类变更 清空部分数据
// 编辑时 品类变更 清空部分数据
...
@@ -199,6 +201,11 @@ class ProductStore implements IProductModule {
...
@@ -199,6 +201,11 @@ class ProductStore implements IProductModule {
this
.
tabClickItem
=
data
this
.
tabClickItem
=
data
}
}
@
action
.
bound
public
setProductPriceType
(
data
:
any
)
{
this
.
productPriceType
=
data
}
}
}
export
default
ProductStore
export
default
ProductStore
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