2
3
baichengfei 5 سال پیش
والد
کامیت
2607f71683

+ 25 - 30
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/basislist.vue

@@ -361,37 +361,32 @@
             _this.addshow = false
             _this.appendformData.AppendType = '02'
             _this.appendformData.SupplierId = parseInt(_this.appendformData.SupplierId)
-            if (!_this.appendformData.SupplierId || !_this.appendformData.SupplierName) {
-              _this.$message({
-                type: 'warning',
-                message: '请选择供应商公司'
+            _this.$axios.post('/suppliercertappend/addappend/', _this.appendformData)
+              .then(res => {
+                if (res.data.code === 0) {
+                  //this.entityList = res.data.item
+                  let AppendId = res.data.info
+                  this.$router.push({
+                    path: `/oilsupplier/supplierappend/2/basisdataopera`,
+                    query: {
+                      Id: AppendId,
+                      editFlag: 1 //编辑标记: 1 修改,0 不修改
+                    }
+                  })
+                  _this.$message({
+                    type: 'success',
+                    message: res.data.message,
+                  })
+                } else {
+                  _this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
+              })
+              .catch(err => {
+                console.error(err)
               })
-              this.appendformData.SupplierId = ''
-              return
-            }
-            api.judgeAppend(_this.appendformData, _this.$axios).then(res => {
-              if (res.data.code === 0) {
-                //this.entityList = res.data.item
-                let AppendId = res.data.info
-                this.$router.push({
-                  path: `/oilsupplier/supplierappend/2/basisdataopera`,
-                  query: {
-                    Id: AppendId,
-                    editFlag: 1 //编辑标记: 1 修改,0 不修改
-                  }
-                })
-                _this.$message({
-                  type: 'success',
-                  message: res.data.message
-                })
-              } else {
-                _this.appendformData.SupplierId = ''
-                _this.$message({
-                  type: 'warning',
-                  message: res.data.message
-                })
-              }
-            })
           })
           .catch(() => {});
       },

+ 35 - 32
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/goodslist.vue

@@ -364,41 +364,44 @@
             _this.appendformData.AppendType = '01'
             _this.appendformData.SupplierId = parseInt(_this.appendformData.SupplierId)
             console.log(_this.appendformData, '数据')
-            if (!_this.appendformData.SupplierId || !_this.appendformData.SupplierName) {
-              _this.$message({
-                type: 'warning',
-                message: '请选择供应商公司'
+            // if (!_this.appendformData.SupplierId) {
+            //   _this.$message({
+            //     type: 'warning',
+            //     message: '请选择供应商公司'
+            //   })
+            //   return
+            // }
+            _this.$axios.post('/suppliercertappend/addappend/', _this.appendformData)
+              .then(res => {
+                if (res.data.code === 0) {
+                  //this.entityList = res.data.item
+                  let AppendId = res.data.info
+                  this.$router.push({
+                    path: `/oilsupplier/supplierappend/1/goodsdataopera`,
+                    query: {
+                      Id: AppendId,
+                      editFlag: 1 //编辑标记: 1 修改,0 不修改
+                    }
+                  })
+                  _this.$message({
+                    type: 'success',
+                    message: res.data.message
+                  })
+                } else {
+                  _this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
               })
-              this.appendformData.SupplierId = ''
-              return
-            }
-            api.judgeAppend(_this.appendformData, _this.$axios).then(res => {
-              if (res.data.code === 0) {
-                //this.entityList = res.data.item
-                let AppendId = res.data.info
-                this.$router.push({
-                  path: `/oilsupplier/supplierappend/1/goodsdataopera`,
-                  query: {
-                    Id: AppendId,
-                    editFlag: 1 //编辑标记: 1 修改,0 不修改
-                  }
-                })
-                _this.$message({
-                  type: 'success',
-                  message: res.data.message
-                })
-              } else {
-                _this.appendformData.SupplierId = ''
-                _this.$message({
-                  type: 'warning',
-                  message: res.data.message
-                })
-              }
-            })
-          }).catch(() => {});
+              .catch(err => {
+                console.error(err)
+              })
+          })
+          .catch(() => {})
       },
 
-      getSupplierList () {
+      getSupplierList() {
         let _this = this
         _this.supplierList = []
         let params = {

+ 26 - 30
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/techlist.vue

@@ -364,37 +364,33 @@
             _this.addshow = false
             _this.appendformData.AppendType = '03'
             _this.appendformData.SupplierId = parseInt(_this.appendformData.SupplierId)
-            if (!_this.appendformData.SupplierId || !_this.appendformData.SupplierName) {
-              _this.$message({
-                type: 'warning',
-                message: '请选择供应商公司'
+            _this.$axios.post('/suppliercertappend/addappend/', _this.appendformData)
+              .then(res => {
+                if (res.data.code === 0) {
+                  //this.entityList = res.data.item
+                  let AppendId = res.data.info
+                  this.$router.push({
+                    path: `/oilsupplier/supplierappend/3/techdataopera`,
+                    query: {
+                      Id: AppendId,
+                      editFlag: 1, //编辑标记: 1 修改,0 不修改
+                      sId: _this.appendformData.SupplierId
+                    }
+                  })
+                  _this.$message({
+                    type: 'success',
+                    message: res.data.message,
+                  })
+                } else {
+                  _this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
+              })
+              .catch(err => {
+                console.error(err)
               })
-              this.appendformData.SupplierId = ''
-              return
-            }
-            api.judgeAppend(_this.appendformData, _this.$axios).then(res => {
-              if (res.data.code === 0) {
-                //this.entityList = res.data.item
-                let AppendId = res.data.info
-                this.$router.push({
-                  path: `/oilsupplier/supplierappend/3/techdataopera`,
-                  query: {
-                    Id: AppendId,
-                    editFlag: 1 //编辑标记: 1 修改,0 不修改
-                  }
-                })
-                _this.$message({
-                  type: 'success',
-                  message: res.data.message
-                })
-              } else {
-                _this.appendformData.SupplierId = ''
-                _this.$message({
-                  type: 'warning',
-                  message: res.data.message
-                })
-              }
-            })
           })
           .catch(() => {});
       },