|
@@ -34,9 +34,9 @@
|
|
<el-dropdown-item :command="['edit', v]"
|
|
<el-dropdown-item :command="['edit', v]"
|
|
>修改名称</el-dropdown-item
|
|
>修改名称</el-dropdown-item
|
|
>
|
|
>
|
|
- <el-dropdown-item :command="['del', v]"
|
|
|
|
|
|
+ <!-- <el-dropdown-item :command="['del', v]"
|
|
>删除分组</el-dropdown-item
|
|
>删除分组</el-dropdown-item
|
|
- >
|
|
|
|
|
|
+ > -->
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
</div>
|
|
</div>
|
|
@@ -46,27 +46,36 @@
|
|
<!-- 筛选条件 -->
|
|
<!-- 筛选条件 -->
|
|
<div>
|
|
<div>
|
|
<el-form
|
|
<el-form
|
|
- ref="screenForm"
|
|
|
|
|
|
+ ref="searchForm"
|
|
|
|
+ :model="searchForm"
|
|
label-width="70px"
|
|
label-width="70px"
|
|
size="small"
|
|
size="small"
|
|
label-position="left"
|
|
label-position="left"
|
|
>
|
|
>
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
- <el-form-item label="编码" prop="volume">
|
|
|
|
- <el-input placeholder="请输入"></el-input>
|
|
|
|
|
|
+ <el-form-item label="编码" prop="productCategoryNumber">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="searchForm.productCategoryNumber"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ ></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
- <el-form-item label="名称" prop="outsideName">
|
|
|
|
- <el-input placeholder="请输入"></el-input>
|
|
|
|
|
|
+ <el-form-item label="名称" prop="productCategoryName">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="searchForm.productCategoryName"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ ></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
<el-col :xs="24" :sm="24" :lg="12" class="tr">
|
|
<el-col :xs="24" :sm="24" :lg="12" class="tr">
|
|
<el-form-item label="">
|
|
<el-form-item label="">
|
|
- <el-button size="small">清空</el-button>
|
|
|
|
- <el-button size="small" type="primary">搜索</el-button>
|
|
|
|
|
|
+ <el-button size="small" @click="clearFn">清空</el-button>
|
|
|
|
+ <el-button size="small" type="primary" @click="searchFn"
|
|
|
|
+ >搜索</el-button
|
|
|
|
+ >
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -132,7 +141,7 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
- <!-- 分页 -->
|
|
|
|
|
|
+ <!-- 分页
|
|
<div class="fr">
|
|
<div class="fr">
|
|
<el-pagination
|
|
<el-pagination
|
|
:current-page="currentPage"
|
|
:current-page="currentPage"
|
|
@@ -142,7 +151,7 @@
|
|
:total="listTotal"
|
|
:total="listTotal"
|
|
>
|
|
>
|
|
</el-pagination>
|
|
</el-pagination>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -186,6 +195,7 @@
|
|
:showAddSelect.sync="showAddSelect"
|
|
:showAddSelect.sync="showAddSelect"
|
|
:data="dataList"
|
|
:data="dataList"
|
|
@updateList="updateListFn"
|
|
@updateList="updateListFn"
|
|
|
|
+ ref="updateDate"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -197,17 +207,22 @@ import {
|
|
getProductCategorySubList,
|
|
getProductCategorySubList,
|
|
getProductCategoryAdd,
|
|
getProductCategoryAdd,
|
|
getProductCategoryEdit,
|
|
getProductCategoryEdit,
|
|
|
|
+ getProductCategoryDelSub,
|
|
} from "@/api/basic_data/material";
|
|
} from "@/api/basic_data/material";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ searchForm: {
|
|
|
|
+ productCategoryNumber: "",
|
|
|
|
+ productCategoryName: "",
|
|
|
|
+ },
|
|
addGroupFormVisible: false,
|
|
addGroupFormVisible: false,
|
|
activeGroup: "",
|
|
activeGroup: "",
|
|
dataList: null, // 列表数据
|
|
dataList: null, // 列表数据
|
|
listLoading: false, // 列表加载loading
|
|
listLoading: false, // 列表加载loading
|
|
- currentPage: 1, // 当前页码
|
|
|
|
- pageSize: 10, // 每页数量
|
|
|
|
- listTotal: 0, // 列表总数
|
|
|
|
|
|
+ // currentPage: 1, // 当前页码
|
|
|
|
+ // pageSize: 10, // 每页数量
|
|
|
|
+ // listTotal: 0, // 列表总数
|
|
categoryList: [], //品类列表
|
|
categoryList: [], //品类列表
|
|
addGroupForm: {
|
|
addGroupForm: {
|
|
productCategoryName: "",
|
|
productCategoryName: "",
|
|
@@ -225,6 +240,26 @@ export default {
|
|
this.getDataList();
|
|
this.getDataList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //清空
|
|
|
|
+ clearFn() {
|
|
|
|
+ this.$refs.searchForm.resetFields();
|
|
|
|
+ },
|
|
|
|
+ //搜索
|
|
|
|
+ searchFn() {
|
|
|
|
+ this.getDataList({ ...this.searchForm });
|
|
|
|
+ },
|
|
|
|
+ //删除
|
|
|
|
+ async hanleDelete(id) {
|
|
|
|
+ console.log(this.dataCategory);
|
|
|
|
+ let arr = [id];
|
|
|
|
+ let res = arr.toString();
|
|
|
|
+ await getProductCategoryDelSub({ ids: res });
|
|
|
|
+ const res2 = await getProductCategorySubList({
|
|
|
|
+ id: this.dataCategory.productCategoryId,
|
|
|
|
+ });
|
|
|
|
+ this.dataList = res2.data;
|
|
|
|
+ this.$message.success("删除成功");
|
|
|
|
+ },
|
|
//更新列表
|
|
//更新列表
|
|
async updateListFn(id) {
|
|
async updateListFn(id) {
|
|
const res = await getProductCategorySubList({ id });
|
|
const res = await getProductCategorySubList({ id });
|
|
@@ -232,6 +267,7 @@ export default {
|
|
},
|
|
},
|
|
//添加类别
|
|
//添加类别
|
|
async addCategoryFn() {
|
|
async addCategoryFn() {
|
|
|
|
+ await this.$refs.updateDate.getDataList();
|
|
this.showAddSelect = true;
|
|
this.showAddSelect = true;
|
|
},
|
|
},
|
|
//取消
|
|
//取消
|