Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
linshenxs-shop
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈超
linshenxs-shop
Commits
ca282633
Commit
ca282633
authored
Jul 11, 2022
by
cpa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商家端-立即发货修改
parent
35c0e0c4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
60 deletions
+98
-60
src/api/mall/merchantMallorder.js
+19
-7
src/const/crud/mall/merchantMallorder.js
+4
-4
src/views/businessOrder/index.vue
+75
-49
No files found.
src/api/mall/merchantMallorder.js
View file @
ca282633
import
request
from
'@/router/axios'
export
function
cancelOrderApi
(
parameter
)
{
return
request
({
url
:
'/admin/merchantMallOrder/cancelOrder'
,
method
:
'get'
,
params
:
parameter
})
}
export
function
delObj
(
parameter
)
{
return
request
({
url
:
'/admin/merchantMallOrder'
,
method
:
'delete'
,
params
:
parameter
})
}
export
function
fetchList
(
query
)
{
return
request
({
url
:
'/admin/merchantMallOrder/page'
,
...
...
@@ -72,13 +90,7 @@ export function cancelOrderMethod(query) {
// }
//
//
// export function delObj(ids) {
// return request({
// url: '/general/mallOrder/' + ids,
// method: 'delete'
// })
// }
//
// export function confirmPayObj(obj) {
// return request({
...
...
src/const/crud/mall/merchantMallorder.js
View file @
ca282633
...
...
@@ -26,19 +26,19 @@ export const tableOption = {
"label"
:
"订单编号"
,
"prop"
:
"orderNo"
,
"search"
:
true
,
span
:
5
},
{
"type"
:
"select"
,
"label"
:
"状态"
,
"prop"
:
"state"
,
"search"
:
true
,
"dicUrl"
:
"/general/mallOrder/getStateOptions"
,
"dicUrl"
:
"/general/mallOrder/get
Order
StateOptions"
,
},
{
"type"
:
"
date
"
,
"type"
:
"
input
"
,
"label"
:
"下单用户"
,
"prop"
:
"takeName"
,
// "prop": "takeName",
"prop"
:
"realName"
,
search
:
true
,
},
...
...
src/views/businessOrder/index.vue
View file @
ca282633
...
...
@@ -21,36 +21,33 @@
<el-button
type=
"button"
size=
"small"
@
click=
"checkTheDetails(scope.row)"
style=
"color: #409EFF;margin: 5px;padding: 0px;border: 0px"
>
详情
</el-button>
<el-button
type=
"button"
size=
"small"
v-if=
"scope.row.state ==
8
"
v-if=
"scope.row.state ==
4
"
@
click=
"viewLogistics(scope.row)"
style=
"color: #409EFF;margin: 5px;padding: 0px;border: 0px"
>
查看物流
</el-button>
<el-button
type=
"button"
size=
"small"
v-if=
"scope.row.state ==
1
"
v-if=
"scope.row.state ==
3
"
@
click=
"shipsImmediately(scope.row)"
style=
"color: #409EFF;margin: 5px;padding: 0px;border: 0px"
>
立即发货
</el-button>
<el-button
type=
"button"
size=
"small"
v-if=
"contains(scope.row)!=-1"
@
click=
"handleDel(scope.row)"
style=
"color: #409EFF;margin: 5px;padding: 0px;border: 0px"
>
删除
</el-button>
<el-button
type=
"button"
size=
"small"
v-if=
"cancelOrderButAuth(scope.row)>=0"
@
click=
"cancelOrder(scope.row)"
style=
"color: #409EFF;margin: 5px;padding: 0px;border: 0px"
>
取消订单
</el-button>
</
template
>
</avue-crud>
</basic-container>
<!-- 1.取消订单 -->
<el-dialog
title=
"取消订单"
:visible
.
sync=
"
dialogVisible
"
width=
"40%"
title=
"取消订单"
:visible
.
sync=
"
cancelOrderDialog
"
width=
"40%"
:before-close=
"handleClose"
>
<p>
快递单号 :{{this.form.waybillNo}}
</p><p></p>
<div
class=
"block"
>
<el-timeline>
<el-timeline-item
v-for=
"(activity, index) in activities"
:key=
"index"
:icon=
"activity.icon"
:type=
"activity.type"
:color=
"activity.color"
:size=
"activity.size"
:timestamp=
"activity.timestamp"
>
{{activity.content}}
</el-timeline-item>
</el-timeline>
</div>
<el-form
ref=
"form"
:model=
"orderForm"
>
<el-input
type=
"textarea"
v-model=
"orderForm.orderNo"
v-show=
"false"
>
1111111111
</el-input>
<el-input
type=
"textarea"
v-model=
"orderForm.mark"
></el-input>
<el-form-item>
<el-button
type=
"primary"
:loading=
"loading"
@
click=
"cancelOrder_cancel"
style=
"float: left;margin-left: 20%;margin-top: 30px"
>
取 消
</el-button>
<el-button
type=
"primary"
:loading=
"loading"
@
click=
"cancelOrder_submit"
style=
"float: right;margin-right: 20%;margin-top: 30px"
>
确 认
</el-button>
</el-form-item>
</el-form>
</el-dialog>
<!-- 2.查看物流对话框 -->
...
...
@@ -106,7 +103,7 @@
</template>
<
script
>
import
{
fetchList
,
shipsImmediately
}
from
'@/api/mall/merchantMallorder'
import
{
fetchList
,
shipsImmediately
,
delObj
,
cancelOrderApi
}
from
'@/api/mall/merchantMallorder'
import
{
tableOption
}
from
'@/const/crud/mall/merchantMallorder'
import
{
mapGetters
}
from
'vuex'
export
default
{
...
...
@@ -117,7 +114,12 @@
activities
:
[],
// 查看物流当前状态
options
:[],
// 快递公司下拉
loading
:
false
,
orderForm
:{
orderNo
:
''
,
mark
:
"请输入取消原因"
,
},
form
:{
orderNo
:
0
,
expressCompany
:
2
,
//快递公司
waybillNo
:
''
,
//快递单号
...
...
@@ -125,13 +127,12 @@
dialogVisibleShipsImmediately
:
false
,
//立即发货对话框
dialogVisible
:
false
,
// 查看物流对话框
dialogVisibleConfirmPayment
:
false
,
// 确认支付对话框
cancelOrderVue
:
false
,
nowRow
:
undefined
,
cancelOrderDialog
:
false
,
searchForm
:
{},
tableData
:
[],
page
:
{
total
:
0
,
// 总页数
currentPage
:
0
,
// 当前页数
currentPage
:
1
,
// 当前页数
pageSize
:
20
// 每页显示多少条
},
tableLoading
:
false
,
...
...
@@ -140,6 +141,7 @@
},
// 自定义的组件
components
:
{
'cancel-order'
:
()
=>
import
(
'./components/cancelOrder.vue'
),
},
computed
:
{
initDropDownBox
(){
...
...
@@ -157,36 +159,60 @@
}
},
methods
:
{
// 取消订单
cancelOrder
(
row
){
this
.
orderForm
.
orderNo
=
row
.
orderNo
this
.
cancelOrderDialog
=
true
},
// 取消订单-取消
cancelOrder_cancel
(){
this
.
cancelOrderDialog
=
false
},
// 取消订单-确认
cancelOrder_submit
(){
this
.
cancelOrderDialog
=
false
cancelOrderApi
(
this
.
orderForm
).
then
(
r
=>
{
this
.
$message
.
success
(
'发货成功'
)
this
.
getList
(
this
.
page
)
}).
catch
(
e
=>
{
console
.
log
(
'错误'
,
e
.
message
)
})
},
// 取消订单
cancelOrderButAuth
:
function
(
row
)
{
let
str
=
row
.
state
let
text
=
'0,1,2,3,4'
return
text
.
search
(
str
)
},
contains
:
function
(
row
)
{
let
str
=
row
.
state
let
text
=
'1,6,3,5'
return
text
.
search
(
str
)
},
// 立即发货-对话框
shipsImmediately
(
row
){
this
.
form
.
orderNo
=
row
.
orderNo
this
.
$axios
.
get
(
"/admin/merchantMallOrder/isVirtualGoods"
,{
params
:{
orderNo
:
row
.
orderNo
},
}).
then
(
response
=>
{
if
(
response
.
data
.
data
){
this
.
form
.
orderNo
=
row
.
orderNo
this
.
dialogVisibleShipsImmediately
=
true
}
else
{
// 虚拟商品 二次确认直接发货
this
.
$confirm
(
'是否确认发货?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
data
=>
{
shipsImmediately
(
this
.
form
).
then
(
r
=>
{
this
.
$message
.
success
(
'发货成功'
)
this
.
getList
(
this
.
page
)
}).
catch
(
e
=>
{
console
.
log
(
'错误'
,
e
.
message
)
})
})
}
//
if(response.data.data){
//
this.form.orderNo=row.orderNo
//
this.dialogVisibleShipsImmediately = true
//
}else {
//
// 虚拟商品 二次确认直接发货
//
this.$confirm('是否确认发货?', '提示', {
//
confirmButtonText: '确定',
//
cancelButtonText: '取消',
//
type: 'warning'
//
}).then(data => {
//
shipsImmediately(this.form).then(r => {
//
this.$message.success('发货成功')
//
this.getList(this.page)
//
}).catch(e =>{
//
console.log('错误', e.message)
//
})
//
})
//
}
},
error
=>
{
console
.
log
(
'错误'
,
error
.
message
)
})
...
...
@@ -221,18 +247,18 @@
,{
color
:
'#0bbd87'
,
content
:
'快递送至【成都市】物流运转中心'
,
timestamp
:
'2018-04-11'
}
,{
content
:
'快递送至【成都市】物流运转中心'
,
timestamp
:
'2018-04-11'
}]
},
// 取消订单
cancelOrder
(
row
){
this
.
cancelOrderVue
=
true
this
.
nowRow
=
row
},
// 查看详情
checkTheDetails
(
row
){
this
.
$router
.
push
(
'/businessOrder/details?id='
+
row
.
orderNo
)
},
// 列表查询
getList
(
page
,
params
)
{
this
.
tableLoading
=
true
if
(
page
.
currentPage
=
1
){
page
.
currentPage
=
0
}
fetchList
(
Object
.
assign
({
current
:
page
.
currentPage
,
size
:
page
.
pageSize
...
...
@@ -251,7 +277,7 @@
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
delObj
(
row
.
orderNo
)
return
delObj
(
{
ids
:
row
.
orderNo
}
)
}).
then
(
data
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
getList
(
this
.
page
)
...
...
@@ -311,7 +337,7 @@
// 查询事件
searchChange
(
form
,
done
)
{
this
.
searchForm
=
form
//
this.page.currentPage = 0
this
.
page
.
currentPage
=
0
this
.
getList
(
this
.
page
,
form
)
done
()
},
...
...
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