|
|
|
@ -6,69 +6,79 @@ |
|
|
|
<uni-icons type="left" size="28"></uni-icons> |
|
|
|
</view> |
|
|
|
<view class="title-name" :style="{'padding-top': menuButtonInfo.top +'px'}"> |
|
|
|
代买饭 |
|
|
|
规格管理 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="width: 100%;position: fixed;bottom: 10px;background: #fff;z-index: 99;"> |
|
|
|
<button size="default" type="default" @tap="inputDialogToggle('add')" hover-class="is-hover">添加分类</button> |
|
|
|
<button size="default" type="default" @tap="inputDialogToggle('add')" hover-class="is-hover">添加规格</button> |
|
|
|
</view> |
|
|
|
<view class="card-list"> |
|
|
|
<ul> |
|
|
|
<li v-for="(item, index) in indexList" :key="index" @tap="clickList(item)"> |
|
|
|
<view class="name"> |
|
|
|
<text>{{item.categoryName}}</text> |
|
|
|
<u-icon name="edit-pen-fill" size="22" v-if="item.categoryName != '默认分类'" @tap.stop="inputDialogToggle('edit', item)"></u-icon> |
|
|
|
<text>{{item.attributeName}}</text> |
|
|
|
<u-icon name="edit-pen-fill" size="22" v-if="item.attributeName != '默认规格'" @tap.stop="inputDialogToggle('edit', item)"></u-icon> |
|
|
|
</view> |
|
|
|
<button class="bj-btn" @tap.stop="goGategoryLow(item.id)">编辑规格</button> |
|
|
|
<button class="bj-btn" @tap.stop="goGategoryLow(item)">管理属性</button> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</view> |
|
|
|
<u-modal :show="show" :title="'删除'" :content="'是否确认删除此分类?'" showCancelButton="true" @cancel="show = false" |
|
|
|
<u-modal :show="show" :title="'删除'" :content="'是否确认删除此规格?'" showCancelButton="true" @cancel="show = false" |
|
|
|
@confirm="delItemModal"></u-modal> |
|
|
|
<uni-popup ref="inputDialog" type="dialog"> |
|
|
|
<uni-popup-dialog ref="inputClose" mode="input" :title="dialogTit" :value="inputVal" placeholder="请输入名称" |
|
|
|
@confirm="dialogInputConfirm" @close="dialogClose"> |
|
|
|
</uni-popup-dialog> |
|
|
|
</uni-popup> |
|
|
|
<uni-popup ref="delDialog" type="dialog"> |
|
|
|
<view class="type-popup" style="width:100%;margin-bottom: 0;border-radius: 0;height: 650rpx;border-radius: 10px;"> |
|
|
|
<view style="height: 120rpx;font-size: 36rpx;font-weight: bold;line-height: 120rpx;text-align: center;"> |
|
|
|
编辑分类 |
|
|
|
</view> |
|
|
|
<view style="height: 80rpx;font-size: 28rpx;line-height: 80rpx;text-align: center;"> |
|
|
|
请在下方输入框中输入分类名 |
|
|
|
</view> |
|
|
|
<view style="width: 90%;margin: 40rpx auto 0;"> |
|
|
|
分类名称: |
|
|
|
<uni-easyinput type="text" v-model="inputVal" @blur="handleBlur" placeholder="请输入规格值" /> |
|
|
|
</view> |
|
|
|
<view style="width: 90%;margin: 40rpx auto 0;"> |
|
|
|
排序:<uni-easyinput type="text" v-model="sortTextEdit" @blur="handleBlurSort" placeholder="可设置排序" /> |
|
|
|
|
|
|
|
<uni-popup ref="delDialog" background-color="#fff"> |
|
|
|
<view class="add-popup-content"> |
|
|
|
<view class="add-popup-title"> |
|
|
|
<text>编辑规格</text> |
|
|
|
<uni-icons @tap='close' type="closeempty" color='red' size="16" |
|
|
|
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons> |
|
|
|
</view> |
|
|
|
<view style="width: 100%;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 0;color: #fff;display: flex;position: absolute;bottom: 0;"> |
|
|
|
<view style="flex: 1;background: linear-gradient(90deg, #60F3FF, #088FEB);" v-if="inputVal != '默认分类'" @tap="dialogDel">删除</view> |
|
|
|
<view style="flex: 1;background: linear-gradient(90deg, #FF9797, #FFC1E0);" @tap="dialogInputConfirm">确认</view> |
|
|
|
<view class="add-popup-container"> |
|
|
|
<view style="width: 90%;margin: 40rpx auto 0;"> |
|
|
|
规格名称: |
|
|
|
<uni-easyinput type="text" v-model="inputVal" @blur="handleBlur" placeholder="请输入规格值" /> |
|
|
|
</view> |
|
|
|
<view style="width: 100%;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 0;color: #fff;display: flex;position: absolute;bottom: 0;"> |
|
|
|
<view style="flex: 1;background: linear-gradient(90deg, #60F3FF, #088FEB);" v-if="inputVal != '默认规格'" @tap="dialogDel">删除</view> |
|
|
|
<view style="flex: 1;background: linear-gradient(90deg, #FF9797, #FFC1E0);" @tap="dialogInputConfirm">确认</view> |
|
|
|
</view> |
|
|
|
<!-- <ul> |
|
|
|
<li v-for="(item,index) in defaultList" :key="index"> |
|
|
|
<view class="title-fur"> |
|
|
|
<view class="name">{{item.name}}</view> |
|
|
|
<u-icon size="20" name="plus" color="#5fd9ee" |
|
|
|
@tap="toggle(index) "></u-icon> |
|
|
|
</view> |
|
|
|
<view class="content-fur"> |
|
|
|
<view class="content-low" :class="item1.checked?'checked':''" v-for="(item1,index1) in item.list" :key="index1" |
|
|
|
@tap.stop="addMultipleType(item,item1.value,index1)">{{item1.value}}</view> |
|
|
|
</view> |
|
|
|
</li> |
|
|
|
</ul> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
<!-- 添加分类弹出层 --> |
|
|
|
<!-- 添加规格弹出层 --> |
|
|
|
<uni-popup ref="addTypeDialog" background-color="#fff"> |
|
|
|
<view class="add-popup-content"> |
|
|
|
<view class="add-popup-title"> |
|
|
|
<text>新增分类</text> |
|
|
|
<text>新增规格</text> |
|
|
|
<uni-icons @tap='close' type="closeempty" color='red' size="16" |
|
|
|
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons> |
|
|
|
</view> |
|
|
|
<view class="add-popup-container"> |
|
|
|
<view> |
|
|
|
<text style="color:red;font-size:22rpx;">*您可以点击默认项快捷添加分类,如没有想要的快捷项,可以手动输入</text> |
|
|
|
<text style="color:red;font-size:22rpx;">*您可以点击默认项快捷添加规格,如没有想要的快捷项,可以手动输入</text> |
|
|
|
</view> |
|
|
|
<input type="text" v-model="typeText" style="width: 100%;border: 1px solid #eee;height: 80rpx;padding-left: 20rpx;margin:20rpx 0;font-size: 25rpx;line-height: 80rpx;" |
|
|
|
placeholder="请输入分类名称"> |
|
|
|
<input type="text" v-model="sortText" style="width: 100%;border: 1px solid #eee;height: 80rpx;padding-left: 20rpx;margin:20rpx 0;font-size: 25rpx;line-height: 80rpx;" |
|
|
|
placeholder="可设置分类排序"> |
|
|
|
<ul> |
|
|
|
placeholder="请输入规格名称"> |
|
|
|
<!-- <ul> |
|
|
|
<li v-for="(item,index) in defaultList" :key="index"> |
|
|
|
<view class="title-fur"> |
|
|
|
<view class="name">{{item.name}}</view> |
|
|
|
@ -80,20 +90,47 @@ |
|
|
|
@tap.stop="addMultipleType(item,item1.value,index1)">{{item1.value}}</view> |
|
|
|
</view> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</ul> --> |
|
|
|
<view class="add-popup-bottom"> |
|
|
|
<view class="add-popup-btn" @tap="dialogInputConfirm(typeText)">确认</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
|
|
|
|
<uni-popup ref="attrValueDialog" background-color="#fff"> |
|
|
|
<view class="add-popup-content"> |
|
|
|
<view class="add-popup-title"> |
|
|
|
<text>管理属性</text> |
|
|
|
<uni-icons @tap='close' type="closeempty" color='red' size="16" |
|
|
|
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons> |
|
|
|
</view> |
|
|
|
<view class="add-popup-container"> |
|
|
|
<view> |
|
|
|
<text style="color:red;font-size:22rpx;">*您可以点击默认项快捷添加属性,如没有想要的快捷项,可以手动输入</text> |
|
|
|
</view> |
|
|
|
<u-icon size="20" name="plus" color="#5fd9ee" |
|
|
|
@tap="toggle() "></u-icon> |
|
|
|
<ul> |
|
|
|
<li v-for="(item,index) in defaultList" :key="index"> |
|
|
|
<view class="title-fur"> |
|
|
|
<view class="name">{{item.value}}</view> |
|
|
|
<view style="flex: 1;background: linear-gradient(90deg, #60F3FF, #088FEB);" v-if="inputVal != '默认规格'" @tap="editValue(item)">修改</view> |
|
|
|
<view style="flex: 1;background: linear-gradient(90deg, #60F3FF, #088FEB);" v-if="inputVal != '默认规格'" @tap="delValue(item)">删除</view> |
|
|
|
</view> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
|
|
|
|
<!-- 查看商品库存弹出层 --> |
|
|
|
<uni-popup ref="carPopup" background-color="#fff"> |
|
|
|
<view class="popup-content" style="height:auto !important;"> |
|
|
|
<view style="font-size: 36rpx;font-weight: bold;text-align: center;">提示</view> |
|
|
|
<view v-if="goodsList !=''" |
|
|
|
style="width:100%;font-weight:bold;text-align: center;font-size: 28rpx;margin: 20rpx 0;"> |
|
|
|
“{{goodsList[0].productName}}”分类下有以下库存,确认继续删除吗? |
|
|
|
“{{goodsList[0].productName}}”规格下有以下库存,确认继续删除吗? |
|
|
|
</view> |
|
|
|
<view class="tui-order-item boxbg"> |
|
|
|
<view style="display: flex;border-bottom: 1px solid #eee;height: 50rpx;line-height: 50rpx;"> |
|
|
|
@ -124,8 +161,14 @@ |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
<uni-popup ref="addDialog" type="dialog"> |
|
|
|
<uni-popup-dialog ref="addClose" mode="input" :title="'请输入规格名'" :value="specVal" placeholder="请输入规格名称" |
|
|
|
@confirm="addSpec" @close="dialogClose"> |
|
|
|
<uni-popup-dialog |
|
|
|
ref="addClose" |
|
|
|
mode="input" |
|
|
|
:title="'请输入属性名'" |
|
|
|
v-model="specVal" |
|
|
|
placeholder="请输入属性名称" |
|
|
|
@confirm="addSpec" |
|
|
|
@close="dialogClose"> |
|
|
|
</uni-popup-dialog> |
|
|
|
</uni-popup> |
|
|
|
</view> |
|
|
|
@ -148,7 +191,7 @@ |
|
|
|
isOpenId: '', |
|
|
|
delType: '', |
|
|
|
goodsList: [], |
|
|
|
dialogTit: '输入分类名', |
|
|
|
dialogTit: '输入规格名', |
|
|
|
typeText:'', |
|
|
|
sortText:'', |
|
|
|
sortTextEdit:'', |
|
|
|
@ -279,6 +322,9 @@ |
|
|
|
checked:false |
|
|
|
}] |
|
|
|
}], |
|
|
|
attrId:'', |
|
|
|
valueEditId:'', |
|
|
|
isEdieValue:false, |
|
|
|
multipleList:[] |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -298,21 +344,34 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.attrId = uni.getStorageSync('attrId'); |
|
|
|
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() |
|
|
|
this.getGategoryList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
//初始化获取分类列表 |
|
|
|
getGategoryList() { |
|
|
|
this.tui.request("/dictData/getByCondition", "get", { |
|
|
|
name: "", |
|
|
|
status: "", |
|
|
|
pageNumber: 1, |
|
|
|
pageSize: 100000, |
|
|
|
sort: sortOrder, |
|
|
|
order: asc, |
|
|
|
dictId: 2026945661353725952 |
|
|
|
editValue(item){ |
|
|
|
this.isEdieValue = true |
|
|
|
this.valueEditId = item.id |
|
|
|
this.specVal = item.value |
|
|
|
this.$refs.addDialog.open() |
|
|
|
}, |
|
|
|
delValue(item){ |
|
|
|
this.tui.request("/app/productAttributeValue/delById", "post", { |
|
|
|
id: item.id |
|
|
|
}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.tui.toast("删除成功") |
|
|
|
this.goGategoryLow(this.editItem) |
|
|
|
this.$forceUpdate() |
|
|
|
} else { |
|
|
|
this.tui.toast("添加失败") |
|
|
|
} |
|
|
|
|
|
|
|
}).catch((res) => {}) |
|
|
|
}, |
|
|
|
//初始化获取规格列表 |
|
|
|
getGategoryList() { |
|
|
|
this.tui.request("/app/productAttribute/selectByCategoryId", "post", {categoryId:this.attrId}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.indexList = res.result; |
|
|
|
} else { |
|
|
|
@ -324,14 +383,13 @@ |
|
|
|
inputDialogToggle(type, item, parent) { |
|
|
|
this.typeModel = type; |
|
|
|
if (type == 'edit') { |
|
|
|
this.inputVal = item.categoryName; |
|
|
|
this.inputVal = item.attributeName; |
|
|
|
this.editItem = item; |
|
|
|
this.sortTextEdit = (this.editItem.sort == null || this.editItem.sort == 'null') ? '' : this.editItem.sort |
|
|
|
this.$refs.delDialog.open('bottom') |
|
|
|
} else if (type == 'add') { |
|
|
|
this.inputVal = ''; |
|
|
|
this.isOpenId = item; |
|
|
|
this.dialogTit = '输入分类名' |
|
|
|
this.dialogTit = '输入规格名' |
|
|
|
this.$refs.addTypeDialog.open('bottom') |
|
|
|
} |
|
|
|
|
|
|
|
@ -345,7 +403,7 @@ |
|
|
|
handleBlurSort(e){ |
|
|
|
this.sortTextEdit = e.detail.value |
|
|
|
}, |
|
|
|
//查询分类下有没有库存 |
|
|
|
//查询规格下有没有库存 |
|
|
|
getTypeToNum(id) { |
|
|
|
let that = this; |
|
|
|
this.tui.request("/app/stock/getlistByAttributeList", "post", { |
|
|
|
@ -363,7 +421,7 @@ |
|
|
|
if (res1.result.length > 0) { |
|
|
|
uni.showModal({ |
|
|
|
title: "提示", |
|
|
|
content: "此分类已经维护了子分类,确定继续删除吗?", |
|
|
|
content: "此规格已经维护了子规格,确定继续删除吗?", |
|
|
|
success: function(res2) { |
|
|
|
if (res2.confirm) { |
|
|
|
that.delItemModal() |
|
|
|
@ -391,26 +449,50 @@ |
|
|
|
back() { |
|
|
|
uni.navigateBack() |
|
|
|
}, |
|
|
|
toggle(index){ |
|
|
|
this.addIndex = index |
|
|
|
toggle(){ |
|
|
|
this.specVal = '' |
|
|
|
this.isEdieValue = false |
|
|
|
this.$refs.addDialog.open() |
|
|
|
}, |
|
|
|
addSpec(e){ |
|
|
|
|
|
|
|
let data = { |
|
|
|
value:e, |
|
|
|
checked:false |
|
|
|
let that = this; |
|
|
|
if(this.isEdieValue){ |
|
|
|
that.tui.request("/app/productAttributeValue/edit", "post", { |
|
|
|
id: that.valueEditId, |
|
|
|
value:e |
|
|
|
}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
that.tui.toast("修改成功") |
|
|
|
that.goGategoryLow(that.editItem) |
|
|
|
that.$forceUpdate() |
|
|
|
} else { |
|
|
|
that.tui.toast("添加失败") |
|
|
|
} |
|
|
|
|
|
|
|
}).catch((res) => {}) |
|
|
|
}else{ |
|
|
|
that.tui.request("/app/productAttributeValue/save", "post", { |
|
|
|
attributeId: that.editItem.id, |
|
|
|
value:e |
|
|
|
}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
that.tui.toast("添加成功") |
|
|
|
that.goGategoryLow(that.editItem) |
|
|
|
that.$forceUpdate() |
|
|
|
} else { |
|
|
|
that.tui.toast("添加失败") |
|
|
|
} |
|
|
|
|
|
|
|
}).catch((res) => {}) |
|
|
|
} |
|
|
|
this.defaultList[this.addIndex].list.push(data) |
|
|
|
this.$refs.addClose.val = '' |
|
|
|
}, |
|
|
|
//分类编辑(新增,修改) |
|
|
|
//规格编辑(新增,修改) |
|
|
|
dialogInputConfirm(e) { |
|
|
|
let that = this; |
|
|
|
switch (that.typeModel) { |
|
|
|
case 'add': |
|
|
|
for (let i = 0; i < that.indexList.length; i++) { |
|
|
|
if (that.indexList[i].categoryName == e) { |
|
|
|
if (that.indexList[i].attributeName == e) { |
|
|
|
uni.showToast({ |
|
|
|
title: "请勿重复添加!", |
|
|
|
icon: 'error' |
|
|
|
@ -419,72 +501,16 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
if(e == ''){ |
|
|
|
that.tui.toast("请输入分类名") |
|
|
|
that.tui.toast("请输入规格名") |
|
|
|
return |
|
|
|
} |
|
|
|
if(e != '' && that.multipleList == ''){ |
|
|
|
that.multipleList = [{ |
|
|
|
attributeName:'颜色', |
|
|
|
productAttributeValueVoList:[{ |
|
|
|
checked: true, |
|
|
|
value: "均色" |
|
|
|
}] |
|
|
|
},{ |
|
|
|
attributeName:'尺码', |
|
|
|
productAttributeValueVoList:[{ |
|
|
|
checked: true, |
|
|
|
value: "均码" |
|
|
|
}] |
|
|
|
}] |
|
|
|
}else if(e != '' && that.multipleList != ''){ |
|
|
|
for(let i=0;i<that.multipleList.length;i++){ |
|
|
|
if(that.multipleList[i].productAttributeValueVoList == ''){ |
|
|
|
if(that.multipleList[i].attributeName == '颜色'){ |
|
|
|
that.multipleList[i].productAttributeValueVoList = [{ |
|
|
|
checked: true, |
|
|
|
value: "均色" |
|
|
|
}] |
|
|
|
}else{ |
|
|
|
that.multipleList[i].productAttributeValueVoList = [{ |
|
|
|
checked: true, |
|
|
|
value: "均码" |
|
|
|
}] |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if(that.multipleList.length != 2){ |
|
|
|
if(that.multipleList[i].attributeName == '颜色'){ |
|
|
|
let data = { |
|
|
|
attributeName:'尺码', |
|
|
|
productAttributeValueVoList:[{ |
|
|
|
checked: true, |
|
|
|
value: "均码" |
|
|
|
}] |
|
|
|
} |
|
|
|
that.multipleList.push(data) |
|
|
|
}else{ |
|
|
|
let data = { |
|
|
|
attributeName:'颜色', |
|
|
|
productAttributeValueVoList:[{ |
|
|
|
checked: true, |
|
|
|
value: "均码" |
|
|
|
}] |
|
|
|
} |
|
|
|
that.multipleList.push(data) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
that.tui.request("/app/productCategory/batchSaveCategoryAndAttribute", "post", { |
|
|
|
categoryName: e, |
|
|
|
sort: that.sortText, |
|
|
|
productAttributeOfAddVos:that.multipleList |
|
|
|
}, false, false).then((res) => { |
|
|
|
that.tui.request("/app/productAttribute/save", "post", { |
|
|
|
categoryId: that.attrId, |
|
|
|
attributeName:e |
|
|
|
}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
that.tui.toast("添加成功") |
|
|
|
that.$refs.addTypeDialog.close() |
|
|
|
that.sortText = '' |
|
|
|
|
|
|
|
that.getGategoryList() |
|
|
|
} else { |
|
|
|
that.tui.toast("添加失败") |
|
|
|
@ -492,18 +518,17 @@ |
|
|
|
|
|
|
|
}).catch((res) => {}) |
|
|
|
// that.$refs.addTypeDialog.val = '' |
|
|
|
for(var i=0;i<that.defaultList.length;i++){ |
|
|
|
/* for(var i=0;i<that.defaultList.length;i++){ |
|
|
|
for(var m=0;m<that.defaultList[i].list.length;m++){ |
|
|
|
that.defaultList[i].list[m].checked = false |
|
|
|
} |
|
|
|
} |
|
|
|
} */ |
|
|
|
that.typeText = '' |
|
|
|
that.multipleList = [] |
|
|
|
break; |
|
|
|
case 'edit': |
|
|
|
that.tui.request("/app/productCategory/edit", "post", { |
|
|
|
categoryName: this.inputVal, |
|
|
|
sort: that.sortTextEdit, |
|
|
|
that.tui.request("/app/productAttribute/edit", "post", { |
|
|
|
attributeName: this.inputVal, |
|
|
|
id: that.editItem.id |
|
|
|
}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
@ -537,7 +562,24 @@ |
|
|
|
}, |
|
|
|
//带删除按钮的弹窗 |
|
|
|
dialogDel() { |
|
|
|
this.delItem(this.editItem, 'del') |
|
|
|
this.tui.request("/app/productAttribute/delById", "post", { |
|
|
|
id: this.editItem.id, |
|
|
|
}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.getGategoryList() |
|
|
|
uni.showToast({ |
|
|
|
title: "删除成功", |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
this.$refs.carPopup.close() |
|
|
|
this.$refs.delDialog.close() |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: "删除失败", |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch((res) => {}) |
|
|
|
}, |
|
|
|
delItemModal() { |
|
|
|
this.show = false; |
|
|
|
@ -568,11 +610,23 @@ |
|
|
|
this.delItems = item; |
|
|
|
this.getTypeToNum(this.delItems.id) |
|
|
|
}, |
|
|
|
//跳转子分类页 |
|
|
|
goGategoryLow(id) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/package1/inventory/gategoryLow?id=' + id |
|
|
|
}) |
|
|
|
//跳转子规格页 |
|
|
|
goGategoryLow(item) { |
|
|
|
this.editItem = item |
|
|
|
this.tui.request("/app/productAttributeValue/selectByAttributeId", "get", { |
|
|
|
id: item.id, |
|
|
|
}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.defaultList = res.result; |
|
|
|
this.$refs.attrValueDialog.open(); |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: "删除失败", |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch((res) => {}) |
|
|
|
|
|
|
|
}, |
|
|
|
//选择多个规格保存 |
|
|
|
addMultipleType(item,item1,index){ |
|
|
|
@ -590,7 +644,7 @@ |
|
|
|
this.multipleList.push(data) |
|
|
|
}else{ |
|
|
|
for(var i=0;i<this.multipleList.length;i++){ |
|
|
|
if(this.multipleList[i].attributeName == item.name){ //同种分类 |
|
|
|
if(this.multipleList[i].attributeName == item.name){ //同种规格 |
|
|
|
|
|
|
|
|
|
|
|
for(var m=0;m<this.multipleList[i].productAttributeValueVoList.length;m++){ |
|
|
|
@ -608,7 +662,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ //不同分类 |
|
|
|
}else{ //不同规格 |
|
|
|
if(this.multipleList.length == i+1){ |
|
|
|
|
|
|
|
|
|
|
|
@ -847,7 +901,7 @@ |
|
|
|
justify-content: center; |
|
|
|
padding: 30rpx; |
|
|
|
width: 100%; |
|
|
|
height: 1300rpx; |
|
|
|
height: 400rpx; |
|
|
|
background-color: #fff; |
|
|
|
overflow: scroll; |
|
|
|
} |
|
|
|
|