|
@@ -243,6 +243,7 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
+ this.getMainList()
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
@@ -359,26 +360,27 @@ export default {
|
|
|
|
|
|
if(type == 'edit') {
|
|
|
this.editChildId = cid;
|
|
|
- getClassifyDetail({categoryId: cid}).then(res => {
|
|
|
+ getClassifyDetail({categoryId: cid}).then(res => {
|
|
|
+ console.log(this.orderMainType,'获取大类')
|
|
|
this.orderMainType.forEach(item =>{
|
|
|
if(item.categoryId == res.data.mainNumber){
|
|
|
this.orderSmallType = item.children
|
|
|
}
|
|
|
})
|
|
|
- this.addChildForm = {
|
|
|
- oneClassify: res.data.parentId,
|
|
|
- twoClassify: res.data.name,
|
|
|
- main: {name: res.data.mainName,categoryId: res.data.mainNumber},
|
|
|
- small: {name: res.data.smallName,categoryId: res.data.smallNumber},
|
|
|
- workOrderType: res.data.workOrderType,
|
|
|
- imgUrl: res.data.imgUrl,
|
|
|
- taxNumber: res.data.taxNumber,
|
|
|
- taxPercent: res.data.taxPercent,
|
|
|
- status: res.data.status,
|
|
|
- sort: res.data.sortNum
|
|
|
- }
|
|
|
- // this.getSmallType();
|
|
|
- })
|
|
|
+ this.addChildForm = {
|
|
|
+ oneClassify: res.data.parentId,
|
|
|
+ twoClassify: res.data.name,
|
|
|
+ main: {name: res.data.mainName,categoryId: res.data.mainNumber},
|
|
|
+ small: {name: res.data.smallName,categoryId: res.data.smallNumber},
|
|
|
+ workOrderType: res.data.workOrderType,
|
|
|
+ imgUrl: res.data.imgUrl,
|
|
|
+ taxNumber: res.data.taxNumber,
|
|
|
+ taxPercent: res.data.taxPercent,
|
|
|
+ status: res.data.status,
|
|
|
+ sort: res.data.sortNum
|
|
|
+ }
|
|
|
+ // this.getSmallType();
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
|