Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
openApi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hj
openApi
Commits
ba6f28e0
Commit
ba6f28e0
authored
Jun 06, 2022
by
hangjun83
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
罗恩工具类更新
parent
ca7d079a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
808 additions
and
38 deletions
+808
-38
front/src/api/index.js
front/src/api/index.js
+40
-0
front/src/views/Main.vue
front/src/views/Main.vue
+0
-1
front/src/views/main.less
front/src/views/main.less
+2
-2
front/src/views/sys/role-manage/roleManage.vue
front/src/views/sys/role-manage/roleManage.vue
+1
-1
front/src/views/sys/user-manage/userManage.vue
front/src/views/sys/user-manage/userManage.vue
+1
-1
front/src/views/tools/bh/orders.vue
front/src/views/tools/bh/orders.vue
+1
-1
front/src/views/tools/bh/sorders-refund.vue
front/src/views/tools/bh/sorders-refund.vue
+37
-32
front/src/views/tools/rhawn/sorders-refund.less
front/src/views/tools/rhawn/sorders-refund.less
+8
-0
front/src/views/tools/rhawn/sorders-refund.vue
front/src/views/tools/rhawn/sorders-refund.vue
+718
-0
No files found.
front/src/api/index.js
View file @
ba6f28e0
...
...
@@ -170,6 +170,46 @@ export const getBhSordersDetail = (params) => {
return
postRequest
(
'
/tools/bh/getSorderDetailByTaskId
'
,
params
)
}
/*=========== rhawn =========================*/
export
const
getRhawnSordersDataDetail
=
(
params
)
=>
{
return
postRequest
(
'
/tools/rhawn/getSordersDetail
'
,
params
)
}
export
const
getRhawnSordersRefundTask
=
(
params
)
=>
{
params
.
type
=
'
rhawn_sorder_refund
'
return
getRequest
(
'
/tools/rhawn/getSorderRefundTask
'
,
params
)
}
export
const
getRhawnSordersStock
=
(
params
)
=>
{
return
getRequest
(
'
/tools/rhawn/getRhawnSordersStock
'
,
params
)
}
export
const
addRhawnSorderRefundTask
=
(
params
)
=>
{
return
postRequest
(
'
/tools/rhawn/addSorderRefundTask
'
,
params
)
}
export
const
execRhawnSordersRefundTask
=
(
params
)
=>
{
return
postRequest
(
'
/tools/rhawn/execRhawnSorderRefundTask
'
,
params
)
}
export
const
delRhawnSorderRefundTask
=
(
params
)
=>
{
return
postRequest
(
'
/tools/rhawn/delSorderRefundTask
'
,
params
)
}
export
const
getRhawnSorderRefundTaskLogs
=
(
params
)
=>
{
params
.
type
=
'
rhawn_sorder_refund
'
return
getRequest
(
'
/tools/rhawn/getSorderRefundTaskLogs
'
,
params
)
}
export
const
getRhawnSordersDetail
=
(
params
)
=>
{
return
postRequest
(
'
/tools/rhawn/getSorderDetailByTaskId
'
,
params
)
}
export
const
editRhawnSorderRefundTask
=
(
params
)
=>
{
return
postRequest
(
'
/tools/rhawn/editSorderRefundTask
'
,
params
)
}
/*=================== 工具类相关接口 结束================================ */
...
...
front/src/views/Main.vue
View file @
ba6f28e0
...
...
@@ -11,7 +11,6 @@
}">
<shrinkable-menu
:shrink=
"shrink"
@
on-change=
"handleSubmenuChange"
:theme=
"menuTheme"
:before-push=
"beforePush"
:menu-list=
"menuList"
>
<div
slot=
"top"
class=
"logo-content"
v-if=
"showLogo || fixNav"
>
<Icon
type=
"ios-game-controller-b"
size=
"100"
></Icon>
<img
v-show=
"!shrink && menuTheme == 'light' && mainTheme != 'darkMode'"
src=
"@/assets/logo-black.png"
/>
<img
v-show=
"shrink"
src=
"@/assets/logo-min.png"
key=
"min-logo"
/>
</div>
...
...
front/src/views/main.less
View file @
ba6f28e0
...
...
@@ -371,7 +371,7 @@
.ivu-table-border td {
border-color: #f9f9f9;
height:
7
0px;
height:
1
0px;
}
.ivu-table-tip td {
...
...
@@ -404,7 +404,7 @@
font-weight: bold;
background-color: #f9f9f9;
border:1px;
height:
8
5px;
height:
6
5px;
}
.ivu-table table {
width: calc(~'100% - 0px') !important;
...
...
front/src/views/sys/role-manage/roleManage.vue
View file @
ba6f28e0
...
...
@@ -22,7 +22,7 @@
</div>
</Col>
</Row>
<Table
stripe
border
class=
"tableInfoBox"
:loading=
"loading"
:columns=
"columns"
:data=
"data"
ref=
"table"
sortable=
"custom"
@
on-sort-change=
"changeSort"
@
on-selection-change=
"changeSelect"
></Table>
<Table
stripe
class=
"tableInfoBox"
:loading=
"loading"
:columns=
"columns"
:data=
"data"
ref=
"table"
sortable=
"custom"
@
on-sort-change=
"changeSort"
@
on-selection-change=
"changeSelect"
></Table>
<Row
type=
"flex"
justify=
"end"
class=
"page"
>
<Page
:current=
"searchForm.pageNumber"
:total=
"total"
:page-size=
"searchForm.pageSize"
@
on-change=
"changePage"
@
on-page-size-change=
"changePageSize"
:page-size-opts=
"[10, 20, 50]"
show-total
show-sizer
></Page>
</Row>
...
...
front/src/views/sys/user-manage/userManage.vue
View file @
ba6f28e0
...
...
@@ -50,7 +50,7 @@
</div>
</Col>
</Row>
<Table
stripe
class=
"tableInfoBox"
:loading=
"loading"
:columns=
"columns"
:data=
"data"
sortable=
"custom"
@
on-sort-change=
"changeSort"
@
on-selection-change=
"showSelect"
></Table>
<Table
stripe
class=
"tableInfoBox"
:loading=
"loading"
:columns=
"columns"
:data=
"data"
sortable=
"custom"
@
on-sort-change=
"changeSort"
@
on-selection-change=
"showSelect"
></Table>
<Row
type=
"flex"
justify=
"end"
class=
"page"
>
<Page
:current=
"searchForm.pageNumber"
:total=
"total"
:page-size=
"searchForm.pageSize"
@
on-change=
"changePage"
@
on-page-size-change=
"changePageSize"
:page-size-opts=
"[10, 20, 50]"
size=
"small"
show-total
show-elevator
show-sizer
></Page>
</Row>
...
...
front/src/views/tools/bh/orders.vue
View file @
ba6f28e0
...
...
@@ -16,7 +16,7 @@
</FormItem>
</Form>
</Row>
<Table
:loading=
"loading"
:columns=
"columns"
:data=
"data"
sortable=
"custom"
ref=
"table"
></Table>
<Table
stripe
class=
"tableInfoBox"
:loading=
"loading"
:columns=
"columns"
:data=
"data"
sortable=
"custom"
ref=
"table"
></Table>
<Row
type=
"flex"
justify=
"end"
class=
"page"
>
<Page
:current=
"searchForm.pageNumber"
:total=
"total"
:page-size=
"searchForm.pageSize"
@
on-change=
"changePage"
@
on-page-size-change=
"changePageSize"
:page-size-opts=
"[10, 20, 50]"
size=
"small"
show-total
show-elevator
show-sizer
></Page>
</Row>
...
...
front/src/views/tools/bh/sorders-refund.vue
View file @
ba6f28e0
...
...
@@ -8,7 +8,7 @@
<Row>
<Button
@
click=
"add"
type=
"primary"
size=
"large"
icon=
"md-add"
>
添加任务
</Button>
</Row>
<Table
border
:loading=
"loading"
class=
"tableInfoBox"
stripe
:columns=
"columns"
:data=
"data"
sortable=
"custom"
ref=
"table"
></Table>
<Table
:loading=
"loading"
class=
"tableInfoBox"
stripe
:columns=
"columns"
:data=
"data"
sortable=
"custom"
ref=
"table"
></Table>
<Row
type=
"flex"
justify=
"end"
class=
"page"
>
<Page
:current=
"searchForm.pageNumber"
:total=
"total"
:page-size=
"searchForm.pageSize"
@
on-change=
"changePage"
@
on-page-size-change=
"changePageSize"
:page-size-opts=
"[10, 20, 50]"
size=
"small"
show-total
show-elevator
show-sizer
></Page>
</Row>
...
...
@@ -107,7 +107,7 @@ export default {
handleFee
:
0
,
refundNums
:
0
,
transferPre
:
true
,
cancelPorder
:
true
cancelPorder
:
true
},
searchForm
:
{
pageNumber
:
1
,
...
...
@@ -139,26 +139,32 @@ export default {
message
:
"
请输入手续费费用
"
,
},
]
},
columns
:
[
{
columns
:
[{
title
:
"
ID
"
,
key
:
"
id
"
,
minWidth
:
10
5
,
minWidth
:
5
5
,
},
{
title
:
"
任务名称
"
,
key
:
"
name
"
,
minWidth
:
1
0
5
,
minWidth
:
1
8
5
,
},
{
title
:
"
任务内容
"
,
key
:
"
contentString
"
,
minWidth
:
335
,
minWidth
:
435
,
render
:
(
h
,
params
)
=>
{
return
h
(
"
div
"
,
{
domProps
:
{
innerHTML
:
params
.
row
.
contentString
}
})
},
},
{
title
:
"
状态
"
,
key
:
"
status
"
,
minWidth
:
5
5
,
minWidth
:
10
5
,
render
:
(
h
,
params
)
=>
{
if
(
params
.
row
.
status
==
'
notexec
'
)
{
return
h
(
"
div
"
,
[
...
...
@@ -207,22 +213,22 @@ export default {
{
title
:
"
执行次数
"
,
key
:
"
execNums
"
,
minWidth
:
5
5
,
minWidth
:
8
5
,
},
{
title
:
"
创建人
"
,
key
:
"
createBy
"
,
minWidth
:
5
5
,
minWidth
:
10
5
,
},
{
title
:
"
创建日期
"
,
key
:
"
createdAt
"
,
minWidth
:
1
2
5
,
minWidth
:
1
7
5
,
},
{
title
:
"
更新日期
"
,
key
:
"
updatedAt
"
,
minWidth
:
1
2
5
,
minWidth
:
1
7
5
,
},
{
title
:
"
操作
"
,
...
...
@@ -235,17 +241,17 @@ export default {
let
edit
=
""
;
let
del
=
""
;
if
(
params
.
row
.
status
!=
'
finish
'
)
{
execJob
=
h
(
"
span
"
,[
h
(
"
a
"
,
{
on
:
{
click
:
()
=>
{
this
.
exec
(
params
.
row
);
execJob
=
h
(
"
span
"
,
[
h
(
"
a
"
,
{
on
:
{
click
:
()
=>
{
this
.
exec
(
params
.
row
);
},
},
},
},
"
手动执行
"
),
h
(
"
divider
"
,
{
"
手动执行
"
),
h
(
"
divider
"
,
{
props
:
{
type
:
"
vertical
"
,
},
...
...
@@ -268,13 +274,13 @@ export default {
},
}),
h
(
"
a
"
,
{
on
:
{
click
:
()
=>
{
this
.
del
(
params
.
row
);
"
a
"
,
{
on
:
{
click
:
()
=>
{
this
.
del
(
params
.
row
);
},
},
},
},
"
删除
"
},
"
删除
"
),
h
(
"
divider
"
,
{
props
:
{
...
...
@@ -300,8 +306,7 @@ export default {
},
}
],
orderColumns
:
[
{
orderColumns
:
[{
title
:
"
品牌
"
,
key
:
"
bCnName
"
,
minWidth
:
145
,
...
...
@@ -535,7 +540,7 @@ export default {
this
.
submitloading
=
true
;
// 添加
if
(
this
.
type
==
0
)
{
if
(
this
.
form
.
taskId
)
{
if
(
this
.
form
.
taskId
)
{
this
.
form
.
taskId
=
''
;
}
addSorderRefundTask
(
this
.
form
).
then
((
res
)
=>
{
...
...
@@ -562,10 +567,10 @@ export default {
}
});
},
cleanAll
(){
cleanAll
()
{
this
.
$refs
.
form
.
resetFields
();
this
.
selectRowData
=
[];
this
.
searchData
=
[];
this
.
searchData
=
[];
},
exec
(
v
)
{
this
.
$Modal
.
confirm
({
...
...
front/src/views/tools/rhawn/sorders-refund.less
0 → 100644
View file @
ba6f28e0
.url-remark {
font-size: 14px;
color: #515a6e;
display: block;
color: #9a9a9a;
margin-bottom: -16px;
font-style: italic;
}
\ No newline at end of file
front/src/views/tools/rhawn/sorders-refund.vue
0 → 100644
View file @
ba6f28e0
<
style
lang=
"less"
>
@import "@/styles/table-common.less";
@import "./sorders-refund.less";
</
style
>
<
template
>
<div
class=
"search"
>
<Card>
<Row>
<Button
@
click=
"add"
type=
"primary"
size=
"large"
icon=
"md-add"
>
添加任务
</Button>
</Row>
<Table
:loading=
"loading"
class=
"tableInfoBox"
stripe
:columns=
"columns"
:data=
"data"
sortable=
"custom"
ref=
"table"
></Table>
<Row
type=
"flex"
justify=
"end"
class=
"page"
>
<Page
:current=
"searchForm.pageNumber"
:total=
"total"
:page-size=
"searchForm.pageSize"
@
on-change=
"changePage"
@
on-page-size-change=
"changePageSize"
:page-size-opts=
"[10, 20, 50]"
size=
"small"
show-total
show-elevator
show-sizer
></Page>
</Row>
</Card>
<Drawer
title=
"任务添加"
v-model=
"showAddSorderTask"
width=
"720"
draggable
@
on-close=
"closeDrawer"
>
<div
:style=
"
{ maxHeight: maxHeight }" class="drawer-content">
<Form
ref=
"form"
:model=
"form"
:rules=
"formValidate"
label-position=
"top"
>
<FormItem
label=
"任务名称"
prop=
"name"
>
<Input
v-model=
"form.name"
autocomplete=
"off"
:maxlength=
"16"
/>
</FormItem>
<FormItem
label=
"销售订单号"
prop=
"orderNo"
>
<Button
@
click=
"searchSorderNo"
type=
"primary"
size=
"large"
icon=
"md-search"
>
查询
</Button>
<Table
class=
"tableInfoBox"
v-model=
"selectRowVisible"
:columns=
"selectRowColumns"
:data=
"selectRowData"
@
on-selection-change=
"showSelect"
sortable=
"custom"
ref=
"table"
></Table>
</FormItem>
<FormItem
label=
"期货退货数量"
prop=
"refundNums"
>
<Tooltip
trigger=
"hover"
placement=
"right"
>
<InputNumber
:max=
"form.maxRefundNums"
:min=
"1"
v-model=
"form.futuresNum"
></InputNumber>
</Tooltip>
</FormItem>
<FormItem
label=
"手续费费用"
prop=
"handleFee"
>
<Tooltip
trigger=
"hover"
placement=
"right"
>
<Input
v-model=
"form.handleFee"
></Input>
</Tooltip>
</FormItem>
<FormItem
label=
"是否转预存"
prop=
"transferPre"
>
<i-switch
size=
"large"
v-model=
"form.transferPre"
>
<span
slot=
"open"
>
转预存
</span>
<span
slot=
"close"
>
退款
</span>
</i-switch>
</FormItem>
</Form>
</div>
<div
class=
"br"
>
<Button
type=
"primary"
:loading=
"submitLoading"
@
click=
"submit"
>
提交
</Button>
<Button
@
click=
"showAddSorderTask = false"
>
取消
</Button>
</div>
</Drawer>
<Modal
draggable
class=
"operation"
title=
"销售订单"
v-model=
"orderModalVisible"
:mask-closable=
"false"
:width=
"1500"
:styles=
"
{ top: '30px' }">
<Card>
<Form
ref=
"searchSorderForm"
:model=
"searchSorderForm"
inline
:label-width=
"70"
>
<FormItem
label=
"用户名"
prop=
"nickname"
>
<Input
type=
"text"
v-model=
"searchSorderForm.orderNo"
clearable
placeholder=
"订单编号"
style=
"width: 200px"
/>
</FormItem>
<FormItem
style=
"margin-left: -35px"
class=
"br"
>
<Button
@
click=
"handleSearch"
type=
"primary"
icon=
"ios-search"
>
搜索
</Button>
<Button
@
click=
"handleReset"
>
重置
</Button>
</FormItem>
</Form>
<Table
:loading=
"searchLoading"
class=
"tableInfoBox"
stripe
:columns=
"orderColumns"
:data=
"searchData"
sortable=
"custom"
ref=
"table"
></Table>
</Card>
</Modal>
<Modal
draggable
class=
"operation"
title=
"任务日志"
v-model=
"logModalVisible"
:mask-closable=
"false"
:width=
"1500"
:styles=
"
{ top: '30px' }">
<Card>
<Table
:show-header=
"false"
:loading=
"searchLoading"
class=
"tableInfoBox"
stripe
:columns=
"logColumns"
:data=
"logData"
sortable=
"custom"
ref=
"table"
></Table>
</Card>
</Modal>
</div>
</
template
>
<
script
>
import
{
getRhawnSordersRefundTask
,
getRhawnSordersDataDetail
,
getRhawnSordersStock
,
addRhawnSorderRefundTask
,
execRhawnSordersRefundTask
,
delRhawnSorderRefundTask
,
getRhawnSorderRefundTaskLogs
,
getRhawnSordersDetail
,
editRhawnSorderRefundTask
}
from
"
@/api/index
"
;
import
util
from
"
@/libs/util.js
"
;
export
default
{
name
:
"
menu-manage
"
,
components
:
{},
data
()
{
return
{
loading
:
false
,
searchLoading
:
false
,
maxHeight
:
"
500px
"
,
type
:
0
,
form
:
{
name
:
''
,
orderNo
:
''
,
itemId
:
0
,
pId
:
0
,
handleFee
:
0
,
refundNums
:
[],
transferPre
:
true
,
futuresNum
:
0
},
searchForm
:
{
pageNumber
:
1
,
pageSize
:
10
,
page
:
1
,
},
searchSorderForm
:
{
pageNumber
:
1
,
pageSize
:
10
,
page
:
1
,
},
formValidate
:
{
// 表单验证规则
name
:
[{
required
:
true
,
message
:
"
请输入任务名称
"
,
trigger
:
'
blur
'
,
},
],
orderNo
:
[{
required
:
true
,
message
:
"
请输入订单编号
"
,
},
],
futuresNum
:
[{
required
:
true
,
message
:
"
请输入退货数量
"
,
},
],
handleFee
:
[{
required
:
true
,
message
:
"
请输入手续费费用
"
,
},
]
},
columns
:
[{
title
:
"
ID
"
,
key
:
"
id
"
,
minWidth
:
55
,
},
{
title
:
"
任务名称
"
,
key
:
"
name
"
,
minWidth
:
185
,
},
{
title
:
"
任务内容
"
,
key
:
"
contentString
"
,
minWidth
:
435
,
render
:
(
h
,
params
)
=>
{
return
h
(
"
div
"
,
{
domProps
:
{
innerHTML
:
params
.
row
.
contentString
}
})
},
},
{
title
:
"
状态
"
,
key
:
"
status
"
,
minWidth
:
105
,
render
:
(
h
,
params
)
=>
{
if
(
params
.
row
.
status
==
'
notexec
'
)
{
return
h
(
"
div
"
,
[
h
(
"
Badge
"
,
{
props
:
{
status
:
"
default
"
,
text
:
"
未执行
"
,
},
}),
]);
}
else
if
(
params
.
row
.
status
==
'
running
'
)
{
return
h
(
"
div
"
,
[
h
(
"
Badge
"
,
{
props
:
{
status
:
"
processing
"
,
text
:
"
执行中
"
,
},
}),
]);
}
else
if
(
params
.
row
.
status
==
'
error
'
)
{
return
h
(
"
div
"
,
[
h
(
"
Badge
"
,
{
props
:
{
status
:
"
error
"
,
text
:
"
报错
"
,
},
}),
]);
}
else
if
(
params
.
row
.
status
==
'
finish
'
)
{
return
h
(
"
div
"
,
[
h
(
"
Badge
"
,
{
props
:
{
status
:
"
success
"
,
text
:
"
已完成
"
,
},
}),
]);
}
},
},
{
title
:
"
错误信息
"
,
key
:
"
errorMessage
"
,
minWidth
:
325
,
},
{
title
:
"
执行次数
"
,
key
:
"
execNums
"
,
minWidth
:
85
,
},
{
title
:
"
创建人
"
,
key
:
"
createBy
"
,
minWidth
:
105
,
},
{
title
:
"
创建日期
"
,
key
:
"
createdAt
"
,
minWidth
:
175
,
},
{
title
:
"
更新日期
"
,
key
:
"
updatedAt
"
,
minWidth
:
175
,
},
{
title
:
"
操作
"
,
key
:
"
action
"
,
width
:
270
,
align
:
"
center
"
,
fixed
:
"
right
"
,
render
:
(
h
,
params
)
=>
{
let
execJob
=
""
;
let
edit
=
""
;
let
del
=
""
;
if
(
params
.
row
.
status
!=
'
finish
'
)
{
execJob
=
h
(
"
span
"
,
[
h
(
"
a
"
,
{
on
:
{
click
:
()
=>
{
this
.
exec
(
params
.
row
);
},
},
},
"
手动执行
"
),
h
(
"
divider
"
,
{
props
:
{
type
:
"
vertical
"
,
},
}),
]);
}
if
(
params
.
row
.
status
==
'
notexec
'
)
{
edit
=
h
(
"
span
"
,
[
h
(
"
a
"
,
{
on
:
{
click
:
()
=>
{
this
.
edit
(
params
.
row
);
},
},
},
"
编辑
"
),
h
(
"
divider
"
,
{
props
:
{
type
:
"
vertical
"
,
},
}),
h
(
"
a
"
,
{
on
:
{
click
:
()
=>
{
this
.
del
(
params
.
row
);
},
},
},
"
删除
"
),
h
(
"
divider
"
,
{
props
:
{
type
:
"
vertical
"
,
},
}),
]);
}
return
h
(
"
div
"
,
[
execJob
,
edit
,
h
(
"
a
"
,
{
on
:
{
click
:
()
=>
{
this
.
showLog
(
params
.
row
);
},
},
},
"
查看日志
"
)
]);
},
}
],
orderColumns
:
[{
title
:
"
品牌
"
,
key
:
"
bCnName
"
,
minWidth
:
145
,
},
{
title
:
"
成品编号
"
,
key
:
"
pCode
"
,
minWidth
:
235
,
},
{
title
:
"
cas
"
,
key
:
"
cCas
"
,
minWidth
:
235
,
},
{
title
:
"
产品名称
"
,
key
:
"
pCnName
"
,
minWidth
:
125
,
},
{
title
:
"
销售价格
"
,
key
:
"
siPrice
"
,
minWidth
:
125
,
},
{
title
:
"
折扣价
"
,
key
:
"
siDiscount
"
,
minWidth
:
125
,
},
{
title
:
"
交期
"
,
key
:
"
siPTod
"
,
minWidth
:
125
,
},
{
title
:
"
数量
"
,
key
:
"
siNum
"
,
minWidth
:
125
,
},
{
title
:
"
小计
"
,
key
:
"
siAmount
"
,
minWidth
:
125
,
},
{
title
:
"
抵扣金额
"
,
key
:
"
siVamount
"
,
minWidth
:
125
,
},
{
title
:
"
备注
"
,
key
:
"
siNote
"
,
minWidth
:
125
,
},
{
title
:
"
操作
"
,
key
:
"
action
"
,
width
:
270
,
align
:
"
center
"
,
fixed
:
'
right
'
,
render
:
(
h
,
params
)
=>
{
return
h
(
"
div
"
,
[
h
(
"
a
"
,
{
on
:
{
click
:
()
=>
{
this
.
selectRow
(
params
.
row
);
},
},
},
"
选择此项
"
),
]);
},
}
],
selectRowColumns
:
[{
type
:
"
selection
"
,
width
:
60
,
align
:
"
center
"
,
},
{
title
:
"
批次编号
"
,
key
:
"
pstkNo
"
,
minWidth
:
125
,
},
{
title
:
"
产品名称
"
,
key
:
"
pCnName
"
,
minWidth
:
125
,
},
{
title
:
"
发货数量
"
,
key
:
"
dpdNum
"
,
minWidth
:
125
,
},
{
title
:
"
退货数量
"
,
key
:
"
refundNums
"
,
minWidth
:
125
,
fixed
:
"
right
"
,
render
:
(
h
,
params
)
=>
{
let
refundNums
=
parseInt
(
params
.
row
.
refundNums
)
return
h
(
"
InputNumber
"
,
{
props
:
{
type
:
'
text
'
,
value
:
refundNums
,
max
:
params
.
row
.
dpdNum
,
min
:
0
},
on
:
{
'
on-change
'
:
e
=>
{
this
.
changeRefundNums
(
params
,
e
);
}
}
},
);
},
},
],
logColumns
:
[{
type
:
"
index
"
,
width
:
60
,
align
:
"
center
"
,
},
{
title
:
"
日志内容故
"
,
key
:
"
content
"
,
minWidth
:
235
,
},
],
submitLoading
:
false
,
data
:
[],
selectRowData
:
[],
selectedOrderId
:
0
,
searchData
:
[],
logData
:
[],
total
:
0
,
showAddSorderTask
:
false
,
orderModalVisible
:
false
,
selectRowVisible
:
false
,
logModalVisible
:
false
,
stockModalVisible
:
false
,
};
},
methods
:
{
init
()
{
this
.
getDataList
();
},
searchSorderNo
()
{
this
.
searchLoading
=
false
;
this
.
orderModalVisible
=
true
;
},
handleSearch
()
{
this
.
searchSorderForm
.
pageNumber
=
1
;
this
.
searchSorderForm
.
pageSize
=
10
;
this
.
searchSorderForm
.
buttonAction
=
'
search
'
this
.
getSorderDetail
();
},
handleReset
()
{
this
.
$refs
.
searchSorderForm
.
resetFields
();
this
.
searchSorderForm
.
pageNumber
=
1
;
this
.
searchSorderForm
.
pageSize
=
10
;
// 重新加载数据
this
.
getSorderDetail
();
},
getDataList
()
{
this
.
loading
=
true
;
getRhawnSordersRefundTask
(
this
.
searchForm
).
then
((
res
)
=>
{
this
.
loading
=
false
;
if
(
res
.
status
==
'
success
'
)
{
this
.
data
=
res
.
data
.
list
;
this
.
total
=
res
.
data
.
total
;
if
(
this
.
data
.
length
==
0
&&
this
.
searchForm
.
pageNumber
>
1
)
{
this
.
searchForm
.
pageNumber
-=
1
;
this
.
getDataList
();
}
}
});
},
getSorderDetail
()
{
this
.
searchLoading
=
true
;
getRhawnSordersDataDetail
({
'
orderNo
'
:
this
.
searchSorderForm
.
orderNo
}).
then
((
res
)
=>
{
this
.
searchLoading
=
false
;
if
(
res
.
status
==
'
success
'
)
{
this
.
searchData
=
res
.
data
;
if
(
this
.
searchData
.
length
==
0
&&
this
.
searchSorderForm
.
pageNumber
>
1
)
{
this
.
searchSorderForm
.
pageNumber
-=
1
;
this
.
searchSorderForm
.
page
=
res
.
data
.
page
this
.
getSorderDetail
();
}
}
});
},
changeRefundNums
(
p
,
e
)
{
if
(
e
!=
null
)
{
this
.
selectRowData
[
p
.
index
].
refundNums
=
e
}
},
selectRow
(
v
)
{
this
.
orderModalVisible
=
false
if
(
v
)
{
this
.
stockModalVisible
=
true
this
.
searchLoading
=
true
;
if
(
this
.
selectedOrderId
!=
v
.
soNo
)
{
this
.
selectRowData
=
[]
this
.
selectedOrderId
=
v
.
soNo
}
getRhawnSordersStock
({
'
orderItemId
'
:
v
.
siId
}).
then
((
res
)
=>
{
this
.
searchLoading
=
false
;
if
(
res
.
status
==
'
success
'
)
{
let
rowData
=
{}
if
(
res
.
data
.
length
>
0
)
{
for
(
let
row
in
res
.
data
)
{
rowData
=
res
.
data
[
row
]
rowData
.
orderNo
=
v
.
soNo
rowData
.
pCode
=
v
.
pCode
rowData
.
pCnName
=
v
.
pCnName
rowData
.
refundNums
=
rowData
.
dpdNum
this
.
selectRowData
.
push
(
rowData
)
}
}
this
.
form
.
orderNo
=
v
.
soNo
this
.
form
.
itemId
=
v
.
siId
this
.
form
.
pId
=
v
.
pId
this
.
selectRowVisible
=
true
}
});
}
},
showSelect
(
e
)
{
this
.
form
.
refundNums
=
[]
if
(
e
.
length
>
0
)
{
for
(
let
row
in
e
)
{
if
(
e
[
row
].
refundNums
>
e
[
row
].
dpdNum
)
{
this
.
$Message
.
error
(
"
退货数量大于发货数量
"
);
return
false
;
}
this
.
form
.
refundNums
.
push
(
e
[
row
].
pstkId
+
'
|
'
+
e
[
row
].
refundNums
)
}
}
},
changePage
(
v
)
{
this
.
searchForm
.
pageNumber
=
v
;
this
.
searchForm
.
page
=
v
;
this
.
getDataList
();
},
changePageSize
(
v
)
{
this
.
searchForm
.
pageSize
=
v
;
this
.
getDataList
();
},
selectDateRange
(
v
)
{
if
(
v
)
{
this
.
searchForm
.
startDate
=
v
[
0
];
this
.
searchForm
.
endDate
=
v
[
1
];
}
},
add
()
{
this
.
showAddSorderTask
=
true
;
},
submit
()
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
submitloading
=
true
;
// 添加
if
(
this
.
type
==
0
)
{
if
(
this
.
form
.
taskId
)
{
this
.
form
.
taskId
=
''
;
}
addRhawnSorderRefundTask
(
this
.
form
).
then
((
res
)
=>
{
this
.
submitloading
=
false
;
if
(
res
.
status
==
'
success
'
)
{
this
.
$Message
.
success
(
"
操作成功
"
);
this
.
$emit
(
"
on-submit
"
,
true
);
this
.
getDataList
()
}
});
}
else
{
editRhawnSorderRefundTask
(
this
.
form
).
then
((
res
)
=>
{
this
.
submitloading
=
false
;
if
(
res
.
status
==
'
success
'
)
{
this
.
$Message
.
success
(
"
操作成功
"
);
this
.
$emit
(
"
on-submit
"
,
true
);
this
.
getDataList
()
}
});
}
this
.
showAddSorderTask
=
false
;
this
.
cleanAll
()
}
});
},
cleanAll
()
{
this
.
$refs
.
form
.
resetFields
();
this
.
selectRowData
=
[];
this
.
searchData
=
[];
},
exec
(
v
)
{
this
.
$Modal
.
confirm
({
title
:
"
确认手动执行
"
,
content
:
"
您确认要手动执行该任务? 执行后不能进行编辑及删除
"
,
loading
:
true
,
onOk
:
()
=>
{
this
.
form
.
taskId
=
v
.
id
execRhawnSordersRefundTask
(
this
.
form
).
then
((
res
)
=>
{
this
.
submitLoading
=
false
;
this
.
$Modal
.
remove
();
if
(
res
.
status
==
'
success
'
)
{
this
.
$Message
.
success
(
"
操作成功
"
);
this
.
$emit
(
"
on-submit
"
,
true
);
this
.
showAddSorderTask
=
false
;
}
this
.
getDataList
()
});
},
});
},
del
(
v
)
{
this
.
$Modal
.
confirm
({
title
:
"
确认删除该记录
"
,
content
:
"
您确认要删除该任务? 执行后数据不可恢复
"
,
loading
:
true
,
onOk
:
()
=>
{
this
.
form
.
taskId
=
v
.
id
delRhawnSorderRefundTask
(
this
.
form
).
then
((
res
)
=>
{
this
.
submitLoading
=
false
;
this
.
$Modal
.
remove
();
if
(
res
.
status
==
'
success
'
)
{
this
.
$Message
.
success
(
"
操作成功
"
);
this
.
$emit
(
"
on-submit
"
,
true
);
}
this
.
getDataList
()
});
},
});
},
edit
(
v
)
{
// 转换null为""
for
(
let
attr
in
v
)
{
if
(
v
[
attr
]
==
null
)
{
v
[
attr
]
=
""
;
}
}
let
str
=
JSON
.
stringify
(
v
);
let
data
=
JSON
.
parse
(
str
);
let
content
=
JSON
.
parse
(
data
.
execContent
)
this
.
$refs
.
form
.
resetFields
();
this
.
form
.
taskId
=
data
.
id
this
.
form
.
name
=
data
.
name
this
.
form
.
futuresNum
=
parseInt
(
content
.
futures_num
)
this
.
form
.
transferPre
=
content
.
transfer_pre
==
1
?
true
:
false
this
.
form
.
cancelPorder
=
content
.
cancel_porder
==
1
?
true
:
false
this
.
form
.
handleFee
=
parseInt
(
content
.
handle_fee
)
this
.
form
.
orderNo
=
content
.
order_no
this
.
form
.
itemId
=
content
.
item_id
this
.
form
.
pId
=
content
.
p_id
this
.
selectedOrderId
=
this
.
form
.
orderNo
getRhawnSordersDetail
({
'
taskId
'
:
v
.
id
}).
then
((
res
)
=>
{
this
.
submitLoading
=
false
;
if
(
res
.
status
==
'
success
'
)
{
for
(
let
index
in
res
.
data
)
{
res
.
data
[
index
].
_checked
=
true
this
.
selectRowData
.
push
(
res
.
data
[
index
])
this
.
showSelect
([
res
.
data
[
index
]])
}
}
})
this
.
type
=
1
;
this
.
showAddSorderTask
=
true
;
},
showLog
(
v
)
{
this
.
searchLoading
=
true
;
this
.
logModalVisible
=
true
getRhawnSorderRefundTaskLogs
({
'
taskId
'
:
v
.
id
}).
then
((
res
)
=>
{
this
.
searchLoading
=
false
;
if
(
res
.
status
==
'
success
'
)
{
this
.
logData
=
res
.
data
;
}
});
},
closeDrawer
()
{
this
.
form
=
{}
this
.
selectRowData
=
[]
}
},
mounted
()
{
// 计算高度
let
height
=
document
.
documentElement
.
clientHeight
;
this
.
maxHeight
=
Number
(
height
-
287
)
+
"
px
"
;
this
.
init
()
},
};
</
script
>
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