2
3
ws преди 5 години
родител
ревизия
ac8682887d

+ 17 - 51
src/dashoo.cn/frontend_web/src/components/oilsupplier/manufacturerlist.vue

@@ -42,13 +42,12 @@
 
           <el-col :span="24">
             <el-form-item label="资质文件">
-              <el-upload action="" ref="refuploadattach"
-                          :http-request="uploadrequest" class="attach-uploader"  >
+              <el-upload action=""
+                         :manufacturerlist="manufacturerList"
+                         ref="refuploadattach"
+                         :http-request="uploadrequest"
+                         class="attach-uploader">
                 <i class="el-icon-plus attach-uploader-icon"></i>
-                <div slot="tip" class="el-upload__tip" v-if="ManufacturerForm.NeedFileType !=yasuoname">请上传图片(大小为512KB-5MB),可上传多张图片
-                </div>
-                <div slot="tip" class="el-upload__tip" v-if="ManufacturerForm.NeedFileType ==yasuoname">请上传压缩文件
-                </div>
               </el-upload>
             </el-form-item>
           </el-col>
@@ -72,10 +71,13 @@
   export default {
     name: 'ManufacturerList',
     props: {
-
       canadd: {
         type: Boolean,
         default: false
+      },
+      visible: {
+        type: Boolean,
+        default: false
       }
     },
     created () {
@@ -87,10 +89,8 @@
     },
     data () {
       return {
-        visible: false,
-        yasuoname: '',
+        // visible: false,
         SupplierCertId: '0',
-        status: '0',
         manufacturerList: [],
         manufacturer:[],
         Title: '',
@@ -110,12 +110,11 @@
             message: '请输入代理商名称',
             trigger: 'change'
           }]
-        }  
-
-
+        }
       }
     },
     methods: {
+
       getvalue  (certId ) {
         this.SupplierCertId = certId
         this.initData()
@@ -140,6 +139,10 @@
       savedata () {
         this.$refs['refPerformance'].validate((valid) => {
           if (valid) {
+            if (!this.ManufacturerForm.FileUrl) {
+              this.$message.error('有附件未成功上传!不能保存数据')
+              return false;
+            }
             if (!this.ManufacturerForm.Id) {
               this.addManufacturer()
             } else {
@@ -238,11 +241,6 @@
                   option.action = `http://${res.data.publicUrl}/${res.data.fid}`
                 }
                 _this.ManufacturerForm.FileUrl = res.data.publicUrl + '/' + res.data.fid
-                /*_this.waituploads.push({
-                  uid: option.file.uid,
-                  url: res.data.publicUrl,
-                  fid: res.data.fid
-                })*/
                 uploadajax(option)
               } else {
                 _this.$message({
@@ -251,28 +249,11 @@
                 })
               }
             })
-            .catch(function (error) {
-              debugger
-              _this.$message({
-                type: 'warning',
-                message: '未上传成功!请重新上传!'
-              })
-            })
         }
       },
 
-
-      getDictOptions () {
-        api.getDictList(this.$axios).then(res => {
-          this.yasuoname = res.data.items['YaSuoName']
-        }).catch(err => {
-          console.error(err)
-        })
-      },
-
       showDialog () {
         this.Title = '代理制造商'
-        console.log(this.SupplierCertId,222222)
         this.ManufacturerForm.SupplierCertId=this.SupplierCertId
         this.ManufacturerForm.Id = 0
         this.ManufacturerForm.AgentName=''
@@ -287,9 +268,7 @@
         this.ManufacturerForm.Remark = val.Remark
         this.visible = true
       },
-      seachdata () {
-        this.initData()
-      },
+      
       handleSizeChange (value) {
         this.size = value
         this.currentPage = 1
@@ -299,19 +278,6 @@
         this.currentPage = value
         this.initData()
       },
-
-      jstimehandle (val) {
-        if (val === '') {
-          return '----'
-        } else if (val === '0001-01-01T08:00:00+08:00') {
-          return '----'
-        } else if (val === '5000-01-01T23:59:59+08:00') {
-          return '永久'
-        } else {
-          val = val.replace('T', ' ')
-          return val.substring(0, 10)
-        }
-      }
     }
   }
 </script>

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

@@ -417,7 +417,8 @@
                 }
                 _this.getattachissuccess()
                 _this.addSubfile()
-              } else {
+              }
+              else {
                 _this.$message({
                   type: 'warning',
                   message: '请上传文件!'

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

@@ -22,14 +22,6 @@
         <span>
           <i class="icon icon-table2"></i> 信息
         </span>
-        <span style="float: right;">
-          <!--<el-button
-            plain
-            icon="el-icon-right"
-            size="mini"
-            style="margin-right: 5px"
-            @click="nextTab"
-          >下一步</el-button>-->
           <el-popover>
             <el-steps :active="formData.Step"
                       direction="vertical"
@@ -66,7 +58,7 @@
           <!--<router-link :to="'/oilsupplier/supplier/goodslist'">-->
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回</el-button>-->
           <!--</router-link>-->
-        </span>
+
       </div>
 
       <el-tabs tab-position="top"
@@ -737,7 +729,6 @@ export default {
         ProcessKey: '',
         AccessCardNo: ''
       },
-
       formDataCert: {
         InStyle: '1',
         WorkerTotal: 0,
@@ -1249,7 +1240,7 @@ export default {
             }
 
             this.$refs['GoodsInfo'].initMaunfactureList(this.certId)
-      
+
             this.$refs['equipmentList'].getvalue(
               this.formData.Id,
               this.formData.SupplierTypeCode,