Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
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
hooloo
web
soss
Commits
bf7dc4c3
Commit
bf7dc4c3
authored
Jul 14, 2022
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改城市显示
parent
0bfd8a1f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
92 additions
and
39 deletions
+92
-39
src/api/system/shop.js
+7
-1
src/components/order/orderDetial.vue
+8
-3
src/components/order/refundDetial.vue
+8
-3
src/views/customer/orderTable.vue
+8
-3
src/views/order/order/index.vue
+8
-3
src/views/order/refund/index.vue
+8
-3
src/views/shop/shop/index.vue
+45
-23
No files found.
src/api/system/shop.js
View file @
bf7dc4c3
...
@@ -45,7 +45,6 @@ export function delShop(id) {
...
@@ -45,7 +45,6 @@ export function delShop(id) {
// 查询店铺分类
// 查询店铺分类
export
function
getCategoryGoods
(
id
)
{
export
function
getCategoryGoods
(
id
)
{
console
.
log
(
id
);
return
request
({
return
request
({
url
:
"/system/shop/getCategoryGoods?shopId="
+
id
,
url
:
"/system/shop/getCategoryGoods?shopId="
+
id
,
method
:
"get"
,
method
:
"get"
,
...
@@ -139,3 +138,10 @@ export function turnRecommendList(query) {
...
@@ -139,3 +138,10 @@ export function turnRecommendList(query) {
params
:
query
,
params
:
query
,
});
});
}
}
export
function
getShopCity
()
{
return
request
({
url
:
"/system/shop/getShopCity"
,
method
:
"get"
,
});
}
src/components/order/orderDetial.vue
View file @
bf7dc4c3
...
@@ -185,9 +185,14 @@ export default {
...
@@ -185,9 +185,14 @@ export default {
getProvince
(
province
){
getProvince
(
province
){
let
list
=
this
.
piovince
;
let
list
=
this
.
piovince
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
if
(
list
[
i
].
value
==
province
){
if
(
list
[
i
].
children
.
length
>
0
){
return
list
[
i
].
name
;
let
childrenList
=
list
[
i
].
children
;
}
for
(
let
j
=
0
;
j
<
childrenList
.
length
;
j
++
){
if
(
childrenList
[
j
].
value
==
province
){
return
childrenList
[
j
].
name
;
}
}
}
}
}
},
},
// 取消按钮
// 取消按钮
...
...
src/components/order/refundDetial.vue
View file @
bf7dc4c3
...
@@ -157,9 +157,14 @@ export default {
...
@@ -157,9 +157,14 @@ export default {
getProvince
(
province
){
getProvince
(
province
){
let
list
=
this
.
piovince
;
let
list
=
this
.
piovince
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
if
(
list
[
i
].
value
==
province
){
if
(
list
[
i
].
children
.
length
>
0
){
return
list
[
i
].
name
;
let
childrenList
=
list
[
i
].
children
;
}
for
(
let
j
=
0
;
j
<
childrenList
.
length
;
j
++
){
if
(
childrenList
[
j
].
value
==
province
){
return
childrenList
[
j
].
name
;
}
}
}
}
}
},
},
// 取消按钮
// 取消按钮
...
...
src/views/customer/orderTable.vue
View file @
bf7dc4c3
...
@@ -48,9 +48,14 @@ export default {
...
@@ -48,9 +48,14 @@ export default {
getProvince
(
city
){
getProvince
(
city
){
let
list
=
this
.
piovince
;
let
list
=
this
.
piovince
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
if
(
list
[
i
].
value
==
city
){
if
(
list
[
i
].
children
.
length
>
0
){
return
list
[
i
].
name
;
let
childrenList
=
list
[
i
].
children
;
}
for
(
let
j
=
0
;
j
<
childrenList
.
length
;
j
++
){
if
(
childrenList
[
j
].
value
==
province
){
return
childrenList
[
j
].
name
;
}
}
}
}
}
},
},
getList
(){
getList
(){
...
...
src/views/order/order/index.vue
View file @
bf7dc4c3
...
@@ -160,9 +160,14 @@ export default {
...
@@ -160,9 +160,14 @@ export default {
getProvince
(
province
){
getProvince
(
province
){
let
list
=
this
.
piovince
;
let
list
=
this
.
piovince
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
if
(
list
[
i
].
value
==
province
){
if
(
list
[
i
].
children
.
length
>
0
){
return
list
[
i
].
name
;
let
childrenList
=
list
[
i
].
children
;
}
for
(
let
j
=
0
;
j
<
childrenList
.
length
;
j
++
){
if
(
childrenList
[
j
].
value
==
province
){
return
childrenList
[
j
].
name
;
}
}
}
}
}
},
},
formatterState
(
state
){
formatterState
(
state
){
...
...
src/views/order/refund/index.vue
View file @
bf7dc4c3
...
@@ -147,9 +147,14 @@ export default {
...
@@ -147,9 +147,14 @@ export default {
getProvince
(
province
){
getProvince
(
province
){
let
list
=
this
.
piovince
;
let
list
=
this
.
piovince
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
if
(
list
[
i
].
value
==
province
){
if
(
list
[
i
].
children
.
length
>
0
){
return
list
[
i
].
name
;
let
childrenList
=
list
[
i
].
children
;
}
for
(
let
j
=
0
;
j
<
childrenList
.
length
;
j
++
){
if
(
childrenList
[
j
].
value
==
province
){
return
childrenList
[
j
].
name
;
}
}
}
}
}
},
},
formatterState
(
state
){
formatterState
(
state
){
...
...
src/views/shop/shop/index.vue
View file @
bf7dc4c3
...
@@ -6,14 +6,7 @@
...
@@ -6,14 +6,7 @@
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入店铺名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入店铺名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"城市"
>
<el-form-item
label=
"城市"
>
<el-select
v-model=
"queryParams.province"
placeholder=
"请选择城市"
clearable
>
<el-cascader
:options=
"provinceList"
:show-all-levels=
"false"
v-model=
"province"
clearable
></el-cascader>
<el-option
v-for=
"item in provinceList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"state"
>
<el-form-item
label=
"状态"
prop=
"state"
>
<el-select
v-model=
"queryParams.state"
placeholder=
"请选择状态"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
>
<el-select
v-model=
"queryParams.state"
placeholder=
"请选择状态"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
>
...
@@ -54,7 +47,7 @@
...
@@ -54,7 +47,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"城市"
align=
"center"
>
<el-table-column
label=
"城市"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
getProvince
(
scope
.
row
.
province
)
}}
{{
getProvince
(
scope
.
row
.
city
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"设备数量"
align=
"center"
prop=
"machineCount"
/>
<el-table-column
label=
"设备数量"
align=
"center"
prop=
"machineCount"
/>
...
@@ -107,7 +100,8 @@
...
@@ -107,7 +100,8 @@
import
{
import
{
listShop
,
listShop
,
delShop
,
delShop
,
updateShop
updateShop
,
getShopCity
}
from
"@/api/system/shop"
;
}
from
"@/api/system/shop"
;
import
SetShop
from
'./setShop'
;
import
SetShop
from
'./setShop'
;
import
piovince
from
'@/utils/piovince'
import
piovince
from
'@/utils/piovince'
...
@@ -136,14 +130,12 @@ export default {
...
@@ -136,14 +130,12 @@ export default {
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
name
:
null
,
name
:
null
,
province
:
null
,
city
:
null
,
state
:
null
,
state
:
null
,
machineCode
:
null
machineCode
:
null
},
},
provinceList
:[{
province
:[],
value
:
''
,
provinceList
:[],
label
:
'全部'
}],
options
:
[{
options
:
[{
value
:
''
,
value
:
''
,
label
:
'全部'
label
:
'全部'
...
@@ -164,18 +156,47 @@ export default {
...
@@ -164,18 +156,47 @@ export default {
this
.
getProvinceList
();
this
.
getProvinceList
();
},
},
methods
:
{
methods
:
{
getProvinceList
(){
getProvinceList
(){
let
list
=
this
.
piovince
;
let
list
=
[];
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
this
.
provinceList
=
[];
this
.
provinceList
.
push
({
value
:
list
[
i
].
value
,
label
:
list
[
i
].
name
})
getShopCity
().
then
((
response
)
=>
{
}
if
(
response
.
code
==
200
){
list
=
response
.
data
;
let
piovinceList
=
this
.
piovince
;
for
(
let
i
=
0
;
i
<
piovinceList
.
length
;
i
++
){
if
(
piovinceList
[
i
].
children
.
length
>
0
){
let
childrenList
=
piovinceList
[
i
].
children
;
let
obj
=
{};
let
tag
=
false
;
obj
.
value
=
piovinceList
[
i
].
value
;
obj
.
label
=
piovinceList
[
i
].
label
;
let
children
=
[];
for
(
let
j
=
0
;
j
<
childrenList
.
length
;
j
++
){
if
(
list
.
indexOf
(
childrenList
[
j
].
value
)
>-
1
){
children
.
push
({
"value"
:
childrenList
[
j
].
value
,
"label"
:
childrenList
[
j
].
name
});
tag
=
true
;
}
}
obj
.
children
=
children
;
if
(
tag
){
this
.
provinceList
.
push
(
obj
);
}
}
}
}
});
},
},
getProvince
(
province
){
getProvince
(
province
){
let
list
=
this
.
piovince
;
let
list
=
this
.
piovince
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
if
(
list
[
i
].
value
==
province
){
if
(
list
[
i
].
children
.
length
>
0
){
return
list
[
i
].
name
;
let
childrenList
=
list
[
i
].
children
;
}
for
(
let
j
=
0
;
j
<
childrenList
.
length
;
j
++
){
if
(
childrenList
[
j
].
value
==
province
){
return
childrenList
[
j
].
name
;
}
}
}
}
}
},
},
handleUpdate
()
{
},
handleUpdate
()
{
},
...
@@ -191,6 +212,7 @@ export default {
...
@@ -191,6 +212,7 @@ export default {
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
queryParams
.
pageNum
=
1
;
this
.
queryParams
.
city
=
this
.
province
[
1
];
this
.
getList
();
this
.
getList
();
},
},
/** 重置按钮操作 */
/** 重置按钮操作 */
...
...
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