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
793fe144
Commit
793fe144
authored
Dec 24, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
8a9629ed
e035996a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
218 additions
and
186 deletions
+218
-186
index.tsx
src/pages/afterService/components/GoodsDrawer/index.tsx
+6
-1
useBusinessEffects.ts
...mit/components/ExchangeForm/effects/useBusinessEffects.ts
+85
-76
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+0
-0
useBusinessEffects.ts
...ubmit/components/RepairForm/effects/useBusinessEffects.ts
+62
-53
index.tsx
...pplication/repairPrSubmit/components/RepairForm/index.tsx
+0
-0
useBusinessEffects.ts
...ubmit/components/ReturnForm/effects/useBusinessEffects.ts
+59
-50
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+1
-1
index.tsx
...afterService/returnManage/components/DetailInfo/index.tsx
+1
-1
index.tsx
src/pages/afterService/returnManage/returnPrReturn/index.tsx
+2
-2
index.tsx
...ion/stockSellStorage/bills/components/BillsForm/index.tsx
+2
-2
No files found.
src/pages/afterService/components/GoodsDrawer/index.tsx
View file @
793fe144
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-2
1 11:44:17
* @LastEditTime: 2020-12-2
4 10:32:10
* @Description: 维修商品抽屉组件
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
...
@@ -246,6 +246,11 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
payload
.
push
(
atom
);
});
});
if
(
!
payload
.
length
)
{
this
.
setState
({
loading
:
false
});
return
;
}
processEnumRes
=
await
PublicApi
.
postOrderGetProcessEnum
({
list
:
payload
,
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/effects/useBusinessEffects.ts
View file @
793fe144
/*
* @Author: XieZhiXiong
* @Date: 2020-11-03 18:30:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-11 10:29:51
* @Description: 联动逻辑相关
*/
import
{
Modal
}
from
'antd'
;
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
getFieldValue
,
setFieldValue
,
getFieldState
,
setFieldState
,
}
=
actions
;
const
linkage
=
useLinkageUtils
();
// 联动配送方式
onFieldValueChange$
(
'deliveryType'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
switch
(
value
)
{
// 物流
case
1
:
{
linkage
.
show
(
'shippingAddress'
);
linkage
.
hide
(
'pickupAddress'
);
break
;
};
// 自提
case
2
:
{
linkage
.
hide
(
'shippingAddress'
);
linkage
.
show
(
'pickupAddress'
);
break
;
};
// 无需物流
case
3
:
{
linkage
.
hide
(
'*(shippingAddress,pickupAddress)'
);
break
;
};
default
:
break
};
});
// 校验换货数量
onFieldInputChange$
(
'replaceGoodsList.*.replaceCount'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
// 已换货数量
const
replacedCountValue
=
getFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`replaceGoodsList.
${
$1
}
.extraData`
}),
state
=>
state
.
value
.
replacedCount
,
);
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`replaceGoodsList.
${
$1
}
.replaceCount`
}),
state
=>
{
if
(
+
value
>
replacedCountValue
)
{
state
.
errors
=
'填写值已超过最大可换货数量,请重新填写'
;
}
else
{
state
.
errors
=
''
;
}
}
);
});
/*
* @Author: XieZhiXiong
* @Date: 2020-11-03 18:30:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-24 10:36:02
* @Description: 联动逻辑相关
*/
import
{
Modal
}
from
'antd'
;
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
getFieldValue
,
setFieldValue
,
getFieldState
,
setFieldState
,
}
=
actions
;
const
linkage
=
useLinkageUtils
();
// 联动配送方式
onFieldValueChange$
(
'deliveryType'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
switch
(
value
)
{
// 物流
case
1
:
{
linkage
.
show
(
'shippingAddress'
);
linkage
.
hide
(
'pickupAddress'
);
break
;
};
// 自提
case
2
:
{
linkage
.
hide
(
'shippingAddress'
);
linkage
.
show
(
'pickupAddress'
);
break
;
};
// 无需物流
case
3
:
{
linkage
.
hide
(
'*(shippingAddress,pickupAddress)'
);
break
;
};
default
:
break
};
});
// 校验换货数量
onFieldInputChange$
(
'replaceGoodsList.*.replaceCount'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
// 已换货数量
const
replacedCountValue
=
getFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`replaceGoodsList.
${
$1
}
.extraData`
}),
state
=>
state
.
value
.
replacedCount
,
);
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`replaceGoodsList.
${
$1
}
.replaceCount`
}),
state
=>
{
if
(
+
value
>
replacedCountValue
)
{
state
.
errors
=
'填写值已超过最大可换货数量,请重新填写'
;
}
else
{
state
.
errors
=
''
;
}
}
);
});
// 供应会员联动 单据明细
onFieldInputChange$
(
'supplierMember'
).
subscribe
(
fieldState
=>
{
const
replaceGoodsListValue
=
getFieldValue
(
'replaceGoodsList'
);
if
(
replaceGoodsListValue
&&
replaceGoodsListValue
.
length
)
{
setFieldValue
(
'replaceGoodsList'
,
[]);
}
});
}
\ No newline at end of file
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
793fe144
This diff is collapsed.
Click to expand it.
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/effects/useBusinessEffects.ts
View file @
793fe144
/*
* @Author: XieZhiXiong
* @Date: 2020-11-03 18:30:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-17 10:32:48
* @Description: 联动逻辑相关
*/
import
{
Modal
}
from
'antd'
;
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
}
from
'@/constants'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
getFieldValue
,
setFieldValue
,
getFieldState
,
setFieldState
,
}
=
actions
;
// const linkage = useLinkageUtils();
// 校验维修数量
onFieldInputChange$
(
'repairGoodsList.*.repairCount'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
// 已维修数量
const
repairedCountValue
=
getFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`repairGoodsList.
${
$1
}
.extraData`
}),
state
=>
state
.
value
.
repairedCount
,
);
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`repairGoodsList.
${
$1
}
.repairCount`
}),
state
=>
{
if
(
+
value
>
repairedCountValue
)
{
state
.
errors
=
'填写值已超过最大可维修数量,请重新填写'
;
}
else
{
state
.
errors
=
''
;
}
}
);
});
/*
* @Author: XieZhiXiong
* @Date: 2020-11-03 18:30:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-17 10:32:48
* @Description: 联动逻辑相关
*/
import
{
Modal
}
from
'antd'
;
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
}
from
'@/constants'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
getFieldValue
,
setFieldValue
,
getFieldState
,
setFieldState
,
}
=
actions
;
// const linkage = useLinkageUtils();
// 校验维修数量
onFieldInputChange$
(
'repairGoodsList.*.repairCount'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
// 已维修数量
const
repairedCountValue
=
getFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`repairGoodsList.
${
$1
}
.extraData`
}),
state
=>
state
.
value
.
repairedCount
,
);
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`repairGoodsList.
${
$1
}
.repairCount`
}),
state
=>
{
if
(
+
value
>
repairedCountValue
)
{
state
.
errors
=
'填写值已超过最大可维修数量,请重新填写'
;
}
else
{
state
.
errors
=
''
;
}
}
);
});
// 供应会员联动 单据明细
onFieldInputChange$
(
'supplierMember'
).
subscribe
(
fieldState
=>
{
const
replaceGoodsListValue
=
getFieldValue
(
'repairGoodsList'
);
if
(
replaceGoodsListValue
&&
replaceGoodsListValue
.
length
)
{
setFieldValue
(
'repairGoodsList'
,
[]);
}
});
}
\ No newline at end of file
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/index.tsx
View file @
793fe144
This diff is collapsed.
Click to expand it.
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/effects/useBusinessEffects.ts
View file @
793fe144
/*
* @Author: XieZhiXiong
* @Date: 2020-11-03 18:30:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-09 16:18:45
* @Description: 联动逻辑相关
*/
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
getFieldValue
,
setFieldValue
,
getFieldState
,
setFieldState
,
}
=
actions
;
const
linkage
=
useLinkageUtils
();
// 联动配送方式
onFieldValueChange$
(
'deliveryType'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
switch
(
value
)
{
// 物流
case
1
:
{
linkage
.
show
(
'shippingAddress'
);
linkage
.
hide
(
'pickupAddress'
);
break
;
};
// 自提
case
2
:
{
linkage
.
hide
(
'shippingAddress'
);
linkage
.
show
(
'pickupAddress'
);
break
;
};
// 无需物流
case
3
:
{
linkage
.
hide
(
'*(shippingAddress,pickupAddress)'
);
break
;
};
default
:
break
};
});
/*
* @Author: XieZhiXiong
* @Date: 2020-11-03 18:30:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-09 16:18:45
* @Description: 联动逻辑相关
*/
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
getFieldValue
,
setFieldValue
,
getFieldState
,
setFieldState
,
}
=
actions
;
const
linkage
=
useLinkageUtils
();
// 联动配送方式
onFieldValueChange$
(
'deliveryType'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
switch
(
value
)
{
// 物流
case
1
:
{
linkage
.
show
(
'shippingAddress'
);
linkage
.
hide
(
'pickupAddress'
);
break
;
};
// 自提
case
2
:
{
linkage
.
hide
(
'shippingAddress'
);
linkage
.
show
(
'pickupAddress'
);
break
;
};
// 无需物流
case
3
:
{
linkage
.
hide
(
'*(shippingAddress,pickupAddress)'
);
break
;
};
default
:
break
};
});
// 供应会员联动 单据明细
onFieldInputChange$
(
'supplierMember'
).
subscribe
(
fieldState
=>
{
const
replaceGoodsListValue
=
getFieldValue
(
'returnGoodsList'
);
if
(
replaceGoodsListValue
&&
replaceGoodsListValue
.
length
)
{
setFieldValue
(
'returnGoodsList'
,
[]);
}
});
}
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
793fe144
...
...
@@ -557,7 +557,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
>
<
Card
>
<
NiceForm
initialValues
=
{
{
value
=
{
{
...
detailInfo
,
returnGoodsList
:
returnGoodsList
.
data
,
}
}
...
...
src/pages/afterService/returnManage/components/DetailInfo/index.tsx
View file @
793fe144
...
...
@@ -110,7 +110,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
});
PublicApi
.
postAsReturnGoodsSetNeedReturnGoods
({
returnId
:
+
id
,
returnGoodsId
:
record
.
orderRecord
Id
,
returnGoodsId
:
record
.
returnGoods
Id
,
isNeed
:
record
.
isNeedReturn
===
1
?
0
:
1
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
src/pages/afterService/returnManage/returnPrReturn/index.tsx
View file @
793fe144
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
08 17:32:59
* @LastEditTime: 2020-12-
24 10:04:24
* @Description: 退货申请单查询
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
@@ -99,7 +99,7 @@ const ReturnPrReturn: React.FC = () => {
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/afterService/returnManage/returnPrReturn/verify?id=${record.returnId}`
)
}
>
提交审核
退款
</
Button
>
</>
),
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/index.tsx
View file @
793fe144
...
...
@@ -186,7 +186,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
);
setBillInfo
({
transactionTime
:
transactionTime
?
moment
(
transactionTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
moment
().
format
(
'YYYY-MM-DD HH:mm:ss'
)
,
transactionTime
:
transactionTime
?
moment
(
transactionTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
orderNo
:
relevanceInvoicesId
?
[
...
...
@@ -1656,7 +1656,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
>
<
Card
>
<
NiceForm
initialValues
=
{
billInfo
}
value
=
{
billInfo
}
expressionScope=
{
{
TableAddButton
,
renderListTableRemove
,
...
...
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