فهرست منبع

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend into dev

yusheng 6 ماه پیش
والد
کامیت
ea5d26afa8

+ 9 - 0
src/api/material/list.js

@@ -160,4 +160,13 @@ export async function getProduceTreeByPid(parentId) {
     return res.data;
     return res.data;
   }
   }
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
+}  
+
+export async function changeOnOff(id) {
+  const res = await request.post(`/main/category/changeOnOff/${id}`);
+  console.log('changeOnOff', res);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
 }
 }

+ 29 - 1
src/views/material/product/components/index-data.vue

@@ -141,6 +141,20 @@
         >-->
         >-->
       </template>
       </template>
 
 
+      <template v-slot:isEnabled="{ row }">
+        <div>
+          <el-switch
+            v-model="row.isEnabled"
+            active-color="#13ce66"
+            inactive-color="#ff4949"
+            :active-value="1"
+            :inactive-value="0"
+            @change="changeEnable(row)"
+          >
+          </el-switch>
+        </div>
+      </template>
+
       <template v-slot:componentAttribute="{ row }">
       <template v-slot:componentAttribute="{ row }">
         <div>
         <div>
           <!-- {{ }} -->
           <!-- {{ }} -->
@@ -306,7 +320,8 @@
     getMaterialList,
     getMaterialList,
     removeMaterial,
     removeMaterial,
     importCategorySparePart,
     importCategorySparePart,
-    exportFile
+    exportFile,
+    changeOnOff
   } from '@/api/material/list.js';
   } from '@/api/material/list.js';
 
 
   import { getBomGetById } from '@/api/material/BOM.js';
   import { getBomGetById } from '@/api/material/BOM.js';
@@ -675,7 +690,9 @@
             prop: 'isEnabled',
             prop: 'isEnabled',
             align: 'center',
             align: 'center',
             label: '状态',
             label: '状态',
+            slot: 'isEnabled',
             showOverflowTooltip: true,
             showOverflowTooltip: true,
+            fixed: 'right',
             formatter: (row, column) => {
             formatter: (row, column) => {
               return row.isEnabled === 0
               return row.isEnabled === 0
                 ? '停用'
                 ? '停用'
@@ -736,6 +753,17 @@
     },
     },
 
 
     methods: {
     methods: {
+      async changeEnable(row) {
+        const res = await changeOnOff(row.id);
+        if (res.code == 0) {
+          this.$message({
+            type: 'success',
+            message: '修改成功',
+            customClass: 'ele-message-border'
+          });
+          this.reload();
+        }
+      },
       onSortChange(e) {
       onSortChange(e) {
         console.log(e, '99999999');
         console.log(e, '99999999');
 
 

+ 7 - 0
src/views/rulesManagement/releaseRules/components/permitAdd.vue

@@ -1248,6 +1248,13 @@
         this.formData.stopDate = new Date(info.stopDate);
         this.formData.stopDate = new Date(info.stopDate);
         this.formData.classify = this.formData.classify + '';
         this.formData.classify = this.formData.classify + '';
         this.formData.reportWorkType = this.formData.reportWorkType + '';
         this.formData.reportWorkType = this.formData.reportWorkType + '';
+        this.formData.industryType = this.formData.industryType + '';
+        this.formData.businessType = this.formData.businessType + '';
+        this.formData.reportWorkType = this.formData.reportWorkType + '';
+        this.formData.recordTemplateStyle =
+          this.formData.recordTemplateStyle + '';
+
+        console.log('this.formData~~~~', this.formData);
 
 
         this.getExecuteMethodList();
         this.getExecuteMethodList();
 
 

+ 3 - 1
src/views/technology/route/components/index-data.vue

@@ -414,12 +414,14 @@
       /* 表格数据源 */
       /* 表格数据源 */
       async datasource({ page, limit, where, order }) {
       async datasource({ page, limit, where, order }) {
         this.currentPage = page;
         this.currentPage = page;
+        // isEnabled 1:查启用  0:查停用,不传该参数查所有
         let labs = getMaterialList({
         let labs = getMaterialList({
           pageNum: page,
           pageNum: page,
           size: limit,
           size: limit,
           ...this.sort,
           ...this.sort,
           ...where,
           ...where,
-          categoryLevelId: this.currentId
+          categoryLevelId: this.currentId,
+          isEnabled: 1
         });
         });
         this.whereData = {
         this.whereData = {
           pageNum: page,
           pageNum: page,