ysy 1 tahun lalu
induk
melakukan
1b2d242cb0
2 mengubah file dengan 17 tambahan dan 4 penghapusan
  1. 11 0
      src/api/material/BOM.js
  2. 6 4
      src/views/material/BOMmanage/index.vue

+ 11 - 0
src/api/material/BOM.js

@@ -240,6 +240,17 @@ export async function jsBomSubmit(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
+// 嘉实设备提交
+
+export async function deviceBomSubmit(data) {
+  const res = await request.post(`/bpm/jsbom/deviceSubmit`, data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
 
 
 // 新增工序

+ 6 - 4
src/views/material/BOMmanage/index.vue

@@ -38,7 +38,7 @@
             <el-link type="primary" @click="handelDetail(row)">详情</el-link>
 
             <el-link
-              v-if="row.approvalStatusOpt == 0  || row.approvalStatusOpt == 3"
+              v-if="row.status != 1 && (row.approvalStatus == 0  || row.approvalStatus == 3)"
               type="primary"
               @click="handSubmit(row)"
               >发布</el-link
@@ -47,7 +47,7 @@
             <el-link
               type="danger"
               :underline="false"
-              v-if="activeName == 1 && (row.approvalStatusOpt == 0  || row.approvalStatusOpt == 3)"
+              v-if="activeName == 1 && row.status != 1 && (row.approvalStatus == 0  || row.approvalStatus == 3)"
               @click="handDel(row)"
             >
               删除
@@ -85,6 +85,7 @@
     startAndStop,
     bomSubmit,
     jsBomSubmit,
+    deviceBomSubmit,
     deleteBomTreeList
   } from '@/api/material/BOM';
   import LCdetail from './components/LCdetail.vue';
@@ -261,7 +262,7 @@
       },
 
       handJsSubmit() {
-        let URL = this.radioSubmit == 1 ? jsBomSubmit : bomSubmit;
+        let URL = this.radioSubmit == 1 ? jsBomSubmit : deviceBomSubmit;
         this.$alert('确定要发布吗?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
@@ -269,9 +270,10 @@
         })
           .then(() => {
             URL({ businessId: this.JsRId }).then((res) => {
+              this.isSubmit = false;
               this.$message.success('发布成功');
               this.reload();
-              this.isSubmit = false;
+           
             });
           })
           .catch(() => {});