浏览代码

增加文件类型,下一步按钮

shihang 6 年之前
父节点
当前提交
f57b3575c9

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

@@ -12,8 +12,8 @@ type OilSupplierFile struct {
 	CertSubName       string    `xorm:"VARCHAR(50)"`
 	NeedFileType      string    `xorm:"VARCHAR(50)"`
 	NeedFileCode      string    `xorm:"VARCHAR(20)"`
+	FileType          int       `xorm:"INT(10)"`
 	FileExt           string    `xorm:"VARCHAR(10)"`
-	FileSize          int       `xorm:"INT(10)"`
 	FileName          string    `xorm:"VARCHAR(50)"`
 	EffectDate        time.Time `xorm:"DATETIME"`
 	FileUrl           string    `xorm:"VARCHAR(100)"`

+ 2 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertsub.go

@@ -334,6 +334,7 @@ func (this *OilSupplierCertSubController) AddBusiness() {
 				entity.SupplierId = model.SupplierId
 				entity.SupplierTypeCode = model.SupplierTypeCode
 				entity.NeedFileType = needList[i].FileName
+				entity.FileType = 1
 				entity.CreateBy = this.User.Realname
 				entity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
 				svc.InsertEntityBytbl(OilSupplierFileName, &entity)
@@ -345,6 +346,7 @@ func (this *OilSupplierCertSubController) AddBusiness() {
 					entity.SupplierId = model.SupplierId
 					entity.SupplierTypeCode = model.SupplierTypeCode
 					entity.NeedFileType = needList[i].FileName
+					entity.FileType = 1
 					entity.CreateBy = this.User.Realname
 					entity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
 					svc.InsertEntityBytbl(OilSupplierFileName, &entity)

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

@@ -150,7 +150,7 @@
           NeedFileType: '',
           NeedFileCode: '',
           FileExt: '',
-          FileSize: '',
+          FileType: '',
           FileName: '',
           EffectDate: new Date(),
           FileUrl: '',
@@ -315,7 +315,7 @@
       //     this.SubfileForm.NeedFileType = ''
       //     this.SubfileForm.NeedFileCode = ''
       //     this.SubfileForm.FileExt = ''
-      //     this.SubfileForm.FileSize = ''
+      //     this.SubfileForm.FileType = ''
       //     this.SubfileForm.FileName = ''
       //     this.SubfileForm.EffectDate = new Date()
       //     this.SubfileForm.FileUrl = ''
@@ -338,7 +338,7 @@
         this.SubfileForm.NeedFileType = val.NeedFileType
         this.SubfileForm.NeedFileCode = val.NeedFileCode
         this.SubfileForm.FileExt = val.FileExt
-        this.SubfileForm.FileSize = val.FileSize
+        this.SubfileForm.FileType = val.FileType
         this.SubfileForm.FileName = val.FileName
         this.SubfileForm.EffectDate = new Date(val.EffectDate)
         this.SubfileForm.FileUrl = val.FileUrl

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

@@ -3,7 +3,11 @@
     <el-card class="box-card">
       <div slot="header" class="clearfix">
         <span style="font-weight: bold">分类</span>
-        <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog">添加</el-button>
+        <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-right: 3px" @click="nextStep">下一步</el-button>
+          <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog">添加</el-button>
+        </span>
+        <!-- <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog">添加</el-button> -->
       </div>
       <el-table :data="businessList" border>
         <el-table-column label="操作" width="150" align="center" fixed>
@@ -419,6 +423,9 @@
         this.BusinessForm.Name = val.Name
         this.basicDialog = false
       },
+      nextStep() {
+        this.$emit('close')
+      },
 
       subfiledialog() {
         this.$refs["subfileList"].showDialog()

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

@@ -4,8 +4,8 @@
       <el-table-column label="操作" width="150" align="center" fixed>
         <template slot-scope="scope">
           <el-button type="primary" plain size="mini" title="编辑" @click="openDialog(scope.row)">编辑</el-button>
-          <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px" @click="deletedata(scope.row)">
-            删除</el-button>
+          <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px"
+            :disabled="scope.row.FileType == '1'" @click="deletedata(scope.row)">删除</el-button>
         </template>
       </el-table-column>
       <el-table-column prop="NeedFileType" label="文件分类" show-overflow-tooltip></el-table-column>
@@ -149,8 +149,8 @@
           CertSubName: '',
           NeedFileType: '',
           NeedFileCode: '',
+          FileType: '',
           FileExt: '',
-          FileSize: '',
           FileName: '',
           EffectDate: new Date(),
           FileUrl: '',
@@ -174,7 +174,7 @@
           _currentPage: 1,
           _size: 1000,
         }
-        this.$axios.get('supplierfile/filelist', {
+        _this.$axios.get('supplierfile/filelist', {
             params
           })
           .then(res => {
@@ -315,7 +315,7 @@
         this.SubfileForm.NeedFileType = ''
         this.SubfileForm.NeedFileCode = ''
         this.SubfileForm.FileExt = ''
-        this.SubfileForm.FileSize = ''
+        this.SubfileForm.FileType = ''
         this.SubfileForm.FileName = ''
         this.SubfileForm.EffectDate = new Date()
         this.SubfileForm.FileUrl = ''
@@ -338,7 +338,7 @@
         this.SubfileForm.NeedFileType = val.NeedFileType
         this.SubfileForm.NeedFileCode = val.NeedFileCode
         this.SubfileForm.FileExt = val.FileExt
-        this.SubfileForm.FileSize = val.FileSize
+        this.SubfileForm.FileType = val.FileType
         this.SubfileForm.FileName = val.FileName
         this.SubfileForm.EffectDate = new Date(val.EffectDate)
         this.SubfileForm.FileUrl = val.FileUrl

+ 26 - 20
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -11,7 +11,8 @@
           <i class="icon icon-table2"></i> 信息
         </span>
         <span style="float: right;">
-          <el-button type="primary" plain size="mini">年审申请</el-button> <!--v-if="formData.Step>=5"-->
+          <el-button type="primary" plain size="mini">年审申请</el-button>
+          <!--v-if="formData.Step>=5"-->
           <el-button type="primary" plain size="mini">增项申请</el-button>
           <router-link :to="'/oilsupplier/supplier/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
@@ -60,11 +61,9 @@
 
                 <el-col :span="8">
                   <el-form-item label="单位关系">
-                    <el-select ref="SpecType" multiple v-model="UnitRelationAry" filterable placeholder="请选择" style="width: 100%">
-                      <el-option
-                        v-for="item in UnitRelationOptions"
-                        :key="item.Id"
-                        :label="item.Key"
+                    <el-select ref="SpecType" multiple v-model="UnitRelationAry" filterable placeholder="请选择"
+                      style="width: 100%">
+                      <el-option v-for="item in UnitRelationOptions" :key="item.Id" :label="item.Key"
                         :value="item.Value">
                       </el-option>
                     </el-select>
@@ -299,7 +298,7 @@
                 <el-col :span="8">
                   <el-form-item label="质量管理体系认证情况">
                     <el-input v-model="formData.QualitySystemCert" placeholder="请输入" type="textarea"
-                              style="width: 100%"></el-input>
+                      style="width: 100%"></el-input>
                   </el-form-item>
                 </el-col>
                 <el-col :span="8">
@@ -329,7 +328,7 @@
                 <el-col :span="16">
                   <el-form-item label="营业范围">
                     <el-input v-model="formData.QualitySystemCert" placeholder="请输入" type="textarea"
-                              style="width: 100%"></el-input>
+                      style="width: 100%"></el-input>
                   </el-form-item>
                 </el-col>
                 <el-col :span="24">
@@ -471,7 +470,7 @@
 
         <el-tab-pane label="准入范围及资质" :disabled="formData.Step < 2">
           <business-list ref="businessList" :data="businessList" :SupplierCertId="certId" :SupplierId="serviceId"
-            :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></business-list>
+            :SupplierTypeCode="classId" @close="nexStepCB" height="360px" style="margin-top: 20px"></business-list>
         </el-tab-pane>
 
         <el-tab-pane label="审批流程">
@@ -479,7 +478,8 @@
             <div slot="header" class="clearfix">
               <span>审批流程</span>
               <span style="float: right;">
-                <el-button type="primary" size="mini" :disabled="formDataCert.Status > 0" :loading="applyLoading" @click="AuditEntity">提交审批
+                <el-button type="primary" size="mini" :disabled="formDataCert.Status > 0" :loading="applyLoading"
+                  @click="AuditEntity">提交审批
                 </el-button>
               </span>
             </div>
@@ -527,7 +527,7 @@
     },
     name: 'oilsupplierEdit',
 
-    data () {
+    data() {
       return {
         applyLoading: false,
         equipmentList: [], //企业主要装备情况
@@ -643,7 +643,7 @@
         }
       }
     },
-    created () {
+    created() {
       this.serviceId = this.$route.params.opera
       this.certId = this.$route.query.certid
       this.getDictOptions()
@@ -697,7 +697,7 @@
         }
       },
 
-      getDictOptions () {
+      getDictOptions() {
         api.getDictList(this.$axios).then(res => {
           this.UnitRelationOptions = res.data.items['UnitRelation']
           this.getCityList(res.data.items['GaodeMapChinaAreas'])
@@ -705,15 +705,17 @@
           console.error(err)
         })
       },
-      getCityList (areaJson) {
-        let resData = JSON.parse(areaJson)
-        let countstr = JSON.stringify(resData.districts[0].districts)
-        countstr = countstr.replace(/\,\"districts\"\:\[\]/g,'')
-        this.countryoptions = JSON.parse(countstr)
+      getCityList() {
+        this.$axios.get('http://restapi.amap.com/v3/config/district?key=13f54664eb5a883195604db09d3fba5c&subdistrict=3')
+          .then((res) => {
+            let countstr = JSON.stringify(res.data.districts[0].districts)
+            countstr = countstr.replace(/\,\"districts\"\:\[\]/g, '')
+            this.countryoptions = JSON.parse(countstr)
+          })
       },
 
       //保存信息
-      saveEntity () {
+      saveEntity() {
         this.$refs['EntityForm'].validate((valid) => {
           if (valid) {
             //this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
@@ -798,7 +800,7 @@
         return true
       },
       //企业人员结构情况
-      updateNumberEntity () {
+      updateNumberEntity() {
         if (!this.CheckCompanyBase()) {
           return false
         }
@@ -844,6 +846,10 @@
         });
       },
 
+      nexStepCB() {
+        this.formData.Step += 1
+      },
+
       jstimehandle(val) {
         if (val === '') {
           return '----'