Parcourir la source

前:增项审核入库审批,退回

wd il y a 4 ans
Parent
commit
cb322acc7e

+ 37 - 42
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/basisdataopera.vue

@@ -874,8 +874,7 @@
         <el-row>
           <el-col :span="24">
             <el-form-item label="退回原因">
-              <el-input v-model="backRemark" type="textarea">
-              </el-input>
+              <el-input v-model="backRemark" type="textarea" placeholder="请输入退回原因,不少于2个字!"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -1515,6 +1514,14 @@
         }
       },
       backEntity () {
+        if (this.backRemark.length <= 2) {
+          this.$message({
+            duration: 10000,
+            type: 'warning',
+            message: '请输入退回原因,不少于2个字!'
+          })
+          return
+        }
         let params = {
           result: '0',
           BackRemark: this.backRemark,
@@ -1560,48 +1567,36 @@
       },
       confirm () {
         this.btnLoading = true
-        this.$confirm('确认提交入库', '提示', {
-          confirmButtonText: '确认',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params = {
-            Status: '1',
-            SupplierId: this.formData.SupplierId
-          }
-          let _this = this
-          api2.updateIsStorage(this.formData.Id, params, this.$axios).then(res => {
-            if (res.data.code === 0) {
-              if (this.is_todo === '1') {
-                this.$router.push('/')
-              } else {
-                _this.getEntityById()
-                _this.isAccess()
-                if (_this.$refs['WfHistory']) {
-                  _this.$refs['WfHistory'].getHistoryTask()
-                }
-              }
-              this.$message({
-                duration: 10000,
-                type: 'success',
-                message: res.data.message
-              })
-              this.btnLoading = false
+        let params = {
+          Status: '1',
+          SupplierId: this.formData.SupplierId
+        }
+        let _this = this
+        api2.updateIsStorage(this.formData.Id, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            if (this.is_todo === '1') {
+              this.$router.push('/')
             } else {
-              this.$message({
-                duration: 10000,
-                type: 'warning',
-                message: res.data.message
-              })
-              this.btnLoading = false
+              _this.getEntityById()
+              _this.isAccess()
+              if (_this.$refs['WfHistory']) {
+                _this.$refs['WfHistory'].getHistoryTask()
+              }
             }
-          })
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: '已取消'
-          })
-          this.btnLoading = false
+            this.$message({
+              duration: 10000,
+              type: 'success',
+              message: res.data.message
+            })
+            this.btnLoading = false
+          } else {
+            this.$message({
+              duration: 10000,
+              type: 'warning',
+              message: res.data.message
+            })
+            this.btnLoading = false
+          }
         })
       },
       // 分办之后的各级审批  --审批 包含:二级单位初审、复审, 业务处室专业审核、企管法规处审核

+ 37 - 42
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/goodsdataopera.vue

@@ -930,8 +930,7 @@
         <el-row>
           <el-col :span="24">
             <el-form-item label="退回原因">
-              <el-input v-model="backRemark" type="textarea">
-              </el-input>
+              <el-input v-model="backRemark" type="textarea" placeholder="请输入退回原因,不少于2个字!"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -1714,6 +1713,14 @@
         this.dialogVisibleBack = true
       },
       backEntity () {
+        if (this.backRemark.length <= 2) {
+          this.$message({
+            duration: 10000,
+            type: 'warning',
+            message: '请输入退回原因,不少于2个字!'
+          })
+          return
+        }
         let params = {
           result: '0',
           BackRemark: this.backRemark,
@@ -1756,48 +1763,36 @@
       },
       confirm () {
         this.btnLoading = true
-        this.$confirm('确认提交入库', '提示', {
-          confirmButtonText: '确认',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params = {
-            Status: '1',
-            SupplierId: this.formData.SupplierId
-          }
-          let _this = this
-          api2.updateIsStorage(this.formData.Id, params, this.$axios).then(res => {
-            if (res.data.code === 0) {
-              if (this.is_todo === '1') {
-                this.$router.push('/')
-              } else {
-                _this.getEntityById()
-                _this.isAccess()
-                if (_this.$refs['WfHistory']) {
-                  _this.$refs['WfHistory'].getHistoryTask()
-                }
-              }
-              this.$message({
-                duration: 10000,
-                type: 'success',
-                message: res.data.message
-              })
-              this.btnLoading = false
+        let params = {
+          Status: '1',
+          SupplierId: this.formData.SupplierId
+        }
+        let _this = this
+        api2.updateIsStorage(this.formData.Id, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            if (this.is_todo === '1') {
+              this.$router.push('/')
             } else {
-              this.$message({
-                duration: 10000,
-                type: 'warning',
-                message: res.data.message
-              })
-              this.btnLoading = false
+              _this.getEntityById()
+              _this.isAccess()
+              if (_this.$refs['WfHistory']) {
+                _this.$refs['WfHistory'].getHistoryTask()
+              }
             }
-          })
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: '已取消'
-          })
-          this.btnLoading = false
+            this.$message({
+              duration: 10000,
+              type: 'success',
+              message: res.data.message
+            })
+            this.btnLoading = false
+          } else {
+            this.$message({
+              duration: 10000,
+              type: 'warning',
+              message: res.data.message
+            })
+            this.btnLoading = false
+          }
         })
       },
       // 分办之后的各级审批  --审批 包含:二级单位初审、复审, 业务处室专业审核、企管法规处审核

+ 37 - 42
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/techdataopera.vue

@@ -858,8 +858,7 @@
         <el-row>
           <el-col :span="24">
             <el-form-item label="退回原因">
-              <el-input v-model="backRemark" type="textarea">
-              </el-input>
+              <el-input v-model="backRemark" type="textarea" placeholder="请输入退回原因,不少于2个字!"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -1544,6 +1543,14 @@
         }
       },
       backEntity () {
+        if (this.backRemark.length <= 2) {
+          this.$message({
+            duration: 10000,
+            type: 'warning',
+            message: '请输入退回原因,不少于2个字!'
+          })
+          return
+        }
         let params = {
           result: '0',
           BackRemark: this.backRemark,
@@ -1589,48 +1596,36 @@
       },
       confirm () {
         this.btnLoading = true
-        this.$confirm('确认提交入库', '提示', {
-          confirmButtonText: '确认',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let params = {
-            Status: '1',
-            SupplierId: this.formData.SupplierId
-          }
-          let _this = this
-          api2.updateIsStorage(this.formData.Id, params, this.$axios).then(res => {
-            if (res.data.code === 0) {
-              if (this.is_todo === '1') {
-                this.$router.push('/')
-              } else {
-                _this.getEntityById()
-                _this.isAccess()
-                if (_this.$refs['WfHistory']) {
-                  _this.$refs['WfHistory'].getHistoryTask()
-                }
-              }
-              this.$message({
-                duration: 10000,
-                type: 'success',
-                message: res.data.message
-              })
-              this.btnLoading = false
+        let params = {
+          Status: '1',
+          SupplierId: this.formData.SupplierId
+        }
+        let _this = this
+        api2.updateIsStorage(this.formData.Id, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            if (this.is_todo === '1') {
+              this.$router.push('/')
             } else {
-              this.$message({
-                duration: 10000,
-                type: 'warning',
-                message: res.data.message
-              })
-              this.btnLoading = false
+              _this.getEntityById()
+              _this.isAccess()
+              if (_this.$refs['WfHistory']) {
+                _this.$refs['WfHistory'].getHistoryTask()
+              }
             }
-          })
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: '已取消'
-          })
-          this.btnLoading = false
+            this.$message({
+              duration: 10000,
+              type: 'success',
+              message: res.data.message
+            })
+            this.btnLoading = false
+          } else {
+            this.$message({
+              duration: 10000,
+              type: 'warning',
+              message: res.data.message
+            })
+            this.btnLoading = false
+          }
         })
       },
       // 分办之后的各级审批  --审批 包含:二级单位初审、复审, 业务处室专业审核、企管法规处审核