Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
c20499f6
Commit
c20499f6
authored
Oct 30, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
b249dd3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
17 deletions
+9
-17
ServiceManageEdit.vue
src/components/offlineService/ServiceManageEdit.vue
+9
-17
No files found.
src/components/offlineService/ServiceManageEdit.vue
View file @
c20499f6
...
@@ -337,19 +337,16 @@
...
@@ -337,19 +337,16 @@
}
}
}
}
}
}
console
.
log
(
ProductList
,
'ProductList'
);
this
.
AppointList
=
ProductList
this
.
AppointList
=
ProductList
},
},
//删除对应商品类型
//删除对应商品类型
deleteProduct
(
item
,
index
)
{
deleteProduct
(
item
,
index
)
{
console
.
log
(
item
,
'item'
);
this
.
AppointList
.
splice
(
index
,
1
)
this
.
AppointList
.
splice
(
index
,
1
)
for
(
let
i
=
0
;
i
<
this
.
checkedkeys
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
checkedkeys
.
length
;
i
++
)
{
if
(
this
.
checkedkeys
[
i
]
==
item
.
ProductId
)
{
if
(
this
.
checkedkeys
[
i
]
==
item
.
ProductId
)
{
this
.
checkedkeys
.
splice
(
i
,
1
)
this
.
checkedkeys
.
splice
(
i
,
1
)
}
}
}
}
console
.
log
(
this
.
AppointList
,
'this.AppointList'
);
},
},
addcommoditybtn
()
{
addcommoditybtn
()
{
this
.
addcommodity
=
true
;
this
.
addcommodity
=
true
;
...
@@ -494,7 +491,6 @@
...
@@ -494,7 +491,6 @@
this
.
apipost
(
"/api/MContent/GetStoresList"
,
{},
res
=>
{
this
.
apipost
(
"/api/MContent/GetStoresList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
StoreList
=
res
.
data
.
data
;
this
.
StoreList
=
res
.
data
.
data
;
console
.
log
(
res
,
'下拉数据'
);
}
else
{
}
else
{
this
.
Error
(
res
.
data
.
message
);
this
.
Error
(
res
.
data
.
message
);
}
}
...
@@ -519,7 +515,6 @@
...
@@ -519,7 +515,6 @@
}
}
this
.
addMsg
.
ProductList
=
ProductList
this
.
addMsg
.
ProductList
=
ProductList
}
}
console
.
log
(
this
.
addMsg
);
this
.
apipost
(
"/api/Reserve/AddOrUpdateServicePersonal"
,
this
.
addMsg
,
res
=>
{
this
.
apipost
(
"/api/Reserve/AddOrUpdateServicePersonal"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
);
this
.
Success
(
res
.
data
.
message
);
...
@@ -535,19 +530,21 @@
...
@@ -535,19 +530,21 @@
ID
:
this
.
addMsg
.
ID
ID
:
this
.
addMsg
.
ID
},
res
=>
{
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
console
.
log
(
res
,
'获取数据'
);
this
.
addMsg
=
res
.
data
.
data
;
this
.
addMsg
=
res
.
data
.
data
;
if
(
res
.
data
.
data
.
ServiceType
==
1
)
{
if
(
res
.
data
.
data
.
ServiceType
==
1
)
{
let
ProductList
=
res
.
data
.
data
.
ProductList
;
let
ProductList
=
res
.
data
.
data
.
ProductList
;
let
newData
=
[]
this
.
AppointList
=
[]
this
.
getProductCategoryTreeList
();
this
.
getProductCategoryTreeList
();
console
.
log
(
this
.
ProductCategoryTreeList
,
'ProductCategoryTreeList'
);
for
(
let
i
=
0
;
i
<
ProductList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
ProductList
.
length
;
i
++
)
{
this
.
checkedkeys
.
push
(
ProductList
[
i
].
ProductId
)
this
.
checkedkeys
.
push
(
ProductList
[
i
].
ProductId
)
console
.
log
(
this
.
getObjById
(
this
.
ProductCategoryTreeList
,
ProductList
[
i
].
ProductId
),
'阿萨德'
);
var
objList
=
this
.
getObjById
(
this
.
ProductCategoryTreeList
,
ProductList
[
i
].
ProductId
);
if
(
objList
){
this
.
AppointList
.
push
({
ProductId
:
objList
.
Id
,
Name
:
objList
.
Name
})
}
}
}
// console.log(newData, 'newData');
// this.AppointList = this.AppointList2.concat(newData)
}
}
if
(
res
.
data
.
data
.
ServiceType
==
2
)
{
if
(
res
.
data
.
data
.
ServiceType
==
2
)
{
let
ProductList
=
res
.
data
.
data
.
ProductList
;
let
ProductList
=
res
.
data
.
data
.
ProductList
;
...
@@ -567,7 +564,6 @@
...
@@ -567,7 +564,6 @@
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
pageData
=
res
.
data
.
data
.
pageData
;
let
pageData
=
res
.
data
.
data
.
pageData
;
newData
.
push
(
pageData
[
0
])
newData
.
push
(
pageData
[
0
])
}
}
})
})
}
}
...
@@ -579,22 +575,18 @@
...
@@ -579,22 +575,18 @@
})
})
},
},
getObjById
(
list
,
id
)
{
getObjById
(
list
,
id
)
{
console
.
log
(
list
,
'list'
);
console
.
log
(
id
,
'idddd'
);
if
(
!
list
instanceof
Array
)
{
if
(
!
list
instanceof
Array
)
{
return
null
return
null
}
}
//遍历数组
//遍历数组
for
(
let
i
in
list
)
{
for
(
let
i
in
list
)
{
let
item
=
list
[
i
]
let
item
=
list
[
i
]
console
.
log
(
item
,
'itemmmmmm'
);
if
(
item
.
Id
===
id
)
{
if
(
item
.
Id
===
id
)
{
console
.
log
(
item
,
'item'
);
return
item
return
item
}
else
{
}
else
{
//查不到继续遍历
//查不到继续遍历
if
(
item
.
ChildList
)
{
if
(
item
.
ChildList
)
{
let
value
=
getObjById
(
item
.
ChildList
,
id
)
let
value
=
this
.
getObjById
(
item
.
ChildList
,
id
)
//查询到直接返回
//查询到直接返回
if
(
value
)
{
if
(
value
)
{
return
value
return
value
...
...
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