Compare commits
No commits in common. "a86973f3e08c37ee06f7f2bc8be9fed50f79390d" and "e052c52caed7f74710d43e972002e508112aa6ce" have entirely different histories.
a86973f3e0
...
e052c52cae
@ -229,12 +229,6 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "规格管理"
|
"navigationBarTitleText": "规格管理"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/warehouse/manage/TypeManagement",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "类型管理"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/warehouse/manage/batch",
|
"path": "pages/warehouse/manage/batch",
|
||||||
|
|||||||
@ -339,7 +339,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.input_icon {
|
.input_icon {
|
||||||
::v-deep .u-icon__icon {
|
/deep/ .u-icon__icon {
|
||||||
font-size: 36rpx !important;
|
font-size: 36rpx !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -496,7 +496,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.input_icon {
|
.input_icon {
|
||||||
::v-deep .u-icon__icon {
|
/deep/ .u-icon__icon {
|
||||||
font-size: 36rpx !important;
|
font-size: 36rpx !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -270,7 +270,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.input_icon {
|
.input_icon {
|
||||||
::v-deep.u-icon__icon {
|
/deep/ .u-icon__icon {
|
||||||
font-size: 36rpx !important;
|
font-size: 36rpx !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -108,9 +108,9 @@
|
|||||||
></u--input>
|
></u--input>
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="分类排序" prop="spec_order" class="form-item">
|
<u-form-item label="分类排序" prop="category_order" class="form-item">
|
||||||
<u--input
|
<u--input
|
||||||
v-model="form.spec_order"
|
v-model="form.category_order"
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="请输入商品排序"
|
placeholder="请输入商品排序"
|
||||||
border="none"
|
border="none"
|
||||||
@ -252,39 +252,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup> -->
|
</u-popup> -->
|
||||||
<u-popup
|
|
||||||
class="affirm-popup"
|
|
||||||
zIndex="10077"
|
|
||||||
:show="showDelectPopup"
|
|
||||||
mode="center"
|
|
||||||
>
|
|
||||||
<view class="affirm-popup-content">
|
|
||||||
<view class="affirm-popup-title">
|
|
||||||
确认删除"{{ currDelectItem.spec_name }}"规格?
|
|
||||||
</view>
|
|
||||||
<view class="popup-btn-list">
|
|
||||||
<u-button
|
|
||||||
class="btn-item"
|
|
||||||
:hairline="true"
|
|
||||||
:plain="true"
|
|
||||||
shape="circle"
|
|
||||||
@click="showDelectPopup = false"
|
|
||||||
>
|
|
||||||
取消
|
|
||||||
</u-button>
|
|
||||||
<u-button
|
|
||||||
class="btn-item btn-item-2"
|
|
||||||
:hairline="true"
|
|
||||||
:plain="true"
|
|
||||||
shape="circle"
|
|
||||||
@click="handerDelectClassify"
|
|
||||||
>
|
|
||||||
确认
|
|
||||||
</u-button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
<u-toast ref="uToast"></u-toast>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -309,6 +276,7 @@ export default {
|
|||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
specificationList: [],
|
specificationList: [],
|
||||||
currDelectItem: {},
|
currDelectItem: {},
|
||||||
|
currEidtItem: {},
|
||||||
showDelectPopup: false,
|
showDelectPopup: false,
|
||||||
showAddAndEditPopup: false,
|
showAddAndEditPopup: false,
|
||||||
form: {
|
form: {
|
||||||
@ -347,6 +315,7 @@ export default {
|
|||||||
let res = await GetCommodityClassify();
|
let res = await GetCommodityClassify();
|
||||||
if (res && res.status == 200) {
|
if (res && res.status == 200) {
|
||||||
const classifyList = res.data;
|
const classifyList = res.data;
|
||||||
|
|
||||||
if (classifyList.length > 0) {
|
if (classifyList.length > 0) {
|
||||||
this.baTreePickerList = classifyList.map((item) => {
|
this.baTreePickerList = classifyList.map((item) => {
|
||||||
// 创建父节点,并保留所有原始字段
|
// 创建父节点,并保留所有原始字段
|
||||||
@ -388,50 +357,11 @@ export default {
|
|||||||
this.currDelectItem = item;
|
this.currDelectItem = item;
|
||||||
this.showDelectPopup = true;
|
this.showDelectPopup = true;
|
||||||
},
|
},
|
||||||
handerShowEeditPopup(item){
|
|
||||||
this.isAdd = false
|
|
||||||
item = {
|
|
||||||
spec_category_name: "",
|
|
||||||
...item
|
|
||||||
}
|
|
||||||
this.form = item;
|
|
||||||
|
|
||||||
const findCategory = (categories, targetId) => {
|
|
||||||
for (const category of categories) {
|
|
||||||
// Check current category
|
|
||||||
if (category.category_id === targetId) {
|
|
||||||
return category;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check subcategories if they exist
|
|
||||||
if (category.children && category.children.length > 0) {
|
|
||||||
const foundInSub = findCategory(category.children, targetId);
|
|
||||||
if (foundInSub) return foundInSub;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this.baTreePickerList.length > 0){
|
|
||||||
const matchedCategory = findCategory(this.baTreePickerList, item.spec_category_id);
|
|
||||||
if (matchedCategory) {
|
|
||||||
this.form.spec_category_name = matchedCategory.category_name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.showAddAndEditPopup = true
|
|
||||||
},
|
|
||||||
hadnerShowClassifyListPopup() {
|
hadnerShowClassifyListPopup() {
|
||||||
this.$refs.tkitree._show();
|
this.$refs.tkitree._show();
|
||||||
},
|
},
|
||||||
handerAddAndEditPopup(isAdd) {
|
handerAddAndEditPopup(isAdd) {
|
||||||
this.isAdd = isAdd;
|
this.isAdd = isAdd;
|
||||||
this.form = {
|
|
||||||
spec_name: "",
|
|
||||||
spec_order: "",
|
|
||||||
spec_category_id: "",
|
|
||||||
spec_format: "text",
|
|
||||||
spec_category_name: "",
|
|
||||||
}
|
|
||||||
this.showAddAndEditPopup = true;
|
this.showAddAndEditPopup = true;
|
||||||
},
|
},
|
||||||
async handerAffirmAddAndEdit() {
|
async handerAffirmAddAndEdit() {
|
||||||
@ -444,48 +374,10 @@ export default {
|
|||||||
type: "succeed",
|
type: "succeed",
|
||||||
duration: 1000,
|
duration: 1000,
|
||||||
});
|
});
|
||||||
this.showAddAndEditPopup = false
|
|
||||||
this.getSpecificationList(true);
|
this.getSpecificationList(true);
|
||||||
this.form = {
|
|
||||||
spec_name: "",
|
|
||||||
spec_order: "",
|
|
||||||
spec_category_id: "",
|
|
||||||
spec_format: "text",
|
|
||||||
spec_category_name: "",
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async handerDelectClassify(){
|
|
||||||
let params = {
|
|
||||||
spec_ids:this.currDelectItem.spec_id
|
|
||||||
}
|
|
||||||
|
|
||||||
let res = await DelectSpecification(params)
|
|
||||||
if(res && res.status == 200){
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
message: "删除成功",
|
|
||||||
type: "succeed",
|
|
||||||
duration: 1000,
|
|
||||||
});
|
|
||||||
this.showDelectPopup = false
|
|
||||||
this.getSpecificationList()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
treeCancel(){
|
|
||||||
this.$refs.tkitree._hide();
|
|
||||||
|
|
||||||
},
|
|
||||||
treeConfirm(list){
|
|
||||||
console.log(this.form)
|
|
||||||
if(list.length > 1){
|
|
||||||
this.form.spec_category_name = list[1].category_name;
|
|
||||||
this.form.spec_category_id = list[1].category_id;
|
|
||||||
}else{
|
|
||||||
this.form.spec_category_name = list[0].category_name;
|
|
||||||
this.form.spec_category_id = list[0].category_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -564,53 +456,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.affirm-popup {
|
|
||||||
::v-deep.u-popup__content {
|
|
||||||
border-radius: 16rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep.u-fade-enter-to {
|
|
||||||
z-index: 10076 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.affirm-popup-content {
|
|
||||||
width: 600rpx;
|
|
||||||
|
|
||||||
.affirm-popup-title {
|
|
||||||
padding: 40rpx;
|
|
||||||
text-align: center;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.affirm-popup-tips {
|
|
||||||
padding: 0 60rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-btn-list {
|
|
||||||
display: flex;
|
|
||||||
margin: 50rpx;
|
|
||||||
|
|
||||||
.btn-item {
|
|
||||||
width: 46%;
|
|
||||||
height: 80rpx;
|
|
||||||
border-color: #909193;
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-item-2 {
|
|
||||||
background: $base-color;
|
|
||||||
color: #fff;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-popup {
|
.add-popup {
|
||||||
::v-deep.u-popup__content {
|
::v-deep.u-popup__content {
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
|
|||||||
@ -1,38 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="typeManagement-container">
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "typeManagement",
|
|
||||||
components: {
|
|
||||||
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {},
|
|
||||||
onLoad: function (options) {},
|
|
||||||
onReady() {},
|
|
||||||
onShow() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
@import "@/styles/variables.scss";
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@ -34,7 +34,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="warehouse-item-name">类型管理</view>
|
<view class="warehouse-item-name">类型管理</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="warehouse-item" @click="skipu('TypeManagement')">
|
<view class="warehouse-item" @click="skipu('classifyList')">
|
||||||
<view class="warehouse-item-img">
|
<view class="warehouse-item-img">
|
||||||
<u--image
|
<u--image
|
||||||
src="../../static/warehouse/classify.png"
|
src="../../static/warehouse/classify.png"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user