Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
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
bp
op-web-service
Commits
ad03eeb0
Commit
ad03eeb0
authored
Aug 25, 2021
by
liwenhong
Browse files
Options
Browse Files
Download
Plain Diff
update:线上回归
parents
640835e0
a0b79a7b
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1457 additions
and
663 deletions
+1457
-663
config.js
server/config.js
+4
-4
groupmeal.js
server/controllers/groupmeal.js
+20
-0
router.js
server/router.js
+2
-0
YDDialoag.vue
src/components/Dialog/YDDialoag.vue
+132
-0
index.vue
src/pages/Activity/ActivityDetail/index.vue
+23
-7
index.vue
src/pages/Activity/Manage/index.vue
+11
-2
addProduc.vue
src/pages/Activity/releaseProduc/components/addProduc.vue
+201
-76
infoEditing.vue
src/pages/Activity/releaseProduc/components/infoEditing.vue
+6
-1
myMap.vue
src/pages/Activity/releaseProduc/components/myMap.vue
+10
-10
spellOrderSet.vue
...pages/Activity/releaseProduc/components/spellOrderSet.vue
+221
-180
index.vue
src/pages/Activity/releaseProduc/index.vue
+92
-41
index.vue
src/pages/Groupmeal/Distrib/index.vue
+252
-53
index.vue
src/pages/Groupmeal/components/Pagination/index.vue
+3
-5
index.vue
src/pages/Groupmeal/newOrderManagement/index.vue
+172
-40
index.vue
src/pages/Groupmeal/orderManagement/index.vue
+190
-121
index.vue
src/pages/Life-no/index.vue
+51
-88
Pagination.vue
src/pages/components/Pagination.vue
+10
-10
groupmeal.js
src/service/Groupmeal/groupmeal.js
+41
-15
handlerResponse.js
src/utils/handlerResponse.js
+6
-0
tools.js
src/utils/tools.js
+9
-0
vue.config.js
vue.config.js
+1
-10
No files found.
server/config.js
View file @
ad03eeb0
...
...
@@ -10,10 +10,10 @@ const PANDORA_URI = {
};
const
API_INTERNAL_URI
=
{
'development'
:
"http://bp-dev.ini.yidian-inc.com"
,
'test'
:
"http://bp-test.ini.yidian-inc.com"
,
'production'
:
"http://bp.int.yidian-inc.com"
}
development
:
"http://bp-dev.ini.yidian-inc.com"
,
test
:
"http://bp-test.ini.yidian-inc.com"
,
production
:
"http://bp.int.yidian-inc.com"
}
;
module
.
exports
=
{
env
:
env
,
...
...
server/controllers/groupmeal.js
View file @
ad03eeb0
...
...
@@ -41,6 +41,26 @@ exports.getSaveDeliverer = async ctx => {
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 下载配送路线 -lh
exports
.
getDeliveryRoutes
=
async
ctx
=>
{
const
opts
=
{
url
:
`
${
GROUPMEAL_URI
}
/order/deliverer/build_plan`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 查看下载配送路线记录 -lh
exports
.
getEmailRecords
=
async
ctx
=>
{
const
opts
=
{
url
:
`
${
GROUPMEAL_URI
}
/order/deliverer/plan_down_log`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 老订单管理
...
...
server/router.js
View file @
ad03eeb0
...
...
@@ -103,6 +103,8 @@ router.get(`${API_VERSION}/order/oldbackground/order_print`, groupmeal.orderPrin
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/order_item_list`
,
groupmeal
.
orderItemList
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/order_refund_reject`
,
groupmeal
.
orderRefundReject
);
router
.
post
(
`
${
API_VERSION
}
/order/oldbackground/order_refund`
,
groupmeal
.
orderRefund
);
router
.
post
(
`
${
API_VERSION
}
/order/deliverer/build_plan`
,
groupmeal
.
getDeliveryRoutes
);
//下载配送路线 -lh
router
.
post
(
`
${
API_VERSION
}
/order/deliverer/plan_down_log`
,
groupmeal
.
getEmailRecords
);
// 查看邮件记录 -lh
// 新订单管理
router
.
get
(
`
${
API_VERSION
}
/order/background/order_list`
,
groupmeal
.
newGetOrderList
);
...
...
src/components/Dialog/YDDialoag.vue
0 → 100644
View file @
ad03eeb0
<
template
>
<div
class=
"YDDialog"
>
<el-dialog
:title=
"dialogTitle"
v-model=
"dialogVisible"
:width=
"dialogWidth"
:show-close=
"showDialogClose"
:top=
"dialogMarginTop"
:modal=
"dialogModel"
:close-on-click-modal=
"dialogCloseOnClickModal"
:close-on-press-escape=
"dialogCloseOnPressEscape"
:center=
"dialogCenter"
>
<slot></slot>
<template
#
footer
>
<span
class=
"dialog-footer"
>
<el-button
v-show=
"isShowCancelButton"
@
click=
"cancel"
>
{{
cancelButtonText
}}
</el-button>
<el-button
v-show=
"isShowConfirmButton"
type=
"primary"
@
click=
"cofirm"
>
{{
confirmButtonText
}}
</el-button
>
</span>
</
template
>
</el-dialog>
</div>
</template>
<
script
>
export
default
{
props
:
{
// 标题
dialogTitle
:
{
type
:
String
,
default
:
"标题"
},
// dialog 显示控制
myDialogVisible
:
{
type
:
Boolean
,
default
:
false
},
// 确认button文案
confirmButtonText
:
{
type
:
String
,
default
:
"确 定"
},
// 取消button文案
cancelButtonText
:
{
type
:
String
,
default
:
"取 消"
},
// 宽度
dialogWidth
:
{
type
:
String
,
default
:
"50%"
},
// 距离顶部的margin
dialogMarginTop
:
{
type
:
String
,
default
:
"15vh"
},
// 是否需要遮罩层
dialogModel
:
{
type
:
Boolean
,
default
:
true
},
// 点击遮罩层是否关闭dialog
dialogCloseOnClickModal
:
{
type
:
Boolean
,
default
:
false
},
// 是否显示关闭(右上角X)
showDialogClose
:
{
type
:
Boolean
,
default
:
false
},
// 是否展示确定按钮
isShowConfirmButton
:
{
type
:
Boolean
,
default
:
true
},
// 是否展示取消按钮
isShowCancelButton
:
{
type
:
Boolean
,
default
:
true
},
// 点击esc是否关闭
dialogCloseOnPressEscape
:
{
type
:
Boolean
,
default
:
false
},
// 底部按钮是否居中显示
dialogCenter
:
{
type
:
Boolean
,
default
:
false
},
// cancelDialog 方法名称
cancelDialogMethodName
:
{
type
:
String
,
default
:
"dialogCancel"
},
// confirmDialog 方法名称
confirmDialogMethodName
:
{
type
:
String
,
default
:
"dialogConfirm"
}
},
data
()
{
return
{
dialogVisible
:
this
.
myDialogVisible
};
},
watch
:
{
myDialogVisible
(
newVal
)
{
this
.
dialogVisible
=
newVal
;
}
},
methods
:
{
cancel
()
{
this
.
$emit
(
this
.
cancelDialogMethodName
);
},
cofirm
()
{
this
.
$emit
(
this
.
confirmDialogMethodName
);
}
}
};
</
script
>
<
style
lang=
"less"
scoped
></
style
>
src/pages/Activity/ActivityDetail/index.vue
View file @
ad03eeb0
...
...
@@ -42,6 +42,12 @@
<el-card
class=
"activityGoods box-card"
>
<div
class=
"my-header"
>
<h3>
{{
marketingInfo
.
marketing_name
}}
</h3>
<!-- 查看参与字段待确认 -->
<p>
<span>
{{
detailInfo
.
lookUserCount
}}
人查看
</span>
|
<span
>
{{
detailInfo
.
haveBuyGoodsUserCount
}}
人参与
</span
>
</p>
<p
class=
"endTime"
>
{{
showTimer
}}
</p>
</div>
<p
class=
"title"
>
拼单商品
</p>
...
...
@@ -94,6 +100,9 @@
<
span
class
=
"originPrice"
>
{{
`¥${goodsItem.original_price
}
`
}}
<
/span
>
<
span
class
=
"sold"
v
-
if
=
"goodsItem.inventory_rest==0"
>
抢光了
<
/span
>
<
span
class
=
"sold"
v
-
else
>
已售
{{
goodsItem
.
all_have_buy_goods_count
}}
<
/spa
n
>
<
/p
>
<
/div
>
<
/div
>
...
...
@@ -126,7 +135,7 @@ export default {
marketingInfo
:
{
}
,
endTime
:
""
,
showTimer
:
""
,
detailInfo
:
{
}
detailInfo
:
{
}
,
}
;
}
,
watch
:
{
}
,
...
...
@@ -138,13 +147,12 @@ export default {
let
dataArr
=
await
Promise
.
all
([
ActivityService
.
checkActivityDetail
({
marketing_id
:
this
.
$route
.
query
.
marketing_id
,
marketing_type
:
this
.
$route
.
query
.
marketing_type
marketing_type
:
this
.
$route
.
query
.
marketing_type
,
}
),
ActivityService
.
checkActivityDetailInfo
({
marketing_id
:
this
.
$route
.
query
.
marketing_id
}
)
marketing_id
:
this
.
$route
.
query
.
marketing_id
,
}
)
,
]);
this
.
pageLoading
=
false
;
this
.
goodsList
=
dataArr
[
0
].
result
.
goods_list
;
this
.
marketingInfo
=
dataArr
[
0
].
result
.
marketing_info
;
...
...
@@ -195,7 +203,7 @@ export default {
closePage
()
{
this
.
$router
.
go
(
-
1
);
}
}
,
}
,
async
created
()
{
await
this
.
checkActivityDetail
();
...
...
@@ -203,7 +211,7 @@ export default {
}
,
beforeUnmount
()
{
clearInterval
(
this
.
timer
);
}
}
,
}
;
<
/script
>
<
style
lang
=
"less"
scoped
>
...
...
@@ -278,7 +286,9 @@ export default {
display
:
flex
;
margin
:
15
px
0
;
.
itemIntroduce
{
position
:
relative
;
display
:
flex
;
width
:
100
%
;
flex
-
direction
:
column
;
justify
-
content
:
space
-
around
;
margin
-
left
:
10
px
;
...
...
@@ -295,6 +305,12 @@ export default {
}
}
}
.
sold
{
position
:
absolute
;
right
:
20
px
;;
color
:
#
d44549
;
font
-
weight
:
500
;
}
}
}
}
...
...
src/pages/Activity/Manage/index.vue
View file @
ad03eeb0
...
...
@@ -31,8 +31,10 @@
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"small"
@
click=
"getActivityList"
>
搜索
</el-button>
<el-form-item
style=
"margin-left: 50px"
>
<el-button
@
click=
"reset()"
>
重置
</el-button>
<!--
<el-button
type=
"primary"
@
click=
"getActivityList"
>
搜索
</el-button>
-->
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"small"
@
click=
"goReleaseProduc"
>
发布拼单
</el-button
>
...
...
@@ -189,6 +191,13 @@ export default {
}
;
}
,
methods
:
{
// 重置
reset
()
{
this
.
activity
.
activityName
=
""
;
this
.
activity
.
online_status
=
""
;
this
.
getActivityList
();
}
,
/* API */
// 获取商品列表
async
getActivityList
()
{
...
...
src/pages/Activity/releaseProduc/components/addProduc.vue
View file @
ad03eeb0
...
...
@@ -10,16 +10,31 @@
>
</div>
<!-- Tab -->
<el-table
:data=
"comTableData"
border
style=
"width: 100%"
>
<el-table-column
label=
"显示顺序"
align=
"center"
width=
"140"
>
<el-table
:data=
"comTableData"
border
style=
"width: 100%;margin-bottom:80px;"
:header-cell-style=
"cellClass"
>
<el-table-column
label=
"显示顺序"
align=
"center"
width=
"50px"
>
<el-table-column
label=
""
align=
"center"
width=
"50px"
>
<template
#
default=
"scope"
>
<i
class=
"el-icon-top"
@
click=
"upMove(scope.$index, scope.row)"
style=
"margin-right:15px;"
></i>
</
template
>
</el-table-column>
<el-table-column
label=
""
align=
"center"
width=
"50px"
>
<
template
#
default=
"scope"
>
<i
class=
"el-icon-top"
@
click=
"upMove(scope.$index, scope.row)"
></i>
<i
class=
"el-icon-bottom"
@
click=
"upDown(scope.$index, scope.row)"
></i>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"goods_sku_id"
label=
"商品ID"
...
...
@@ -36,8 +51,9 @@
<el-table-column
prop=
"total_amount_sold"
label=
"已售数量"
>
</el-table-column>
<el-table-column
prop=
"inventory_rest"
label=
"剩余库存"
></el-table-column>
<el-table-column
label=
"操作"
fixed=
"right"
>
<el-table-column
label=
"操作"
width=
"120"
fixed=
"right"
>
<
template
#
default=
"scope"
>
<div
class=
"buttons_actions"
>
<el-button
type=
"text"
size=
"small"
...
...
@@ -47,6 +63,7 @@
<el-button
type=
"text"
size=
"small"
@
click=
"removeCom(scope.row)"
>
移除
</el-button
>
</div>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -54,7 +71,8 @@
<el-dialog
:title=
"addCommodityTitle"
v-model=
"addCommodityPopup"
width=
"60%"
width=
"50%"
custom-class=
"add_goods_dialog"
>
<el-form
:inline=
"true"
...
...
@@ -87,6 +105,7 @@
<el-form-item
label=
"商品标题:"
prop=
"goods_name"
style=
"width:90%;"
:rules=
"[{ required: true, message: '请输入商品标题' }]"
>
<el-input
...
...
@@ -108,10 +127,10 @@
placeholder=
""
></el-input-number>
</el-form-item>
<el-form-item
label=
"划线价:"
>
<el-form-item
label=
"划线价:"
prop=
"original_price"
>
<el-input-number
class=
"price"
v-model=
"commodityForm.original_price"
class=
"price"
:min=
"0"
:controls=
"false"
:precision=
"2"
...
...
@@ -119,7 +138,7 @@
></el-input-number>
</el-form-item>
<br
/>
<el-form-item
label=
"新增库存:"
>
<el-form-item
label=
"新增库存:"
prop=
"inventory_total"
>
<el-input
v-model=
"commodityForm.inventory_total"
placeholder=
""
...
...
@@ -133,9 +152,53 @@
}}
</span>
剩余库存:
<span>
{{ inventoryRest }}
</span>
</div>
<br
/>
<el-form-item
label=
"商家"
prop=
"checkedRadio"
:rules=
"[
{
required: true,
message: '请选择购买限制',
trigger: 'change'
}
]"
class=
"limit_radio"
label=
"购买限制"
>
<el-radio-group
v-model=
"commodityForm.checkedRadio"
>
<el-radio
label=
"不限制"
></el-radio>
<el-radio
label=
"每人最多买"
></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
prop=
"num_limit"
:show-message=
"
commodityForm.checkedRadio === '每人最多买' ? true : false
"
:rules=
"[
{
validator:
commodityForm.checkedRadio === '每人最多买'
? checkPurseLimit
: checkPurseLimitNull,
trigger: 'blur'
}
]"
>
<el-input
v-model=
"commodityForm.num_limit"
:disabled=
"
commodityForm.checkedRadio === '' ||
commodityForm.checkedRadio === '不限制' ||
commodityForm.checkedRadio === undefined
? true
: false
"
:min=
"0"
:controls=
"false"
></el-input>
</el-form-item>
<el-form-item
label=
"商家:"
prop=
"business1"
:rules=
"[{ required: true, message: '请选择商家' }]"
>
...
...
@@ -243,44 +306,59 @@ import {
getBusinessList
,
pindanGoods
,
markGoodsInfo
,
editGoods
,
editGoods
}
from
"../../../../service/Activity/index"
;
// 当选择(每人最多买时 添加验证(非空))
let
checkPurseLimit
=
(
rule
,
value
,
callback
)
=>
{
let
str
=
/^
[
1-9
]\d
*$/
;
if
(
value
===
""
||
value
===
undefined
||
value
===
0
)
{
return
callback
(
new
Error
(
"请添加限制购买数量"
));
}
else
if
(
!
str
.
test
(
value
))
{
return
callback
(
new
Error
(
"请输入正确的购买数量"
));
}
else
{
callback
();
}
};
let
checkPurseLimitNull
=
(
rule
,
value
,
callback
)
=>
{
callback
();
};
export
default
{
var
addProduct
=
{
props
:
{
editInfo
:
{
type
:
Object
,
required
:
()
=>
{}
,
required
:
()
=>
{}
},
addProduc
:
{
type
:
Array
,
required
:
()
=>
{}
,
required
:
()
=>
{}
},
stepTwoTitle
:
{
type
:
String
,
default
:
""
,
}
,
default
:
""
}
},
data
()
{
return
{
// 校验规则函数
checkPurseLimit
:
checkPurseLimit
,
checkPurseLimitNull
:
checkPurseLimitNull
,
// 商品列表
comTableData
:
[],
// 商品库列表
comLibTableData
:
[],
businessOpt
:
[],
// 商家数据
// 添加商品
addCommodityPopup
:
false
,
// 添加商品弹窗状态
addCommodityTitle
:
""
,
// 标题
commodityForm
:
{
goods_name
:
""
,
price
:
""
,
original_price
:
""
,
inventory_total
:
null
,
total_amount_order
:
null
,
price
:
0
,
original_price
:
0
,
inventory_total
:
""
,
total_amount_order
:
""
,
business1
:
""
,
num_limit
:
""
,
// 购买限制数量
checkedRadio
:
""
// 购买限制radio
},
picStr
:
""
,
picUrlList
:
[],
...
...
@@ -298,23 +376,16 @@ export default {
goodsSkuID
:
""
,
inventoryTotal
:
0
,
// 总库存
inventoryRest
:
0
,
// 剩余库存
inventoryRest
:
0
// 剩余库存
};
},
// computed: {
// // 计算剩余库存
// inventoryRest() {
// if (this.commodityForm.inventory_total == null) {
// return 0;
// } else {
// return Number(
// this.commodityForm.inventory_total -
// this.commodityForm.total_amount_order
// );
// }
// },
// },
methods
:
{
cellClass
()
{
if
(
arguments
.
rowIndex
===
1
)
{
return
{
display
:
"none"
};
}
},
// 上移
upMove
(
index
)
{
if
(
index
<=
0
)
{
...
...
@@ -383,7 +454,7 @@ export default {
const
res
=
await
getBusinessList
(
params
);
this
.
businessOpt
=
[
{
ota_id
:
""
,
ota_name
:
"全部"
},
...
res
.
result
.
list
,
...
res
.
result
.
list
];
}
catch
(
error
)
{
this
.
$message
.
error
(
"发生未知错误,请稍后再试一下吧~~~"
);
...
...
@@ -391,18 +462,27 @@ export default {
}
},
// 查看商品详情
// 查看商品详情
(api)
async
markGoodsInfoMet
(
goodSkuID
)
{
let
params
=
{
goods_sku_id
:
goodSkuID
,
marketing_type
:
"4"
};
const
res
=
await
markGoodsInfo
(
params
);
this
.
inventoryRest
=
res
.
result
.
goods_info
.
inventory_rest
;
this
.
inventoryTotal
=
res
.
result
.
goods_info
.
inventory_total
;
this
.
commodityForm
=
res
.
result
.
goods_info
;
this
.
commodityForm
.
num_limit
=
res
.
result
.
goods_info
.
rule_limit
===
0
?
""
:
res
.
result
.
goods_info
.
rule_limit
;
// 购买限制的数量
this
.
commodityForm
.
checkedRadio
=
res
.
result
.
goods_info
.
rule_limit
===
0
||
res
.
result
.
goods_info
.
rule_limit
===
undefined
?
"不限制"
:
"每人最多买"
;
// 购买限制按钮选择
this
.
commodityForm
.
business1
=
res
.
result
.
goods_info
.
ota_id
;
this
.
picUrlList
=
[];
for
(
var
i
in
res
.
result
.
goods_info
.
desc_pic_url_list
)
{
this
.
picUrlList
.
push
({
url
:
res
.
result
.
goods_info
.
desc_pic_url_list
[
i
]
,
url
:
res
.
result
.
goods_info
.
desc_pic_url_list
[
i
]
});
}
this
.
picStr
=
this
.
getUrlParms
(
...
...
@@ -417,7 +497,7 @@ export default {
return
""
;
},
//
编辑商品详情
//
修改商品详情(api)
async
editGoodsMet
(
goodsSkuID
)
{
const
res
=
await
editGoods
({
goods_name
:
this
.
commodityForm
.
goods_name
,
...
...
@@ -432,11 +512,17 @@ export default {
op_cur_user
:
getCookie
(
"username"
),
// op_cur_user: store.state.userInfo.email,
goods_sku_id
:
goodsSkuID
,
rule_limit
:
this
.
commodityForm
.
checkedRadio
===
"不限制"
||
this
.
commodityForm
.
checkedRadio
===
""
||
this
.
commodityForm
.
checkedRadio
===
undefined
?
0
:
this
.
commodityForm
.
num_limit
});
if
(
res
.
code
==
0
)
{
ElMessage
.
success
({
message
:
"修改成功"
,
type
:
"success"
,
type
:
"success"
});
await
this
.
pindanGoodsMet
();
let
result
=
null
;
...
...
@@ -464,8 +550,9 @@ export default {
this
.
comLibTableData
=
res
.
result
.
list
;
},
// 添加修改商品
async
commodity
(
type
,
val
)
{
// 添加+修改商品
commodity
(
type
,
val
)
{
// 清楚图片
this
.
$refs
.
picUpload
&&
this
.
$refs
.
picUpload
.
clearFiles
&&
this
.
$refs
.
picUpload
.
clearFiles
();
...
...
@@ -473,21 +560,24 @@ export default {
this
.
picStr
=
""
;
this
.
addCommodityPopup
=
true
;
this
.
commodityForm
=
{};
// this.commodityForm = {};
this
.
$nextTick
(()
=>
{
this
.
$refs
.
infoForm
.
resetFields
();
// 清空表单数据
});
if
(
type
==
"add"
)
{
this
.
hideUpload
=
false
;
this
.
inventoryRest
=
0
;
this
.
commodityForm
.
total_amount_order
=
0
;
this
.
addCommodityTitle
=
"商品添加"
;
this
.
$refs
.
infoForm
.
resetFields
();
}
else
{
this
.
addCommodityTitle
=
"商品编辑"
;
this
.
goodsSkuID
=
val
.
goods_sku_id
;
this
.
markGoodsInfoMet
(
this
.
goodsSkuID
);
this
.
markGoodsInfoMet
(
this
.
goodsSkuID
);
// 查看商品详情(api)
}
},
// 添加商品
// 添加商品
(api)
async
addGoodsMet
()
{
const
res
=
await
addGoods
({
marketing_name
:
this
.
stepTwoTitle
,
...
...
@@ -500,14 +590,20 @@ export default {
price
:
this
.
commodityForm
.
price
,
ota_id
:
this
.
commodityForm
.
business1
,
op_cur_user
:
getCookie
(
"username"
),
// op_cur_user: store.state.userInfo.email,
rule_limit
:
this
.
commodityForm
.
checkedRadio
===
"不限制"
||
this
.
commodityForm
.
checkedRadio
===
""
||
this
.
commodityForm
.
checkedRadio
===
undefined
?
0
:
this
.
commodityForm
.
num_limit
});
if
(
res
.
code
==
0
)
{
ElMessage
.
success
({
message
:
"添加商品成功"
,
type
:
"success"
,
type
:
"success"
});
this
.
comTableData
.
push
(
res
.
result
.
goods_info
);
// this.$refs.picUpload.clearFiles();
this
.
addCommodityPopup
=
false
;
}
else
{
ElMessage
.
error
(
res
.
reason
);
...
...
@@ -520,9 +616,9 @@ export default {
this
.
$refs
.
infoForm
.
clearValidate
();
},
// 添加商品保存
// 添加商品保存
(操作)
commoditySave
(
infoForm
)
{
this
.
$refs
[
infoForm
].
validate
(
(
valid
)
=>
{
this
.
$refs
[
infoForm
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
addCommodityTitle
==
"商品添加"
)
{
this
.
addGoodsMet
();
...
...
@@ -535,6 +631,25 @@ export default {
});
},
// commoditySave(infoForm) {
// console.log("baocun");
// this.$refs[infoForm].validate(valid => {
// console.log("00");
// if (valid) {
// console.log("add");
// if (this.addCommodityTitle == "商品添加") {
// this.addGoodsMet();
// } else {
// console.log("xiugai");
// this.editGoodsMet(this.goodsSkuID);
// }
// } else {
// console.log("validate");
// return false;
// }
// });
// },
// 从商品库添加
async
commodLibraryAdd
()
{
this
.
selCommodityPopup
=
true
;
...
...
@@ -561,9 +676,9 @@ export default {
if
(
this
.
comTableData
.
length
==
0
)
{
this
.
comTableData
.
push
(...
this
.
multipleSelection
);
}
else
{
this
.
multipleSelection
.
forEach
(
(
item
)
=>
{
this
.
multipleSelection
.
forEach
(
item
=>
{
let
num
=
0
;
this
.
comTableData
.
some
(
(
val
)
=>
{
this
.
comTableData
.
some
(
val
=>
{
num
++
;
if
(
val
.
goods_sku_id
===
item
.
goods_sku_id
)
{
val
.
goods_sku_id
=
item
.
goods_sku_id
;
...
...
@@ -586,18 +701,18 @@ export default {
this
.
comTableData
.
splice
(
i
,
1
);
}
}
}
,
}
},
watch
:
{
addProduc
:
function
(
newVal
)
{
addProduc
:
function
(
newVal
)
{
let
marketingId
=
this
.
$route
.
query
.
marketing_id
;
if
(
marketingId
==
undefined
)
{
return
;
}
this
.
comTableData
=
newVal
;
},
picUrlList
:
function
()
{
picUrlList
:
function
()
{
if
(
this
.
picUrlList
.
length
>=
this
.
limitCount
)
{
this
.
hideUpload
=
true
;
}
else
{
...
...
@@ -607,15 +722,20 @@ export default {
},
created
()
{
this
.
getBusinessListMet
();
}
,
}
};
export
default
addProduct
;
</
script
>
<
style
scoped
>
<
style
scoped
lang=
"less"
>
.addProduc {
width: 90%;
margin: 0 auto;
}
.buttons_actions {
display: flex;
justify-content: space-around;
align-items: center;
}
.btnGroup {
margin-bottom: 15px;
}
...
...
@@ -646,4 +766,9 @@ export default {
.hide /deep/ .el-upload--picture-card {
display: none;
}
// 商品添加修改dialog-form表单
/deep/ .add_goods_dialog {
min-width: 370px;
}
</
style
>
src/pages/Activity/releaseProduc/components/infoEditing.vue
View file @
ad03eeb0
<
template
>
<div
class=
"infoEditing"
>
<el-form
ref=
"infoEditForm"
:model=
"infoEditForm"
label-width=
"80px"
>
<el-form
ref=
"infoEditForm"
:model=
"infoEditForm"
label-width=
"80px"
@
submit
.
prevent
>
<el-form-item
label=
"标题:"
>
<el-input
v-model=
"infoEditForm.title"
maxlength=
"30"
></el-input>
</el-form-item>
...
...
src/pages/Activity/releaseProduc/components/myMap.vue
View file @
ad03eeb0
...
...
@@ -2,7 +2,7 @@
<div
id=
"map"
class=
"mapContainer"
>
<div
class=
"mapWrapper"
>
<div
class=
"search"
>
<el-form
ref=
"form"
label-width=
"80px"
>
<el-form
ref=
"form"
label-width=
"80px"
@
submit
.
prevent
>
<el-form-item
label-position=
"left"
>
<el-button
@
click=
"handleSearch"
>
搜索
</el-button>
<el-input
...
...
@@ -193,15 +193,15 @@ export default {
</
script
>
<
style
lang=
"less"
scoped
>
.mapDialog {
margin-top: 11vh !important;
display: flex !important;
flex-direction: column !important;
background: red !important;
/deep/ .el-dialog__body {
height: 90%;
}
}
//
.mapDialog {
//
margin-top: 11vh !important;
//
display: flex !important;
//
flex-direction: column !important;
//
background: red !important;
//
/deep/ .el-dialog__body {
//
height: 90%;
//
}
//
}
.mapContainer {
height: 100%;
width: 100%;
...
...
src/pages/Activity/releaseProduc/components/spellOrderSet.vue
View file @
ad03eeb0
<
template
>
<div
class=
"spell
OrderSet
"
>
<div
class=
"spell
_order_set_wrapper
"
>
<!-- 时间选择器 -->
<div
class=
"datepickerWrapper"
>
<
span
class=
"demonstration"
>
拼单起止时间:
</span
>
<
p
class=
"demonstration"
>
拼单起止时间:
</p
>
<el-date-picker
class=
"start
TimeP
icker"
class=
"start
_time_p
icker"
v-model=
"startDate"
type=
"datetime"
popper-class=
"date_picker"
...
...
@@ -14,7 +14,7 @@
>
</el-date-picker>
<el-date-picker
class=
"end
TimeP
icker"
class=
"end
_time_p
icker"
v-model=
"endDate"
:clearable=
"false"
type=
"datetime"
...
...
@@ -32,26 +32,32 @@
element-loading-spinner=
"el-icon-loading"
element-loading-background=
"rgba(0, 0, 0, 0.8)"
>
<el-card
class=
"card-block"
>
<p>
自提点设置
</p>
<el-form
ref=
"form"
>
<!-- 自提点表单 -->
<div
class=
"search_form_wrapper"
>
<p
class=
"title"
>
自提点设置
</p>
<el-form
ref=
"form"
label-width=
"80px"
inline
@
submit
.
prevent
>
<el-form-item>
<el-input
style=
"width:250px"
class=
"set"
v-model=
"selfLiftingPoint"
placeholder=
"自提点名称/自提点联系人"
></el-input>
<el-button
type=
"primary"
size=
"small"
@
click=
"getPlaceList"
>
搜索
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"dialogFormVisible = true"
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"getPlaceList"
>
搜索
</el-button>
<el-button
type=
"primary"
@
click=
"dialogFormVisible = true"
>
添加自提点
</el-button
>
</el-form-item>
</el-form>
</div>
<!-- 自提点列表 -->
<div
class=
"tabla-wrapper"
>
<p
class=
"checked"
>
{{
`已选 ${checkedNum
}
`
}}
<
/p
>
<!--
自提点列表
-->
<
el
-
table
class
=
"tableList"
max
-
height
=
"3
50"
max
-
height
=
"4
50"
ref
=
"multipleTable"
:
data
=
"takePlacelist"
border
...
...
@@ -93,6 +99,7 @@
prop
=
"name"
align
=
"center"
label
=
"操作"
width
=
"width"
fixed
=
"right"
>
<
template
#
default
=
"scope"
>
...
...
@@ -102,8 +109,9 @@
>
<
template
#
reference
>
<
el
-
button
class
=
"delete_button"
type
=
"primary"
size
=
"mini
"
size
=
"small
"
@
click
=
"handleDelete(scope.row)"
>
删除
<
/el-butto
n
>
...
...
@@ -124,28 +132,25 @@
>
<
/el-pagination
>
<
/div
>
<
/el-form
>
<
/el-card
>
<
/div
>
<!--
添加自提点
-->
<!--
添加自提点
dialog
-->
<
el
-
dialog
:
close
-
on
-
click
-
modal
=
"false"
:
center
=
"true"
title
=
"添加自提点"
v
-
model
=
"dialogFormVisible"
:
show
-
close
=
"false"
:
width
=
"isPc?'50%': '70%'
"
custom
-
class
=
"add_takePlace_dialog
"
>
<
el
-
form
:
model
=
"form"
:
rules
=
"rules"
ref
=
"ruleForm"
:
inline
=
"true"
label
-
position
=
"left"
label
-
width
=
"120px"
>
<
el
-
form
-
item
label
=
"自提点名称"
prop
=
"name"
:
label
-
width
=
"formLabelWidth"
>
<
el
-
form
-
item
label
=
"自提点名称"
prop
=
"name"
>
<
el
-
input
class
=
"dialog-input"
v
-
model
=
"form.name"
...
...
@@ -154,34 +159,34 @@
autocomplete
=
"off"
><
/el-input
>
<
/el-form-item
>
<
br
/>
<
el
-
form
-
item
label
=
"位置"
prop
=
"location"
:
label
-
width
=
"formLabelWidth"
class
=
"location_wrapper"
style
=
"width:100%"
>
<
div
class
=
"location_input_wrapper"
>
<
el
-
input
class
=
"dialog-input"
v
-
model
=
"form.location"
placeholder
=
""
:
disabled
=
"true"
><
/el-input
>
<
el
-
button
type
=
"primary"
@
click
=
"mapDialogVisible = true"
size
=
"mini"
<
/div
>
<
div
class
=
"location_text_wrapper"
>
<
el
-
button
type
=
"primary"
@
click
=
"mapDialogVisible = true"
>
从高德获取坐标
<
/el-butto
n
>
<
/div
>
<
/el-form-item
>
<
br
/>
<
p
class
=
"location"
>
{{
form
.
location
}}
<
/p
>
<
el
-
form
-
item
prop
=
"address"
label
=
"详细地址"
:
label
-
width
=
"formLabelWidth"
>
<
el
-
form
-
item
prop
=
"address"
label
=
"详细地址"
>
<
el
-
input
class
=
"dialog-input"
v
-
model
=
"form.address"
><
/el-input
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"自提点联系人"
prop
=
"contactor"
:
label
-
width
=
"formLabelWidth"
>
<
br
/>
<
el
-
form
-
item
label
=
"自提点联系人"
prop
=
"contactor"
>
<
el
-
input
class
=
"dialog-input"
v
-
model
=
"form.contactor"
...
...
@@ -189,14 +194,11 @@
show
-
word
-
limit
><
/el-input
>
<
/el-form-item
>
<
el
-
form
-
item
prop
=
"phone"
type
=
"tel"
label
=
"联系电话"
:
label
-
width
=
"formLabelWidth"
>
<
br
/>
<
el
-
form
-
item
prop
=
"phone"
type
=
"tel"
label
=
"联系电话"
>
<
el
-
input
class
=
"dialog-input"
v
-
model
=
"form.phone"
><
/el-input
>
<
/el-form-item
>
<
br
/>
<
/el-form
>
<
template
#
footer
>
<
span
class
=
"dialog-footer"
>
...
...
@@ -205,7 +207,6 @@
<
/span
>
<
/template
>
<
/el-dialog
>
<!--
地图
dialog
-->
<
el
-
dialog
custom
-
class
=
"mapDialog"
v
-
model
=
"mapDialogVisible"
width
=
"100%"
>
<
my
-
map
...
...
@@ -242,6 +243,7 @@ export default {
.
add
(
7
,
"day"
)
.
format
(
"YYYY-MM-DD HH:mm:ss"
),
// 结束时间
pickerOptions
:
{
// 规则
disabledDateStart
(
time
)
{
let
_now
=
Date
.
now
();
let
threeDays
=
_now
+
3
*
24
*
60
*
60
*
1000
;
...
...
@@ -276,7 +278,8 @@ export default {
pageCount
:
0
,
// 总条数
takePlacelist
:
[],
// 自提点列表
signal
:
false
,
checkedTakePlacelist
:
[],
// 已选择自提点列表 活动详情中添加的自提点列表
checkedTakePlacelist
:
[],
// 已选择自提点列表 活动详情中添加的自提点列表(api)
currentCheckedTakePlacelist
:
[],
// 已选择自提点列表 用户本地操作勾选的+api
hasCheckedList
:
false
,
// 表示是否有选中的自提点列表 是编辑还是添加的区别
multipleSelection
:
[],
dialogFormVisible
:
false
,
...
...
@@ -329,11 +332,11 @@ export default {
}
,
watch
:
{
spellOrderSetArr
:
{
// 监听props属性 展示自提点列表
handler
:
async
function
()
{
// 监听props属性 展示自提点列表
(APi默认勾选的)
handler
:
async
function
(
newList
)
{
this
.
checkedTakePlacelist
=
this
.
setTableListData
(
// 选中的自提点列表
this
.
spellOrderSetArr
newList
);
if
(
this
.
$route
.
query
.
marketing_id
)
{
await
this
.
getPlaceList
();
...
...
@@ -342,14 +345,9 @@ export default {
this
.
endDate
=
this
.
endTime
;
this
.
checkedTakePlacelist
=
this
.
setTableListData
(
this
.
spellOrderSetArr
);
// 选中的自提点列表
this
.
currentList
=
this
.
checkedTakePlacelist
.
map
(
item
=>
{
return
item
.
id
;
}
);
let
list
=
this
.
takePlacelist
.
filter
(
item
=>
{
return
this
.
currentList
.
includes
(
item
.
id
);
}
);
this
.
toggleSelection
(
list
);
);
// 选中的自提点列表
this
.
mergeCheckedList
(
this
.
checkedTakePlacelist
);
this
.
signal
=
true
;
}
}
,
...
...
@@ -373,15 +371,8 @@ export default {
this
.
pageLoading
=
false
;
this
.
takePlacelist
=
this
.
setTableListData
(
data
.
result
.
list
);
this
.
pageCount
=
data
.
result
.
total
;
if
(
this
.
signal
===
true
)
{
this
.
currentList
=
this
.
checkedTakePlacelist
.
map
(
item
=>
{
return
item
.
id
;
}
);
let
list
=
this
.
takePlacelist
.
filter
(
item
=>
{
return
this
.
currentList
.
includes
(
item
.
id
);
}
);
this
.
toggleSelection
(
list
);
this
.
mergeCheckedList
(
this
.
currentCheckedTakePlacelist
);
}
}
catch
{
this
.
pageLoading
=
false
;
...
...
@@ -409,7 +400,7 @@ export default {
async
addPlace
()
{
let
params
=
Object
.
assign
(
this
.
form
,
{
take_place_id
:
this
.
id
,
//搜索关键词
contact_name
:
this
.
form
.
contactor
contact_name
:
this
.
form
.
contactor
}
);
try
{
this
.
pageLoading
=
true
;
...
...
@@ -436,6 +427,19 @@ export default {
return
result
;
}
,
/* 自提点勾选的合并
@current 当前勾选
*/
mergeCheckedList
(
current
)
{
let
currentIdList
=
current
.
map
(
item
=>
{
return
item
.
id
;
}
);
let
list
=
this
.
takePlacelist
.
filter
(
item
=>
{
return
currentIdList
.
includes
(
item
.
id
);
}
);
this
.
toggleSelection
(
list
);
}
,
// 删除自提点操作
handleDelete
(
val
)
{
this
.
id
=
val
.
id
;
...
...
@@ -471,8 +475,10 @@ export default {
this
.
page
=
val
;
this
.
getPlaceList
();
}
,
// 复选框
// 复选框(提供给父组件)
handleSelectionChange
(
val
)
{
this
.
currentCheckedTakePlacelist
=
val
;
// 当前勾选的列表
this
.
checkedNum
=
val
.
length
;
this
.
multipleSelection
=
val
;
let
takePlaceIds
=
""
;
...
...
@@ -485,6 +491,7 @@ export default {
}
);
this
.
$emit
(
"getTakeTakePlaceListFromChild"
,
takePlaceIds
);
}
,
// 勾选某些列表的操作
toggleSelection
(
rows
)
{
if
(
rows
)
{
...
...
@@ -517,12 +524,13 @@ export default {
created
()
{
if
(
!
this
.
$route
.
query
.
marketing_id
)
{
this
.
getPlaceList
();
this
.
signal
=
true
;
}
}
}
;
<
/script
>
<
style
lang
=
"less"
scope
>
<
style
lang
=
"less"
scope
d
>
.
el
-
picker
-
panel
{
.
el
-
picker
-
panel__footer
{
.
el
-
button
--
text
{
...
...
@@ -532,52 +540,84 @@ export default {
}
<
/style
>
<
style
lang
=
"less"
>
<
style
lang
=
"less"
scoped
>
.
spell_order_set_wrapper
{
//text-align: center;
// 时间选择
.
datepickerWrapper
{
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
flex
-
wrap
:
wrap
;
.
demonstration
{
margin
:
20
px
;
}
/deep/
.
start_time_picker
{
margin
:
20
px
;
}
/deep/
.
end_time_picker
{
margin
:
20
px
;
}
}
.
add_takePlace_dialog
{
.
location_wrapper
{
/
deep
/
.
el
-
form
-
item__content
{
width
:
calc
(
100
%
-
120
px
);
display
:
inline
-
flex
;
flex
-
wrap
:
wrap
;
}
.
location_input_wrapper
{
width
:
60
%
;
min
-
width
:
178
px
;
}
.
location_text_wrapper
{
width
:
40
%
;
}
}
}
//添加自提点dialog
@
media
screen
and
(
max
-
width
:
800
px
)
{
/
deep
/
.
add_takePlace_dialog
{
width
:
100
%
!
important
;
}
}
}
.
card
-
wrapper
{
width
:
100
%
;
//height: 500px;
.
card
-
block
{
width
:
100
%
;
.
search_form_wrapper
{
text
-
align
:
center
;
.
title
{
height
:
50
px
;
line
-
height
:
30
px
;
}
}
// table 自提点表格
.
tabla
-
wrapper
{
>
p
{
margin
-
left
:
10
px
;
text
-
align
:
left
;
}
.
tableList
{
height
:
500
px
;
height
:
600
px
;
.
delete_button
{
margin
:
0
;
}
}
}
.
pagination
-
wrapper
{
}
.
pagination
-
wrapper
{
height
:
60
px
;
display
:
flex
;
justify
-
content
:
center
;
align
-
items
:
center
;
}
}
.
spellOrderSet
{
text
-
align
:
center
;
margin
:
50
px
0
;
.
datepickerWrapper
{
margin
:
1
px
0
30
px
;
}
.
startTimePicker
{
margin
-
right
:
50
px
;
}
}
.
set
{
width
:
50
%
;
margin
:
40
px
20
px
0
0
;
}
// .el-button
{
// margin-left: 30px;
//
}
.
tabList
{
margin
-
top
:
10
px
;
}
// .dialog-input
{
// width: 50%;
//
}
.
location
{
margin
-
bottom
:
10
px
;
margin
-
left
:
14
%
;
...
...
@@ -590,11 +630,12 @@ export default {
.
mapDialog
{
height
:
80
%
;
margin
-
top
:
10
vh
!
important
;
.
el
-
dialog__body
{
height
:
85
%
!
important
;
}
.
my
-
map
{
height
:
100
%
;
}
}
/deep/
.
el
-
dialog__body
{
height
:
85
%
!
important
;
}
<
/style
>
src/pages/Activity/releaseProduc/index.vue
View file @
ad03eeb0
<
template
>
<div
class=
"releaseProducBox"
>
<div
class=
"releaseProduc"
>
<h4
class=
"headTitle"
>
发布活动
</h4>
<el-steps
...
...
@@ -8,9 +9,9 @@
space=
"30%"
:align-center=
"true"
>
<el-step
title=
"信息编辑
"
></el-step>
<el-step
title=
"添加商品
"
></el-step>
<el-step
title=
"拼单设置
"
></el-step>
<el-step
title=
"信息编辑"
@
click=
"step1
"
></el-step>
<el-step
title=
"添加商品"
@
click=
"step2
"
></el-step>
<el-step
title=
"拼单设置"
@
click=
"step3
"
></el-step>
</el-steps>
<div
class=
"content"
>
<infoEditing
...
...
@@ -34,6 +35,7 @@
@
getTakeTakePlaceListFromChild=
"getTakeTakePlaceListFromChild"
/>
</div>
</div>
<div
class=
"stepsBtn"
>
<el-button
@
click=
"prev"
v-show=
"active >= 2"
style=
"margin-right: 20px"
>
上一步
</el-button
...
...
@@ -85,6 +87,35 @@ export default {
},
methods
:
{
// 步骤条点击事件
step1
()
{
if
(
this
.
$route
.
query
.
marketing_id
!=
undefined
)
{
this
.
active
=
1
;
}
},
step2
()
{
if
(
this
.
$route
.
query
.
marketing_id
!=
undefined
)
{
if
(
this
.
$refs
.
infoEdit
.
infoEditForm
.
title
==
""
)
{
ElMessage
.
error
(
"请填写商品标题"
);
return
;
}
this
.
active
=
2
;
}
},
step3
()
{
if
(
this
.
$route
.
query
.
marketing_id
!=
undefined
)
{
if
(
this
.
$refs
.
infoEdit
.
infoEditForm
.
title
==
""
)
{
ElMessage
.
error
(
"请填写商品标题"
);
return
;
}
else
if
(
this
.
$refs
.
addProduc
.
comTableData
.
length
==
0
)
{
ElMessage
.
error
(
"请至少选择一个商品"
);
return
;
}
else
{
this
.
active
=
3
;
}
}
},
// 上一步
prev
()
{
this
.
active
--
;
...
...
@@ -199,20 +230,37 @@ export default {
};
</
script
>
<
style
scope
>
<
style
lang=
"less"
scope
>
.releaseProduc {
height: 100%;
padding: 30px;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
@media screen and (max-width: 800px) {
// form表单
.releaseProduc {
padding: 0;
}
}
.headTitle {
height: 30px;
width: 75%;
font-size: 18px;
margin: 0 auto 40px auto;
}
.steps {
height: 60px;
}
/* 内容cotent */
.content {
flex-grow: 1;
}
.steps {
display: flex;
justify-content: center;
margin-bottom
:
50
px
;
margin-bottom:
35
px;
}
.steps /deep/ .el-step__icon {
width: 50px;
...
...
@@ -221,11 +269,14 @@ export default {
.steps /deep/ .el-step.is-horizontal .el-step__line {
top: 25px;
}
.stepsBtn {
display
:
flex
;
margin
:
20px
auto
;
justify-content
:
center
;
width: 100%;
height: 80px;
line-height: 80px;
background: white;
/* position: fixed;
bottom: 0px; */
text-align: center;
z-index: 999;
}
</
style
>
src/pages/Groupmeal/Distrib/index.vue
View file @
ad03eeb0
<
template
>
<Layout>
<el-card
class=
"goods"
>
<el-card
class=
"goods"
v-loading=
"pageLoading"
>
<div
class=
"header"
>
<el-button
type=
"primary"
@
click=
"assignDeliverer"
>
分配配送员
</el-button
...
...
@@ -9,47 +9,42 @@
>
添加配送员
</el-button
>
</div>
<el-table
:data=
"distribList"
border
stripe
style=
"width: 100%"
>
<el-table-column
align=
"center"
prop=
"activeName"
label=
"活动名称"
width=
"width"
>
<el-table
:data=
"distribList"
border
stripe
fit
style=
"width: 100%"
>
<el-table-column
align=
"center"
prop=
"activeName"
label=
"活动名称"
>
</el-table-column>
<el-table-column
align=
"center"
label=
"配送员数量"
width=
"width"
>
<el-table-column
align=
"center"
label=
"配送员数量"
>
<template
#
default=
"scope"
>
{{
scope
.
row
.
list
.
length
}}
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"deliverer_name"
label=
"配送人员"
width=
"width"
>
<el-table-column
align=
"center"
prop=
"deliverer_name"
label=
"配送人员"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
list
.
map
(
(
item
)
=>
item
.
deliverer_name
).
join
(
"、"
)
}}
{{
scope
.
row
.
list
.
map
(
item
=>
item
.
deliverer_name
).
join
(
"、"
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
fixed=
"right"
>
<el-table-column
prop=
"prop"
label=
"操作"
align=
"center"
min-width=
"100"
>
<
template
#
default=
"scope"
>
<el-button
type=
"primary"
@
click=
"handleModify(scope.row)"
>
修改
</el-button
>
<el-button
type=
"primary"
v-show=
"scope.row.url"
@
click=
"handleDownload(scope.row.url)"
<el-button
type=
"primary"
@
click=
"downloadDeliveryRoute(scope.row)"
>
下载配送路线
</el-button
>
<el-button
type=
"primary"
@
click=
"getEmailRecord(scope.row)"
>
发送记录
</el-button
>
</
template
>
</el-table-column>
</el-table>
<!-- 页码区 -->
<Pagination
@
current-change=
"handleCurrentChange"
v-model
:current-page=
"page"
:current-page=
"page"
:page-size=
"pageSize"
:total=
"total"
></Pagination>
...
...
@@ -137,6 +132,7 @@
:disabled=
"isEdit"
clearable
filterable
@
change=
"getSelectActivityInfo"
>
<el-option
:label=
"item.label"
...
...
@@ -198,17 +194,77 @@
</
template
>
</el-dialog>
</el-card>
<!-- 发送邮件的dialog -->
<YDDialog
dialogTitle=
"下载配送路线"
cancelButtonText=
"关闭"
:dialogCenter=
"true"
:myDialogVisible=
"sendEmailDialogVisible"
cancelDialogMethodName=
"sendEmailDialogCancel"
confirmDialogMethodName=
"sendEmailDialogConfirm"
@
sendEmailDialogCancel=
"sendEmailDialogCancel"
@
sendEmailDialogConfirm=
"sendEmailDialogConfirm"
>
<div
class=
"emailContent"
>
<p>
生成配送路线大概需要两分钟,生成完毕后会发送到您的邮箱,请填写接受邮箱(一点邮箱)
</p>
<div
class=
"emialInputWrapper"
>
<el-input
class=
"myInput"
v-model=
"myEmialInput"
placeholder=
"请输入邮箱地址"
:class=
"{
myInputRequire: isEmailRequire,
myInputError: emialHasError
}"
></el-input>
<span>
@yidian-inc.com
</span>
</div>
</div>
</YDDialog>
<!-- 显示email发送情况的列表 -->
<YDDialog
dialogTitle=
"发送记录"
cancelButtonText=
"关闭"
:dialogCenter=
"true"
:isShowConfirmButton=
"false"
:myDialogVisible=
"showEmailTableDialogVisible"
cancelDialogMethodName=
"showEmailDialogCancel"
@
showEmailDialogCancel=
"showEmailDialogCancel"
>
<div
class=
"emailListContent"
v-loading=
"emailRecordsLoading"
element-loading-text=
"拼命加载中"
element-loading-spinner=
"el-icon-loading"
>
<el-table
:data=
"emailListTableData"
style=
"width: 100%"
>
<el-table-column
prop=
"email"
label=
"接收邮箱"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"sendTime"
label=
"发送时间"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
>
</el-table-column>
</el-table>
</div>
</YDDialog>
</Layout>
</template>
<
script
>
import
{
checkEmailName
}
from
"../../../utils/tools.js"
;
import
YDDialog
from
"@/components/Dialog/YDDialoag.vue"
;
import
Layout
from
"../layout/index.vue"
;
import
Pagination
from
"../components/Pagination/index.vue"
;
//import Pagination from "../components/Pagination/index.vue";
import
{
getDelivererList
,
getList
,
getSaveDeliverer
,
getAddDeliverer
,
newGetMarketingList
,
getEmailRecords
,
getDeliveryRoutes
}
from
"../../../service/Groupmeal/groupmeal"
;
import
{
ElMessage
}
from
"element-plus"
;
export
default
{
...
...
@@ -216,18 +272,28 @@ export default {
components
:
{
Layout
,
Pagination
,
YDDialog
},
data
()
{
return
{
sendEmailDialogVisible
:
false
,
// 发送email弹窗
myEmialInput
:
""
,
// email地址
deliverer_xlsx_id
:
""
,
// 下载配送路线API参数
isEmailRequire
:
false
,
// 验证emial非空
emialHasError
:
false
,
// 验证email格式
showEmailTableDialogVisible
:
false
,
// 展示email发送情况的dialog
emailRecordsLoading
:
false
,
// table-loading
pageLoading
:
false
,
emailListTableData
:
[],
rules
:
{
name
:
[{
required
:
true
,
message
:
"请输入姓名"
,
trigger
:
"blur"
}],
max_capacity
:
[
{
required
:
true
,
message
:
"请填写配送上限"
,
trigger
:
"blur"
}
,
{
required
:
true
,
message
:
"请填写配送上限"
,
trigger
:
"blur"
}
// { type: "number", message: "请填写数值哦", trigger: "change" },
],
min_capacity
:
[
{
type
:
"number"
,
message
:
"请填写数值哦"
,
trigger
:
"change"
}
,
]
,
{
type
:
"number"
,
message
:
"请填写数值哦"
,
trigger
:
"change"
}
]
},
dialogFormAdd
:
false
,
// 列表
...
...
@@ -237,18 +303,19 @@ export default {
name
:
""
,
max_capacity
:
""
,
//配送上限
min_capacity
:
""
,
//最小配送量
tool_type
:
[]
,
//配送工具
tool_type
:
[]
//配送工具
},
//分配配送员弹框
dialogFormAssign
:
false
,
deliverer
:
[],
multipleSelection
:
[],
selectActivity
:
""
,
//活动下拉框
codeForModify
:
""
,
// 存储修改的code
total
:
0
,
page
:
1
,
pageSize
:
20
,
isEdit
:
false
,
marketingList
:
[]
,
marketingList
:
[]
};
},
created
()
{
...
...
@@ -272,7 +339,7 @@ export default {
name
:
""
,
max_capacity
:
""
,
//配送上限
min_capacity
:
""
,
//最小配送量
tool_type
:
[]
,
//配送工具
tool_type
:
[]
//配送工具
}),
(
this
.
deliverer
=
[]),
(
this
.
multipleSelection
=
[]);
...
...
@@ -283,7 +350,7 @@ export default {
const
{
page
,
pageSize
}
=
this
;
const
params
=
{
page
,
pageSize
,
pageSize
};
try
{
const
res
=
await
getList
(
params
);
...
...
@@ -306,7 +373,7 @@ export default {
name
,
max_capacity
:
+
max_capacity
,
min_capacity
:
+
min_capacity
,
tool_type
:
+
tool_type
,
tool_type
:
+
tool_type
};
try
{
const
{
code
,
reason
}
=
await
getAddDeliverer
(
params
);
...
...
@@ -318,7 +385,7 @@ export default {
name
:
""
,
max_capacity
:
""
,
//配送上限
min_capacity
:
""
,
//最小配送量
tool_type
:
[]
,
//配送工具
tool_type
:
[]
//配送工具
};
}
catch
(
error
)
{
ElMessage
(
"请求添加配送员失败"
);
...
...
@@ -329,6 +396,10 @@ export default {
this
.
dialogFormAdd
=
false
;
this
.
resetDate
();
},
// 分配配送员活动select改变
getSelectActivityInfo
(
val
)
{
this
.
codeForModify
=
val
;
},
// 分配配送员
assignDeliverer
()
{
this
.
dialogFormAssign
=
true
;
...
...
@@ -341,8 +412,8 @@ export default {
async
handleModify
(
row
)
{
this
.
dialogFormAssign
=
true
;
const
{
code
}
=
row
;
this
.
selectActivity
=
code
;
console
.
log
(
code
)
;
this
.
codeForModify
=
row
.
code
;
this
.
selectActivity
=
row
.
activeName
;
try
{
const
res
=
await
getDelivererList
({
code
});
this
.
deliverer
=
res
.
response
;
...
...
@@ -350,7 +421,7 @@ export default {
this
.
getList
();
this
.
$nextTick
(()
=>
{
this
.
$refs
.
multipleTable
.
clearSelection
();
this
.
deliverer
.
forEach
(
(
row
)
=>
{
this
.
deliverer
.
forEach
(
row
=>
{
if
(
row
.
checked
)
{
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
,
true
);
}
...
...
@@ -361,27 +432,30 @@ export default {
}
},
// 下载路线
handleDownload
(
url
)
{
downloadDeliveryRoute
(
rowInfo
)
{
this
.
deliverer_xlsx_id
=
rowInfo
.
deliverer_xlsx_id
;
this
.
sendEmailDialogVisible
=
true
;
// url && window.open("http://bp-dev.ini.yidian-inc.com" + url);
var
ENV
;
if
(
process
.
env
.
NODE_ENV
==
"development"
)
{
ENV
=
"http://bp-dev.ini.yidian-inc.com/"
;
}
else
if
(
process
.
env
.
NODE_ENV
==
"test"
)
{
ENV
=
"http://bp-test.ini.yidian-inc.com/"
;
}
else
{
ENV
=
"http://bp.int
.yidian-inc.com/"
;
}
url
&&
window
.
open
(
ENV
+
url
);
//
var ENV;
//
if (process.env.NODE_ENV == "development") {
//
ENV = "http://bp-dev.ini.yidian-inc.com/";
//
} else if (process.env.NODE_ENV == "test") {
//
ENV = "http://bp-test.ini.yidian-inc.com/";
//
} else {
// ENV = "http://bp.ini
.yidian-inc.com/";
//
}
//
url && window.open(ENV + url);
},
// 分配保存
async
save
()
{
const
{
selectActivity
,
multipleSelection
}
=
this
;
const
uids
=
multipleSelection
.
map
(
(
item
)
=>
item
.
deliverer_id
);
const
uids
=
multipleSelection
.
map
(
item
=>
item
.
deliverer_id
);
if
(
!
selectActivity
)
return
ElMessage
(
"请选择活动姓名"
);
const
codeForModify
=
this
.
codeForModify
;
try
{
const
{
code
,
reason
}
=
await
getSaveDeliverer
({
code
:
selectActivit
y
,
uids
:
uids
.
join
(
","
)
,
code
:
codeForModif
y
,
uids
:
uids
.
join
(
","
)
});
if
(
code
!==
0
)
return
this
.
$message
.
error
(
...
...
@@ -406,10 +480,10 @@ export default {
async
newGetMarketingList
()
{
try
{
const
res
=
await
newGetMarketingList
();
this
.
marketingList
=
res
.
result
.
map
(
(
item
)
=>
{
this
.
marketingList
=
res
.
result
.
map
(
item
=>
{
return
{
value
:
item
.
marketing_id
,
label
:
item
.
marketing_name
,
label
:
item
.
marketing_name
};
});
}
catch
(
error
)
{
...
...
@@ -422,13 +496,138 @@ export default {
const
res
=
await
getDelivererList
();
// this.deliverer.code = res.response.code;
this
.
deliverer
=
res
.
response
;
console
.
log
(
this
.
deliverer
);
}
catch
(
error
)
{
console
.
log
(
error
);
}
},
/* 邮箱弹窗相关操作 */
// 下载路线(API)
async
downloadDeliveryRoutesAPI
()
{
await
getDeliveryRoutes
({
deliverer_xlsx_id
:
this
.
deliverer_xlsx_id
,
email
:
this
.
myEmialInput
+
"@yidian-inc.com"
});
},
// 取消下载路线操作
sendEmailDialogCancel
()
{
this
.
myEmialInput
=
""
;
// 清空输入
this
.
isEmailRequire
=
false
;
this
.
emialHasError
=
false
;
this
.
sendEmailDialogVisible
=
false
;
},
// 确认下载路线操作
async
sendEmailDialogConfirm
()
{
if
(
this
.
myEmialInput
.
trim
()
===
""
)
{
this
.
isEmailRequire
=
true
;
return
;
}
if
(
!
checkEmailName
(
this
.
myEmialInput
))
{
this
.
emialHasError
=
true
;
return
;
}
try
{
this
.
pageLoading
=
true
;
await
this
.
downloadDeliveryRoutesAPI
();
this
.
pageLoading
=
false
;
this
.
sendEmailDialogCancel
();
ElMessage
.
success
(
"操作成功"
);
}
catch
(
err
)
{
this
.
pageLoading
=
false
;
if
(
err
)
{
ElMessage
.
error
(
err
);
}
else
{
ElMessage
.
error
(
"请求错误"
);
}
}
// this.myEmialInput = ""; // 清空输入
// this.isEmailRequire = false;
// this.emialHasError = false;
// this.sendEmailDialogVisible = false;
},
// 查看邮箱记录(API)
async
getEmailRecordsAPI
()
{
let
data
=
await
getEmailRecords
({
deliverer_xlsx_id
:
this
.
deliverer_xlsx_id
});
this
.
emailListTableData
=
this
.
formatEmailRecord
(
data
.
result
);
},
// 查看发送记录
async
getEmailRecord
(
rowInfo
)
{
this
.
deliverer_xlsx_id
=
rowInfo
.
deliverer_xlsx_id
;
// 赋值 取参数
this
.
showEmailTableDialogVisible
=
true
;
try
{
this
.
emailRecordsLoading
=
true
;
await
this
.
getEmailRecordsAPI
();
this
.
emailRecordsLoading
=
false
;
}
catch
(
err
)
{
this
.
emailRecordsLoading
=
false
;
if
(
err
)
{
ElMessage
.
error
(
err
);
}
else
{
ElMessage
.
error
(
"请求错误"
);
}
}
},
//带emailtable的dialog
showEmailDialogCancel
()
{
this
.
showEmailTableDialogVisible
=
false
;
},
// 数据转换(api-table展示)
// create_time: "2021-08-19 17:38:05"
// deliverer_xlsx_id: 49
// deliverer_xlsx_log_id: 4
// email: "asdasdasdf"
// send_status: 1
// send_time: ""
// update_time: "2021-08-19 17:38:13"
formatEmailRecord
(
initialData
)
{
let
matchRelation
=
{
"0"
:
"待生成"
,
"1"
:
"生成中"
,
"2"
:
"已发送"
,
"3"
:
"发送失败"
};
let
result
=
initialData
.
map
(
item
=>
{
let
res
=
{
email
:
item
.
email
,
sendTime
:
item
.
send_time
,
status
:
matchRelation
[
item
.
send_status
.
toString
()]
};
return
res
;
});
return
result
;
}
}
};
</
script
>
<
style
lang=
"less"
src=
"./index.less"
scope
>
<
style
lang=
"less"
src=
"./index.less"
scope
></
style
>
<
style
lang=
"less"
scoped
>
// 邮箱dialog
.emailContent {
.emialInputWrapper {
display: flex;
align-items: center;
margin: 15px 0;
.myInput {
width: 50%;
}
.myInputRequire::after {
content: "输入不能为空";
position: absolute;
left: 2px;
top: 35px;
color: red;
}
// 验证emial非空
.myInputError::after {
content: "输入邮箱不合法";
position: absolute;
left: 2px;
top: 35px;
color: red;
}
}
}
</
style
>
src/pages/Groupmeal/components/Pagination/index.vue
View file @
ad03eeb0
<
template
>
<div
class=
"block"
>
<el-pagination
class=
"pagination"
layout=
"prev, pager, next, jumper, ->,page , total"
v-bind=
"$attrs"
v-on=
"$listener"
>
</el-pagination>
</div>
</
template
>
<
script
>
<
script
>
export
default
{
name
:
'Pagination'
name
:
"Pagination"
};
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.block {
margin-top: 50px;
}
...
...
src/pages/Groupmeal/newOrderManagement/index.vue
View file @
ad03eeb0
...
...
@@ -5,6 +5,7 @@
<el-form
:inline=
"true"
:model=
"orderQueryObj"
label-width=
"90px"
ref=
"ruleForm"
class=
"demo-form-inline"
>
...
...
@@ -54,6 +55,7 @@
placeholder=
"请输入收货人姓名或手机号"
prefix-icon=
"el-icon-search"
v-model=
"orderQueryObj.cust_user"
style=
"width: 220px"
></el-input>
</el-form-item>
<el-form-item
label=
"订单编号:"
prop=
"order_id"
>
...
...
@@ -68,6 +70,7 @@
v-model=
"orderQueryObj.sub_shop_id"
placeholder=
"请选择"
filterable
@
change=
"subShopSel"
>
<el-option
v-for=
"item in selLiftPoinArr"
...
...
@@ -77,6 +80,40 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"详细地址:"
prop=
"take_place_address"
>
<el-select
v-model=
"orderQueryObj.take_place_address"
placeholder=
"请选择"
filterable
@
change=
"takePlaceAddressSel"
>
<el-option
v-for=
"item in detailedAddressArr"
:key=
"item"
:label=
"item"
:value=
"item"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"下单时间:"
prop=
"order_time"
>
<el-date-picker
v-model=
"order_time"
type=
"datetimerange"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
format=
"YYYY-MM-DD HH:mm:ss"
value-format=
"YYYY-MM-DD HH:mm:ss"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
size=
"small"
@
click=
"today"
>
今天
</el-button>
<el-button
size=
"small"
@
click=
"yesterday"
>
昨天
</el-button>
</el-form-item>
<el-form-item>
<el-button
@
click=
"resetOrder('ruleForm')"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchOrder"
>
搜索
</el-button>
...
...
@@ -353,15 +390,15 @@ import {
newOrderItemList
,
newOrderRefundReject
,
newRefundOrder
,
newGetOrderExportURL
newGetOrderExportURL
,
}
from
"@/service/Groupmeal/groupmeal"
;
import
page
from
"../components/Pagination/index.vue"
;
import
dayJs
from
"dayjs"
;
export
default
{
name
:
"orderManagement"
,
components
:
{
Layout
,
page
page
,
}
,
data
()
{
return
{
...
...
@@ -369,13 +406,17 @@ export default {
orderQueryObj
:
{
page
:
1
,
page_size
:
10
,
marketing_id
:
""
,
// 活动名称
marketing_id
:
"
0
"
,
// 活动名称
order_status
:
"0"
,
// 订单状态
goods_id
:
""
,
// 商品名称
cust_user
:
""
,
// 收货人
order_id
:
""
,
// 订单编号
sub_shop_id
:
""
// 自提点
sub_shop_id
:
""
,
// 自提点
take_place_address
:
""
,
//详细地址
create_time_start
:
""
,
// 开始时间
create_time_end
:
""
,
// 结束时间
}
,
order_time
:
[],
// 下单时间
// 下拉框数据
// 活动名称
activityNameArr
:
[],
...
...
@@ -383,41 +424,43 @@ export default {
orderStatusArr
:
[
{
value
:
"0"
,
label
:
"全部"
label
:
"全部"
,
}
,
{
value
:
"1"
,
label
:
"未支付"
label
:
"未支付"
,
}
,
{
value
:
"2"
,
label
:
"已支付"
label
:
"已支付"
,
}
,
{
value
:
"3"
,
label
:
"待退款"
label
:
"待退款"
,
}
,
{
value
:
"4"
,
label
:
"已退款"
label
:
"已退款"
,
}
,
{
value
:
"5"
,
label
:
"退款中"
label
:
"退款中"
,
}
,
{
value
:
"6"
,
label
:
"已拒绝"
label
:
"已拒绝"
,
}
,
{
value
:
"7"
,
label
:
"售后"
}
label
:
"售后"
,
}
,
],
// 商品名称
tradeNameArr
:
[],
// 自提点
selLiftPoinArr
:
[],
// 详细地址
detailedAddressArr
:
[],
activeName
:
"all"
,
// Tabs标签页
goodsNum
:
""
,
// 商品总计
...
...
@@ -439,9 +482,10 @@ export default {
refundedGoodsSel
:
false
,
payment
:
""
,
// restoreInventory: false,
goods_name
:
""
}
]
goods_name
:
""
,
}
,
],
flag
:
[]
}
;
}
,
...
...
@@ -454,7 +498,7 @@ export default {
}
,
exportURL3
()
{
return
newGetOrderExportURL
(
this
.
orderQueryObj
.
marketing_id
,
"3"
);
}
}
,
}
,
methods
:
{
...
...
@@ -466,7 +510,9 @@ export default {
async
getMarketingListMet
()
{
try
{
const
res
=
await
newGetMarketingList
();
this
.
activityNameArr
=
res
.
result
;
let
allArr
=
[{
marketing_id
:
"0"
,
marketing_name
:
"全部活动"
}
];
let
arr
=
allArr
.
concat
(
res
.
result
);
this
.
activityNameArr
=
arr
;
}
catch
(
error
)
{
this
.
$message
.
error
(
"发生未知错误,请稍后再试一下吧~~~"
);
console
.
error
(
error
);
...
...
@@ -477,8 +523,9 @@ export default {
async
activityNameSel
(
val
)
{
this
.
orderQueryObj
.
goods_id
=
""
;
this
.
orderQueryObj
.
sub_shop_id
=
""
;
this
.
orderQueryObj
.
take_place_address
=
""
;
const
params
=
{
marketing_id
:
val
marketing_id
:
val
,
}
;
const
res
=
await
newGetGoodsList
(
params
);
// 商品名称
this
.
getSubShopListMet
(
val
);
//自提点
...
...
@@ -495,24 +542,101 @@ export default {
marketing_id
=
params
;
}
const
res
=
await
newGetSubShopList
({
marketing_id
:
marketing_id
}
);
this
.
selLiftPoinArr
=
res
.
result
;
this
.
selLiftPoinArr
=
res
.
result
.
take_place_list
;
this
.
flag
=
res
.
result
.
take_place_list
;
this
.
detailedAddressArr
=
res
.
result
.
address_list
;
}
catch
(
error
)
{
this
.
$message
.
error
(
"发生未知错误,请稍后再试一下吧~~~"
);
console
.
error
(
error
);
}
}
,
// 自提点获取详细地址
subShopSel
(
val
)
{
let
addressVal
,
arr
=
[];
this
.
orderQueryObj
.
take_place_address
=
""
;
this
.
orderQueryObj
.
sub_shop_list
=
""
;
for
(
var
i
in
this
.
selLiftPoinArr
)
{
if
(
this
.
selLiftPoinArr
[
i
].
take_place_id
==
val
)
{
addressVal
=
this
.
selLiftPoinArr
[
i
].
address
;
}
}
for
(
var
n
in
this
.
detailedAddressArr
)
{
if
(
this
.
detailedAddressArr
[
n
]
==
addressVal
)
{
arr
.
push
(
this
.
detailedAddressArr
[
n
]);
}
}
this
.
orderQueryObj
.
take_place_address
=
arr
[
0
];
this
.
detailedAddressArr
=
arr
;
}
,
// 详细地址获取自提点
takePlaceAddressSel
(
val
)
{
let
arr
=
[],
arrID
=
[];
this
.
orderQueryObj
.
sub_shop_id
=
""
;
this
.
orderQueryObj
.
sub_shop_list
=
""
;
this
.
selLiftPoinArr
=
this
.
flag
;
for
(
var
i
in
this
.
selLiftPoinArr
)
{
if
(
val
==
this
.
selLiftPoinArr
[
i
].
address
)
{
arr
.
push
(
this
.
selLiftPoinArr
[
i
]);
arrID
.
push
(
this
.
selLiftPoinArr
[
i
].
take_place_id
);
}
}
this
.
selLiftPoinArr
=
arr
;
if
(
this
.
orderQueryObj
.
sub_shop_id
==
""
)
{
this
.
orderQueryObj
.
sub_shop_list
=
arrID
.
join
(
","
);
}
}
,
// 获取今天日期
today
()
{
this
.
order_time
=
[];
this
.
order_time
[
0
]
=
dayJs
(
new
Date
(
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
())
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
order_time
[
1
]
=
dayJs
(
new
Date
(
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
()
+
24
*
60
*
60
*
1000
)
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
}
,
// 获取昨天日期
yesterday
()
{
this
.
order_time
=
[];
this
.
order_time
[
0
]
=
dayJs
(
new
Date
(
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
()
-
24
*
60
*
60
*
1000
)
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
order_time
[
1
]
=
dayJs
(
new
Date
(
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
())
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
}
,
// 重置
resetOrder
(
formName
)
{
if
(
this
.
$route
.
query
.
marketing_type
==
"4"
)
{
this
.
$router
.
push
({
path
:
"/op/groupmeal/newOrderManagement"
path
:
"/op/groupmeal/newOrderManagement"
,
}
);
this
.
$route
.
query
.
marketing_type
=
""
;
}
this
.
$refs
[
formName
].
resetFields
();
this
.
activeName
=
"all"
;
this
.
order_time
=
[];
this
.
orderQueryObj
.
create_time_start
=
""
;
this
.
orderQueryObj
.
create_time_end
=
""
;
this
.
orderQueryObj
.
sub_shop_list
=
""
;
this
.
orderQueryObj
.
page
=
1
;
this
.
orderQueryObj
.
page_size
=
10
;
this
.
$refs
[
formName
].
resetFields
();
this
.
getOrderListMet
(
this
.
orderQueryObj
);
this
.
getSubShopListMet
();
}
,
...
...
@@ -521,12 +645,14 @@ export default {
searchOrder
()
{
if
(
this
.
$route
.
query
.
marketing_type
==
"4"
)
{
this
.
$router
.
push
({
path
:
"/op/groupmeal/newOrderManagement"
path
:
"/op/groupmeal/newOrderManagement"
,
}
);
this
.
$route
.
query
.
marketing_type
=
""
;
}
this
.
orderQueryObj
.
page
=
1
;
this
.
orderQueryObj
.
page_size
=
10
;
this
.
orderQueryObj
.
create_time_start
=
this
.
order_time
[
0
];
this
.
orderQueryObj
.
create_time_end
=
this
.
order_time
[
1
];
if
(
this
.
orderQueryObj
.
order_status
===
"0"
)
{
this
.
activeName
=
"all"
;
this
.
orderStatusArr
[
1
].
disabled
=
false
;
...
...
@@ -555,7 +681,10 @@ export default {
// 导出
exportOrder
()
{
if
(
this
.
orderQueryObj
.
marketing_id
===
""
)
{
if
(
this
.
orderQueryObj
.
marketing_id
===
""
||
this
.
orderQueryObj
.
marketing_id
===
"0"
)
{
this
.
$message
.
error
(
"请选择活动名称"
);
return
;
}
...
...
@@ -566,7 +695,7 @@ export default {
async
printOrderMet
(
forcePrint
)
{
const
params
=
{
marketing_id
:
this
.
orderQueryObj
.
marketing_id
,
force_print
:
forcePrint
?
"1"
:
""
force_print
:
forcePrint
?
"1"
:
""
,
}
;
const
res
=
await
newOrderPrint
(
params
);
return
res
;
...
...
@@ -574,7 +703,10 @@ export default {
// 打印
async
printOrder
()
{
if
(
this
.
orderQueryObj
.
marketing_id
===
""
)
{
if
(
this
.
orderQueryObj
.
marketing_id
===
""
||
this
.
orderQueryObj
.
marketing_id
===
"0"
)
{
this
.
$message
.
error
(
"请选择活动名称"
);
return
;
}
...
...
@@ -583,7 +715,7 @@ export default {
if
(
res
.
code
===
0
)
{
this
.
$message
({
type
:
"success"
,
message
:
"打印成功"
message
:
"打印成功"
,
}
);
return
;
}
...
...
@@ -601,7 +733,7 @@ export default {
try
{
await
this
.
$confirm
(
res
.
reason
,
"打印"
,
{
cancelButtonText
:
"取消"
,
confirmButtonText
:
"确定"
confirmButtonText
:
"确定"
,
}
);
}
catch
(
e
)
{
// 取消
...
...
@@ -627,7 +759,7 @@ export default {
goods_id
:
""
,
cust_user
:
""
,
order_id
:
""
,
sub_shop_id
:
""
sub_shop_id
:
""
,
}
);
}
else
{
res
=
await
newGetOrderList
(
this
.
orderQueryObj
);
...
...
@@ -652,21 +784,21 @@ export default {
try
{
await
this
.
$confirm
(
"确定要拒绝退款么?"
,
"拒绝"
,
{
cancelButtonText
:
"取消"
,
confirmButtonText
:
"确定"
confirmButtonText
:
"确定"
,
}
);
}
catch
(
e
)
{
// 取消
return
;
}
const
params
=
{
order_id
:
val
.
order_id
order_id
:
val
.
order_id
,
}
;
const
res
=
await
newOrderRefundReject
(
params
);
if
(
res
.
code
===
0
)
{
this
.
$message
({
type
:
"success"
,
message
:
"订单已驳回"
message
:
"订单已驳回"
,
}
);
}
else
{
this
.
$message
.
error
(
res
.
reason
);
...
...
@@ -692,7 +824,7 @@ export default {
this
.
checkAll
=
false
;
this
.
refundGoods
=
[];
const
params
=
{
order_id
:
val
.
order_id
order_id
:
val
.
order_id
,
}
;
const
res
=
await
newOrderItemList
(
params
);
this
.
refundGoods
=
res
.
result
;
...
...
@@ -721,11 +853,11 @@ export default {
//
}
//
}
const
convertToNumber
=
str
=>
{
const
convertToNumber
=
(
str
)
=>
{
return
!
Number
.
isNaN
(
parseFloat
(
str
))
?
parseFloat
(
str
)
:
0
;
}
;
const
processRefundItem
=
item
=>
{
const
processRefundItem
=
(
item
)
=>
{
return
{
order_item_id
:
item
.
order_item_id
,
refund_num
:
item
.
refundableQuantity
||
0
,
...
...
@@ -752,13 +884,13 @@ export default {
return
;
}
this
.
$message
.
error
(
res
.
reason
);
}
}
,
}
,
created
()
{
this
.
getMarketingListMet
();
// 活动名称
this
.
getSubShopListMet
();
// 自提点
this
.
getOrderListMet
();
// table列表
}
}
,
}
;
<
/script
>
...
...
src/pages/Groupmeal/orderManagement/index.vue
View file @
ad03eeb0
...
...
@@ -5,9 +5,11 @@
<el-form
:inline=
"true"
:model=
"orderQueryObj"
label-width=
"90px"
ref=
"ruleForm"
class=
"demo-form-inline"
>
<div>
<el-form-item
label=
"活动名称:"
prop=
"marketing_id"
>
<el-select
v-model=
"orderQueryObj.marketing_id"
...
...
@@ -25,7 +27,10 @@
</el-select>
</el-form-item>
<el-form-item
label=
"订单状态:"
prop=
"order_status"
>
<el-select
v-model=
"orderQueryObj.order_status"
placeholder=
"请选择"
>
<el-select
v-model=
"orderQueryObj.order_status"
placeholder=
"请选择"
>
<el-option
v-for=
"item in orderStatusArr"
:key=
"item.value"
...
...
@@ -49,11 +54,14 @@
></el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item
label=
"收货人:"
prop=
"cust_user"
>
<el-input
placeholder=
"请输入收货人姓名或手机号"
prefix-icon=
"el-icon-search"
v-model=
"orderQueryObj.cust_user"
style=
"width:220px"
></el-input>
</el-form-item>
<el-form-item
label=
"订单编号:"
prop=
"order_id"
>
...
...
@@ -77,6 +85,40 @@
></el-option>
</el-select>
</el-form-item>
</div>
<!--
<el-form-item
label=
"详细地址:"
prop=
"detailed_address"
>
<el-select
v-model=
"orderQueryObj.detailed_address"
placeholder=
"请选择"
filterable
>
<el-option
v-for=
"item in selLiftPoinArr"
:key=
"item.sub_shop_id"
:label=
"item.sub_shop_name"
:value=
"item.sub_shop_id"
></el-option>
</el-select>
</el-form-item>
-->
<el-form-item
label=
"下单时间:"
prop=
"order_time"
>
<el-date-picker
v-model=
"order_time"
type=
"datetimerange"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
format=
"YYYY-MM-DD HH:mm:ss"
value-format=
"YYYY-MM-DD HH:mm:ss"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
size=
"small"
@
click=
"today"
>
今天
</el-button>
<el-button
size=
"small"
@
click=
"yesterday"
>
昨天
</el-button>
</el-form-item>
<el-form-item>
<el-button
@
click=
"resetOrder('ruleForm')"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchOrder"
>
搜索
</el-button>
...
...
@@ -291,19 +333,7 @@
>
配送表
</el-button
></a
>
<!-- <el-checkbox-group v-model="exportSel">
<el-checkbox
v-for="i in exportSelOpt"
:label="i.type"
:key="i.type"
>{{ i.name }}</el-checkbox
>
</el-checkbox-group> -->
</el-form-item>
<!-- <el-form-item class="exportBtn">
<el-button @click="exportShow = false">取消</el-button>
<a :href="exportURL" style="margin-left: 20px"><el-button type="primary" @click="exportShow = false">确定导出</el-button></a>
</el-form-item> -->
</el-dialog>
<!-- 退款弹窗 -->
<el-dialog
title=
"退款"
width=
"30%"
top=
"10%"
v-model=
"refundShow"
>
...
...
@@ -374,16 +404,15 @@ import {
orderItemList
,
orderRefundReject
,
refundOrder
,
getOrderExportURL
,
getOrderExportURL
}
from
"@/service/Groupmeal/groupmeal"
;
// import page from "../../components/Pagination.vue";
import
page
from
"../components/Pagination/index.vue"
;
import
dayJs
from
"dayjs"
;
export
default
{
name
:
"orderManagement"
,
components
:
{
Layout
,
page
,
page
},
data
()
{
return
{
...
...
@@ -391,13 +420,17 @@ export default {
orderQueryObj
:
{
page
:
1
,
page_size
:
10
,
marketing_id
:
""
,
// 活动名称
marketing_id
:
"
0
"
,
// 活动名称
order_status
:
"0"
,
// 订单状态
goods_id
:
""
,
// 商品名称
cust_user
:
""
,
// 收货人
order_id
:
""
,
// 订单编号
sub_shop_id
:
""
,
// 自提点
// detailed_address: "", // 详细地址
create_time_start
:
""
,
// 开始时间
create_time_end
:
""
// 结束时间
},
order_time
:
[],
// 下单时间
// 下拉框数据
// 活动名称
activityNameArr
:
[],
...
...
@@ -405,36 +438,36 @@ export default {
orderStatusArr
:
[
{
value
:
"0"
,
label
:
"全部"
,
label
:
"全部"
},
{
value
:
"1"
,
label
:
"未支付"
,
label
:
"未支付"
},
{
value
:
"2"
,
label
:
"已支付"
,
label
:
"已支付"
},
{
value
:
"3"
,
label
:
"待退款"
,
label
:
"待退款"
},
{
value
:
"4"
,
label
:
"已退款"
,
label
:
"已退款"
},
{
value
:
"5"
,
label
:
"退款中"
,
label
:
"退款中"
},
{
value
:
"6"
,
label
:
"已拒绝"
,
label
:
"已拒绝"
},
{
value
:
"7"
,
label
:
"售后"
,
}
,
label
:
"售后"
}
],
// 商品名称
tradeNameArr
:
[],
...
...
@@ -448,13 +481,6 @@ export default {
exportShow
:
false
,
exportType
:
""
,
// exportSel: [],
// exportSelOpt: [
// { type: "1", name: "总表" },
// { type: "2", name: "商品表" },
// { type: "3", name: "配送表" },
// ],
// 表格数据
orderTableData
:
[],
totalNum
:
null
,
//总条数
...
...
@@ -472,9 +498,9 @@ export default {
payment
:
""
,
// 实付
refundableQuantity
:
""
,
refundAmount
:
""
,
amountToRefund
:
""
,
}
,
]
,
amountToRefund
:
""
}
]
};
},
...
...
@@ -487,7 +513,7 @@ export default {
},
exportURL3
()
{
return
getOrderExportURL
(
this
.
orderQueryObj
.
marketing_id
,
"3"
);
}
,
}
},
methods
:
{
...
...
@@ -499,7 +525,9 @@ export default {
async
getMarketingListMet
()
{
try
{
const
res
=
await
getMarketingList
();
this
.
activityNameArr
=
res
.
result
;
let
allArr
=
[{
marketing_id
:
"0"
,
marketing_name
:
"全部活动"
}];
let
arr
=
allArr
.
concat
(
res
.
result
);
this
.
activityNameArr
=
arr
;
}
catch
(
error
)
{
this
.
$message
.
error
(
"发生未知错误,请稍后再试一下吧~~~"
);
console
.
error
(
error
);
...
...
@@ -510,7 +538,7 @@ export default {
async
activityNameSel
(
val
)
{
this
.
orderQueryObj
.
goods_id
=
""
;
const
params
=
{
marketing_id
:
val
,
marketing_id
:
val
};
const
res
=
await
getGoodsList
(
params
);
// 商品名称
this
.
getSubShopListMet
(
val
);
//自提点
...
...
@@ -534,11 +562,43 @@ export default {
}
},
// 获取今天日期
today
()
{
this
.
order_time
=
[];
// -lh
this
.
order_time
[
0
]
=
dayJs
(
new
Date
(
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
())
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
order_time
[
1
]
=
dayJs
(
new
Date
(
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
()
+
24
*
60
*
60
*
1000
)
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
},
// 获取昨天日期
yesterday
()
{
this
.
order_time
=
[];
// -lh
this
.
order_time
[
0
]
=
dayJs
(
new
Date
(
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
()
-
24
*
60
*
60
*
1000
)
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
order_time
[
1
]
=
dayJs
(
new
Date
(
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
())
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
},
// 重置
resetOrder
(
formName
)
{
this
.
$refs
[
formName
].
resetFields
();
this
.
activeName
=
"all"
;
this
.
order_time
=
[];
this
.
orderQueryObj
.
page
=
1
;
this
.
orderQueryObj
.
page_size
=
10
;
this
.
orderQueryObj
.
create_time_start
=
""
;
this
.
orderQueryObj
.
create_time_end
=
""
;
this
.
$refs
[
formName
].
resetFields
();
this
.
getOrderListMet
(
this
.
orderQueryObj
);
},
...
...
@@ -546,6 +606,8 @@ export default {
searchOrder
()
{
this
.
orderQueryObj
.
page
=
1
;
this
.
orderQueryObj
.
page_size
=
10
;
this
.
orderQueryObj
.
create_time_start
=
this
.
order_time
[
0
];
this
.
orderQueryObj
.
create_time_end
=
this
.
order_time
[
1
];
this
.
getOrderListMet
(
this
.
orderQueryObj
);
},
...
...
@@ -562,10 +624,14 @@ export default {
}
this
.
getOrderListMet
(
this
.
orderQueryObj
);
},
// 导出
exportOrder
()
{
if
(
this
.
orderQueryObj
.
marketing_id
===
""
)
{
this
.
$message
.
error
(
"请选择活动名称"
);
if
(
this
.
orderQueryObj
.
marketing_id
===
""
||
this
.
orderQueryObj
.
marketing_id
===
"0"
)
{
this
.
$message
.
error
(
"请选择活动后再进行操作"
);
return
;
}
this
.
exportShow
=
true
;
...
...
@@ -576,7 +642,7 @@ export default {
const
params
=
{
marketing_id
:
this
.
orderQueryObj
.
marketing_id
,
// marketing_id: "1NJETU",
force_print
:
forcePrint
?
"1"
:
""
,
force_print
:
forcePrint
?
"1"
:
""
};
const
res
=
await
orderPrint
(
params
);
return
res
;
...
...
@@ -584,8 +650,11 @@ export default {
// 打印
async
printOrder
()
{
if
(
this
.
orderQueryObj
.
marketing_id
===
""
)
{
this
.
$message
.
error
(
"请选择活动名称"
);
if
(
this
.
orderQueryObj
.
marketing_id
===
""
||
this
.
orderQueryObj
.
marketing_id
===
"0"
)
{
this
.
$message
.
error
(
"请选择活动后再进行操作"
);
return
;
}
...
...
@@ -593,7 +662,7 @@ export default {
if
(
res
.
code
===
0
)
{
this
.
$message
({
type
:
"success"
,
message
:
"打印成功"
,
message
:
"打印成功"
});
return
;
}
...
...
@@ -611,7 +680,7 @@ export default {
try
{
await
this
.
$confirm
(
res
.
reason
,
"打印"
,
{
cancelButtonText
:
"取消"
,
confirmButtonText
:
"确定"
,
confirmButtonText
:
"确定"
});
}
catch
(
e
)
{
// 取消
...
...
@@ -652,21 +721,21 @@ export default {
try
{
await
this
.
$confirm
(
"确定要拒绝退款么?"
,
"拒绝"
,
{
cancelButtonText
:
"取消"
,
confirmButtonText
:
"确定"
,
confirmButtonText
:
"确定"
});
}
catch
(
e
)
{
// 取消
return
;
}
const
params
=
{
order_id
:
val
.
order_id
,
order_id
:
val
.
order_id
};
const
res
=
await
orderRefundReject
(
params
);
if
(
res
.
code
===
0
)
{
this
.
$message
({
type
:
"success"
,
message
:
"订单已驳回"
,
message
:
"订单已驳回"
});
}
else
{
this
.
$message
.
error
(
res
.
reason
);
...
...
@@ -693,7 +762,7 @@ export default {
this
.
checkAll
=
false
;
this
.
refundGoods
=
[];
const
params
=
{
order_id
:
val
.
order_id
,
order_id
:
val
.
order_id
};
const
res
=
await
orderItemList
(
params
);
this
.
refundGoods
=
res
.
result
;
...
...
@@ -720,15 +789,15 @@ export default {
return
this
.
refundGoods
.
filter
(
isSelected
);
};
const
convertToNumber
=
(
str
)
=>
{
const
convertToNumber
=
str
=>
{
return
!
Number
.
isNaN
(
parseFloat
(
str
))
?
parseFloat
(
str
)
:
0
;
};
const
processRefundItem
=
(
item
)
=>
{
const
processRefundItem
=
item
=>
{
return
{
order_item_id
:
item
.
order_item_id
,
refund_num
:
item
.
refundableQuantity
||
0
,
refund_amount
:
convertToNumber
(
item
.
amountToRefund
)
,
refund_amount
:
convertToNumber
(
item
.
amountToRefund
)
};
};
...
...
@@ -754,13 +823,13 @@ export default {
}
// this.refundShow = false;
this
.
$message
.
error
(
res
.
reason
);
}
,
}
},
created
()
{
this
.
getMarketingListMet
();
// 活动名称
this
.
getSubShopListMet
();
// 自提点
this
.
getOrderListMet
();
// table列表
}
,
}
};
</
script
>
...
...
@@ -772,7 +841,7 @@ export default {
word-break: break-all;
}
}
.refundCon /deep/ .el-row{
.refundCon /deep/ .el-row
{
margin-bottom: 15px;
display: flex;
align-items: center;
...
...
src/pages/Life-no/index.vue
View file @
ad03eeb0
<
template
>
<layout>
<div
class=
"life-no"
>
<el-form
:inline=
"true"
:model=
"formInline"
class=
"demo-form-inline"
>
<el-form
:inline=
"true"
:model=
"formInline"
class=
"demo-form-inline"
>
<el-form-item
label=
"生活号名称"
>
<el-input
class=
"search_life"
...
...
@@ -17,81 +12,47 @@
></el-input>
</el-form-item>
<el-form-item
label=
"类型"
>
<el-select
v-model=
"life_account.type"
placeholder=
"类型"
>
<el-option
value=
"0"
label=
"全部"
></el-option>
<el-option
value=
"1"
label=
"个人"
></el-option>
<el-option
value=
"2"
label=
"企业"
></el-option>
<el-select
v-model=
"life_account.type"
placeholder=
"类型"
>
<el-option
value=
"0"
label=
"全部"
></el-option>
<el-option
value=
"1"
label=
"个人"
></el-option>
<el-option
value=
"2"
label=
"企业"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"onSearchSubmit"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"onSearchSubmit"
>
查询
</el-button>
<el-button
@
click=
"onReset"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
:data=
"LifeNoList"
border
style=
"width: 100%"
>
<el-table-column
prop=
"life_account_id"
label=
"ID"
>
</el-table-column>
<el-table-column
prop=
"life_account_name"
label=
"生活号名称"
>
<el-table
:data=
"LifeNoList"
border
style=
"width: 100%"
>
<el-table-column
prop=
"life_account_id"
label=
"ID"
>
</el-table-column>
<el-table-column
prop=
"life_account_name"
label=
"生活号名称"
>
</el-table-column>
<el-table-column
:formatter=
"hasTypeFormat"
label=
"类型"
>
<el-table-column
:formatter=
"hasTypeFormat"
label=
"类型"
>
</el-table-column>
<el-table-column
:formatter=
"hasStatusFormat"
label=
"状态"
>
<el-table-column
:formatter=
"hasStatusFormat"
label=
"状态"
>
</el-table-column>
<el-table-column
prop=
"create_time"
label=
"创建时间"
>
</el-table-column>
<el-table-column
prop=
"create_time"
label=
"创建时间"
>
</el-table-column>
<el-table-column
label=
"操作"
>
<template
#
default=
"scope"
>
<el-button
size=
"mini"
type=
"primary"
@
click
.
stop=
"toLifeDetail(scope.row)"
>
查看详情
</el-button>
>
查看详情
</el-button
>
</
template
>
</el-table-column>
</el-table>
<page
:totalNum=
"totalNum"
@
update=
"update"
/>
<page
:totalNum=
"totalNum"
@
update=
"update"
/>
</div>
</layout>
</template>
<
script
>
import
Layout
from
'@/layouts'
import
page
from
"../components/Pagination"
import
Layout
from
"@/layouts"
;
// import page from "../components/Pagination";
import
page
from
"../components/Pagination.vue"
;
import
{
getLifeNoList
as
reqGetLifeNoList
}
from
"../../service/life-no"
;
export
default
{
name
:
"LifeNo"
,
...
...
@@ -99,7 +60,7 @@ export default {
Layout
,
page
},
data
()
{
data
()
{
return
{
params
:
{
page
:
1
,
...
...
@@ -107,25 +68,25 @@ export default {
},
life_account
:
{
name
:
""
,
type
:
""
,
type
:
""
},
totalNum
:
null
,
lifeList
:
[],
LifeNoList
:
[],
formInline
:
{
user
:
''
,
region
:
''
}
user
:
""
,
region
:
""
}
};
},
created
()
{
this
.
getLifeNoListFn
()
created
()
{
this
.
getLifeNoListFn
()
;
},
methods
:
{
hasTypeFormat
(
row
)
{
return
row
.
life_account_type
==
1
?
'个人'
:
'企业'
hasTypeFormat
(
row
)
{
return
row
.
life_account_type
==
1
?
"个人"
:
"企业"
;
},
hasStatusFormat
(
row
)
{
hasStatusFormat
(
row
)
{
if
(
row
.
life_account_status
==
1
)
{
return
"正常"
;
}
else
if
(
row
.
life_account_status
==
3
)
{
...
...
@@ -135,39 +96,41 @@ export default {
}
},
//获取列表数据
getLifeNoListFn
()
{
let
{
name
,
type
}
=
this
.
life_account
let
{
page
,
page_size
}
=
this
.
params
getLifeNoListFn
()
{
let
{
name
,
type
}
=
this
.
life_account
;
let
{
page
,
page_size
}
=
this
.
params
;
let
params
=
{
page
,
page_size
,
life_account_name
:
name
,
life_account_type
:
type
}
}
;
reqGetLifeNoList
(
params
).
then
(
res
=>
{
this
.
totalNum
=
res
.
count
this
.
LifeNoList
=
res
.
data
})
this
.
totalNum
=
res
.
count
;
this
.
LifeNoList
=
res
.
data
;
})
;
},
//查询
onSearchSubmit
()
{
this
.
getLifeNoListFn
()
onSearchSubmit
()
{
this
.
getLifeNoListFn
()
;
},
//重置
onReset
()
{
this
.
life_account
.
name
=
""
,
this
.
life_account
.
type
=
""
this
.
getLifeNoListFn
()
},
update
(
obj
)
{
Object
.
assign
(
this
.
params
,
obj
)
this
.
getLifeNoListFn
(
this
.
params
)
onReset
()
{
(
this
.
life_account
.
name
=
""
),
(
this
.
life_account
.
type
=
""
);
this
.
getLifeNoListFn
();
},
toLifeDetail
(
row
)
{
this
.
$router
.
push
({
name
:
'LifeNoDetail'
,
query
:
{
lifeId
:
row
.
life_account_id
}
});
update
(
obj
)
{
Object
.
assign
(
this
.
params
,
obj
);
this
.
getLifeNoListFn
(
this
.
params
);
},
toLifeDetail
(
row
)
{
this
.
$router
.
push
({
name
:
"LifeNoDetail"
,
query
:
{
lifeId
:
row
.
life_account_id
}
});
}
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.life-no {
...
...
src/pages/components/Pagination.vue
View file @
ad03eeb0
...
...
@@ -14,24 +14,24 @@
</
template
>
<
script
>
export
default
{
props
:
[
'totalNum'
],
data
()
{
props
:
[
"totalNum"
],
data
()
{
return
{
currentPage
:
1
,
page_size
:
20
}
}
;
},
methods
:
{
handleSizeChange
(
size
)
{
handleSizeChange
(
size
)
{
console
.
log
(
`每页
${
size
}
条`
);
this
.
$emit
(
'update'
,
{
page_size
:
size
})
this
.
$emit
(
"update"
,
{
page_size
:
size
});
},
handleCurrentChange
(
pageIndex
)
{
handleCurrentChange
(
pageIndex
)
{
console
.
log
(
`当前页:
${
pageIndex
}
`
);
this
.
$emit
(
'update'
,
{
page
:
pageIndex
})
this
.
$emit
(
"update"
,
{
page
:
pageIndex
});
}
}
,
}
}
}
;
</
script
>
<
style
lang=
"less"
>
.block {
...
...
src/service/Groupmeal/groupmeal.js
View file @
ad03eeb0
import
axios
from
"@/utils/request"
;
import
{
handlerSuccessResponse
}
from
"@/utils/handlerResponse"
;
// 获取主页配送员列表
export
async
function
getList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/order/deliverer/list_day_deliverer_conf"
,
params
);
export
async
function
getList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/order/deliverer/list_day_deliverer_conf"
,
params
);
return
res
;
}
}
// 获取分配配送员列表
export
async
function
getDelivererList
(
params
)
{
const
res
=
await
axios
.
post
(
...
...
@@ -26,6 +30,17 @@ export async function getSaveDeliverer(params) {
);
return
res
;
}
// 下载配送路线 -lh
export
async
function
getDeliveryRoutes
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/order/deliverer/build_plan"
,
params
);
return
handlerSuccessResponse
(
res
);
}
// 查看邮件记录 -lh
export
async
function
getEmailRecords
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/order/deliverer/plan_down_log"
,
params
);
//return Promise.reject(res);
return
handlerSuccessResponse
(
res
);
}
// 老订单管理
...
...
@@ -53,7 +68,7 @@ export async function getGoodsList(params) {
// 获取自提点
export
async
function
getSubShopList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/oldbackground/sub_shop_list"
,{
const
res
=
await
axios
.
get
(
"/api/v1/order/oldbackground/sub_shop_list"
,
{
params
});
return
res
;
...
...
@@ -98,9 +113,12 @@ export async function refundOrder(orderId, itemsToRefund) {
// 订单驳回
export
async
function
orderRefundReject
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/oldbackground/order_refund_reject"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/oldbackground/order_refund_reject"
,
{
params
});
}
);
return
res
;
}
...
...
@@ -129,23 +147,31 @@ export async function newGetOrderList(params) {
// 获取活动名称
export
async
function
newGetMarketingList
()
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_condition_marketing_list"
);
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_condition_marketing_list"
);
return
res
;
}
// 获取商品名称
export
async
function
newGetGoodsList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_condition_goods_list"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_condition_goods_list"
,
{
params
});
}
);
return
res
;
}
// 获取自提点
export
async
function
newGetSubShopList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_condition_take_place_list"
,{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_condition_take_place_list"
,
{
params
});
}
);
return
res
;
}
...
...
src/utils/handlerResponse.js
0 → 100644
View file @
ad03eeb0
export
const
handlerSuccessResponse
=
async
response
=>
{
if
(
!
response
||
response
.
code
!==
0
)
{
return
Promise
.
reject
(
response
.
reason
);
}
return
Promise
.
resolve
(
response
);
};
src/utils/tools.js
0 → 100644
View file @
ad03eeb0
//验证邮箱合法性 (验证头部信息)
export
const
checkEmailName
=
emailName
=>
{
let
str
=
/
[
a-zA-Z0-9_-
]
+/
;
if
(
!
str
.
test
(
emailName
))
{
return
false
;
}
else
{
return
true
;
}
};
vue.config.js
View file @
ad03eeb0
...
...
@@ -52,15 +52,6 @@ module.exports = {
lintOnSave
:
false
,
configureWebpack
:
{
devServer
:
{
proxy
:
{
'/api'
:
{
target
:
`http://bp-test.ini.yidian-inc.com/ksy/ks3apiunencrypt/ks3api_upload`
,
changeOrigin
:
true
,
pathRewrite
:
{
'^/api'
:
''
}
},
},
proxy
:
"http://127.0.0.1:8055"
,
//http://localhost:8055
hot
:
true
,
disableHostCheck
:
true
,
...
...
@@ -75,7 +66,7 @@ module.exports = {
plugins
,
},
chainWebpack
:
config
=>
{
// 默认不开启
c
// 默认不开启
prefetch
config
.
plugins
.
delete
(
"prefetch"
);
// 默认不开启 preload
...
...
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