XMLWAN 4 years ago
parent
commit
6a82e20b18
2 changed files with 7 additions and 3 deletions
  1. 1 0
      src/api/stock.js
  2. 6 3
      src/xt_pages/data/components/consumables.vue

+ 1 - 0
src/api/stock.js View File

@@ -121,6 +121,7 @@ export function GetGoodType(params) {
121 121
 }
122 122
 
123 123
 export function createGoodInfo(params) {
124
+  console.log("prams",params)
124 125
   return request({
125 126
     url: '/api/stock/good/info/create',
126 127
     method: 'post',

+ 6 - 3
src/xt_pages/data/components/consumables.vue View File

@@ -500,6 +500,7 @@
500 500
           good_kind:this.good_kind,
501 501
           is_charge: this.is_charge,
502 502
         }
503
+        console.log("222222",params)
503 504
         getGoodInfoList(params).then(response => {
504 505
           if (response.data.state == 0) {
505 506
             this.goodInfo.loading = false
@@ -550,7 +551,8 @@
550 551
 
551 552
           modifyGoodInfo(val).then(response => {
552 553
             if (response.data.state == 0) {
553
-              this.$message.error(response.data.msg)
554
+              // this.$message.error(response.data.msg)
555
+              this.$message.error("同一耗材类型同一规格名称不能重复录入!")
554 556
               return false
555 557
             } else {
556 558
               this.$refs.addConsumable.hide()
@@ -581,8 +583,9 @@
581 583
           //新增
582 584
           createGoodInfo(val).then(response => {
583 585
             if (response.data.state == 0) {
584
-              this.$message.error(response.data.msg)
585
-              return false
586
+              // this.$message.error(response.data.msg)
587
+              // return false
588
+              this.$message.error("同一耗材类型同一规格名称不能重复录入!")
586 589
             } else {
587 590
               this.$refs.addConsumable.hide()
588 591
               this.getList()