Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lumastoreapp
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
xieyishang
lumastoreapp
Commits
ccb327a9
Commit
ccb327a9
authored
Oct 26, 2020
by
haitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fd
parent
ac1514c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
116 additions
and
97 deletions
+116
-97
pages/index/index.vue
pages/index/index.vue
+2
-2
pages/order/delivery/delivery.vue
pages/order/delivery/delivery.vue
+2
-16
pages/order/shopOrder.vue
pages/order/shopOrder.vue
+112
-79
No files found.
pages/index/index.vue
View file @
ccb327a9
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
<!-- @tap="demoaudio" -->
<!-- @tap="demoaudio" -->
<view
class=
"tit"
>
店铺名称:
{{
storeinfo
.
shop_name
}}
</view>
<view
class=
"tit"
>
店铺名称:
{{
storeinfo
.
shop_name
}}
</view>
<!--
{{
shop
.
shop_name
}}
-->
<!--
{{
shop
.
shop_name
}}
-->
<view
class=
"jiu
"
>
<view
:class=
"['jiu', shop_type == 'ele'?'':'jus-b']
"
>
<view
class=
"jiu_01"
>
<view
class=
"jiu_01"
v-if=
"shop_type == 'ele'"
>
<view
@
tap=
"saoma"
>
<view
@
tap=
"saoma"
>
<image
class=
"img"
src=
"/static/icon/1.png"
mode=
""
></image>
<image
class=
"img"
src=
"/static/icon/1.png"
mode=
""
></image>
<view>
扫码入库
</view>
<view>
扫码入库
</view>
...
...
pages/order/delivery/delivery.vue
View file @
ccb327a9
...
@@ -95,11 +95,6 @@
...
@@ -95,11 +95,6 @@
},
},
//快速发货 确认发货
//快速发货 确认发货
async
oneKeyShipmentsfun
(){
async
oneKeyShipmentsfun
(){
// if(this.order_id.replace(/\s*/g,"")==""){
// this.$api.msg("没有获取到您的订单信息");
// return false;
// }
if
(
this
.
chindtext
==
""
){
if
(
this
.
chindtext
==
""
){
this
.
$api
.
msg
(
"
请选中快速公司
"
);
this
.
$api
.
msg
(
"
请选中快速公司
"
);
return
false
;
return
false
;
...
@@ -108,29 +103,20 @@
...
@@ -108,29 +103,20 @@
this
.
$api
.
msg
(
"
物流单号不能为空
"
);
this
.
$api
.
msg
(
"
物流单号不能为空
"
);
return
false
;
return
false
;
}
}
//this.$api.msg("数据还没对接呢");
let
res
=
await
oneKeyShipments
({
let
res
=
await
oneKeyShipments
({
logisticCode
:
this
.
logscode
,
//物流好 快递单号 订单号
logisticCode
:
this
.
logscode
,
//物流好 快递单号 订单号
shipperName
:
this
.
chindtext
,
//名称 快递公司编号 名称
shipperName
:
this
.
chindtext
,
//名称 快递公司编号 名称
order_id
:
this
.
order_id
,
//订单id 订单id
order_id
:
this
.
order_id
,
//订单id 订单id
vendor_id
:
this
.
vendor
,
vendor_id
:
this
.
vendor
,
});
});
if
(
res
.
code
==
0
){
if
(
res
.
code
==
0
){
uni
.
showModal
({
uni
.
showModal
({
title
:
'
提示
'
,
title
:
'
提示
'
,
content
:
res
.
msg
,
content
:
res
.
msg
,
showCancel
:
false
,
showCancel
:
false
,
success
(
res
)
{
success
(
res
)
{
uni
.
redirectTo
({
uni
.
$emit
(
"
isDelorder
"
,{
action
:
'
oneKeyShipments
'
});
url
:
'
/pages/order/shopOrder
'
uni
.
navigateBack
({});
//返回上一页
})
// uni.navigateBack({
// //delta: 2
// });
}
}
})
})
}
else
{
}
else
{
...
...
pages/order/shopOrder.vue
View file @
ccb327a9
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<!-- v-if="tabactive==1" -->
<!-- v-if="tabactive==1" -->
<view
class=
"listorder"
>
<view
class=
"listorder"
>
<view
class=
"orderItem"
v-for=
"(item,index
) in order"
:key=
"inde
x"
>
<view
class=
"orderItem"
v-for=
"(item,index
Max) in order"
:key=
"indexMa
x"
>
<view
class=
"order_head flex ali-c jus-b"
>
<view
class=
"order_head flex ali-c jus-b"
>
<view
class=
"headl flex ali-c"
>
<view
class=
"headl flex ali-c"
>
<image
class=
"storeicon"
src=
"/static/news/storeicon.png"
mode=
""
></image>
<image
class=
"storeicon"
src=
"/static/news/storeicon.png"
mode=
""
></image>
...
@@ -50,17 +50,11 @@
...
@@ -50,17 +50,11 @@
</view>
</view>
</view>
</view>
<view
v-if=
"productList.operation!=''"
class=
"order_foot bodbod flex jus-e mb-20 mt-20"
>
<view
v-if=
"productList.operation!=''"
class=
"order_foot bodbod flex jus-e mb-20 mt-20"
>
<block
v-for=
"(action,index) in productList.operation"
:key=
"index"
>
<block
v-for=
"(action,index) in productList.operation"
:key=
"index"
>
<view
class=
'btnss
'
:data-orderid=
'item.order_id'
:data-vendor=
'index1'
@
tap.stop=
"operation"
:data-action=
'action.way'
:data-is_ld=
'item.buytype'
>
{{
action
.
name
}}
</view>
<view
class=
'btnss
'
:data-index=
"indexMax"
:data-orderid=
'item.order_id'
:data-vendor=
'index1'
@
tap.stop=
"operation"
:data-action=
'action.way'
:data-is_ld=
'item.buytype'
>
{{
action
.
name
}}
</view>
</block>
</block>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"pricebox flex ali-c jus-b"
>
<view
class=
"pricebox flex ali-c jus-b"
>
...
@@ -70,19 +64,11 @@
...
@@ -70,19 +64,11 @@
<view
class=
"heji"
>
合计
<text
class=
"fuhao"
>
¥
</text><text
class=
"shuzi"
>
{{
item
.
total
}}
</text></view>
<view
class=
"heji"
>
合计
<text
class=
"fuhao"
>
¥
</text><text
class=
"shuzi"
>
{{
item
.
total
}}
</text></view>
</view>
</view>
<view
class=
"order_foot flex jus-e"
>
<view
class=
"order_foot flex jus-e"
>
<!-- 已发货 -->
<!-- 已发货 -->
<block
v-for=
"(action,index) in item.order_operation"
:key=
"index"
>
<block
v-for=
"(action,index) in item.order_operation"
:key=
"index"
>
<view
class=
'btnss
'
:data-orderid=
'item.order_id'
@
tap.stop=
"operation"
:data-action=
'action.way'
:data-is_ld=
'item.buytype'
>
{{
action
.
name
}}
</view>
<view
class=
'btnss
'
:data-index=
"indexMax"
:data-orderid=
'item.order_id'
@
tap.stop=
"operation"
:data-action=
'action.way'
:data-is_ld=
'item.buytype'
>
{{
action
.
name
}}
</view>
</block>
</block>
<!--
<block
v-if=
"item.products.length
<
=
1
"
v-for=
"(action,index) in item.order_operation"
:key=
"index"
>
<view
class=
'btnitem '
:data-vendor=
"item.products[index1][0].vendor_id"
:data-orderid=
'item.order_id'
@
tap.stop=
"operation"
:data-action=
'action.way'
:data-is_ld=
'item.buytype'
>
{{
action
.
name
}}
</view>
</block>
-->
</view>
</view>
</view>
</view>
...
@@ -118,6 +104,8 @@
...
@@ -118,6 +104,8 @@
currentTab
:
0
,
currentTab
:
0
,
sale_status
:
""
,
sale_status
:
""
,
isshowtop
:
false
,
isshowtop
:
false
,
action
:
''
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -127,16 +115,18 @@
...
@@ -127,16 +115,18 @@
},
},
//下拉刷新
//下拉刷新
onPullDownRefresh
(){
onPullDownRefresh
(){
this
.
is_loading_done
=
false
;
this
.
is_loading_done
=
false
;
this
.
pageNum
=
0
;
this
.
pageNum
=
0
;
this
.
order
=
[];
this
.
order
=
[];
this
.
initializedata
();
this
.
initializedata
();
// uni.stopPullDownRefresh();//结束下拉刷新
},
},
//监听滚动
onUnload
(){
//页面卸载的时候
onPageScroll
(
e
){
uni
.
setStorageSync
(
'
obj
'
,{
order_id
:
''
,
index
:
-
1
});
//console.log(e.scrollTop);
uni
.
$off
(
'
isDelorder
'
);
//取消监听
uni
.
setStorageSync
(
'
scrollTop
'
,
0
);
},
onPageScroll
(
e
){
//监听滚动
uni
.
setStorageSync
(
'
scrollTop
'
,
e
.
scrollTop
);
//处理返回顶部
//处理返回顶部
if
(
e
.
scrollTop
>
400
){
if
(
e
.
scrollTop
>
400
){
this
.
isshowtop
=
true
;
this
.
isshowtop
=
true
;
...
@@ -144,20 +134,16 @@
...
@@ -144,20 +134,16 @@
this
.
isshowtop
=
false
;
this
.
isshowtop
=
false
;
}
}
},
},
//滚动到最底部
onReachBottom
(){
//滚动到最底部
onReachBottom
(){
console
.
log
(
"
11
"
);
if
(
!
this
.
is_loading_done
){
if
(
!
this
.
is_loading_done
){
this
.
initializedata
();
this
.
initializedata
();
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
var
that
=
this
;
var
that
=
this
;
this
.
statusTab
=
options
.
current
?
options
.
current
:
"
all
"
;
// 订单状态
this
.
statusTab
=
options
.
current
?
options
.
current
:
"
all
"
;
// 订单状态
this
.
status
=
options
.
status
?
options
.
status
:
"
all
"
;
this
.
status
=
options
.
status
?
options
.
status
:
"
all
"
;
this
.
is_dianping
=
options
.
is_dianping
?
options
.
is_dianping
:
0
;
this
.
is_dianping
=
options
.
is_dianping
?
options
.
is_dianping
:
0
;
let
params
=
{};
let
params
=
{};
orderStatus
(
params
).
then
(
res
=>
{
orderStatus
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
...
@@ -165,15 +151,51 @@
...
@@ -165,15 +151,51 @@
this
.
order_status_list
=
order_status_list
;
this
.
order_status_list
=
order_status_list
;
}
}
})
})
this
.
initializedata
();
},
},
onShow
()
{
onShow
()
{
this
.
is_loading_done
=
false
;
this
.
action
=
''
;
this
.
pageNum
=
0
;
uni
.
$on
(
"
isDelorder
"
,
res
=>
{
this
.
order
=
[];
let
index
=
uni
.
getStorageSync
(
'
obj
'
).
index
;
this
.
initializedata
();
let
order
=
this
.
order
;
this
.
action
=
res
.
action
;
if
(
res
.
action
==
"
oneKeyShipments
"
){
//确认发货
if
(
this
.
status
!=
'
all
'
){
//只有不是在全部订单下才删除这一项
order
.
splice
(
index
,
1
);
//删除某项
this
.
$set
(
this
,
'
order
'
,
order
);
}
else
{
this
.
listDeal
();
}
}
uni
.
$off
(
'
isDelorder
'
);
//取消监听
})
if
(
this
.
action
==
''
){
this
.
listDeal
();
}
},
},
methods
:{
methods
:{
listDeal
(){
let
order_id
=
uni
.
getStorageSync
(
'
obj
'
).
order_id
;
let
index
=
uni
.
getStorageSync
(
'
obj
'
).
index
;
uni
.
showLoading
({
title
:
"
请稍后...
"
});
orderList
({
status
:
this
.
status
,
is_dianping
:
this
.
is_dianping
,
sale_status
:
this
.
sale_status
,
page
:
Math
.
ceil
((
index
+
1
)
/
10
)
}).
then
(
res
=>
{
uni
.
hideLoading
();
for
(
let
item
of
res
.
data
){
if
(
item
.
order_id
==
order_id
){
this
.
$set
(
this
.
order
,
index
,
item
);
break
;
}
}
})
},
totkxq
(
data
){
totkxq
(
data
){
uni
.
showModal
({
uni
.
showModal
({
title
:
'
退款原因
'
,
title
:
'
退款原因
'
,
...
@@ -192,7 +214,6 @@
...
@@ -192,7 +214,6 @@
},
},
//点击切换
//点击切换
taggletab
(
event
){
taggletab
(
event
){
// this.$api.msg("点击了");
let
that
=
this
;
let
that
=
this
;
let
statusTab
=
event
.
currentTarget
.
dataset
.
statustab
;
let
statusTab
=
event
.
currentTarget
.
dataset
.
statustab
;
let
status
=
event
.
currentTarget
.
dataset
.
status
;
let
status
=
event
.
currentTarget
.
dataset
.
status
;
...
@@ -225,18 +246,18 @@
...
@@ -225,18 +246,18 @@
title
:
'
加载中...
'
title
:
'
加载中...
'
});
});
orderList
(
params
).
then
(
res
=>
{
orderList
(
params
).
then
(
res
=>
{
uni
.
stopPullDownRefresh
();
uni
.
stopPullDownRefresh
();
uni
.
hideLoading
();
//结束加载
uni
.
hideLoading
();
//结束加载
console
.
log
(
res
);
if
(
res
.
data
==
null
||
res
.
data
.
length
==
0
)
{
if
(
res
.
data
==
null
||
res
.
data
.
length
==
0
)
{
this
.
is_loading_done
=
true
;
this
.
is_loading_done
=
true
;
this
.
$api
.
msg
(
"
没有更多了~
"
)
;
this
.
$api
.
msg
(
"
没有更多了~
"
);
}
else
{
}
else
{
this
.
order
=
[...
this
.
order
,...
res
.
data
]
}
this
.
order
=
[...
this
.
order
,...
res
.
data
]
uni
.
pageScrollTo
({
scrollTop
:
uni
.
getStorageSync
(
'
scrollTop
'
),
}
duration
:
0
uni
.
hideLoading
(
);
}
);
})
})
},
},
/**
/**
...
@@ -247,10 +268,11 @@
...
@@ -247,10 +268,11 @@
let
action
=
event
.
currentTarget
.
dataset
.
action
;
let
action
=
event
.
currentTarget
.
dataset
.
action
;
let
order_id
=
event
.
currentTarget
.
dataset
.
orderid
;
let
order_id
=
event
.
currentTarget
.
dataset
.
orderid
;
let
vendor
=
event
.
currentTarget
.
dataset
.
vendor
;
let
vendor
=
event
.
currentTarget
.
dataset
.
vendor
;
let
index
=
Number
(
event
.
currentTarget
.
dataset
.
index
);;
uni
.
setStorageSync
(
'
obj
'
,{
order_id
,
index
});
switch
(
action
)
{
switch
(
action
)
{
case
'
oneKeyCancel
'
:
//一键核销 OK
case
'
oneKeyCancel
'
:
//一键核销 OK
that
.
requestOrder
(
order_id
,
action
);
that
.
requestOrder
(
order_id
,
action
);
// oneKeyCancel
console
.
info
(
"
一键核销
"
);
console
.
info
(
"
一键核销
"
);
break
;
break
;
case
'
oneKeyShipments
'
:
//一键发货 OK
case
'
oneKeyShipments
'
:
//一键发货 OK
...
@@ -259,18 +281,17 @@
...
@@ -259,18 +281,17 @@
break
;
break
;
case
'
checkLogistics
'
:
//查看物流
case
'
checkLogistics
'
:
//查看物流
that
.
logistics
(
order_id
,
action
,
vendor
);
that
.
logistics
(
order_id
,
action
,
vendor
);
// this.$api.msg("开发中,敬请期待~");
console
.
info
(
"
查看物流
"
);
console
.
info
(
"
查看物流
"
);
break
;
break
;
case
'
orderDetails
'
:
//订单详情
case
'
orderDetails
'
:
//订单详情
console
.
info
(
"
订单详情
"
);
console
.
info
(
"
订单详情
"
);
that
.
orderDetails
(
order_id
,
order_id
);
that
.
orderDetails
(
order_id
,
order_id
);
break
;
break
;
case
'
consentRefund
'
:
//同意退款
case
'
consentRefund
'
:
//同意退款
this
.
clrefund
(
1
,
order_id
);
this
.
clrefund
(
1
,
order_id
,
index
);
break
;
break
;
case
'
refuseRefund
'
:
//拒绝退款
case
'
refuseRefund
'
:
//拒绝退款
this
.
clrefund
(
2
,
order_id
);
this
.
clrefund
(
2
,
order_id
,
index
);
break
;
break
;
default
:
default
:
//其他的 退款啥的 处理ok了
//其他的 退款啥的 处理ok了
...
@@ -279,31 +300,46 @@
...
@@ -279,31 +300,46 @@
}
}
},
},
//处理退款
//处理退款
async
clrefund
(
type
,
orderid
){
clrefund
(
type
,
orderid
,
index
){
let
res
=
{}
uni
.
showModal
({
title
:
'
提示
'
,
if
(
type
==
1
){
content
:
type
==
1
?
'
是否确定退款?
'
:
'
是否拒绝退款
'
,
//同意
success
:(
res
)
=>
{
res
=
await
consentRefund
({
if
(
res
.
confirm
){
order_id
:
orderid
new
Promise
((
reslove
,
reject
)
=>
{
});
if
(
type
==
1
){
//同意退款
}
else
if
(
type
==
2
){
consentRefund
({
order_id
:
orderid
}).
then
(
res
=>
{
//拒绝
reslove
(
res
)
res
=
await
refuseRefund
({
}).
catch
(
err
=>
{
order_id
:
orderid
reject
(
err
)
});
})
}
}
else
{
//拒绝退款
refuseRefund
({
order_id
:
orderid
}).
then
(
res
=>
{
if
(
res
.
code
==
0
){
reslove
(
res
);
this
.
$api
.
msg
(
res
.
msg
);
}).
catch
(
err
=>
{
setTimeout
(()
=>
{
reject
(
err
)
uni
.
redirectTo
({
})
url
:
'
/pages/order/shopOrder?status=
'
+
this
.
status
+
"
¤t=
"
+
this
.
statusTab
,
}
})
},
1000
)
}).
then
((
res
)
=>
{
}
else
{
if
(
res
.
code
==
0
){
this
.
$api
.
msg
(
res
.
msg
);
if
(
this
.
status
!=
"
all
"
){
}
let
order
=
this
.
order
;
order
.
splice
(
index
,
1
);
//删除某项
this
.
$set
(
this
,
'
order
'
,
order
);
}
else
{
this
.
listDeal
();
}
}
else
{
this
.
$api
.
msg
(
returnRes
.
msg
);
}
}).
catch
((
err
)
=>
{
console
.
log
(
err
,
'
失败了
'
);
//this.$api.msg(err.msg)
})
}
}
})
},
},
//查看物流
//查看物流
logistics
:
function
(
order_id
,
action
,
vendor
)
{
logistics
:
function
(
order_id
,
action
,
vendor
)
{
...
@@ -313,16 +349,13 @@
...
@@ -313,16 +349,13 @@
},
},
//跳转订单详情 商家查看店铺的订单详情
//跳转订单详情 商家查看店铺的订单详情
orderDetails
:
function
(
order_id
)
{
orderDetails
:
function
(
order_id
)
{
uni
.
navigateTo
({
//?
uni
.
navigateTo
({
//url: '/pages/shopOrderDetails/shopOrderDetails?order_id=' + order_id,
url
:
`/pages/order/shoporderdetail/shoporderdetail?order_id=
${
order_id
}
`
,
url
:
`/pages/order/shoporderdetail/shoporderdetail?order_id=
${
order_id
}
`
,
})
})
},
},
// 跳转发快递订单 ok 发货
// 跳转发快递订单 ok 发货
express
(
order_id
,
action
,
vendor
)
{
express
(
order_id
,
action
,
vendor
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'
/pages/order/delivery/delivery?order_id=
'
+
order_id
+
'
&action=
'
+
action
+
'
&vendor=
'
+
vendor
url
:
'
/pages/order/delivery/delivery?order_id=
'
+
order_id
+
'
&action=
'
+
action
+
'
&vendor=
'
+
vendor
})
})
},
},
...
...
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