作者 小范

出入库及删除方法加判断

@@ -609,6 +609,9 @@ @@ -609,6 +609,9 @@
609 ExtNewinventroyrecord({serialnumber:row.serialnumber}).then((response) => { 609 ExtNewinventroyrecord({serialnumber:row.serialnumber}).then((response) => {
610 console.log(row) 610 console.log(row)
611 const res = response.data 611 const res = response.data
  612 + if (res.code != '200') {
  613 + return this.$message.error(res.msg)
  614 + }
612 this.$message.success(res.msg) 615 this.$message.success(res.msg)
613 this.getList() 616 this.getList()
614 }).catch(error => { 617 }).catch(error => {
@@ -629,6 +632,9 @@ @@ -629,6 +632,9 @@
629 ReNewinventroyrecord(row).then((response) => { 632 ReNewinventroyrecord(row).then((response) => {
630 console.log(row) 633 console.log(row)
631 const res = response.data 634 const res = response.data
  635 + if (res.code != '200') {
  636 + return this.$message.error(res.msg)
  637 + }
632 this.$message.success(res.msg) 638 this.$message.success(res.msg)
633 this.getList() 639 this.getList()
634 }).catch(error => { 640 }).catch(error => {
@@ -650,7 +656,7 @@ @@ -650,7 +656,7 @@
650 delInventoryrecord({uuid:row.uuid}).then((response) => { 656 delInventoryrecord({uuid:row.uuid}).then((response) => {
651 // console.log(row) 657 // console.log(row)
652 const res = response.data 658 const res = response.data
653 - if (res.code == '200') { 659 + if (res.code != '200') {
654 return this.$message.error(res.msg) 660 return this.$message.error(res.msg)
655 } 661 }
656 this.$message.success(res.msg) 662 this.$message.success(res.msg)