Forráskód Böngészése

前端:增项申请----提交时自动保存其他变更信息

baichengfei 5 éve
szülő
commit
26dc1d19c1

+ 37 - 26
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/basisdataopera.vue

@@ -395,7 +395,7 @@
                   </el-col>
                   <el-col :span="6">
                     <el-form-item label="准入方式">
-                      <el-select ref="SpecType" v-model="formData.InStyle" :disabled="this.formData.Status > '0'&&!appendStatus"
+                      <el-select ref="SpecType" v-model="formData.InStyle" :disabled="this.formData.Status > '0'"
                                  placeholder="请选择" style="width: 100%">
                         <el-option v-for="item in InOptions" :key="item.Id" :label="item.Key" v-if="item.Value != '2' && item.Value != '3'"
                                    :value="item.Value">
@@ -1940,6 +1940,7 @@
         if (!checkRes) {
           return false
         }
+        this.saveEntity('directSubmit')
         this.btnloading = true
         // this.auditform.FirstAuditName = this.UnitOrg
         // this.auditform.CertId = this.formData.Id
@@ -2437,10 +2438,12 @@
                   })
                 }
               } else {
-                this.$message({
-                  type: 'warning',
-                  message: res.data.message
-                })
+                if (val !== 1) {
+                  this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
               }
             }).catch(err => {
               console.error(err)
@@ -2695,14 +2698,14 @@
       },
 
       // 保存增项信息
-      saveEntity () {
+      saveEntity (val) {
         let _this = this
         this.$refs['EntityForm'].validate((valid) => {
           if (valid) {
             if (_this.editFlag == '1' && _this.Id !== '') {
-              _this.updateData()
+              _this.updateData(val)
             } else {
-              _this.addAppend()
+              _this.addAppend(val)
             }
           } else {
             return false
@@ -2711,21 +2714,25 @@
       },
 
       // 更新增项信息
-      updateData () {
+      updateData (val) {
         this.formData.SupplierName = this.$refs.suppselect.selectedLabel + ''
         let _this = this
         api2.updateEntity(_this.Id, _this.formData, _this.$axios).then(res => {
           if (res.data.code === 0) {
             this.getEntityById()
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            })
+            if (val !== 'directSubmit') {
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            }
           } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            })
+            if (val !== 'directSubmit') {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
           }
         }).catch(err => {
           console.error(err)
@@ -2772,7 +2779,7 @@
       },
 
       // 添加增项信息
-      addAppend () {
+      addAppend (val) {
         this.formData.AppendType = '02'
         this.formData.SupplierName = this.$refs.suppselect.selectedLabel + ''
         this.$axios.post('/suppliercertappend/addappend/', this.formData)
@@ -2782,15 +2789,19 @@
               this.dialogFormData.SupplierCertAppendId = res.data.info // 接收插入数据后返回的Id
               this.Id = res.data.info
               this.getEntityById()
-              this.$message({
-                type: 'success',
-                message: res.data.message
-              })
+              if (val !== 'directSubmit') {
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+              }
             } else {
-              this.$message({
-                type: 'warning',
-                message: res.data.message
-              })
+              if (val !== 'directSubmit') {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
             }
           })
           .catch(err => {

+ 6 - 4
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/goodsdataopera.vue

@@ -2268,10 +2268,12 @@
                   })
                 }
               } else {
-                this.$message({
-                  type: 'warning',
-                  message: res.data.message
-                })
+                if (val !== 1) {
+                  this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
               }
             }).catch(err => {
               console.error(err)

+ 36 - 25
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue

@@ -1944,10 +1944,12 @@
                   })
                 }
               } else {
-                this.$message({
-                  type: 'warning',
-                  message: res.data.message
-                })
+                if (val !== 1) {
+                  this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
               }
             }).catch(err => {
               console.error(err)
@@ -2442,6 +2444,7 @@
         if (!checkRes) {
           return false
         }
+        this.saveEntity('directSubmit')
         this.btnloading = true
         // this.auditform.FirstAuditName = this.UnitOrg
         // this.auditform.CertId = this.formData.Id
@@ -2677,14 +2680,14 @@
         window.open(`http://${url}`)
       },
       // 保存增项信息
-      saveEntity () {
+      saveEntity (val) {
         let _this = this
         this.$refs['EntityForm'].validate((valid) => {
           if (valid) {
             if (_this.editFlag == '1' && _this.Id !== '') {
-              _this.updateData()
+              _this.updateData(val)
             } else {
-              _this.addAppend()
+              _this.addAppend(val)
             }
           } else {
             return false
@@ -2693,21 +2696,25 @@
       },
 
       // 更新增项信息
-      updateData () {
+      updateData (val) {
         this.formData.SupplierName = this.$refs.suppselect.selectedLabel + ''
         let _this = this
         api2.updateEntity(_this.Id, _this.formData, _this.$axios).then(res => {
           if (res.data.code === 0) {
             this.getEntityById()
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            })
+            if (val !== 'directSubmit') {
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            }
           } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            })
+            if (val !== 'directSubmit') {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
           }
         }).catch(err => {
           console.error(err)
@@ -2758,7 +2765,7 @@
       },
 
       // 添加增项信息
-      addAppend () {
+      addAppend (val) {
         this.formData.SupplierName = this.$refs.suppselect.selectedLabel + ''
         let _this = this
         _this.formData.AppendType = '03'
@@ -2769,15 +2776,19 @@
               this.dialogFormData.SupplierCertAppendId = res.data.info // 接收插入数据后返回的Id
               this.Id = res.data.info
               this.getEntityById()
-              _this.$message({
-                type: 'success',
-                message: res.data.message
-              })
+              if (val !== 'directSubmit') {
+                _this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+              }
             } else {
-              _this.$message({
-                type: 'warning',
-                message: res.data.message
-              })
+              if (val !== 'directSubmit') {
+                _this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
             }
           })
           .catch(err => {