Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
newShopFront
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
newshop
newShopFront
Commits
2f6b6563
Commit
2f6b6563
authored
Nov 20, 2019
by
邓学云
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11.20 16:20 丢失后重写的
parent
4fc70da0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
361 additions
and
15 deletions
+361
-15
store.js
src/api/store.js
+24
-0
token.js
src/api/token.js
+1
-1
userstaff.js
src/api/userstaff.js
+14
-0
components_use.js
src/core/lazy_lib/components_use.js
+3
-1
storeManage.vue
src/views/storedc/storeManage.vue
+281
-0
uList.vue
src/views/userstaff/uList.vue
+38
-13
No files found.
src/api/store.js
View file @
2f6b6563
...
@@ -75,6 +75,30 @@ export function deleteEvaluate (id) {
...
@@ -75,6 +75,30 @@ export function deleteEvaluate (id) {
}
}
})
})
}
}
// 门店管理
// 获取门店列表
export
function
getStoreList
(
parameter
)
{
return
axios
({
url
:
homeUrl
+
'branch/branches/branch-list'
,
method
:
'get'
,
headers
:
{
"Authorization"
:
loginToken
},
params
:
parameter
})
}
// 加载省市区
export
function
loadAddress
(
parameter
)
{
console
.
log
(
'省市区'
,
parameter
)
return
axios
({
url
:
homeUrl
+
'common/shop-transport-areas/area'
,
method
:
'get'
,
params
:
parameter
,
headers
:
{
"Authorization"
:
loginToken
}
})
}
/**
/**
...
...
src/api/token.js
View file @
2f6b6563
const
loginToken
=
"Bearer
EHtB5oGwObjgdUSgSYRY8Lr_QA8lV_NZ
"
;
const
loginToken
=
"Bearer
OflP6WaCRGeFe5byEqXDWMCh_1aYJmHS
"
;
export
default
loginToken
export
default
loginToken
\ No newline at end of file
src/api/userstaff.js
View file @
2f6b6563
...
@@ -102,6 +102,9 @@ export function getUListDetails (id) {
...
@@ -102,6 +102,9 @@ export function getUListDetails (id) {
}
}
// 修改用户列表
// 修改用户列表
export
function
UListModify
(
parameter
)
{
export
function
UListModify
(
parameter
)
{
if
(
parameter
.
CREATE_DATE
){
parameter
.
CREATE_DATE
=
parameter
.
CREATE_DATE
.
format
(
'YYYY-MM-DD'
)
}
return
axios
({
return
axios
({
url
:
homeUrl
+
'shopuser/shop-user-lists/user-update'
,
url
:
homeUrl
+
'shopuser/shop-user-lists/user-update'
,
method
:
'post'
,
method
:
'post'
,
...
@@ -111,6 +114,17 @@ export function UListModify (parameter) {
...
@@ -111,6 +114,17 @@ export function UListModify (parameter) {
}
}
})
})
}
}
// 获取用户组列表
export
function
getUGroupList
()
{
return
axios
({
url
:
homeUrl
+
'shopuser/shop-user-lists/get-member-grade-list'
,
method
:
'get'
,
headers
:
{
"Authorization"
:
loginToken
}
})
}
/**
/**
* get user 2step code open?
* get user 2step code open?
...
...
src/core/lazy_lib/components_use.js
View file @
2f6b6563
...
@@ -46,7 +46,8 @@ import {
...
@@ -46,7 +46,8 @@ import {
Skeleton
,
Skeleton
,
Popconfirm
,
Popconfirm
,
message
,
message
,
notification
notification
,
Cascader
}
from
'ant-design-vue'
}
from
'ant-design-vue'
// import VueCropper from 'vue-cropper'
// import VueCropper from 'vue-cropper'
...
@@ -89,6 +90,7 @@ Vue.use(Skeleton)
...
@@ -89,6 +90,7 @@ Vue.use(Skeleton)
Vue
.
use
(
Popconfirm
)
Vue
.
use
(
Popconfirm
)
// Vue.use(VueCropper)
// Vue.use(VueCropper)
Vue
.
use
(
notification
)
Vue
.
use
(
notification
)
Vue
.
use
(
Cascader
)
Vue
.
prototype
.
$confirm
=
Modal
.
confirm
Vue
.
prototype
.
$confirm
=
Modal
.
confirm
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
$message
=
message
...
...
src/views/storedc/storeManage.vue
View file @
2f6b6563
<
template
>
<a-card
:bordered=
"false"
>
<div>
<div
class=
"table-page-search-wrapper"
>
<a-form
:form=
'formCheck'
layout=
"inline"
>
<a-row
:gutter=
"48"
>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"门店名称编码"
>
<a-input
v-model=
"queryParam.CODE"
placeholder=
"请输入"
/>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"是否营业"
>
<a-select
v-model=
"queryParam.IS_SHELVE"
placeholder=
"请选择"
>
<a-select-option
value=
"0"
>
否
</a-select-option>
<a-select-option
value=
"1"
>
是
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<template
v-if=
"advanced"
>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"是否医保"
>
<a-select
v-model=
"queryParam.IS_CARE"
placeholder=
"请选择"
>
<a-select-option
value=
"0"
>
否
</a-select-option>
<a-select-option
value=
"1"
>
是
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"省市区"
>
<a-cascader
changeOnSelect
:fieldNames=
"addressFields"
:options=
'addressOptions'
:loadData=
"loadChildren"
placeholder=
"请选择地址"
></a-cascader>
</a-form-item>
</a-col>
<!--
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"省份"
>
<a-select
v-model=
"queryParam.BINDCARD"
placeholder=
"请选择"
>
<a-select-option
value=
"0"
>
否
</a-select-option>
<a-select-option
value=
"1"
>
是
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"城市"
>
<a-select
v-model=
"queryParam.BINDCARD"
placeholder=
"请选择"
>
<a-select-option
value=
"0"
>
否
</a-select-option>
<a-select-option
value=
"1"
>
是
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"县区"
>
<a-select
v-model=
"queryParam.BINDCARD"
placeholder=
"请选择"
>
<a-select-option
value=
"0"
>
否
</a-select-option>
<a-select-option
value=
"1"
>
是
</a-select-option>
</a-select>
</a-form-item>
</a-col>
-->
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"是否积分商城门店"
>
<a-select
v-model=
"queryParam.IS_POINTS_SHOP"
placeholder=
"请选择"
>
<a-select-option
value=
"0"
>
否
</a-select-option>
<a-select-option
value=
"1"
>
是
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"是否冷链配送"
>
<a-select
v-model=
"queryParam.IS_DELIVERY_CODECHAIN_GOODS"
placeholder=
"请选择"
>
<a-select-option
value=
"0"
>
否
</a-select-option>
<a-select-option
value=
"1"
>
是
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"是否O2O门店"
>
<a-select
v-model=
"queryParam.IS_O2O"
placeholder=
"请选择"
>
<a-select-option
value=
"0"
>
否
</a-select-option>
<a-select-option
value=
"1"
>
是
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"所属分公司"
>
<a-select
v-model=
"queryParam.BRANCH_TYPE"
placeholder=
"请选择"
>
<a-select-option
value=
"0"
>
否
</a-select-option>
<a-select-option
value=
"1"
>
是
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</
template
>
<a-col
:md=
"!advanced && 8 || 24"
:sm=
"24"
>
<span
class=
"table-page-search-submitButtons"
:style=
"advanced && { float: 'right', overflow: 'hidden' } || {} "
>
<a-button
type=
"primary"
@
click=
"$refs.table.refresh(true)"
>
查询
</a-button>
<a-button
style=
"margin-left: 8px"
@
click=
"() => queryParam = {}"
>
重置
</a-button>
<a
@
click=
"toggleAdvanced"
style=
"margin-left: 8px"
>
{{ advanced ? '收起' : '展开' }}
<a-icon
:type=
"advanced ? 'up' : 'down'"
/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<div
class=
"table-operator"
>
<a-button-group>
<a-button
type=
'primary'
icon=
'edit'
>
修改门店信息
</a-button>
<a-button
style=
"margin-left: 8px"
type=
'primary'
icon=
'download'
>
导出门店
</a-button>
</a-button-group>
</div>
<s-table
ref=
"table"
size=
"default"
:columns=
"columns"
:data=
"loadData"
rowKey=
'GUID'
>
<span
slot=
"action"
slot-scope=
"text, record"
>
<!-- <router-link to="/userstaff/ulist_details"> -->
<a
type=
"primary"
@
click=
"handleEdit(record)"
>
编辑
</a>
<!-- </router-link> -->
</span>
</s-table>
</div>
</a-card>
</template>
<
script
>
import
moment
from
'moment'
import
{
STable
}
from
'@/components'
import
{
getStoreList
,
loadAddress
}
from
'@/api/store'
export
default
{
name
:
'TableList'
,
components
:
{
STable
},
data
()
{
return
{
mdl
:
{},
labelCol
:
{
xs
:
{
span
:
8
},
sm
:
{
span
:
8
}
},
wrapperCol
:
{
xs
:
{
span
:
12
},
sm
:
{
span
:
12
}
},
addressOptions
:[],
addressFields
:{
label
:
'NAME'
,
value
:
'GUID'
,
children
:
'children'
},
visible
:
false
,
size
:
'default'
,
// 高级搜索 展开/关闭
advanced
:
false
,
// 查询参数
queryParam
:
{},
formCheck
:
this
.
$form
.
createForm
(
this
),
columns
:
[
{
title
:
'门店名称'
,
dataIndex
:
'NAME'
},
{
title
:
'编号'
,
dataIndex
:
'CODE'
},
// {
// title: '上级/省级编号',
// dataIndex: 'USER_GROUP_GUID'
// },
{
title
:
'电话'
,
dataIndex
:
'PHONE'
},
// {
// title: '联系人姓名',
// dataIndex: 'WX_NO'
// },
{
title
:
'详细地址'
,
dataIndex
:
'DETAIL_ADDRESS'
},
{
title
:
'lng坐标'
,
dataIndex
:
'LNG'
},
{
title
:
'lat坐标'
,
dataIndex
:
'LAT'
},
{
title
:
'操作'
,
dataIndex
:
'action'
,
scopedSlots
:
{
customRender
:
'action'
}
}
],
loadData
:
parameter
=>
{
return
getStoreList
(
Object
.
assign
(
parameter
,
this
.
queryParam
))
.
then
(
res
=>
{
res
.
pageSize
=
res
.
_meta
.
perPage
;
res
.
page
=
res
.
_meta
.
currentPage
;
res
.
totalPage
=
res
.
_meta
.
pageCount
;
res
.
totalCount
=
res
.
_meta
.
totalCount
;
return
res
})
}
}
},
mounted
(){
this
.
loadProvince
()
},
methods
:
{
// 加载省
loadProvince
(){
loadAddress
().
then
(
res
=>
{
res
.
data
.
forEach
(
item
=>
{
item
.
isLeaf
=
false
;
});
console
.
log
(
res
)
this
.
addressOptions
=
res
.
data
;
}).
catch
(
err
=>
{
})
},
// 加载市区
loadChildren
(
selectedOptions
){
if
(
selectedOptions
.
length
<
2
){
const
targetOption
=
selectedOptions
[
selectedOptions
.
length
-
1
];
targetOption
.
loading
=
true
;
var
that
=
this
;
let
giveParent
=
{
PARENT_GUID
:
targetOption
.
GUID
}
loadAddress
(
giveParent
).
then
(
res
=>
{
res
.
data
.
forEach
(
item
=>
{
item
.
isLeaf
=
false
;
})
setTimeout
(()
=>
{
targetOption
.
loading
=
false
;
targetOption
.
children
=
res
.
data
;
this
.
addressOptions
=
[...
this
.
addressOptions
];
},
1000
)
}).
catch
(
err
=>
{
})
}
else
{
const
targetOption
=
selectedOptions
[
selectedOptions
.
length
-
1
];
targetOption
.
loading
=
true
;
var
that
=
this
;
let
giveParent
=
{
PARENT_GUID
:
targetOption
.
GUID
}
loadAddress
(
giveParent
).
then
(
res
=>
{
// res.data.forEach(item => {
// item.isLeaf=false;
// })
setTimeout
(()
=>
{
targetOption
.
loading
=
false
;
targetOption
.
children
=
res
.
data
;
this
.
addressOptions
=
[...
this
.
addressOptions
];
},
1000
)
}).
catch
(
err
=>
{
})
}
},
handleOk
(
value
){
},
handleEdit
(
record
)
{
},
toggleAdvanced
()
{
this
.
advanced
=
!
this
.
advanced
}
}
}
</
script
>
src/views/userstaff/uList.vue
View file @
2f6b6563
...
@@ -29,10 +29,8 @@
...
@@ -29,10 +29,8 @@
</a-col>
</a-col>
<a-col
:md=
"8"
:sm=
"24"
>
<a-col
:md=
"8"
:sm=
"24"
>
<a-form-item
label=
"用户所属"
>
<a-form-item
label=
"用户所属"
>
<a-select
v-model=
"queryParam.USER_GROUP_GUID"
placeholder=
"请选择"
default-value=
"0"
>
<a-select
v-model=
"queryParam.USER_GROUP_GUID"
placeholder=
"请选择"
>
<a-select-option
value=
"0"
>
全部
</a-select-option>
<a-select-option
v-for=
"item in groupList"
:key=
"item.GUID"
>
{{
item
.
NAME
}}
</a-select-option>
<a-select-option
value=
"1"
>
关闭
</a-select-option>
<a-select-option
value=
"2"
>
运行中
</a-select-option>
</a-select>
</a-select>
</a-form-item>
</a-form-item>
</a-col>
</a-col>
...
@@ -72,6 +70,16 @@
...
@@ -72,6 +70,16 @@
</s-table>
</s-table>
<a-modal
title=
"操作"
:width=
"800"
:destoryOnClose=
"destoryOnClose"
v-model=
"visible"
@
ok=
'handleOk(0)'
>
<a-modal
title=
"操作"
:width=
"800"
:destoryOnClose=
"destoryOnClose"
v-model=
"visible"
@
ok=
'handleOk(0)'
>
<a-form
:form=
"modalForm"
>
<a-form
:form=
"modalForm"
>
<a-form-item
:labelCol=
'labelCol'
:wrapperCol=
'wrapperCol'
>
<a-input
hidden
v-decorator=
"['GUID']"
name=
"GUID"
placeholder=
"请输入评分GUID"
/>
</a-form-item>
<a-form-item
<a-form-item
label=
"昵称"
label=
"昵称"
:labelCol=
"labelCol"
:labelCol=
"labelCol"
...
@@ -142,7 +150,7 @@
...
@@ -142,7 +150,7 @@
:labelCol=
"labelCol"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
>
:wrapperCol=
"wrapperCol"
>
<a-date-picker
<a-date-picker
v-decorator=
"['CONTACTBIRTH_DATE']"
v-decorator=
"['CONTACTBIRTH_DATE'
,{normalize:DateCheck}
]"
/>
/>
</a-form-item>
</a-form-item>
<a-form-item
<a-form-item
...
@@ -205,7 +213,7 @@
...
@@ -205,7 +213,7 @@
<
script
>
<
script
>
import
moment
from
'moment'
import
moment
from
'moment'
import
{
STable
}
from
'@/components'
import
{
STable
}
from
'@/components'
import
{
getUList
,
getUserGroup
,
getUListDetails
,
UListModify
}
from
'@/api/userstaff'
import
{
getUList
,
getUserGroup
,
getUListDetails
,
UListModify
,
getUGroupList
}
from
'@/api/userstaff'
export
default
{
export
default
{
name
:
'TableList'
,
name
:
'TableList'
,
...
@@ -226,6 +234,7 @@ export default {
...
@@ -226,6 +234,7 @@ export default {
},
},
visible
:
false
,
visible
:
false
,
size
:
'default'
,
size
:
'default'
,
groupList
:[],
// queryParam1: {},
// queryParam1: {},
modal_usergroup
:[],
modal_usergroup
:[],
// 高级搜索 展开/关闭
// 高级搜索 展开/关闭
...
@@ -291,17 +300,29 @@ export default {
...
@@ -291,17 +300,29 @@ export default {
}
}
},
},
mounted
(){
mounted
(){
// getUserGroup().then(res => {
this
.
getUGroupList
();
// console.log('用户组')
// console.log(res)
// }).catch(err => {
// })
},
},
methods
:
{
methods
:
{
// 时间处理
DateCheck
(
value
){
if
(
value
||
value
!=
null
||
value
!=
""
){
return
moment
(
value
,
'YYYY-MM-DD'
)
}
},
// 获取用户组列表
getUGroupList
(){
getUGroupList
().
then
(
res
=>
{
this
.
groupList
=
res
;
}).
catch
(
err
=>
{
})
},
// 下拉选择处理
checkNull
(
value
){
checkNull
(
value
){
if
(
value
==
null
){
if
(
value
==
null
||
value
==
""
){
return
'0'
;
return
'0'
;
}
else
{
return
value
.
toString
()
}
}
},
},
handleOk
(
value
){
handleOk
(
value
){
...
@@ -310,6 +331,10 @@ export default {
...
@@ -310,6 +331,10 @@ export default {
validateFields
({
force
:
true
},
(
err
,
values
)
=>
{
validateFields
({
force
:
true
},
(
err
,
values
)
=>
{
if
(
!
err
)
{
if
(
!
err
)
{
const
EvaluateModify
=
Object
.
assign
({
...
values
});
const
EvaluateModify
=
Object
.
assign
({
...
values
});
if
(
EvaluateModify
.
CONTACTBIRTH_DATE
){
EvaluateModify
.
CONTACTBIRTH_DATE
=
EvaluateModify
.
CONTACTBIRTH_DATE
.
format
(
'YYYY-MM-DD'
);
}
EvaluateModify
.
USERGUID
=
EvaluateModify
.
GUID
;
UListModify
(
EvaluateModify
).
then
(
res
=>
{
UListModify
(
EvaluateModify
).
then
(
res
=>
{
this
.
visible
=
false
;
this
.
visible
=
false
;
// this.whichOptions=1;
// this.whichOptions=1;
...
...
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