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
49d28100
Commit
49d28100
authored
Aug 13, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
5cfb96c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
51 deletions
+49
-51
goodsSpecifica.vue
src/components/pintuan/pintuanPlugin/goodsSpecifica.vue
+49
-51
No files found.
src/components/pintuan/pintuanPlugin/goodsSpecifica.vue
View file @
49d28100
...
...
@@ -354,57 +354,51 @@
testyunx
(
skuArr
,
i
,
list
)
this
.
calcList
(
this
.
skuList
,
this
.
SpecificationList
);
},
calcList
(
l
ist
,
calist
)
{
calcList
(
tempSkuL
ist
,
calist
)
{
let
oldArr
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
SpecificationPriceList
))
this
.
SpecificationPriceList
=
[];
let
arrList
=
[];
list
.
forEach
(
item
=>
{
item
.
AttrList
=
[];
item
.
SpecificationSort
=
""
;
var
tempArray
=
[];
tempSkuList
.
forEach
(
item
=>
{
var
tempObj
=
{
AttrList
:
[],
SpecificationSort
:
""
,
GoodsNumbers
:
""
,
GoodsWeight
:
0
,
InventoryNum
:
0
,
SellingPrice
:
0
,
CostMoney
:
0
,
Commission
:
0
,
isNoExite
:
true
,
}
var
specificationSortStr
=
""
item
.
forEach
((
item2
,
index2
)
=>
{
let
obj
=
{
SName
:
item2
.
SName
,
SVName
:
item2
.
SVName
,
SVId
:
item2
.
SVId
};
let
str
=
":"
+
index2
;
item
.
SpecificationSort
=
item2
.
SVId
+
str
;
item
.
GoodsNumbers
=
""
;
item
.
GoodsWeight
=
0
;
item
.
InventoryNum
=
0
;
item
.
SellingPrice
=
0
;
item
.
CostMoney
=
0
;
item
.
Commission
=
0
;
item
.
AttrList
.
push
(
obj
);
if
(
index2
==
0
)
{
specificationSortStr
+=
item2
.
SVId
}
else
{
specificationSortStr
+=
":"
+
item2
.
SVId
}
tempObj
.
AttrList
.
push
(
obj
);
});
tempObj
.
SpecificationSort
=
specificationSortStr
;
tempArray
.
push
(
tempObj
)
});
list
.
forEach
((
item
,
i
)
=>
{
let
obj
=
{};
obj
=
{
isNoExite
:
true
,
AttrList
:
item
.
AttrList
,
SpecificationSort
:
item
.
SpecificationSort
,
GoodsNumbers
:
item
.
GoodsNumbers
,
GoodsWeight
:
item
.
GoodsWeight
,
InventoryNum
:
item
.
InventoryNum
,
SellingPrice
:
item
.
SellingPrice
,
CostMoney
:
item
.
CostMoney
,
Commission
:
item
.
Commission
};
var
isExists
=
false
;
var
isExistsIndex
=
-
1
;
tempArray
.
forEach
((
item
,
i
)
=>
{
oldArr
.
forEach
((
val
,
index
)
=>
{
if
(
val
.
SpecificationSort
==
item
.
SpecificationSort
)
{
obj
.
GoodsNumbers
=
val
.
GoodsNumbers
;
obj
.
GoodsWeight
=
val
.
GoodsWeight
;
obj
.
InventoryNum
=
val
.
InventoryNum
;
obj
.
SellingPrice
=
val
.
SellingPrice
;
obj
.
CostMoney
=
val
.
CostMoney
;
obj
.
Commission
=
val
.
Commission
;
item
.
GoodsNumbers
=
val
.
GoodsNumbers
;
item
.
GoodsWeight
=
val
.
GoodsWeight
;
item
.
InventoryNum
=
val
.
InventoryNum
;
item
.
SellingPrice
=
val
.
SellingPrice
;
item
.
CostMoney
=
val
.
CostMoney
;
item
.
Commission
=
val
.
Commission
;
}
})
this
.
SpecificationPriceList
.
push
(
obj
);
this
.
SpecificationPriceList
.
push
(
item
);
});
this
.
$forceUpdate
();
},
...
...
@@ -412,7 +406,9 @@
DeleteggModule
(
item
,
index
)
{
let
that
=
this
;
that
.
Confirm
(
"是否确认删除?"
,
function
()
{
that
.
getDeleteSpec
(
item
.
Id
);
if
(
item
.
Id
>
0
)
{
that
.
getDeleteSpec
(
item
.
Id
);
}
that
.
ComTreeList
=
[];
that
.
memberList2
=
[];
that
.
SpecificationList
.
splice
(
index
,
1
);
...
...
@@ -428,7 +424,9 @@
Deleteggz
(
item
,
index
,
index2
)
{
let
that
=
this
;
that
.
Confirm
(
"是否确认删除?"
,
function
()
{
that
.
getDeleteSpecValue
(
item
.
Id
);
if
(
item
.
Id
>
0
)
{
that
.
getDeleteSpecValue
(
item
.
Id
);
}
that
.
SpecificationList
[
index
].
SpecificationValueList
.
splice
(
index2
,
1
);
that
.
$forceUpdate
();
if
(
that
.
SpecificationList
[
index
].
SpecificationValueList
.
length
==
0
)
{
...
...
@@ -613,29 +611,29 @@
});
},
//删除规格后调用
getDeleteSpec
(
Id
){
let
msg
=
{
Id
:
Id
getDeleteSpec
(
Id
)
{
let
msg
=
{
Id
:
Id
}
this
.
apipost
(
"/api/GroupBuy/DeleteSpec"
,
msg
,
res
=>
{
console
.
log
(
res
,
'删除了'
)
if
(
res
.
data
.
resultCode
==
1
)
{
console
.
log
(
res
,
'删除了'
)
if
(
res
.
data
.
resultCode
==
1
)
{
}
else
{
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
//删除规格值过后调用
getDeleteSpecValue
(
Id
){
let
msg
=
{
Id
:
Id
getDeleteSpecValue
(
Id
)
{
let
msg
=
{
Id
:
Id
}
this
.
apipost
(
"/api/GroupBuy/DeleteSpecValue"
,
msg
,
res
=>
{
console
.
log
(
res
,
'删除了'
)
if
(
res
.
data
.
resultCode
==
1
)
{
console
.
log
(
res
,
'删除了'
)
if
(
res
.
data
.
resultCode
==
1
)
{
}
else
{
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
...
...
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