소스 검색

上传必要文件

shihang 6 년 전
부모
커밋
1154338051

+ 13 - 0
src/dashoo.cn/backend/api/business/oilsupplier/supplierfile/supplierfile.go

@@ -11,6 +11,7 @@ type OilSupplierFile struct {
 	SupplierCertSubId int       `xorm:"INT(10)"`
 	NeedFileType      string    `xorm:"VARCHAR(50)"`
 	NeedFileCode      string    `xorm:"VARCHAR(20)"`
+	FileName          string    `xorm:"VARCHAR(50)"`
 	FileExt           string    `xorm:"VARCHAR(10)"`
 	FileSize          int       `xorm:"INT(10)"`
 	EffectDate        time.Time `xorm:"DATETIME"`
@@ -25,3 +26,15 @@ type OilSupplierFile struct {
 	ModifiedUserId    int       `xorm:"INT(10)"`
 	ModifiedBy        string    `xorm:"VARCHAR(50)"`
 }
+
+type SubFileModel struct {
+	NeedfileList   []OilSupplierFile
+	Id             int
+	SupplierId     int
+	SupplierCertId int
+	SubclassId     int
+	Code           string
+	Name           string
+	Remark         string
+	IsDelete       int
+}

+ 1 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/supplierfile.go

@@ -101,7 +101,7 @@ func (this *SupplierfileController) EditSubfile() {
 	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
 	svc := supplierfile.GetSupplierfileService(utils.DBE)
 	opdesc := "编辑文件上传-" + model.NeedFileType
-	var cols []string = []string{"SupplierCertSubId", "NeedFileType", "NeedFileCode", "EffectDate", "FileUrl", "OtherRemark", "Remark", "IsDelete", "ModifiedBy", "ModifiedUserId"}
+	var cols []string = []string{"SupplierCertSubId", "NeedFileType", "NeedFileCode", "FileName", "EffectDate", "FileUrl", "OtherRemark", "Remark", "IsDelete", "ModifiedBy", "ModifiedUserId"}
 	err := svc.UpdateOperationAndWriteLogBytbl(OilSupplierFileName, BaseOperationLogName, id, &model, &entity, cols, utils.ToStr(this.User.Id), this.User.Username, opdesc, this.User.AccCode, "文件上传")
 
 	if err == nil {

+ 19 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/technologyservice.go

@@ -360,3 +360,22 @@ func (this *OilTechnologyServiceController) BusinessList() {
 	this.Data["json"] = &datainfo
 	this.ServeJSON()
 }
+
+// @Title get 业务列表
+// @Description get SampleType by token
+// @Success 200 {object} sampletype.SampleType
+// @router /needfilelist [get]
+func (this *OilTechnologyServiceController) NeedFileList() {
+	svc := technologyservice.GetOilTechnologyServiceService(utils.DBE)
+	where := " 1 = 1 "
+	ClassId := this.GetString("ClassId")
+	if ClassId != "" {
+		where = where + " and ClassId ='" + ClassId + "' "
+	}
+	var model technologyservice.OilTechnologyService
+	svc.GetEntityByWhere(OilTechnologyServiceName, where, &model)
+	var datainfo DataInfo
+	datainfo.Items = model
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}

+ 312 - 12
src/dashoo.cn/frontend_web/src/components/oilsupplier/businesslist.vue

@@ -5,7 +5,7 @@
         <span style="font-weight: bold">分类</span>
         <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog">添加</el-button>
       </div>
-      <el-table :data="businessList" @selection-change="handleSelectionChange">
+      <el-table :data="businessList" border @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55"></el-table-column>
         <el-table-column label="操作" width="70" align="center" fixed>
           <template slot-scope="scope">
@@ -31,7 +31,7 @@
         <el-button style="float: right; padding: 3px 0" type="text" @click="subfiledialog">添加</el-button>
       </div>
       <subfile-list ref="subfileList" :data="subfileList" :SupplierCertId="SupplierCertId" :SupplierCertSubId="cersubId"
-        :businessList="businessList" height="360px" style="margin-top: 20px"></subfile-list>
+        :businessList="businessList" :BusinessForm="BusinessForm" height="360px" style="margin-top: 20px"></subfile-list>
     </el-card>
 
     <el-dialog :title="Title" :visible.sync="visible" top="5vh">
@@ -90,7 +90,7 @@
           <el-input size="mini" style="width: 165px;" v-model="keyword" placeholder="请输入业务名称"></el-input>
         </el-form-item>
       </el-form>
-      <el-table :data="techList">
+      <el-table :data="techList" border>
         <el-table-column label="操作" width="70" align="center" fixed>
           <template slot-scope="scope">
             <el-button type="text" size="small" @click="getChooseCode(scope.row)">选择</el-button>
@@ -155,6 +155,8 @@
           children: 'children'
         },
         selectedorg: [],
+        ClassId: '',
+        needfileList: [],
 
         Title: '',
         BusinessForm: {
@@ -231,8 +233,10 @@
                 type: 'success',
                 message: res.data.message,
               })
-              this.visible = false
-              this.initData()
+              _this.BusinessForm.Id = res.data.item + ''
+              _this.visible = false
+              _this.initData()
+              _this.getneedfile()
             } else {
               _this.$message({
                 type: 'warning',
@@ -343,13 +347,7 @@
               console.error(err)
             })
         } else if (_this.SubClassId == '2') { //获取技术服务类业务列表
-          const params = {
-            _currentPage: 1,
-            _size: 1000,
-          }
-          this.$axios.get('technologyservice/businesslist', {
-              params
-            })
+          this.$axios.get('technologyservice/businesslist', {})
             .then(res => {
               _this.techList = res.data.items
               _this.techTreeList = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId', 'Id,Name')
@@ -378,6 +376,7 @@
         }
       },
       getCode() {
+        this.ClassId = this.selectedorg[this.selectedorg.length - 1]
         for (var i = 0; i < this.techList.length; i++) {
           if (this.selectedorg[this.selectedorg.length - 1] == this.techList[i].Id) {
             this.BusinessForm.Name = this.techList[i].Name
@@ -406,6 +405,7 @@
           })
       },
       getParentCode() {
+        this.ClassId = this.OneCode
         for (var i = 0; i < this.oneList.length; i++) {
           if (this.OneCode == this.oneList[i].Id) {
             this.BusinessForm.Name = this.oneList[i].Name
@@ -414,10 +414,310 @@
         }
       },
       getChooseCode(val) {
+        this.ClassId = val.Id
         this.BusinessForm.Code = val.Code
         this.BusinessForm.Name = val.Name
         this.basicDialog = false
       },
+      getneedfile() {
+        let _this = this
+        const params = {
+          ClassId: this.ClassId
+        }
+        console.log(params)
+        if (_this.SubClassId == '2') { //获取技术服务类文件需求
+          this.$axios.get('technologyservice/needfilelist', {
+              params
+            })
+            .then(res => {
+              if (res.data.items.F01 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '营业执照',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F02 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '组织机构代码证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F03 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '税务登记证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F04 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '银行开户许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F05 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '质量管理体系认证证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F06 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '环境管理体系认证证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F07 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '职业健康安全管理体系认证证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F08 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '软件企业认定证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F09 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '安全生产许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F10 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '陆上石油天然气安全生产许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F11 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '海洋石油作业安全生产许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F12 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '辐射安全许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F13 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '石油工程技术服务企业资质证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F14 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '物业服务企业资质证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F15 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '工业清洗企业资质证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F16 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '建设项目环境影响评价资格证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F17 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '消防设施维护保养资质证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F18 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '安全评价机构资质证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F19 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '工程咨询招标代理机构资质证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F20 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '工程监督资质证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F21 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '土地开发资格证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F22 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '房屋预售资格证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F23 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '保安服务许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F24 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '道路运输经营许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F25 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '机动车维修经营许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F26 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '道路危险货物运输许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F27 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '特种设备安装改造维修许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F28 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '建筑安全许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F29 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '防火许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F30 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '印刷经营许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F31 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '餐饮服务许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F32 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '劳务派遣经营许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F33 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '人力资源服务许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F34 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '国家实验室认可证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F35 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '海洋石油专业设备检验检测机构证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F36 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '安全生产检验检测证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F37 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '液化气钢瓶检验证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F38 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '国家电网承试承装承修许可证',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F39 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '建筑企业资质证书',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              if (res.data.items.F40 == '1') {
+                _this.needfileList.unshift({
+                  'FileName': '中油集团监造许可',
+                  'FileUrl': '',
+                  'EffectDate': new Date()
+                })
+              }
+              _this.$refs["subfileList"].showFileDialog(_this.needfileList)
+              console.log("-------------------", _this.needfileList)
+            })
+            .catch(err => {
+              console.error(err)
+            })
+        }
+      },
 
       handleSelectionChange(val) {
         this.selectBusiness = val

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

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-table :data="equipmentList">
+    <el-table :data="equipmentList" border>
       <el-table-column label="操作" width="70" align="center" fixed>
         <template slot-scope="scope">
           <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="openDialog(scope.row)"></el-button>

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

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-table :data="patentList" :stripe="true">
+    <el-table :data="patentList" border :stripe="true">
       <el-table-column label="操作" width="70" align="center" fixed>
         <template slot-scope="scope">
           <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="openDialog(scope.row)"></el-button>

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

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-table :data="performanceList">
+    <el-table :data="performanceList" border>
       <el-table-column label="操作" width="70" align="center" fixed>
         <template slot-scope="scope">
           <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="openDialog(scope.row)"></el-button>

+ 125 - 10
src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-table :data="subfileList">
+    <el-table :data="subfileList" border>
       <el-table-column label="操作" width="70" align="center" fixed>
         <template slot-scope="scope">
           <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="openDialog(scope.row)"></el-button>
@@ -10,6 +10,7 @@
       </el-table-column>
       <el-table-column prop="NeedFileType" label="文件分类" show-overflow-tooltip></el-table-column>
       <el-table-column prop="NeedFileCode" label="分类编码" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="FileName" label="文件名称" show-overflow-tooltip></el-table-column>
       <el-table-column prop="EffectDate" label="有效日期" show-overflow-tooltip>
         <template slot-scope="scope">
           {{ jstimehandle(scope.row.EffectDate+'') }}
@@ -23,6 +24,24 @@
       :total="currentItemCount">
     </el-pagination>
 
+    <el-dialog :title="Title" :visible.sync="fileDialog" top="5vh">
+      <el-table :data="needfileList" border>
+        <el-table-column prop="FileName" label="文件分类" show-overflow-tooltip></el-table-column>
+        <el-table-column label="操作" show-overflow-tooltip center>
+          <template slot-scope="scope">
+            <el-upload style="margin-top: -1px;" multiple action="" :limit="1" ref="refuploadattach"
+              :http-request="uploadrequest" :show-file-list="true" :before-upload="beforeAvatarUpload">
+              <el-button size="mini" type="primary" @click="getItem(scope.row)">点击上传</el-button>
+            </el-upload>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div slot="footer" class="dialog-footer" style="margin-top:-30px;">
+        <el-button @click="fileDialog = false">完 成</el-button>
+        <!-- <el-button type="primary" @click="getItem()">确 定</el-button> -->
+      </div>
+    </el-dialog>
+
     <el-dialog :title="Title" :visible.sync="visible" top="5vh">
       <el-form :model="SubfileForm" label-width="100px">
         <el-row>
@@ -35,6 +54,11 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="12">
+            <el-form-item label="文件名称" required>
+              <el-input v-model="SubfileForm.FileName" placeholder="请输文件分类"></el-input>
+            </el-form-item>
+          </el-col>
           <el-col :span="12">
             <el-form-item label="分类编码" required>
               <el-input v-model="SubfileForm.NeedFileCode" placeholder="请输入编码"></el-input>
@@ -114,6 +138,7 @@
         type: Array,
         default: []
       },
+      BusinessForm: {}
     },
     created() {},
     computed: {
@@ -141,6 +166,7 @@
           SupplierCertSubId: '',
           NeedFileType: '',
           NeedFileCode: '',
+          FileName: '',
           FileExt: '',
           FileSize: '',
           EffectDate: new Date(),
@@ -155,6 +181,9 @@
         size: 10,
         currentItemCount: 0,
 
+        fileDialog: false,
+        itemNo: 0,
+        needfileList: [], //需要上传文件列表
         waituploads: [], // 等待上传的附件列表
         doclist: [],
       }
@@ -190,6 +219,32 @@
           }
         }
       },
+      getItem(val) {
+        console.log("--1111111111111--", val)
+        for (var i = 0; i < this.needfileList.length; i++) {
+          if (val.FileName == this.needfileList[i].FileName) {
+            this.itemNo = i
+            this.SubfileForm.SupplierCertSubId = this.BusinessForm.Id
+            this.SubfileForm.NeedFileType = this.BusinessForm.Name
+            this.SubfileForm.NeedFileCode = this.BusinessForm.Code
+            this.SubfileForm.FileName = this.needfileList[i].FileName
+          }
+        }
+        console.log("--------------------", this.SubfileForm)
+        // if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
+        //   // 上传附件是否完成判断
+        //   if (!this.attachissuccess()) {
+        //     this.$message.error('有附件未成功上传!不能保存数据')
+        //     return
+        //   }
+        //   this.getattachissuccess()
+        // } else {
+        //   this.$message({
+        //     type: 'warning',
+        //     message: '请上传文件!'
+        //   })
+        // }
+      },
       makesure() {
         if (this.Title == '新增文件') {
           if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
@@ -206,7 +261,7 @@
               message: '请上传文件!'
             })
           }
-        } else if (this.Title == '编辑文件')
+        } else if (this.Title == '编辑文件') {
           if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
             // 上传附件是否完成判断
             if (!this.attachissuccess()) {
@@ -216,18 +271,44 @@
             this.getattachissuccess()
             this.editSubfile()
           } else if (this.doclist && this.doclist.length > 0) {
-          this.editSubfile()
-        } else {
-          this.$message({
-            type: 'warning',
-            message: '请上传文件!'
-          })
+            this.editSubfile()
+          } else {
+            this.$message({
+              type: 'warning',
+              message: '请上传文件!'
+            })
+          }
         }
       },
+      addNeedSubfile(val) {
+        let _this = this
+        _this.SubfileForm.SupplierCertId = parseInt(_this.SubfileForm.SupplierCertId)
+        _this.SubfileForm.AppendClassId = parseInt(_this.SubfileForm.AppendClassId)
+        _this.SubfileForm.SupplierCertSubId = parseInt(_this.SubfileForm.SupplierCertSubId)
+        _this.SubfileForm.FileUrl = val
+        _this.$axios.post('/supplierfile/addsubfile/', _this.SubfileForm)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
       addSubfile() {
         let _this = this
         _this.SubfileForm.SupplierCertId = parseInt(_this.SubfileForm.SupplierCertId)
         _this.SubfileForm.AppendClassId = parseInt(_this.SubfileForm.AppendClassId)
+        _this.SubfileForm.SupplierCertSubId = parseInt(_this.SubfileForm.SupplierCertSubId)
         _this.$axios.post('/supplierfile/addsubfile/', _this.SubfileForm)
           .then(res => {
             if (res.data.code === 0) {
@@ -310,6 +391,7 @@
         this.SubfileForm.SupplierCertSubId = ''
         this.SubfileForm.NeedFileType = ''
         this.SubfileForm.NeedFileCode = ''
+        this.SubfileForm.FileName = ''
         this.SubfileForm.FileExt = ''
         this.SubfileForm.FileSize = ''
         this.SubfileForm.EffectDate = new Date()
@@ -319,6 +401,14 @@
         this.SubfileForm.IsDelete = 0
         this.visible = true
       },
+      showFileDialog(val) {
+        this.needfileList = val
+        this.Title = '新增必要文件'
+        this.SubfileForm.Id = ''
+        this.SubfileForm.SupplierCertId = this.SupplierCertId
+        this.SubfileForm.AppendClassId = ''
+        this.fileDialog = true
+      },
       openDialog(val) {
         this.Title = '编辑文件'
         this.SubfileForm.Id = val.Id
@@ -327,6 +417,7 @@
         this.SubfileForm.SupplierCertSubId = val.SupplierCertSubId
         this.SubfileForm.NeedFileType = val.NeedFileType
         this.SubfileForm.NeedFileCode = val.NeedFileCode
+        this.SubfileForm.FileName = val.SubfileForm.FileName
         this.SubfileForm.FileExt = val.FileExt
         this.SubfileForm.FileSize = val.FileSize
         this.SubfileForm.EffectDate = new Date(val.EffectDate)
@@ -371,6 +462,9 @@
                 fid: res.data.fid
               })
               uploadajax(option)
+              if (_this.Title == '新增必要文件') {
+                _this.addNeedSubfile(`http://${res.data.url}/${res.data.fid}`)
+              }
             } else {
               _this.$message({
                 type: 'warning',
@@ -379,7 +473,7 @@
             }
           })
           .catch(function (error) {
-            console.log(error)
+            console.log("pppppppppppppppppppp", error)
             _this.$message({
               type: 'warning',
               message: '未上传成功!请重新上传!'
@@ -397,6 +491,25 @@
         }
         return true
       },
+      // getneedfilessuccess() {
+      //   this.needfileList[this.itemNo].FileUrl = ''
+      //   console.log("=-=================", this.itemNo, this.$refs.refuploadattach.uploadFiles)
+      //   if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
+      //     console.log("11111111111111111111", this.$refs.refuploadattach.uploadFiles)
+      //     for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
+      //       console.log("222222222222222222222221", this.$refs.refuploadattach.uploadFiles[i].status)
+      //       if (this.$refs.refuploadattach.uploadFiles[i].status == 'success') {
+      //         for (let j = 0; j < this.waituploads.length; j++) {
+      //           if (this.waituploads[j].uid === this.$refs.refuploadattach.uploadFiles[i].uid) {
+      //             this.needfileList[this.itemNo].FileUrl =
+      //               `${this.waituploads[j].url}/${this.waituploads[j].fid}|${this.$refs.refuploadattach.uploadFiles[i].name}`
+      //           }
+      //         }
+      //       }
+      //     }
+      //   }
+      //   console.log("----------------------", this.needfileList)
+      // },
       getattachissuccess() {
         this.SubfileForm.FileUrl = ''
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
@@ -463,7 +576,9 @@
     cursor: pointer;
     position: relative;
     overflow: hidden;
-    margin-bottom: -17px;
+    // margin-bottom: -17px;
+    margin-top: -15px;
+    margin-left: 20px
   }
 
   .attach-uploader .el-upload:hover {

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

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-table :data="winningList" :stripe="true">
+    <el-table :data="winningList" border :stripe="true">
       <el-table-column label="操作" width="70" align="center" fixed>
         <template slot-scope="scope">
           <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="openDialog(scope.row)"></el-button>