Browse Source

刀具设备同步接口增加

yejian 3 years ago
parent
commit
3ac0ac4641

+ 10 - 0
imcs-ui/src/api/prepareProductMgr/machineCustomizeCuttingTool.js

@@ -32,6 +32,10 @@ const apiList = {
   list: {
     method: 'POST',
     url: `/authority/machineCuttingTool/query`
+  },
+  sysCuttingTools: {
+    method: 'POST',
+    url: `/authority/machineCuttingTool/sysCuttingTools`
   }
 }
 
@@ -84,4 +88,10 @@ export default {
       data
     })
   },
+  sysCuttingTools (data) {
+    return axiosApi({
+      ...apiList.sysCuttingTools,
+      data
+    })
+  },
 }

+ 10 - 10
imcs-ui/src/views/zuihou/prepareProductMgr/cuttingToolMgr/components/machineCuttingTool/index.vue

@@ -262,7 +262,7 @@
       sysMachineCuttingTools(row){
           this.$refs.table.clearSelection()
           this.$refs.table.toggleRowSelection(row, true)
-          this.batchSysMachineCuttingTools()
+          this.sysCuttingTools(row.id)
       },
 
       batchSysMachineCuttingTools(){
@@ -273,14 +273,14 @@
             })
             return
         }
-        console.log(this.selection.length)
-        if (this.selection.length > 1) {
-            this.$message({
-                message: this.$t("tips.mustOne"),
-                type: "warning"
-            })
-            return
-        }
+        // console.log(this.selection.length)
+        // if (this.selection.length > 1) {
+        //     this.$message({
+        //         message: this.$t("tips.mustOne"),
+        //         type: "warning"
+        //     })
+        //     return
+        // }
 
         const ids = []
         this.selection.forEach(item => {
@@ -290,7 +290,7 @@
       },
 
       sysCuttingTools (ids) {
-        equipmentMgrApi.sysCuttingTools({ ids: ids }).then(response => {
+        machineCustomizeCuttingToolMgrApi.sysCuttingTools({ ids: ids }).then(response => {
           const res = response.data
           if (res.isSuccess) {
             this.$message({