Procházet zdrojové kódy

feat:商品分类管理-去掉工单大类和工单小类

Moss před 1 rokem
rodič
revize
bade50d43b

+ 1 - 56
src/views/mallManagement/goods/classify_index/index.vue

@@ -119,26 +119,6 @@
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
-							<el-form-item label="工单大类" prop="main">
-							  <el-select v-model="addChildForm.main" value-key="categoryId" placeholder="请选择工单大类" style="width: 250px;" @change="changeOrderType">
-							    <el-option :label="item.name" :value="item" v-for="(item, index) in orderMainType" :key="index">
-							     <!-- <span style="color: #8492a6">{{ item.number }}</span>
-							      <span style="margin-left: 10px;">{{ item.name }}</span> -->
-							    </el-option>
-							  </el-select>
-							</el-form-item>
-						</el-col>
-						<el-col :span="6">
-							<el-form-item label="工单小类" prop="smallType">
-							  <el-select v-model="addChildForm.small" value-key="categoryId" placeholder="请选择工单小类" style="width: 250px;" :disabled="!addChildForm.main.name">
-							    <el-option :label="item.name" :value="item" v-for="(item, index) in orderSmallType" :key="index">
-							     <!-- <span style="color: #8492a6">{{ item.id }}</span>
-							      <span style="margin-left: 10px;">{{ item.name }}</span> -->
-							    </el-option>
-							  </el-select>
-							</el-form-item>
-						</el-col>
-						<el-col :span="6">
 							<el-form-item label="工单类型" prop="workOrderType">
 							  <el-radio-group v-model="addChildForm.workOrderType">
 							    <el-radio :label="'INSTALL'">安装</el-radio>
@@ -197,7 +177,7 @@
 
 <script>
 import { getToken } from '@/utils/auth'
-import { getClassifyList, addClassify, editClassify, deleteClassify, getClassifyDetail, getSmallType } from '@/api/goods'
+import { getClassifyList, addClassify, editClassify, deleteClassify, getClassifyDetail } from '@/api/goods'
 import { ORDER_MAIN_TYPE } from "@/utils/select_data";
 import { getMainList } from "@/api/workOrder/settlementStandardInstall";
 
@@ -240,8 +220,6 @@ export default {
       addChildForm: {
         oneClassify: '',
         twoClassify: '',
-		main: {},
-        small: {},
         workOrderType: 'REPAIR',
         imgUrl: '',
         taxNumber: '',
@@ -380,22 +358,6 @@ export default {
       })
     },
 
-    // 改变大类
-    changeOrderType(e) {
-		this.orderSmallType = e.children
-		this.addChildForm.small = {};
-		// this.getSmallType();
-    },
-
-    getSmallType() {
-      getSmallType({
-        mainNumber: this.addChildForm.orderType,
-        categoryId: this.addChildForm.oneClassify
-      }).then(res => {
-        this.orderSmallType = res.data;
-      })
-    },
-
     // 打开 新增编辑 二级分类
     addOrEditChild(type, cid) {
 		this.$refs.tabPage.addTab({
@@ -435,8 +397,6 @@ export default {
 							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,
@@ -444,7 +404,6 @@ export default {
 								status: res.data.status,
 								sort: res.data.sortNum
 							}
-							// this.getSmallType();
 						})
 					}
 				})
@@ -466,21 +425,11 @@ export default {
     submitAddChildForm(cancel) {
       this.$refs.addChildForm.validate((valid) => {
         if (valid) {
-          // let index = this.$findElem(ORDER_MAIN_TYPE, 'number', this.addChildForm.orderType);
-          // let mainName = index >= 0 ? ORDER_MAIN_TYPE[index].name : '';
-
-          // let index2 = this.$findElem(this.orderSmallType, 'id', this.addChildForm.smallType);
-          // let smallName = index2 >= 0 ? this.orderSmallType[index2].name : '';
-          
           let params = {}
           if(this.addChildFormType == 'edit2') {
             params = {
                 categoryId: this.editChildId,
                 name: this.addChildForm.twoClassify,
-                mainNumber: this.addChildForm.main.categoryId || '',
-                mainName: this.addChildForm.main.name || '',
-                smallNumber: this.addChildForm.small.categoryId || '',
-                smallName: this.addChildForm.small.name,
                 workOrderType: this.addChildForm.workOrderType,
                 imgUrl: this.addChildForm.imgUrl,
                 taxNumber: this.addChildForm.taxNumber,
@@ -499,10 +448,6 @@ export default {
               children: [{
                 parentId: this.addChildForm.oneClassify,
                 name: this.addChildForm.twoClassify,
-                mainNumber: this.addChildForm.main.categoryId || '',
-                mainName: this.addChildForm.main.name || '',
-                smallNumber: this.addChildForm.small.categoryId || '',
-                smallName: this.addChildForm.small.name,
                 imgUrl: this.addChildForm.imgUrl,
                 taxNumber: this.addChildForm.taxNumber,
                 taxPercent: this.addChildForm.taxPercent,