Commit 666a75c3 by member

商品选择器的bug

parent 91b53a0c
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-会员标签</title><link href=./static/css/app.163db58c95fa2d9f5a95dd5154aa506f.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.12.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/area-ab.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/selector.1.1.61.js></script><script type=text/javascript src=./static/js/manifest.ae96e8ccc8a5000fe5bb.js></script><script type=text/javascript src=./static/js/vendor.83081d6a93a866b5b8f1.js></script><script type=text/javascript src=./static/js/app.74abcb1641987b233d64.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-会员标签</title><link href=./static/css/app.740be96eb98d624e56c1a7d913341f5d.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.12.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/area-ab.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/selector.1.1.66.js></script><script type=text/javascript src=./static/js/manifest.ae96e8ccc8a5000fe5bb.js></script><script type=text/javascript src=./static/js/vendor.83081d6a93a866b5b8f1.js></script><script type=text/javascript src=./static/js/app.74abcb1641987b233d64.js></script></body></html>
\ No newline at end of file
......@@ -82,8 +82,7 @@ summary,
time,
mark,
audio,
video,
input {
video {
margin: 0;
padding: 0;
border: 0;
......@@ -157,20 +156,13 @@ li {
height: 5px;
-webkit-border-radius: 6px;
border-radius: 6px;
/*background: #e4e7ed;*/
/*background-color: rgba(0, 0, 0, 0.1)*/
}
::-webkit-scrollbar-track {
/*background: #f5f7fa;*/
-webkit-border-radius: 6px;
border-radius: 6px;
}
::-webkit-scrollbar-track-piece {
/*background-color: rgba(0, 0, 0, 0.2);
-webkit-border-radius: 6px;*/
}
::-webkit-scrollbar-thumb {
background: #c0c4cc;
......@@ -197,24 +189,15 @@ scrollbar {
thumb, scrollbarbutton {
-moz-appearance: none !important;
}
/* 鼠标悬停时按钮颜色 */
thumb:hover, scrollbarbutton:hover {
-moz-appearance: none !important;
}
/* 隐藏上下箭头 */
scrollbarbutton {
display: none !important;
}
/* 纵向滚动条宽度 */
scrollbar[orient="vertical"] {
/*min-width: 15px !important;*/
}
......@@ -269,15 +252,10 @@ scrollbar[orient="vertical"] {
-moz-scrollbar-arrow-color: blue;
}
/*::-webkit-scrollbar-button {
color: #c8cbd3;
}*/
html, body {
width: 100%;
min-height: 100%;
height: 100%;
/*background-color: #ffffff;*/
background-color: #f0f2f5;
}
body {
......@@ -674,10 +652,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
color: #606266;
font-size: 14px;
}
.bottom-content-wrap {
/*background: #fff;
padding: 24px;*/
}
/*提示文字*/
.tip-text {
......@@ -706,7 +680,7 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
background: #fff;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
} */
/* 头部 */
.user-form-dialog .el-dialog__body {
......@@ -736,28 +710,18 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
background-color: #020b21;
}
.leftBar-wrap .cardmenu-item li.el-menu-item:hover i {
/*background-color: #1890ff;*/
color: #fff;
}
.leftBar-wrap .cardmenu-item li.el-menu-item:hover span {
/*background-color: #1890ff;*/
color: #fff;
}
.leftBar-wrap .cardmenu-item li.el-submenu:hover i {
/*background-color: #1890ff;*/
color: #fff;
}
.leftBar-wrap .cardmenu-item li.el-submenu:hover span {
/*background-color: #1890ff;*/
color: #fff;
}
.leftBar-wrap .cardmenu-item li.el-submenu .el-menu-item:hover label {
/*background-color: #1890ff;*/
.leftBar-wrap .cardmenu-item li.el-submenu .el-menu-item:hover label {
color: #fff;
cursor: pointer;
}
......@@ -771,18 +735,14 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
color: #fff;
}
/* 百分号 */
.percent-item .el-input-group__append {
padding: 0 12px;
}
}
/* table lable*/
.table-label .el-form-item__label {
.table-label .el-form-item__label {
line-height: 48px;
}
.el-table th .cell {
/*color: #909399;*/
font-size: 14px;
}
#index .el-table__empty-block {
......@@ -793,7 +753,7 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
}
.common-wrap__fix__table .el-table__empty-text {
margin-bottom: 40px;
}
}
/* 会员标签 */
.common-lib__cell__fieldName::before {
......@@ -816,7 +776,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
}
/* 标签库通用 */
.right-box .common-wrap__opt {}
.common-libFields {
min-width: 1104px;
-webkit-flex-wrap: wrap;
......@@ -903,8 +862,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
margin-bottom: 10px;
padding: 0px 12px;
height: 12px;
/*line-height: 12px;*/
font-size: 13px;
color: #606266;
}
......@@ -950,8 +907,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
color: #909399;
}
.common-wrap__cateTags .common-wrap__childTag {
/*max-width: calc(100% - 280px);*/
vertical-align: middle;
margin-left: 8px;
padding-left: 10px;
......@@ -959,8 +914,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
color: #606266;
border-left: 1px solid #979797;
white-space: nowrap;
/*overflow: hidden;*/
/*text-overflow: ellipsis;*/
}
.common-wrap__childTag .common-wrap__childTag__name {
margin-right: 10px;
......@@ -970,19 +923,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
background: #F0F2F5;
border-radius: 2px;
}
.common-wrap__moreTag__body {
/*position: absolute;
top: 20px;
right: -10px;
min-width: 500px;
max-width: 1049px;
padding: 24px 12px 14px 22px;
background: #FFFFFF;
border: 1px solid rgba(235,238,245,1);
-webkit-box-shadow: 0px 2px 12px 0px rgba(6,19,33,0.10);
box-shadow: 0px 2px 12px 0px rgba(6,19,33,0.10);
z-index: 1;*/
}
.el-popover .common-wrap__childTag__name {
display: inline-block;
margin-right: 10px;
......@@ -1116,13 +1056,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
.tagShort-dialog .el-dialog__headerbtn {
top: 28px;
}
.tagShort-dialog .el-dialog__body {
/*padding: 0 20px 30px 20px;*/
}
.tagShort-dialog .el-dialog__footer {
/*border-top: none;
border-top: 0px;*/
}
/* 选项 (固化值)*/
.checkboxOption-wrap {
......
......@@ -21,6 +21,6 @@
<script src="//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/area-ab.2.0.00.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/card.2.0.02.js"></script>
<script src="//web-1251519181.cos.ap-shanghai.myqcloud.com/components/selector.1.1.61.js"></script>
<script src="//web-1251519181.cos.ap-shanghai.myqcloud.com/components/selector.1.1.66.js"></script>
</body>
</html>
......@@ -21,7 +21,8 @@ export default {
props: {
goodsBrands: Array,
goodsIndex: Array
goodsIndex: Array,
listReback: Array
},
data() {
......@@ -66,6 +67,17 @@ export default {
data = res.data.result;
this.brandes = data.result;
// 如果超过了20条 totalCount 是总数 根据总数来判断是否还要继续展示第二页的 并不适合全选
if (this.middleBrands.length) {
let checkCount = this.middleBrands.length;
this.checkAll = checkCount === this.brandes.length;
this.isIndeterminate = checkCount > 0 && checkCount < this.brandes.length;
this.middleBrands.forEach(el => {
let index = this.brandes.findIndex(item => item.brandId === el.brandId);
if (index > -1) {
this.checkedBrandes.push(this.brandes[index]);
}
});
}
} else {
this.$message.error(res.data.message);
}
......@@ -79,17 +91,6 @@ export default {
beforeMount() {
// 获取品牌列表
this.getBrandList();
setTimeout(() => {
let checkCount = this.middleBrands.length;
this.checkAll = checkCount === this.brandes.length;
this.isIndeterminate = checkCount > 0 && checkCount < this.brandes.length;
this.middleBrands.forEach(el => {
let index = this.brandes.findIndex(item => item.brandId === el.brandId);
if (index> -1) {
this.checkedBrandes.push(this.brandes[index]);
}
})
}, 100);
},
watch: {
......@@ -98,6 +99,18 @@ export default {
handler(newval) {
this.middleBrands = newval;
}
},
listReback: {
immediate: true,
handler(newval) {
console.log(newval);
newval.brands.forEach(el => {
let index = this.brandes.findIndex(item => item.brandId === el.brandId);
if (index> -1) {
this.checkedBrandes.push(this.brandes[index]);
}
})
}
}
}
};
......
......@@ -123,6 +123,7 @@ export default {
},
// 接收 单个 skus
resiverSku(list) {
// list 没有值就是接收单个
if (list) {
this.tableData = JSON.parse(JSON.stringify(list));
this.goodsCheched = this.tableData && this.tableData.filter(el => el.check);
......@@ -144,6 +145,21 @@ export default {
}
},
reciverSkusList(list) {
this.tableData[list.inx].skus = list.skus;
let middleData = JSON.parse(JSON.stringify(this.tableData));
middleData = middleData.map(el => {
el.skus = el.skus && el.skus.filter(sku => sku.check);
if (el.skus && el.skus.length) {
el.hasSku = true;
}
return el;
}).filter(item => item.hasSku);
this.skuCheched = JSON.parse(JSON.stringify(middleData));
},
// resiverAllSku 全选sku选择的时候 传出来
resiverAllSku(skuItem) {
this.tableData = this.tableData.map((el, i) => {
......@@ -198,7 +214,7 @@ export default {
pageSize: 20
};
this.axios
.get(`${baseUrl}/api-goods/list-store-goods-select`, {
.get(`${baseUrl}/api-goods/list-store-goods-select?requestProject=goods`, {
params: param
})
.then(res => {
......@@ -337,6 +353,7 @@ export default {
// 用来保存从左边移过去的数据的id
this.cacheSkuList = [];
this.cacheGoodList = [];
this.$on('pass-sku', this.reciverSkusList);
}
};
</script>
......
......@@ -99,6 +99,7 @@ export default {
// item 是勾选的sku信息
resiverSku(val) {
// val里面有个check
console.log(val);
if (val.checkAll === true) {
this.$emit('resiverAllSku', {
skus: val.skus,
......
......@@ -64,7 +64,7 @@ export default {
},
getSkuList() {
this.axios
.get(`${baseUrl}/api-goods/list-store-goods-select-sku?goodsId=${this.skuItem.goodsId}`)
.get(`${baseUrl}/api-goods/list-store-goods-select-sku?requestProject=goods&goodsId=${this.skuItem.goodsId}`)
.then(res => {
if (res.data.errorCode === 0) {
const data = res.data.result;
......
......@@ -68,17 +68,16 @@ export default {
check: val
}));
this.isIndeterminate = false;
this.dispatch('SkuFilterTable', 'passku', {
this.dispatch('goods-some', 'pass-sku', {
skus: this.skus,
inx: this.inx,
checkAll: val
});
},
handleCheckedSku() {
console.log('商品');
this.handleSkuStatus();
// 每次勾选sku的时候传到最外层的商品层
this.dispatch('SkuFilterTable', 'passku', {
this.dispatch('goods-some', 'pass-sku', {
skus: this.skus,
inx: this.inx
});
......@@ -99,7 +98,6 @@ export default {
data: {
immediate: true,
handler(newval) {
console.log(newval, 's');
this.skus = newval;
}
}
......
......@@ -139,20 +139,6 @@
.el-tag {
margin-top: 8px;
margin-right: 8px;
/*background: none;
background-color: none;
border: none;
font-size: 14px;
color: #606266;
.el-tag__close {
width: 14px;
height: 14px;
line-height: 14px;
font-size: 12px;
color: #fff;
background: #DCDFE6;
}*/
}
&.city-slected-opyions {
......@@ -162,19 +148,6 @@
.el-tag {
margin: 0 10px 10px 0;
/*background: #F4F4F5;
border: 1px solid rgba(233,233,235,1);
font-size: 12px;
color: #909399;*/
.el-tag__close {
/*width: 14px;
height: 14px;
line-height: 14px;
font-size: 12px;
color: #fff;
background: #DCDFE6;*/
}
}
}
}
......
......@@ -82,8 +82,7 @@ summary,
time,
mark,
audio,
video,
input {
video {
margin: 0;
padding: 0;
border: 0;
......@@ -157,20 +156,13 @@ li {
height: 5px;
-webkit-border-radius: 6px;
border-radius: 6px;
/*background: #e4e7ed;*/
/*background-color: rgba(0, 0, 0, 0.1)*/
}
::-webkit-scrollbar-track {
/*background: #f5f7fa;*/
-webkit-border-radius: 6px;
border-radius: 6px;
}
::-webkit-scrollbar-track-piece {
/*background-color: rgba(0, 0, 0, 0.2);
-webkit-border-radius: 6px;*/
}
::-webkit-scrollbar-thumb {
background: #c0c4cc;
......@@ -197,24 +189,15 @@ scrollbar {
thumb, scrollbarbutton {
-moz-appearance: none !important;
}
/* 鼠标悬停时按钮颜色 */
thumb:hover, scrollbarbutton:hover {
-moz-appearance: none !important;
}
/* 隐藏上下箭头 */
scrollbarbutton {
display: none !important;
}
/* 纵向滚动条宽度 */
scrollbar[orient="vertical"] {
/*min-width: 15px !important;*/
}
......@@ -269,15 +252,10 @@ scrollbar[orient="vertical"] {
-moz-scrollbar-arrow-color: blue;
}
/*::-webkit-scrollbar-button {
color: #c8cbd3;
}*/
html, body {
width: 100%;
min-height: 100%;
height: 100%;
/*background-color: #ffffff;*/
background-color: #f0f2f5;
}
body {
......@@ -674,10 +652,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
color: #606266;
font-size: 14px;
}
.bottom-content-wrap {
/*background: #fff;
padding: 24px;*/
}
/*提示文字*/
.tip-text {
......@@ -706,7 +680,7 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
background: #fff;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
} */
/* 头部 */
.user-form-dialog .el-dialog__body {
......@@ -736,28 +710,18 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
background-color: #020b21;
}
.leftBar-wrap .cardmenu-item li.el-menu-item:hover i {
/*background-color: #1890ff;*/
color: #fff;
}
.leftBar-wrap .cardmenu-item li.el-menu-item:hover span {
/*background-color: #1890ff;*/
color: #fff;
}
.leftBar-wrap .cardmenu-item li.el-submenu:hover i {
/*background-color: #1890ff;*/
color: #fff;
}
.leftBar-wrap .cardmenu-item li.el-submenu:hover span {
/*background-color: #1890ff;*/
color: #fff;
}
.leftBar-wrap .cardmenu-item li.el-submenu .el-menu-item:hover label {
/*background-color: #1890ff;*/
.leftBar-wrap .cardmenu-item li.el-submenu .el-menu-item:hover label {
color: #fff;
cursor: pointer;
}
......@@ -771,18 +735,14 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
color: #fff;
}
/* 百分号 */
.percent-item .el-input-group__append {
padding: 0 12px;
}
}
/* table lable*/
.table-label .el-form-item__label {
.table-label .el-form-item__label {
line-height: 48px;
}
.el-table th .cell {
/*color: #909399;*/
font-size: 14px;
}
#index .el-table__empty-block {
......@@ -793,7 +753,7 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
}
.common-wrap__fix__table .el-table__empty-text {
margin-bottom: 40px;
}
}
/* 会员标签 */
.common-lib__cell__fieldName::before {
......@@ -816,7 +776,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
}
/* 标签库通用 */
.right-box .common-wrap__opt {}
.common-libFields {
min-width: 1104px;
-webkit-flex-wrap: wrap;
......@@ -903,8 +862,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
margin-bottom: 10px;
padding: 0px 12px;
height: 12px;
/*line-height: 12px;*/
font-size: 13px;
color: #606266;
}
......@@ -950,8 +907,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
color: #909399;
}
.common-wrap__cateTags .common-wrap__childTag {
/*max-width: calc(100% - 280px);*/
vertical-align: middle;
margin-left: 8px;
padding-left: 10px;
......@@ -959,8 +914,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
color: #606266;
border-left: 1px solid #979797;
white-space: nowrap;
/*overflow: hidden;*/
/*text-overflow: ellipsis;*/
}
.common-wrap__childTag .common-wrap__childTag__name {
margin-right: 10px;
......@@ -970,19 +923,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
background: #F0F2F5;
border-radius: 2px;
}
.common-wrap__moreTag__body {
/*position: absolute;
top: 20px;
right: -10px;
min-width: 500px;
max-width: 1049px;
padding: 24px 12px 14px 22px;
background: #FFFFFF;
border: 1px solid rgba(235,238,245,1);
-webkit-box-shadow: 0px 2px 12px 0px rgba(6,19,33,0.10);
box-shadow: 0px 2px 12px 0px rgba(6,19,33,0.10);
z-index: 1;*/
}
.el-popover .common-wrap__childTag__name {
display: inline-block;
margin-right: 10px;
......@@ -1116,13 +1056,6 @@ input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
.tagShort-dialog .el-dialog__headerbtn {
top: 28px;
}
.tagShort-dialog .el-dialog__body {
/*padding: 0 20px 30px 20px;*/
}
.tagShort-dialog .el-dialog__footer {
/*border-top: none;
border-top: 0px;*/
}
/* 选项 (固化值)*/
.checkboxOption-wrap {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment