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
bd59a776
Commit
bd59a776
authored
Dec 14, 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
0c072309
42535981
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
900 additions
and
892 deletions
+900
-892
.npmrc
.npmrc
+2
-3
app.tsx
src/app.tsx
+10
-13
index.ts
src/constants/index.ts
+1
-1
index.tsx
src/pages/channel/channelTemplate/index.tsx
+3
-3
index.tsx
src/pages/channel/templateDetail/index.tsx
+7
-6
addGoods.tsx
src/pages/commodity/goods/addGoods.tsx
+4
-4
index.tsx
src/pages/lxMall/order/index.tsx
+1
-1
index.tsx
src/pages/lxMall/order/payway/index.tsx
+11
-4
index.tsx
src/pages/shop/shopTemplate/index.tsx
+49
-49
index.tsx
src/pages/shop/templateDetail/index.tsx
+128
-126
constant.ts
src/pages/transaction/_public/order/constant.ts
+125
-125
index.tsx
src/pages/transaction/components/orderPayTabs/index.tsx
+3
-3
index.tsx
src/pages/transaction/components/orderSaleRecord/index.tsx
+3
-1
useSelfTable.tsx
...tion/saleOrder/addSaleDelevedOrder/model/useSelfTable.tsx
+138
-138
useSelfTable.tsx
...n/saleOrder/readyAddLogisticsOrder/model/useSelfTable.tsx
+121
-121
useSelfTable.tsx
...saleOrder/readyConfirmDelevedOrder/model/useSelfTable.tsx
+116
-116
useSelfTable.tsx
.../saleOrder/readyConfirmReturnOrder/model/useSelfTable.tsx
+116
-116
index.ts
src/store/site/index.ts
+62
-62
No files found.
.npmrc
View file @
bd59a776
registry = "http://10.0.0.21:8081/repository/node-group/"
# registry = "https://registry.npmjs.org/"
\ No newline at end of file
registry = "http://10.0.0.19:7001"
# registry = "https://registry.npmjs.org/"
src/app.tsx
View file @
bd59a776
...
...
@@ -97,6 +97,10 @@ const whiteLists = [
'/noAuth'
]
// 登录后的路由白名单
const
loginWhiteList
=
[
'/memberCenter/home'
]
/**
* @description 配置函数,对已配置的路由做修改, 一般与render函数一起结合可根据接口动态配置路由, 直接修改routes即可
* @author xjm
...
...
@@ -171,7 +175,7 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) {
},
'menu'
)
recent
.
put
(
breadCrumb
,
location
.
pathname
+
location
.
search
);
}
if
(
isDev
)
{
return
;
}
...
...
@@ -179,6 +183,7 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) {
if
(
whiteLists
.
includes
(
location
.
pathname
))
{
return
}
const
authInfo
=
getAuth
()
// 是否登录
if
(
authInfo
)
{
...
...
@@ -197,18 +202,10 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) {
return
;
}
// 去掉page_type参数校验, 无需根据query参数判断权限
// // 固定配置, 出现此参数说明需携带参数校验权限路由
// if (query.page_type && routeAuthUrls.find(authPath => {
// const parseUrl = queryString.parseUrl(authPath)
// const { query: selfQuery, url } = parseUrl
// // 当页面出现参数page_type时, 需进入深度校验, 即对应的参数和路径匹配
// return url === pathname && selfQuery.page_type === query.page_type
// })) {
// // 深度匹配成功, 可正常访问
// return;
// }
// 登录之后 能力中心的首页应该变为可以访问, 无论是否在权限中
if
(
loginWhiteList
.
includes
(
location
.
pathname
))
{
return
}
// 是否在路由权限列表里
if
(
routeAuthUrls
.
includes
(
pathname
))
{
return
;
...
...
src/constants/index.ts
View file @
bd59a776
...
...
@@ -1765,7 +1765,7 @@ export const RETURN_OUTER_STATUS = {
[
RETURN_OUTER_STATUS_UNCONFIRMED_REFUNDED
]:
'待确认退款'
,
[
RETURN_OUTER_STATUS_NOT_RECEIVED
]:
'确认退款未到账'
,
[
RETURN_OUTER_STATUS_UNCONFIRMED_FINISHED
]:
'待确认售后完成'
,
[
RETURN_OUTER_STATUS_FINISHED
]:
'售后完成'
,
[
RETURN_OUTER_STATUS_FINISHED
]:
'售后完成'
,
}
// 支付方式
...
...
src/pages/channel/channelTemplate/index.tsx
View file @
bd59a776
...
...
@@ -4,19 +4,19 @@ import { history } from 'umi'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
TemplateItem
from
'../components/templateItem'
import
{
PublicApi
}
from
'@/services/api'
import
{
GetTemplate
ShopFindAllShelfShopTemplateResponse
}
from
'@/services
'
import
{
GetTemplate
WebPageTemplateWebFindAllShelfChannelTemplateResponse
}
from
'@/services/TemplateApi
'
import
styles
from
'./index.less'
const
ShopTemplate
:
React
.
FC
=
()
=>
{
const
[
templateList
,
setTemplateList
]
=
useState
<
GetTemplate
ShopFindAllShelfShop
TemplateResponse
>
([])
const
[
templateList
,
setTemplateList
]
=
useState
<
GetTemplate
WebPageTemplateWebFindAllShelfChannel
TemplateResponse
>
([])
useEffect
(()
=>
{
fetchAllShelfShopTemplate
()
},
[])
const
fetchAllShelfShopTemplate
=
()
=>
{
PublicApi
.
getTemplate
Channel
FindAllShelfChannelTemplate
().
then
(
res
=>
{
PublicApi
.
getTemplate
WebPageTemplateWeb
FindAllShelfChannelTemplate
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTemplateList
(
res
.
data
)
}
else
if
(
res
.
code
===
47001
)
{
...
...
src/pages/channel/templateDetail/index.tsx
View file @
bd59a776
...
...
@@ -6,7 +6,7 @@ import DetailPage from '@/components/DetailPage'
import
UseModal
from
'../components/useModal'
import
{
PublicApi
}
from
'@/services/api'
import
{
Environment_Status
}
from
'@/constants'
import
{
GetTemplate
ShopFindShopTemplateDetailsResponse
}
from
'@/services
'
import
{
GetTemplate
WebPageTemplateWebFindChannelTemplateDetailsResponse
}
from
'@/services/TemplateApi
'
import
default_img
from
'@/assets/imgs/template_default_img.png'
import
styles
from
'./index.less'
...
...
@@ -21,7 +21,7 @@ interface TemplateDetailPropsType {
const
TemplateDetail
:
React
.
FC
<
TemplateDetailPropsType
>
=
(
props
)
=>
{
const
{
query
:
{
type
,
id
}
}
=
props
.
location
const
[
detailInfo
,
setDetailInfo
]
=
useState
<
GetTemplate
ShopFindShop
TemplateDetailsResponse
>
()
const
[
detailInfo
,
setDetailInfo
]
=
useState
<
GetTemplate
WebPageTemplateWebFindChannel
TemplateDetailsResponse
>
()
const
[
useModalVisible
,
setUseModalVisible
]
=
useState
<
boolean
>
(
false
)
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
)
...
...
@@ -30,8 +30,10 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
},
[])
const
fetchDetail
=
()
=>
{
//@ts-ignore
PublicApi
.
getTemplateChannelFindChannelTemplateDetails
({
id
}).
then
(
res
=>
{
const
param
:
any
=
{
id
}
PublicApi
.
getTemplateWebPageTemplateWebFindChannelTemplateDetails
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setDetailInfo
(
res
.
data
)
}
...
...
@@ -43,8 +45,7 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
*/
const
handleConfirmUse
=
()
=>
{
setConfirmLoading
(
true
)
//@ts-ignore
PublicApi
.
postTemplateChannelUseChannelTemplate
({
id
}).
then
(
res
=>
{
PublicApi
.
postTemplateWebPageTemplateWebUseChannelTemplate
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setUseModalVisible
(
false
)
fetchDetail
()
...
...
src/pages/commodity/goods/addGoods.tsx
View file @
bd59a776
...
...
@@ -127,10 +127,10 @@ const AddGoods = () => {
title=
{
queryId
?
`${isSee?'查看货品':'编辑货品'}`
:
'新建货品'
}
>
<
Card
>
<
Form
{
...
layout
}
<
Form
{
...
layout
}
form=
{
form
}
name=
"add-goods"
name=
"add-goods"
onFinish=
{
onFinish
}
colon=
{
false
}
autoComplete=
"off"
...
...
@@ -224,7 +224,7 @@ const AddGoods = () => {
options=
{
customerCategoryTree
}
fieldNames=
{
{
label
:
'title'
,
value
:
'id'
,
children
:
'children'
}
}
placeholder=
"请选择品类"
notFoundContent=
{
<
Spin
size=
"small"
/>
}
//
notFoundContent={<Spin size="small" />}
/>
</
Form
.
Item
>
<
Form
.
Item
...
...
src/pages/lxMall/order/index.tsx
View file @
bd59a776
...
...
@@ -486,7 +486,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
}
}
/>
)
}
<
PayWay
supplyMembersId=
{
orderInfo
.
supplyMembersId
}
supplyMembersRoleId=
{
orderInfo
.
supplyMembersRoleId
}
selectItem=
{
selectPayWay
}
payWayList=
{
orderInfo
.
payWayList
}
onChange=
{
(
val
)
=>
setSelectPayWay
(
val
)
}
/>
<
PayWay
supplyMembersId=
{
orderInfo
.
supplyMembersId
}
deliveryType=
{
orderInfo
.
logistics
.
deliveryType
}
supplyMembersRoleId=
{
orderInfo
.
supplyMembersRoleId
}
selectItem=
{
selectPayWay
}
payWayList=
{
orderInfo
.
payWayList
}
onChange=
{
(
val
)
=>
setSelectPayWay
(
val
)
}
/>
{
/* <Delivery /> */
}
{
orderInfo
.
isInvoice
&&
<
Invoice
state=
{
needTheInvoice
}
onChange=
{
(
val
)
=>
setNeedTheInvoice
(
val
)
}
onSelect=
{
(
val
)
=>
setSelectInvoiceInfo
(
val
)
}
/>
...
...
src/pages/lxMall/order/payway/index.tsx
View file @
bd59a776
...
...
@@ -14,15 +14,16 @@ interface PayWayProps {
selectItem
:
any
;
supplyMembersId
:
number
;
supplyMembersRoleId
:
number
;
deliveryType
?:
number
;
}
const
PayWay
:
React
.
FC
<
PayWayProps
>
=
(
props
)
=>
{
const
{
payWayList
=
[],
onChange
,
selectItem
=
{},
supplyMembersId
,
supplyMembersRoleId
}
=
props
const
{
payWayList
=
[],
onChange
,
selectItem
=
{},
supplyMembersId
,
deliveryType
=
1
,
supplyMembersRoleId
}
=
props
const
[
expand
,
setExpand
]
=
useState
<
boolean
>
(
false
)
const
[
creditInfo
,
setCreditInfo
]
=
useState
<
GetPayCreditGetCreditResponse
>
()
const
handleSelectWay
=
(
item
)
=>
{
if
(
item
.
payType
===
3
)
{
if
(
item
.
payType
===
3
||
item
.
payType
===
4
)
{
if
(
!
getCreditState
(
item
))
{
return
}
...
...
@@ -41,11 +42,11 @@ const PayWay: React.FC<PayWayProps> = (props) => {
},
[
payWayList
])
const
fetchCreditInfo
=
()
=>
{
let
param
=
{
const
param
:
any
=
{
parentMemberId
:
supplyMembersId
,
parentMemberRoleId
:
supplyMembersRoleId
}
//@ts-ignore
PublicApi
.
getPayCreditGetCredit
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setCreditInfo
(
res
.
data
)
...
...
@@ -62,6 +63,12 @@ const PayWay: React.FC<PayWayProps> = (props) => {
}
else
if
(
creditInfo
.
isUsable
===
0
)
{
result
=
false
}
}
else
if
(
info
.
payType
===
4
)
{
if
(
deliveryType
!==
1
)
{
result
=
false
}
else
{
result
=
true
}
}
return
result
}
...
...
src/pages/shop/shopTemplate/index.tsx
View file @
bd59a776
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
Row
,
Col
,
message
}
from
'antd'
import
{
history
}
from
'umi'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
TemplateItem
from
'../components/templateItem'
import
{
PublicApi
}
from
'@/services/api'
import
{
GetTemplate
ShopFindAllShelfShopTemplateResponse
}
from
'@/services'
import
styles
from
'./index.less'
const
ShopTemplate
:
React
.
FC
=
()
=>
{
const
[
templateList
,
setTemplateList
]
=
useState
<
GetTemplate
ShopFindAllShelfShopTemplateResponse
>
([])
useEffect
(()
=>
{
fetchAllShelfShopTemplate
()
},
[])
const
fetchAllShelfShopTemplate
=
()
=>
{
PublicApi
.
getTemplate
ShopFindAllShelfShopTemplate
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTemplateList
(
res
.
data
)
}
else
if
(
res
.
code
===
47001
)
{
message
.
destroy
()
message
.
info
(
"您还未创建店铺,请先创建店铺"
)
setTimeout
(()
=>
{
history
.
push
(
'/memberCenter/shopAbility/infoManage'
)
},
2000
);
}
})
}
return
(
<
PageHeaderWrapper
>
<
div
className=
{
styles
.
shop_center_template
}
>
<
Row
gutter=
{
24
}
className=
{
styles
.
template_list
}
>
{
templateList
.
map
(
item
=>
(
<
Col
xxl=
{
6
}
xl=
{
8
}
lg=
{
12
}
key=
{
item
.
id
}
>
<
TemplateItem
templateInfo=
{
item
}
type=
"shop"
/>
</
Col
>
))
}
</
Row
>
</
div
>
</
PageHeaderWrapper
>
)
}
export
default
ShopTemplate
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
Row
,
Col
,
message
}
from
'antd'
import
{
history
}
from
'umi'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
TemplateItem
from
'../components/templateItem'
import
{
PublicApi
}
from
'@/services/api'
import
{
GetTemplate
WebPageTemplateWebFindAllShelfShopTemplateResponse
}
from
'@/services/TemplateApi'
import
styles
from
'./index.less'
const
ShopTemplate
:
React
.
FC
=
()
=>
{
const
[
templateList
,
setTemplateList
]
=
useState
<
GetTemplate
WebPageTemplateWebFindAllShelfShopTemplateResponse
>
([])
useEffect
(()
=>
{
fetchAllShelfShopTemplate
()
},
[])
const
fetchAllShelfShopTemplate
=
()
=>
{
PublicApi
.
getTemplate
WebPageTemplateWebFindAllShelfShopTemplate
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTemplateList
(
res
.
data
)
}
else
if
(
res
.
code
===
47001
)
{
message
.
destroy
()
message
.
info
(
"您还未创建店铺,请先创建店铺"
)
setTimeout
(()
=>
{
history
.
push
(
'/memberCenter/shopAbility/infoManage'
)
},
2000
);
}
})
}
return
(
<
PageHeaderWrapper
>
<
div
className=
{
styles
.
shop_center_template
}
>
<
Row
gutter=
{
24
}
className=
{
styles
.
template_list
}
>
{
templateList
.
map
(
item
=>
(
<
Col
xxl=
{
6
}
xl=
{
8
}
lg=
{
12
}
key=
{
item
.
id
}
>
<
TemplateItem
templateInfo=
{
item
}
type=
"shop"
/>
</
Col
>
))
}
</
Row
>
</
div
>
</
PageHeaderWrapper
>
)
}
export
default
ShopTemplate
src/pages/shop/templateDetail/index.tsx
View file @
bd59a776
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
LayoutOutlined
,
EyeOutlined
,
PushpinOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
DetailPage
from
'@/components/DetailPage'
import
UseModal
from
'../components/useModal'
import
{
PublicApi
}
from
'@/services/api'
import
{
Environment_Status
}
from
'@/constants'
import
{
GetTemplateShopFindShopTemplateDetailsResponse
}
from
'@/services'
import
default_img
from
'@/assets/imgs/template_default_img.png'
import
styles
from
'./index.less'
interface
TemplateDetailPropsType
{
location
:
{
query
:
{
id
:
number
;
type
:
string
;
// 商城模板:shopCenter ;店铺模板:shop; 商品描述模板: goods
}
}
}
const
TemplateDetail
:
React
.
FC
<
TemplateDetailPropsType
>
=
(
props
)
=>
{
const
{
query
:
{
type
,
id
}
}
=
props
.
location
const
[
detailInfo
,
setDetailInfo
]
=
useState
<
GetTemplateShopFindShopTemplateDetailsResponse
>
()
const
[
useModalVisible
,
setUseModalVisible
]
=
useState
<
boolean
>
(
false
)
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
)
useEffect
(()
=>
{
fetchDetail
()
},
[])
const
fetchDetail
=
()
=>
{
//@ts-ignore
PublicApi
.
getTemplateShopFindShopTemplateDetails
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setDetailInfo
(
res
.
data
)
}
})
}
/**
* 使用模板
*/
const
handleConfirmUse
=
()
=>
{
setConfirmLoading
(
true
)
//@ts-ignore
PublicApi
.
postTemplateShopUseShopTemplate
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setUseModalVisible
(
false
)
fetchDetail
()
}
setConfirmLoading
(
false
)
}).
catch
(()
=>
{
setConfirmLoading
(
false
)
})
}
const
handleLinkEdit
=
()
=>
{
window
.
location
.
href
=
`/shop/template/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
`
// history.push(`/shop/template/edit?id=${detailInfo.id}&template=${detailInfo.fileName}`)
}
const
handleLinkPreview
=
()
=>
{
window
.
location
.
href
=
`/shop/template/preview?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
`
}
return
(
<
DetailPage
title=
"查看模板"
>
<
div
className=
{
styles
.
template_detail
}
>
<
div
className=
{
styles
.
template_info_wrap
}
>
<
div
className=
{
styles
.
template_img_box
}
>
<
div
className=
{
cx
(
styles
.
type_tag
)
}
>
{
Environment_Status
[
detailInfo
?.
environment
]
}
</
div
>
<
img
src=
{
default_img
}
/>
</
div
>
<
div
className=
{
styles
.
template_info
}
>
<
div
className=
{
styles
.
template_info_line
}
>
<
label
>
模板名称:
</
label
>
<
span
>
{
detailInfo
?.
templateName
}
</
span
>
</
div
>
<
div
className=
{
styles
.
template_info_line
}
>
<
label
>
适用环境:
</
label
>
<
span
>
{
Environment_Status
[
detailInfo
?.
environment
]
}
</
span
>
</
div
>
<
div
className=
{
styles
.
template_info_line
}
>
<
label
>
模板描述:
</
label
>
<
span
>
{
detailInfo
?.
templateDescribe
}
</
span
>
</
div
>
<
div
className=
{
styles
.
template_info_line
}
>
<
label
>
使用站点:
</
label
>
<
span
>
{
detailInfo
?.
siteName
}
</
span
>
</
div
>
<
div
className=
{
styles
.
template_info_line
}
>
<
label
>
使用商城:
</
label
>
<
span
>
{
detailInfo
?.
shopName
}
</
span
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
btn
}
onClick=
{
()
=>
handleLinkPreview
()
}
>
<
EyeOutlined
/>
<
label
>
预览
</
label
>
</
div
>
<
div
className=
{
cx
(
styles
.
btn
,
styles
.
fit
)
}
onClick=
{
()
=>
handleLinkEdit
()
}
>
<
LayoutOutlined
/>
<
label
>
店铺装修
</
label
>
</
div
>
<
div
className=
{
cx
(
styles
.
btn
,
detailInfo
?.
use
===
1
?
styles
.
use
:
''
)
}
onClick=
{
()
=>
detailInfo
?.
use
!==
1
?
setUseModalVisible
(
true
)
:
{}
}
>
<
PushpinOutlined
/>
<
label
>
{
detailInfo
?.
use
===
1
?
'使用中'
:
'使用'
}
</
label
>
</
div
>
<
UseModal
title=
"使用店铺模板"
visible=
{
useModalVisible
}
dataInfo=
{
detailInfo
}
confirmLoading=
{
confirmLoading
}
onOk=
{
()
=>
handleConfirmUse
()
}
onCancel=
{
()
=>
setUseModalVisible
(
false
)
}
/>
</
div
>
</
DetailPage
>
)
}
export
default
TemplateDetail
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
LayoutOutlined
,
EyeOutlined
,
PushpinOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
DetailPage
from
'@/components/DetailPage'
import
UseModal
from
'../components/useModal'
import
{
PublicApi
}
from
'@/services/api'
import
{
Environment_Status
}
from
'@/constants'
import
{
GetTemplateWebPageTemplateWebFindShopTemplateDetailsResponse
}
from
'@/services/TemplateApi'
import
default_img
from
'@/assets/imgs/template_default_img.png'
import
styles
from
'./index.less'
interface
TemplateDetailPropsType
{
location
:
{
query
:
{
id
:
number
;
type
:
string
;
// 商城模板:shopCenter ;店铺模板:shop; 商品描述模板: goods
}
}
}
const
TemplateDetail
:
React
.
FC
<
TemplateDetailPropsType
>
=
(
props
)
=>
{
const
{
query
:
{
type
,
id
}
}
=
props
.
location
const
[
detailInfo
,
setDetailInfo
]
=
useState
<
GetTemplateWebPageTemplateWebFindShopTemplateDetailsResponse
>
()
const
[
useModalVisible
,
setUseModalVisible
]
=
useState
<
boolean
>
(
false
)
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
)
useEffect
(()
=>
{
fetchDetail
()
},
[])
const
fetchDetail
=
()
=>
{
const
param
:
any
=
{
id
}
PublicApi
.
getTemplateWebPageTemplateWebFindShopTemplateDetails
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setDetailInfo
(
res
.
data
)
}
})
}
/**
* 使用模板
*/
const
handleConfirmUse
=
()
=>
{
setConfirmLoading
(
true
)
PublicApi
.
postTemplateWebPageTemplateWebUseShopTemplate
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setUseModalVisible
(
false
)
fetchDetail
()
}
setConfirmLoading
(
false
)
}).
catch
(()
=>
{
setConfirmLoading
(
false
)
})
}
const
handleLinkEdit
=
()
=>
{
window
.
location
.
href
=
`/shop/template/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
`
// history.push(`/shop/template/edit?id=${detailInfo.id}&template=${detailInfo.fileName}`)
}
const
handleLinkPreview
=
()
=>
{
window
.
location
.
href
=
`/shop/template/preview?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
`
}
return
(
<
DetailPage
title=
"查看模板"
>
<
div
className=
{
styles
.
template_detail
}
>
<
div
className=
{
styles
.
template_info_wrap
}
>
<
div
className=
{
styles
.
template_img_box
}
>
<
div
className=
{
cx
(
styles
.
type_tag
)
}
>
{
Environment_Status
[
detailInfo
?.
environment
]
}
</
div
>
<
img
src=
{
default_img
}
/>
</
div
>
<
div
className=
{
styles
.
template_info
}
>
<
div
className=
{
styles
.
template_info_line
}
>
<
label
>
模板名称:
</
label
>
<
span
>
{
detailInfo
?.
templateName
}
</
span
>
</
div
>
<
div
className=
{
styles
.
template_info_line
}
>
<
label
>
适用环境:
</
label
>
<
span
>
{
Environment_Status
[
detailInfo
?.
environment
]
}
</
span
>
</
div
>
<
div
className=
{
styles
.
template_info_line
}
>
<
label
>
模板描述:
</
label
>
<
span
>
{
detailInfo
?.
templateDescribe
}
</
span
>
</
div
>
<
div
className=
{
styles
.
template_info_line
}
>
<
label
>
使用站点:
</
label
>
<
span
>
{
detailInfo
?.
siteName
}
</
span
>
</
div
>
<
div
className=
{
styles
.
template_info_line
}
>
<
label
>
使用商城:
</
label
>
<
span
>
{
detailInfo
?.
shopName
}
</
span
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
btn
}
onClick=
{
()
=>
handleLinkPreview
()
}
>
<
EyeOutlined
/>
<
label
>
预览
</
label
>
</
div
>
<
div
className=
{
cx
(
styles
.
btn
,
styles
.
fit
)
}
onClick=
{
()
=>
handleLinkEdit
()
}
>
<
LayoutOutlined
/>
<
label
>
店铺装修
</
label
>
</
div
>
<
div
className=
{
cx
(
styles
.
btn
,
detailInfo
?.
use
===
1
?
styles
.
use
:
''
)
}
onClick=
{
()
=>
detailInfo
?.
use
!==
1
?
setUseModalVisible
(
true
)
:
{}
}
>
<
PushpinOutlined
/>
<
label
>
{
detailInfo
?.
use
===
1
?
'使用中'
:
'使用'
}
</
label
>
</
div
>
<
UseModal
title=
"使用店铺模板"
visible=
{
useModalVisible
}
dataInfo=
{
detailInfo
}
confirmLoading=
{
confirmLoading
}
onOk=
{
()
=>
handleConfirmUse
()
}
onCancel=
{
()
=>
setUseModalVisible
(
false
)
}
/>
</
div
>
</
DetailPage
>
)
}
export
default
TemplateDetail
src/pages/transaction/_public/order/constant.ts
View file @
bd59a776
import
{
ISchema
}
from
'@formily/antd'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
moment
from
'moment'
export
const
orderTypeLabel
=
[
''
,
'询价采购'
,
'需求采购'
,
'现货采购'
,
'集采'
,
'
积分兑换'
,
'渠道
直采'
,
'
渠道现货'
,
'渠道积分兑换'
,
]
/**
* 销售订单状态枚举
*/
export
enum
SALE_ORDER_STATUS
{
PREVIEW_ORDER
=
-
1
,
READY_APPROVED_ORDER
,
ONE_LEVEL_APPROVED_ORDER
,
TWO_LEVEL_APPROVED_ORDER
,
CONFIRM_ORDER
,
CONFIRM_PAY_RESULT_ORDER
,
ADD_SALE_ORDER
,
ADD_LOG_ORDER
,
CONFIRM_DELIVE_GOODS_ORDER
,
CONFIRM_RETURN_ORDER
,
RETURN_DOCUMENT_ORDER
}
/**
* 除了订单必填字段, 默认
*/
export
const
tableListSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
// orderNo: {
// type: 'string',
// "x-component": 'SearchFilter',
// 'x-component-props': {
// placeholder: '请输入订单编号',
// align: 'flex-end',
// },
// },
// [FORM_FILTER_PATH]: {
// type: 'object',
// 'x-component': 'flex-layout',
// 'x-component-props': {
// inline: true,
// colStyle: {
// marginLeft: 20
// }
// },
mageLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
topLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{controllerBtns}}'
,
},
},
orderNo
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-end'
,
},
}
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
},
colStyle
:
{
marginLeft
:
20
,
},
},
properties
:
{
orderThe
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
}
},
"memberName"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请输入采购会员名称'
}
},
"[startCreateTime,endCreateTime]"
:
{
type
:
'array'
,
"x-component"
:
'DateRangePickerUnix'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
'查询'
,
},
},
},}}
},
}
}
import
{
ISchema
}
from
'@formily/antd'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
moment
from
'moment'
export
const
orderTypeLabel
=
[
''
,
'询价采购'
,
'需求采购'
,
'现货采购'
,
'集采'
,
'
渠道直采'
,
'渠道
现货'
,
'
积分兑换'
,
'渠道积分兑换'
,
]
/**
* 销售订单状态枚举
*/
export
enum
SALE_ORDER_STATUS
{
PREVIEW_ORDER
=
-
1
,
READY_APPROVED_ORDER
,
ONE_LEVEL_APPROVED_ORDER
,
TWO_LEVEL_APPROVED_ORDER
,
CONFIRM_ORDER
,
CONFIRM_PAY_RESULT_ORDER
,
ADD_SALE_ORDER
,
ADD_LOG_ORDER
,
CONFIRM_DELIVE_GOODS_ORDER
,
CONFIRM_RETURN_ORDER
,
RETURN_DOCUMENT_ORDER
}
/**
* 除了订单必填字段, 默认
*/
export
const
tableListSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
// orderNo: {
// type: 'string',
// "x-component": 'SearchFilter',
// 'x-component-props': {
// placeholder: '请输入订单编号',
// align: 'flex-end',
// },
// },
// [FORM_FILTER_PATH]: {
// type: 'object',
// 'x-component': 'flex-layout',
// 'x-component-props': {
// inline: true,
// colStyle: {
// marginLeft: 20
// }
// },
mageLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
topLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{controllerBtns}}'
,
},
},
orderNo
:
{
type
:
'string'
,
"x-component"
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-end'
,
},
}
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
},
colStyle
:
{
marginLeft
:
20
,
},
},
properties
:
{
orderThe
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
}
},
"memberName"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请输入采购会员名称'
}
},
"[startCreateTime,endCreateTime]"
:
{
type
:
'array'
,
"x-component"
:
'DateRangePickerUnix'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
'查询'
,
},
},
},}}
},
}
}
src/pages/transaction/components/orderPayTabs/index.tsx
View file @
bd59a776
...
...
@@ -14,7 +14,7 @@ const TabHeader = ({dataSource}) => {
<
Col
>
<
div
className=
{
style
.
fontGray
}
>
支付比例
</
div
>
<
div
className=
{
style
.
bignumber
}
>
{
dataSource
.
payRatio
}
%
</
div
>
<
div
className=
{
style
.
smallnumber
}
>
¥
{
dataSource
.
payPrice
||
0
}
</
div
>
<
div
className=
{
style
.
smallnumber
}
>
{
dataSource
.
channel
!==
0
&&
'¥'
}
{
dataSource
.
payPrice
||
0
}
</
div
>
</
Col
>
<
Col
>
<
StatusColors
status=
{
dataSource
.
externalState
}
type=
'payOut'
/>
...
...
@@ -24,7 +24,7 @@ const TabHeader = ({dataSource}) => {
// 支付信息
const
payTextList
=
[
""
,
const
payTextList
=
[
"
积分支付
"
,
'线上支付'
,
'线下支付'
,
'授信支付'
,
...
...
@@ -63,7 +63,7 @@ const OrderPayTabs:React.FC<OrderPayTabsProps> = (props) => {
</
Row
>
<
Row
>
<
Col
className=
{
style
.
fontGray
}
span=
{
4
}
>
支付渠道:
</
Col
>
<
Col
>
{
payList
.
find
(
j
=>
j
.
id
===
v
.
channel
)?.
way
}
</
Col
>
<
Col
>
{
payList
.
find
(
j
=>
j
.
id
===
v
.
channel
)?.
way
||
(
v
.
channel
===
0
&&
'积分支付'
)
}
</
Col
>
</
Row
>
</
TabPane
>)
}
</
Tabs
>
...
...
src/pages/transaction/components/orderSaleRecord/index.tsx
View file @
bd59a776
...
...
@@ -314,7 +314,9 @@ const OrderSaleRecord:React.FC<OrderSaleRecordProps> = (props) => {
onOk
()
{
PublicApi
.
postOrderReceiptOrderContinueShipping
({
orderId
:
data
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
()
setTimeout
(()
=>
{
history
.
goBack
()
},
1000
)
}
})
},
...
...
src/pages/transaction/saleOrder/addSaleDelevedOrder/model/useSelfTable.tsx
View file @
bd59a776
import
React
,
{
useRef
}
from
'react'
import
{
history
,
Link
}
from
'umi'
import
{
Button
,
Row
,
Col
,
Modal
}
from
'antd'
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
{
formatTimeString
}
from
'@/utils'
import
{
ORDER_TYPE
,
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
,
DOC_TYPE_SALES_INVOICE
}
from
'@/constants'
import
StatusColors
from
'@/pages/transaction/components/StatusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
{
Chart
,
Interval
,
Axis
,
Tooltip
,
Coordinate
,
Legend
,
View
,
Annotation
,
}
from
'bizcharts'
;
import
DataSet
from
"@antv/data-set"
;
// 业务hooks, 待支付订单
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
customOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
,
render
:
(
text
,
record
)
=>
{
// 查看订单, 需根据状态显示不同schema
return
(
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/saleOrder/addSaleDelevedOrder/preview?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
)
}
},
{
title
:
'订单摘要/下单时间'
,
align
:
'center'
,
dataIndex
:
'orderThe'
,
key
:
'orderThe'
,
render
:
(
text
,
record
)
=>
<>
<
div
>
{
text
}
</
div
>
<
div
><
FieldTimeOutlined
/>
{
formatTimeString
(
record
.
createTime
)
}
</
div
>
</>,
width
:
200
},
{
title
:
'采购会员'
,
align
:
'left'
,
dataIndex
:
'memberName'
,
key
:
'memberName'
,
},
{
title
:
'总金额/已支付(元)'
,
align
:
'center'
,
dataIndex
:
'sumPrice'
,
key
:
'sumPrice'
,
render
:
text
=>
'¥'
+
text
},
{
title
:
'发货批次'
,
align
:
'center'
,
dataIndex
:
'shipmentBatch'
,
key
:
'shipmentBatch'
,
render
:
text
=>
text
?
`第
${
text
}
次`
:
''
},
// @todo 发货单号跳转
{
title
:
'发货单号'
,
align
:
'center'
,
dataIndex
:
'
invoiceNumber'
,
key
:
'
invoiceNumber'
,
render
:
(
text
,
record
)
=>
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.orderDeliveryDetailsId}&preview=1`
}
>
{
text
}
</
Link
>
},
// { title: '当前支付', align: 'center', dataIndex: 'currentPayments', render: (text, record) => text},
{
title
:
'订单类型'
,
align
:
'center'
,
dataIndex
:
'type'
,
key
:
'type'
,
render
:
(
text
)
=>
ORDER_TYPE
[
text
]
},
{
title
:
'外部状态'
,
align
:
'center'
,
dataIndex
:
'externalState'
,
key
:
'externalState'
,
render
:
text
=>
<
StatusColors
status=
{
text
}
type=
'out'
/>
},
{
title
:
'内部状态'
,
align
:
'center'
,
dataIndex
:
'purchaseOrderInteriorState'
,
key
:
'purchaseOrderInteriorState'
,
render
:
(
text
)
=>
<
StatusColors
status=
{
text
}
type=
'saleInside'
/>
},
{
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
/* 支付结果确认到账= 待审核状态 */
}
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
READY_DELEVED_APPROVED
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
审核
</
Button
>
}
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
SALE_CREATE_DELIVED_ORDER
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleAdd
(
record
)
}
>
新增发货单
</
Button
>
}
</>
}
]
const
handleConfirm
=
async
(
record
)
=>
{
const
modal
=
Modal
.
confirm
({
title
:
'确认审核操作'
,
content
:
`是否确认审核发货单号为
${
record
.
invoiceNumber
}
的销售发货单?`
,
onOk
:
async
()
=>
{
const
{
code
}
=
await
PublicApi
.
postOrderAuditSalesInvoiceOrder
({
id
:
record
.
orderDeliveryDetailsId
,
orderId
:
record
.
id
})
if
(
code
===
1000
)
{
modal
.
destroy
()
ref
.
current
.
reload
()
}
}
})
}
const
handleAdd
=
async
(
record
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/stockSellStorage/bills/add?relevanceInvoicesId=
${
record
.
id
}
&invoicesTypeId=
${
DOC_TYPE_SALES_INVOICE
}
&relevanceInvoices=1`
)
}
return
{
columns
:
customOrderColumns
,
ref
}
}
import
React
,
{
useRef
}
from
'react'
import
{
history
,
Link
}
from
'umi'
import
{
Button
,
Row
,
Col
,
Modal
}
from
'antd'
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
{
formatTimeString
}
from
'@/utils'
import
{
ORDER_TYPE
,
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
,
DOC_TYPE_SALES_INVOICE
}
from
'@/constants'
import
StatusColors
from
'@/pages/transaction/components/StatusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
{
Chart
,
Interval
,
Axis
,
Tooltip
,
Coordinate
,
Legend
,
View
,
Annotation
,
}
from
'bizcharts'
;
import
DataSet
from
"@antv/data-set"
;
// 业务hooks, 待支付订单
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
customOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
,
render
:
(
text
,
record
)
=>
{
// 查看订单, 需根据状态显示不同schema
return
(
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/saleOrder/addSaleDelevedOrder/preview?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
)
}
},
{
title
:
'订单摘要/下单时间'
,
align
:
'center'
,
dataIndex
:
'orderThe'
,
key
:
'orderThe'
,
render
:
(
text
,
record
)
=>
<>
<
div
>
{
text
}
</
div
>
<
div
><
FieldTimeOutlined
/>
{
formatTimeString
(
record
.
createTime
)
}
</
div
>
</>,
width
:
200
},
{
title
:
'采购会员'
,
align
:
'left'
,
dataIndex
:
'memberName'
,
key
:
'memberName'
,
},
{
title
:
'总金额/已支付(元)'
,
align
:
'center'
,
dataIndex
:
'sumPrice'
,
key
:
'sumPrice'
,
render
:
text
=>
'¥'
+
text
},
{
title
:
'发货批次'
,
align
:
'center'
,
dataIndex
:
'shipmentBatch'
,
key
:
'shipmentBatch'
,
render
:
text
=>
text
?
`第
${
text
}
次`
:
''
},
// @todo 发货单号跳转
{
title
:
'发货单号'
,
align
:
'center'
,
dataIndex
:
'
deliverNo'
,
key
:
'
deliverNo'
,
render
:
(
text
,
record
)
=>
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.orderDeliveryDetailsId}&preview=1`
}
>
{
text
}
</
Link
>
},
// { title: '当前支付', align: 'center', dataIndex: 'currentPayments', render: (text, record) => text},
{
title
:
'订单类型'
,
align
:
'center'
,
dataIndex
:
'type'
,
key
:
'type'
,
render
:
(
text
)
=>
ORDER_TYPE
[
text
]
},
{
title
:
'外部状态'
,
align
:
'center'
,
dataIndex
:
'externalState'
,
key
:
'externalState'
,
render
:
text
=>
<
StatusColors
status=
{
text
}
type=
'out'
/>
},
{
title
:
'内部状态'
,
align
:
'center'
,
dataIndex
:
'purchaseOrderInteriorState'
,
key
:
'purchaseOrderInteriorState'
,
render
:
(
text
)
=>
<
StatusColors
status=
{
text
}
type=
'saleInside'
/>
},
{
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
/* 支付结果确认到账= 待审核状态 */
}
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
READY_DELEVED_APPROVED
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
审核
</
Button
>
}
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
SALE_CREATE_DELIVED_ORDER
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleAdd
(
record
)
}
>
新增发货单
</
Button
>
}
</>
}
]
const
handleConfirm
=
async
(
record
)
=>
{
const
modal
=
Modal
.
confirm
({
title
:
'确认审核操作'
,
content
:
`是否确认审核发货单号为
${
record
.
invoiceNumber
}
的销售发货单?`
,
onOk
:
async
()
=>
{
const
{
code
}
=
await
PublicApi
.
postOrderAuditSalesInvoiceOrder
({
id
:
record
.
orderDeliveryDetailsId
,
orderId
:
record
.
id
})
if
(
code
===
1000
)
{
modal
.
destroy
()
ref
.
current
.
reload
()
}
}
})
}
const
handleAdd
=
async
(
record
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/stockSellStorage/bills/add?relevanceInvoicesId=
${
record
.
id
}
&invoicesTypeId=
${
DOC_TYPE_SALES_INVOICE
}
&relevanceInvoices=1`
)
}
return
{
columns
:
customOrderColumns
,
ref
}
}
src/pages/transaction/saleOrder/readyAddLogisticsOrder/model/useSelfTable.tsx
View file @
bd59a776
import
React
,
{
useRef
}
from
'react'
import
{
history
,
Link
}
from
'umi'
import
{
Button
,
Row
,
Col
}
from
'antd'
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
{
formatTimeString
}
from
'@/utils'
import
{
ORDER_TYPE
,
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
import
StatusColors
from
'@/pages/transaction/components/StatusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
qs
from
'querystring'
// 业务hooks, 待支付订单
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
customOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
,
render
:
(
text
,
record
)
=>
{
// 查看订单, 需根据状态显示不同schema
return
(
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/saleOrder/readyAddLogisticsOrder/preview?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
)
}
},
{
title
:
'订单摘要/下单时间'
,
align
:
'center'
,
dataIndex
:
'orderThe'
,
key
:
'orderThe'
,
render
:
(
text
,
record
)
=>
<>
<
div
>
{
text
}
</
div
>
<
div
><
FieldTimeOutlined
/>
{
formatTimeString
(
record
.
createTime
)
}
</
div
>
</>,
width
:
200
},
{
title
:
'采购会员'
,
align
:
'left'
,
dataIndex
:
'memberName'
,
key
:
'memberName'
,
},
{
title
:
'总金额'
,
align
:
'center'
,
dataIndex
:
'sumPrice'
,
key
:
'sumPrice'
,
render
:
text
=>
'¥'
+
text
},
{
title
:
'发货批次'
,
align
:
'center'
,
dataIndex
:
'shipmentBatch'
,
key
:
'shipmentBatch'
,
render
:
text
=>
text
?
`第
${
text
}
次`
:
''
},
// @todo 发货单号跳转
{
title
:
'发货单号'
,
align
:
'center'
,
dataIndex
:
'
invoiceNumber'
,
key
:
'
invoiceNumber'
,
render
:
(
text
,
record
)
=>
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.orderDeliveryDetailsId}&preview=1`
}
>
{
text
}
</
Link
>
},
// { title: '当前支付', align: 'center', dataIndex: 'currentPayments', render: (text, record) => text},
{
title
:
'订单类型'
,
align
:
'center'
,
dataIndex
:
'type'
,
key
:
'type'
,
render
:
(
text
)
=>
ORDER_TYPE
[
text
]
},
{
title
:
'外部状态'
,
align
:
'center'
,
dataIndex
:
'externalState'
,
key
:
'externalState'
,
render
:
text
=>
<
StatusColors
status=
{
text
}
type=
'out'
/>
},
{
title
:
'内部状态'
,
align
:
'center'
,
dataIndex
:
'purchaseOrderInteriorState'
,
key
:
'purchaseOrderInteriorState'
,
render
:
(
text
)
=>
<
StatusColors
status=
{
text
}
type=
'saleInside'
/>
},
{
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
ADD_LOGISTICS_ORDER
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
新增物流单
</
Button
>
}
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
DELIVERY_APPROVED_SUCCESS
&&
<
Button
type=
'link'
onClick=
{
()
=>
handlePreview
(
record
)
}
>
查看物流单
</
Button
>
}
</>
}
]
const
handleConfirm
=
async
(
record
)
=>
{
const
params
=
{
id
:
record
.
orderDeliveryDetailsId
,
createType
:
2
,
// 创建方式
shipmentOrderCode
:
record
.
invoiceNumber
,
// 发货单号
invoicesNo
:
record
.
orderNo
,
// 对应订单号/售后单
relevanceType
:
1
}
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add?
${
qs
.
stringify
(
params
)}
`
)
}
const
handlePreview
=
async
(
record
)
=>
{
const
logisticsId
=
record
.
logisticsId
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=
${
logisticsId
}
&invoicesTypeId=2`
)
}
return
{
columns
:
customOrderColumns
}
}
import
React
,
{
useRef
}
from
'react'
import
{
history
,
Link
}
from
'umi'
import
{
Button
,
Row
,
Col
}
from
'antd'
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
{
formatTimeString
}
from
'@/utils'
import
{
ORDER_TYPE
,
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
import
StatusColors
from
'@/pages/transaction/components/StatusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
qs
from
'querystring'
// 业务hooks, 待支付订单
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
customOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
,
render
:
(
text
,
record
)
=>
{
// 查看订单, 需根据状态显示不同schema
return
(
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/saleOrder/readyAddLogisticsOrder/preview?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
)
}
},
{
title
:
'订单摘要/下单时间'
,
align
:
'center'
,
dataIndex
:
'orderThe'
,
key
:
'orderThe'
,
render
:
(
text
,
record
)
=>
<>
<
div
>
{
text
}
</
div
>
<
div
><
FieldTimeOutlined
/>
{
formatTimeString
(
record
.
createTime
)
}
</
div
>
</>,
width
:
200
},
{
title
:
'采购会员'
,
align
:
'left'
,
dataIndex
:
'memberName'
,
key
:
'memberName'
,
},
{
title
:
'总金额'
,
align
:
'center'
,
dataIndex
:
'sumPrice'
,
key
:
'sumPrice'
,
render
:
text
=>
'¥'
+
text
},
{
title
:
'发货批次'
,
align
:
'center'
,
dataIndex
:
'shipmentBatch'
,
key
:
'shipmentBatch'
,
render
:
text
=>
text
?
`第
${
text
}
次`
:
''
},
// @todo 发货单号跳转
{
title
:
'发货单号'
,
align
:
'center'
,
dataIndex
:
'
deliverNo'
,
key
:
'
deliverNo'
,
render
:
(
text
,
record
)
=>
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.orderDeliveryDetailsId}&preview=1`
}
>
{
text
}
</
Link
>
},
// { title: '当前支付', align: 'center', dataIndex: 'currentPayments', render: (text, record) => text},
{
title
:
'订单类型'
,
align
:
'center'
,
dataIndex
:
'type'
,
key
:
'type'
,
render
:
(
text
)
=>
ORDER_TYPE
[
text
]
},
{
title
:
'外部状态'
,
align
:
'center'
,
dataIndex
:
'externalState'
,
key
:
'externalState'
,
render
:
text
=>
<
StatusColors
status=
{
text
}
type=
'out'
/>
},
{
title
:
'内部状态'
,
align
:
'center'
,
dataIndex
:
'purchaseOrderInteriorState'
,
key
:
'purchaseOrderInteriorState'
,
render
:
(
text
)
=>
<
StatusColors
status=
{
text
}
type=
'saleInside'
/>
},
{
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
ADD_LOGISTICS_ORDER
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
新增物流单
</
Button
>
}
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
DELIVERY_APPROVED_SUCCESS
&&
<
Button
type=
'link'
onClick=
{
()
=>
handlePreview
(
record
)
}
>
查看物流单
</
Button
>
}
</>
}
]
const
handleConfirm
=
async
(
record
)
=>
{
const
params
=
{
id
:
record
.
orderDeliveryDetailsId
,
createType
:
2
,
// 创建方式
shipmentOrderCode
:
record
.
invoiceNumber
,
// 发货单号
invoicesNo
:
record
.
orderNo
,
// 对应订单号/售后单
relevanceType
:
1
}
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add?
${
qs
.
stringify
(
params
)}
`
)
}
const
handlePreview
=
async
(
record
)
=>
{
const
logisticsId
=
record
.
logisticsId
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=
${
logisticsId
}
&invoicesTypeId=2`
)
}
return
{
columns
:
customOrderColumns
}
}
src/pages/transaction/saleOrder/readyConfirmDelevedOrder/model/useSelfTable.tsx
View file @
bd59a776
import
React
,
{
useRef
}
from
'react'
import
{
history
,
Link
}
from
'umi'
import
{
Button
,
Row
,
Col
}
from
'antd'
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
{
formatTimeString
}
from
'@/utils'
import
{
ORDER_TYPE
,
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
import
StatusColors
from
'@/pages/transaction/components/StatusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
{
Chart
,
Interval
,
Axis
,
Tooltip
,
Coordinate
,
Legend
,
View
,
Annotation
,
}
from
'bizcharts'
;
import
DataSet
from
"@antv/data-set"
;
// 业务hooks, 待支付订单
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
customOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
,
render
:
(
text
,
record
)
=>
{
// 查看订单, 需根据状态显示不同schema
return
(
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/saleOrder/readyConfirmDelevedOrder/preview?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
)
}
},
{
title
:
'订单摘要/下单时间'
,
align
:
'center'
,
dataIndex
:
'orderThe'
,
key
:
'orderThe'
,
render
:
(
text
,
record
)
=>
<>
<
div
>
{
text
}
</
div
>
<
div
><
FieldTimeOutlined
/>
{
formatTimeString
(
record
.
createTime
)
}
</
div
>
</>,
width
:
200
},
{
title
:
'采购会员'
,
align
:
'left'
,
dataIndex
:
'memberName'
,
key
:
'memberName'
,
},
{
title
:
'总金额'
,
align
:
'center'
,
dataIndex
:
'sumPrice'
,
key
:
'sumPrice'
,
render
:
(
t
,
r
)
=>
(
r
.
type
===
7
||
r
.
type
===
8
)
?
t
:
'¥'
+
t
},
{
title
:
'发货批次'
,
align
:
'center'
,
dataIndex
:
'shipmentBatch'
,
key
:
'shipmentBatch'
,
render
:
text
=>
text
?
`第
${
text
}
次`
:
''
},
// @todo 发货单号跳转
{
title
:
'发货单号'
,
align
:
'center'
,
dataIndex
:
'
invoiceNumber'
,
key
:
'
invoiceNumber'
,
render
:
(
text
,
record
)
=>
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.orderDeliveryDetailsId}&preview=1`
}
>
{
text
}
</
Link
>
},
{
title
:
'订单类型'
,
align
:
'center'
,
dataIndex
:
'type'
,
key
:
'type'
,
render
:
(
text
)
=>
ORDER_TYPE
[
text
]
},
{
title
:
'外部状态'
,
align
:
'center'
,
dataIndex
:
'externalState'
,
key
:
'externalState'
,
render
:
text
=>
<
StatusColors
status=
{
text
}
type=
'out'
/>
},
{
title
:
'内部状态'
,
align
:
'center'
,
dataIndex
:
'purchaseOrderInteriorState'
,
key
:
'purchaseOrderInteriorState'
,
render
:
(
text
)
=>
<
StatusColors
status=
{
text
}
type=
'saleInside'
/>
},
{
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
/* 支付结果确认到账= 待审核状态 */
}
{
(
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
CONFIRM_DELIVERY_ORDER
||
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
HAND_DELEVED_ORDER
)
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
确认发货
</
Button
>
}
</>
}
]
const
handleConfirm
=
async
(
record
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/saleOrder/readyConfirmDelevedOrder/detail?id=
${
record
.
id
}
&orderDeliveryDetailsId=
${
record
.
orderDeliveryDetailsId
}
`
)
}
return
{
columns
:
customOrderColumns
}
}
import
React
,
{
useRef
}
from
'react'
import
{
history
,
Link
}
from
'umi'
import
{
Button
,
Row
,
Col
}
from
'antd'
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
{
formatTimeString
}
from
'@/utils'
import
{
ORDER_TYPE
,
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
import
StatusColors
from
'@/pages/transaction/components/StatusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
{
Chart
,
Interval
,
Axis
,
Tooltip
,
Coordinate
,
Legend
,
View
,
Annotation
,
}
from
'bizcharts'
;
import
DataSet
from
"@antv/data-set"
;
// 业务hooks, 待支付订单
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
customOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
,
render
:
(
text
,
record
)
=>
{
// 查看订单, 需根据状态显示不同schema
return
(
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/saleOrder/readyConfirmDelevedOrder/preview?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
)
}
},
{
title
:
'订单摘要/下单时间'
,
align
:
'center'
,
dataIndex
:
'orderThe'
,
key
:
'orderThe'
,
render
:
(
text
,
record
)
=>
<>
<
div
>
{
text
}
</
div
>
<
div
><
FieldTimeOutlined
/>
{
formatTimeString
(
record
.
createTime
)
}
</
div
>
</>,
width
:
200
},
{
title
:
'采购会员'
,
align
:
'left'
,
dataIndex
:
'memberName'
,
key
:
'memberName'
,
},
{
title
:
'总金额'
,
align
:
'center'
,
dataIndex
:
'sumPrice'
,
key
:
'sumPrice'
,
render
:
(
t
,
r
)
=>
(
r
.
type
===
7
||
r
.
type
===
8
)
?
t
:
'¥'
+
t
},
{
title
:
'发货批次'
,
align
:
'center'
,
dataIndex
:
'shipmentBatch'
,
key
:
'shipmentBatch'
,
render
:
text
=>
text
?
`第
${
text
}
次`
:
''
},
// @todo 发货单号跳转
{
title
:
'发货单号'
,
align
:
'center'
,
dataIndex
:
'
deliverNo'
,
key
:
'
deliverNo'
,
render
:
(
text
,
record
)
=>
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.orderDeliveryDetailsId}&preview=1`
}
>
{
text
}
</
Link
>
},
{
title
:
'订单类型'
,
align
:
'center'
,
dataIndex
:
'type'
,
key
:
'type'
,
render
:
(
text
)
=>
ORDER_TYPE
[
text
]
},
{
title
:
'外部状态'
,
align
:
'center'
,
dataIndex
:
'externalState'
,
key
:
'externalState'
,
render
:
text
=>
<
StatusColors
status=
{
text
}
type=
'out'
/>
},
{
title
:
'内部状态'
,
align
:
'center'
,
dataIndex
:
'purchaseOrderInteriorState'
,
key
:
'purchaseOrderInteriorState'
,
render
:
(
text
)
=>
<
StatusColors
status=
{
text
}
type=
'saleInside'
/>
},
{
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
/* 支付结果确认到账= 待审核状态 */
}
{
(
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
CONFIRM_DELIVERY_ORDER
||
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
HAND_DELEVED_ORDER
)
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
确认发货
</
Button
>
}
</>
}
]
const
handleConfirm
=
async
(
record
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/saleOrder/readyConfirmDelevedOrder/detail?id=
${
record
.
id
}
&orderDeliveryDetailsId=
${
record
.
orderDeliveryDetailsId
}
`
)
}
return
{
columns
:
customOrderColumns
}
}
src/pages/transaction/saleOrder/readyConfirmReturnOrder/model/useSelfTable.tsx
View file @
bd59a776
import
React
,
{
useRef
}
from
'react'
import
{
history
,
Link
}
from
'umi'
import
{
Button
,
Row
,
Col
}
from
'antd'
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
{
formatTimeString
}
from
'@/utils'
import
{
ORDER_TYPE
,
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
import
StatusColors
from
'@/pages/transaction/components/StatusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
{
Chart
,
Interval
,
Axis
,
Tooltip
,
Coordinate
,
Legend
,
View
,
Annotation
,
}
from
'bizcharts'
;
import
DataSet
from
"@antv/data-set"
;
// 业务hooks
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
customOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
,
render
:
(
text
,
record
)
=>
{
// 查看订单, 需根据状态显示不同schema
return
(
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/saleOrder/readyConfirmReturnOrder/preview?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
)
}
},
{
title
:
'订单摘要/下单时间'
,
align
:
'center'
,
dataIndex
:
'orderThe'
,
key
:
'orderThe'
,
render
:
(
text
,
record
)
=>
<>
<
div
>
{
text
}
</
div
>
<
div
><
FieldTimeOutlined
/>
{
formatTimeString
(
record
.
createTime
)
}
</
div
>
</>,
width
:
200
},
{
title
:
'采购会员'
,
align
:
'left'
,
dataIndex
:
'memberName'
,
key
:
'memberName'
,
},
{
title
:
'总金额'
,
align
:
'center'
,
dataIndex
:
'sumPrice'
,
key
:
'sumPrice'
,
render
:
text
=>
'¥'
+
text
},
{
title
:
'发货批次'
,
align
:
'center'
,
dataIndex
:
'shipmentBatch'
,
key
:
'shipmentBatch'
,
render
:
text
=>
text
?
`第
${
text
}
次`
:
''
},
// @todo 发货单号跳转
{
title
:
'发货单号'
,
align
:
'center'
,
dataIndex
:
'
invoiceNumber'
,
key
:
'
invoiceNumber'
,
render
:
(
text
,
record
)
=>
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.orderDeliveryDetailsId}&preview=1`
}
>
{
text
}
</
Link
>
},
{
title
:
'订单类型'
,
align
:
'center'
,
dataIndex
:
'type'
,
key
:
'type'
,
render
:
(
text
)
=>
ORDER_TYPE
[
text
]
},
{
title
:
'外部状态'
,
align
:
'center'
,
dataIndex
:
'externalState'
,
key
:
'externalState'
,
render
:
text
=>
<
StatusColors
status=
{
text
}
type=
'out'
/>
},
{
title
:
'内部状态'
,
align
:
'center'
,
dataIndex
:
'purchaseOrderInteriorState'
,
key
:
'purchaseOrderInteriorState'
,
render
:
(
text
)
=>
<
StatusColors
status=
{
text
}
type=
'saleInside'
/>
},
{
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
/* 支付结果确认到账= 待审核状态 */
}
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
CONFIRM_RECEIPT
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
确认回单
</
Button
>
}
</>
}
]
const
handleConfirm
=
async
(
record
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/saleOrder/readyConfirmReturnOrder/detail?id=
${
record
.
id
}
&orderDeliveryDetailsId=
${
record
.
orderDeliveryDetailsId
}
`
)
}
return
{
columns
:
customOrderColumns
}
}
import
React
,
{
useRef
}
from
'react'
import
{
history
,
Link
}
from
'umi'
import
{
Button
,
Row
,
Col
}
from
'antd'
import
{
PublicApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
{
formatTimeString
}
from
'@/utils'
import
{
ORDER_TYPE
,
PurchaseOrderInsideWorkState
,
SaleOrderInsideWorkState
}
from
'@/constants'
import
StatusColors
from
'@/pages/transaction/components/StatusColors'
import
{
FieldTimeOutlined
}
from
'@ant-design/icons'
import
{
Chart
,
Interval
,
Axis
,
Tooltip
,
Coordinate
,
Legend
,
View
,
Annotation
,
}
from
'bizcharts'
;
import
DataSet
from
"@antv/data-set"
;
// 业务hooks
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
customOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
key
:
'orderNo'
,
render
:
(
text
,
record
)
=>
{
// 查看订单, 需根据状态显示不同schema
return
(
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/saleOrder/readyConfirmReturnOrder/preview?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
)
}
},
{
title
:
'订单摘要/下单时间'
,
align
:
'center'
,
dataIndex
:
'orderThe'
,
key
:
'orderThe'
,
render
:
(
text
,
record
)
=>
<>
<
div
>
{
text
}
</
div
>
<
div
><
FieldTimeOutlined
/>
{
formatTimeString
(
record
.
createTime
)
}
</
div
>
</>,
width
:
200
},
{
title
:
'采购会员'
,
align
:
'left'
,
dataIndex
:
'memberName'
,
key
:
'memberName'
,
},
{
title
:
'总金额'
,
align
:
'center'
,
dataIndex
:
'sumPrice'
,
key
:
'sumPrice'
,
render
:
text
=>
'¥'
+
text
},
{
title
:
'发货批次'
,
align
:
'center'
,
dataIndex
:
'shipmentBatch'
,
key
:
'shipmentBatch'
,
render
:
text
=>
text
?
`第
${
text
}
次`
:
''
},
// @todo 发货单号跳转
{
title
:
'发货单号'
,
align
:
'center'
,
dataIndex
:
'
deliverNo'
,
key
:
'
deliverNo'
,
render
:
(
text
,
record
)
=>
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${record.orderDeliveryDetailsId}&preview=1`
}
>
{
text
}
</
Link
>
},
{
title
:
'订单类型'
,
align
:
'center'
,
dataIndex
:
'type'
,
key
:
'type'
,
render
:
(
text
)
=>
ORDER_TYPE
[
text
]
},
{
title
:
'外部状态'
,
align
:
'center'
,
dataIndex
:
'externalState'
,
key
:
'externalState'
,
render
:
text
=>
<
StatusColors
status=
{
text
}
type=
'out'
/>
},
{
title
:
'内部状态'
,
align
:
'center'
,
dataIndex
:
'purchaseOrderInteriorState'
,
key
:
'purchaseOrderInteriorState'
,
render
:
(
text
)
=>
<
StatusColors
status=
{
text
}
type=
'saleInside'
/>
},
{
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'ctl'
,
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
/* 支付结果确认到账= 待审核状态 */
}
{
record
.
purchaseOrderInteriorState
===
SaleOrderInsideWorkState
.
CONFIRM_RECEIPT
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleConfirm
(
record
)
}
>
确认回单
</
Button
>
}
</>
}
]
const
handleConfirm
=
async
(
record
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/saleOrder/readyConfirmReturnOrder/detail?id=
${
record
.
id
}
&orderDeliveryDetailsId=
${
record
.
orderDeliveryDetailsId
}
`
)
}
return
{
columns
:
customOrderColumns
}
}
src/store/site/index.ts
View file @
bd59a776
import
{
action
,
computed
,
observable
,
runInAction
}
from
'mobx'
import
{
ISiteModule
}
from
'@/module/siteModule'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
PublicApi
}
from
'@/services/api'
class
SiteStore
implements
ISiteModule
{
// 可在根目录下的demo.js修改数据
@
observable
public
siteId
:
number
=
GlobalConfig
.
global
.
siteInfo
.
id
;
// 站点id
@
observable
public
siteUrl
:
string
=
GlobalConfig
.
global
.
siteInfo
.
siteUrl
;
// 站点域名
@
observable
public
mallTemplateId
:
number
=
null
;
// 企业商城模板id
@
observable
public
mallTemplateInfo
:
any
=
{};
// 企业商城模板id
@
observable
public
shopTemplateId
:
number
=
null
;
// 店铺模板id
@
observable
public
channelTemplateId
:
number
=
null
;
// 渠道模板id
@
observable
public
commodityTemplateInfo
:
any
=
{}
/**
* 根据站点查询正在使用的商城模板
*/
@
action
.
bound
public
findUseMallTemplate
=
async
()
=>
{
const
tempMallTemplateInfo
=
sessionStorage
.
getItem
(
"mallTemplateInfo"
)
if
(
tempMallTemplateInfo
)
{
this
.
mallTemplateInfo
=
JSON
.
parse
(
tempMallTemplateInfo
)
this
.
mallTemplateId
=
this
.
mallTemplateInfo
.
id
return
}
const
param
:
any
=
{
siteId
:
this
.
siteId
}
const
res
=
await
PublicApi
.
getTemplatePlatformFindUseTemplateBySite
(
param
)
runInAction
(()
=>
{
this
.
mallTemplateInfo
=
res
.
data
||
{}
this
.
mallTemplateId
=
this
.
mallTemplateInfo
.
id
sessionStorage
.
setItem
(
"mallTemplateInfo"
,
JSON
.
stringify
(
this
.
mallTemplateInfo
))
})
}
/**
* 根据站点查询正在使用的商品描述模板
*/
@
action
.
bound
public
findUseGoodsTemplate
=
async
()
=>
{
const
tempCommodityTemplateInfo
=
sessionStorage
.
getItem
(
"commodityTemplateInfo"
)
if
(
tempCommodityTemplateInfo
)
{
this
.
commodityTemplateInfo
=
JSON
.
parse
(
tempCommodityTemplateInfo
)
return
}
const
param
:
any
=
{
siteId
:
this
.
siteId
}
const
res
=
await
PublicApi
.
getTemplate
GoodsFindUseGoodsTemplate
(
param
)
runInAction
(()
=>
{
if
(
res
.
code
===
1000
)
{
this
.
commodityTemplateInfo
=
res
.
data
sessionStorage
.
setItem
(
"commodityTemplateInfo"
,
JSON
.
stringify
(
this
.
commodityTemplateInfo
))
}
})
}
}
export
default
SiteStore
import
{
action
,
computed
,
observable
,
runInAction
}
from
'mobx'
import
{
ISiteModule
}
from
'@/module/siteModule'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
PublicApi
}
from
'@/services/api'
class
SiteStore
implements
ISiteModule
{
// 可在根目录下的demo.js修改数据
@
observable
public
siteId
:
number
=
GlobalConfig
.
global
.
siteInfo
.
id
;
// 站点id
@
observable
public
siteUrl
:
string
=
GlobalConfig
.
global
.
siteInfo
.
siteUrl
;
// 站点域名
@
observable
public
mallTemplateId
:
number
=
null
;
// 企业商城模板id
@
observable
public
mallTemplateInfo
:
any
=
{};
// 企业商城模板id
@
observable
public
shopTemplateId
:
number
=
null
;
// 店铺模板id
@
observable
public
channelTemplateId
:
number
=
null
;
// 渠道模板id
@
observable
public
commodityTemplateInfo
:
any
=
{}
/**
* 根据站点查询正在使用的商城模板
*/
@
action
.
bound
public
findUseMallTemplate
=
async
()
=>
{
const
tempMallTemplateInfo
=
sessionStorage
.
getItem
(
"mallTemplateInfo"
)
if
(
tempMallTemplateInfo
)
{
this
.
mallTemplateInfo
=
JSON
.
parse
(
tempMallTemplateInfo
)
this
.
mallTemplateId
=
this
.
mallTemplateInfo
.
id
return
}
const
param
:
any
=
{
siteId
:
this
.
siteId
}
const
res
=
await
PublicApi
.
getTemplatePlatformFindUseTemplateBySite
(
param
)
runInAction
(()
=>
{
this
.
mallTemplateInfo
=
res
.
data
||
{}
this
.
mallTemplateId
=
this
.
mallTemplateInfo
.
id
sessionStorage
.
setItem
(
"mallTemplateInfo"
,
JSON
.
stringify
(
this
.
mallTemplateInfo
))
})
}
/**
* 根据站点查询正在使用的商品描述模板
*/
@
action
.
bound
public
findUseGoodsTemplate
=
async
()
=>
{
const
tempCommodityTemplateInfo
=
sessionStorage
.
getItem
(
"commodityTemplateInfo"
)
if
(
tempCommodityTemplateInfo
)
{
this
.
commodityTemplateInfo
=
JSON
.
parse
(
tempCommodityTemplateInfo
)
return
}
const
param
:
any
=
{
siteId
:
this
.
siteId
}
const
res
=
await
PublicApi
.
getTemplate
WebPageTemplateWebFindGoodsDescribeTemplate
(
param
)
runInAction
(()
=>
{
if
(
res
.
code
===
1000
)
{
this
.
commodityTemplateInfo
=
res
.
data
sessionStorage
.
setItem
(
"commodityTemplateInfo"
,
JSON
.
stringify
(
this
.
commodityTemplateInfo
))
}
})
}
}
export
default
SiteStore
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