|
@@ -37,7 +37,7 @@
|
|
|
|
|
|
|
|
import { getList } from '@/api/classifyManage/itemInformation';
|
|
import { getList } from '@/api/classifyManage/itemInformation';
|
|
|
import ProductSearch from './product-search.vue'
|
|
import ProductSearch from './product-search.vue'
|
|
|
-import { getTreeByPid } from '@/api/classifyManage';
|
|
|
|
|
|
|
+import { getTreeByGroup } from '@/api/classifyManage';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
ProductSearch
|
|
ProductSearch
|
|
@@ -177,7 +177,7 @@ export default {
|
|
|
try {
|
|
try {
|
|
|
this.treeLoading = true;
|
|
this.treeLoading = true;
|
|
|
|
|
|
|
|
- const res = await getTreeByPid(1);
|
|
|
|
|
|
|
+ const res = await getTreeByGroup({type: 3});
|
|
|
this.treeLoading = false;
|
|
this.treeLoading = false;
|
|
|
if (res?.code === '0') {
|
|
if (res?.code === '0') {
|
|
|
this.treeList = res.data;
|
|
this.treeList = res.data;
|
|
@@ -227,7 +227,7 @@ export default {
|
|
|
this.$message.error('请至少选择一条数据');
|
|
this.$message.error('请至少选择一条数据');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if (this.type == 'add') {
|
|
|
|
|
|
|
+
|
|
|
_arr = this.selection.map(m => {
|
|
_arr = this.selection.map(m => {
|
|
|
m.categoryId = m.id
|
|
m.categoryId = m.id
|
|
|
m.unit = m.measuringUnit
|
|
m.unit = m.measuringUnit
|
|
@@ -236,7 +236,8 @@ export default {
|
|
|
...m
|
|
...m
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
this.$emit('chooseModal', _arr, this.current)
|
|
this.$emit('chooseModal', _arr, this.current)
|
|
|
this.handleClose()
|
|
this.handleClose()
|