Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
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
new-sing
admin-base
Commits
4a30b10d
Commit
4a30b10d
authored
Aug 20, 2019
by
chenyishuai@singsingenglish.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
7c21be31
d29b945e
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
680 additions
and
133 deletions
+680
-133
index.js
config/index.js
+14
-1
App.vue
src/App.vue
+6
-2
dialog.vue
src/components/disposable/dialog.vue
+117
-0
index.vue
src/components/disposable/index.vue
+328
-0
receiveInfoDialog.vue
src/components/disposable/receiveInfoDialog.vue
+72
-0
index.vue
src/components/logistics/index.vue
+25
-28
receiveInfoDialog.vue
src/components/logistics/receiveInfoDialog.vue
+4
-2
role.vue
src/components/system/role.vue
+1
-1
api.js
src/service/api.js
+8
-0
menuList.js
src/util/menuList.js
+14
-8
wordbook.js
src/util/wordbook.js
+91
-91
No files found.
config/index.js
View file @
4a30b10d
...
...
@@ -4,6 +4,19 @@
const
path
=
require
(
'path'
);
function
getIP
()
{
var
interfaces
=
require
(
'os'
).
networkInterfaces
();
for
(
var
devName
in
interfaces
)
{
var
iface
=
interfaces
[
devName
];
for
(
var
i
=
0
;
i
<
iface
.
length
;
i
++
)
{
var
alias
=
iface
[
i
];
if
(
alias
.
family
===
'IPv4'
&&
alias
.
address
!==
'127.0.0.1'
&&
!
alias
.
internal
)
{
return
alias
.
address
;
}
}
}
}
module
.
exports
=
{
dev
:
{
// Paths
...
...
@@ -18,7 +31,7 @@ module.exports = {
}
},
// Various Dev Server settings
host
:
'localhost'
,
// can be overwritten by process.env.HOST
host
:
getIP
()
,
// can be overwritten by process.env.HOST
port
:
8080
,
// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser
:
false
,
errorOverlay
:
true
,
...
...
src/App.vue
View file @
4a30b10d
...
...
@@ -148,13 +148,17 @@
}
}
.el-form {
font-size: 0;
}
.el-form--inline, &.el-form--inline {
.el-form-item {
margin-right:
0
;
margin-right:
@gutterSize
;
margin-bottom: @gutterSize;
& + .el-form-item {
margin-left: @gutterSize;
//
margin-left: @gutterSize;
}
}
}
...
...
src/components/disposable/dialog.vue
0 → 100644
View file @
4a30b10d
<
template
>
<el-dialog
title=
"编辑"
append-to-body
:visible
.
sync=
"dialogObj.show"
width=
"800px"
>
<el-form
label-width=
"100px"
style=
"margin-top: 20px;"
>
<el-form-item
label=
"收货人"
required
>
<el-input
v-model=
"form.receive_name"
type=
"text"
></el-input>
</el-form-item>
<el-form-item
label=
"收货手机号"
required
>
<el-input
v-model=
"form.receive_mobile"
type=
"text"
></el-input>
</el-form-item>
<el-form-item
label=
"收货地址"
required
>
<el-input
v-model=
"form.receive_address"
type=
"text"
></el-input>
</el-form-item>
<el-form-item
label=
"物流状态"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
:label=
"0"
>
待发货
</el-radio>
<el-radio
:label=
"1"
>
已发货
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"物流单号"
>
<el-input
v-model=
"form.express_no"
type=
"text"
></el-input>
</el-form-item>
<el-form-item
label=
"物流名称"
>
<el-input
v-model=
"form.express_name"
type=
"text"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogObj.show = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"saveAddress"
>
保 存
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
putDisposableApi
}
from
"../../service/api"
;
export
default
{
name
:
"dialogObj"
,
props
:
[
'dialogObj'
],
data
()
{
return
{
form
:
{
}
}
},
watch
:
{
'dialogObj.show'
:
{
deep
:
true
,
handler
:
function
()
{
console
.
log
(
this
.
dialogObj
)
this
.
form
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
dialogObj
))
}
}
},
methods
:
{
saveAddress
()
{
if
(
!
this
.
form
.
receive_name
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请输入收货人名'
});
return
}
if
(
!
this
.
form
.
receive_mobile
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请输入收货手机号'
});
return
}
if
(
!
this
.
form
.
receive_address
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请输入收货地址'
});
return
}
this
.
$confirm
(
'确定保存?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
json
=
{
deliver_id
:
this
.
form
.
id
,
receive_address
:
this
.
form
.
receive_address
,
receive_name
:
this
.
form
.
receive_name
,
receive_mobile
:
this
.
form
.
receive_mobile
,
express_no
:
this
.
form
.
express_no
,
express_name
:
this
.
form
.
express_name
,
status
:
this
.
form
.
status
};
//this.form.express_no ? json.express_no = this.form.express_no : '';
//this.form.express_name ? json.express_name = this.form.express_name : '';
putDisposableApi
(
this
.
form
.
id
,
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功'
});
this
.
dialogObj
.
show
=
false
;
this
.
$emit
(
"reflash"
);
});
})
},
},
mounted
()
{
console
.
log
(
this
.
dialogObj
)
}
}
</
script
>
src/components/disposable/index.vue
0 → 100644
View file @
4a30b10d
This diff is collapsed.
Click to expand it.
src/components/disposable/receiveInfoDialog.vue
0 → 100644
View file @
4a30b10d
<
template
>
<el-dialog
:visible
.
sync=
"showFlag"
width=
"800px"
center
title=
"按期数导出收货信息"
>
<el-form
label-width=
"150px"
>
<el-form-item
label=
"期数"
>
<el-cascader
:options=
"goodsList"
:props=
"
{value:'id',label:'name'}"
@active-item-change="handleItemChange"
@change="changePeriods"
v-model="selectedGoods"
>
</el-cascader>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelClick"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"onAdd"
>
确 定
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
import
{
getPeriodsApi
,
exportReceiveInfoApi
}
from
"../../service/api"
;
export
default
{
name
:
"receiveInfoDialog"
,
props
:
[
"showFlag"
,
"goodsList"
,
"cancelEvent"
,
"sureEvent"
],
data
()
{
return
{
selectedGoods
:
[]
};
},
methods
:
{
cancelClick
()
{
this
.
cancelEvent
();
},
onAdd
()
{
if
(
this
.
periods
&&
this
.
periods
.
id
)
{
this
.
exportReceiveInfo
().
then
(()
=>
{
this
.
sureEvent
();
});
}
else
{
Vue
.
prototype
.
$msgbox
({
message
:
"请选择期数"
,
type
:
"warning"
});
}
},
exportReceiveInfo
()
{
return
exportReceiveInfoApi
(
this
.
periods
.
id
);
},
changePeriods
(
data
)
{
if
(
data
.
length
>
1
)
{
this
.
goods_id
=
data
[
0
];
let
nowGoods
=
this
.
goodsList
.
find
(
i
=>
{
return
i
.
id
===
data
[
0
];
});
this
.
periods
=
nowGoods
.
children
.
find
(
i
=>
{
return
i
.
id
===
data
[
1
];
});
}
},
handleItemChange
(
val
)
{
getPeriodsApi
({
goods_id
:
val
[
0
],
limit
:
100
}).
then
(
res
=>
{
res
.
list
.
forEach
(
i
=>
{
i
.
name
=
i
.
title
;
});
this
.
goodsList
.
find
(
i
=>
{
return
i
.
id
===
val
[
0
];
}).
children
=
res
.
list
;
});
}
}
};
</
script
>
src/components/logistics/index.vue
View file @
4a30b10d
<
template
>
<div
class=
"admin-refresh
sms
"
>
<div
class=
"admin-refresh"
>
<div
class=
"section-search"
>
<el-form
ref=
"searchFrom"
:model=
"searchFrom"
label-width=
"100px"
inline
size=
"small"
>
<el-form-item
label=
"用户ID"
>
<el-input
v-model=
"searchFrom.user_id"
style=
"width:
80px
"
></el-input>
<el-form-item>
<el-input
v-model=
"searchFrom.user_id"
style=
"width:
100px"
placeholder=
"用户ID
"
></el-input>
</el-form-item>
<!--
<el-form-item
label=
"发货状态"
>
<el-select
filterable
v-model=
"searchFrom.type"
placeholder=
"请选择"
clearable
>
...
...
@@ -15,8 +15,9 @@
</el-option>
</el-select>
</el-form-item>
-->
<el-form-item
label=
"期数"
>
<el-form-item>
<el-cascader
placeholder=
"请选择期数"
:popper-class=
"'refresh-cascader-multi width-480'"
style=
"width: 480px"
:options=
"goodsList"
...
...
@@ -26,28 +27,28 @@
filterable
v-model="selectedGoods">
</el-cascader>
</el-form-item>
<el-form-item
label=
"主题"
>
<el-select
filterable
v-model=
"searchFrom.theme_id"
placeholder=
"请选择"
clearable
>
<el-form-item>
<el-select
filterable
v-model=
"searchFrom.theme_id"
placeholder=
"请选择
主题
"
clearable
>
<el-option
v-for=
"(data,index) in themeList"
:key=
"index"
:label=
"data.name"
:value=
"data.id"
></el-option>
:value=
"data.id"
></el-option>
</el-select>
</el-form-item>
<!--
<el-form-item
label=
"期数id"
>
<el-input
v-model=
"searchFrom.periods_id"
style=
"width: 120px"
></el-input>
</el-form-item>
-->
<el-form-item>
<div
class=
"search-btn-wrapper"
>
<el-button
type=
"primary"
plain
@
click=
"getList"
>
搜索
</el-button>
<el-button
type=
"success"
plain
@
click=
"reset"
>
重置
</el-button>
<el-button
v-if=
"!$store.state.readonly"
type=
"primary"
plain
@
click=
"downLoad()"
>
excel模板下载
</el-button>
<el-button
type=
"primary"
plain
@
click=
"exportTable"
v-if=
"$store.state.export"
>
导出当前待发货
</el-button>
<el-button
type=
"primary"
plain
@
click=
"exportReceiveInfoTable"
>
按期数导出收货信息
</el-button>
</el-form-item>
<el-form-item
v-if=
"$store.state.import"
>
<el-upload
style=
"margin-left: 10px;"
v-if=
"$store.state.import"
:show-file-list=
"false"
:onSuccess=
"fileSuccess"
:headers=
"uploadHeader"
...
...
@@ -55,6 +56,7 @@
action="/api/admin/order/deliver/list/import">
<el-button
type=
"success"
plain
>
导入发货信息
</el-button>
</el-upload>
</div>
</el-form-item>
</el-form>
</div>
...
...
@@ -436,16 +438,11 @@ export default {
.sms
{
padding
:
20px
0
;
}
.el-button
+
.el-button
{
margin-left
:
0
;
/* margin-top: 10px; */
}
.avatar
{
width
:
50px
;
min-width
:
50px
;
margin-right
:
10px
;
height
:
50px
;
border-radius
:
50%
;
}
</
style
>
...
...
src/components/logistics/receiveInfoDialog.vue
View file @
4a30b10d
...
...
@@ -23,7 +23,9 @@ export default {
name
:
"receiveInfoDialog"
,
props
:
[
"showFlag"
,
"goodsList"
,
"cancelEvent"
,
"sureEvent"
],
data
()
{
return
{};
return
{
selectedGoods
:
[]
};
},
methods
:
{
cancelClick
()
{
...
...
src/components/system/role.vue
View file @
4a30b10d
...
...
@@ -88,7 +88,7 @@
limit
:
10
,
roleList
:
[],
exportMenuList
:
[
// 导出权限
'2-3'
,
'5-10'
,
'5-2'
,
'5-1'
,
'5-3'
,
'5-8'
,
'5-9'
,
'3-1'
,
'7-9'
,
'6-3'
,
'10-8'
'2-3'
,
'5-10'
,
'5-2'
,
'5-1'
,
'5-3'
,
'5-8'
,
'5-9'
,
'
6-4'
,
'
3-1'
,
'7-9'
,
'6-3'
,
'10-8'
],
dialog
:
{
title
:
'新增角色'
,
...
...
src/service/api.js
View file @
4a30b10d
...
...
@@ -1210,6 +1210,14 @@ export const delStarActivityV2PeriodApi = function (periods_id) {
export
const
getDeliverListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`api/admin/order/deliver/list`
,
json
)
};
// 获取一次性物流信息
export
const
getDisposableApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/deliver/once/list`
,
json
)
};
// 编辑一次性物流信息
export
const
putDisposableApi
=
function
(
id
,
json
)
{
return
Vue
.
prototype
.
$put
(
`
${
_baseUrl
}
api/admin/deliver/once/
${
id
}
`
,
json
)
};
//主题列表
export
const
getThemeListApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`api/admin/course/theme/list`
,
json
)
...
...
src/util/menuList.js
View file @
4a30b10d
...
...
@@ -427,8 +427,7 @@ export default [{
},
]
},
{
},
{
name
:
''
,
value
:
'实物管理'
,
icon
:
'icon-shu'
,
...
...
@@ -442,8 +441,7 @@ export default [{
name
:
'single'
,
component
:
e
=>
require
([
'@/components/single'
],
e
),
}
},
{
},
{
value
:
'盒子列表'
,
routerName
:
'box'
,
path
:
'/box'
,
...
...
@@ -453,8 +451,7 @@ export default [{
name
:
'box'
,
component
:
e
=>
require
([
'@/components/box'
],
e
),
}
},
{
},{
value
:
'待发货列表'
,
routerName
:
'logistics'
,
path
:
'/logistics'
,
...
...
@@ -464,8 +461,17 @@ export default [{
name
:
'logistics'
,
component
:
e
=>
require
([
'@/components/logistics'
],
e
),
}
},
]
},{
value
:
'一次性物流信息'
,
routerName
:
'disposable'
,
path
:
'/disposable'
,
cover
:
'6-4'
,
router
:
{
path
:
'/disposable'
,
name
:
'disposable'
,
component
:
e
=>
require
([
'@/components/disposable'
],
e
),
}
}]
},
{
name
:
''
,
value
:
'公众号'
,
...
...
src/util/wordbook.js
View file @
4a30b10d
export
const
ADMINSTATUS
=
{
'0'
:
'启用'
,
'1'
:
'冻结'
'0'
:
'启用'
,
'1'
:
'冻结'
};
export
const
TEACHERTYPE
=
{
'0'
:
'老师'
,
'1'
:
'新星妈妈'
,
'2'
:
'推广人'
,
'3'
:
'市场'
'0'
:
'老师'
,
'1'
:
'新星妈妈'
,
'2'
:
'推广人'
,
'3'
:
'市场'
};
export
const
LESSONTYPE
=
{
'0'
:
'月课'
,
'1'
:
'日课'
export
const
LESSONTYPE
=
{
'0'
:
'月课'
,
'1'
:
'日课'
};
export
const
GOODSTYPE
=
{
'1'
:
'普通商品'
,
'2'
:
'团购商品'
,
'3'
:
'续课商品'
,
'4'
:
'优惠券商品'
,
'5'
:
'实物商品'
,
'1'
:
'普通商品'
,
'2'
:
'团购商品'
,
'3'
:
'续课商品'
,
'4'
:
'优惠券商品'
,
'5'
:
'实物商品'
,
};
export
const
ISORNOT
=
{
'0'
:
'否'
,
'1'
:
'是'
'0'
:
'否'
,
'1'
:
'是'
};
export
const
GOODSSTATUS
=
{
'0'
:
'编辑中'
,
'1'
:
'在售'
,
'2'
:
'下架'
'0'
:
'编辑中'
,
'1'
:
'在售'
,
'2'
:
'下架'
};
export
const
WEEKDAY
=
{
0
:
'周日'
,
...
...
@@ -38,21 +38,21 @@ export const WEEKDAY = {
6
:
'周六'
};
export
const
INVITETYPE
=
{
0
:
'用户'
,
1
:
'老师'
,
2
:
'推广渠道'
0
:
'用户'
,
1
:
'老师'
,
2
:
'推广渠道'
};
export
const
ORDERSTATUS
=
{
0
:
'待付款'
,
1
:
'付款成功'
,
2
:
'付款失败'
,
3
:
'退款成功'
,
4
:
'拼团成功'
,
5
:
'部分退款'
0
:
'待付款'
,
1
:
'付款成功'
,
2
:
'付款失败'
,
3
:
'退款成功'
,
4
:
'拼团成功'
,
5
:
'部分退款'
};
export
const
BUYTYPE
=
{
1
:
'单买'
,
2
:
'团购'
1
:
'单买'
,
2
:
'团购'
};
export
const
BUYTYPEOPTION
=
[
{
...
...
@@ -88,12 +88,12 @@ export const BUYWay = [
},
]
export
const
BUYTYPEWAY
=
{
'1'
:
'微信'
,
'2'
:
'支付宝'
,
'4'
:
'京东'
,
'3'
:
'云集'
,
'100'
:
'其他'
,
'0'
:
'其他'
,
'1'
:
'微信'
,
'2'
:
'支付宝'
,
'4'
:
'京东'
,
'3'
:
'云集'
,
'100'
:
'其他'
,
'0'
:
'其他'
,
};
export
const
ORDERSTATUSOPTION
=
[
{
...
...
@@ -136,20 +136,20 @@ export const INVITETYPEOPTION = [
}
];
export
const
QRTYPE
=
{
1
:
'永久'
,
2
:
'临时'
1
:
'永久'
,
2
:
'临时'
};
export
const
QRCODETYPE
=
{
1
:
'渠道'
,
2
:
'用户'
1
:
'渠道'
,
2
:
'用户'
};
export
const
QRSTATUS
=
{
0
:
'正常'
,
1
:
'禁用'
0
:
'正常'
,
1
:
'禁用'
};
export
const
ISLEADER
=
{
0
:
'否'
,
1
:
'是'
0
:
'否'
,
1
:
'是'
};
export
const
ISLEADEROPTION
=
[
{
...
...
@@ -161,62 +161,62 @@ export const ISLEADEROPTION = [
value
:
'是'
},
];
export
const
INTEGRALTYPE
=
{
0
:
'减少积分'
,
1
:
'添加积分'
export
const
INTEGRALTYPE
=
{
0
:
'减少积分'
,
1
:
'添加积分'
};
export
const
INTEGRALFUN
=
{
0
:
'看课加积分'
,
1
:
'分享加积分'
,
2
:
'邀约报课加积分'
,
3
:
'后台手动加积分'
,
4
:
'后台手动减积分'
,
export
const
INTEGRALFUN
=
{
0
:
'看课加积分'
,
1
:
'分享加积分'
,
2
:
'邀约报课加积分'
,
3
:
'后台手动加积分'
,
4
:
'后台手动减积分'
,
};
export
const
CLASSSOURCE
=
{
1
:
'所有来源随机'
,
2
:
'系统订单随机'
,
3
:
'渠道1订单随机'
,
4
:
'渠道2订单随机'
,
5
:
'渠道3订单随机'
,
6
:
'渠道4订单随机'
,
7
:
'渠道5订单随机'
,
8
:
'渠道6订单随机'
,
1
:
'所有来源随机'
,
2
:
'系统订单随机'
,
3
:
'渠道1订单随机'
,
4
:
'渠道2订单随机'
,
5
:
'渠道3订单随机'
,
6
:
'渠道4订单随机'
,
7
:
'渠道5订单随机'
,
8
:
'渠道6订单随机'
,
};
export
const
USERSTATUS
=
[
{
code
:
0
,
lable
:
'待处理'
},
{
code
:
1
,
lable
:
'手机号不是微信号'
},
{
code
:
2
,
lable
:
'待通过'
},
{
code
:
3
,
lable
:
'已加微信未激活'
},
{
code
:
4
,
lable
:
'第一次电话无人接/挂断/关机'
},
{
code
:
5
,
lable
:
'第二次电话无人接/挂断/关机'
},
{
code
:
6
,
lable
:
'第三次电话无人接/挂断/关机'
},
{
code
:
7
,
lable
:
'用户已拒绝'
},
{
code
:
8
,
lable
:
'手机号是空号'
},
{
code
:
9
,
lable
:
'已激活'
}
{
code
:
0
,
lable
:
'待处理'
},
{
code
:
1
,
lable
:
'手机号不是微信号'
},
{
code
:
2
,
lable
:
'待通过'
},
{
code
:
3
,
lable
:
'已加微信未激活'
},
{
code
:
4
,
lable
:
'第一次电话无人接/挂断/关机'
},
{
code
:
5
,
lable
:
'第二次电话无人接/挂断/关机'
},
{
code
:
6
,
lable
:
'第三次电话无人接/挂断/关机'
},
{
code
:
7
,
lable
:
'用户已拒绝'
},
{
code
:
8
,
lable
:
'手机号是空号'
},
{
code
:
9
,
lable
:
'已激活'
}
]
export
const
USERSTATUSFORMATER
=
{
0
:
'待处理'
,
1
:
'手机号不是微信号'
,
2
:
'待通过'
,
3
:
'已加微信未激活'
,
4
:
'第一次电话无人接/挂断/关机'
,
5
:
'第二次电话无人接/挂断/关机'
,
6
:
'第三次电话无人接/挂断/关机'
,
7
:
'用户已拒绝'
,
8
:
'手机号是空号'
,
9
:
'已激活'
,
0
:
'待处理'
,
1
:
'手机号不是微信号'
,
2
:
'待通过'
,
3
:
'已加微信未激活'
,
4
:
'第一次电话无人接/挂断/关机'
,
5
:
'第二次电话无人接/挂断/关机'
,
6
:
'第三次电话无人接/挂断/关机'
,
7
:
'用户已拒绝'
,
8
:
'手机号是空号'
,
9
:
'已激活'
,
};
export
const
externalLaunchStatusParams
=
{
0
:
'待处理'
,
1
:
'已激活'
,
2
:
'假号'
,
3
:
'没兴趣'
0
:
'待处理'
,
1
:
'已激活'
,
2
:
'假号'
,
3
:
'没兴趣'
};
export
const
LogisticsStatus
=
{
0
:
'待发货'
,
1
:
'已发货'
,
2
:
'已签收'
,
3
:
'异常'
0
:
'待发货'
,
1
:
'已发货'
,
2
:
'已签收'
,
3
:
'异常'
};
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