ソースを参照

所代理制造商数量判断

baichengfei 5 年 前
コミット
f9bc29d0db

+ 3 - 5
src/dashoo.cn/frontend_web/src/components/oilsupplier/goodsinfo.vue

@@ -1160,6 +1160,9 @@ export default {
     }
   },
   methods: {
+    getCurrentManufactureCount2 () {
+      return this.$refs['manufacturerList'].getCurrentManufactureCount3()
+    },
     deletedata (FileName, FileUrl) {
       let _this = this
       _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
@@ -1284,12 +1287,10 @@ export default {
       if (name) {
         name = ''
       }
-      console.log(name, 'dada1')
       var newUrl = url + _this.SubfileForm['FileUrl']
       var newName = name + _this.SubfileForm['FileName']
       var nameArr = newName.split('$')
       var urlArr = newUrl.split('$')
-      console.log(newName, 'dada1')
       // name去重
       for (var i = 0, len = nameArr.length; i < len; i++) {
         for (var j = i + 1, len = nameArr.length; j < len; j++) {
@@ -1322,7 +1323,6 @@ export default {
           nameArr.splice(index1, 1)
         }
       }
-      console.log(nameArr.join('$'), 'dada')
       _this.SubfileForm['FileName'] = nameArr.join('$')
       _this.SubfileForm['FileUrl'] = urlArr.join('$')
       _this.$axios.put('/supplier/editsubfile/' + this.SubfileForm.SupplierId, _this.SubfileForm)
@@ -1347,7 +1347,6 @@ export default {
         })
     },
     getSupplierSceneFile () {
-      console.log('不设置下显示显示?')
       if (this.formData.Id !== '') {
         let params = {
           SupplierId: this.formData.Id
@@ -1357,7 +1356,6 @@ export default {
           this.scenefile = res.data.item
           if (this.scenefile && this.scenefile.FileUrl && this.scenefile != null) {
             this.scenefileurllist = this.scenefile.FileUrl.split('$')
-            console.log(this.scenefileurllist, '说过的话')
           }
         })
       }

+ 3 - 6
src/dashoo.cn/frontend_web/src/components/oilsupplier/manufacturerlist.vue

@@ -162,9 +162,11 @@ Viewer.setDefaults({
       },
       getvalue (certId) {
         this.SupplierCertId = certId
-        console.log('进来了')
         this.initData()
       },
+      getCurrentManufactureCount3 () {
+        return this.currentItemCount
+      },
       initData () {
         let _this = this
         const params = {
@@ -172,10 +174,8 @@ Viewer.setDefaults({
           _currentPage: this.currentPage,
           _size: this.size
         }
-        console.log('参数', params)
         this.$axios.get('manufacturer/manufacturerlist', { params })
           .then(res => {
-            console.log('列表', res.data)
             _this.manufacturerList = res.data.items
             _this.currentItemCount = res.data.currentItemCount
           })
@@ -201,7 +201,6 @@ Viewer.setDefaults({
       },
       addManufacturer () {
         let _this = this
-        console.log(_this.ManufacturerForm, 'a111a')
         _this.ManufacturerForm.SupplierCertId = parseInt(_this.ManufacturerForm.SupplierCertId)
         _this.$axios.post('/manufacturer/addmanufacturer/', _this.ManufacturerForm)
           .then(res => {
@@ -224,12 +223,10 @@ Viewer.setDefaults({
           })
       },
       editManufacturer () {
-        console.log('编辑所代理制造商')
         let _this = this
         _this.ManufacturerForm.SupplierCertId = parseInt(_this.ManufacturerForm.SupplierCertId)
         _this.$axios.put('/manufacturer/editmanufacturer/' + _this.ManufacturerForm.Id, _this.ManufacturerForm)
           .then(res => {
-            console.log('编辑所代理制造商', res.data)
             if (res.data.code === 0) {
               _this.$message({
                 type: 'success',

+ 5 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -900,6 +900,9 @@ export default {
     // this.changeOrgUnit(this.selectDept)
   },
   methods: {
+    getCurrentManufactureCount1 () {
+      return this.$refs['GoodsInfo'].getCurrentManufactureCount2()
+    },
     tabclick () {
       // if (this.formDataCert.WorkerTotal <= 0) {
       //   this.$message({
@@ -1566,7 +1569,8 @@ export default {
         //   return
         // }
       } else if (this.formData.OperType === '代理商') {
-        if (!this.formData.MaunAgent && this.certId) {
+        let countM = this.getCurrentManufactureCount1()
+        if (Number(countM) <= 0 && this.certId) {
           valid1 = false
           this.$message({
             type: 'warning',