白承飞 5 éve
szülő
commit
dedcf3552f

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

@@ -697,7 +697,7 @@
                    type="text"
                    @click="manufacturerdialog"
                    v-if="formDataCert.Status <= 0"
-                   :disabled="parseInt(certId) === 0"
+                   :disabled="!certId"
         >添加</el-button>
       </div>
       <manufacturer-list ref="manufacturerList"
@@ -713,7 +713,7 @@
       <el-row>
         <el-col :span="24">
           <span>现场考察报告</span>
-          <el-button type="primary" style="margin-left: 10px;" plain size="mini" title="上传" @click="openDialog()" >上传
+          <el-button :disabled="parseInt(certId) === 0" type="primary" style="margin-left: 10px;" plain size="mini" title="上传" @click="openDialog()" >上传
           </el-button>
           <!--<el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"-->
           <!--:http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload">-->

+ 38 - 39
src/dashoo.cn/frontend_web/src/components/oilsupplier/manufacturerlist.vue

@@ -79,31 +79,26 @@
 
 <script>
   import axios from 'axios'
-  import uploadajax from '@/assets/js/uploadajax.js'
+import uploadajax from '@/assets/js/uploadajax.js'
 
-  // v-viewer
-  import Vue from 'vue';
-  import Viewer from 'v-viewer'
-  import 'viewerjs/dist/viewer.css'
-  Vue.use(Viewer)
-  Viewer.setDefaults({
-    Options: { 'inline': true, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
-  })
+// v-viewer
+import Vue from 'vue'
+import Viewer from 'v-viewer'
+import 'viewerjs/dist/viewer.css'
 
-
-  import {
-    mapGetters
-  } from 'vuex'
+import {
+  mapGetters
+} from 'vuex'
+Vue.use(Viewer)
+Viewer.setDefaults({
+  Options: { 'inline': true, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
+})
   export default {
     name: 'ManufacturerList',
     props: {
       canadd: {
         type: Boolean,
         default: false
-      },
-      visible: {
-        type: Boolean,
-        default: false
       }
     },
     created () {
@@ -117,15 +112,16 @@
       return {
         // visible: false,
         SupplierCertId: '0',
+        visible: false,
         manufacturerList: [],
-        manufacturer:[],
+        manufacturer: [],
         Title: '',
-        ManufacturerForm:{
+        ManufacturerForm: {
           Id: '',
-          AgentName:'',
+          AgentName: '',
           Remark: '',
           FileUrl: '',
-          SupplierCertId: '',
+          SupplierCertId: ''
         },
         currentPage: 1, // 分页
         size: 10,
@@ -140,17 +136,17 @@
       }
     },
     methods: {
-      imgFormat(fileurl){
-        if(fileurl !=null && fileurl != undefined && fileurl !=''){
-            let Format  = fileurl.split(".")
-            if(Format[1]!=null && Format[1] !='' && Format[1] != undefined){
-              let pictureFormat = Format[1];
-              if("jpg"== pictureFormat || "bmp" ==pictureFormat || "png" ==pictureFormat || "gif" ==pictureFormat|| "jpeg" ==pictureFormat){
-                return true;
-              }
+      imgFormat (fileurl) {
+        if (fileurl != null && fileurl != undefined && fileurl != '') {
+          let Format = fileurl.split('.')
+          if (Format[1] != null && Format[1] != '' && Format[1] != undefined) {
+            let pictureFormat = Format[1]
+            if (pictureFormat == 'jpg' || pictureFormat == 'bmp' || pictureFormat == 'png' || pictureFormat == 'gif' || pictureFormat == 'jpeg') {
+              return true
             }
+          }
         }
-        return false;
+        return false
       },
       fileurlcut (val) {
         let fileurlall = val
@@ -161,9 +157,9 @@
           const myDomain = window.location.host
           retUrl = myDomain + '/' + retUrl
         }
-        return retUrl;
+        return retUrl
       },
-      getvalue  (certId ) {
+      getvalue (certId) {
         this.SupplierCertId = certId
         this.initData()
       },
@@ -174,8 +170,10 @@
           _currentPage: this.currentPage,
           _size: this.size
         }
-        this.$axios.get('manufacturer/manufacturerlist', {params})
+        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
           })
@@ -189,7 +187,7 @@
           if (valid) {
             if (!this.ManufacturerForm.FileUrl) {
               this.$message.error('有附件未成功上传!不能保存数据')
-              return false;
+              return false
             }
             if (!this.ManufacturerForm.Id) {
               this.addManufacturer()
@@ -201,6 +199,7 @@
       },
       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 => {
@@ -302,17 +301,17 @@
 
       showDialog () {
         this.Title = '代理制造商'
-        this.ManufacturerForm.SupplierCertId=this.SupplierCertId
+        this.ManufacturerForm.SupplierCertId = this.SupplierCertId
         this.ManufacturerForm.Id = 0
-        this.ManufacturerForm.AgentName=''
+        this.ManufacturerForm.AgentName = ''
         this.ManufacturerForm.Remark = ''
         this.visible = true
       },
       openDialog (val) {
         this.Title = '编辑代理制造商'
-        this.ManufacturerForm.SupplierCertId=val.SupplierCertId
+        this.ManufacturerForm.SupplierCertId = val.SupplierCertId
         this.ManufacturerForm.Id = val.Id
-       this.ManufacturerForm.AgentName=val.AgentName
+        this.ManufacturerForm.AgentName = val.AgentName
         this.ManufacturerForm.Remark = val.Remark
         this.visible = true
       },
@@ -325,7 +324,7 @@
       handleCurrentChange (value) {
         this.currentPage = value
         this.initData()
-      },
+      }
     }
   }
 </script>

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

@@ -1401,7 +1401,7 @@ export default {
       if (this.formDataCert.Status >= 5) {
         this.totalTab = 5
       }
-
+      console.log('abbb', this.formData)
       let activeIdx = parseInt(this.activeName)
       if (activeIdx > 0) {
         this.activeName = (activeIdx - 1) + ''