Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manage
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vanke
manage
Commits
6f8a889b
Commit
6f8a889b
authored
Jun 23, 2020
by
wangyalan-git
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统设置
parent
ec845b65
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
267 additions
and
251 deletions
+267
-251
index.js
src/router/index.js
+8
-129
index.vue
src/views/home/index.vue
+1
-1
log.vue
src/views/ums/resource/log.vue
+7
-78
setting.vue
src/views/ums/resource/setting.vue
+102
-0
AdminList.vue
src/views/use/AdminList.vue
+14
-43
AddDepot.vue
src/views/use/modules/AddDepot.vue
+135
-0
No files found.
src/router/index.js
View file @
6f8a889b
...
...
@@ -127,128 +127,7 @@ export const asyncRouterMap = [
hidden
:
true
}]
},
// 设置模块
// {
// path: '/psm',
// component: Layout,
// redirect: '/psm/mallSetup',
// name: 'psm',
// meta: { title: '设置', icon: 'order-setting' },
// children: [{
// path: 'mallSetup',
// name: 'mallSetup',
// component: () => import('@/views/psm/mallSetup'),
// meta: { title: '商城设置', icon: 'login-mall' }
// }, {
// path: 'payWay',
// name: 'payWay',
// component: () => import('@/views/psm/payWay'),
// meta: { title: '支付方式', icon: 'total-today' }
// }, {
// path: 'scheduleTask',
// name: 'scheduleTask',
// component: () => import('@/views/psm/scheduleTask'),
// meta: { title: '计划任务', icon: 'sms-flash' }
// }, {
// path: 'messageSetting',
// name: 'messageSetting',
// component: () => import('@/views/psm/messageSetting'),
// meta: { title: '消息设置', icon: 'example' }
// }, {
// path: 'deliveryWay',
// name: 'deliveryWay',
// component: () => import('@/views/psm/deliveryWay'),
// meta: { title: '配送方式', icon: 'order-return' }
// }, {
// path: 'freightManagement',
// name: 'freightManagement',
// component: () => import('@/views/psm/freightManagement'),
// meta: { title: '运费管理', icon: 'total-yesterday' }
// }, {
// path: 'addTemplate',
// name: 'addTemplate',
// component: () => import('@/views/psm/freightManagement/AddTemplate'),
// meta: { title: '添加新模板', icon: 'product-list' },
// hidden: true
// }, {
// path: 'searchRecord',
// name: 'searchRecord',
// component: () => import('@/views/psm/searchRecord'),
// meta: { title: '检索记录', icon: 'order-return-reason' }
// }, {
// path: 'loginSetting',
// name: 'loginSetting',
// component: () => import('@/views/psm/loginSetting'),
// meta: { title: '三方设置', icon: 'order' }
// }, {
// path: 'articleClassify',
// name: 'articleClassify',
// component: () => import('@/views/psm/articleClassify'),
// meta: { title: '文章分类', icon: 'product-cate' }
// }, {
// path: 'articleManagement',
// name: 'articleManagement',
// component: () => import('@/views/psm/articleManagement'),
// meta: { title: '文章管理', icon: 'order' }
// }, {
// path: 'editArticle',
// name: 'editArticle',
// component: () => import('@/views/psm/articleManagement/EditArticle'),
// meta: { title: '编辑文章', icon: 'product-add' },
// hidden: true
// }, {
// path: 'bannerManagement',
// name: 'bannerManagement',
// component: () => import('@/views/psm/bannerManagement'),
// meta: { title: '广告位置', icon: 'order' }
// }, {
// path: 'bannerList',
// name: 'bannerList',
// component: () => import('@/views/psm/bannerList'),
// meta: { title: '广告列表', icon: 'order' }
// }, {
// path: 'siteManagement',
// name: 'siteManagement',
// component: () => import('@/views/psm/siteManagement'),
// meta: { title: '档口管理', icon: 'order' }
// }, {
// path: 'floorManagement',
// name: 'floorManagement',
// component: () => import('@/views/psm/floorManagement'),
// meta: { title: '楼层管理', icon: 'order' }
// }, {
// path: 'marketMenu',
// name: 'marketMenu',
// component: () => import('@/views/psm/marketMenu'),
// meta: { title: '自定义栏目', icon: 'product-cate' }
// }, {
// path: 'floor',
// name: 'floor',
// component: () => import('@/views/psm/floorManagement/floor'),
// meta: { title: '楼层', icon: 'order' },
// hidden: true
// }, {
// path: 'feedbackClassify',
// name: 'feedbackClassify',
// component: () => import('@/views/psm/feedbackClassify'),
// meta: { title: '反馈分类', icon: 'product-cate' }
// }, {
// path: 'feedbackManagement',
// name: 'feedbackManagement',
// component: () => import('@/views/psm/feedbackManagement'),
// meta: { title: '反馈管理', icon: 'order' }
// }, {
// path: 'flashTimeList',
// name: 'flashTimeList',
// component: () => import('@/views/psm/flashTime'),
// meta: { title: '秒杀时间', icon: 'sms-flash' }
// }, {
// path: 'areaManagement',
// name: 'areaManagement',
// component: () => import('@/views/psm/areaManagement'),
// meta: { title: '地区管理', icon: 'ums-menu' }
// }]
// },
// 权限模块
{
path
:
'/ums'
,
...
...
@@ -322,14 +201,14 @@ export const asyncRouterMap = [
component
:
()
=>
import
(
'@/views/ums/resource/log'
),
meta
:
{
title
:
'操作日志'
,
icon
:
'ums-role'
},
hidden
:
false
},
{
path
:
'setting'
,
name
:
'setting'
,
component
:
()
=>
import
(
'@/views/ums/resource/setting'
),
meta
:
{
title
:
'配置管理'
,
icon
:
'ums-menu'
},
hidden
:
false
}
// {
// path: 'department',
// name: 'department',
// component: () => import('@/views/ums/department/index'),
// meta: { title: '部门管理', icon: 'ums-menu' },
// hidden: false
// }
]
},
...
...
src/views/home/index.vue
View file @
6f8a889b
...
...
@@ -146,7 +146,7 @@ import { str2Date } from '@/utils/date'
const
DATA_FROM_BACKEND
=
{
columns
:
[
'date'
,
'orderCount'
,
'orderAmount'
],
rows
:
[
{
date
:
'2018-11-01'
,
orderCount
:
10
,
orderAmount
:
10
93
},
{
date
:
'2018-11-01'
,
orderCount
:
10
,
orderAmount
:
10
0
},
{
date
:
'2018-11-02'
,
orderCount
:
20
,
orderAmount
:
2230
},
{
date
:
'2018-11-03'
,
orderCount
:
33
,
orderAmount
:
3623
},
{
date
:
'2018-11-04'
,
orderCount
:
50
,
orderAmount
:
6423
},
...
...
src/views/ums/resource/log.vue
View file @
6f8a889b
...
...
@@ -5,11 +5,11 @@
<el-form
:inline=
"true"
:model=
"listQuery"
size=
"small"
>
<el-form-item
label=
"
用户名
:"
>
<el-form-item
label=
"
操作人
:"
>
<el-input
v-model=
"listQuery.name"
placeholder=
"请输入
用户名
"
></el-input>
placeholder=
"请输入
操作人名称
"
></el-input>
</el-form-item>
<el-form-item
label=
"
查看周期
:"
>
<el-form-item
label=
"
操作时间
:"
>
<el-date-picker
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"开始时间"
...
...
@@ -31,64 +31,23 @@
</el-form-item>
</el-form>
<el-divider></el-divider>
<!-- 排序栏 -->
<div
class=
"sort-container"
>
<label>
按
</label>
<el-select
placeholder=
"排序类型"
v-model=
"listQuery.type"
size=
"small"
>
<el-option
v-for=
"item in typeOptions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
<label>
排序
</label>
</div>
<!--列表-->
<div
class=
"table-container"
>
<el-table
:data=
"list"
v-loading=
"listLoading"
border
>
<el-table-column
label=
"序号"
align=
"center"
prop=
"id"
>
</el-table-column>
<el-table-column
label=
"日期"
align=
"center"
:formatter=
"dateFormat"
prop=
"createDate"
>
</el-table-column>
<el-table-column
label=
"时间"
align=
"center"
:formatter=
"timeFormat"
prop=
"createTime"
>
</el-table-column>
<el-table-column
label=
"IP"
align=
"center"
prop=
"ip"
>
</el-table-column>
<el-table-column
label=
"地区"
align=
"center"
prop=
"address"
>
</el-table-column>
<el-table-column
label=
"操作者"
<el-table-column
label=
"操作人"
align=
"center"
prop=
"adminName"
>
</el-table-column>
<el-table-column
label=
"
动作
"
<el-table-column
label=
"
操作内容
"
align=
"center"
prop=
"action"
>
</el-table-column>
<el-table-column
label=
"
功能模块
"
<el-table-column
label=
"
操作时间
"
align=
"center"
prop=
"module"
>
</el-table-column>
<el-table-column
label=
"操作内容"
align=
"center"
prop=
"content"
>
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
...
...
@@ -125,37 +84,7 @@ export default {
total
:
0
,
listLoading
:
false
,
list
:
[],
listQuery
:
Object
.
assign
({},
defaultListQuery
),
typeOptions
:
[
{
id
:
0
,
name
:
'时间日期'
},
{
id
:
1
,
name
:
'IP地址'
},
{
id
:
2
,
name
:
'地区'
},
{
id
:
3
,
name
:
'操作者'
},
{
id
:
4
,
name
:
'动作'
},
{
id
:
5
,
name
:
'功能模块'
},
{
id
:
6
,
name
:
'操作内容'
}
]
listQuery
:
Object
.
assign
({},
defaultListQuery
)
}
},
created
()
{
...
...
src/views/ums/resource/setting.vue
0 → 100644
View file @
6f8a889b
<
template
>
<el-card
class=
"form-container"
shadow=
"never"
>
<el-form
:model=
"orderSetting"
ref=
"orderSettingForm"
:rules=
"rules"
>
<el-form-item
prop=
"orderTimeout"
>
<div>
物品数量少于多少预警(个/件):
</div>
<el-input
v-model=
"orderSetting.orderTimeout"
class=
"input-width"
>
</el-input>
</el-form-item>
<el-form-item
prop=
"receiveTimeout"
>
<div>
物品领用间隔时间(小时):
</div>
<el-input
v-model=
"orderSetting.receiveTimeout"
class=
"input-width"
>
</el-input>
</el-form-item>
<el-form-item>
<el-button
@
click=
"confirm('orderSettingForm')"
type=
"primary"
>
提交
</el-button>
</el-form-item>
</el-form>
</el-card>
</
template
>
<
script
>
import
{
getOrderSetting
,
updateOrderSetting
}
from
'@/api/orderSetting'
;
const
defaultOrderSetting
=
{
id
:
null
,
orderTimeout
:
0
,
receiveTimeout
:
0
,
finishTimeout
:
0
,
};
const
checkTime
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
return
callback
(
new
Error
(
'时间不能为空'
));
}
console
.
log
(
"checkTime"
,
value
);
let
intValue
=
parseInt
(
value
);
if
(
!
Number
.
isInteger
(
intValue
))
{
return
callback
(
new
Error
(
'请输入数字值'
));
}
callback
();
};
export
default
{
name
:
'setting'
,
data
()
{
return
{
orderSetting
:
Object
.
assign
({},
defaultOrderSetting
),
rules
:
{
orderTimeout
:{
validator
:
checkTime
,
trigger
:
'blur'
},
receiveTimeout
:
{
validator
:
checkTime
,
trigger
:
'blur'
},
finishTimeout
:
{
validator
:
checkTime
,
trigger
:
'blur'
}
}
}
},
created
(){
this
.
getDetail
();
},
methods
:{
confirm
(
formName
){
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$confirm
(
'是否要提交修改?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
updateOrderSetting
(
this
.
orderSetting
).
then
(
response
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'提交成功!'
,
duration
:
1000
});
})
});
}
else
{
this
.
$message
({
message
:
'提交参数不合法'
,
type
:
'warning'
});
return
false
;
}
});
},
getDetail
(){
getOrderSetting
().
then
(
response
=>
{
this
.
orderSetting
=
response
.
data
;
})
}
}
}
</
script
>
<
style
scoped
>
.input-width
{
width
:
50%
;
}
.note-margin
{
margin-left
:
15px
;
}
</
style
>
src/views/use/AdminList.vue
View file @
6f8a889b
...
...
@@ -20,11 +20,11 @@
icon=
"el-icon-refresh"
size=
"small"
>
重置
</el-button>
</el-form-item>
<el-button
class=
"btn-add"
size=
"small"
type=
"primary"
@
click=
"handleAdd"
>
添加管理员
</el-button
>
<!--
<el-button
class=
"btn-add"
--
>
<!-- size="small"-->
<!-- type="primary"-->
<!-- @click="handleAdd">添加管理员-->
<!--
</el-button>
--
>
</el-form>
</el-card>
<!-- 表格栏 -->
...
...
@@ -64,6 +64,9 @@
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"success"
@
click=
"addDepot(scope.row)"
>
添加库房
</el-button>
<el-button
size=
"mini"
type=
"success"
@
click=
"lookDetail(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
...
...
@@ -84,15 +87,15 @@
</el-card>
<!-- end -->
<!-- 弹窗 -->
<add-
supplier
ref=
"addSupplier
"
@
ok=
"getList"
></add-
supplier
>
<add-
depot
ref=
"addDepot
"
@
ok=
"getList"
></add-
depot
>
<!-- end -->
</div>
</template>
<
script
>
import
moment
from
'moment'
import
{
getSupplier
,
getAuditDetail
,
updateMcht
}
from
'@/api/audit'
import
Add
Supplier
from
'./modules/AddAdmin
'
import
Add
Depot
from
'./modules/AddDepot
'
// 列表查询参数默认值
const
defaultListQuery
=
{
pageNum
:
1
,
...
...
@@ -117,7 +120,7 @@ const defaultStatusOptions = [
// 管理员入驻账号列表
export
default
{
name
:
'AdminList'
,
components
:
{
Add
Supplier
},
components
:
{
Add
Depot
},
data
()
{
return
{
listQuery
:
Object
.
assign
({},
defaultListQuery
),
...
...
@@ -183,41 +186,9 @@ export default {
this
.
listLoading
=
false
})
},
handleStatus
(
row
)
{
// 账号禁用
if
(
row
.
status
==
0
)
{
this
.
$confirm
(
'确定启用该账号'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
//启用接口
this
.
updateMcht
(
row
,
1
)
})
}
else
if
(
row
.
status
==
1
)
{
this
.
$confirm
(
'确定禁用该账号?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
//禁用接口
this
.
updateMcht
(
row
,
0
)
})
}
},
//管理员账户启用/禁用
updateMcht
(
row
,
status
)
{
let
params
=
{
id
:
row
.
id
,
status
:
status
}
updateMcht
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
status
==
1
?
'启用成功'
:
'禁用成功'
)
this
.
getList
()
})
},
// 查看
lookDetail
(
row
)
{
row
.
audit
=
false
row
.
flag
=
true
this
.
$router
.
push
({
name
:
'distributorDetail'
,
params
:
row
})
addDepot
(
row
)
{
this
.
$refs
.
addDepot
.
add
()
},
//编辑
editDetail
(
id
)
{
...
...
src/views/use/modules/AddDepot.vue
0 → 100644
View file @
6f8a889b
<
template
>
<el-dialog
:visible
.
sync=
"visible"
:title=
"title"
center
width=
"720px"
>
<!-- start -->
<el-form
:model=
"model"
ref=
"myForm"
v-loading=
"loading"
label-width=
"200px"
>
<div
class=
"scroll-container"
ref=
"scrollContainer"
>
<el-form-item
label=
"库房:"
prop=
"cycleType"
:rules=
"[
{ required: true, trigger: 'blur', message: '请选择库房' }]">
<el-select
size=
"small"
class=
"input-width"
v-model=
"model.cycleType"
>
<el-option
v-for=
"item in cycleOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
</div>
</el-form>
<div
slot=
"footer"
>
<el-button
type=
"primary"
@
click=
"submit"
>
确认
</el-button>
<el-button
@
click=
"close"
>
取消
</el-button>
</div>
<!-- end -->
</el-dialog>
</
template
>
<
script
>
import
{
addMember
,
getSupplierDetail
,
updateMcht
}
from
'@/api/audit'
// 添加编辑属性
export
default
{
name
:
'AddAdmin'
,
data
()
{
return
{
visible
:
false
,
title
:
null
,
loading
:
false
,
id
:
null
,
model
:
{},
cycleOptions
:
[{
value
:
1
,
label
:
'7天'
},
{
value
:
2
,
label
:
'15天'
},
{
value
:
3
,
label
:
'30天'
}]
}
},
methods
:
{
init
()
{
this
.
model
=
{
cycleType
:
null
}
this
.
$nextTick
(()
=>
{
this
.
$refs
.
myForm
.
clearValidate
()
this
.
$refs
.
scrollContainer
.
scrollTop
=
0
})
},
add
()
{
this
.
id
=
null
this
.
init
()
this
.
visible
=
true
this
.
title
=
'添加库房'
},
detail
(
id
)
{
this
.
id
=
id
this
.
init
()
this
.
visible
=
true
this
.
title
=
'编辑管理员'
this
.
loading
=
true
getSupplierDetail
({
id
:
id
}).
then
(
res
=>
{
this
.
model
=
res
.
data
this
.
loading
=
false
}).
catch
(
err
=>
{
this
.
loading
=
false
this
.
close
()
})
},
// 提交保存
submit
()
{
this
.
$refs
.
myForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
// 验证通过
if
(
this
.
id
)
{
// 修改属性
this
.
loading
=
true
updateMcht
(
this
.
model
).
then
(
res
=>
{
this
.
loading
=
false
this
.
visible
=
false
this
.
$emit
(
'ok'
)
}).
catch
(
err
=>
{
this
.
loading
=
false
})
}
else
{
// 添加属性
this
.
loading
=
true
addMember
(
this
.
model
).
then
(
res
=>
{
this
.
loading
=
false
this
.
visible
=
false
this
.
$emit
(
'ok'
)
}).
catch
(
err
=>
{
this
.
loading
=
false
})
}
}
})
},
close
()
{
this
.
$emit
(
'close'
)
this
.
visible
=
false
}
}
}
</
script
>
<
style
scoped
>
.scroll-container
{
max-height
:
50vh
;
overflow
:
hidden
;
overflow-y
:
auto
;
}
.input-width
{
width
:
300px
;
}
.tip
{
color
:
#999
;
font-size
:
12px
;
}
</
style
>
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