chenrui 2 anos atrás
pai
commit
75e289707b

+ 21 - 18
src/views/allocationManagement/transferOut/printStatusModal.vue

@@ -77,31 +77,34 @@ export default {
   methods: {
     //  保存
     handleSubmit () {
-      const _this = this
-      _this.$refs.ruleForm.validate(valid => {
+      this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          const ajax_form = {
-            allocateSn: _this.form.allocateSn,
-            printState: _this.form.printStateInfo
-          }
-          _this.spinning = true
-          _this.confirmLoading = true
-          updatePrintState(ajax_form).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.cancel()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
-            }
-            _this.confirmLoading = false
-          })
+          this.handleSave()
         } else {
           console.log('error submit!!')
           return false
         }
       })
     },
+    handleSave () {
+      const _this = this
+      const ajax_form = {
+        allocateSn: _this.form.allocateSn,
+        printState: _this.form.printStateInfo
+      }
+      _this.spinning = true
+      _this.confirmLoading = true
+      updatePrintState(ajax_form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.cancel()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+        }
+        _this.confirmLoading = false
+      })
+    },
     cancel () {
       this.opened = false
       this.$emit('cancel')