Przeglądaj źródła

bom 审批改为新的

yusheng 10 miesięcy temu
rodzic
commit
b281ced8be
1 zmienionych plików z 58 dodań i 34 usunięć
  1. 58 34
      src/views/material/BOMmanage/detailsPop.vue

+ 58 - 34
src/views/material/BOMmanage/detailsPop.vue

@@ -413,7 +413,13 @@
         <el-button type="primary" @click="handJsSubmit()">确 定</el-button>
       </span>
     </el-dialog>
-
+    <process-submit-dialog
+      api-fun-name="purchaseinquiryStatusAPI"
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="getTreeData"
+    ></process-submit-dialog>
     <LCdetail ref="detailRef"></LCdetail>
   </div>
 </template>
@@ -442,7 +448,7 @@
   import LCdetail from './components/LCdetail.vue';
   import routing from './components/routing.vue';
   import workmanship from './components/workmanship.vue';
-
+  import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
   export default {
     name: 'bomDetailsPop',
     components: {
@@ -453,7 +459,7 @@
       importDialog,
       LCdetail,
       routing,
-      workmanship
+      workmanship,processSubmitDialog
     },
     data() {
       return {
@@ -465,7 +471,7 @@
           children: [],
           parentId: ''
         },
-
+        processSubmitDialogFlag: false,
         current: {},
         treeList: [],
         versList: [],
@@ -821,45 +827,63 @@
       handSubmit() {
         if (Number(this.currentNodeData.baseCount) <= 0) {
           this.$message.warning('基本用量需要大于0');
-
           return;
         }
-
         if (this.clientEnvironmentId == 5) {
           this.isSubmit = true;
         } else {
-          this.$alert('确定要发布吗?', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-            .then(() => {
-              bomSubmit({ businessId: this.currentNodeData.id }).then((res) => {
-                if (res?.code == 0) {
-                  this.$message.success('发布成功');
-                  this.getTreeData();
-                }
-              });
-            })
-            .catch(() => {});
+          this.submit();
+
+          // this.$alert('确定要发布吗?', '提示', {
+          //   confirmButtonText: '确定',
+          //   cancelButtonText: '取消',
+          //   type: 'warning'
+          // })
+          //   .then(() => {
+          //     bomSubmit({ businessId: this.currentNodeData.id }).then((res) => {
+          //       if (res?.code == 0) {
+          //         this.$message.success('发布成功');
+          //         this.getTreeData();
+          //       }
+          //     });
+          //   })
+          //   .catch(() => {});
         }
       },
+      submit(businessKey) {
+        this.processSubmitDialogFlag = true;
+        this.$nextTick(() => {
+          let params = {
+            businessId: this.currentNodeData.id,
+            businessKey: businessKey||'bom_approver',
+            formCreateUserId: this.currentNodeData.createUserId,
+            variables: {
+              businessCode: this.currentNodeData.code,
+              businessName: this.currentNodeData.name,
+              // businessType: res.sourceTypeName
+            }
+          };
 
+          this.$refs.processSubmitDialogRef.init(params);
+        });
+      },
       handJsSubmit() {
-        let URL = this.radioSubmit == 1 ? jsBomSubmit : deviceBomSubmit;
-        this.$alert('确定要发布吗?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        })
-          .then(() => {
-            URL({ businessId: this.currentNodeData.id }).then((res) => {
-              this.isSubmit = false;
-              this.$message.success('发布成功');
-              this.getTreeData();
-            });
-          })
-          .catch(() => {});
+        this.submit(this.radioSubmit == 1 ? 'bom_release' : 'bom_release_device')
+        this.isSubmit = false;
+        // let URL = this.radioSubmit == 1 ? jsBomSubmit : deviceBomSubmit;
+        // this.$alert('确定要发布吗?', '提示', {
+        //   confirmButtonText: '确定',
+        //   cancelButtonText: '取消',
+        //   type: 'warning'
+        // })
+        //   .then(() => {
+        //     URL({ businessId: this.currentNodeData.id }).then((res) => {
+        //       this.isSubmit = false;
+        //       this.$message.success('发布成功');
+        //       this.getTreeData();
+        //     });
+        //   })
+        //   .catch(() => {});
       },
 
       handleDetails() {