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
shenshaokai
jinfa-platform
Commits
afddf914
Commit
afddf914
authored
Aug 04, 2021
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
parents
36931760
8423690b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
310 additions
and
11 deletions
+310
-11
returnRoute.ts
config/routes/afterServiceRoute/returnRoute.ts
+8
-0
index.tsx
src/components/NiceForm/public/index.tsx
+2
-1
menu.ts
src/locales/zh-CN/menu.ts
+1
-0
addDeliverBill.tsx
...e/returnApplication/returnPrAddDeliver/addDeliverBill.tsx
+38
-0
detail.tsx
...erService/returnApplication/returnPrAddDeliver/detail.tsx
+8
-1
index.tsx
src/pages/channel/channelInfo/index.tsx
+1
-1
add.tsx
src/pages/channel/channelSeo/add.tsx
+3
-3
FormList.tsx
src/pages/contract/manage/add/components/FormList.tsx
+2
-1
index.tsx
src/pages/shop/shopInfo/index.tsx
+1
-1
add.tsx
src/pages/shop/shopSeo/add.tsx
+3
-3
index.ts
...llStorage/bills/components/BillsFormPage/effects/index.ts
+53
-0
useBusinessEffects.ts
...ls/components/BillsFormPage/effects/useBusinessEffects.ts
+30
-0
index.less
...tockSellStorage/bills/components/BillsFormPage/index.less
+0
-0
index.tsx
...stockSellStorage/bills/components/BillsFormPage/index.tsx
+160
-0
schema.ts
...stockSellStorage/bills/components/BillsFormPage/schema.ts
+0
-0
No files found.
config/routes/afterServiceRoute/returnRoute.ts
View file @
afddf914
...
...
@@ -86,6 +86,14 @@ const route: RouterChild = {
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待新增退货发货单-新增
{
path
:
'/memberCenter/afterService/returnApplication/returnPrAddDeliver/add'
,
name
:
'returnAddDeliverBill'
,
component
:
'@/pages/afterService/returnApplication/returnPrAddDeliver/addDeliverBill'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待新增退货发货单-订单详情
{
path
:
'/memberCenter/afterService/returnApplication/returnPrAddDeliver/orderDetail'
,
...
...
src/components/NiceForm/public/index.tsx
View file @
afddf914
...
...
@@ -146,6 +146,7 @@ registerVirtualBox('ColumnLayout', (_props) => {
const
xComponentProps
=
props
[
'x-component-props'
]
||
{};
const
{
column
=
3
,
gutter
=
20
,
}
=
xComponentProps
;
const
span
=
24
/
column
;
...
...
@@ -160,7 +161,7 @@ registerVirtualBox('ColumnLayout', (_props) => {
return
(
<
Row
gutter=
{
20
}
gutter=
{
gutter
}
>
{
cols
.
map
((
item
,
index
)
=>
(
<
Col
key=
{
index
}
span=
{
span
}
>
...
...
src/locales/zh-CN/menu.ts
View file @
afddf914
...
...
@@ -591,6 +591,7 @@ export default {
'menu.afterService.returnApplication.addReturnPrSubmit'
:
'新建退货申请单'
,
'menu.afterService.returnApplication.editReturnPrSubmit'
:
'编辑退货申请单'
,
'menu.afterService.returnApplication.returnPrAddDeliver'
:
'待新增退货发货单'
,
'menu.afterService.returnApplication.returnAddDeliverBill'
:
'新增退货发货单'
,
'menu.afterService.returnApplication.returnPrAddLogistics'
:
'待新增物流单'
,
'menu.afterService.returnApplication.returnPrDeliver'
:
'待退货发货'
,
'menu.afterService.returnApplication.verifyReturnPrDeliver'
:
'退货发货'
,
...
...
src/pages/afterService/returnApplication/returnPrAddDeliver/addDeliverBill.tsx
0 → 100644
View file @
afddf914
/*
* @Author: XieZhiXiong
* @Date: 2021-08-04 15:53:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-04 16:49:47
* @Description: 新增退货发货单
*/
import
React
from
'react'
;
import
{
DOC_TYPE_RETURN_INVOICE
}
from
'@/constants/commodity'
;
import
BillsFormPage
,
{
RelatedInfoType
}
from
'@/pages/transaction/stockSellStorage/bills/components/BillsFormPage'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
const
ReturnAddDeliverBill
=
()
=>
{
const
{
id
}
=
usePageStatus
();
const
fetchRelatedInfo
=
():
Promise
<
RelatedInfoType
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
resolve
({
relatedNo
:
'FPTY12'
,
memberName
:
'温州龙昌手袋有限公司'
,
address
:
'张三 / 185 2929 6758 广东省广州市海珠区新港东路1068号中洲中心北塔6楼'
,
logisticsTypeName
:
'物流'
,
});
},
2000
);
});
};
return
(
<
BillsFormPage
billType=
{
DOC_TYPE_RETURN_INVOICE
}
fetchRelatedInfo=
{
fetchRelatedInfo
}
/>
);
};
export
default
ReturnAddDeliverBill
;
src/pages/afterService/returnApplication/returnPrAddDeliver/detail.tsx
View file @
afddf914
/*
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-04 11:29:53
* @Description:
*/
import
React
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
DetailInfo
from
'../components/DetailInfo'
;
const
ReturnPrAddDeliverDetail
:
React
.
FC
=
()
=>
{
const
{
id
,
creditId
}
=
usePageStatus
();
const
{
id
}
=
usePageStatus
();
return
(
<
DetailInfo
...
...
src/pages/channel/channelInfo/index.tsx
View file @
afddf914
...
...
@@ -426,7 +426,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
<
div
className=
{
styles
.
upload_left
}
>
<
LinkOutlined
style=
{
{
marginRight
:
'5px'
}
}
/>
<
Typography
.
Link
href=
{
`/api/contract/contractTemplate/downloadContract?contractName=${file.albumName}&contractUrl=${file.albumU
RL
}`
}
href=
{
`/api/contract/contractTemplate/downloadContract?contractName=${file.albumName}&contractUrl=${file.albumU
rl
}`
}
target=
"_blank"
>
{
file
.
albumName
}
...
...
src/pages/channel/channelSeo/add.tsx
View file @
afddf914
...
...
@@ -105,21 +105,21 @@ const ChannelSeoAdded = () => {
label=
{
<
RequireItem
label=
"标题"
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
"用于显示在页面title标签的内容,便于搜索引擎抓取"
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
rules=
{
[{
required
:
true
,
message
:
"请输入标题"
}]
}
>
<
Input
maxLength=
{
50
}
disabled=
{
link
===
'detail'
}
placeholder=
'最长
100个字符,
50个汉字'
/>
<
Input
maxLength=
{
50
}
disabled=
{
link
===
'detail'
}
placeholder=
'最长50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'description'
label=
{
<
RequireItem
label=
"描述"
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
"用于显示在页面Description标签的内容,便于搜索引擎抓取"
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
rules=
{
[{
required
:
true
,
message
:
"请输入描述"
}]
}
>
<
Input
.
TextArea
disabled=
{
link
===
'detail'
}
rows=
{
5
}
placeholder=
"最长200个
字符,100个汉字"
maxLength=
{
1
00
}
/>
<
Input
.
TextArea
disabled=
{
link
===
'detail'
}
rows=
{
5
}
placeholder=
"最长200个
汉字"
maxLength=
{
2
00
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'keywords'
label=
{
<
RequireItem
label=
"关键字"
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
"用于显示在页面Keywords标签的内容,便于搜索引擎通过关键词搜索时抓取页面,多个关键词用豆号分隔"
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
rules=
{
[{
required
:
true
,
message
:
"请输入关键字"
}]
}
>
<
Input
.
TextArea
disabled=
{
link
===
'detail'
}
rows=
{
5
}
placeholder=
"最长
200个字符,
100个汉字"
maxLength=
{
100
}
/>
<
Input
.
TextArea
disabled=
{
link
===
'detail'
}
rows=
{
5
}
placeholder=
"最长100个汉字"
maxLength=
{
100
}
/>
</
Form
.
Item
>
</
Form
>
</
TabPane
>
...
...
src/pages/contract/manage/add/components/FormList.tsx
View file @
afddf914
...
...
@@ -136,7 +136,7 @@ const FormList = (props: any) => {
bidCount
:
sourceType
==
'1'
?
item
.
awardTaxProbability
*
item
.
purchaseCount
/
100
:
sourceType
==
'2'
?
item
.
awardTenderRatio
*
item
.
inviteTenderMateriel
.
count
/
100
:
item
.
purchaseCount
,
bidAmount
:
sourceType
==
'1'
?
item
.
awardTaxProbability
*
item
.
purchaseCount
/
100
*
item
.
taxUnitPrice
:
sourceType
==
'2'
?
item
.
awardTenderRatio
*
item
.
inviteTenderMateriel
.
count
/
100
*
item
.
price
:
item
.
price
,
// productBrand
associatedType
:
_filter
(
sourceType
,
item
,
[
''
,
'
'
,
''
,
''
])
,
associatedType
:
_filter
(
sourceType
,
item
,
[
''
,
'
productAttributeJson'
,
''
,
''
]).
split
(
'-'
)[
1
]
,
associatedBrand
:
_filter
(
sourceType
,
item
,
[
''
,
'productBrand'
,
''
,
''
]),
associatedDataId
:
_filter
(
sourceType
,
item
,
[
''
,
'productId'
,
'commoditySkuId'
]),
// 关联商品id
associatedMaterielNo
:
_filter
(
sourceType
,
item
,
[
''
,
'number'
,
'commodityAttribute'
]),
// 关联物料编号
...
...
@@ -147,6 +147,7 @@ const FormList = (props: any) => {
rowId
:
index
,
}
})
console
.
log
(
data
)
setData
(
data
)
}
}).
catch
(
err
=>
{
...
...
src/pages/shop/shopInfo/index.tsx
View file @
afddf914
...
...
@@ -414,7 +414,7 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
<
div
className=
{
styles
.
upload_left
}
>
<
LinkOutlined
style=
{
{
marginRight
:
'5px'
}
}
/>
<
Typography
.
Link
href=
{
`/api/contract/contractTemplate/downloadContract?contractName=${file.albumName}&contractUrl=${file.albumU
RL
}`
}
href=
{
`/api/contract/contractTemplate/downloadContract?contractName=${file.albumName}&contractUrl=${file.albumU
rl
}`
}
target=
"_blank"
>
{
file
.
albumName
}
...
...
src/pages/shop/shopSeo/add.tsx
View file @
afddf914
...
...
@@ -106,21 +106,21 @@ const ShopSeoAdded = () => {
label=
{
<
RequireItem
label=
"标题"
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
"用于显示在页面title标签的内容,便于搜索引擎抓取"
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
rules=
{
[{
required
:
true
,
message
:
"请输入标题"
}]
}
>
<
Input
maxLength=
{
50
}
disabled=
{
link
===
'detail'
}
placeholder=
'最长
100个字符,
50个汉字'
/>
<
Input
maxLength=
{
50
}
disabled=
{
link
===
'detail'
}
placeholder=
'最长50个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'description'
label=
{
<
RequireItem
label=
"描述"
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
"用于显示在页面Description标签的内容,便于搜索引擎抓取"
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
rules=
{
[{
required
:
true
,
message
:
"请输入描述"
}]
}
>
<
Input
.
TextArea
disabled=
{
link
===
'detail'
}
rows=
{
5
}
placeholder=
"最长200个
字符,100个汉字"
maxLength=
{
1
00
}
/>
<
Input
.
TextArea
disabled=
{
link
===
'detail'
}
rows=
{
5
}
placeholder=
"最长200个
汉字"
maxLength=
{
2
00
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'keywords'
label=
{
<
RequireItem
label=
"关键字"
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
"用于显示在页面Keywords标签的内容,便于搜索引擎通过关键词搜索时抓取页面,多个关键词用豆号分隔"
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
rules=
{
[{
required
:
true
,
message
:
"请输入关键字"
}]
}
>
<
Input
.
TextArea
disabled=
{
link
===
'detail'
}
rows=
{
5
}
placeholder=
"最长
200个字符,
100个汉字"
maxLength=
{
100
}
/>
<
Input
.
TextArea
disabled=
{
link
===
'detail'
}
rows=
{
5
}
placeholder=
"最长100个汉字"
maxLength=
{
100
}
/>
</
Form
.
Item
>
</
Form
>
</
TabPane
>
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsFormPage/effects/index.ts
0 → 100644
View file @
afddf914
/*
* @Author: XieZhiXiong
* @Date: 2021-08-04 14:42:57
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-04 17:59:35
* @Description:
*/
import
{
FormPath
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
useBusinessEffects
}
from
'./useBusinessEffects'
;
const
{
onFieldMount$
,
}
=
FormEffectHooks
;
// 获取单据类型
const
fetchInvoicesType
=
():
Promise
<
any
[]
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getProductInvoicesTypeAll
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
}
reject
();
}).
catch
(()
=>
{
reject
();
});
});
};
// 获取仓库
const
fetchInventory
=
():
Promise
<
any
[]
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getProductWarehouseAll
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
}
reject
();
}).
catch
(()
=>
{
reject
();
});
});
};
export
const
createEffects
=
(
context
,
actions
)
=>
{
const
{
setFieldState
}
=
actions
;
useBusinessEffects
(
context
,
actions
);
useAsyncSelect
(
'billType'
,
fetchInvoicesType
,
[
'name'
,
'id'
]);
useAsyncSelect
(
'inventoryId'
,
fetchInventory
,
[
'name'
,
'id'
]);
};
\ No newline at end of file
src/pages/transaction/stockSellStorage/bills/components/BillsFormPage/effects/useBusinessEffects.ts
0 → 100644
View file @
afddf914
/*
* @Author: XieZhiXiong
* @Date: 2021-08-04 14:43:14
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-04 18:00:12
* @Description:
*/
import
{
FormEffectHooks
,
FormPath
,
IFormActions
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
export
const
useBusinessEffects
=
(
context
,
actions
:
IFormActions
)
=>
{
const
{
getFieldValue
,
setFieldState
,
setFieldValue
,
getFieldState
}
=
actions
;
const
linkage
=
useLinkageUtils
();
// 对应仓库改变
onFieldInputChange$
(
'inventoryId'
).
subscribe
(
fieldState
=>
{
const
current
=
fieldState
.
originAsyncData
.
find
(
item
=>
item
.
id
===
fieldState
.
value
);
if
(
current
)
{
linkage
.
value
(
'inventoryRole'
,
current
.
principal
);
}
});
}
\ No newline at end of file
src/pages/transaction/stockSellStorage/bills/components/BillsFormPage/index.less
0 → 100644
View file @
afddf914
src/pages/transaction/stockSellStorage/bills/components/BillsFormPage/index.tsx
0 → 100644
View file @
afddf914
/*
* @Author: XieZhiXiong
* @Date: 2021-08-04 11:33:33
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-04 17:55:28
* @Description: 单据表单组件,提供基础的表单内容,单据明细相关由外部传入控制
*/
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Button
,
Spin
}
from
'antd'
;
import
{
createFormActions
,
FormEffectHooks
,
ISchemaFormActions
,
ISchemaFormAsyncActions
}
from
'@formily/antd'
;
import
{
Radio
,
ArrayTable
}
from
'@formily/antd-components'
;
import
{
DOC_TYPE_PURCHASE_RECEIPT
,
DOC_TYPE_SALES_INVOICE
,
DOC_TYPE_PROCESS_RECEIPT
,
DOC_TYPE_PROCESS_INVOICE
,
DOC_TYPE_RETURN_INVOICE
,
DOC_TYPE_RETURN_RECEIPT
,
DOC_TYPE_EXCHANGE_RETURN_INVOICE
,
DOC_TYPE_EXCHANGE_RETURN_RECEIPT
,
DOC_TYPE_EXCHANGE_INVOICE
,
DOC_TYPE_EXCHANGE_RECEIPT
,
}
from
'@/constants/commodity'
;
import
AnchorPage
from
'@/layouts/AnchorPage'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
createSchema
,
{
BillDetailSchemaType
,
BILL_DETAIL_KEY
}
from
'./schema'
;
import
{
createEffects
}
from
'./effects'
;
import
EllipsisText
from
'../EllipsisText'
;
const
TITLE_MAP
=
{
[
DOC_TYPE_PURCHASE_RECEIPT
]:
'采购入库单'
,
[
DOC_TYPE_SALES_INVOICE
]:
'销售发货单'
,
[
DOC_TYPE_PROCESS_RECEIPT
]:
'加工入库单'
,
[
DOC_TYPE_PROCESS_INVOICE
]:
'加工发货单'
,
[
DOC_TYPE_RETURN_INVOICE
]:
'退货发货单'
,
[
DOC_TYPE_RETURN_RECEIPT
]:
'退货入库单'
,
[
DOC_TYPE_EXCHANGE_RETURN_INVOICE
]:
'换货退货发货单'
,
[
DOC_TYPE_EXCHANGE_RETURN_RECEIPT
]:
'换货退货入货单'
,
[
DOC_TYPE_EXCHANGE_INVOICE
]:
'换货发货单'
,
[
DOC_TYPE_EXCHANGE_RECEIPT
]:
'换货入库单'
,
};
const
formActions
=
createFormActions
();
const
{
onFieldValueChange$
,
onFieldInputChange$
,
onFormInputChange$
,
}
=
FormEffectHooks
;
export
type
RelatedInfoType
=
{
/**
* 关联单据编号
*/
relatedNo
:
string
,
/**
* 会员名称
*/
memberName
:
string
,
/**
* 收货地址 或 发货地址
*/
address
:
string
,
/**
* 物流方式名称
*/
logisticsTypeName
:
string
,
}
interface
IProps
{
/**
* 单据类型
*/
billType
:
number
,
/**
* 是否可编辑的
*/
editable
?:
boolean
,
/**
* 获取对应单据详情
*/
fetchRelatedInfo
:
()
=>
Promise
<
RelatedInfoType
>
,
}
const
BillsFormPage
:
React
.
FC
<
IProps
>
=
(
props
:
IProps
)
=>
{
const
{
billType
,
editable
=
true
,
fetchRelatedInfo
,
}
=
props
;
const
[
relatedLoading
,
setRelatedLoading
]
=
useState
(
false
);
const
[
unsaved
,
setUnsaved
]
=
useState
(
false
);
const
getRelatedInfo
=
()
=>
{
if
(
fetchRelatedInfo
)
{
setRelatedLoading
(
true
);
fetchRelatedInfo
().
then
((
res
)
=>
{
console
.
log
(
'res'
,
res
)
}).
finally
(()
=>
{
setRelatedLoading
(
false
);
});
}
};
useEffect
(()
=>
{
getRelatedInfo
();
},
[]);
const
anchorsArr
=
[
{
key
:
'basicInfo'
,
name
:
'基本信息'
,
},
{
key
:
'billDetail'
,
name
:
'单据明细'
,
},
];
const
handleSubmit
=
(
values
:
any
)
=>
{
};
return
(
<
Spin
spinning=
{
relatedLoading
}
>
<
AnchorPage
title=
{
TITLE_MAP
[
1
]
}
anchors=
{
anchorsArr
}
extra=
{
(
<
Button
type=
"primary"
>
保存
</
Button
>
)
}
>
<
NiceForm
previewPlaceholder=
" "
onSubmit=
{
handleSubmit
}
actions=
{
formActions
}
initialValues=
{
{}
}
components=
{
{
RadioGroup
:
Radio
.
Group
,
ArrayTable
,
Text
:
EllipsisText
,
}
}
effects=
{
(
$
,
actions
)
=>
{
createEffects
(
$
,
actions
);
onFormInputChange$
().
subscribe
(()
=>
{
if
(
!
unsaved
)
{
setUnsaved
(
true
);
}
});
}
}
schema=
{
createSchema
(
billType
)
}
editable=
{
!!
editable
}
/>
</
AnchorPage
>
</
Spin
>
);
};
export
default
BillsFormPage
;
src/pages/transaction/stockSellStorage/bills/components/BillsFormPage/schema.ts
0 → 100644
View file @
afddf914
This diff is collapsed.
Click to expand it.
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