|
|
@@ -11,7 +11,7 @@
|
|
|
<li v-for="(item,index) in goodsTypeList" :class="item.selected ? 'selected' : ''"@click="debouncedClickType(item)" @mouseenter="showIcon(item,index)"@mouseleave="hideIcon(item,index)">
|
|
|
<span class="store_name">{{item.goodsTypeName}}
|
|
|
<span class="goods-count">{{item.goodsCounts || 0}}</span>
|
|
|
- <span class="" v-if="item.newFlag">上新</span>
|
|
|
+ <span v-if="item.newFlag">上新</span>
|
|
|
</span>
|
|
|
<i class="el-icon-top" v-show="item.showIcon" @click="debouncedChangOrderKey(item.goodsTypeId,1)"></i>
|
|
|
<i class="el-icon-edit" v-show="item.showIcon" @click="updateType(item)"></i>
|
|
|
@@ -160,7 +160,6 @@
|
|
|
<i class="el-icon-edit-outline" slot="reference" style="color: #5cb6ff;font-size: 18px" :style="{ visibility: showGoodsIcon && rowId === scope.row.__ob__.dep.id ? 'visible' : 'hidden' }"></i>
|
|
|
<form class="popover-modal">
|
|
|
<p>修改价格</p>
|
|
|
- <input type="text" name="shop_id" style="display: none">
|
|
|
<div class="mutiple-specifications">
|
|
|
<div v-for="(item,index) in scope.row.skuList">
|
|
|
<span>{{item.modelName}}</span>
|
|
|
@@ -308,7 +307,7 @@
|
|
|
{{scope.row.goodsName}}
|
|
|
</div>
|
|
|
<div>
|
|
|
- <span>月售</span>
|
|
|
+ <span>月售{{scope.row.salesCount}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -364,7 +363,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-dialog :title="editTypeTitle" :class="isMobile ? 'el-dialog' : ''" :fullscreen="isMobile" :visible.sync="typeDialogVisible" :before-close="closeDia" width="600px">
|
|
|
+ <el-dialog title="分类" :class="isMobile ? 'el-dialog' : ''" :fullscreen="isMobile" :visible.sync="typeDialogVisible" :before-close="closeDia" width="600px">
|
|
|
<div class="container" >
|
|
|
<div class="form-box">
|
|
|
<el-form ref="form" :model="editTypeForm" label-width="100px" style="width: 500px">
|
|
|
@@ -602,7 +601,6 @@ export default {
|
|
|
goodsTypeId: '',
|
|
|
type: 0
|
|
|
},
|
|
|
- editTypeTitle: '',
|
|
|
typeDialogVisible: false,
|
|
|
uploadData: {},
|
|
|
goodsId: '',
|
|
|
@@ -721,6 +719,7 @@ this.$axios.post(this.updateSortUrl,querystring.stringify({
|
|
|
this.$message.error(res.data.rtnBean.rtnMsg);
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
+ console.error(error);
|
|
|
});
|
|
|
},
|
|
|
|
|
|
@@ -763,6 +762,7 @@ this.$axios.post(this.getTypeUrl,querystring.stringify({
|
|
|
})).then(res => {
|
|
|
this.storeGoodsTypeList = res.data.list;
|
|
|
}).catch(error => {
|
|
|
+ console.error(error);
|
|
|
});
|
|
|
},
|
|
|
getDataList() {
|
|
|
@@ -778,6 +778,7 @@ this.$axios.post(this.url,querystring.stringify({
|
|
|
item.id = index + 1
|
|
|
})
|
|
|
}).catch(error => {
|
|
|
+ console.error(error);
|
|
|
});
|
|
|
},
|
|
|
getGoodsList() {
|
|
|
@@ -799,6 +800,7 @@ this.$axios.post(this.goodsUrl,querystring.stringify({
|
|
|
this.total = this.allGoodsList.length;
|
|
|
this.updatePageData();
|
|
|
}).catch(error => {
|
|
|
+ console.error(error);
|
|
|
});
|
|
|
},
|
|
|
updatePageData() {
|
|
|
@@ -834,11 +836,9 @@ this.$axios.post(this.updateNameUrl, querystring.stringify({
|
|
|
if (res.data.rtnBean.rtnCode === 0) {
|
|
|
this.$message.success("更新成功!");
|
|
|
document.body.click();
|
|
|
- this.updateNameVisible = false;
|
|
|
this.getGoodsList();
|
|
|
} else {
|
|
|
document.body.click();
|
|
|
- this.updateNameVisible = false;
|
|
|
this.$message.error(res.data.rtnBean.rtnMsg);
|
|
|
}
|
|
|
}).catch((error) => {
|
|
|
@@ -943,7 +943,6 @@ this.$axios.post(this.checkSpecialUrl, querystring.stringify({
|
|
|
},
|
|
|
canceUpdatePrice() {
|
|
|
this.skuList = []
|
|
|
- this.updatePriceVisible = false
|
|
|
this.getGoodsList()
|
|
|
document.body.click()
|
|
|
},
|
|
|
@@ -990,6 +989,7 @@ this.$axios.post(this.changeOrderKeyUrl,querystring.stringify({
|
|
|
this.goodsList = []
|
|
|
this.getDataList();
|
|
|
}).catch(error => {
|
|
|
+ console.error(error);
|
|
|
});
|
|
|
},
|
|
|
updateType(item) {
|
|
|
@@ -1058,13 +1058,13 @@ this.$axios.post(this.url,querystring.stringify({
|
|
|
this.pageNum = 1
|
|
|
this.getGoodsList()
|
|
|
}).catch(error => {
|
|
|
+ console.error(error);
|
|
|
});
|
|
|
},
|
|
|
clickType(item) {
|
|
|
if (this.isSort){
|
|
|
return;
|
|
|
}
|
|
|
- this.updateNameVisible = false
|
|
|
this.goodsTypeList.forEach(item => {
|
|
|
item.selected = false
|
|
|
})
|
|
|
@@ -1117,6 +1117,7 @@ this.$axios.post(this.updateTypeUrl,querystring.stringify({
|
|
|
this.$message.error(res.data.rtnBean.rtnMsg);
|
|
|
}
|
|
|
}).catch(error => {
|
|
|
+ console.error(error);
|
|
|
});
|
|
|
|
|
|
},
|
|
|
@@ -1265,7 +1266,7 @@ this.$axios.post(this.updateTypeUrl,querystring.stringify({
|
|
|
} else if (this.goodsInfo.goodsTypeId == null || this.goodsInfo.goodsTypeId === '') {
|
|
|
this.$message.error("请选择商品分类");
|
|
|
return;
|
|
|
- }else if (this.isSpecial && (this.goodsInfo.goodsTypeId !== null || this.goodsInfo.goodsTypeId !== '')
|
|
|
+ }else if (this.isSpecial && this.goodsInfo.goodsTypeId != null && this.goodsInfo.goodsTypeId !== ''
|
|
|
&& this.goodsTypeList.filter((item) =>{return item.goodsTypeId === this.goodsInfo.goodsTypeId})[0].type === 1) {
|
|
|
this.$message.error("特价菜不能修改为必选商品");
|
|
|
return;
|
|
|
@@ -1276,10 +1277,7 @@ this.$axios.post(this.updateTypeUrl,querystring.stringify({
|
|
|
let that = this
|
|
|
let aoo = true
|
|
|
if(that.propertyBeanList != null && that.propertyBeanList.length > 0) {
|
|
|
- let num = false
|
|
|
- if (that.propertyBeanList.length > 0 || that.propertyBeanList[0].propertyName || that.propertyBeanList[0].propertyList) {
|
|
|
- num = true
|
|
|
- }
|
|
|
+ let num = that.propertyBeanList.length > 0
|
|
|
for (let i = 0; i < that.propertyBeanList.length; i++) {
|
|
|
if (num){
|
|
|
if (that.propertyBeanList[i].propertyName == null || that.propertyBeanList[i].propertyName === '') {
|