Browse Source

Merge branch 'orangeUrgent' of http://124.70.211.186:3000/zhangqi/yos_web into 橙色

xiaohaizhao 1 year ago
parent
commit
6e0c6a9e9a
1 changed files with 57 additions and 20 deletions
  1. 57 20
      src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue

+ 57 - 20
src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue

@@ -380,12 +380,20 @@
           >{{ $t(`取 消`) }}</el-button
         >
         <el-button
-          size="small"
-          type="primary"
-          @click="getSubmit"
-          :loading="loading"
-          class="normal-btn-width"
-          >{{ $t(`确 定`) }}</el-button
+            size="small"
+            type="primary"
+            @click="getSubmit"
+            :loading="loading"
+            class="normal-btn-width"
+        >{{ $t(`保 存`) }}</el-button
+        >
+        <el-button
+            size="small"
+            @click="getSubmit('提交')"
+            :loading="loading"
+            type="warning"
+            class="normal-btn-width"
+        >{{ $t(`保存并提交`) }}</el-button
         >
       </div>
     </el-drawer>
@@ -618,7 +626,7 @@ export default {
       });
     },
     /*提交*/
-    getSubmit() {
+    getSubmit(val) {
       if (this.form.date.length === 0) {
         this.form.begdate = "";
         this.form.enddate = "";
@@ -643,21 +651,50 @@ export default {
         });
         if (res.code == 0) {
           this.loading = false;
+          this.tool.showMessage(res,()=>{})
         }
-        this.tool.showMessage(res, () => {
-          /*this.$store.commit('setLoading',false)*/
-          this.loading = false;
-          this.drawer = false;
-          this.$emit("addSuccess");
-          this.$store.dispatch("changeDetailDrawer", true);
-          this.$router.push({
-            path: "/quotedPriceDetail",
-            query: {
-              id: res.data.sa_quotedpriceid,
-              rowindex: res.data.rowindex,
-            },
+        if (val == '提交'){
+          const resSubmit = await this.$api.requested({
+            "id": 20221020165303,
+            "content": {
+              "sa_quotedpriceid":res.data.sa_quotedpriceid
+            }
+          })
+          if (resSubmit.code == 0) {
+            this.loading = false;
+            this.tool.showMessage(res,()=>{})
+          }else {
+            this.tool.showMessage(res, () => {
+              /*this.$store.commit('setLoading',false)*/
+              this.loading = false;
+              this.drawer = false;
+              this.$emit("addSuccess");
+              this.$store.dispatch("changeDetailDrawer", true);
+              this.$router.push({
+                path: "/quotedPriceDetail",
+                query: {
+                  id: res.data.sa_quotedpriceid,
+                  rowindex: res.data.rowindex,
+                },
+              });
+            });
+          }
+        }else {
+          this.tool.showMessage(res, () => {
+            /*this.$store.commit('setLoading',false)*/
+            this.loading = false;
+            this.drawer = false;
+            this.$emit("addSuccess");
+            this.$store.dispatch("changeDetailDrawer", true);
+            this.$router.push({
+              path: "/quotedPriceDetail",
+              query: {
+                id: res.data.sa_quotedpriceid,
+                rowindex: res.data.rowindex,
+              },
+            });
           });
-        });
+        }
       });
     },
     /*修改后的产品数据*/